From b0fd1a0b67801197f8089648b2f66ca025714ef2 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 3 Mar 2018 23:37:21 +0100 Subject: [PATCH 01/15] Upgrade to Jena 3.6.0 Closes #22 Signed-off-by: Andrew Berezovskyi --- src/pom.xml | 21 +++++------- src/store-core/pom.xml | 33 ++----------------- .../lyo/store/internals/JenaTdbStoreImpl.java | 23 ++++++++++--- .../SparqlQueryExecutorBasicAuthImpl.java | 26 +++++++++++---- 4 files changed, 48 insertions(+), 55 deletions(-) diff --git a/src/pom.xml b/src/pom.xml index ddaa307..2f64859 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -24,20 +24,12 @@ + org.apache.jena - jena-core - 3.0.1 - - - org.apache.jena - jena-arq - 3.0.1 - - - org.apache.jena - jena-tdb - 3.0.1 + apache-jena-libs + 3.6.0 + pom @@ -51,6 +43,11 @@ guava 21.0 + + org.apache.httpcomponents + httpclient + 4.5.5 + xml-apis diff --git a/src/store-core/pom.xml b/src/store-core/pom.xml index 8d1657b..7baeef7 100644 --- a/src/store-core/pom.xml +++ b/src/store-core/pom.xml @@ -48,37 +48,8 @@ org.apache.jena - jena-core - - - org.slf4j - slf4j-log4j12 - - - - - org.apache.jena - jena-arq - - - org.slf4j - slf4j-log4j12 - - - org.slf4j - jcl-over-slf4j - - - - - org.apache.jena - jena-tdb - - - org.slf4j - slf4j-log4j12 - - + apache-jena-libs + pom diff --git a/src/store-core/src/main/java/org/eclipse/lyo/store/internals/JenaTdbStoreImpl.java b/src/store-core/src/main/java/org/eclipse/lyo/store/internals/JenaTdbStoreImpl.java index 6a9d45e..18fa258 100644 --- a/src/store-core/src/main/java/org/eclipse/lyo/store/internals/JenaTdbStoreImpl.java +++ b/src/store-core/src/main/java/org/eclipse/lyo/store/internals/JenaTdbStoreImpl.java @@ -5,7 +5,7 @@ * Contributors: * Andrew Berezovskyi - initial implementation * %% - * Copyright (C) 2016 KTH Royal Institute of Technology + * Copyright (C) 2016 - 2018 KTH Royal Institute of Technology * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -15,6 +15,7 @@ */ import com.google.common.collect.Sets; +import java.util.HashSet; import org.apache.jena.query.Dataset; import org.apache.jena.query.ReadWrite; import org.apache.jena.rdf.model.Model; @@ -74,6 +75,7 @@ public boolean namedGraphExists(final URI namedGraph) { dataset.begin(ReadWrite.READ); try { contains = dataset.containsNamedModel(namedGraph.toString()); + dataset.commit(); } finally { dataset.end(); } @@ -86,9 +88,9 @@ public List getResources(final URI namedGraph, if (namedGraphExists(namedGraph)) { dataset.begin(ReadWrite.READ); final Model model = dataset.getNamedModel(namedGraph.toString()); - dataset.end(); try { final Object[] obj = JenaModelHelper.fromJenaModel(model, clazz); + dataset.commit(); @SuppressWarnings("unchecked") final T[] castObjects = (T[]) Array.newInstance( clazz, obj.length); for (int i = 0; i < obj.length; i++) { @@ -100,6 +102,8 @@ public List getResources(final URI namedGraph, InvocationTargetException | NoSuchMethodException | URISyntaxException e) { throw new ModelUnmarshallingException( "Failed to buildPersistent an " + "object from Jena model", e); + } finally { + dataset.end(); } } else { throw new StoreAccessException( @@ -163,7 +167,9 @@ public Set keySet() { dataset.begin(ReadWrite.READ); try { final Iterator namedGraphNames = dataset.listNames(); - return Sets.newHashSet(namedGraphNames); + final HashSet strings = Sets.newHashSet(namedGraphNames); + dataset.commit(); + return strings; } finally { dataset.end(); } @@ -172,7 +178,14 @@ public Set keySet() { @Override public void removeAll() { // TODO Andrew@2017-04-04: do we need a transaction here? - dataset.asDatasetGraph().clear(); + dataset.begin(ReadWrite.WRITE); + try { + dataset.asDatasetGraph().clear(); + dataset.commit(); + } + finally { + dataset.end(); + } } @Override @@ -198,7 +211,7 @@ public void insertJenaModel(final URI name, final Model model) { } finally { dataset.end(); } - TDB.sync(dataset); +// TDB.sync(dataset); } public void putJenaModel(final URI name, final Model model) { diff --git a/src/store-core/src/main/java/org/eclipse/lyo/store/internals/query/SparqlQueryExecutorBasicAuthImpl.java b/src/store-core/src/main/java/org/eclipse/lyo/store/internals/query/SparqlQueryExecutorBasicAuthImpl.java index d3f6cca..481630f 100644 --- a/src/store-core/src/main/java/org/eclipse/lyo/store/internals/query/SparqlQueryExecutorBasicAuthImpl.java +++ b/src/store-core/src/main/java/org/eclipse/lyo/store/internals/query/SparqlQueryExecutorBasicAuthImpl.java @@ -5,7 +5,7 @@ * Contributors: * Andrew Berezovskyi - initial implementation * %% - * Copyright (C) 2016 KTH Royal Institute of Technology + * Copyright (C) 2016 - 2018 KTH Royal Institute of Technology * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -14,12 +14,17 @@ * #L% */ +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.client.CredentialsProvider; +import org.apache.http.impl.client.BasicCredentialsProvider; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; import org.apache.jena.query.QueryExecution; import org.apache.jena.query.QueryExecutionFactory; import org.apache.jena.update.UpdateExecutionFactory; import org.apache.jena.update.UpdateFactory; import org.apache.jena.update.UpdateProcessor; -import org.apache.jena.atlas.web.auth.SimpleAuthenticator; /** * SparqlQueryExecutorImpl is a SPARQL endpoint-based implementation of {@link JenaQueryExecutor}. @@ -32,23 +37,30 @@ public class SparqlQueryExecutorBasicAuthImpl implements JenaQueryExecutor { private final String queryEndpoint; private final String updateEndpoint; - private final SimpleAuthenticator authenticator; + private final CloseableHttpClient client; public SparqlQueryExecutorBasicAuthImpl(final String sparqlEndpoint, final String updateEndpoint, final String login, final String password) { this.queryEndpoint = sparqlEndpoint; this.updateEndpoint = updateEndpoint; - authenticator = new SimpleAuthenticator(login, password.toCharArray()); + CredentialsProvider provider = new BasicCredentialsProvider(); + UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(login, password); + provider.setCredentials(AuthScope.ANY, credentials); + + client = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build(); } @Override public QueryExecution prepareSparqlQuery(final String query) { - return QueryExecutionFactory.sparqlService(queryEndpoint, query, authenticator); + return QueryExecutionFactory.sparqlService(queryEndpoint, query, client); } @Override public UpdateProcessor prepareSparqlUpdate(final String query) { - return UpdateExecutionFactory.createRemote(UpdateFactory.create(query), updateEndpoint, - authenticator); + return UpdateExecutionFactory.createRemote( + UpdateFactory.create(query), + updateEndpoint, + client + ); } } From 99fcf9f7d284b20f8fd3bfcc450c1e17737625b8 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sun, 4 Mar 2018 05:23:53 +0100 Subject: [PATCH 02/15] Update git ignores --- src/.gitignore | 4 +++- src/store-core/.gitignore | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index a6f89c2..39d5443 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1 +1,3 @@ -/target/ \ No newline at end of file +/.settings/ +/.project +/.classpath diff --git a/src/store-core/.gitignore b/src/store-core/.gitignore index 7d56db3..afa7537 100644 --- a/src/store-core/.gitignore +++ b/src/store-core/.gitignore @@ -13,9 +13,9 @@ hs_err_pid* # Eclipse +.project +.classpath .metadata -**/bin/ -**/tmp/ *.tmp *.bak *.swp From 6fdd5d0712c0cb4fbd5ec1b3ab6c21d1df9a0498 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 2 Sep 2017 22:08:48 +0200 Subject: [PATCH 03/15] Add Store Update This patch is moved from Gerrit Change 95016. Signed-off-by: Andrew Berezovskyi --- src/store-update/.gitignore | 87 ++++++ src/store-update/LICENSE.txt | 203 +++++++++++++ src/store-update/README.md | 76 +++++ src/store-update/doc/architecture.png | Bin 0 -> 165023 bytes src/store-update/pom.xml | 267 ++++++++++++++++++ .../src/license/eplv1/description.txt.ftl | 13 + .../src/license/eplv1/header.txt.ftl | 16 ++ .../src/license/eplv1/license.txt | 203 +++++++++++++ .../src/license/licenses.properties | 13 + .../lyo/tools/store/update/Handler.java | 16 ++ .../lyo/tools/store/update/OSLCMessage.java | 31 ++ .../store/update/ServiceProviderMessage.java | 14 + .../store/update/StoreUpdateManager.java | 99 +++++++ .../store/update/StoreUpdateRunnable.java | 94 ++++++ .../lyo/tools/store/update/change/Change.java | 34 +++ .../store/update/change/ChangeHelper.java | 37 +++ .../tools/store/update/change/ChangeKind.java | 45 +++ .../store/update/change/ChangeProvider.java | 15 + .../store/update/change/HistoryResource.java | 87 ++++++ .../store/update/change/package-info.java | 9 + .../lyo/tools/store/update/package-info.java | 10 + .../store/update/TestHistoryResource.java | 86 ++++++ .../src/test/resources/log4j.properties | 26 ++ 23 files changed, 1481 insertions(+) create mode 100644 src/store-update/.gitignore create mode 100644 src/store-update/LICENSE.txt create mode 100644 src/store-update/README.md create mode 100644 src/store-update/doc/architecture.png create mode 100644 src/store-update/pom.xml create mode 100644 src/store-update/src/license/eplv1/description.txt.ftl create mode 100644 src/store-update/src/license/eplv1/header.txt.ftl create mode 100644 src/store-update/src/license/eplv1/license.txt create mode 100644 src/store-update/src/license/licenses.properties create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java create mode 100644 src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java create mode 100644 src/store-update/src/test/resources/log4j.properties diff --git a/src/store-update/.gitignore b/src/store-update/.gitignore new file mode 100644 index 0000000..2b917aa --- /dev/null +++ b/src/store-update/.gitignore @@ -0,0 +1,87 @@ +######################### +# PROJECT +######################### + +/*.iml +/.idea/ + +######################### +# JAVA +######################### + +# Mobile Tools for Java (J2ME) +**/.mtj.tmp/ + +# Package Files # +*.war +*.ear + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +############################### +# Eclipse +# exceptions: .project, .launch +############################### + +.metadata +**/bin/ +**/tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +**/.settings/ +.loadpath +.recommenders + +# External tool builders +**/.externalToolBuilders/ + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +**/.recommenders/ + + +######################### +# MAVEN +######################### + +**/overlays/ +**/target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +**/.mvn/timing.properties diff --git a/src/store-update/LICENSE.txt b/src/store-update/LICENSE.txt new file mode 100644 index 0000000..f735bee --- /dev/null +++ b/src/store-update/LICENSE.txt @@ -0,0 +1,203 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation + distributed under this Agreement, and +b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are + distributed by that particular Contributor. A Contribution 'originates' + from a Contributor if it was added to the Program by such Contributor + itself or anyone acting on such Contributor's behalf. Contributions do not + include additions to the Program which: (i) are separate modules of + software distributed in conjunction with the Program under their own + license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + a) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free copyright license to + reproduce, prepare derivative works of, publicly display, publicly + perform, distribute and sublicense the Contribution of such Contributor, + if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free patent license under + Licensed Patents to make, use, sell, offer to sell, import and otherwise + transfer the Contribution of such Contributor, if any, in source code and + object code form. This patent license shall apply to the combination of + the Contribution and the Program if, at the time the Contribution is + added by the Contributor, such addition of the Contribution causes such + combination to be covered by the Licensed Patents. The patent license + shall not apply to any other combinations which include the Contribution. + No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses + to its Contributions set forth herein, no assurances are provided by any + Contributor that the Program does not infringe the patent or other + intellectual property rights of any other entity. Each Contributor + disclaims any liability to Recipient for claims brought by any other + entity based on infringement of intellectual property rights or + otherwise. As a condition to exercising the rights and licenses granted + hereunder, each Recipient hereby assumes sole responsibility to secure + any other intellectual property rights needed, if any. For example, if a + third party patent license is required to allow Recipient to distribute + the Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under +its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for + damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a reasonable + manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. + Contributors may not remove or alter any copyright notices contained + within the Program. + +Each Contributor must identify itself as the originator of its Contribution, +if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, +if a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits and +other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such Commercial +Contributor in connection with its distribution of the Program in a commercial +product offering. The obligations in this section do not apply to any claims +or Losses relating to any actual or alleged intellectual property +infringement. In order to qualify, an Indemnified Contributor must: +a) promptly notify the Commercial Contributor in writing of such claim, and +b) allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such claim at +its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If +that Commercial Contributor then makes performance claims, or offers +warranties related to Product X, those performance claims and warranties are +such Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using +and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the +risks and costs of program errors, compliance with applicable laws, damage to +or loss of data, programs or equipment, and unavailability or interruption of +operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION +LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of the +remainder of the terms of this Agreement, and without further action by the +parties hereto, such provision shall be reformed to the minimum extent +necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted +under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue +and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to +time. No one other than the Agreement Steward has the right to modify this +Agreement. The Eclipse Foundation is the initial Agreement Steward. The +Eclipse Foundation may assign the responsibility to serve as the Agreement +Steward to a suitable separate entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly +stated in Sections 2(a) and 2(b) above, Recipient receives no rights or +licenses to the intellectual property of any Contributor under this Agreement, +whether expressly, by implication, estoppel or otherwise. All rights in the +Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. diff --git a/src/store-update/README.md b/src/store-update/README.md new file mode 100644 index 0000000..d29beec --- /dev/null +++ b/src/store-update/README.md @@ -0,0 +1,76 @@ +# Lyo Store + +*Lyo Store* is a library that provides a simple interface for working with a triplestore via Java objects representing OSLC Resources. Lyo Store and Jena Models in the triple stores. + +**[Lyo Store Javadoc](http://assume.gitlab.io/jena-cache/apidocs/)** + +## Prerequisites + +* For an in-memory option: JVM heap should be set to 1G or above (see [Jena documentation][1] for more information on this). +* For an on-disk option: an empty writable folder on disk, around 200MB of space is pre-allocated. +* For a SPARQL option: a pair of SPARQL Query and SPARQL Update URLs, optionally with basic authentication. + +## Maven dependency + + + org.eclipse.lyo.tools + lyo-store + 0.24.0-SNAPSHOT + + +More build systems are covered here: http://assume.gitlab.io/jena-cache/dependency-info.html + + +## Initialisation + +### SPARQL + + String sparqlQueryEndpoint = properties.getProperty("sparqlQueryEndpoint"); + String sparqlUpdateEndpoint = properties.getProperty("sparqlUpdateEndpoint"); + Store store = StoreFactory.sparql(sparqlQueryEndpoint, sparqlUpdateEndpoint); + +### On-disk + + String storeDirProp = properties.getProperty("storeDir"); + Path storeDir = Paths.get(storeDirProp); + Store store = StoreFactory.onDisk(storeDir); + +### In-memory + + Store store = StoreFactory.inMemory(); + +## Basic usage + +### Add the new resources and overwrite the existing ones + +```java +try { + store.updateResources(GRAPH_NAME, // URI of the named graph + resourceArray); // an array of OSLC Resources +} catch (StoreAccessException e) { + logger.error("Error executing a query on a triplestore"); +} +``` + +### Retrieving the resources from the triplestore + +```java +if (store.namedGraphExists(GRAPH_NAME)) { + try { + final int limit = 10; // fetch 10 resources + final int offset = 0; // start with the first page + // 'limit+1' is a technique that allows you to determine if there are + // more results on the next page + List requirements = store.getResources(GRAPH_NAME, + Requirement.class, // resources of this class will be fetched and unmarshalled + limit + 1, // resource limit + offset)); // how many resources to skip, use for paging + } catch (StoreAccessException e) { + logger.error("Error executing a query on a triplestore"); + } catch ( ModelUnmarshallingException e) { + logger.error("Error unmarshalling the RDF from triplestore into Requirement class instances"); + } +} +``` + +[1]: https://jena.apache.org/documentation/tdb/architecture.html#caching-on-32-and-64-bit-java-systems diff --git a/src/store-update/doc/architecture.png b/src/store-update/doc/architecture.png new file mode 100644 index 0000000000000000000000000000000000000000..398cd67ee901276c4355abf80b397d215c9fb121 GIT binary patch literal 165023 zcmeFZc|4Zu`!@R2N@YkzSS6`e=1>%wizc&V$Xp_`5}BivM3X`?Q;{J=ri>{P$(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}UhX+e+>O1=i0D`{@nJ6aET6 zzj|Ty!f@yOJk&r$4$=OT7Qc5hT;O_j&v@s$Ri{;U`xMFV^w|V7M%Uup`)4~@_ROw- zw1;rK{D(N^G0SpLrT~K#oWQ~t3IfDI + + 4.0.0 + + + org.eclipse.lyo.store + store-parent + 2.3.0-SNAPSHOT + ../pom.xml + + + store-update + 2.3.0-SNAPSHOT + + + UTF-8 + UTF-8 + 1.8 + 1.8 + 2.1.2 + + + + + org.eclipse.lyo.store + store-core + 2.3.0-SNAPSHOT + + + + junit + junit + 4.10 + test + + + org.assertj + assertj-core + 3.5.2 + test + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.19.1 + + + + integration-test + verify + + + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.7 + + + true + + + + + + org.codehaus.mojo + license-maven-plugin + 1.10 + + eplv1 + ${project.baseUri}src/license + + KTH Royal Institute of Technology + + 2016 + + ${basedir}/src/license//eplv1/description.txt.ftl + + true + + + + + com.qulice + qulice-maven-plugin + 0.17 + + file:${basedir}/LICENSE.txt + + checkstyle:.* + findbugs:~* + cobertura:.* + dependencies:net.sourceforge.cobertura:cobertura + duplicatefinder:.* + + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + package + + report + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + + + + jar + + + + + + org.tendiwa + git-version-insert-maven-plugin + 0.1 + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + public + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.7 + + + + cobertura + + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + + + + + + Eclipse Public License 1.0 + https://www.eclipse.org/legal/epl-v10.html + + + + + + lyo-releases + lyo-releases repository + https://repo.eclipse.org/content/repositories/lyo-releases/ + + + + lyo-snapshots + lyo-snapshots repository + https://repo.eclipse.org/content/repositories/lyo-snapshots/ + + + + diff --git a/src/store-update/src/license/eplv1/description.txt.ftl b/src/store-update/src/license/eplv1/description.txt.ftl new file mode 100644 index 0000000..ab33804 --- /dev/null +++ b/src/store-update/src/license/eplv1/description.txt.ftl @@ -0,0 +1,13 @@ +<#-- + #%L + Contributors: + %% + Copyright (C) 2016 KTH Royal Institute of Technology + %% + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + #L% +--> +Contributors: diff --git a/src/store-update/src/license/eplv1/header.txt.ftl b/src/store-update/src/license/eplv1/header.txt.ftl new file mode 100644 index 0000000..6521ed8 --- /dev/null +++ b/src/store-update/src/license/eplv1/header.txt.ftl @@ -0,0 +1,16 @@ +<#-- + #%L + Contributors: + %% + Copyright (C) 2016 KTH Royal Institute of Technology + %% + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + #L% +--> +All rights reserved. This program and the accompanying materials +are made available under the terms of the Eclipse Public License v1.0 +which accompanies this distribution, and is available at +http://www.eclipse.org/legal/epl-v10.html diff --git a/src/store-update/src/license/eplv1/license.txt b/src/store-update/src/license/eplv1/license.txt new file mode 100644 index 0000000..f735bee --- /dev/null +++ b/src/store-update/src/license/eplv1/license.txt @@ -0,0 +1,203 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation + distributed under this Agreement, and +b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are + distributed by that particular Contributor. A Contribution 'originates' + from a Contributor if it was added to the Program by such Contributor + itself or anyone acting on such Contributor's behalf. Contributions do not + include additions to the Program which: (i) are separate modules of + software distributed in conjunction with the Program under their own + license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + a) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free copyright license to + reproduce, prepare derivative works of, publicly display, publicly + perform, distribute and sublicense the Contribution of such Contributor, + if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants + Recipient a non-exclusive, worldwide, royalty-free patent license under + Licensed Patents to make, use, sell, offer to sell, import and otherwise + transfer the Contribution of such Contributor, if any, in source code and + object code form. This patent license shall apply to the combination of + the Contribution and the Program if, at the time the Contribution is + added by the Contributor, such addition of the Contribution causes such + combination to be covered by the Licensed Patents. The patent license + shall not apply to any other combinations which include the Contribution. + No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses + to its Contributions set forth herein, no assurances are provided by any + Contributor that the Program does not infringe the patent or other + intellectual property rights of any other entity. Each Contributor + disclaims any liability to Recipient for claims brought by any other + entity based on infringement of intellectual property rights or + otherwise. As a condition to exercising the rights and licenses granted + hereunder, each Recipient hereby assumes sole responsibility to secure + any other intellectual property rights needed, if any. For example, if a + third party patent license is required to allow Recipient to distribute + the Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient + copyright rights in its Contribution, if any, to grant the copyright + license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under +its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for + damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a reasonable + manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. + Contributors may not remove or alter any copyright notices contained + within the Program. + +Each Contributor must identify itself as the originator of its Contribution, +if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, +if a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits and +other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such Commercial +Contributor in connection with its distribution of the Program in a commercial +product offering. The obligations in this section do not apply to any claims +or Losses relating to any actual or alleged intellectual property +infringement. In order to qualify, an Indemnified Contributor must: +a) promptly notify the Commercial Contributor in writing of such claim, and +b) allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any such claim at +its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If +that Commercial Contributor then makes performance claims, or offers +warranties related to Product X, those performance claims and warranties are +such Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a +court requires any other Contributor to pay any damages as a result, the +Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using +and distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement , including but not limited to the +risks and costs of program errors, compliance with applicable laws, damage to +or loss of data, programs or equipment, and unavailability or interruption of +operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION +LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of the +remainder of the terms of this Agreement, and without further action by the +parties hereto, such provision shall be reformed to the minimum extent +necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted +under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue +and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to +time. No one other than the Agreement Steward has the right to modify this +Agreement. The Eclipse Foundation is the initial Agreement Steward. The +Eclipse Foundation may assign the responsibility to serve as the Agreement +Steward to a suitable separate entity. Each new version of the Agreement will +be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the +Agreement under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the Program +(including its Contributions) under the new version. Except as expressly +stated in Sections 2(a) and 2(b) above, Recipient receives no rights or +licenses to the intellectual property of any Contributor under this Agreement, +whether expressly, by implication, estoppel or otherwise. All rights in the +Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. diff --git a/src/store-update/src/license/licenses.properties b/src/store-update/src/license/licenses.properties new file mode 100644 index 0000000..23021d4 --- /dev/null +++ b/src/store-update/src/license/licenses.properties @@ -0,0 +1,13 @@ +### +# #%L +# jena-cache +# %% +# Copyright (C) 2016 Andrew Berezovskyi +# %% +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# #L% +### +eplv1=Eclipse Public License 1.0 diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java new file mode 100644 index 0000000..85dabc4 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java @@ -0,0 +1,16 @@ +package org.eclipse.lyo.tools.store.update; + +import java.util.Collection; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.Change; + +/** + * Handler is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface Handler { + void handle(Store store, Collection> changes); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java new file mode 100644 index 0000000..8d9a592 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java @@ -0,0 +1,31 @@ +package org.eclipse.lyo.tools.store.update; + +import java.net.URI; + +/** + * OSLCMessage is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class OSLCMessage implements ServiceProviderMessage { + private final URI serviceProviderId; + + public OSLCMessage(URI serviceProviderId) { + this.serviceProviderId = serviceProviderId; + } + + @Override + public URI getServiceProviderId() { + return serviceProviderId; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("OSLCMessage{"); + sb.append("serviceProviderId='").append(serviceProviderId).append('\''); + sb.append('}'); + return sb.toString(); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java new file mode 100644 index 0000000..3de8f8d --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java @@ -0,0 +1,14 @@ +package org.eclipse.lyo.tools.store.update; + +import java.net.URI; + +/** + * Created on 06.03.17 + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.1 + */ +public interface ServiceProviderMessage { + URI getServiceProviderId(); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java new file mode 100644 index 0000000..5351d63 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java @@ -0,0 +1,99 @@ +package org.eclipse.lyo.tools.store.update; + +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a + * predefined delay or on-demand. Operates on a generic message (which must extend + * {@link OSLCMessage}) that is passed to handlers. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class StoreUpdateManager { + private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); + private static final int NODELAY = 0; + private static final int SINGLE_THREAD_POOL = 1; + private final ScheduledExecutorService executor; + private final ChangeProvider changeProvider; + private final Store store; + private final List> handlers = new ArrayList<>(); + + /** + * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a + * predefined delay or on-demand. + * + * @param store Instance of an initialised Store + * @param changeProvider Provider of the changes in the underlying tool. + */ + public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { + executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); + this.store = store; + this.changeProvider = changeProvider; + } + + /** + * Polling update on a given {@link ChangeProvider} followed by a notification to all + * previously registered + * {@link Handler} objects. + * + * @param lastUpdate Time of last store update, changes before this moment might be dropped. + * @param delaySeconds Seconds between polling checks. + */ + public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, + lastUpdate, null, handlers); + executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, + TimeUnit.SECONDS); + + StoreUpdateManager.LOGGER.trace( + "ProRManager.contextInitializeServletListener() body ran successfully"); + } + + /** + * Submit a single update request. Typically done from the HTTP handler. + * + * @param lastUpdate + * @param message Specific details for the {@link ChangeProvider} + * @return {@link Future} that allows to block until the runnable is finished executing + * (strongly discouraged). + */ + public Future submit(final ZonedDateTime lastUpdate, final M message) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, + lastUpdate, message, handlers); + return executor.submit(updateRunnable); + } + + /** + * Add a {@link Handler} that will process the collection of + * {@link org.eclipse.lyo.tools.store.update.change.Change} generated by the + * {@link ChangeProvider}. Handler is not guaranteed to be called if added after the update + * has been scheduled. + * + * @param handler Handler that should be called whenever {@link ChangeProvider} returns any + * changes. + */ + public void addHandler(final Handler handler) { + handlers.add(handler); + } + + /** + * Method can be overridden in case a more sophisticated Runnable has to be constructed. + */ + protected StoreUpdateRunnable buildRunnable(final Store store, + final ChangeProvider changeProvider, final ZonedDateTime lastUpdate, final M message, + final List> handlers) { + return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java new file mode 100644 index 0000000..df16f7b --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java @@ -0,0 +1,94 @@ +package org.eclipse.lyo.tools.store.update; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.Change; +import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Requests latest {@link Change} collection from {@link ChangeProvider} and triggers each + * handler afterwards. Stores the timestamp of the newest change to request new updates starting + * from that point in time. + *

+ *

Handlers will be notified with different message per service provider as accessible via + * {@link OSLCMessage#getServiceProviderId()}.

+ * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +class StoreUpdateRunnable implements Runnable { + + private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, + 1, ZoneId.of("UTC")); + private final Logger log = LoggerFactory.getLogger(StoreUpdateRunnable.class); + private final ChangeProvider changeProvider; + private final M message; + private final Store store; + private final List> handlers; + private ZonedDateTime lastUpdate; + + /** + * @param store Initialised Store + * @param changeProvider Change provider + * @param lastUpdate Initial timestamp. If null, will be set to {@link + * StoreUpdateRunnable#LAST_UPDATE_DEFAULT} + * @param message Initial message to the {@link ChangeProvider} + * @param handlers List of handlers to be notified. + */ + StoreUpdateRunnable(final Store store, final ChangeProvider changeProvider, + final ZonedDateTime lastUpdate, final M message, final List> handlers) { + this.store = store; + this.changeProvider = changeProvider; + this.message = message; + this.handlers = handlers; + if (lastUpdate != null) { + this.lastUpdate = lastUpdate; + } else { + this.lastUpdate = StoreUpdateRunnable.LAST_UPDATE_DEFAULT; + } + } + + @Override + public void run() { + try { + log.trace("Running background update"); + Collection> changes = null; + try { + changes = changeProvider.getChangesSince(lastUpdate, message); + } catch (final Exception e) { + log.error("ChangeProvider threw an exception", e); + } + if (changes != null && !changes.isEmpty()) { + for (final Handler handler : handlers) { + log.trace("Notifying {}", handler); + try { + handler.handle(store, changes); + } catch (final Exception e) { + log.warn("Handler {} threw an exception", handler, e); + } + } + for (final Change change : changes) { + if (change != null) { + final Date date = change.getHistoryResource().getTimestamp(); + final ZonedDateTime dateTime = date.toInstant() + .atZone(ZoneId.systemDefault()); + if (lastUpdate.isBefore(dateTime)) { + lastUpdate = dateTime; + } + } + } + log.trace("Setting previous revision to {}", lastUpdate); + } + } catch (final Exception e) { + // ExecutorService will terminate the whole schedule if a Runnable throws an exception + log.error("A handler threw an exception!", e); + } + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java new file mode 100644 index 0000000..cb9e3d9 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java @@ -0,0 +1,34 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +/** + * Change is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class Change { + private final AbstractResource resource; + private final HistoryResource historyResource; + private final M message; + + public Change(AbstractResource resource, HistoryResource historyResource, M message) { + this.resource = resource; + this.historyResource = historyResource; + this.message = message; + } + + public AbstractResource getResource() { + return resource; + } + + public HistoryResource getHistoryResource() { + return historyResource; + } + + public M getMessage() { + return message; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java new file mode 100644 index 0000000..0bda8b5 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java @@ -0,0 +1,37 @@ +package org.eclipse.lyo.tools.store.update.change; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * ChangeHelper is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class ChangeHelper { + + public static List> changesCreated(Collection> allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) + .collect(Collectors.toList()); + } + + public static List> changesModified(Collection> allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + .collect(Collectors.toList()); + } + + public static List historyFrom(Collection> changes) { + return ChangeHelper.mapFn(changes, Change::getHistoryResource); + } + + public static List mapFn(Collection changes, Function mapper) { + return changes.stream().map(mapper).collect(Collectors.toList()); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java new file mode 100644 index 0000000..5e1391c --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java @@ -0,0 +1,45 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; + +/** + * ChangeKind is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(ChangeKind.NAME) +@OslcResourceShape(title = "Change Kind Resource Shape", describes = HistoryResource.NS_TRS + ChangeKind.NAME) +public enum ChangeKind { + // Strings taken from the TRS provider implementation + CREATION("Created"), + MODIFICATION("Modified"), + DELETION("Deleted"); + + public static final String NAME = "ChangeKind"; + private final String created; + + ChangeKind(String created) { + this.created = created; + } + + public static ChangeKind fromString(String text) { + if (text != null) { + for (ChangeKind kind : ChangeKind.values()) { + if (text.equalsIgnoreCase(kind.created)) { + return kind; + } + } + } + throw new IllegalArgumentException("No constant with text " + text + " found"); + } + + @Override + public String toString() { + return created; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java new file mode 100644 index 0000000..0d9ae69 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java @@ -0,0 +1,15 @@ +package org.eclipse.lyo.tools.store.update.change; + +import java.time.ZonedDateTime; +import java.util.Collection; + +/** + * ChangeProvider is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface ChangeProvider { + Collection> getChangesSince(ZonedDateTime lastUpdate, M message); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java new file mode 100644 index 0000000..e55e12a --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java @@ -0,0 +1,87 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +import java.net.URI; +import java.time.ZonedDateTime; +import java.util.Date; + +/** + * HistoryResource is a wrapper OSLC Resource around org.eclipse.lyo.oslc4j.trs.provider.HistoryData. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(HistoryResource.NAME) +@OslcResourceShape(title = "TRS History Resource Shape", describes = HistoryResource.TYPE) +public class HistoryResource extends AbstractResource { + public static final String NS_TRS = "http://open-services.net/ns/core/trs#"; + public static final String NAME = "TrsHistoryResource"; + public static final String TYPE = NS_TRS + NAME; + private ChangeKind changeKind; + private Date timestamp; + private URI resourceURI; + + /** + * Shall be used only by the OSLC Jena Model Helper + */ + @Deprecated + public HistoryResource() { + } + + public HistoryResource(ChangeKind changeKind, Date timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = timestamp; + this.resourceURI = resourceURI; + } + + public HistoryResource(ChangeKind changeKind, ZonedDateTime timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = Date.from(timestamp.toInstant()); + this.resourceURI = resourceURI; + } + + @OslcName("change_kind") + @OslcPropertyDefinition(NS_TRS + "change_kind") + public String getChangeKind() { + return changeKind.toString(); + } + + public void setChangeKind(ChangeKind changeKind) { + this.changeKind = changeKind; + } + + public ChangeKind getChangeKindEnum() { + return changeKind; + } + + public void setChangeKind(String changeKind) { + this.changeKind = ChangeKind.fromString(changeKind); + } + + @OslcName("timestamp") + @OslcPropertyDefinition(NS_TRS + "timestamp") + public Date getTimestamp() { + return timestamp; + } + + public void setTimestamp(Date timestamp) { + this.timestamp = timestamp; + } + + @OslcName("uri") + @OslcPropertyDefinition(NS_TRS + "uri") + public URI getResourceURI() { + return resourceURI; + } + + public void setResourceURI(URI resourceURI) { + this.resourceURI = resourceURI; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java new file mode 100644 index 0000000..36a7641 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java @@ -0,0 +1,9 @@ +/** + * Classes for defining changes for handlers. + * {@link org.eclipse.lyo.tools.store.update.change.HistoryResource} can be persisted in a + * triplestore. + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.tools.store.update.change; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java new file mode 100644 index 0000000..2e5a945 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java @@ -0,0 +1,10 @@ +/** + * Common primitives for updating store. + * {@link org.eclipse.lyo.tools.store.update.StoreUpdateRunnable} is scheduled by + * {@link org.eclipse.lyo.tools.store.update.StoreUpdateManager}. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.tools.store.update; diff --git a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java new file mode 100644 index 0000000..4c2c433 --- /dev/null +++ b/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java @@ -0,0 +1,86 @@ +package org.eclipse.lyo.tools.store.update; + +import com.hp.hpl.jena.rdf.model.Model; +import java.net.URI; +import java.time.Instant; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.StoreFactory; +import org.eclipse.lyo.tools.store.update.change.ChangeKind; +import org.eclipse.lyo.tools.store.update.change.HistoryResource; +import org.junit.Test; + +/** + * TestTrsHistoryResource is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class TestHistoryResource { + public static final URI RESOURCE_URI = URI.create("test:test"); + private final Store store = StoreFactory.inMemory(); + + @Test + public void testResourceIsMarshalled() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(0); + } + + @Test + public void testResourceContainsStatements() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(1); + } + + @Test + public void testResourceIsPersisted() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + assertThat(store.keySet()).hasSize(0); + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + assertThat(store.keySet()).hasSize(1); + } + + @Test + public void testResourceIsRestored() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + assertThat(resources).hasSize(1); + } + + @Test + public void testResourceIsRestoredWithProperties() throws Exception { + String testResourceURI = "lyo:testtest"; + Date timestamp = Date.from(Instant.now()); + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, timestamp, + URI.create(testResourceURI)); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + HistoryResource storeResource = resources.get(0); + + assertThat(storeResource.getChangeKind()).isEqualToIgnoringCase(String.valueOf(ChangeKind.CREATION)); + assertThat(storeResource.getTimestamp()).isEqualTo(timestamp); + assertThat(storeResource.getResourceURI().toASCIIString()).isEqualTo(testResourceURI); + } +} diff --git a/src/store-update/src/test/resources/log4j.properties b/src/store-update/src/test/resources/log4j.properties new file mode 100644 index 0000000..9f4c714 --- /dev/null +++ b/src/store-update/src/test/resources/log4j.properties @@ -0,0 +1,26 @@ +### +# #%L +# Contributors: +# Andrew Berezovskyi - initial template (based on https://logging.apache.org/log4j/1.2/manual.html) +# +# NOTICE: +# Copyright © 2000-2002 The Apache Software Foundation. All rights reserved. This software is published under the terms of the Apache Software License version 2.0, a copy of which has been included in the LICENSE file shipped with the log4j distribution. This document is based on the article "Log4j delivers control over logging" published in November 2000 edition of JavaWorld. However, the present article containsKey more detailed and up to date information. The present short manual also borrows some text from "The complete log4j manual" by the same author (yours truly). +# %% +# Copyright (C) 2016 KTH Royal Institute of Technology +# %% +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# #L% +### +# Set root logger level to DEBUG and its only appender to rootAppender. +log4j.rootLogger=DEBUG, rootAppender + +log4j.appender.rootAppender=org.apache.log4j.ConsoleAppender +log4j.appender.rootAppender.layout=org.apache.log4j.PatternLayout +log4j.appender.rootAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n + + +log4j.logger.org.apache.jena=INFO +log4j.logger.com.hp.hpl.jena=INFO From 45227d24241e9c223ace68fcee9909fc2a67191d Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 2 Sep 2017 22:21:49 +0200 Subject: [PATCH 04/15] Add the store-update module to the parent --- src/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pom.xml b/src/pom.xml index 2f64859..94ce337 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -19,6 +19,7 @@ store-core + store-update From 83e8c7c76ab67cf5236f480148bf6fe56df3c523 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 2 Sep 2017 22:44:00 +0200 Subject: [PATCH 05/15] Refactor the code to fit with the new store-core Signed-off-by: Andrew Berezovskyi --- .../eclipse/lyo/{tools => }/store/update/Handler.java | 6 +++--- .../lyo/{tools => }/store/update/OSLCMessage.java | 2 +- .../store/update/ServiceProviderMessage.java | 2 +- .../{tools => }/store/update/StoreUpdateManager.java | 9 +++++---- .../{tools => }/store/update/StoreUpdateRunnable.java | 8 ++++---- .../lyo/{tools => }/store/update/change/Change.java | 2 +- .../{tools => }/store/update/change/ChangeHelper.java | 2 +- .../{tools => }/store/update/change/ChangeKind.java | 2 +- .../store/update/change/ChangeProvider.java | 2 +- .../store/update/change/HistoryResource.java | 2 +- .../{tools => }/store/update/change/package-info.java | 4 ++-- .../org/eclipse/lyo/store/update/package-info.java | 10 ++++++++++ .../eclipse/lyo/tools/store/update/package-info.java | 10 ---------- .../{tools => }/store/update/TestHistoryResource.java | 10 +++++----- 14 files changed, 36 insertions(+), 35 deletions(-) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/Handler.java (62%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/OSLCMessage.java (94%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/ServiceProviderMessage.java (83%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/StoreUpdateManager.java (94%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/StoreUpdateRunnable.java (94%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/Change.java (93%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/ChangeHelper.java (96%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/ChangeKind.java (96%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/ChangeProvider.java (85%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/HistoryResource.java (98%) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/change/package-info.java (53%) create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java rename src/store-update/src/test/java/org/eclipse/lyo/{tools => }/store/update/TestHistoryResource.java (92%) diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java similarity index 62% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java index 85dabc4..07774bb 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java @@ -1,8 +1,8 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.util.Collection; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.Change; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.update.change.Change; /** * Handler is . diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java similarity index 94% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java index 8d9a592..c10466d 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.net.URI; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java similarity index 83% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java index 3de8f8d..78bb667 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.net.URI; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java similarity index 94% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java index 5351d63..252470d 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.time.ZonedDateTime; import java.util.ArrayList; @@ -7,8 +7,9 @@ import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.update.change.Change; +import org.eclipse.lyo.store.update.change.ChangeProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,7 +78,7 @@ public Future submit(final ZonedDateTime lastUpdate, final M message) { /** * Add a {@link Handler} that will process the collection of - * {@link org.eclipse.lyo.tools.store.update.change.Change} generated by the + * {@link Change} generated by the * {@link ChangeProvider}. Handler is not guaranteed to be called if added after the update * has been scheduled. * diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java similarity index 94% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java index df16f7b..b724d9a 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java @@ -1,13 +1,13 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Collection; import java.util.Date; import java.util.List; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.Change; -import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.update.change.Change; +import org.eclipse.lyo.store.update.change.ChangeProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java similarity index 93% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java index cb9e3d9..0dc19f2 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; import org.eclipse.lyo.oslc4j.core.model.AbstractResource; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java similarity index 96% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java index 0bda8b5..5dc65c3 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; import java.util.Collection; import java.util.List; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java similarity index 96% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java index 5e1391c..1c8ad1f 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; import org.eclipse.lyo.oslc4j.core.annotation.OslcName; import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java similarity index 85% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java index 0d9ae69..e135c9d 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; import java.time.ZonedDateTime; import java.util.Collection; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java similarity index 98% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java index e55e12a..188e852 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; import org.eclipse.lyo.oslc4j.core.annotation.OslcName; import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java similarity index 53% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java index 36a7641..8d8df3b 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java @@ -1,9 +1,9 @@ /** * Classes for defining changes for handlers. - * {@link org.eclipse.lyo.tools.store.update.change.HistoryResource} can be persisted in a + * {@link org.eclipse.lyo.store.update.change.HistoryResource} can be persisted in a * triplestore. * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ * @since 0.18.0 */ -package org.eclipse.lyo.tools.store.update.change; +package org.eclipse.lyo.store.update.change; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java new file mode 100644 index 0000000..dedee4f --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java @@ -0,0 +1,10 @@ +/** + * Common primitives for updating store. + * {@link org.eclipse.lyo.store.update.StoreUpdateRunnable} is scheduled by + * {@link org.eclipse.lyo.store.update.StoreUpdateManager}. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.store.update; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java deleted file mode 100644 index 2e5a945..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Common primitives for updating store. - * {@link org.eclipse.lyo.tools.store.update.StoreUpdateRunnable} is scheduled by - * {@link org.eclipse.lyo.tools.store.update.StoreUpdateManager}. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -package org.eclipse.lyo.tools.store.update; diff --git a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java similarity index 92% rename from src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java rename to src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java index 4c2c433..fd4c32e 100644 --- a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java +++ b/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import com.hp.hpl.jena.rdf.model.Model; import java.net.URI; @@ -8,10 +8,10 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.StoreFactory; -import org.eclipse.lyo.tools.store.update.change.ChangeKind; -import org.eclipse.lyo.tools.store.update.change.HistoryResource; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.StoreFactory; +import org.eclipse.lyo.store.update.change.ChangeKind; +import org.eclipse.lyo.store.update.change.HistoryResource; import org.junit.Test; /** From 9fafb491b678458918a52ea9c7d97ebd552c5f8a Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Mon, 27 Nov 2017 21:56:28 +0100 Subject: [PATCH 06/15] Add TRS and Store handlers Signed-off-by: Andrew Berezovskyi --- .../store/ModelUnmarshallingException.java | 5 + .../lyo/store/StoreAccessException.java | 5 + src/store-update/pom.xml | 457 ++++++++---------- .../org/eclipse/lyo/store/update/Handler.java | 2 +- .../eclipse/lyo/store/update/OSLCMessage.java | 31 -- .../store/update/ServiceProviderMessage.java | 2 +- .../lyo/store/update/StoreUpdateManager.java | 70 +-- .../lyo/store/update/StoreUpdateRunnable.java | 4 +- .../lyo/store/update/UpdateMessage.java | 5 + .../lyo/store/update/change/Change.java | 11 +- .../lyo/store/update/change/ChangeHelper.java | 10 +- .../store/update/change/ChangeProvider.java | 4 +- .../update/handlers/SimpleStoreHandler.java | 105 ++++ .../update/handlers/TrsChangelogHandler.java | 61 +++ .../handlers/TrsMqttChangeLogHandler.java | 91 ++++ .../store/update/handlers/package-info.java | 8 + 16 files changed, 537 insertions(+), 334 deletions(-) delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java diff --git a/src/store-core/src/main/java/org/eclipse/lyo/store/ModelUnmarshallingException.java b/src/store-core/src/main/java/org/eclipse/lyo/store/ModelUnmarshallingException.java index 1e859b9..a5b10ad 100644 --- a/src/store-core/src/main/java/org/eclipse/lyo/store/ModelUnmarshallingException.java +++ b/src/store-core/src/main/java/org/eclipse/lyo/store/ModelUnmarshallingException.java @@ -24,6 +24,11 @@ * @since 0.14.0 */ public class ModelUnmarshallingException extends Exception { + /** + * + */ + private static final long serialVersionUID = 7760792549346636219L; + public ModelUnmarshallingException() { super(); } diff --git a/src/store-core/src/main/java/org/eclipse/lyo/store/StoreAccessException.java b/src/store-core/src/main/java/org/eclipse/lyo/store/StoreAccessException.java index b44e466..8deb6fe 100644 --- a/src/store-core/src/main/java/org/eclipse/lyo/store/StoreAccessException.java +++ b/src/store-core/src/main/java/org/eclipse/lyo/store/StoreAccessException.java @@ -23,6 +23,11 @@ * @since 0.13 */ public class StoreAccessException extends Exception { + /** + * + */ + private static final long serialVersionUID = -7535919324037847033L; + public StoreAccessException() { super(); } diff --git a/src/store-update/pom.xml b/src/store-update/pom.xml index 2bb4f28..12900a2 100644 --- a/src/store-update/pom.xml +++ b/src/store-update/pom.xml @@ -1,267 +1,216 @@ - 4.0.0 + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - - org.eclipse.lyo.store - store-parent - 2.3.0-SNAPSHOT - ../pom.xml - - - store-update + + org.eclipse.lyo.store + store-parent 2.3.0-SNAPSHOT + ../pom.xml + - - UTF-8 - UTF-8 - 1.8 - 1.8 - 2.1.2 - + store-update + + UTF-8 + UTF-8 + 1.8 + 1.8 + 2.3.0-SNAPSHOT + - - - org.eclipse.lyo.store - store-core - 2.3.0-SNAPSHOT - - - - junit - junit - 4.10 - test - - - org.assertj - assertj-core - 3.5.2 - test - - + + + org.eclipse.lyo.store + store-core + 2.2.0 + + + junit + junit + test + + + org.assertj + assertj-core + test + + + org.eclipse.lyo.trs + trs-provider + 2.4.0-SNAPSHOT + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + 1.1.0 + + - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.19.1 - - - - integration-test - verify - - - - - - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - - true - - - - - - org.codehaus.mojo - license-maven-plugin - 1.10 - - eplv1 - ${project.baseUri}src/license - - KTH Royal Institute of Technology - - 2016 - - ${basedir}/src/license//eplv1/description.txt.ftl - - true - - - - - com.qulice - qulice-maven-plugin - 0.17 - - file:${basedir}/LICENSE.txt - - checkstyle:.* - findbugs:~* - cobertura:.* - dependencies:net.sourceforge.cobertura:cobertura - duplicatefinder:.* - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.7.201606060606 - - - jacoco-initialize - - prepare-agent - - - - jacoco-site - package - - report - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - - - - jar - - - - - - org.tendiwa - git-version-insert-maven-plugin - 0.1 - - - + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.19.1 + + + + integration-test + verify + + + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.7 + + + true + + + + + + org.codehaus.mojo + license-maven-plugin + 1.10 + + eplv1 + ${project.baseUri}src/license + + KTH Royal Institute of Technology + + 2016 + + ${basedir}/src/license//eplv1/description.txt.ftl + + true + + + + + com.qulice + qulice-maven-plugin + 0.17 + + file:${basedir}/LICENSE.txt + + checkstyle:.* + findbugs:~* + cobertura:.* + dependencies:net.sourceforge.cobertura:cobertura + duplicatefinder:.* + + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + package + + report + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + + + + jar + + + + + + org.tendiwa + git-version-insert-maven-plugin + 0.1 + + + - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - public - - - - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - - - cobertura - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.7.201606060606 - - - - + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + public + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.7 + + + + cobertura + + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + + + - - - Eclipse Public License 1.0 - https://www.eclipse.org/legal/epl-v10.html - - + + + Eclipse Public License 1.0 + https://www.eclipse.org/legal/epl-v10.html + + - - - lyo-releases - lyo-releases repository - https://repo.eclipse.org/content/repositories/lyo-releases/ + + + lyo-releases + lyo-releases repository + https://repo.eclipse.org/content/repositories/lyo-releases/ - - - lyo-snapshots - lyo-snapshots repository - https://repo.eclipse.org/content/repositories/lyo-snapshots/ + + + lyo-snapshots + lyo-snapshots repository + https://repo.eclipse.org/content/repositories/lyo-snapshots/ - - + + diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java index 07774bb..f22f08f 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java @@ -12,5 +12,5 @@ * @since 0.0.0 */ public interface Handler { - void handle(Store store, Collection> changes); + Collection> handle(Store store, Collection> changes); } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java deleted file mode 100644 index c10466d..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.net.URI; - -/** - * OSLCMessage is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class OSLCMessage implements ServiceProviderMessage { - private final URI serviceProviderId; - - public OSLCMessage(URI serviceProviderId) { - this.serviceProviderId = serviceProviderId; - } - - @Override - public URI getServiceProviderId() { - return serviceProviderId; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("OSLCMessage{"); - sb.append("serviceProviderId='").append(serviceProviderId).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java index 78bb667..607ffab 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java @@ -10,5 +10,5 @@ * @since 0.0.1 */ public interface ServiceProviderMessage { - URI getServiceProviderId(); + URI getServiceProviderUri(); } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java index 252470d..c375791 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java @@ -14,15 +14,15 @@ import org.slf4j.LoggerFactory; /** - * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a - * predefined delay or on-demand. Operates on a generic message (which must extend - * {@link OSLCMessage}) that is passed to handlers. + * Schedules {@link StoreUpdateRunnable} via internal + * {@link ScheduledExecutorService} with a predefined delay or on-demand. + * Operates on a generic message that is passed to handlers. * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ * @since 0.0.0 */ -public class StoreUpdateManager { +public class StoreUpdateManager { private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); private static final int NODELAY = 0; private static final int SINGLE_THREAD_POOL = 1; @@ -32,11 +32,13 @@ public class StoreUpdateManager { private final List> handlers = new ArrayList<>(); /** - * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a - * predefined delay or on-demand. + * Schedules {@link StoreUpdateRunnable} via internal + * {@link ScheduledExecutorService} with a predefined delay or on-demand. * - * @param store Instance of an initialised Store - * @param changeProvider Provider of the changes in the underlying tool. + * @param store + * Instance of an initialised Store + * @param changeProvider + * Provider of the changes in the underlying tool. */ public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); @@ -45,56 +47,56 @@ public StoreUpdateManager(final Store store, final ChangeProvider changeProvi } /** - * Polling update on a given {@link ChangeProvider} followed by a notification to all - * previously registered - * {@link Handler} objects. + * Polling update on a given {@link ChangeProvider} followed by a notification + * to all previously registered {@link Handler} objects. * - * @param lastUpdate Time of last store update, changes before this moment might be dropped. - * @param delaySeconds Seconds between polling checks. + * @param lastUpdate + * Time of last store update, changes before this moment might be + * dropped. + * @param delaySeconds + * Seconds between polling checks. */ public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, - lastUpdate, null, handlers); - executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, - TimeUnit.SECONDS); + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, null, handlers); + executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, TimeUnit.SECONDS); - StoreUpdateManager.LOGGER.trace( - "ProRManager.contextInitializeServletListener() body ran successfully"); + StoreUpdateManager.LOGGER.trace("Poll request has been enqueued"); } /** * Submit a single update request. Typically done from the HTTP handler. * * @param lastUpdate - * @param message Specific details for the {@link ChangeProvider} - * @return {@link Future} that allows to block until the runnable is finished executing - * (strongly discouraged). + * @param message + * Specific details for the {@link ChangeProvider} + * @return {@link Future} that allows to block until the runnable is finished + * executing (strongly discouraged). */ public Future submit(final ZonedDateTime lastUpdate, final M message) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, - lastUpdate, message, handlers); + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, message, + handlers); return executor.submit(updateRunnable); } /** - * Add a {@link Handler} that will process the collection of - * {@link Change} generated by the - * {@link ChangeProvider}. Handler is not guaranteed to be called if added after the update - * has been scheduled. + * Add a {@link Handler} that will process the collection of {@link Change} + * generated by the {@link ChangeProvider}. Handler is not guaranteed to be + * called if added after the update has been scheduled. * - * @param handler Handler that should be called whenever {@link ChangeProvider} returns any - * changes. + * @param handler + * Handler that should be called whenever {@link ChangeProvider} + * returns any changes. */ public void addHandler(final Handler handler) { handlers.add(handler); } /** - * Method can be overridden in case a more sophisticated Runnable has to be constructed. + * Method can be overridden in case a more sophisticated Runnable has to be + * constructed. */ - protected StoreUpdateRunnable buildRunnable(final Store store, - final ChangeProvider changeProvider, final ZonedDateTime lastUpdate, final M message, - final List> handlers) { + protected StoreUpdateRunnable buildRunnable(final Store store, final ChangeProvider changeProvider, + final ZonedDateTime lastUpdate, final M message, final List> handlers) { return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); } } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java index b724d9a..dae9317 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java @@ -23,7 +23,7 @@ * @version $version-stub$ * @since 0.18.0 */ -class StoreUpdateRunnable implements Runnable { +class StoreUpdateRunnable implements Runnable { private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, 1, ZoneId.of("UTC")); @@ -74,7 +74,7 @@ public void run() { log.warn("Handler {} threw an exception", handler, e); } } - for (final Change change : changes) { + for (final Change change : changes) { if (change != null) { final Date date = change.getHistoryResource().getTimestamp(); final ZonedDateTime dateTime = date.toInstant() diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java new file mode 100644 index 0000000..9d32be7 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java @@ -0,0 +1,5 @@ +package org.eclipse.lyo.store.update; + +public interface UpdateMessage { + +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java index 0dc19f2..69dd1b4 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java @@ -9,12 +9,15 @@ * @version $version-stub$ * @since 0.0.0 */ -public class Change { +public class Change { + /** + * Not IExtendedResource due to the use of AbstractResource throughout Lyo generated code. + */ private final AbstractResource resource; private final HistoryResource historyResource; - private final M message; + private final T message; - public Change(AbstractResource resource, HistoryResource historyResource, M message) { + public Change(AbstractResource resource, HistoryResource historyResource, T message) { this.resource = resource; this.historyResource = historyResource; this.message = message; @@ -28,7 +31,7 @@ public HistoryResource getHistoryResource() { return historyResource; } - public M getMessage() { + public T getMessage() { return message; } } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java index 5dc65c3..2ed3216 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java @@ -15,19 +15,19 @@ */ public class ChangeHelper { - public static List> changesCreated(Collection> allChanges) { + public static List changesCreated(Collection allChanges) { return allChanges.stream() .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) .collect(Collectors.toList()); } - public static List> changesModified(Collection> allChanges) { - return allChanges.stream() - .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + public static List changesModified(Collection allChanges) { + return allChanges.stream().filter( + change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) .collect(Collectors.toList()); } - public static List historyFrom(Collection> changes) { + public static List historyFrom(Collection changes) { return ChangeHelper.mapFn(changes, Change::getHistoryResource); } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java index e135c9d..869b9fa 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java @@ -10,6 +10,6 @@ * @version $version-stub$ * @since 0.0.0 */ -public interface ChangeProvider { - Collection> getChangesSince(ZonedDateTime lastUpdate, M message); +public interface ChangeProvider { + Collection> getChangesSince(ZonedDateTime lastUpdate, T message); } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java new file mode 100644 index 0000000..4e7d194 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java @@ -0,0 +1,105 @@ +package org.eclipse.lyo.store.update.handlers; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.stream.Collector; +import java.util.stream.Collectors; + +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.StoreAccessException; +import org.eclipse.lyo.store.update.Handler; +import org.eclipse.lyo.store.update.ServiceProviderMessage; +import org.eclipse.lyo.store.update.change.Change; +import org.eclipse.lyo.store.update.change.ChangeHelper; +import org.eclipse.lyo.store.update.change.ChangeKind; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This is a simple handler that puts resources into named graphs per + * {@link ServiceProvider} if the message implements + * {@link ServiceProviderMessage}. + * + * @author Andrew Berezovskyi + * @version $version-stub$ + * @param + * @since 2.4.0 + * + */ +public class SimpleStoreHandler implements Handler { + + private final URI defaultGraph; + + private final Logger log = LoggerFactory.getLogger(SimpleStoreHandler.class); + + private final Store store; + + public SimpleStoreHandler(Store store) { + this.store = store; + try { + this.defaultGraph = new URI("urn:x-arq:DefaultGraph"); + } catch (URISyntaxException e) { + // this should never happen - we don't want the exception trail + // so we cheat with wrapping this in an unmanaged exception + // that will halt the execution. + IllegalStateException exception = new IllegalStateException(e); + log.error("Failed to generate default graph URI"); + throw exception; + } + } + + @Override + public Collection> handle(Store store, Collection> changes) { + if (changes == null || changes.isEmpty()) { + log.warn("Empty change list cannot be handled"); + return changes; + } + + Optional> firstChange = changes.stream().findFirst(); + if (firstChange.get().getMessage() instanceof ServiceProviderMessage) { + Map>> map = changes.stream() + .collect(Collectors.groupingBy(c -> c.getMessage().getClass())); + for (Entry>> changeSet : map.entrySet()) { + URI spURI = ((ServiceProviderMessage) changeSet.getKey()).getServiceProviderUri(); + persistChanges(spURI, changeSet.getValue()); + } + } else { + persistChanges(defaultGraph, changes); + } + + return changes; + } + + private void persistChanges(URI spURI, Collection> value) { + try { + persistUpdates(spURI, value); + } catch (StoreAccessException e) { + log.error("Failed to persist updates", e); + } + + persistDeletions(spURI, value); + } + + private void persistDeletions(URI spURI, Collection> value) { + Collection deletedResources = value.stream() + .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.DELETION) + .map(c -> c.getResource().getAbout()).collect(Collectors.toList()); + store.deleteResources(spURI, deletedResources.toArray(new URI[0])); + } + + private void persistUpdates(URI spURI, Collection> value) throws StoreAccessException { + Collection updatedResources = value.stream() + .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.CREATION + || c.getHistoryResource().getChangeKindEnum() == ChangeKind.MODIFICATION) + .map(c -> c.getResource()).collect(Collectors.toList()); + store.appendResources(spURI, updatedResources); + } + +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java new file mode 100644 index 0000000..f5785bd --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java @@ -0,0 +1,61 @@ +package org.eclipse.lyo.store.update.handlers; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.update.Handler; +import org.eclipse.lyo.store.update.change.Change; +import org.eclipse.lyo.store.update.change.ChangeKind; +import org.eclipse.lyo.store.update.change.HistoryResource; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +public class TrsChangelogHandler implements Handler { + + private ChangeHistories changeLog; + + public TrsChangelogHandler(ChangeHistories changeLog) { + this.changeLog = changeLog; + } + + @Override + public Collection> handle(Store store, Collection> changes) { + updateChangelogHistory(changes); + return changes; + } + + protected List updateChangelogHistory(Collection> changes) { + List changesHistory = changesHistory(changes); + changeLog.updateHistories(changesHistory); + return changesHistory; + } + + private List changesHistory(Collection> changes) { + return changes.stream().map(this::historyElementFromChange).collect(Collectors.toList()); + } + + private HistoryData historyElementFromChange(Change change) { + HistoryResource h = change.getHistoryResource(); + HistoryData historyData = HistoryData.getInstance(h.getTimestamp(), h.getResourceURI(), + historyDataType(h.getChangeKindEnum())); + return historyData; + } + + private String historyDataType(ChangeKind changeKind) { + if (changeKind.equals(ChangeKind.CREATION)) { + return HistoryData.CREATED; + } else if (changeKind.equals(ChangeKind.MODIFICATION)) { + return HistoryData.MODIFIED; + } else if (changeKind.equals(ChangeKind.DELETION)) { + return HistoryData.DELETED; + } else { + throw new IllegalArgumentException("Illegal ChangeKind value"); + } + } + +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java new file mode 100644 index 0000000..40cf88b --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java @@ -0,0 +1,91 @@ +package org.eclipse.lyo.store.update.handlers; + +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Collection; +import java.util.List; + +import javax.xml.datatype.DatatypeConfigurationException; + +import org.eclipse.lyo.core.trs.ChangeEvent; +import org.eclipse.lyo.core.trs.Creation; +import org.eclipse.lyo.core.trs.Deletion; +import org.eclipse.lyo.core.trs.Modification; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.store.update.change.Change; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.hp.hpl.jena.rdf.model.Model; + +public class TrsMqttChangeLogHandler extends TrsChangelogHandler { + private final Logger log = LoggerFactory.getLogger(TrsMqttChangeLogHandler.class); + + private final MqttClient mqttClient; + private final String topic; + private int order; + + public TrsMqttChangeLogHandler(final ChangeHistories changeLog, final MqttClient mqttClient, final String topic) { + super(changeLog); + this.mqttClient = mqttClient; + this.topic = topic; + this.order = changeLog.getHistorySize(); + } + + @Override + protected List updateChangelogHistory(Collection> changes) { + List updateChangelogHistory = super.updateChangelogHistory(changes); + for (HistoryData historyData : updateChangelogHistory) { + AbstractResource res = trsChangeResourceFrom(historyData); + MqttMessage message = buildMqttMessage(res); + try { + mqttClient.publish(topic, message); + } catch (MqttException e) { + log.error("Can't publish the message to the MQTT channel", e); + } + } + return updateChangelogHistory; + } + + private MqttMessage buildMqttMessage(AbstractResource res) { + try { + Model changeEventJenaModel = JenaModelHelper.createJenaModel(new Object[] { res }); + MqttMessage message = new MqttMessage(); + message.setPayload(changeEventJenaModel.toString().getBytes()); + return message; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException + | DatatypeConfigurationException | OslcCoreApplicationException e) { + throw new IllegalArgumentException(e); + } + } + + private AbstractResource trsChangeResourceFrom(HistoryData historyData) { + this.order += 1; + String histDataType = historyData.getType(); + URI uri = historyData.getUri(); + URI changedUri; + try { + changedUri = new URI("urn:x-trs:" + historyData.getTimestamp() + ":this.order"); + ChangeEvent ce; + if (histDataType == HistoryData.CREATED) { + ce = new Creation(changedUri, uri, this.order); + } else if (histDataType == HistoryData.MODIFIED) { + ce = new Modification(changedUri, uri, this.order); + } else { + ce = new Deletion(changedUri, uri, this.order); + } + return ce; + } catch (URISyntaxException e) { + throw new IllegalStateException(e); + } + } + +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java new file mode 100644 index 0000000..1947750 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author andrew + * + */ +package org.eclipse.lyo.store.update.handlers; \ No newline at end of file From 32a4b3323c584aa9803bf08e818fa400f03e8246 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Tue, 28 Nov 2017 00:51:04 +0100 Subject: [PATCH 07/15] Last issues with Jena 2 in Store Update --- src/store-update/pom.xml | 2 +- .../update/handlers/TrsMqttChangeLogHandler.java | 11 +++++++++-- .../eclipse/lyo/store/update/TestHistoryResource.java | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/store-update/pom.xml b/src/store-update/pom.xml index 12900a2..da76408 100644 --- a/src/store-update/pom.xml +++ b/src/store-update/pom.xml @@ -24,7 +24,7 @@ org.eclipse.lyo.store store-core - 2.2.0 + ${oslc4j-core.version} junit diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java index 40cf88b..589bccf 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java @@ -3,8 +3,11 @@ import java.lang.reflect.InvocationTargetException; import java.net.URI; import java.net.URISyntaxException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.Collection; import java.util.List; +import java.util.TimeZone; import javax.xml.datatype.DatatypeConfigurationException; @@ -24,7 +27,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.hp.hpl.jena.rdf.model.Model; +import org.apache.jena.rdf.model.Model; public class TrsMqttChangeLogHandler extends TrsChangelogHandler { private final Logger log = LoggerFactory.getLogger(TrsMqttChangeLogHandler.class); @@ -73,7 +76,11 @@ private AbstractResource trsChangeResourceFrom(HistoryData historyData) { URI uri = historyData.getUri(); URI changedUri; try { - changedUri = new URI("urn:x-trs:" + historyData.getTimestamp() + ":this.order"); + TimeZone tz = TimeZone.getTimeZone("UTC"); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); // Quoted "Z" to indicate UTC, no timezone offset + df.setTimeZone(tz); + String nowAsISO = df.format(historyData.getTimestamp()); + changedUri = new URI("urn:x-trs:" + nowAsISO + ":" + this.order); ChangeEvent ce; if (histDataType == HistoryData.CREATED) { ce = new Creation(changedUri, uri, this.order); diff --git a/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java index fd4c32e..55adc55 100644 --- a/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java +++ b/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java @@ -1,6 +1,6 @@ package org.eclipse.lyo.store.update; -import com.hp.hpl.jena.rdf.model.Model; +import org.apache.jena.rdf.model.Model; import java.net.URI; import java.time.Instant; import java.util.Collections; From a3646809bb1d27fc646ac136689b961d3424c92e Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 2 Sep 2017 22:08:48 +0200 Subject: [PATCH 08/15] Add Store Update This patch is moved from Gerrit Change 95016. Signed-off-by: Andrew Berezovskyi --- .../lyo/tools/store/update/Handler.java | 16 +++ .../lyo/tools/store/update/OSLCMessage.java | 31 ++++++ .../store/update/ServiceProviderMessage.java | 14 +++ .../store/update/StoreUpdateManager.java | 99 +++++++++++++++++++ .../store/update/StoreUpdateRunnable.java | 94 ++++++++++++++++++ .../lyo/tools/store/update/change/Change.java | 34 +++++++ .../store/update/change/ChangeHelper.java | 37 +++++++ .../tools/store/update/change/ChangeKind.java | 45 +++++++++ .../store/update/change/ChangeProvider.java | 15 +++ .../store/update/change/HistoryResource.java | 87 ++++++++++++++++ .../store/update/change/package-info.java | 9 ++ .../lyo/tools/store/update/package-info.java | 10 ++ .../store/update/TestHistoryResource.java | 86 ++++++++++++++++ 13 files changed, 577 insertions(+) create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java create mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java create mode 100644 src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java new file mode 100644 index 0000000..85dabc4 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java @@ -0,0 +1,16 @@ +package org.eclipse.lyo.tools.store.update; + +import java.util.Collection; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.Change; + +/** + * Handler is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface Handler { + void handle(Store store, Collection> changes); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java new file mode 100644 index 0000000..8d9a592 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java @@ -0,0 +1,31 @@ +package org.eclipse.lyo.tools.store.update; + +import java.net.URI; + +/** + * OSLCMessage is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class OSLCMessage implements ServiceProviderMessage { + private final URI serviceProviderId; + + public OSLCMessage(URI serviceProviderId) { + this.serviceProviderId = serviceProviderId; + } + + @Override + public URI getServiceProviderId() { + return serviceProviderId; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("OSLCMessage{"); + sb.append("serviceProviderId='").append(serviceProviderId).append('\''); + sb.append('}'); + return sb.toString(); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java new file mode 100644 index 0000000..3de8f8d --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java @@ -0,0 +1,14 @@ +package org.eclipse.lyo.tools.store.update; + +import java.net.URI; + +/** + * Created on 06.03.17 + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.1 + */ +public interface ServiceProviderMessage { + URI getServiceProviderId(); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java new file mode 100644 index 0000000..5351d63 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java @@ -0,0 +1,99 @@ +package org.eclipse.lyo.tools.store.update; + +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a + * predefined delay or on-demand. Operates on a generic message (which must extend + * {@link OSLCMessage}) that is passed to handlers. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class StoreUpdateManager { + private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); + private static final int NODELAY = 0; + private static final int SINGLE_THREAD_POOL = 1; + private final ScheduledExecutorService executor; + private final ChangeProvider changeProvider; + private final Store store; + private final List> handlers = new ArrayList<>(); + + /** + * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a + * predefined delay or on-demand. + * + * @param store Instance of an initialised Store + * @param changeProvider Provider of the changes in the underlying tool. + */ + public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { + executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); + this.store = store; + this.changeProvider = changeProvider; + } + + /** + * Polling update on a given {@link ChangeProvider} followed by a notification to all + * previously registered + * {@link Handler} objects. + * + * @param lastUpdate Time of last store update, changes before this moment might be dropped. + * @param delaySeconds Seconds between polling checks. + */ + public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, + lastUpdate, null, handlers); + executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, + TimeUnit.SECONDS); + + StoreUpdateManager.LOGGER.trace( + "ProRManager.contextInitializeServletListener() body ran successfully"); + } + + /** + * Submit a single update request. Typically done from the HTTP handler. + * + * @param lastUpdate + * @param message Specific details for the {@link ChangeProvider} + * @return {@link Future} that allows to block until the runnable is finished executing + * (strongly discouraged). + */ + public Future submit(final ZonedDateTime lastUpdate, final M message) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, + lastUpdate, message, handlers); + return executor.submit(updateRunnable); + } + + /** + * Add a {@link Handler} that will process the collection of + * {@link org.eclipse.lyo.tools.store.update.change.Change} generated by the + * {@link ChangeProvider}. Handler is not guaranteed to be called if added after the update + * has been scheduled. + * + * @param handler Handler that should be called whenever {@link ChangeProvider} returns any + * changes. + */ + public void addHandler(final Handler handler) { + handlers.add(handler); + } + + /** + * Method can be overridden in case a more sophisticated Runnable has to be constructed. + */ + protected StoreUpdateRunnable buildRunnable(final Store store, + final ChangeProvider changeProvider, final ZonedDateTime lastUpdate, final M message, + final List> handlers) { + return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java new file mode 100644 index 0000000..df16f7b --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java @@ -0,0 +1,94 @@ +package org.eclipse.lyo.tools.store.update; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.update.change.Change; +import org.eclipse.lyo.tools.store.update.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Requests latest {@link Change} collection from {@link ChangeProvider} and triggers each + * handler afterwards. Stores the timestamp of the newest change to request new updates starting + * from that point in time. + *

+ *

Handlers will be notified with different message per service provider as accessible via + * {@link OSLCMessage#getServiceProviderId()}.

+ * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +class StoreUpdateRunnable implements Runnable { + + private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, + 1, ZoneId.of("UTC")); + private final Logger log = LoggerFactory.getLogger(StoreUpdateRunnable.class); + private final ChangeProvider changeProvider; + private final M message; + private final Store store; + private final List> handlers; + private ZonedDateTime lastUpdate; + + /** + * @param store Initialised Store + * @param changeProvider Change provider + * @param lastUpdate Initial timestamp. If null, will be set to {@link + * StoreUpdateRunnable#LAST_UPDATE_DEFAULT} + * @param message Initial message to the {@link ChangeProvider} + * @param handlers List of handlers to be notified. + */ + StoreUpdateRunnable(final Store store, final ChangeProvider changeProvider, + final ZonedDateTime lastUpdate, final M message, final List> handlers) { + this.store = store; + this.changeProvider = changeProvider; + this.message = message; + this.handlers = handlers; + if (lastUpdate != null) { + this.lastUpdate = lastUpdate; + } else { + this.lastUpdate = StoreUpdateRunnable.LAST_UPDATE_DEFAULT; + } + } + + @Override + public void run() { + try { + log.trace("Running background update"); + Collection> changes = null; + try { + changes = changeProvider.getChangesSince(lastUpdate, message); + } catch (final Exception e) { + log.error("ChangeProvider threw an exception", e); + } + if (changes != null && !changes.isEmpty()) { + for (final Handler handler : handlers) { + log.trace("Notifying {}", handler); + try { + handler.handle(store, changes); + } catch (final Exception e) { + log.warn("Handler {} threw an exception", handler, e); + } + } + for (final Change change : changes) { + if (change != null) { + final Date date = change.getHistoryResource().getTimestamp(); + final ZonedDateTime dateTime = date.toInstant() + .atZone(ZoneId.systemDefault()); + if (lastUpdate.isBefore(dateTime)) { + lastUpdate = dateTime; + } + } + } + log.trace("Setting previous revision to {}", lastUpdate); + } + } catch (final Exception e) { + // ExecutorService will terminate the whole schedule if a Runnable throws an exception + log.error("A handler threw an exception!", e); + } + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java new file mode 100644 index 0000000..cb9e3d9 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java @@ -0,0 +1,34 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +/** + * Change is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class Change { + private final AbstractResource resource; + private final HistoryResource historyResource; + private final M message; + + public Change(AbstractResource resource, HistoryResource historyResource, M message) { + this.resource = resource; + this.historyResource = historyResource; + this.message = message; + } + + public AbstractResource getResource() { + return resource; + } + + public HistoryResource getHistoryResource() { + return historyResource; + } + + public M getMessage() { + return message; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java new file mode 100644 index 0000000..0bda8b5 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java @@ -0,0 +1,37 @@ +package org.eclipse.lyo.tools.store.update.change; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * ChangeHelper is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class ChangeHelper { + + public static List> changesCreated(Collection> allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) + .collect(Collectors.toList()); + } + + public static List> changesModified(Collection> allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + .collect(Collectors.toList()); + } + + public static List historyFrom(Collection> changes) { + return ChangeHelper.mapFn(changes, Change::getHistoryResource); + } + + public static List mapFn(Collection changes, Function mapper) { + return changes.stream().map(mapper).collect(Collectors.toList()); + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java new file mode 100644 index 0000000..5e1391c --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java @@ -0,0 +1,45 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; + +/** + * ChangeKind is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(ChangeKind.NAME) +@OslcResourceShape(title = "Change Kind Resource Shape", describes = HistoryResource.NS_TRS + ChangeKind.NAME) +public enum ChangeKind { + // Strings taken from the TRS provider implementation + CREATION("Created"), + MODIFICATION("Modified"), + DELETION("Deleted"); + + public static final String NAME = "ChangeKind"; + private final String created; + + ChangeKind(String created) { + this.created = created; + } + + public static ChangeKind fromString(String text) { + if (text != null) { + for (ChangeKind kind : ChangeKind.values()) { + if (text.equalsIgnoreCase(kind.created)) { + return kind; + } + } + } + throw new IllegalArgumentException("No constant with text " + text + " found"); + } + + @Override + public String toString() { + return created; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java new file mode 100644 index 0000000..0d9ae69 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java @@ -0,0 +1,15 @@ +package org.eclipse.lyo.tools.store.update.change; + +import java.time.ZonedDateTime; +import java.util.Collection; + +/** + * ChangeProvider is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface ChangeProvider { + Collection> getChangesSince(ZonedDateTime lastUpdate, M message); +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java new file mode 100644 index 0000000..e55e12a --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java @@ -0,0 +1,87 @@ +package org.eclipse.lyo.tools.store.update.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +import java.net.URI; +import java.time.ZonedDateTime; +import java.util.Date; + +/** + * HistoryResource is a wrapper OSLC Resource around org.eclipse.lyo.oslc4j.trs.provider.HistoryData. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(HistoryResource.NAME) +@OslcResourceShape(title = "TRS History Resource Shape", describes = HistoryResource.TYPE) +public class HistoryResource extends AbstractResource { + public static final String NS_TRS = "http://open-services.net/ns/core/trs#"; + public static final String NAME = "TrsHistoryResource"; + public static final String TYPE = NS_TRS + NAME; + private ChangeKind changeKind; + private Date timestamp; + private URI resourceURI; + + /** + * Shall be used only by the OSLC Jena Model Helper + */ + @Deprecated + public HistoryResource() { + } + + public HistoryResource(ChangeKind changeKind, Date timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = timestamp; + this.resourceURI = resourceURI; + } + + public HistoryResource(ChangeKind changeKind, ZonedDateTime timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = Date.from(timestamp.toInstant()); + this.resourceURI = resourceURI; + } + + @OslcName("change_kind") + @OslcPropertyDefinition(NS_TRS + "change_kind") + public String getChangeKind() { + return changeKind.toString(); + } + + public void setChangeKind(ChangeKind changeKind) { + this.changeKind = changeKind; + } + + public ChangeKind getChangeKindEnum() { + return changeKind; + } + + public void setChangeKind(String changeKind) { + this.changeKind = ChangeKind.fromString(changeKind); + } + + @OslcName("timestamp") + @OslcPropertyDefinition(NS_TRS + "timestamp") + public Date getTimestamp() { + return timestamp; + } + + public void setTimestamp(Date timestamp) { + this.timestamp = timestamp; + } + + @OslcName("uri") + @OslcPropertyDefinition(NS_TRS + "uri") + public URI getResourceURI() { + return resourceURI; + } + + public void setResourceURI(URI resourceURI) { + this.resourceURI = resourceURI; + } +} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java new file mode 100644 index 0000000..36a7641 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java @@ -0,0 +1,9 @@ +/** + * Classes for defining changes for handlers. + * {@link org.eclipse.lyo.tools.store.update.change.HistoryResource} can be persisted in a + * triplestore. + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.tools.store.update.change; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java new file mode 100644 index 0000000..2e5a945 --- /dev/null +++ b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java @@ -0,0 +1,10 @@ +/** + * Common primitives for updating store. + * {@link org.eclipse.lyo.tools.store.update.StoreUpdateRunnable} is scheduled by + * {@link org.eclipse.lyo.tools.store.update.StoreUpdateManager}. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.tools.store.update; diff --git a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java new file mode 100644 index 0000000..4c2c433 --- /dev/null +++ b/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java @@ -0,0 +1,86 @@ +package org.eclipse.lyo.tools.store.update; + +import com.hp.hpl.jena.rdf.model.Model; +import java.net.URI; +import java.time.Instant; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.tools.store.Store; +import org.eclipse.lyo.tools.store.StoreFactory; +import org.eclipse.lyo.tools.store.update.change.ChangeKind; +import org.eclipse.lyo.tools.store.update.change.HistoryResource; +import org.junit.Test; + +/** + * TestTrsHistoryResource is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class TestHistoryResource { + public static final URI RESOURCE_URI = URI.create("test:test"); + private final Store store = StoreFactory.inMemory(); + + @Test + public void testResourceIsMarshalled() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(0); + } + + @Test + public void testResourceContainsStatements() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(1); + } + + @Test + public void testResourceIsPersisted() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + assertThat(store.keySet()).hasSize(0); + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + assertThat(store.keySet()).hasSize(1); + } + + @Test + public void testResourceIsRestored() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + assertThat(resources).hasSize(1); + } + + @Test + public void testResourceIsRestoredWithProperties() throws Exception { + String testResourceURI = "lyo:testtest"; + Date timestamp = Date.from(Instant.now()); + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, timestamp, + URI.create(testResourceURI)); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + HistoryResource storeResource = resources.get(0); + + assertThat(storeResource.getChangeKind()).isEqualToIgnoringCase(String.valueOf(ChangeKind.CREATION)); + assertThat(storeResource.getTimestamp()).isEqualTo(timestamp); + assertThat(storeResource.getResourceURI().toASCIIString()).isEqualTo(testResourceURI); + } +} From 930e30aeb06d8184b7c0bdebf2b3dbbe71aa718a Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sat, 2 Sep 2017 22:44:00 +0200 Subject: [PATCH 09/15] Refactor the code to fit with the new store-core Signed-off-by: Andrew Berezovskyi --- .../{tools => }/store/update/OSLCMessage.java | 2 +- .../lyo/store/update/change/ChangeHelper.java | 10 +- .../lyo/tools/store/update/Handler.java | 16 --- .../store/update/ServiceProviderMessage.java | 14 --- .../store/update/StoreUpdateManager.java | 99 ------------------- .../store/update/StoreUpdateRunnable.java | 94 ------------------ .../lyo/tools/store/update/change/Change.java | 34 ------- .../store/update/change/ChangeHelper.java | 37 ------- .../tools/store/update/change/ChangeKind.java | 45 --------- .../store/update/change/ChangeProvider.java | 15 --- .../store/update/change/HistoryResource.java | 87 ---------------- .../store/update/change/package-info.java | 9 -- .../lyo/tools/store/update/package-info.java | 10 -- .../store/update/TestHistoryResource.java | 86 ---------------- 14 files changed, 6 insertions(+), 552 deletions(-) rename src/store-update/src/main/java/org/eclipse/lyo/{tools => }/store/update/OSLCMessage.java (94%) delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java delete mode 100644 src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java similarity index 94% rename from src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java rename to src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java index 8d9a592..c10466d 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/OSLCMessage.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java @@ -1,4 +1,4 @@ -package org.eclipse.lyo.tools.store.update; +package org.eclipse.lyo.store.update; import java.net.URI; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java index 2ed3216..5dc65c3 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java @@ -15,19 +15,19 @@ */ public class ChangeHelper { - public static List changesCreated(Collection allChanges) { + public static List> changesCreated(Collection> allChanges) { return allChanges.stream() .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) .collect(Collectors.toList()); } - public static List changesModified(Collection allChanges) { - return allChanges.stream().filter( - change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + public static List> changesModified(Collection> allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) .collect(Collectors.toList()); } - public static List historyFrom(Collection changes) { + public static List historyFrom(Collection> changes) { return ChangeHelper.mapFn(changes, Change::getHistoryResource); } diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java deleted file mode 100644 index 85dabc4..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/Handler.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.eclipse.lyo.tools.store.update; - -import java.util.Collection; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.Change; - -/** - * Handler is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public interface Handler { - void handle(Store store, Collection> changes); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java deleted file mode 100644 index 3de8f8d..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/ServiceProviderMessage.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.eclipse.lyo.tools.store.update; - -import java.net.URI; - -/** - * Created on 06.03.17 - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.1 - */ -public interface ServiceProviderMessage { - URI getServiceProviderId(); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java deleted file mode 100644 index 5351d63..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateManager.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.eclipse.lyo.tools.store.update; - -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.ChangeProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a - * predefined delay or on-demand. Operates on a generic message (which must extend - * {@link OSLCMessage}) that is passed to handlers. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class StoreUpdateManager { - private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); - private static final int NODELAY = 0; - private static final int SINGLE_THREAD_POOL = 1; - private final ScheduledExecutorService executor; - private final ChangeProvider changeProvider; - private final Store store; - private final List> handlers = new ArrayList<>(); - - /** - * Schedules {@link StoreUpdateRunnable} via internal {@link ScheduledExecutorService} with a - * predefined delay or on-demand. - * - * @param store Instance of an initialised Store - * @param changeProvider Provider of the changes in the underlying tool. - */ - public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { - executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); - this.store = store; - this.changeProvider = changeProvider; - } - - /** - * Polling update on a given {@link ChangeProvider} followed by a notification to all - * previously registered - * {@link Handler} objects. - * - * @param lastUpdate Time of last store update, changes before this moment might be dropped. - * @param delaySeconds Seconds between polling checks. - */ - public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, - lastUpdate, null, handlers); - executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, - TimeUnit.SECONDS); - - StoreUpdateManager.LOGGER.trace( - "ProRManager.contextInitializeServletListener() body ran successfully"); - } - - /** - * Submit a single update request. Typically done from the HTTP handler. - * - * @param lastUpdate - * @param message Specific details for the {@link ChangeProvider} - * @return {@link Future} that allows to block until the runnable is finished executing - * (strongly discouraged). - */ - public Future submit(final ZonedDateTime lastUpdate, final M message) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, - lastUpdate, message, handlers); - return executor.submit(updateRunnable); - } - - /** - * Add a {@link Handler} that will process the collection of - * {@link org.eclipse.lyo.tools.store.update.change.Change} generated by the - * {@link ChangeProvider}. Handler is not guaranteed to be called if added after the update - * has been scheduled. - * - * @param handler Handler that should be called whenever {@link ChangeProvider} returns any - * changes. - */ - public void addHandler(final Handler handler) { - handlers.add(handler); - } - - /** - * Method can be overridden in case a more sophisticated Runnable has to be constructed. - */ - protected StoreUpdateRunnable buildRunnable(final Store store, - final ChangeProvider changeProvider, final ZonedDateTime lastUpdate, final M message, - final List> handlers) { - return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java deleted file mode 100644 index df16f7b..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/StoreUpdateRunnable.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.eclipse.lyo.tools.store.update; - -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.util.Collection; -import java.util.Date; -import java.util.List; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.update.change.Change; -import org.eclipse.lyo.tools.store.update.change.ChangeProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Requests latest {@link Change} collection from {@link ChangeProvider} and triggers each - * handler afterwards. Stores the timestamp of the newest change to request new updates starting - * from that point in time. - *

- *

Handlers will be notified with different message per service provider as accessible via - * {@link OSLCMessage#getServiceProviderId()}.

- * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -class StoreUpdateRunnable implements Runnable { - - private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, - 1, ZoneId.of("UTC")); - private final Logger log = LoggerFactory.getLogger(StoreUpdateRunnable.class); - private final ChangeProvider changeProvider; - private final M message; - private final Store store; - private final List> handlers; - private ZonedDateTime lastUpdate; - - /** - * @param store Initialised Store - * @param changeProvider Change provider - * @param lastUpdate Initial timestamp. If null, will be set to {@link - * StoreUpdateRunnable#LAST_UPDATE_DEFAULT} - * @param message Initial message to the {@link ChangeProvider} - * @param handlers List of handlers to be notified. - */ - StoreUpdateRunnable(final Store store, final ChangeProvider changeProvider, - final ZonedDateTime lastUpdate, final M message, final List> handlers) { - this.store = store; - this.changeProvider = changeProvider; - this.message = message; - this.handlers = handlers; - if (lastUpdate != null) { - this.lastUpdate = lastUpdate; - } else { - this.lastUpdate = StoreUpdateRunnable.LAST_UPDATE_DEFAULT; - } - } - - @Override - public void run() { - try { - log.trace("Running background update"); - Collection> changes = null; - try { - changes = changeProvider.getChangesSince(lastUpdate, message); - } catch (final Exception e) { - log.error("ChangeProvider threw an exception", e); - } - if (changes != null && !changes.isEmpty()) { - for (final Handler handler : handlers) { - log.trace("Notifying {}", handler); - try { - handler.handle(store, changes); - } catch (final Exception e) { - log.warn("Handler {} threw an exception", handler, e); - } - } - for (final Change change : changes) { - if (change != null) { - final Date date = change.getHistoryResource().getTimestamp(); - final ZonedDateTime dateTime = date.toInstant() - .atZone(ZoneId.systemDefault()); - if (lastUpdate.isBefore(dateTime)) { - lastUpdate = dateTime; - } - } - } - log.trace("Setting previous revision to {}", lastUpdate); - } - } catch (final Exception e) { - // ExecutorService will terminate the whole schedule if a Runnable throws an exception - log.error("A handler threw an exception!", e); - } - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java deleted file mode 100644 index cb9e3d9..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/Change.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.eclipse.lyo.tools.store.update.change; - -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; - -/** - * Change is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class Change { - private final AbstractResource resource; - private final HistoryResource historyResource; - private final M message; - - public Change(AbstractResource resource, HistoryResource historyResource, M message) { - this.resource = resource; - this.historyResource = historyResource; - this.message = message; - } - - public AbstractResource getResource() { - return resource; - } - - public HistoryResource getHistoryResource() { - return historyResource; - } - - public M getMessage() { - return message; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java deleted file mode 100644 index 0bda8b5..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeHelper.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.eclipse.lyo.tools.store.update.change; - -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * ChangeHelper is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class ChangeHelper { - - public static List> changesCreated(Collection> allChanges) { - return allChanges.stream() - .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) - .collect(Collectors.toList()); - } - - public static List> changesModified(Collection> allChanges) { - return allChanges.stream() - .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) - .collect(Collectors.toList()); - } - - public static List historyFrom(Collection> changes) { - return ChangeHelper.mapFn(changes, Change::getHistoryResource); - } - - public static List mapFn(Collection changes, Function mapper) { - return changes.stream().map(mapper).collect(Collectors.toList()); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java deleted file mode 100644 index 5e1391c..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeKind.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.eclipse.lyo.tools.store.update.change; - -import org.eclipse.lyo.oslc4j.core.annotation.OslcName; -import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; -import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; - -/** - * ChangeKind is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -@OslcNamespace(HistoryResource.NS_TRS) -@OslcName(ChangeKind.NAME) -@OslcResourceShape(title = "Change Kind Resource Shape", describes = HistoryResource.NS_TRS + ChangeKind.NAME) -public enum ChangeKind { - // Strings taken from the TRS provider implementation - CREATION("Created"), - MODIFICATION("Modified"), - DELETION("Deleted"); - - public static final String NAME = "ChangeKind"; - private final String created; - - ChangeKind(String created) { - this.created = created; - } - - public static ChangeKind fromString(String text) { - if (text != null) { - for (ChangeKind kind : ChangeKind.values()) { - if (text.equalsIgnoreCase(kind.created)) { - return kind; - } - } - } - throw new IllegalArgumentException("No constant with text " + text + " found"); - } - - @Override - public String toString() { - return created; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java deleted file mode 100644 index 0d9ae69..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/ChangeProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.eclipse.lyo.tools.store.update.change; - -import java.time.ZonedDateTime; -import java.util.Collection; - -/** - * ChangeProvider is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public interface ChangeProvider { - Collection> getChangesSince(ZonedDateTime lastUpdate, M message); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java deleted file mode 100644 index e55e12a..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/HistoryResource.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.eclipse.lyo.tools.store.update.change; - -import org.eclipse.lyo.oslc4j.core.annotation.OslcName; -import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; -import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; -import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; - -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Date; - -/** - * HistoryResource is a wrapper OSLC Resource around org.eclipse.lyo.oslc4j.trs.provider.HistoryData. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -@OslcNamespace(HistoryResource.NS_TRS) -@OslcName(HistoryResource.NAME) -@OslcResourceShape(title = "TRS History Resource Shape", describes = HistoryResource.TYPE) -public class HistoryResource extends AbstractResource { - public static final String NS_TRS = "http://open-services.net/ns/core/trs#"; - public static final String NAME = "TrsHistoryResource"; - public static final String TYPE = NS_TRS + NAME; - private ChangeKind changeKind; - private Date timestamp; - private URI resourceURI; - - /** - * Shall be used only by the OSLC Jena Model Helper - */ - @Deprecated - public HistoryResource() { - } - - public HistoryResource(ChangeKind changeKind, Date timestamp, URI resourceURI) { - this.changeKind = changeKind; - this.timestamp = timestamp; - this.resourceURI = resourceURI; - } - - public HistoryResource(ChangeKind changeKind, ZonedDateTime timestamp, URI resourceURI) { - this.changeKind = changeKind; - this.timestamp = Date.from(timestamp.toInstant()); - this.resourceURI = resourceURI; - } - - @OslcName("change_kind") - @OslcPropertyDefinition(NS_TRS + "change_kind") - public String getChangeKind() { - return changeKind.toString(); - } - - public void setChangeKind(ChangeKind changeKind) { - this.changeKind = changeKind; - } - - public ChangeKind getChangeKindEnum() { - return changeKind; - } - - public void setChangeKind(String changeKind) { - this.changeKind = ChangeKind.fromString(changeKind); - } - - @OslcName("timestamp") - @OslcPropertyDefinition(NS_TRS + "timestamp") - public Date getTimestamp() { - return timestamp; - } - - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - - @OslcName("uri") - @OslcPropertyDefinition(NS_TRS + "uri") - public URI getResourceURI() { - return resourceURI; - } - - public void setResourceURI(URI resourceURI) { - this.resourceURI = resourceURI; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java deleted file mode 100644 index 36a7641..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/change/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Classes for defining changes for handlers. - * {@link org.eclipse.lyo.tools.store.update.change.HistoryResource} can be persisted in a - * triplestore. - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -package org.eclipse.lyo.tools.store.update.change; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java deleted file mode 100644 index 2e5a945..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/tools/store/update/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Common primitives for updating store. - * {@link org.eclipse.lyo.tools.store.update.StoreUpdateRunnable} is scheduled by - * {@link org.eclipse.lyo.tools.store.update.StoreUpdateManager}. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -package org.eclipse.lyo.tools.store.update; diff --git a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java deleted file mode 100644 index 4c2c433..0000000 --- a/src/store-update/src/test/java/org/eclipse/lyo/tools/store/update/TestHistoryResource.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.eclipse.lyo.tools.store.update; - -import com.hp.hpl.jena.rdf.model.Model; -import java.net.URI; -import java.time.Instant; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import static org.assertj.core.api.Assertions.assertThat; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.tools.store.Store; -import org.eclipse.lyo.tools.store.StoreFactory; -import org.eclipse.lyo.tools.store.update.change.ChangeKind; -import org.eclipse.lyo.tools.store.update.change.HistoryResource; -import org.junit.Test; - -/** - * TestTrsHistoryResource is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class TestHistoryResource { - public static final URI RESOURCE_URI = URI.create("test:test"); - private final Store store = StoreFactory.inMemory(); - - @Test - public void testResourceIsMarshalled() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - - Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); - assertThat(model.size()).isGreaterThan(0); - } - - @Test - public void testResourceContainsStatements() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); - assertThat(model.size()).isGreaterThan(1); - } - - @Test - public void testResourceIsPersisted() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - assertThat(store.keySet()).hasSize(0); - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - assertThat(store.keySet()).hasSize(1); - } - - @Test - public void testResourceIsRestored() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); - assertThat(resources).hasSize(1); - } - - @Test - public void testResourceIsRestoredWithProperties() throws Exception { - String testResourceURI = "lyo:testtest"; - Date timestamp = Date.from(Instant.now()); - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, timestamp, - URI.create(testResourceURI)); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - - List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); - HistoryResource storeResource = resources.get(0); - - assertThat(storeResource.getChangeKind()).isEqualToIgnoringCase(String.valueOf(ChangeKind.CREATION)); - assertThat(storeResource.getTimestamp()).isEqualTo(timestamp); - assertThat(storeResource.getResourceURI().toASCIIString()).isEqualTo(testResourceURI); - } -} From bbb537083018318dbd15134d12689b394b59b633 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Mon, 27 Nov 2017 21:56:28 +0100 Subject: [PATCH 10/15] Add TRS and Store handlers Signed-off-by: Andrew Berezovskyi --- .../eclipse/lyo/store/update/OSLCMessage.java | 31 ------------------- .../lyo/store/update/change/ChangeHelper.java | 10 +++--- 2 files changed, 5 insertions(+), 36 deletions(-) delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java deleted file mode 100644 index c10466d..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/OSLCMessage.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.net.URI; - -/** - * OSLCMessage is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class OSLCMessage implements ServiceProviderMessage { - private final URI serviceProviderId; - - public OSLCMessage(URI serviceProviderId) { - this.serviceProviderId = serviceProviderId; - } - - @Override - public URI getServiceProviderId() { - return serviceProviderId; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("OSLCMessage{"); - sb.append("serviceProviderId='").append(serviceProviderId).append('\''); - sb.append('}'); - return sb.toString(); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java index 5dc65c3..2ed3216 100644 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java +++ b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java @@ -15,19 +15,19 @@ */ public class ChangeHelper { - public static List> changesCreated(Collection> allChanges) { + public static List changesCreated(Collection allChanges) { return allChanges.stream() .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) .collect(Collectors.toList()); } - public static List> changesModified(Collection> allChanges) { - return allChanges.stream() - .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + public static List changesModified(Collection allChanges) { + return allChanges.stream().filter( + change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) .collect(Collectors.toList()); } - public static List historyFrom(Collection> changes) { + public static List historyFrom(Collection changes) { return ChangeHelper.mapFn(changes, Change::getHistoryResource); } From e1a70a9ff081b966e8883b0660dc2a1dc6009e00 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sun, 11 Mar 2018 20:43:09 +0100 Subject: [PATCH 11/15] Refactor store-update into store-sync * Add both EPL and EDL licenses * Rename artefacts in POMs * Rebase on top of the Jena 3.6.0 move Signed-off-by: Andrew Berezovskyi --- LICENSE.EDL | 28 +++++ src/pom.xml | 14 ++- src/store-core/.gitignore | 10 +- src/store-core/pom.xml | 6 +- src/{store-update => store-sync}/.gitignore | 0 src/{store-update => store-sync}/LICENSE.txt | 0 src/{store-update => store-sync}/README.md | 0 .../doc/architecture.png | Bin src/{store-update => store-sync}/pom.xml | 28 +++-- .../src/license/eplv1/description.txt.ftl | 0 .../src/license/eplv1/header.txt.ftl | 0 .../src/license/eplv1/license.txt | 0 .../src/license/licenses.properties | 0 .../org/eclipse/lyo/store/sync/Handler.java | 16 +++ .../store/sync/ServiceProviderMessage.java | 14 +++ .../lyo/store/sync/StoreUpdateManager.java | 102 +++++++++++++++++ .../lyo/store/sync/StoreUpdateRunnable.java | 94 ++++++++++++++++ .../eclipse/lyo/store/sync/UpdateMessage.java | 5 + .../eclipse/lyo/store/sync/change/Change.java | 37 +++++++ .../lyo/store/sync/change/ChangeHelper.java | 37 +++++++ .../lyo/store/sync/change/ChangeKind.java | 45 ++++++++ .../lyo/store/sync/change/ChangeProvider.java | 15 +++ .../store/sync/change/HistoryResource.java | 87 +++++++++++++++ .../lyo/store/sync/change/package-info.java | 9 ++ .../sync/handlers/SimpleStoreHandler.java | 103 ++++++++++++++++++ .../lyo/store/sync/handlers/TrsHandler.java | 58 ++++++++++ .../handlers/TrsMqttChangeLogHandler.java | 100 +++++++++++++++++ .../lyo/store/sync/handlers/package-info.java | 8 ++ .../eclipse/lyo/store/sync/package-info.java | 10 ++ .../lyo/store/sync/TestHistoryResource.java | 86 +++++++++++++++ .../src/test/resources/log4j.properties | 0 31 files changed, 894 insertions(+), 18 deletions(-) create mode 100644 LICENSE.EDL rename src/{store-update => store-sync}/.gitignore (100%) rename src/{store-update => store-sync}/LICENSE.txt (100%) rename src/{store-update => store-sync}/README.md (100%) rename src/{store-update => store-sync}/doc/architecture.png (100%) rename src/{store-update => store-sync}/pom.xml (91%) rename src/{store-update => store-sync}/src/license/eplv1/description.txt.ftl (100%) rename src/{store-update => store-sync}/src/license/eplv1/header.txt.ftl (100%) rename src/{store-update => store-sync}/src/license/eplv1/license.txt (100%) rename src/{store-update => store-sync}/src/license/licenses.properties (100%) create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/package-info.java create mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/package-info.java create mode 100644 src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java rename src/{store-update => store-sync}/src/test/resources/log4j.properties (100%) diff --git a/LICENSE.EDL b/LICENSE.EDL new file mode 100644 index 0000000..8a8992b --- /dev/null +++ b/LICENSE.EDL @@ -0,0 +1,28 @@ +Eclipse Distribution License - v 1.0 + +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/pom.xml b/src/pom.xml index 94ce337..93d7359 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -8,7 +8,7 @@ store-parent 2.4.0-SNAPSHOT pom - Lyo Store Parent + Lyo Store :: Parent UTF-8 @@ -19,7 +19,7 @@ store-core - store-update + store-sync @@ -55,6 +55,12 @@ xml-apis 1.3.04
+ + javax.servlet + javax.servlet-api + 3.1.0 + provided + @@ -103,5 +109,9 @@ Eclipse Public License 1.0 https://www.eclipse.org/legal/epl-v10.html + + Eclipse Distribution License 1.0 + https://www.eclipse.org/org/documents/edl-v10.html + diff --git a/src/store-core/.gitignore b/src/store-core/.gitignore index afa7537..464fab7 100644 --- a/src/store-core/.gitignore +++ b/src/store-core/.gitignore @@ -13,9 +13,9 @@ hs_err_pid* # Eclipse -.project -.classpath -.metadata +/.project +/.classpath +/.metadata *.tmp *.bak *.swp @@ -63,8 +63,8 @@ local.properties # MAVEN ######################### -**/overlays/ -**/target/ +/overlays/ +/target/ pom.xml.tag pom.xml.next release.properties diff --git a/src/store-core/pom.xml b/src/store-core/pom.xml index 7baeef7..8d8045d 100644 --- a/src/store-core/pom.xml +++ b/src/store-core/pom.xml @@ -12,7 +12,7 @@ store-core - 2.4.0-SNAPSHOT + Lyo Store :: Core UTF-8 @@ -243,5 +243,9 @@ Eclipse Public License 1.0 https://www.eclipse.org/legal/epl-v10.html + + Eclipse Distribution License 1.0 + https://www.eclipse.org/org/documents/edl-v10.html + diff --git a/src/store-update/.gitignore b/src/store-sync/.gitignore similarity index 100% rename from src/store-update/.gitignore rename to src/store-sync/.gitignore diff --git a/src/store-update/LICENSE.txt b/src/store-sync/LICENSE.txt similarity index 100% rename from src/store-update/LICENSE.txt rename to src/store-sync/LICENSE.txt diff --git a/src/store-update/README.md b/src/store-sync/README.md similarity index 100% rename from src/store-update/README.md rename to src/store-sync/README.md diff --git a/src/store-update/doc/architecture.png b/src/store-sync/doc/architecture.png similarity index 100% rename from src/store-update/doc/architecture.png rename to src/store-sync/doc/architecture.png diff --git a/src/store-update/pom.xml b/src/store-sync/pom.xml similarity index 91% rename from src/store-update/pom.xml rename to src/store-sync/pom.xml index da76408..a8fd0e8 100644 --- a/src/store-update/pom.xml +++ b/src/store-sync/pom.xml @@ -7,24 +7,30 @@ org.eclipse.lyo.store store-parent - 2.3.0-SNAPSHOT + 2.4.0-SNAPSHOT ../pom.xml - store-update + store-sync + Lyo Store :: Sync UTF-8 UTF-8 1.8 1.8 - 2.3.0-SNAPSHOT + 2.4.0-SNAPSHOT + + javax.servlet + javax.servlet-api + provided + org.eclipse.lyo.store store-core - ${oslc4j-core.version} + ${version.lyo} junit @@ -39,7 +45,7 @@ org.eclipse.lyo.trs trs-provider - 2.4.0-SNAPSHOT + ${version.lyo} org.eclipse.paho @@ -86,7 +92,7 @@ 2016 - ${basedir}/src/license//eplv1/description.txt.ftl + ${basedir}/src/license/eplv1/description.txt.ftl true @@ -197,20 +203,22 @@ Eclipse Public License 1.0 https://www.eclipse.org/legal/epl-v10.html + + Eclipse Distribution License 1.0 + https://www.eclipse.org/org/documents/edl-v10.html + lyo-releases lyo-releases repository - https://repo.eclipse.org/content/repositories/lyo-releases/ - + https://repo.eclipse.org/content/repositories/lyo-releases/ lyo-snapshots lyo-snapshots repository - https://repo.eclipse.org/content/repositories/lyo-snapshots/ - + https://repo.eclipse.org/content/repositories/lyo-snapshots/ diff --git a/src/store-update/src/license/eplv1/description.txt.ftl b/src/store-sync/src/license/eplv1/description.txt.ftl similarity index 100% rename from src/store-update/src/license/eplv1/description.txt.ftl rename to src/store-sync/src/license/eplv1/description.txt.ftl diff --git a/src/store-update/src/license/eplv1/header.txt.ftl b/src/store-sync/src/license/eplv1/header.txt.ftl similarity index 100% rename from src/store-update/src/license/eplv1/header.txt.ftl rename to src/store-sync/src/license/eplv1/header.txt.ftl diff --git a/src/store-update/src/license/eplv1/license.txt b/src/store-sync/src/license/eplv1/license.txt similarity index 100% rename from src/store-update/src/license/eplv1/license.txt rename to src/store-sync/src/license/eplv1/license.txt diff --git a/src/store-update/src/license/licenses.properties b/src/store-sync/src/license/licenses.properties similarity index 100% rename from src/store-update/src/license/licenses.properties rename to src/store-sync/src/license/licenses.properties diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java new file mode 100644 index 0000000..7dda34f --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java @@ -0,0 +1,16 @@ +package org.eclipse.lyo.store.sync; + +import java.util.Collection; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.sync.change.Change; + +/** + * Handler is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface Handler { + Collection> handle(Store store, Collection> changes); +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java new file mode 100644 index 0000000..80aaa4b --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java @@ -0,0 +1,14 @@ +package org.eclipse.lyo.store.sync; + +import java.net.URI; + +/** + * Created on 06.03.17 + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.1 + */ +public interface ServiceProviderMessage { + URI getServiceProviderUri(); +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java new file mode 100644 index 0000000..a8579e6 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java @@ -0,0 +1,102 @@ +package org.eclipse.lyo.store.sync; + +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.sync.change.Change; +import org.eclipse.lyo.store.sync.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Schedules {@link StoreUpdateRunnable} via internal + * {@link ScheduledExecutorService} with a predefined delay or on-demand. + * Operates on a generic message that is passed to handlers. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class StoreUpdateManager { + private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); + private static final int NODELAY = 0; + private static final int SINGLE_THREAD_POOL = 1; + private final ScheduledExecutorService executor; + private final ChangeProvider changeProvider; + private final Store store; + private final List> handlers = new ArrayList<>(); + + /** + * Schedules {@link StoreUpdateRunnable} via internal + * {@link ScheduledExecutorService} with a predefined delay or on-demand. + * + * @param store + * Instance of an initialised Store + * @param changeProvider + * Provider of the changes in the underlying tool. + */ + public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { + executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); + this.store = store; + this.changeProvider = changeProvider; + } + + /** + * Polling update on a given {@link ChangeProvider} followed by a notification + * to all previously registered {@link Handler} objects. + * + * @param lastUpdate + * Time of last store update, changes before this moment might be + * dropped. + * @param delaySeconds + * Seconds between polling checks. + */ + public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, null, handlers); + executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, TimeUnit.SECONDS); + + StoreUpdateManager.LOGGER.trace("Poll request has been enqueued"); + } + + /** + * Submit a single update request. Typically done from the HTTP handler. + * + * @param lastUpdate + * @param message + * Specific details for the {@link ChangeProvider} + * @return {@link Future} that allows to block until the runnable is finished + * executing (strongly discouraged). + */ + public Future submit(final ZonedDateTime lastUpdate, final M message) { + final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, message, + handlers); + return executor.submit(updateRunnable); + } + + /** + * Add a {@link Handler} that will process the collection of {@link Change} + * generated by the {@link ChangeProvider}. Handler is not guaranteed to be + * called if added after the update has been scheduled. + * + * @param handler + * Handler that should be called whenever {@link ChangeProvider} + * returns any changes. + */ + public void addHandler(final Handler handler) { + handlers.add(handler); + } + + /** + * Method can be overridden in case a more sophisticated Runnable has to be + * constructed. + */ + protected StoreUpdateRunnable buildRunnable(final Store store, final ChangeProvider changeProvider, + final ZonedDateTime lastUpdate, final M message, final List> handlers) { + return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java new file mode 100644 index 0000000..88aa112 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java @@ -0,0 +1,94 @@ +package org.eclipse.lyo.store.sync; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.sync.change.Change; +import org.eclipse.lyo.store.sync.change.ChangeProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Requests latest {@link Change} collection from {@link ChangeProvider} and triggers each + * handler afterwards. Stores the timestamp of the newest change to request new updates starting + * from that point in time. + *

+ *

Handlers will be notified with different message per service provider as accessible via + * {@link OSLCMessage#getServiceProviderId()}.

+ * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +class StoreUpdateRunnable implements Runnable { + + private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, + 1, ZoneId.of("UTC")); + private final Logger log = LoggerFactory.getLogger(StoreUpdateRunnable.class); + private final ChangeProvider changeProvider; + private final M message; + private final Store store; + private final List> handlers; + private ZonedDateTime lastUpdate; + + /** + * @param store Initialised Store + * @param changeProvider Change provider + * @param lastUpdate Initial timestamp. If null, will be set to {@link + * StoreUpdateRunnable#LAST_UPDATE_DEFAULT} + * @param message Initial message to the {@link ChangeProvider} + * @param handlers List of handlers to be notified. + */ + StoreUpdateRunnable(final Store store, final ChangeProvider changeProvider, + final ZonedDateTime lastUpdate, final M message, final List> handlers) { + this.store = store; + this.changeProvider = changeProvider; + this.message = message; + this.handlers = handlers; + if (lastUpdate != null) { + this.lastUpdate = lastUpdate; + } else { + this.lastUpdate = StoreUpdateRunnable.LAST_UPDATE_DEFAULT; + } + } + + @Override + public void run() { + try { + log.trace("Running background update"); + Collection> changes = null; + try { + changes = changeProvider.getChangesSince(lastUpdate, message); + } catch (final Exception e) { + log.error("ChangeProvider threw an exception", e); + } + if (changes != null && !changes.isEmpty()) { + for (final Handler handler : handlers) { + log.trace("Notifying {}", handler); + try { + handler.handle(store, changes); + } catch (final Exception e) { + log.warn("Handler {} threw an exception", handler, e); + } + } + for (final Change change : changes) { + if (change != null) { + final Date date = change.getHistoryResource().getTimestamp(); + final ZonedDateTime dateTime = date.toInstant() + .atZone(ZoneId.systemDefault()); + if (lastUpdate.isBefore(dateTime)) { + lastUpdate = dateTime; + } + } + } + log.trace("Setting previous revision to {}", lastUpdate); + } + } catch (final Exception e) { + // ExecutorService will terminate the whole schedule if a Runnable throws an exception + log.error("A handler threw an exception!", e); + } + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java new file mode 100644 index 0000000..0bb4cef --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java @@ -0,0 +1,5 @@ +package org.eclipse.lyo.store.sync; + +public interface UpdateMessage { + +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java new file mode 100644 index 0000000..d891df9 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java @@ -0,0 +1,37 @@ +package org.eclipse.lyo.store.sync.change; + +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +/** + * Change is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class Change { + /** + * Not IExtendedResource due to the use of AbstractResource throughout Lyo generated code. + */ + private final AbstractResource resource; + private final HistoryResource historyResource; + private final T message; + + public Change(AbstractResource resource, HistoryResource historyResource, T message) { + this.resource = resource; + this.historyResource = historyResource; + this.message = message; + } + + public AbstractResource getResource() { + return resource; + } + + public HistoryResource getHistoryResource() { + return historyResource; + } + + public T getMessage() { + return message; + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java new file mode 100644 index 0000000..ff3753c --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java @@ -0,0 +1,37 @@ +package org.eclipse.lyo.store.sync.change; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * ChangeHelper is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class ChangeHelper { + + public static List changesCreated(Collection allChanges) { + return allChanges.stream() + .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) + .collect(Collectors.toList()); + } + + public static List changesModified(Collection allChanges) { + return allChanges.stream().filter( + change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) + .collect(Collectors.toList()); + } + + public static List historyFrom(Collection changes) { + return ChangeHelper.mapFn(changes, Change::getHistoryResource); + } + + public static List mapFn(Collection changes, Function mapper) { + return changes.stream().map(mapper).collect(Collectors.toList()); + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java new file mode 100644 index 0000000..d063b1b --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java @@ -0,0 +1,45 @@ +package org.eclipse.lyo.store.sync.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; + +/** + * ChangeKind is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(ChangeKind.NAME) +@OslcResourceShape(title = "Change Kind Resource Shape", describes = HistoryResource.NS_TRS + ChangeKind.NAME) +public enum ChangeKind { + // Strings taken from the TRS provider implementation + CREATION("Created"), + MODIFICATION("Modified"), + DELETION("Deleted"); + + public static final String NAME = "ChangeKind"; + private final String created; + + ChangeKind(String created) { + this.created = created; + } + + public static ChangeKind fromString(String text) { + if (text != null) { + for (ChangeKind kind : ChangeKind.values()) { + if (text.equalsIgnoreCase(kind.created)) { + return kind; + } + } + } + throw new IllegalArgumentException("No constant with text " + text + " found"); + } + + @Override + public String toString() { + return created; + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java new file mode 100644 index 0000000..9f38ced --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java @@ -0,0 +1,15 @@ +package org.eclipse.lyo.store.sync.change; + +import java.time.ZonedDateTime; +import java.util.Collection; + +/** + * ChangeProvider is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public interface ChangeProvider { + Collection> getChangesSince(ZonedDateTime lastUpdate, T message); +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java new file mode 100644 index 0000000..c95fc1b --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java @@ -0,0 +1,87 @@ +package org.eclipse.lyo.store.sync.change; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; + +import java.net.URI; +import java.time.ZonedDateTime; +import java.util.Date; + +/** + * HistoryResource is a wrapper OSLC Resource around org.eclipse.lyo.oslc4j.trs.provider.HistoryData. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +@OslcNamespace(HistoryResource.NS_TRS) +@OslcName(HistoryResource.NAME) +@OslcResourceShape(title = "TRS History Resource Shape", describes = HistoryResource.TYPE) +public class HistoryResource extends AbstractResource { + public static final String NS_TRS = "http://open-services.net/ns/core/trs#"; + public static final String NAME = "TrsHistoryResource"; + public static final String TYPE = NS_TRS + NAME; + private ChangeKind changeKind; + private Date timestamp; + private URI resourceURI; + + /** + * Shall be used only by the OSLC Jena Model Helper + */ + @Deprecated + public HistoryResource() { + } + + public HistoryResource(ChangeKind changeKind, Date timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = timestamp; + this.resourceURI = resourceURI; + } + + public HistoryResource(ChangeKind changeKind, ZonedDateTime timestamp, URI resourceURI) { + this.changeKind = changeKind; + this.timestamp = Date.from(timestamp.toInstant()); + this.resourceURI = resourceURI; + } + + @OslcName("change_kind") + @OslcPropertyDefinition(NS_TRS + "change_kind") + public String getChangeKind() { + return changeKind.toString(); + } + + public void setChangeKind(ChangeKind changeKind) { + this.changeKind = changeKind; + } + + public ChangeKind getChangeKindEnum() { + return changeKind; + } + + public void setChangeKind(String changeKind) { + this.changeKind = ChangeKind.fromString(changeKind); + } + + @OslcName("timestamp") + @OslcPropertyDefinition(NS_TRS + "timestamp") + public Date getTimestamp() { + return timestamp; + } + + public void setTimestamp(Date timestamp) { + this.timestamp = timestamp; + } + + @OslcName("uri") + @OslcPropertyDefinition(NS_TRS + "uri") + public URI getResourceURI() { + return resourceURI; + } + + public void setResourceURI(URI resourceURI) { + this.resourceURI = resourceURI; + } +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java new file mode 100644 index 0000000..550f3de --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java @@ -0,0 +1,9 @@ +/** + * Classes for defining changes for handlers. + * {@link org.eclipse.lyo.store.sync.change.HistoryResource} can be persisted in a + * triplestore. + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.store.sync.change; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java new file mode 100644 index 0000000..7bf12b1 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java @@ -0,0 +1,103 @@ +package org.eclipse.lyo.store.sync.handlers; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.stream.Collectors; + +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.StoreAccessException; +import org.eclipse.lyo.store.sync.Handler; +import org.eclipse.lyo.store.sync.ServiceProviderMessage; +import org.eclipse.lyo.store.sync.change.Change; +import org.eclipse.lyo.store.sync.change.ChangeKind; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This is a simple handler that puts resources into named graphs per + * {@link ServiceProvider} if the message implements + * {@link ServiceProviderMessage}. + * + * @author Andrew Berezovskyi + * @version $version-stub$ + * @param + * @since 2.4.0 + * + */ +public class SimpleStoreHandler implements Handler { + + private final URI defaultGraph; + + private final Logger log = LoggerFactory.getLogger(SimpleStoreHandler.class); + + private final Store store; + + public SimpleStoreHandler(Store store) { + this.store = store; + try { + this.defaultGraph = new URI("urn:x-arq:DefaultGraph"); + } catch (URISyntaxException e) { + // this should never happen - we don't want the exception trail + // so we cheat with wrapping this in an unmanaged exception + // that will halt the execution. + IllegalStateException exception = new IllegalStateException(e); + log.error("Failed to generate default graph URI"); + throw exception; + } + } + + @Override + public Collection> handle(Store store, Collection> changes) { + if (changes == null || changes.isEmpty()) { + log.warn("Empty change list cannot be handled"); + return changes; + } + + Optional> firstChange = changes.stream().findFirst(); + if (firstChange.get().getMessage() instanceof ServiceProviderMessage) { + Map>> map = changes.stream() + .collect(Collectors.groupingBy(c -> c.getMessage().getClass())); + for (Entry>> changeSet : map.entrySet()) { + URI spURI = ((ServiceProviderMessage) changeSet.getKey()).getServiceProviderUri(); + persistChanges(spURI, changeSet.getValue()); + } + } else { + persistChanges(defaultGraph, changes); + } + + return changes; + } + + private void persistChanges(URI spURI, Collection> value) { + try { + persistUpdates(spURI, value); + } catch (StoreAccessException e) { + log.error("Failed to persist updates", e); + } + + persistDeletions(spURI, value); + } + + private void persistDeletions(URI spURI, Collection> value) { + Collection deletedResources = value.stream() + .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.DELETION) + .map(c -> c.getResource().getAbout()).collect(Collectors.toList()); + store.deleteResources(spURI, deletedResources.toArray(new URI[0])); + } + + private void persistUpdates(URI spURI, Collection> value) throws StoreAccessException { + Collection updatedResources = value.stream() + .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.CREATION + || c.getHistoryResource().getChangeKindEnum() == ChangeKind.MODIFICATION) + .map(c -> c.getResource()).collect(Collectors.toList()); + store.appendResources(spURI, updatedResources); + } + +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java new file mode 100644 index 0000000..f71eea8 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java @@ -0,0 +1,58 @@ +package org.eclipse.lyo.store.sync.handlers; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.sync.Handler; +import org.eclipse.lyo.store.sync.change.Change; +import org.eclipse.lyo.store.sync.change.ChangeKind; +import org.eclipse.lyo.store.sync.change.HistoryResource; + +public class TrsHandler implements Handler { + + private ChangeHistories changeLog; + + public TrsHandler(ChangeHistories changeLog) { + this.changeLog = changeLog; + } + + @Override + public Collection> handle(Store store, Collection> changes) { + updateChangelogHistory(changes); + return changes; + } + + protected List updateChangelogHistory(Collection> changes) { + List changesHistory = changesHistory(changes); + changeLog.updateHistories(changesHistory); + return changesHistory; + } + + private List changesHistory(Collection> changes) { + return changes.stream().map(this::historyElementFromChange).collect(Collectors.toList()); + } + + private HistoryData historyElementFromChange(Change change) { + HistoryResource h = change.getHistoryResource(); + HistoryData historyData = HistoryData.getInstance(h.getTimestamp(), h.getResourceURI(), + historyDataType(h.getChangeKindEnum())); + return historyData; + } + + private String historyDataType(ChangeKind changeKind) { + if (changeKind.equals(ChangeKind.CREATION)) { + return HistoryData.CREATED; + } else if (changeKind.equals(ChangeKind.MODIFICATION)) { + return HistoryData.MODIFIED; + } else if (changeKind.equals(ChangeKind.DELETION)) { + return HistoryData.DELETED; + } else { + throw new IllegalArgumentException("Illegal ChangeKind value"); + } + } + +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java new file mode 100644 index 0000000..307910a --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java @@ -0,0 +1,100 @@ +package org.eclipse.lyo.store.sync.handlers; + +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.List; +import java.util.TimeZone; + +import javax.xml.datatype.DatatypeConfigurationException; + +import org.eclipse.lyo.core.trs.ChangeEvent; +import org.eclipse.lyo.core.trs.Creation; +import org.eclipse.lyo.core.trs.Deletion; +import org.eclipse.lyo.core.trs.Modification; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.store.sync.change.Change; +import org.eclipse.paho.client.mqttv3.MqttClient; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.jena.rdf.model.Model; + +public class TrsMqttChangeLogHandler extends TrsHandler { + private final Logger log = LoggerFactory.getLogger(TrsMqttChangeLogHandler.class); + + private final MqttClient mqttClient; + private final String topic; + private int order; + + public TrsMqttChangeLogHandler(final ChangeHistories changeLog, final MqttClient mqttClient, final String topic) { + super(changeLog); + this.mqttClient = mqttClient; + this.topic = topic; + // FIXME Andrew@2018-03-11: may and should blow up, but bringing back + this.order = changeLog.getHistory(null, null).length; + } + + @Override + protected List updateChangelogHistory(Collection> changes) { + List updateChangelogHistory = super.updateChangelogHistory(changes); + for (HistoryData historyData : updateChangelogHistory) { + AbstractResource res = trsChangeResourceFrom(historyData); + MqttMessage message = buildMqttMessage(res); + try { + mqttClient.publish(topic, message); + } catch (MqttException e) { + log.error("Can't publish the message to the MQTT channel", e); + } + } + return updateChangelogHistory; + } + + private MqttMessage buildMqttMessage(AbstractResource res) { + try { + Model changeEventJenaModel = JenaModelHelper.createJenaModel(new Object[] { res }); + MqttMessage message = new MqttMessage(); + message.setPayload(changeEventJenaModel.toString().getBytes()); + return message; + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException + | DatatypeConfigurationException | OslcCoreApplicationException e) { + throw new IllegalArgumentException(e); + } + } + + private AbstractResource trsChangeResourceFrom(HistoryData historyData) { + // FIXME Andrew@2018-03-11: not thread-safe + this.order += 1; + String histDataType = historyData.getType(); + URI uri = historyData.getUri(); + URI changedUri; + try { + TimeZone tz = TimeZone.getTimeZone("UTC"); + DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); // Quoted "Z" to indicate UTC, no timezone offset + df.setTimeZone(tz); + String nowAsISO = df.format(historyData.getTimestamp()); + changedUri = new URI("urn:x-trs:" + nowAsISO + ":" + this.order); + ChangeEvent ce; + if (histDataType == HistoryData.CREATED) { + ce = new Creation(changedUri, uri, this.order); + } else if (histDataType == HistoryData.MODIFIED) { + ce = new Modification(changedUri, uri, this.order); + } else { + ce = new Deletion(changedUri, uri, this.order); + } + return ce; + } catch (URISyntaxException e) { + throw new IllegalStateException(e); + } + } + +} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/package-info.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/package-info.java new file mode 100644 index 0000000..c27aae5 --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author andrew + * + */ +package org.eclipse.lyo.store.sync.handlers; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/package-info.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/package-info.java new file mode 100644 index 0000000..74482ab --- /dev/null +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/package-info.java @@ -0,0 +1,10 @@ +/** + * Common primitives for updating store. + * {@link org.eclipse.lyo.store.sync.StoreUpdateRunnable} is scheduled by + * {@link org.eclipse.lyo.store.sync.StoreUpdateManager}. + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.18.0 + */ +package org.eclipse.lyo.store.sync; diff --git a/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java b/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java new file mode 100644 index 0000000..882db4c --- /dev/null +++ b/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java @@ -0,0 +1,86 @@ +package org.eclipse.lyo.store.sync; + +import org.apache.jena.rdf.model.Model; +import java.net.URI; +import java.time.Instant; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.store.Store; +import org.eclipse.lyo.store.StoreFactory; +import org.eclipse.lyo.store.sync.change.ChangeKind; +import org.eclipse.lyo.store.sync.change.HistoryResource; +import org.junit.Test; + +/** + * TestTrsHistoryResource is . + * + * @author Andrew Berezovskyi (andriib@kth.se) + * @version $version-stub$ + * @since 0.0.0 + */ +public class TestHistoryResource { + public static final URI RESOURCE_URI = URI.create("test:test"); + private final Store store = StoreFactory.inMemory(); + + @Test + public void testResourceIsMarshalled() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(0); + } + + @Test + public void testResourceContainsStatements() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); + assertThat(model.size()).isGreaterThan(1); + } + + @Test + public void testResourceIsPersisted() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + assertThat(store.keySet()).hasSize(0); + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + assertThat(store.keySet()).hasSize(1); + } + + @Test + public void testResourceIsRestored() throws Exception { + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, + Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + assertThat(resources).hasSize(1); + } + + @Test + public void testResourceIsRestoredWithProperties() throws Exception { + String testResourceURI = "lyo:testtest"; + Date timestamp = Date.from(Instant.now()); + HistoryResource resource = new HistoryResource(ChangeKind.CREATION, timestamp, + URI.create(testResourceURI)); + resource.setAbout(TestHistoryResource.RESOURCE_URI); + + store.putResources(resource.getAbout(), Collections.singletonList(resource)); + + List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); + HistoryResource storeResource = resources.get(0); + + assertThat(storeResource.getChangeKind()).isEqualToIgnoringCase(String.valueOf(ChangeKind.CREATION)); + assertThat(storeResource.getTimestamp()).isEqualTo(timestamp); + assertThat(storeResource.getResourceURI().toASCIIString()).isEqualTo(testResourceURI); + } +} diff --git a/src/store-update/src/test/resources/log4j.properties b/src/store-sync/src/test/resources/log4j.properties similarity index 100% rename from src/store-update/src/test/resources/log4j.properties rename to src/store-sync/src/test/resources/log4j.properties From 3c344e329f8a5585d0c5f16edf154729f040b115 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sun, 18 Mar 2018 04:13:13 +0100 Subject: [PATCH 12/15] Remove update module Signed-off-by: Andrew Berezovskyi --- .../org/eclipse/lyo/store/update/Handler.java | 16 --- .../store/update/ServiceProviderMessage.java | 14 --- .../lyo/store/update/StoreUpdateManager.java | 102 ----------------- .../lyo/store/update/StoreUpdateRunnable.java | 94 ---------------- .../lyo/store/update/UpdateMessage.java | 5 - .../lyo/store/update/change/Change.java | 37 ------ .../lyo/store/update/change/ChangeHelper.java | 37 ------ .../lyo/store/update/change/ChangeKind.java | 45 -------- .../store/update/change/ChangeProvider.java | 15 --- .../store/update/change/HistoryResource.java | 87 --------------- .../lyo/store/update/change/package-info.java | 9 -- .../update/handlers/SimpleStoreHandler.java | 105 ------------------ .../update/handlers/TrsChangelogHandler.java | 61 ---------- .../handlers/TrsMqttChangeLogHandler.java | 98 ---------------- .../store/update/handlers/package-info.java | 8 -- .../lyo/store/update/package-info.java | 10 -- .../lyo/store/update/TestHistoryResource.java | 86 -------------- 17 files changed, 829 deletions(-) delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java delete mode 100644 src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java delete mode 100644 src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java deleted file mode 100644 index f22f08f..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/Handler.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.util.Collection; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.update.change.Change; - -/** - * Handler is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public interface Handler { - Collection> handle(Store store, Collection> changes); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java deleted file mode 100644 index 607ffab..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/ServiceProviderMessage.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.net.URI; - -/** - * Created on 06.03.17 - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.1 - */ -public interface ServiceProviderMessage { - URI getServiceProviderUri(); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java deleted file mode 100644 index c375791..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateManager.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.update.change.Change; -import org.eclipse.lyo.store.update.change.ChangeProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Schedules {@link StoreUpdateRunnable} via internal - * {@link ScheduledExecutorService} with a predefined delay or on-demand. - * Operates on a generic message that is passed to handlers. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class StoreUpdateManager { - private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); - private static final int NODELAY = 0; - private static final int SINGLE_THREAD_POOL = 1; - private final ScheduledExecutorService executor; - private final ChangeProvider changeProvider; - private final Store store; - private final List> handlers = new ArrayList<>(); - - /** - * Schedules {@link StoreUpdateRunnable} via internal - * {@link ScheduledExecutorService} with a predefined delay or on-demand. - * - * @param store - * Instance of an initialised Store - * @param changeProvider - * Provider of the changes in the underlying tool. - */ - public StoreUpdateManager(final Store store, final ChangeProvider changeProvider) { - executor = Executors.newScheduledThreadPool(StoreUpdateManager.SINGLE_THREAD_POOL); - this.store = store; - this.changeProvider = changeProvider; - } - - /** - * Polling update on a given {@link ChangeProvider} followed by a notification - * to all previously registered {@link Handler} objects. - * - * @param lastUpdate - * Time of last store update, changes before this moment might be - * dropped. - * @param delaySeconds - * Seconds between polling checks. - */ - public void poll(final ZonedDateTime lastUpdate, final int delaySeconds) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, null, handlers); - executor.scheduleWithFixedDelay(updateRunnable, StoreUpdateManager.NODELAY, delaySeconds, TimeUnit.SECONDS); - - StoreUpdateManager.LOGGER.trace("Poll request has been enqueued"); - } - - /** - * Submit a single update request. Typically done from the HTTP handler. - * - * @param lastUpdate - * @param message - * Specific details for the {@link ChangeProvider} - * @return {@link Future} that allows to block until the runnable is finished - * executing (strongly discouraged). - */ - public Future submit(final ZonedDateTime lastUpdate, final M message) { - final StoreUpdateRunnable updateRunnable = buildRunnable(store, changeProvider, lastUpdate, message, - handlers); - return executor.submit(updateRunnable); - } - - /** - * Add a {@link Handler} that will process the collection of {@link Change} - * generated by the {@link ChangeProvider}. Handler is not guaranteed to be - * called if added after the update has been scheduled. - * - * @param handler - * Handler that should be called whenever {@link ChangeProvider} - * returns any changes. - */ - public void addHandler(final Handler handler) { - handlers.add(handler); - } - - /** - * Method can be overridden in case a more sophisticated Runnable has to be - * constructed. - */ - protected StoreUpdateRunnable buildRunnable(final Store store, final ChangeProvider changeProvider, - final ZonedDateTime lastUpdate, final M message, final List> handlers) { - return new StoreUpdateRunnable<>(store, changeProvider, lastUpdate, message, handlers); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java deleted file mode 100644 index dae9317..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/StoreUpdateRunnable.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.eclipse.lyo.store.update; - -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.util.Collection; -import java.util.Date; -import java.util.List; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.update.change.Change; -import org.eclipse.lyo.store.update.change.ChangeProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Requests latest {@link Change} collection from {@link ChangeProvider} and triggers each - * handler afterwards. Stores the timestamp of the newest change to request new updates starting - * from that point in time. - *

- *

Handlers will be notified with different message per service provider as accessible via - * {@link OSLCMessage#getServiceProviderId()}.

- * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -class StoreUpdateRunnable implements Runnable { - - private static final ZonedDateTime LAST_UPDATE_DEFAULT = ZonedDateTime.of(1971, 1, 1, 1, 1, 1, - 1, ZoneId.of("UTC")); - private final Logger log = LoggerFactory.getLogger(StoreUpdateRunnable.class); - private final ChangeProvider changeProvider; - private final M message; - private final Store store; - private final List> handlers; - private ZonedDateTime lastUpdate; - - /** - * @param store Initialised Store - * @param changeProvider Change provider - * @param lastUpdate Initial timestamp. If null, will be set to {@link - * StoreUpdateRunnable#LAST_UPDATE_DEFAULT} - * @param message Initial message to the {@link ChangeProvider} - * @param handlers List of handlers to be notified. - */ - StoreUpdateRunnable(final Store store, final ChangeProvider changeProvider, - final ZonedDateTime lastUpdate, final M message, final List> handlers) { - this.store = store; - this.changeProvider = changeProvider; - this.message = message; - this.handlers = handlers; - if (lastUpdate != null) { - this.lastUpdate = lastUpdate; - } else { - this.lastUpdate = StoreUpdateRunnable.LAST_UPDATE_DEFAULT; - } - } - - @Override - public void run() { - try { - log.trace("Running background update"); - Collection> changes = null; - try { - changes = changeProvider.getChangesSince(lastUpdate, message); - } catch (final Exception e) { - log.error("ChangeProvider threw an exception", e); - } - if (changes != null && !changes.isEmpty()) { - for (final Handler handler : handlers) { - log.trace("Notifying {}", handler); - try { - handler.handle(store, changes); - } catch (final Exception e) { - log.warn("Handler {} threw an exception", handler, e); - } - } - for (final Change change : changes) { - if (change != null) { - final Date date = change.getHistoryResource().getTimestamp(); - final ZonedDateTime dateTime = date.toInstant() - .atZone(ZoneId.systemDefault()); - if (lastUpdate.isBefore(dateTime)) { - lastUpdate = dateTime; - } - } - } - log.trace("Setting previous revision to {}", lastUpdate); - } - } catch (final Exception e) { - // ExecutorService will terminate the whole schedule if a Runnable throws an exception - log.error("A handler threw an exception!", e); - } - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java deleted file mode 100644 index 9d32be7..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/UpdateMessage.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.eclipse.lyo.store.update; - -public interface UpdateMessage { - -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java deleted file mode 100644 index 69dd1b4..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/Change.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.eclipse.lyo.store.update.change; - -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; - -/** - * Change is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class Change { - /** - * Not IExtendedResource due to the use of AbstractResource throughout Lyo generated code. - */ - private final AbstractResource resource; - private final HistoryResource historyResource; - private final T message; - - public Change(AbstractResource resource, HistoryResource historyResource, T message) { - this.resource = resource; - this.historyResource = historyResource; - this.message = message; - } - - public AbstractResource getResource() { - return resource; - } - - public HistoryResource getHistoryResource() { - return historyResource; - } - - public T getMessage() { - return message; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java deleted file mode 100644 index 2ed3216..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeHelper.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.eclipse.lyo.store.update.change; - -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * ChangeHelper is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class ChangeHelper { - - public static List changesCreated(Collection allChanges) { - return allChanges.stream() - .filter(change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.CREATION)) - .collect(Collectors.toList()); - } - - public static List changesModified(Collection allChanges) { - return allChanges.stream().filter( - change -> Objects.equals(change.getHistoryResource().getChangeKindEnum(), ChangeKind.MODIFICATION)) - .collect(Collectors.toList()); - } - - public static List historyFrom(Collection changes) { - return ChangeHelper.mapFn(changes, Change::getHistoryResource); - } - - public static List mapFn(Collection changes, Function mapper) { - return changes.stream().map(mapper).collect(Collectors.toList()); - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java deleted file mode 100644 index 1c8ad1f..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeKind.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.eclipse.lyo.store.update.change; - -import org.eclipse.lyo.oslc4j.core.annotation.OslcName; -import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; -import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; - -/** - * ChangeKind is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -@OslcNamespace(HistoryResource.NS_TRS) -@OslcName(ChangeKind.NAME) -@OslcResourceShape(title = "Change Kind Resource Shape", describes = HistoryResource.NS_TRS + ChangeKind.NAME) -public enum ChangeKind { - // Strings taken from the TRS provider implementation - CREATION("Created"), - MODIFICATION("Modified"), - DELETION("Deleted"); - - public static final String NAME = "ChangeKind"; - private final String created; - - ChangeKind(String created) { - this.created = created; - } - - public static ChangeKind fromString(String text) { - if (text != null) { - for (ChangeKind kind : ChangeKind.values()) { - if (text.equalsIgnoreCase(kind.created)) { - return kind; - } - } - } - throw new IllegalArgumentException("No constant with text " + text + " found"); - } - - @Override - public String toString() { - return created; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java deleted file mode 100644 index 869b9fa..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/ChangeProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.eclipse.lyo.store.update.change; - -import java.time.ZonedDateTime; -import java.util.Collection; - -/** - * ChangeProvider is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public interface ChangeProvider { - Collection> getChangesSince(ZonedDateTime lastUpdate, T message); -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java deleted file mode 100644 index 188e852..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/HistoryResource.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.eclipse.lyo.store.update.change; - -import org.eclipse.lyo.oslc4j.core.annotation.OslcName; -import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; -import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; -import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; - -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Date; - -/** - * HistoryResource is a wrapper OSLC Resource around org.eclipse.lyo.oslc4j.trs.provider.HistoryData. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -@OslcNamespace(HistoryResource.NS_TRS) -@OslcName(HistoryResource.NAME) -@OslcResourceShape(title = "TRS History Resource Shape", describes = HistoryResource.TYPE) -public class HistoryResource extends AbstractResource { - public static final String NS_TRS = "http://open-services.net/ns/core/trs#"; - public static final String NAME = "TrsHistoryResource"; - public static final String TYPE = NS_TRS + NAME; - private ChangeKind changeKind; - private Date timestamp; - private URI resourceURI; - - /** - * Shall be used only by the OSLC Jena Model Helper - */ - @Deprecated - public HistoryResource() { - } - - public HistoryResource(ChangeKind changeKind, Date timestamp, URI resourceURI) { - this.changeKind = changeKind; - this.timestamp = timestamp; - this.resourceURI = resourceURI; - } - - public HistoryResource(ChangeKind changeKind, ZonedDateTime timestamp, URI resourceURI) { - this.changeKind = changeKind; - this.timestamp = Date.from(timestamp.toInstant()); - this.resourceURI = resourceURI; - } - - @OslcName("change_kind") - @OslcPropertyDefinition(NS_TRS + "change_kind") - public String getChangeKind() { - return changeKind.toString(); - } - - public void setChangeKind(ChangeKind changeKind) { - this.changeKind = changeKind; - } - - public ChangeKind getChangeKindEnum() { - return changeKind; - } - - public void setChangeKind(String changeKind) { - this.changeKind = ChangeKind.fromString(changeKind); - } - - @OslcName("timestamp") - @OslcPropertyDefinition(NS_TRS + "timestamp") - public Date getTimestamp() { - return timestamp; - } - - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - - @OslcName("uri") - @OslcPropertyDefinition(NS_TRS + "uri") - public URI getResourceURI() { - return resourceURI; - } - - public void setResourceURI(URI resourceURI) { - this.resourceURI = resourceURI; - } -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java deleted file mode 100644 index 8d8df3b..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/change/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Classes for defining changes for handlers. - * {@link org.eclipse.lyo.store.update.change.HistoryResource} can be persisted in a - * triplestore. - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -package org.eclipse.lyo.store.update.change; diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java deleted file mode 100644 index 4e7d194..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/SimpleStoreHandler.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.eclipse.lyo.store.update.handlers; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.stream.Collector; -import java.util.stream.Collectors; - -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; -import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.StoreAccessException; -import org.eclipse.lyo.store.update.Handler; -import org.eclipse.lyo.store.update.ServiceProviderMessage; -import org.eclipse.lyo.store.update.change.Change; -import org.eclipse.lyo.store.update.change.ChangeHelper; -import org.eclipse.lyo.store.update.change.ChangeKind; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This is a simple handler that puts resources into named graphs per - * {@link ServiceProvider} if the message implements - * {@link ServiceProviderMessage}. - * - * @author Andrew Berezovskyi - * @version $version-stub$ - * @param - * @since 2.4.0 - * - */ -public class SimpleStoreHandler implements Handler { - - private final URI defaultGraph; - - private final Logger log = LoggerFactory.getLogger(SimpleStoreHandler.class); - - private final Store store; - - public SimpleStoreHandler(Store store) { - this.store = store; - try { - this.defaultGraph = new URI("urn:x-arq:DefaultGraph"); - } catch (URISyntaxException e) { - // this should never happen - we don't want the exception trail - // so we cheat with wrapping this in an unmanaged exception - // that will halt the execution. - IllegalStateException exception = new IllegalStateException(e); - log.error("Failed to generate default graph URI"); - throw exception; - } - } - - @Override - public Collection> handle(Store store, Collection> changes) { - if (changes == null || changes.isEmpty()) { - log.warn("Empty change list cannot be handled"); - return changes; - } - - Optional> firstChange = changes.stream().findFirst(); - if (firstChange.get().getMessage() instanceof ServiceProviderMessage) { - Map>> map = changes.stream() - .collect(Collectors.groupingBy(c -> c.getMessage().getClass())); - for (Entry>> changeSet : map.entrySet()) { - URI spURI = ((ServiceProviderMessage) changeSet.getKey()).getServiceProviderUri(); - persistChanges(spURI, changeSet.getValue()); - } - } else { - persistChanges(defaultGraph, changes); - } - - return changes; - } - - private void persistChanges(URI spURI, Collection> value) { - try { - persistUpdates(spURI, value); - } catch (StoreAccessException e) { - log.error("Failed to persist updates", e); - } - - persistDeletions(spURI, value); - } - - private void persistDeletions(URI spURI, Collection> value) { - Collection deletedResources = value.stream() - .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.DELETION) - .map(c -> c.getResource().getAbout()).collect(Collectors.toList()); - store.deleteResources(spURI, deletedResources.toArray(new URI[0])); - } - - private void persistUpdates(URI spURI, Collection> value) throws StoreAccessException { - Collection updatedResources = value.stream() - .filter(c -> c.getHistoryResource().getChangeKindEnum() == ChangeKind.CREATION - || c.getHistoryResource().getChangeKindEnum() == ChangeKind.MODIFICATION) - .map(c -> c.getResource()).collect(Collectors.toList()); - store.appendResources(spURI, updatedResources); - } - -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java deleted file mode 100644 index f5785bd..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsChangelogHandler.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.eclipse.lyo.store.update.handlers; - -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; - -import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; -import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.update.Handler; -import org.eclipse.lyo.store.update.change.Change; -import org.eclipse.lyo.store.update.change.ChangeKind; -import org.eclipse.lyo.store.update.change.HistoryResource; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; - -public class TrsChangelogHandler implements Handler { - - private ChangeHistories changeLog; - - public TrsChangelogHandler(ChangeHistories changeLog) { - this.changeLog = changeLog; - } - - @Override - public Collection> handle(Store store, Collection> changes) { - updateChangelogHistory(changes); - return changes; - } - - protected List updateChangelogHistory(Collection> changes) { - List changesHistory = changesHistory(changes); - changeLog.updateHistories(changesHistory); - return changesHistory; - } - - private List changesHistory(Collection> changes) { - return changes.stream().map(this::historyElementFromChange).collect(Collectors.toList()); - } - - private HistoryData historyElementFromChange(Change change) { - HistoryResource h = change.getHistoryResource(); - HistoryData historyData = HistoryData.getInstance(h.getTimestamp(), h.getResourceURI(), - historyDataType(h.getChangeKindEnum())); - return historyData; - } - - private String historyDataType(ChangeKind changeKind) { - if (changeKind.equals(ChangeKind.CREATION)) { - return HistoryData.CREATED; - } else if (changeKind.equals(ChangeKind.MODIFICATION)) { - return HistoryData.MODIFIED; - } else if (changeKind.equals(ChangeKind.DELETION)) { - return HistoryData.DELETED; - } else { - throw new IllegalArgumentException("Illegal ChangeKind value"); - } - } - -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java deleted file mode 100644 index 589bccf..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/TrsMqttChangeLogHandler.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.eclipse.lyo.store.update.handlers; - -import java.lang.reflect.InvocationTargetException; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Collection; -import java.util.List; -import java.util.TimeZone; - -import javax.xml.datatype.DatatypeConfigurationException; - -import org.eclipse.lyo.core.trs.ChangeEvent; -import org.eclipse.lyo.core.trs.Creation; -import org.eclipse.lyo.core.trs.Deletion; -import org.eclipse.lyo.core.trs.Modification; -import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; -import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; -import org.eclipse.lyo.store.update.change.Change; -import org.eclipse.paho.client.mqttv3.MqttClient; -import org.eclipse.paho.client.mqttv3.MqttException; -import org.eclipse.paho.client.mqttv3.MqttMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.apache.jena.rdf.model.Model; - -public class TrsMqttChangeLogHandler extends TrsChangelogHandler { - private final Logger log = LoggerFactory.getLogger(TrsMqttChangeLogHandler.class); - - private final MqttClient mqttClient; - private final String topic; - private int order; - - public TrsMqttChangeLogHandler(final ChangeHistories changeLog, final MqttClient mqttClient, final String topic) { - super(changeLog); - this.mqttClient = mqttClient; - this.topic = topic; - this.order = changeLog.getHistorySize(); - } - - @Override - protected List updateChangelogHistory(Collection> changes) { - List updateChangelogHistory = super.updateChangelogHistory(changes); - for (HistoryData historyData : updateChangelogHistory) { - AbstractResource res = trsChangeResourceFrom(historyData); - MqttMessage message = buildMqttMessage(res); - try { - mqttClient.publish(topic, message); - } catch (MqttException e) { - log.error("Can't publish the message to the MQTT channel", e); - } - } - return updateChangelogHistory; - } - - private MqttMessage buildMqttMessage(AbstractResource res) { - try { - Model changeEventJenaModel = JenaModelHelper.createJenaModel(new Object[] { res }); - MqttMessage message = new MqttMessage(); - message.setPayload(changeEventJenaModel.toString().getBytes()); - return message; - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException - | DatatypeConfigurationException | OslcCoreApplicationException e) { - throw new IllegalArgumentException(e); - } - } - - private AbstractResource trsChangeResourceFrom(HistoryData historyData) { - this.order += 1; - String histDataType = historyData.getType(); - URI uri = historyData.getUri(); - URI changedUri; - try { - TimeZone tz = TimeZone.getTimeZone("UTC"); - DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); // Quoted "Z" to indicate UTC, no timezone offset - df.setTimeZone(tz); - String nowAsISO = df.format(historyData.getTimestamp()); - changedUri = new URI("urn:x-trs:" + nowAsISO + ":" + this.order); - ChangeEvent ce; - if (histDataType == HistoryData.CREATED) { - ce = new Creation(changedUri, uri, this.order); - } else if (histDataType == HistoryData.MODIFIED) { - ce = new Modification(changedUri, uri, this.order); - } else { - ce = new Deletion(changedUri, uri, this.order); - } - return ce; - } catch (URISyntaxException e) { - throw new IllegalStateException(e); - } - } - -} diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java deleted file mode 100644 index 1947750..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/handlers/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - */ -/** - * @author andrew - * - */ -package org.eclipse.lyo.store.update.handlers; \ No newline at end of file diff --git a/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java b/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java deleted file mode 100644 index dedee4f..0000000 --- a/src/store-update/src/main/java/org/eclipse/lyo/store/update/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Common primitives for updating store. - * {@link org.eclipse.lyo.store.update.StoreUpdateRunnable} is scheduled by - * {@link org.eclipse.lyo.store.update.StoreUpdateManager}. - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.18.0 - */ -package org.eclipse.lyo.store.update; diff --git a/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java b/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java deleted file mode 100644 index 55adc55..0000000 --- a/src/store-update/src/test/java/org/eclipse/lyo/store/update/TestHistoryResource.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.eclipse.lyo.store.update; - -import org.apache.jena.rdf.model.Model; -import java.net.URI; -import java.time.Instant; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import static org.assertj.core.api.Assertions.assertThat; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.store.Store; -import org.eclipse.lyo.store.StoreFactory; -import org.eclipse.lyo.store.update.change.ChangeKind; -import org.eclipse.lyo.store.update.change.HistoryResource; -import org.junit.Test; - -/** - * TestTrsHistoryResource is . - * - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.0 - */ -public class TestHistoryResource { - public static final URI RESOURCE_URI = URI.create("test:test"); - private final Store store = StoreFactory.inMemory(); - - @Test - public void testResourceIsMarshalled() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - - Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); - assertThat(model.size()).isGreaterThan(0); - } - - @Test - public void testResourceContainsStatements() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - Model model = JenaModelHelper.createJenaModel(new Object[] { resource }); - assertThat(model.size()).isGreaterThan(1); - } - - @Test - public void testResourceIsPersisted() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - assertThat(store.keySet()).hasSize(0); - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - assertThat(store.keySet()).hasSize(1); - } - - @Test - public void testResourceIsRestored() throws Exception { - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, - Date.from(Instant.now()), TestHistoryResource.RESOURCE_URI); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); - assertThat(resources).hasSize(1); - } - - @Test - public void testResourceIsRestoredWithProperties() throws Exception { - String testResourceURI = "lyo:testtest"; - Date timestamp = Date.from(Instant.now()); - HistoryResource resource = new HistoryResource(ChangeKind.CREATION, timestamp, - URI.create(testResourceURI)); - resource.setAbout(TestHistoryResource.RESOURCE_URI); - - store.putResources(resource.getAbout(), Collections.singletonList(resource)); - - List resources = store.getResources(TestHistoryResource.RESOURCE_URI, HistoryResource.class); - HistoryResource storeResource = resources.get(0); - - assertThat(storeResource.getChangeKind()).isEqualToIgnoringCase(String.valueOf(ChangeKind.CREATION)); - assertThat(storeResource.getTimestamp()).isEqualTo(timestamp); - assertThat(storeResource.getResourceURI().toASCIIString()).isEqualTo(testResourceURI); - } -} From 4afe4c5e1d8410de26e561fcfb2e2a14c70fa12e Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Fri, 15 Feb 2019 21:58:46 +0100 Subject: [PATCH 13/15] Fix corrupted POM file Signed-off-by: Andrew Berezovskyi --- src/store-core/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/store-core/pom.xml b/src/store-core/pom.xml index 92d9b88..ea4e41c 100644 --- a/src/store-core/pom.xml +++ b/src/store-core/pom.xml @@ -46,11 +46,6 @@
- - - org.apache.jena - apache-jena-libs - pom org.eclipse.lyo.core.query oslc-query From 649115a8e29bfd939eafee9ed6aa52969d358cdf Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Fri, 15 Feb 2019 22:11:36 +0100 Subject: [PATCH 14/15] Update store-sync to Lyo 4.0 Signed-off-by: Andrew Berezovskyi --- src/store-sync/pom.xml | 6 +++--- .../org/eclipse/lyo/store/sync/handlers/TrsHandler.java | 4 ++-- .../lyo/store/sync/handlers/TrsMqttChangeLogHandler.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/store-sync/pom.xml b/src/store-sync/pom.xml index a8fd0e8..f94e4a5 100644 --- a/src/store-sync/pom.xml +++ b/src/store-sync/pom.xml @@ -7,7 +7,7 @@ org.eclipse.lyo.store store-parent - 2.4.0-SNAPSHOT + 4.0.0-SNAPSHOT ../pom.xml @@ -18,7 +18,7 @@ UTF-8 1.8 1.8 - 2.4.0-SNAPSHOT + 4.0.0-SNAPSHOT
@@ -44,7 +44,7 @@
org.eclipse.lyo.trs - trs-provider + trs-server ${version.lyo} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java index f71eea8..ce5128a 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java @@ -4,8 +4,8 @@ import java.util.List; import java.util.stream.Collectors; -import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; -import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.oslc4j.trs.server.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.server.HistoryData; import org.eclipse.lyo.store.Store; import org.eclipse.lyo.store.sync.Handler; import org.eclipse.lyo.store.sync.change.Change; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java index 307910a..e74d4d8 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java @@ -18,8 +18,8 @@ import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; import org.eclipse.lyo.oslc4j.core.model.AbstractResource; import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.oslc4j.trs.provider.ChangeHistories; -import org.eclipse.lyo.oslc4j.trs.provider.HistoryData; +import org.eclipse.lyo.oslc4j.trs.server.ChangeHistories; +import org.eclipse.lyo.oslc4j.trs.server.HistoryData; import org.eclipse.lyo.store.sync.change.Change; import org.eclipse.paho.client.mqttv3.MqttClient; import org.eclipse.paho.client.mqttv3.MqttException; From 22b1020dd71356902eb72e71af6c195418bb5aa5 Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Mon, 9 Nov 2020 23:51:49 +0100 Subject: [PATCH 15/15] Split store-sync into base and trs and update --- README.md | 2 +- src/pom.xml | 1 + src/store-sync-trs/pom.xml | 30 +++++++++++++++++++ .../lyo/store/sync/handlers/TrsHandler.java | 29 ++++++++++++++---- .../handlers/TrsMqttChangeLogHandler.java | 13 ++++++++ src/store-sync/README.md | 4 +-- src/store-sync/pom.xml | 5 ---- .../org/eclipse/lyo/store/sync/Handler.java | 15 +++++++++- .../store/sync/ServiceProviderMessage.java | 13 ++++++++ .../lyo/store/sync/StoreUpdateManager.java | 15 +++++++++- .../lyo/store/sync/StoreUpdateRunnable.java | 13 ++++++++ .../eclipse/lyo/store/sync/UpdateMessage.java | 5 ---- .../eclipse/lyo/store/sync/change/Change.java | 16 ++++++++-- .../lyo/store/sync/change/ChangeHelper.java | 15 +++++++++- .../lyo/store/sync/change/ChangeKind.java | 15 +++++++++- .../lyo/store/sync/change/ChangeProvider.java | 15 +++++++++- .../store/sync/change/HistoryResource.java | 15 +++++++++- .../lyo/store/sync/change/package-info.java | 3 +- .../sync/handlers/SimpleStoreHandler.java | 13 ++++++++ .../lyo/store/sync/TestHistoryResource.java | 2 +- 20 files changed, 209 insertions(+), 30 deletions(-) create mode 100644 src/store-sync-trs/pom.xml rename src/{store-sync => store-sync-trs}/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java (63%) rename src/{store-sync => store-sync-trs}/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java (88%) delete mode 100644 src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java diff --git a/README.md b/README.md index f2c04d0..ada48cc 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Now, add the following dependency: org.eclipse.lyo.store store-core - 2.4.0 + %version% ``` Now you are all set to start using the library. diff --git a/src/pom.xml b/src/pom.xml index 5fb3467..4c11a87 100644 --- a/src/pom.xml +++ b/src/pom.xml @@ -23,6 +23,7 @@ store-core store-sync + diff --git a/src/store-sync-trs/pom.xml b/src/store-sync-trs/pom.xml new file mode 100644 index 0000000..72d1a57 --- /dev/null +++ b/src/store-sync-trs/pom.xml @@ -0,0 +1,30 @@ + + + + store-parent + org.eclipse.lyo.store + 4.0.0-SNAPSHOT + + 4.0.0 + + store-sync-trs + + + + + org.eclipse.lyo.store + store-sync + ${project.version} + + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + 1.1.0 + + + + + \ No newline at end of file diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java b/src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java similarity index 63% rename from src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java rename to src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java index ce5128a..9ed50bf 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java +++ b/src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsHandler.java @@ -1,11 +1,24 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.handlers; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; -import org.eclipse.lyo.oslc4j.trs.server.ChangeHistories; import org.eclipse.lyo.oslc4j.trs.server.HistoryData; +import org.eclipse.lyo.oslc4j.trs.server.TrsEventHandler; import org.eclipse.lyo.store.Store; import org.eclipse.lyo.store.sync.Handler; import org.eclipse.lyo.store.sync.change.Change; @@ -14,10 +27,10 @@ public class TrsHandler implements Handler { - private ChangeHistories changeLog; + private TrsEventHandler eventHandler; - public TrsHandler(ChangeHistories changeLog) { - this.changeLog = changeLog; + public TrsHandler(TrsEventHandler trsEventHandler) { + this.eventHandler = trsEventHandler; } @Override @@ -28,7 +41,13 @@ public Collection> handle(Store store, Collection> changes) protected List updateChangelogHistory(Collection> changes) { List changesHistory = changesHistory(changes); - changeLog.updateHistories(changesHistory); + for (HistoryData element: changesHistory + ) { + if(HistoryData.CREATED.equals(element.getType()) { + // FIXME: 2020-11-09 Either pass the resource or add "light" onCreatedMeta() resources + eventHandler.onCreated(); + } + } return changesHistory; } diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java b/src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java similarity index 88% rename from src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java rename to src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java index e74d4d8..fc5e31a 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java +++ b/src/store-sync-trs/src/main/java/org/eclipse/lyo/store/sync/handlers/TrsMqttChangeLogHandler.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.handlers; import java.lang.reflect.InvocationTargetException; diff --git a/src/store-sync/README.md b/src/store-sync/README.md index d29beec..2ab6f22 100644 --- a/src/store-sync/README.md +++ b/src/store-sync/README.md @@ -2,8 +2,6 @@ *Lyo Store* is a library that provides a simple interface for working with a triplestore via Java objects representing OSLC Resources. Lyo Store and Jena Models in the triple stores. -**[Lyo Store Javadoc](http://assume.gitlab.io/jena-cache/apidocs/)** - ## Prerequisites * For an in-memory option: JVM heap should be set to 1G or above (see [Jena documentation][1] for more information on this). @@ -15,7 +13,7 @@ org.eclipse.lyo.tools lyo-store - 0.24.0-SNAPSHOT + %version% More build systems are covered here: http://assume.gitlab.io/jena-cache/dependency-info.html diff --git a/src/store-sync/pom.xml b/src/store-sync/pom.xml index f94e4a5..162e1ea 100644 --- a/src/store-sync/pom.xml +++ b/src/store-sync/pom.xml @@ -47,11 +47,6 @@ trs-server ${version.lyo} - - org.eclipse.paho - org.eclipse.paho.client.mqttv3 - 1.1.0 -
diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java index 7dda34f..85ba20d 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/Handler.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync; import java.util.Collection; @@ -9,7 +22,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public interface Handler { Collection> handle(Store store, Collection> changes); diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java index 80aaa4b..fb95534 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/ServiceProviderMessage.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync; import java.net.URI; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java index a8579e6..358d219 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateManager.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync; import java.time.ZonedDateTime; @@ -20,7 +33,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public class StoreUpdateManager { private final static Logger LOGGER = LoggerFactory.getLogger(StoreUpdateManager.class); diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java index 88aa112..c91e279 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/StoreUpdateRunnable.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync; import java.time.ZoneId; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java deleted file mode 100644 index 0bb4cef..0000000 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/UpdateMessage.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.eclipse.lyo.store.sync; - -public interface UpdateMessage { - -} diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java index d891df9..d26d93c 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/Change.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.change; import org.eclipse.lyo.oslc4j.core.model.AbstractResource; @@ -5,9 +18,8 @@ /** * Change is . * - * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public class Change { /** diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java index ff3753c..8f0738c 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeHelper.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.change; import java.util.Collection; @@ -11,7 +24,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public class ChangeHelper { diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java index d063b1b..e3a251f 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeKind.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.change; import org.eclipse.lyo.oslc4j.core.annotation.OslcName; @@ -9,7 +22,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ @OslcNamespace(HistoryResource.NS_TRS) @OslcName(ChangeKind.NAME) diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java index 9f38ced..70bb0b4 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/ChangeProvider.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.change; import java.time.ZonedDateTime; @@ -8,7 +21,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public interface ChangeProvider { Collection> getChangesSince(ZonedDateTime lastUpdate, T message); diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java index c95fc1b..d09b1f1 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/HistoryResource.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.change; import org.eclipse.lyo.oslc4j.core.annotation.OslcName; @@ -15,7 +28,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ @OslcNamespace(HistoryResource.NS_TRS) @OslcName(HistoryResource.NAME) diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java index 550f3de..6241141 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/change/package-info.java @@ -2,8 +2,7 @@ * Classes for defining changes for handlers. * {@link org.eclipse.lyo.store.sync.change.HistoryResource} can be persisted in a * triplestore. - * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.18.0 + * @since 4.0.0 */ package org.eclipse.lyo.store.sync.change; diff --git a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java index 7bf12b1..cde1051 100644 --- a/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java +++ b/src/store-sync/src/main/java/org/eclipse/lyo/store/sync/handlers/SimpleStoreHandler.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Eclipse Distribution License v. 1.0 which accompanies this distribution. + * + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-1.0 OR BSD-3-Clause + */ package org.eclipse.lyo.store.sync.handlers; import java.net.URI; diff --git a/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java b/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java index 882db4c..2b91965 100644 --- a/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java +++ b/src/store-sync/src/test/java/org/eclipse/lyo/store/sync/TestHistoryResource.java @@ -19,7 +19,7 @@ * * @author Andrew Berezovskyi (andriib@kth.se) * @version $version-stub$ - * @since 0.0.0 + * @since 4.0.0 */ public class TestHistoryResource { public static final URI RESOURCE_URI = URI.create("test:test");