From fbd02c733474203587654decd10be0c268cf4287 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Dec 2021 14:57:29 +0000 Subject: [PATCH 01/91] Update dependency versions --- pom.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 10b494e4..259b6197 100644 --- a/pom.xml +++ b/pom.xml @@ -13,12 +13,13 @@ ~ limitations under the License. --> - + 4.0.0 uk.gov.gchq.magma-core magma-core - 1.0 + 1.1-SNAPSHOT jar Magma Core @@ -51,33 +52,33 @@ commons-cli commons-cli - 1.4 + 1.5.0 org.apache.jena apache-jena-libs pom - 4.0.0 + 4.3.2 org.apache.jena jena-fuseki-main - 4.0.0 + 4.3.2 org.apache.logging.log4j log4j-api - 2.15.0 + 2.17.0 org.apache.logging.log4j log4j-core - 2.15.0 + 2.17.0 org.apache.logging.log4j log4j-slf4j-impl - 2.14.0 + 2.17.0 uk.gov.gchq.hqdm From 0e0cefec2862d70a9955dac842ba3477011f5489 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Dec 2021 14:58:53 +0000 Subject: [PATCH 02/91] Add remote SPARQL support and simple command line options. --- HQDM | 1 - .../java/uk/gov/gchq/magmacore/MagmaCore.java | 35 +- .../MagmaCoreRemoteSparqlDatabase.java | 304 ++++++++++++++++++ .../gchq/magmacore/demo/FusekiService.java | 14 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 2 +- .../demo/RemoteSparqlDatabaseDemo.java | 49 +++ 6 files changed, 394 insertions(+), 11 deletions(-) delete mode 160000 HQDM create mode 100644 src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java diff --git a/HQDM b/HQDM deleted file mode 160000 index 0f0b7cc3..00000000 --- a/HQDM +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0f0b7cc3d345f648884394d7864cba9b403ab6d3 diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index 44de6c4a..241aa9e1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -15,6 +15,7 @@ package uk.gov.gchq.magmacore; import uk.gov.gchq.magmacore.demo.FusekiService; +import uk.gov.gchq.magmacore.demo.RemoteSparqlDatabaseDemo; /** * Application entry point. @@ -24,11 +25,41 @@ public final class MagmaCore { private MagmaCore() {} /** - * Executes FusekiService or selected database example. + * Executes the selected database example. * * @param args Application arguments. */ public static void main(final String[] args) { - new FusekiService().run(); + if (args.length == 0) { + fuseki(true); + } else { + if (args[0].equals("fuseki")) { + fuseki(false); + } else if (args[0].equals("fuseki-populate")) { + fuseki(true); + } else if (args[0].equals("remote")) { + remoteSparqlDatabaseDemo(false); + } else if (args[0].equals("remote-populate")) { + remoteSparqlDatabaseDemo(true); + } + } + } + + /** + * Executes the FusekiService. + * + * @param populate true if the dataset should be populated with example data + */ + public static void fuseki(final boolean populate) { + new FusekiService().run(populate); + } + + /** + * Executes the RemoteSparqlDatabaseDemo. + * + * @param populate true if the dataset should be populated with example data + */ + public static void remoteSparqlDatabaseDemo(final boolean populate) { + new RemoteSparqlDatabaseDemo("http://localhost:3330/tdb").run(populate); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java new file mode 100644 index 00000000..69a0a31f --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -0,0 +1,304 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + + package uk.gov.gchq.magmacore.database; + +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.apache.jena.atlas.lib.Pair; +import org.apache.jena.query.Dataset; +import org.apache.jena.query.QueryExecution; +import org.apache.jena.query.QuerySolution; +import org.apache.jena.query.ResultSet; +import org.apache.jena.query.TxnType; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.rdf.model.Statement; +import org.apache.jena.rdf.model.StmtIterator; +import org.apache.jena.rdfconnection.RDFConnection; +import org.apache.jena.rdfconnection.RDFConnectionRemote; +import org.apache.jena.riot.Lang; +import org.apache.jena.riot.RDFDataMgr; +import org.apache.jena.riot.RDFFormat; +import org.apache.jena.util.PrintUtil; + +import uk.gov.gchq.hqdm.iri.HqdmIri; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.pojo.HqdmObjectFactory; +import uk.gov.gchq.magmacore.query.QueryResult; +import uk.gov.gchq.magmacore.query.QueryResultList; + +/** + * Connection to a remote SPARQL endpoint. + */ +public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { + + private final RDFConnection connection; + + /** + * Constructor to create a connection to a SPARQL endpoint. + * + * @param serviceUrl the URL String of the SPARQL update endpoint + */ + public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { + connection = RDFConnectionRemote.newBuilder() + .destination(serviceUrl) + .queryEndpoint("query") + .updateEndpoint("update") + .triplesFormat(RDFFormat.RDFJSON) + .build(); + } + + /** + * Constructor to create a connection to a SPARQL endpoint and load it with a dataset. + * + * @param serviceUrl the URL String of the SPARQL update endpoint + * @param dataset the Dataset to be loaded into the database + */ + public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset dataset) { + connection = RDFConnectionRemote.newBuilder() + .destination(serviceUrl) + .queryEndpoint("query") + .updateEndpoint("update") + .triplesFormat(RDFFormat.RDFJSON) + .build(); + + connection.load(dataset.getDefaultModel()); + } + + /** + * Drop all data from the dataset. + */ + public void drop() { + final String drop = "drop all"; + executeUpdate(drop); + } + + /** + * {@inheritDoc} + */ + @Override + public Thing get(final IRI iri) { + + final String query = + String.format("SELECT (<%1$s> as ?s) ?p ?o WHERE {<%1$s> ?p ?o.}", iri.toString()); + final QueryResultList list = executeQuery(query); + final List objects = toTopObjects(list); + + if (!objects.isEmpty()) { + return objects.get(0); + } else { + return null; + } + + } + + /** + * {@inheritDoc} + */ + @Override + public void create(final Thing object) { + + final Model model = ModelFactory.createDefaultModel(); + + final Resource resource = + model.createResource(object.getIri().toString()); + + object.getPredicates() + .forEach((iri, + predicates) -> predicates.forEach(predicate -> resource.addProperty( + model.createProperty(iri.toString()), + predicate.toString()))); + + connection.load(model); + } + + /** + * {@inheritDoc} + */ + @Override + public void update(final Thing object) { + delete(object); + create(object); + } + + /** + * {@inheritDoc} + */ + @Override + public void delete(final Thing object) { + executeUpdate(String.format("delete data {%s}", object.toTriples())); + } + + /** + * {@inheritDoc} + */ + @Override + public List findByPredicateIri(final IRI predicateIri, final IRI objectIri) { + final String query = + "SELECT ?s ?p ?o WHERE {?s ?p ?o. ?s <" + predicateIri.toString() + "> <" + + objectIri.toString() + ">.}"; + final QueryResultList list = executeQuery(query); + return toTopObjects(list); + } + + /** + * {@inheritDoc} + */ + @Override + public List findByPredicateIriOnly(final HqdmIri predicateIri) { + final String query = + "SELECT ?s ?p ?o WHERE {{select ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + "> ?o.}}}"; + final QueryResultList list = executeQuery(query); + return toTopObjects(list); + } + + /** + * {@inheritDoc} + */ + @Override + public List findByPredicateIriAndStringValue(final IRI predicateIri, + final String value) { + final String query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o. ?s <" + predicateIri.toString() + + "> \"\"\"" + value + "\"\"\".}"; + final QueryResultList list = executeQuery(query); + return toTopObjects(list); + } + + /** + * {@inheritDoc} + */ + @Override + public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, + final String value) { + final String query = + "SELECT ?s ?p ?o WHERE {{ SELECT ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + + "> ?o. BIND(LCASE(?o) AS ?lcase) FILTER(?lcase= \"\"\"" + value + + "\"\"\")}}}"; + final QueryResultList list = executeQuery(query); + return toTopObjects(list); + } + + /** + * Perform an update query on the dataset. + * + * @param statement SPARQL update query to execute. + */ + protected void executeUpdate(final String statement) { + + connection.update(statement); + + } + + /** + * Perform a SPARQL query on the dataset. + * + * @param sparqlQueryString SPARQL query to execute. + * @return Results of the query. + */ + protected QueryResultList executeQuery(final String sparqlQueryString) { + final QueryExecution queryExec = connection.query(sparqlQueryString); + return getQueryResultList(queryExec); + } + + /** + * Execute a SPARQL query and construct a list of HQDM objects from the resulting RDF triples. + * + * @param queryExec SPARQL query to execute. + * @return Results of the query. + */ + private final QueryResultList getQueryResultList(final QueryExecution queryExec) { + final ResultSet resultSet = queryExec.execSelect(); + final List queryResults = new ArrayList<>(); + final QueryResultList queryResultList = + new QueryResultList(resultSet.getResultVars(), queryResults); + while (resultSet.hasNext()) { + final QuerySolution querySolution = resultSet.next(); + final Iterator varNames = querySolution.varNames(); + final QueryResult queryResult = new QueryResult(); + + while (varNames.hasNext()) { + final String varName = varNames.next(); + final RDFNode node = querySolution.get(varName); + queryResult.set(varName, node); + } + queryResults.add(queryResult); + } + queryExec.close(); + return queryResultList; + } + + private final List toTopObjects(final QueryResultList queryResultsList) { + final Map>> objectMap = new HashMap<>(); + final String subjectVarName = queryResultsList.getVarNames().get(0); + final String predicateVarName = queryResultsList.getVarNames().get(1); + final String objectVarName = queryResultsList.getVarNames().get(2); + + // Create a map of the triples for each unique subject IRI + final List queryResults = queryResultsList.getQueryResults(); + queryResults.forEach(queryResult -> { + final String subjectValue = queryResult.get(subjectVarName).toString(); + final String predicateValue = queryResult.get(predicateVarName).toString(); + final String objectValue = queryResult.get(objectVarName).toString(); + + List> dataModelObject = objectMap.get(subjectValue); + if (dataModelObject == null) { + dataModelObject = new ArrayList<>(); + objectMap.put(subjectValue, dataModelObject); + } + dataModelObject.add(new Pair<>(predicateValue, objectValue)); + }); + + return objectMap.entrySet().stream() + .map(entry -> HqdmObjectFactory.create(entry.getKey(), entry.getValue())) + .collect(Collectors.toList()); + } + + /** + * {@inheritDoc} + */ + @Override + public void dump(final PrintStream out) { + final Dataset dataset = connection.fetchDataset(); + final Model model = dataset.getDefaultModel(); + final StmtIterator statements = model.listStatements(); + + while (statements.hasNext()) { + final Statement statement = statements.nextStatement(); + out.println(" - " + PrintUtil.print(statement)); + } + } + + /** + * Dump the contents of the collection as text in specified RDF language. + * + * @param out Output stream to dump to. + * @param language RDF language syntax to output data as. + */ + public final void dump(final PrintStream out, final Lang language) { + final Dataset dataset = connection.fetchDataset(); + RDFDataMgr.write(out, dataset.getDefaultModel(), language); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java index 238175b2..c68603ae 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java @@ -42,14 +42,14 @@ public final class FusekiService { /** * Run the example Fuseki server. */ - public void run() { + public void run(final boolean populate) { // Create/connect to persistent TDB. final MagmaCoreJenaDatabase tdb = new MagmaCoreJenaDatabase("tdb"); // If TDB is not already populated create set of example data objects to // store in TDB. tdb.begin(); - if (tdb.getDataset().isEmpty()) { + if (tdb.getDataset().isEmpty() && populate) { // Build example data objects Dataset. final Dataset objects = ExampleDataObjects.buildDataset(); @@ -60,11 +60,11 @@ public void run() { tdb.abort(); } // Build and start Fuseki server. - final FusekiServer server = FusekiServer - .create() - .port(3330) - .add("/tdb", tdb.getDataset(), true).build(); FusekiLogging.setLogging(); - server.start(); + FusekiServer + .create() + .port(3330) + .add("/tdb", tdb.getDataset(), true) + .start(); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index feedea07..4a9a2d4d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -63,7 +63,7 @@ public void run() { // Add example data objects to dataset. jenaDatabase.begin(); - objects.forEach(object -> jenaDatabase.create(object)); + objects.forEach(jenaDatabase::create); jenaDatabase.commit(); // Query database to check its populated. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java new file mode 100644 index 00000000..66c52a3a --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -0,0 +1,49 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.magmacore.demo; + +import org.apache.jena.query.Dataset; + +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; + +/** + * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote service. + */ +public final class RemoteSparqlDatabaseDemo { + + private final String url; + + public RemoteSparqlDatabaseDemo(final String url) { + this.url = url; + } + + /** + * Run the demo. + */ + public void run(final boolean populate) { + final MagmaCoreDatabase db; + + if (populate) { + final Dataset dataset = ExampleDataObjects.buildDataset(); + db = new MagmaCoreRemoteSparqlDatabase(url, dataset); + } else { + db = new MagmaCoreRemoteSparqlDatabase(url); + } + + db.dump(System.out); + } + +} From 84013648b9fceafa0865256aaa87d7d84ebc7a75 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Dec 2021 15:07:37 +0000 Subject: [PATCH 03/91] Reduce code duplication --- .../database/MagmaCoreRemoteSparqlDatabase.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 69a0a31f..91674302 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -27,7 +27,6 @@ import org.apache.jena.query.QueryExecution; import org.apache.jena.query.QuerySolution; import org.apache.jena.query.ResultSet; -import org.apache.jena.query.TxnType; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.RDFNode; @@ -76,14 +75,9 @@ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { * @param dataset the Dataset to be loaded into the database */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset dataset) { - connection = RDFConnectionRemote.newBuilder() - .destination(serviceUrl) - .queryEndpoint("query") - .updateEndpoint("update") - .triplesFormat(RDFFormat.RDFJSON) - .build(); + this(serviceUrl); - connection.load(dataset.getDefaultModel()); + connection.load(dataset.getDefaultModel()); } /** From 4a78ae5bcddd00490b3998c17ea627c312c2d964 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Dec 2021 15:08:03 +0000 Subject: [PATCH 04/91] Add jena demo and object demo to cmd line options --- .../java/uk/gov/gchq/magmacore/MagmaCore.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index 241aa9e1..205ad46c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -15,6 +15,8 @@ package uk.gov.gchq.magmacore; import uk.gov.gchq.magmacore.demo.FusekiService; +import uk.gov.gchq.magmacore.demo.JenaDatabaseDemo; +import uk.gov.gchq.magmacore.demo.ObjectDatabaseDemo; import uk.gov.gchq.magmacore.demo.RemoteSparqlDatabaseDemo; /** @@ -33,14 +35,20 @@ public static void main(final String[] args) { if (args.length == 0) { fuseki(true); } else { - if (args[0].equals("fuseki")) { + final String option = args[0]; + + if (option.equals("fuseki")) { fuseki(false); - } else if (args[0].equals("fuseki-populate")) { + } else if (option.equals("fuseki-populate")) { fuseki(true); - } else if (args[0].equals("remote")) { + } else if (option.equals("remote")) { remoteSparqlDatabaseDemo(false); - } else if (args[0].equals("remote-populate")) { + } else if (option.equals("remote-populate")) { remoteSparqlDatabaseDemo(true); + } else if (option.equals("jena")) { + jenaDemo(); + } else if (option.equals("object")) { + objectDemo(); } } } @@ -62,4 +70,18 @@ public static void fuseki(final boolean populate) { public static void remoteSparqlDatabaseDemo(final boolean populate) { new RemoteSparqlDatabaseDemo("http://localhost:3330/tdb").run(populate); } + + /** + * Executes the ObjectDatabaseDemo. + */ + public static void objectDemo() { + new ObjectDatabaseDemo().run(); + } + + /** + * Executes the JenaDatabaseDemo. + */ + public static void jenaDemo() { + new JenaDatabaseDemo().run(); + } } From f6b59814b659f984c575badee1533a9be27f6161 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Dec 2021 15:22:56 +0000 Subject: [PATCH 05/91] Update the README. --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd7f2c85..274fa20c 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,17 @@ An introduction to Magma Core and the [HQDM Java object library](https://github. ## Setup -- To run Magma Core, run `mvn compile exec:java -Dexec.mainClass="uk.gov.gchq.magmacore.MagmaCore"`. This will execute the selected example method from the demo package. Alternatively, if you are using an IDE, you should be able to run the main method in MagmaCore.java from the editor. -- To select which example to run, change the FusekiService.run() call in MagmaCore.java to the desired demo class in magmacore/demo. Each of these demos have slightly different behaviours, which are described in the code. -- By default, this is set to the Fuseki server example, which will build and populate a Jena dataset hosted on a Fuseki server accessible at `localhost:3330/tdb` +- To run Magma Core, run `mvn compile exec:java -Dexec.mainClass="uk.gov.gchq.magmacore.MagmaCore"`. This will execute the fuseki example from the `demo` package. It will populate the database with example data if it is empty. The Fuseki server is accessible at `localhost:3330/tdb` - The dataset can then be queried via a web browser by going to `http://localhost:3330/tdb/sparql?query=SELECT ?s ?p ?o WHERE {?s ?p ?o.}` - This can also be done via curl on the command line using: `curl -X POST -d "query=select ?s ?p ?o where { ?s ?p ?o . }" localhost:3330/tdb/query` +- You can also run the examples using `mvn compile exec:java -Dexec.mainClass="uk.gov.gchq.magmacore.MagmaCore" -Dexec.args=XXX` where XXX is one of: + - `fuseki` - same as no arguments except this does not populate the database with example data. + - `fuseki-populate` - same as no arguments. + - `remote` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. + - `remote-populate` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. It will populate the database with example data. + - `jena` - executes the Apache Jena database demo. + - `object` - executes the object database demo. +- Alternatively, if you are using an IDE, you should be able to run the main method in MagmaCore.java from the editor. ## Contributing From 671d0b7d5dc97dd3cc5f20407a9041a24e8232fa Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 27 May 2022 16:33:25 +0100 Subject: [PATCH 06/91] Update to remove dependency on HQDM *Impl classes --- .gitignore | 2 +- pom.xml | 4 +- src/main/java/module-info.java | 11 + .../database/MagmaCoreJenaDatabase.java | 2 +- .../MagmaCoreRemoteSparqlDatabase.java | 2 +- .../magmacore/demo/ExampleDataObjects.java | 268 +++++++++--------- .../gchq/magmacore/util/DataObjectUtils.java | 22 -- 7 files changed, 143 insertions(+), 168 deletions(-) create mode 100644 src/main/java/module-info.java diff --git a/.gitignore b/.gitignore index de166f32..59b49979 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,4 @@ hs_err_pid* *.swp tags - +.vim/ diff --git a/pom.xml b/pom.xml index 8722e5b1..7b3c3aed 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ uk.gov.gchq.hqdm hqdm - 1.0 + 1.1-SNAPSHOT @@ -137,7 +137,7 @@ maven-surefire-plugin - 3.0.0-M1 + 3.0.0-M6 maven-jar-plugin diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 00000000..1a0d5b00 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,11 @@ + +module MagmaCore.service.main { + requires HQDM.model.main; + requires org.apache.jena.arq; + requires org.apache.jena.core; + requires org.apache.jena.fuseki.main; + requires org.apache.jena.fuseki.core; + requires org.apache.jena.rdfconnection; + requires org.apache.jena.tdb2; + requires com.fasterxml.jackson.annotation; +} diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index bf1f6d1e..62e31065 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -22,7 +22,6 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.jena.atlas.lib.Pair; import org.apache.jena.query.Dataset; import org.apache.jena.query.Query; import org.apache.jena.query.QueryExecution; @@ -49,6 +48,7 @@ import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.pojo.HqdmObjectFactory; +import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 91674302..f7d9c2c0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -22,7 +22,6 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.jena.atlas.lib.Pair; import org.apache.jena.query.Dataset; import org.apache.jena.query.QueryExecution; import org.apache.jena.query.QuerySolution; @@ -44,6 +43,7 @@ import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.pojo.HqdmObjectFactory; +import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 0cb8cc41..6a84e8fc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -15,9 +15,9 @@ package uk.gov.gchq.magmacore.demo; import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; +import static uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices.event; import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.event; import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; import java.util.ArrayList; @@ -29,6 +29,7 @@ import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Resource; +import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Association; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; @@ -47,21 +48,8 @@ import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.model.impl.AssociationImpl; -import uk.gov.gchq.hqdm.model.impl.ClassOfStateOfFunctionalSystemImpl; -import uk.gov.gchq.hqdm.model.impl.ClassOfStateOfPersonImpl; -import uk.gov.gchq.hqdm.model.impl.FunctionalSystemImpl; -import uk.gov.gchq.hqdm.model.impl.KindOfAssociationImpl; -import uk.gov.gchq.hqdm.model.impl.KindOfBiologicalSystemComponentImpl; -import uk.gov.gchq.hqdm.model.impl.KindOfFunctionalSystemComponentImpl; -import uk.gov.gchq.hqdm.model.impl.KindOfFunctionalSystemImpl; -import uk.gov.gchq.hqdm.model.impl.KindOfPersonImpl; -import uk.gov.gchq.hqdm.model.impl.ParticipantImpl; -import uk.gov.gchq.hqdm.model.impl.PersonImpl; -import uk.gov.gchq.hqdm.model.impl.PossibleWorldImpl; -import uk.gov.gchq.hqdm.model.impl.RoleImpl; -import uk.gov.gchq.hqdm.model.impl.StateOfFunctionalSystemImpl; -import uk.gov.gchq.hqdm.model.impl.StateOfPersonImpl; +import uk.gov.gchq.hqdm.services.ClassServices; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; /** * Constructs a set of example HQDM objects for demonstrating Magma Core. @@ -100,52 +88,51 @@ public static List createDataObjects() { // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final uk.gov.gchq.hqdm.model.Class viewable = - new uk.gov.gchq.hqdm.model.impl.ClassImpl.Builder( - new IRI(REF_BASE, uid())).build(); + final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid())); viewable.addStringValue(ENTITY_NAME, "VIEWABLE"); objects.add(viewable); // A sub-set of the Viewable class. - final uk.gov.gchq.hqdm.model.Class viewableObject = - new uk.gov.gchq.hqdm.model.impl.ClassImpl.Builder( - new IRI(REF_BASE, uid())).has_Superclass(viewable).build(); + final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid())); + viewableObject.addValue(HQDM.HAS_SUPERCLASS, viewable.getIri()); viewableObject.addStringValue(ENTITY_NAME, "VIEWABLE_OBJECT"); objects.add(viewableObject); // A sub-set of the Viewable Class for viewable Associations. final uk.gov.gchq.hqdm.model.Class viewableAssociation = - new uk.gov.gchq.hqdm.model.impl.ClassImpl.Builder( - new IRI(REF_BASE, uid())).has_Superclass(viewable).build(); + ClassServices.createClass(new IRI(REF_BASE, uid())); + viewableAssociation.addValue(HQDM.HAS_SUPERCLASS, viewable.getIri()); viewableAssociation.addStringValue(ENTITY_NAME, "VIEWABLE_ASSOCIATION"); objects.add(viewableAssociation); // An system is composed of components so this is the class of components that a whole-life // person can have. final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = - new KindOfBiologicalSystemComponentImpl.Builder( - new IRI(REF_BASE, uid())).build(); + ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid())); + kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME, "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); objects.add(kindOfBiologicalSystemHumanComponent); // A class of whole-life person (re-)created as Reference Data. - final KindOfPerson kindOfPerson = new KindOfPersonImpl.Builder(new IRI(REF_BASE, uid())) - .member__Of(viewableObject) - .has_Component_By_Class_M(kindOfBiologicalSystemHumanComponent).build(); + final KindOfPerson kindOfPerson = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid())); + + kindOfPerson.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); + kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS, kindOfBiologicalSystemHumanComponent.getIri()); kindOfPerson.addStringValue(ENTITY_NAME, "KIND_OF_PERSON"); objects.add(kindOfPerson); // A class of temporal part (state) of a (whole-life) person. - final ClassOfStateOfPerson classOfStateOfPerson = new ClassOfStateOfPersonImpl.Builder( - new IRI(REF_BASE, uid())).member__Of(viewableObject).build(); + final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid())); + + classOfStateOfPerson.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); classOfStateOfPerson.addStringValue(ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"); objects.add(classOfStateOfPerson); // A class of whole-life system that is a Building. final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = - new KindOfFunctionalSystemImpl( - new IRI(REF_BASE, uid())); + ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid())); + kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); objects.add(kindOfFunctionalSystemBuilding); @@ -153,48 +140,45 @@ public static List createDataObjects() { // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = - new KindOfFunctionalSystemComponentImpl.Builder( - new IRI(REF_BASE, uid())).build(); + ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid())); + kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); objects.add(kindOfFunctionalSystemDomesticPropertyComponent); // The class of whole-life system that is domestic property. final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - new KindOfFunctionalSystemImpl.Builder( - new IRI(REF_BASE, uid())) - .has_Superclass(kindOfFunctionalSystemBuilding) - .member__Of(viewableObject) - .has_Component_By_Class_M( - kindOfFunctionalSystemDomesticPropertyComponent) - .build(); + ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid())); + + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticPropertyComponent.getIri()); kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(kindOfFunctionalSystemDomesticProperty); // The class of state of system whose members are temporal parts of domestic properties. final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - new ClassOfStateOfFunctionalSystemImpl.Builder( - new IRI(REF_BASE, uid())) - .member__Of(viewableObject) - .build(); + ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid())); + + classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(classOfStateOfFunctionalSystemDomesticProperty); // The class of role that every member of class of person plays. - final Role personRole = new RoleImpl.Builder(new IRI(REF_BASE, uid())).build(); + final Role personRole = ClassServices.createRole(new IRI(REF_BASE, uid())); personRole.addStringValue(ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); objects.add(personRole); // The class of role that every member of class of domestic property plays. - final Role domesticPropertyRole = new RoleImpl.Builder(new IRI(REF_BASE, uid())).build(); + final Role domesticPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); domesticPropertyRole.addStringValue(ENTITY_NAME, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); objects.add(domesticPropertyRole); - final Role domesticOccupantInPropertyRole = new RoleImpl.Builder(new IRI(REF_BASE, uid())) - .has_Superclass(domesticPropertyRole).build(); + final Role domesticOccupantInPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); + domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. @@ -202,8 +186,8 @@ public static List createDataObjects() { "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); objects.add(domesticOccupantInPropertyRole); - final Role occupierOfPropertyRole = new RoleImpl.Builder(new IRI(REF_BASE, uid())) - .has_Superclass(classOfStateOfPerson).build(); + final Role occupierOfPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); + occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after @@ -214,11 +198,11 @@ public static List createDataObjects() { // Add the Association Types (Participants and Associations). final KindOfAssociation occupantInPropertyKindOfAssociation = - new KindOfAssociationImpl.Builder( - new IRI(REF_BASE, uid())) - .member__Of(viewableAssociation) - .consists_Of_By_Class(domesticOccupantInPropertyRole) - .consists_Of_By_Class(occupierOfPropertyRole).build(); + ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid())); + + occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF, viewableAssociation.getIri()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS, domesticOccupantInPropertyRole.getIri()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS, occupierOfPropertyRole.getIri()); occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); @@ -227,18 +211,18 @@ public static List createDataObjects() { // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorld possibleWorld = new PossibleWorldImpl(new IRI(USER_BASE, uid())); + final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid())); possibleWorld.addStringValue(ENTITY_NAME, "Example1_World"); objects.add(possibleWorld); // Person B Whole Life Object. final Event e1 = event("1991-02-18T00:00:00", possibleWorld, USER_BASE); - final Person personB1 = new PersonImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind(kindOfPerson) - .natural_Role_M(personRole) - .part_Of_Possible_World_M(possibleWorld) - .beginning(e1) - .build(); + final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid())); + + personB1.addValue(HQDM.MEMBER_OF_KIND, kindOfPerson.getIri()); + personB1.addValue(HQDM.NATURAL_ROLE, personRole.getIri()); + personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + personB1.addValue(HQDM.BEGINNING, e1.getIri()); personB1.addStringValue(ENTITY_NAME, "PersonB1_Bob"); objects.add(e1); objects.add(personB1); @@ -246,129 +230,131 @@ public static List createDataObjects() { // Person B states. final Event e2 = event("2020-08-15T17:50:00", possibleWorld, USER_BASE); final Event e3 = event("2020-08-15T19:21:00", possibleWorld, USER_BASE); - final StateOfPerson personBs1 = new StateOfPersonImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of(classOfStateOfPerson) - .part_Of_Possible_World_M(possibleWorld) - .temporal_Part_Of(personB1) - .beginning(e2) - .ending(e3) - .build(); + final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid())); + + personBs1.addValue(HQDM.MEMBER_OF, classOfStateOfPerson.getIri()); + personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + personBs1.addValue(HQDM.TEMPORAL_PART_OF, personB1.getIri()); + personBs1.addValue(HQDM.BEGINNING, e2.getIri()); + personBs1.addValue(HQDM.ENDING, e3.getIri()); objects.add(e2); objects.add(e3); objects.add(personBs1); final Event e4 = event("2020-08-16T22:33:00", possibleWorld, USER_BASE); final Event e5 = event("2020-08-17T10:46:00", possibleWorld, USER_BASE); - final StateOfPerson personBs2 = new StateOfPersonImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of(classOfStateOfPerson) - .part_Of_Possible_World_M(possibleWorld) - .temporal_Part_Of(personB1) - .beginning(e4) - .ending(e5) - .build(); + final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid())); + + personBs2.addValue(HQDM.MEMBER_OF, classOfStateOfPerson.getIri()); + personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + personBs2.addValue(HQDM.TEMPORAL_PART_OF, personB1.getIri()); + personBs2.addValue(HQDM.BEGINNING, e4.getIri()); + personBs2.addValue(HQDM.ENDING, e5.getIri()); objects.add(e4); objects.add(e5); objects.add(personBs2); // House B Whole Life Object. final Event e6 = event("1972-06-01T00:00:00", possibleWorld, USER_BASE); - final FunctionalSystem houseB = new FunctionalSystemImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind(kindOfFunctionalSystemDomesticProperty) - .part_Of_Possible_World_M(possibleWorld) - .intended_Role_M(domesticPropertyRole) - .beginning(e6) - .build(); + final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid())); + + houseB.addValue(HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getIri()); + houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + houseB.addValue(HQDM.INTENDED_ROLE, domesticPropertyRole.getIri()); + houseB.addValue(HQDM.BEGINNING, e6.getIri()); objects.add(e6); objects.add(houseB); // States of house when Occupant personBs1 is present. - final StateOfFunctionalSystem houseBs1 = new StateOfFunctionalSystemImpl.Builder( - new IRI(USER_BASE, uid())).member_Of(classOfStateOfFunctionalSystemDomesticProperty) - .temporal_Part_Of(houseB) - .part_Of_Possible_World_M(possibleWorld) - .beginning(e2) - .ending(e3) - .build(); + final StateOfFunctionalSystem houseBs1 = SpatioTemporalExtentServices.createStateOfFunctionalSystem( + new IRI(USER_BASE, uid())); + + houseBs1.addValue(HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getIri()); + houseBs1.addValue(HQDM.TEMPORAL_PART_OF, houseB.getIri()); + houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + houseBs1.addValue(HQDM.BEGINNING, e2.getIri()); + houseBs1.addValue(HQDM.ENDING, e3.getIri()); objects.add(houseBs1); - final StateOfFunctionalSystem houseBs2 = new StateOfFunctionalSystemImpl.Builder( - new IRI(USER_BASE, uid())).member_Of(classOfStateOfFunctionalSystemDomesticProperty) - .temporal_Part_Of(houseB) - .part_Of_Possible_World_M(possibleWorld) - .beginning(e4) - .ending(e5) - .build(); + final StateOfFunctionalSystem houseBs2 = SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, uid())); + + houseBs2.addValue(HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getIri()); + houseBs2.addValue(HQDM.TEMPORAL_PART_OF, houseB.getIri()); + houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + houseBs2.addValue(HQDM.BEGINNING, e4.getIri()); + houseBs2.addValue(HQDM.ENDING, e5.getIri()); objects.add(houseBs2); // Add the Associations and map the states above to the appropriate participant objects. // If we had full has_superClass resolving in HQDM classes then this participant object // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of // state_of_person (see issues list). - final Participant pPersonBs1 = new ParticipantImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(occupierOfPropertyRole) - .part_Of_Possible_World_M(possibleWorld) - .temporal__Part_Of(personBs1) - .beginning(e2) - .ending(e3) - .build(); + final Participant pPersonBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + + pPersonBs1.addValue(HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getIri()); + pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF, personBs1.getIri()); + pPersonBs1.addValue(HQDM.BEGINNING, e2.getIri()); + pPersonBs1.addValue(HQDM.ENDING, e3.getIri()); pPersonBs1.addStringValue(ENTITY_NAME, "Note this is the state of person Bs1 that is participating the association"); objects.add(pPersonBs1); - final Participant pHouseBs1 = new ParticipantImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(domesticOccupantInPropertyRole) - .part_Of_Possible_World_M(possibleWorld) - .temporal__Part_Of(houseBs1) - .beginning(e2) - .ending(e3).build(); + final Participant pHouseBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + + pHouseBs1.addValue(HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getIri()); + pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF, houseBs1.getIri()); + pHouseBs1.addValue(HQDM.BEGINNING, e2.getIri()); + pHouseBs1.addValue(HQDM.ENDING, e3.getIri()); pHouseBs1.addStringValue(ENTITY_NAME, "Note this is the state of houseBs1 that is participating in the association"); objects.add(pHouseBs1); - final Participant pPersonBs2 = new ParticipantImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(occupierOfPropertyRole) - .part_Of_Possible_World_M(possibleWorld) - .temporal__Part_Of(personBs2) - .beginning(e4) - .ending(e5) - .build(); + final Participant pPersonBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + + pPersonBs2.addValue(HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getIri()); + pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF, personBs2.getIri()); + pPersonBs2.addValue(HQDM.BEGINNING, e4.getIri()); + pPersonBs2.addValue(HQDM.ENDING, e5.getIri()); pPersonBs2.addStringValue(ENTITY_NAME, "Note this is the state of person Bs2 that is participating in the association"); objects.add(pPersonBs2); - final Participant pHouseBs2 = new ParticipantImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(domesticOccupantInPropertyRole) - .part_Of_Possible_World_M(possibleWorld) - .temporal__Part_Of(houseBs2) - .beginning(e4) - .ending(e5) - .build(); + final Participant pHouseBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + + pHouseBs2.addValue(HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getIri()); + pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF, houseBs2.getIri()); + pHouseBs2.addValue(HQDM.BEGINNING, e4.getIri()); + pHouseBs2.addValue(HQDM.ENDING, e5.getIri()); pHouseBs2.addStringValue(ENTITY_NAME, "Note this is the state of houseBs2 that is participating in the association"); objects.add(pHouseBs2); final Association houseOccupantPresentState1 = - new AssociationImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(occupantInPropertyKindOfAssociation) - .consists_Of_Participant(pHouseBs1) - .consists_Of_Participant(pPersonBs1) - .part_Of_Possible_World_M(possibleWorld) - .beginning(e2) - .ending(e3) - .build(); + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid())); + + houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getIri()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pHouseBs1.getIri()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pPersonBs1.getIri()); + houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + houseOccupantPresentState1.addValue(HQDM.BEGINNING, e2.getIri()); + houseOccupantPresentState1.addValue(HQDM.ENDING, e3.getIri()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. houseOccupantPresentState1.addStringValue(ENTITY_NAME, "HouseOccupantPresent1"); objects.add(houseOccupantPresentState1); final Association houseOccupantPresentState2 = - new AssociationImpl.Builder(new IRI(USER_BASE, uid())) - .member_Of_Kind_M(occupantInPropertyKindOfAssociation) - .consists_Of_Participant(pHouseBs2) - .consists_Of_Participant(pPersonBs2) - .part_Of_Possible_World_M(possibleWorld) - .beginning(e4) - .ending(e5) - .build(); + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid())); + + houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getIri()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pHouseBs2.getIri()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pPersonBs2.getIri()); + houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); + houseOccupantPresentState2.addValue(HQDM.BEGINNING, e4.getIri()); + houseOccupantPresentState2.addValue(HQDM.ENDING, e5.getIri()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. houseOccupantPresentState2.addStringValue(ENTITY_NAME, "HouseOccupantPresent2"); objects.add(houseOccupantPresentState2); diff --git a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java index 729d9266..a300d8a3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java @@ -17,12 +17,7 @@ import java.time.LocalDateTime; import java.util.UUID; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.iri.IriBase; -import uk.gov.gchq.hqdm.model.PointInTime; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.model.impl.PointInTimeImpl; /** * Utilities for building and generating HQDM objects. @@ -58,21 +53,4 @@ public static String timeNow() { return now.toString(); } - /** - * Generate a new PointInTime. - * - * @param eventTime Entity name of the point in time. - * @param pw The PossibleWorld the PointInTime is a part of. - * @param baseIri IriBase of the PointInTime. - * @return The generated PointInTime. - */ - public static PointInTime event(final String eventTime, final PossibleWorld pw, - final IriBase baseIri) { - final PointInTime timeEvent = new PointInTimeImpl.Builder(new IRI(baseIri, uid())) - .part_Of_Possible_World_M(pw) - .build(); - timeEvent.addStringValue(HQDM.ENTITY_NAME, eventTime); - - return timeEvent; - } } From bb3de6a9dd071ec124911b9fe6ac7a8f4f15cda6 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 28 May 2022 17:48:44 +0100 Subject: [PATCH 07/91] Fix compilation errors for new HQDM-RDF dependency --- pom.xml | 4 + src/main/java/module-info.java | 1 + .../database/MagmaCoreJenaDatabase.java | 8 +- .../database/MagmaCoreObjectDatabase.java | 18 +- .../MagmaCoreRemoteSparqlDatabase.java | 8 +- .../magmacore/demo/ExampleDataObjects.java | 284 +++++++++--------- 6 files changed, 170 insertions(+), 153 deletions(-) diff --git a/pom.xml b/pom.xml index 7b3c3aed..77060eb6 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,10 @@ junit 4.13.1 test + + uk.gov.gchq.hqdm + hqdm-rdf + 1.0 commons-cli diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 1a0d5b00..f09a2210 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,6 +1,7 @@ module MagmaCore.service.main { requires HQDM.model.main; + requires HQDM.rdf.main; requires org.apache.jena.arq; requires org.apache.jena.core; requires org.apache.jena.fuseki.main; diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 62e31065..d3228afc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -47,7 +47,9 @@ import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObjectFactory; +import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; @@ -161,7 +163,7 @@ public Thing get(final IRI iri) { @Override public void create(final Thing object) { final Resource resource = - dataset.getDefaultModel().createResource(object.getIri().toString()); + dataset.getDefaultModel().createResource(object.getId()); object.getPredicates() .forEach((iri, @@ -184,7 +186,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", object.toTriples())); + executeUpdate(String.format("delete data {%s}", Triples.toTriples((HqdmObject) object))); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java index 3b5706b2..d120119a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java @@ -23,6 +23,8 @@ import uk.gov.gchq.hqdm.iri.HqdmIri; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.hqdm.rdf.Triples; /** * In-memory collection of HQDM objects. @@ -51,7 +53,7 @@ public Thing get(final IRI iri) { */ @Override public void create(final Thing object) { - final IRI iri = object.getIri(); + final IRI iri = new IRI(object.getId()); if (!objects.keySet().contains(iri)) { objects.put(iri, object); } @@ -62,7 +64,7 @@ public void create(final Thing object) { */ @Override public void update(final Thing object) { - final IRI iri = object.getIri(); + final IRI iri = new IRI(object.getId()); if (objects.keySet().contains(iri)) { objects.put(iri, object); } @@ -73,7 +75,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - final IRI iri = object.getIri(); + final IRI iri = new IRI(object.getId()); if (objects.keySet().contains(iri)) { objects.remove(iri, object); } @@ -85,7 +87,7 @@ public void delete(final Thing object) { @Override public List findByPredicateIri(final IRI predicateIri, final IRI objectIri) { return objects.values().stream() - .filter(object -> object.hasThisValue(predicateIri, objectIri)) + .filter(object -> object.hasThisValue(predicateIri.toString(), objectIri.toString())) .collect(Collectors.toList()); } @@ -95,7 +97,7 @@ public List findByPredicateIri(final IRI predicateIri, final IRI objectIr @Override public List findByPredicateIriOnly(final HqdmIri predicateIri) { return objects.values().stream() - .filter(object -> object.hasValue(predicateIri)) + .filter(object -> object.hasValue(predicateIri.toString())) .collect(Collectors.toList()); } @@ -106,7 +108,7 @@ public List findByPredicateIriOnly(final HqdmIri predicateIri) { public List findByPredicateIriAndStringValue(final IRI predicateIri, final String value) { return objects.values().stream() - .filter(object -> object.hasThisStringValue(predicateIri, value)) + .filter(object -> object.hasThisStringValue(predicateIri.toString(), value)) .collect(Collectors.toList()); } @@ -117,7 +119,7 @@ public List findByPredicateIriAndStringValue(final IRI predicateIri, public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, final String value) { return objects.values().stream() - .filter(object -> object.hasThisStringValueIgnoreCase(predicateIri, value)) + .filter(object -> object.hasThisStringValueIgnoreCase(predicateIri.toString(), value)) .collect(Collectors.toList()); } @@ -135,6 +137,6 @@ public void dump(final PrintStream out) { * @param out Output stream to dump data to. */ public final void dumpTurtle(final PrintStream out) { - objects.values().forEach(object -> out.println(object.toTriples())); + objects.values().forEach(object -> out.println(Triples.toTriples((HqdmObject) object))); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index f7d9c2c0..c8cf6379 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -42,7 +42,9 @@ import uk.gov.gchq.hqdm.iri.HqdmIri; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObjectFactory; +import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; @@ -116,7 +118,7 @@ public void create(final Thing object) { final Model model = ModelFactory.createDefaultModel(); final Resource resource = - model.createResource(object.getIri().toString()); + model.createResource(object.getId()); object.getPredicates() .forEach((iri, @@ -141,7 +143,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", object.toTriples())); + executeUpdate(String.format("delete data {%s}", Triples.toTriples((HqdmObject) object))); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 6a84e8fc..ff700941 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -67,7 +67,7 @@ public static final Dataset buildDataset() { final Model model = ModelFactory.createDefaultModel(); createDataObjects().forEach(object -> { - final Resource resource = model.createResource(object.getIri().toString()); + final Resource resource = model.createResource(object.getId()); object.getPredicates() .forEach((iri, predicates) -> predicates.forEach(predicate -> resource .addProperty(model.createProperty(iri.toString()), @@ -88,122 +88,122 @@ public static List createDataObjects() { // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid())); - viewable.addStringValue(ENTITY_NAME, "VIEWABLE"); + final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); + viewable.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE"); objects.add(viewable); // A sub-set of the Viewable class. - final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid())); - viewableObject.addValue(HQDM.HAS_SUPERCLASS, viewable.getIri()); - viewableObject.addStringValue(ENTITY_NAME, "VIEWABLE_OBJECT"); + final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); + viewableObject.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); + viewableObject.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE_OBJECT"); objects.add(viewableObject); // A sub-set of the Viewable Class for viewable Associations. final uk.gov.gchq.hqdm.model.Class viewableAssociation = - ClassServices.createClass(new IRI(REF_BASE, uid())); - viewableAssociation.addValue(HQDM.HAS_SUPERCLASS, viewable.getIri()); - viewableAssociation.addStringValue(ENTITY_NAME, "VIEWABLE_ASSOCIATION"); + ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); + viewableAssociation.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); + viewableAssociation.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE_ASSOCIATION"); objects.add(viewableAssociation); // An system is composed of components so this is the class of components that a whole-life // person can have. final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = - ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid())); + ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME, + kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.toString().toString(), "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); objects.add(kindOfBiologicalSystemHumanComponent); // A class of whole-life person (re-)created as Reference Data. - final KindOfPerson kindOfPerson = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid())); + final KindOfPerson kindOfPerson = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid()).toString()); - kindOfPerson.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); - kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS, kindOfBiologicalSystemHumanComponent.getIri()); - kindOfPerson.addStringValue(ENTITY_NAME, "KIND_OF_PERSON"); + kindOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); + kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS.toString(), kindOfBiologicalSystemHumanComponent.getId()); + kindOfPerson.addStringValue(ENTITY_NAME.toString().toString(), "KIND_OF_PERSON"); objects.add(kindOfPerson); // A class of temporal part (state) of a (whole-life) person. - final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid())); + final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).toString()); - classOfStateOfPerson.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); - classOfStateOfPerson.addStringValue(ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"); + classOfStateOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); + classOfStateOfPerson.addStringValue(ENTITY_NAME.toString().toString(), "CLASS_OF_STATE_OF_PERSON"); objects.add(classOfStateOfPerson); // A class of whole-life system that is a Building. final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = - ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid())); + ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME, + kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.toString().toString(), "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); objects.add(kindOfFunctionalSystemBuilding); // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = - ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid())); + ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME, + kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.toString().toString(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); objects.add(kindOfFunctionalSystemDomesticPropertyComponent); // The class of whole-life system that is domestic property. final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid())); + ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticPropertyComponent.getIri()); - kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME, + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS.toString(), kindOfFunctionalSystemBuilding.getId()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS.toString(), kindOfFunctionalSystemDomesticPropertyComponent.getId()); + kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.toString(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(kindOfFunctionalSystemDomesticProperty); // The class of state of system whose members are temporal parts of domestic properties. final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid())); + ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF, viewableObject.getIri()); - classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME, + classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); + classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.toString(), "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(classOfStateOfFunctionalSystemDomesticProperty); // The class of role that every member of class of person plays. - final Role personRole = ClassServices.createRole(new IRI(REF_BASE, uid())); - personRole.addStringValue(ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final Role personRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); + personRole.addStringValue(ENTITY_NAME.toString(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); objects.add(personRole); // The class of role that every member of class of domestic property plays. - final Role domesticPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); - domesticPropertyRole.addStringValue(ENTITY_NAME, + final Role domesticPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); + domesticPropertyRole.addStringValue(ENTITY_NAME.toString(), "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); objects.add(domesticPropertyRole); - final Role domesticOccupantInPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); - domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()); + final Role domesticOccupantInPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); + domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS.toString(), domesticPropertyRole.getId()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - domesticOccupantInPropertyRole.addStringValue(ENTITY_NAME, + domesticOccupantInPropertyRole.addStringValue(ENTITY_NAME.toString(), "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); objects.add(domesticOccupantInPropertyRole); - final Role occupierOfPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid())); - occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()); + final Role occupierOfPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); + occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS.toString(), classOfStateOfPerson.getId()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - occupierOfPropertyRole.addStringValue(ENTITY_NAME, + occupierOfPropertyRole.addStringValue(ENTITY_NAME.toString(), "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); objects.add(occupierOfPropertyRole); // Add the Association Types (Participants and Associations). final KindOfAssociation occupantInPropertyKindOfAssociation = - ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid())); + ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid()).toString()); - occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF, viewableAssociation.getIri()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS, domesticOccupantInPropertyRole.getIri()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS, occupierOfPropertyRole.getIri()); - occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME, + occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF.toString(), viewableAssociation.getId()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.toString(), domesticOccupantInPropertyRole.getId()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.toString(), occupierOfPropertyRole.getId()); + occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME.toString(), "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // STATES @@ -211,152 +211,158 @@ public static List createDataObjects() { // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid())); - possibleWorld.addStringValue(ENTITY_NAME, "Example1_World"); + final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid()).toString()); + possibleWorld.addStringValue(ENTITY_NAME.toString(), "Example1_World"); objects.add(possibleWorld); // Person B Whole Life Object. - final Event e1 = event("1991-02-18T00:00:00", possibleWorld, USER_BASE); - final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid())); - - personB1.addValue(HQDM.MEMBER_OF_KIND, kindOfPerson.getIri()); - personB1.addValue(HQDM.NATURAL_ROLE, personRole.getIri()); - personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - personB1.addValue(HQDM.BEGINNING, e1.getIri()); - personB1.addStringValue(ENTITY_NAME, "PersonB1_Bob"); + final Event e1 = event(new IRI(USER_BASE, "1991-02-18T00:00:00").toString()); + e1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid()).toString()); + + personB1.addValue(HQDM.MEMBER_OF_KIND.toString(), kindOfPerson.getId()); + personB1.addValue(HQDM.NATURAL_ROLE.toString(), personRole.getId()); + personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + personB1.addValue(HQDM.BEGINNING.toString(), e1.getId()); + personB1.addStringValue(ENTITY_NAME.toString(), "PersonB1_Bob"); objects.add(e1); objects.add(personB1); // Person B states. - final Event e2 = event("2020-08-15T17:50:00", possibleWorld, USER_BASE); - final Event e3 = event("2020-08-15T19:21:00", possibleWorld, USER_BASE); - final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid())); - - personBs1.addValue(HQDM.MEMBER_OF, classOfStateOfPerson.getIri()); - personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - personBs1.addValue(HQDM.TEMPORAL_PART_OF, personB1.getIri()); - personBs1.addValue(HQDM.BEGINNING, e2.getIri()); - personBs1.addValue(HQDM.ENDING, e3.getIri()); + final Event e2 = event(new IRI(USER_BASE, "2020-08-15T17:50:00").toString()); + e2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final Event e3 = event(new IRI(USER_BASE, "2020-08-15T19:21:00").toString()); + e3.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); + + personBs1.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfPerson.getId()); + personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + personBs1.addValue(HQDM.TEMPORAL_PART_OF.toString(), personB1.getId()); + personBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); + personBs1.addValue(HQDM.ENDING.toString(), e3.getId()); objects.add(e2); objects.add(e3); objects.add(personBs1); - final Event e4 = event("2020-08-16T22:33:00", possibleWorld, USER_BASE); - final Event e5 = event("2020-08-17T10:46:00", possibleWorld, USER_BASE); - final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid())); - - personBs2.addValue(HQDM.MEMBER_OF, classOfStateOfPerson.getIri()); - personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - personBs2.addValue(HQDM.TEMPORAL_PART_OF, personB1.getIri()); - personBs2.addValue(HQDM.BEGINNING, e4.getIri()); - personBs2.addValue(HQDM.ENDING, e5.getIri()); + final Event e4 = event(new IRI(USER_BASE, "2020-08-16T22:33:00").toString()); + e4.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final Event e5 = event(new IRI(USER_BASE, "2020-08-17T10:46:00").toString()); + e5.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); + + personBs2.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfPerson.getId()); + personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + personBs2.addValue(HQDM.TEMPORAL_PART_OF.toString(), personB1.getId()); + personBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); + personBs2.addValue(HQDM.ENDING.toString(), e5.getId()); objects.add(e4); objects.add(e5); objects.add(personBs2); // House B Whole Life Object. - final Event e6 = event("1972-06-01T00:00:00", possibleWorld, USER_BASE); - final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid())); - - houseB.addValue(HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getIri()); - houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - houseB.addValue(HQDM.INTENDED_ROLE, domesticPropertyRole.getIri()); - houseB.addValue(HQDM.BEGINNING, e6.getIri()); + final Event e6 = event(new IRI(USER_BASE, "1972-06-01T00:00:00").toString()); + e6.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid()).toString()); + + houseB.addValue(HQDM.MEMBER_OF_KIND.toString(), kindOfFunctionalSystemDomesticProperty.getId()); + houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + houseB.addValue(HQDM.INTENDED_ROLE.toString(), domesticPropertyRole.getId()); + houseB.addValue(HQDM.BEGINNING.toString(), e6.getId()); objects.add(e6); objects.add(houseB); // States of house when Occupant personBs1 is present. final StateOfFunctionalSystem houseBs1 = SpatioTemporalExtentServices.createStateOfFunctionalSystem( - new IRI(USER_BASE, uid())); + new IRI(USER_BASE, uid()).toString()); - houseBs1.addValue(HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getIri()); - houseBs1.addValue(HQDM.TEMPORAL_PART_OF, houseB.getIri()); - houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - houseBs1.addValue(HQDM.BEGINNING, e2.getIri()); - houseBs1.addValue(HQDM.ENDING, e3.getIri()); + houseBs1.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfFunctionalSystemDomesticProperty.getId()); + houseBs1.addValue(HQDM.TEMPORAL_PART_OF.toString(), houseB.getId()); + houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + houseBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); + houseBs1.addValue(HQDM.ENDING.toString(), e3.getId()); objects.add(houseBs1); - final StateOfFunctionalSystem houseBs2 = SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, uid())); + final StateOfFunctionalSystem houseBs2 = SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, uid()).toString()); - houseBs2.addValue(HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getIri()); - houseBs2.addValue(HQDM.TEMPORAL_PART_OF, houseB.getIri()); - houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - houseBs2.addValue(HQDM.BEGINNING, e4.getIri()); - houseBs2.addValue(HQDM.ENDING, e5.getIri()); + houseBs2.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfFunctionalSystemDomesticProperty.getId()); + houseBs2.addValue(HQDM.TEMPORAL_PART_OF.toString(), houseB.getId()); + houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + houseBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); + houseBs2.addValue(HQDM.ENDING.toString(), e5.getId()); objects.add(houseBs2); // Add the Associations and map the states above to the appropriate participant objects. // If we had full has_superClass resolving in HQDM classes then this participant object // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of // state_of_person (see issues list). - final Participant pPersonBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); - - pPersonBs1.addValue(HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getIri()); - pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF, personBs1.getIri()); - pPersonBs1.addValue(HQDM.BEGINNING, e2.getIri()); - pPersonBs1.addValue(HQDM.ENDING, e3.getIri()); - pPersonBs1.addStringValue(ENTITY_NAME, + final Participant pPersonBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); + + pPersonBs1.addValue(HQDM.MEMBER_OF_KIND.toString(), occupierOfPropertyRole.getId()); + pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF.toString(), personBs1.getId()); + pPersonBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); + pPersonBs1.addValue(HQDM.ENDING.toString(), e3.getId()); + pPersonBs1.addStringValue(ENTITY_NAME.toString(), "Note this is the state of person Bs1 that is participating the association"); objects.add(pPersonBs1); - final Participant pHouseBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + final Participant pHouseBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pHouseBs1.addValue(HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getIri()); - pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF, houseBs1.getIri()); - pHouseBs1.addValue(HQDM.BEGINNING, e2.getIri()); - pHouseBs1.addValue(HQDM.ENDING, e3.getIri()); - pHouseBs1.addStringValue(ENTITY_NAME, + pHouseBs1.addValue(HQDM.MEMBER_OF_KIND.toString(), domesticOccupantInPropertyRole.getId()); + pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF.toString(), houseBs1.getId()); + pHouseBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); + pHouseBs1.addValue(HQDM.ENDING.toString(), e3.getId()); + pHouseBs1.addStringValue(ENTITY_NAME.toString(), "Note this is the state of houseBs1 that is participating in the association"); objects.add(pHouseBs1); - final Participant pPersonBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + final Participant pPersonBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pPersonBs2.addValue(HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getIri()); - pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF, personBs2.getIri()); - pPersonBs2.addValue(HQDM.BEGINNING, e4.getIri()); - pPersonBs2.addValue(HQDM.ENDING, e5.getIri()); - pPersonBs2.addStringValue(ENTITY_NAME, + pPersonBs2.addValue(HQDM.MEMBER_OF_KIND.toString(), occupierOfPropertyRole.getId()); + pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF.toString(), personBs2.getId()); + pPersonBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); + pPersonBs2.addValue(HQDM.ENDING.toString(), e5.getId()); + pPersonBs2.addStringValue(ENTITY_NAME.toString(), "Note this is the state of person Bs2 that is participating in the association"); objects.add(pPersonBs2); - final Participant pHouseBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid())); + final Participant pHouseBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pHouseBs2.addValue(HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getIri()); - pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF, houseBs2.getIri()); - pHouseBs2.addValue(HQDM.BEGINNING, e4.getIri()); - pHouseBs2.addValue(HQDM.ENDING, e5.getIri()); - pHouseBs2.addStringValue(ENTITY_NAME, + pHouseBs2.addValue(HQDM.MEMBER_OF_KIND.toString(), domesticOccupantInPropertyRole.getId()); + pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF.toString(), houseBs2.getId()); + pHouseBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); + pHouseBs2.addValue(HQDM.ENDING.toString(), e5.getId()); + pHouseBs2.addStringValue(ENTITY_NAME.toString(), "Note this is the state of houseBs2 that is participating in the association"); objects.add(pHouseBs2); final Association houseOccupantPresentState1 = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid())); - - houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getIri()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pHouseBs1.getIri()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pPersonBs1.getIri()); - houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - houseOccupantPresentState1.addValue(HQDM.BEGINNING, e2.getIri()); - houseOccupantPresentState1.addValue(HQDM.ENDING, e3.getIri()); + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); + + houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND.toString(), occupantInPropertyKindOfAssociation.getId()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pHouseBs1.getId()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pPersonBs1.getId()); + houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + houseOccupantPresentState1.addValue(HQDM.BEGINNING.toString(), e2.getId()); + houseOccupantPresentState1.addValue(HQDM.ENDING.toString(), e3.getId()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState1.addStringValue(ENTITY_NAME, "HouseOccupantPresent1"); + houseOccupantPresentState1.addStringValue(ENTITY_NAME.toString(), "HouseOccupantPresent1"); objects.add(houseOccupantPresentState1); final Association houseOccupantPresentState2 = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid())); - - houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getIri()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pHouseBs2.getIri()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT, pPersonBs2.getIri()); - houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()); - houseOccupantPresentState2.addValue(HQDM.BEGINNING, e4.getIri()); - houseOccupantPresentState2.addValue(HQDM.ENDING, e5.getIri()); + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); + + houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND.toString(), occupantInPropertyKindOfAssociation.getId()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pHouseBs2.getId()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pPersonBs2.getId()); + houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + houseOccupantPresentState2.addValue(HQDM.BEGINNING.toString(), e4.getId()); + houseOccupantPresentState2.addValue(HQDM.ENDING.toString(), e5.getId()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState2.addStringValue(ENTITY_NAME, "HouseOccupantPresent2"); + houseOccupantPresentState2.addStringValue(ENTITY_NAME.toString(), "HouseOccupantPresent2"); objects.add(houseOccupantPresentState2); return objects; From 2c0aa425a424de20ae1b257ff3026c0fa165a489 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 07:59:05 +0100 Subject: [PATCH 08/91] Don't depend on HqdmObject --- .../uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java | 3 +-- .../gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java | 3 +-- .../gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index d3228afc..ece8ec4a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -47,7 +47,6 @@ import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObject; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.util.Pair; @@ -186,7 +185,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", Triples.toTriples((HqdmObject) object))); + executeUpdate(String.format("delete data {%s}", Triples.toTriples(object))); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java index d120119a..9a285e91 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java @@ -23,7 +23,6 @@ import uk.gov.gchq.hqdm.iri.HqdmIri; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObject; import uk.gov.gchq.hqdm.rdf.Triples; /** @@ -137,6 +136,6 @@ public void dump(final PrintStream out) { * @param out Output stream to dump data to. */ public final void dumpTurtle(final PrintStream out) { - objects.values().forEach(object -> out.println(Triples.toTriples((HqdmObject) object))); + objects.values().forEach(object -> out.println(Triples.toTriples(object))); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index c8cf6379..25a7dea9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -42,7 +42,6 @@ import uk.gov.gchq.hqdm.iri.HqdmIri; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObject; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.util.Pair; @@ -143,7 +142,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", Triples.toTriples((HqdmObject) object))); + executeUpdate(String.format("delete data {%s}", Triples.toTriples(object))); } /** From e2b562f8be49b32e3e9942dade46671fb6bda15a Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 08:13:38 +0100 Subject: [PATCH 09/91] Update maven dependencies --- dependency-diagram.dot | 10 ++++++++++ dependency-diagram.png | Bin 0 -> 7887 bytes pom.xml | 8 ++------ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 dependency-diagram.dot create mode 100644 dependency-diagram.png diff --git a/dependency-diagram.dot b/dependency-diagram.dot new file mode 100644 index 00000000..b811b495 --- /dev/null +++ b/dependency-diagram.dot @@ -0,0 +1,10 @@ +digraph MagmaCore { + rankdir=LR + node[shape=rect,style="filled,rounded",color=black,fillcolor=white] + + mc[label="MagmaCore"] + hqdm[label="HQDM"] + rdf[label="HQDM-RDF"] + + mc -> rdf -> hqdm; +} diff --git a/dependency-diagram.png b/dependency-diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..86063199809e315481f362f92c6ac03c3172ab65 GIT binary patch literal 7887 zcmX|G1ymE<+aIV1NJt1sNtbj;hje$RlynM6gES&7Al)D(9fF8}2uOEHNk~YCf(rj< z?|05O&v9(KySw%L>PD-p%3))YVj>U-Yz28~O#}j^5dIcMM}z;TXEvPS3C%)DP8xBI z{Fm2Wnv6hDhABut*7nZY%l0!S+_>r$uP2s3w^E==Dom=dMGay8k%yj6XKz7hC#jy{ z6PH%=2}hooXvip|xgqUkn8z3|R`|_{zB_a*VGQ{tG3M?XVG>a>pZ5cUf?U0VsG1k8 zXAGV!RnPpbJrUsh1p?esssPx}Q4#dkE6vARp7KS$O|_wu|oJ zS@7kHtno+x`_B)Sdd!0U6<180`@D*crN)ouw4Y?sH!!GWE0t3>Fo+&V<0vdI$Bd1Q zbsX4ke3O~kJv~jNCU!vwt>;oL5AWh(-npZpuOC%j&T=}r>Ps1aTS-YtKtKR~90jX; zYxDCYHp|0@b_1zw>w9}Ds4s#Mu9=k0tKE?kb=Ct+;^G~`%~g6yxw&eqtE;^Jzg?#f zw9FQ6qN4ct`Awv<8NIEmOLEfUWU}JEPtV9WktO&{o({h@u-cFV@Tue8zx6RjaRzhll5Jx~0Lw&R+88*Fim7wVsxi zmXuz#X>q&XFHL!Q^z_WkoliV92kHXS2lvOX(Agt_f_kwSyr1cQ*@IcrK< zTCy>_jZw~Y--bI22S;hW&B%C(N+z<+XHKl>9t%ZP)#>ww4B^6}B05rD+q(w(`lFX; zyMjMX5;T|yU#F(Zs;a75IXWuCR+L6Wpfy>GdXSQm+Fl%QAm4=#k!>);L!1l(GBPqq z4Lbrwk$vPn4rO9yj&@S0q)Jh=`}&$0e(u(-TW8T}vSr$ej~_pV*DC4UGMU$vA9*yH z2np}qlfmj9{or%5HJmM+LG&eG3c9mhXmYZ$vs0j?q}0~c{nAtvDQjSG-^bfKp}3gd zX`v|=+RUbY9t#nEzK{HFlsU=EmoIm;I54)ix9RYs`=+K+xOsTyQcp(v2M6i&^z`tf zrC;adyz9^35iGpC^uRi%$KZSg&0fkh$Zwvx{!QTjSEQc5iqk)Y37 zQlVE}#}-*gfRB&g*Vh+?ii-O7>Sr)S(iJ-$*$hF7t3X{yIik6my_4*j_XHu}p z!3Mc}@T00(0%HN;a`>erNJna>1nX^77f#?tGN= z^mODN9(?@6zMy$3sj7;To{=#Qg)y6I;TjehnH(LBVQp>gnbP>o=5()l8NZv;c*Ynv zzosU^(b18KlQY4IS%?vy;MH4r(}|hfFd-p90>;(695~QKn60Uy@wlm}Y5m8KnF^!8 zd789={*jS*M<=JYouRGS`%_a>V{lMxmp=Hk>hAhJb#lAzzU_5S3W!SK#p zYS$R{=1`_wC>r*T&csJz4pU_>FE4Eqlc6TU(BjtCjGsS$+8%xH$+q5|y)Pptm;C;{ zU`lH0jwwZ?X*!oBS}ZAFx!xdma=+F3_wSN{fq{-nt6K~(vB{30pd@)ZN2M{0i;D}o zyXaddBjPqjFFTWA68>VjffpNTadiy`uK+^&CnsM|SDRIfdy@OEL4nW_Vr~y`bXXZF zHeVbMa40Ylj-Tz$z*zHdKr^+Hl9F~B&F;Z;p8mzf?97@xG$@g8i;H%fgXt937bS}l zWoG_Iw|@JJ5wRQ3nsP_J;BlPg{Qc*T<;*)1N2TpYaG=9FI>aNe$-XoZ;!xDMu1X$W z`1`|%;8UWWo*sD>l^)@P4~1>Bj_o87<~5FU+(jiN1uZQtiz0hMg;J3?oy*G)Ha9nY z@Ac)2hlGYErlf?|)p0i!+YV(5KX*OKx9C5OaSXse*0fb6@!zn_zbryG`H zr0F$fC=3DsEiox++}W4R#^d@bz{=X%d}p%Em$)}y+~42-(~lFkok?b7zhzpb@QTal z*s7`6b?dH~nHjV_+lty@RLl8Xq>%i?%IY(+&%{K$9G}hmSpseai>HrP1V^6Igc7D3>jJ%0E}6;o5n zU#})n`T3i1auuAi#`YGPQ4rU^d&N&HUP>LzE-X~++o-Ld?=56eoJ;=P+e68dTX3P3+m|KM_1otIJ`2he=P^e>FN>%Z^rYg zWIn>CNtCau!wOGI!lz?kkYq{uJ|_2|XF^RJ8y6S%TdU_C_xI#Ta$3MgLBxw3quV<; z%%$e@ot>T8FHj?ZJkY|!!>i5(g@i1=wYarBKcE~RAJ0=~(zf##d%*GG5LH=OS^E!i zX2`Z3e~<5=VUYxv=J;YJGpfmU1pX6ZlcTzu7j%79Q&$&KU;iv~I!kP~Kh&2b;zeyO z7b`34%KCa(?}MNZ1G|$cSA&Dfe~)?}WZQeWxxI*qQ7ZKbe%f|(v{1aOEZXT@r_C{5 zHCF+5xLVkC1<_dFCPhj{rqheagKAPe`Sa%w0pj@dw5Xtfrg4CaaJte!>iqn?!Ff^W zawE;`Z9zfE$LlM<Wo4WM$D%s4OilzYYyK zrRbWNs6gf242D9Uu|Kl5w4{}hmQF}cCP4D)gP^~U%gV|K$;p*r{j4g^@Ss|d{R8B& zvavA>31yuBoRb0&W(W!j;^yMYx0@(w#9S{Q@g3J32}ZfGm8>R~Ka|Nop`|7&BSIP9 z)zxKqi)Bi-Loz=PI!{E5u5^ZOkLF8xY>iSYDk~SU88wX_u68qXbJv|@PM{(@Rz9IL zo{*7d>>R{+%~59mPHWnI#p@|6J#>cv2v`llL`9X??GMFC%frKiI!a6Y(P`;JIw1eQ z(+M@FaiGMl-0Q!LJ-xm4d6fZJJ@<8Vb?xsp8W{b95?o(d8FikAT1JLD}?m zcD{fEvOsinOV1@wrfK<@k zsv-dB^JcJarT&<6pvox$9sp0gv9a+yxt5`!qPe-by#pVi4e+IG(DlFOFTHk!9o6&J zNW*xdFl!%3FnjG^5cgG6qz4>E%`km zL4*C>E6L2r=$f0mpT=$?X<<=d_#;a!K!`ytr;^mnQQ`S+G=sjrJ_12bPR=Xzj^`gP zs0r+F$rrG*_EpI$pb7DaiEndoaLmrlQPa?%0%=+q=~g!loR60AAUEOLw{M3RKXTVV zY*mfJkmC54{p-7@zAB}$_x!y$!6PSs1#??_|0Abc?mfVj%IXph@y88Er%k8^#rSW@wsN$%&IN8UKQ6#0LxPq?yt*oq8{{32(3k(#a zp{0dxE4?m22e!CxV1mphr=SpSN88`uM`X-6sALP>)6voSeGqhghXzRo_O;8zX8tH@ zYHF2+jhJQuXZH#U3-RvXkIu>>2eEwf_HE0eNRP3M&>Qd1I`xs2jRg|@;5W<)Eld-D0x0Aib}0oYP^s0 z)t?My@F9Y4-668|_m{ggqDk&YR)QpZngioF;x78l^0ZH|lNN9^NO+!N0j1RXU$`5$ zdF|yp>>t8UhXJ!_^zP^qlDl+=l_5AFtr!ZdZrA=-C5v^R@ zXD}i<+W>2_K0bmWAt6+Rn0Tb%^w2ReC7(WJ0Ig71?kX!Q`y1Hka7xc?Rs8w_Hz_IU z5HNmax4PpC6m2+iJJ{H;`S|$kQ-V%5RS?1Yth#=Q3$Tl;D=WciW`XxpQ&YW9hWJ-^ zcVkvoo)8ifuR&)zp81GR;dh7+7hF0zySr~FrLuNHpK;7uB~MPb#%62GZ#aKzc>%mv zrsJiya?o*&hIpNpX8B_{`;CAb4VV`T3k%nOmuJqo9SseH&wdO$)r*ouY#wh6AX-ho z=2f14{ky{no(iEpq-!7DbXN4x-rgR0=q#tobzHr?WPyh92?$mX4yupd3ylY@eZltj z^Xpz%AOm?P;JzL;?Td|9?3DWY^^>(Pu_Rm;H{rP85fDr~ZOSM?LO|prt+uv-N`v~l z_wI#L2zybnuwVk(M#aa=xw^WR;vP>77+}fYrhfFO5FiS}taV%aqWg!K z%`hzVHm=1;j_B`|P+aYQpI^LqfygNJTlyG4CjR&EhOvo>+tptmgoKk5+m|?s81NXe z9*7|q-UgT?IY#aLK41i=v{Um9HreK?Y8>Iuz6X1Hsp`JyD9n zyDaR~%?AoE?ySWbz+;EkWG(~dt>5m;r~A&hjFd;$^nuD&g;yDl&~sT39^icSTRoV) z_U6NDYB>GR=WJNk_M$Kd7*>EUd|Q}EoB5ro(NzAl85)vqXO7@ zo~MKA8>>edWWH?JAKDq-9T%`e48|dqkXEkh)KWj7V2zkCtiVN?CR~6E9|LmA7l3nA8y-5tenl5MW&?OYjT_m0sQWUkEc+#qoShFKlk=p z0&}3_;5a{fh9uB&B@QI^f)(}tk^P)A@UJ&Oq$XpA@WY^$PcKOL>coghg@j z$}UGzV!B^5Wh>c46neZSW;eD?E*YZf>`!J4jnZE<^lJ8sP-nV1`m=!^9|I@}&Betf zmLidX21o{-2o^21Exqr1d)Q*R)ngYZFuEI+3s3z*&v3gqu|VXIM0B>e zt<_i$5FtK+KRhK0&u5$~em5G!1Ma#ziC#%vQ!`|ARQAt9*9fl@TF@>VfIHAhI(*flmb z4@&fhVG!J*>tt+;~S``HTF|1!2YCn zh*)hW%=~w!*(!~iaj2=OYiesB+uAZg24*y*FX;c96V&%D7ncLw`K!MtYC4pO@?ik* z-@m*fPRsrNZ9QYcG9!zN& znX=TIh{bBgZ0h8Gbq$R%drh2C5mE2&pQEE*zLW$CXg+;Nh&eemb@tmJJ9}(tAQ6^B zSs5$G`#VO}$b#OUCM~Z%^#XgTYIXt8KWO)^@H^YUX5|eq*0Ji2D@Ey{3V-o`r&{hF z9&`vR7Z)`$erN4~BQ83+FmDmcx%v5VkTrI|GN0Fuwz8iuQPUJa$PtIMSLP32FF@q5 z_4{be+Qox!qIO6DtTeoj(fvL!C4)GmZ+STv6j$T8xZk-WDl*oA+Hb|8n7GfGfR2^<$Vt;W%_-%=jC%kI`4^S~m&US5UVL=n{?`#HAt;Zn03-1uKj{>6EL9BNQzG=7p z@9naxs$xhbH36MVe^gdimqMEcZgx*VgHizQD#`7;_v3hkynd1lrSn84B_|sR{(SdD zs>7JQw9#P(KX-%?K}bMwqCRl&kmM!L%lPImEiaX)hWaC+k?q##0zkBu&N zvEokG)pEwZC6+r|et+IU)_e4|7;Jp|+&!Zs(p>-_6pj)bRYqioD7RxBv?!o0j- zr~5#qA!%uP6@8TC^I9e**m*u|+G@p+FqB_+5{ZtnA1t<&9&_Q2msl6Q+OLTD{p2#_ zne>j^-h898ikvkWB>K7`+U{G#8=`yLO?G`F@=_aM5h%{B8h2kw)8Gx~h*mr|C%-Ig zX(6Gfr+0n!%n}kEk+VrHCU$mNH#e>YO#zR-i<2M7=->PB2{J@_!)56Tj1>`G~vFbsWz^R;~BIe-Wpiu1jlPzyw->$*ISM@!nvhZ$+YW94g zpMZZr0H~DM{{pX5lKpS*LjkxgA-38pX%^08=j6N#_`)4^<%_cy6%!*RAt6z^EXm~o z5OD}%yUEaec&t8Au~;DB(jz{ef!k@G7yK5Lm{^VzvuK2<-}$HU@j5A+$^9^wbY)qK z+BcxyPlbMDNr}_Z)8ln>E*et1FhQhC(9QY!_3O{b2=6W-p)@pvtAqv3RuwBNIs+pk z2lDVd4ow4tvX`WRB|*gR?&(Pn(OpyV*6WrQ0etkE zP8J{C{)&UQ226l`dspw6Eldk3K22g2>Wv!;`RZG`)RDsq%F1+<@p8gmKc5)A9G=EMbBi2EB_W;_BIwKa1968;V8K+*r55nR6TE8Bdli00Plt~I?G)A2Aho*sw4?LJ50f#sjlIe&-j+R>4f3rh-gL%YRFZF3^rUl0)y z@djL;ng#^H_Ne5FWkZ(6#KsouBuH*TmE6w+uuc+@54s$Z^c0W}bxlnrwU)i^Y;^X{ zc(D}1sQ~(Ad3h4qQj^bMz5kr=(Gn04fV3;z*|Fc#ao@rUmwas0>`X6~s|H4CYU>0` zGzBifGK8PAA6@v*1HaA$IOf3xQgUwYgY-9Vkiq_J>WMlN6H^{cD51SQAeT}KqBMFx zKR;3~i?G(XD0u=KY3bJ~DKe0-BX18dFfhJ_2FtLUevk*}3)E)|W$HNKvsG!*mI}NG zFf!H?Lp+z-eI!nZd5fNoE&-e{u%#wMoC`^mEMUG*f7XvANl@h#E2W*6*)6A}q%?SJ zYr+{oeo#KaH-kTvg@-qm8+4@*L(IVd(*g4i;n@qZBUxuA@VRdd(LgLZ+& zKMpmqw!8f~cQUMhiVfwG92<)bLdEVhzw7!4TS~fU$bSCA2N7vGIi%R-n@}SAcTtLBDKeENr%Cung!g& zwD@0eBdv}?GD9asFE`Mzg5e5e0pE`e+%=s1FR*-W-#=qaLYf5ZssG-c9&)$Y)LtRD z$QGSxJSrKvv$3mPQ(etF!8$&XEyZ zSart%Zh0t+qs8aTtDx|ZV~2|!R|x2vtj`Pwhlb1@9AY5+T1&Ud>4bfVe{th>9oxW) zt*z}Rum|y$y>Zn1{KODRLlT|yIDki$01gSntw)~;)Se8!;d&$F$pTJedXczeU-Uk4^KS%W6weMJ|;IANIbXOrfQp;$#p++dk Ls7k++d=m0Mi}_Qm literal 0 HcmV?d00001 diff --git a/pom.xml b/pom.xml index 77060eb6..71dccc4a 100644 --- a/pom.xml +++ b/pom.xml @@ -48,10 +48,6 @@ junit 4.13.1 test - - uk.gov.gchq.hqdm - hqdm-rdf - 1.0 commons-cli @@ -86,8 +82,8 @@ uk.gov.gchq.hqdm - hqdm - 1.1-SNAPSHOT + hqdm-rdf + 1.0 From 863fae9c4d267b3da0452deb744ca28928b0ded2 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 08:22:46 +0100 Subject: [PATCH 10/91] Update dependency diagram. --- dependency-diagram.dot | 17 +++++++++++++---- dependency-diagram.png | Bin 7887 -> 20447 bytes 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dependency-diagram.dot b/dependency-diagram.dot index b811b495..7ab01b86 100644 --- a/dependency-diagram.dot +++ b/dependency-diagram.dot @@ -1,10 +1,19 @@ digraph MagmaCore { rankdir=LR - node[shape=rect,style="filled,rounded",color=black,fillcolor=white] + node[shape=rect,style="filled,rounded",color=black,fillcolor=white] - mc[label="MagmaCore"] - hqdm[label="HQDM"] - rdf[label="HQDM-RDF"] + jena[label="Apache\nJena"] + fuseki[label="Apache\nFuseki"] + + subgraph cluster_mc { + label="MagmaCore Ecosystem" + + mc[label="MagmaCore"] + hqdm[label="HQDM"] + rdf[label="HQDM-RDF"] + } mc -> rdf -> hqdm; + mc -> jena; + mc -> fuseki; } diff --git a/dependency-diagram.png b/dependency-diagram.png index 86063199809e315481f362f92c6ac03c3172ab65..bdd2231b8effefef3cf3f337285d9640990f4c25 100644 GIT binary patch literal 20447 zcmb`v2{e{(`!;$TLgu8BxiVFzka^BjB$YxkD@x`$GnrC`l*kmNi9%!^BN7=B5s?ZR z%9zTykEi$h{_DT?x4*sDUVA_9`>x;b<#9jveO>2up2v9{$N5AX=xa03veOa-!Ejhd z;{-vFy~Y11X~^-DS9O1+@ee9%U2P3wgY=)f)ejR1f|od~p=RilHvP%>tlr9o?CkH9 zoazf**-p2&>*hqI>hKpI-+d

U?63X%t6*PI-yT4;Ibmx{r%_e?{Ln*nMC0WcH~e zdw&$A4fBkzq$re1JZSScKOeY0a=^WPrK)49ZD)RaRmV!zFwNC$B9xcr3kUfSnJP0S zgR6LlIy2?mjvcRh0d|R^BrAudzAFsC*_we-et;w&dsw#CJUMfGLr`Oif5)bzkg58%pA5$xy~U|QCXR(9B_GgaUwL{_V>?E3Z9eipFIg}>GmUACVPDu&a&#}(CXV1L@HcffPg)cigj!g!=ww1Vb#H{-AL6xOGF*7qWpGaba z!n}i)Vat{++S=MXcczSujRmYM{rb6gZRy9r;-Uu;93CEi=MFpff%VpeJ=&pRVKbj9 z?X0asMG6ZG56H-59^Iqnw;`j*jW^@v1o|{PL81X75HuQWL62j?l(^Umu<9$>or~ z)K~5%&C%LlZicfMr7i17_?CH}}vz#al$W2gK2jImb7 zjvZUlidLQ)e&Mi#sO#-5@m@_7Jf?M=)$dbJ&#iy2oF`A@{gy6?h=^SBH8C;q@bJ*l zdHrLcG$tlS=2D-kK%(iHGuGDDM~)nkI(QH_)xMUQxUv4bcKi12d8O&;=~&);i&|-E z>5`I??K^gibJ7!^M;am#CF{RFSZt;YEiL{1HdSU|V1SIE2^BW4Vk2gke@)>^wf(B@tIkrmOvsdOGX56>j$a$>&V_+8~H|hz0W_&J9J0t0?XCx zt%CZj+qOM@`t+O#6D_U0_s_G~5aM%P2u0p#O-;@D^XC~D7`$hOG@1FNq*zVOEiCeL zay-{p{~|tvg9#!S>-G5YL{F|!p>!lx%G>*Qj_z%i=*Dom9p}%T6EUyynRu7O$I{Z< zo8-RM_d+^aV{&rxi;FN97nkJuwlc3DXHK5%p8MLIlau2-SQe7~{qMqfBohxK5fvMo zA?v!E;1v`c$09B*EnT>90g-w6^5rvU&KRFmb+&1`cKrBptLh)q)5Xu9TUQ5ctXHR` znAqCdo;#O=cRqMTpt=l*>IR*}7X@wa4z!DGWb`mp+f zf&y9BFO-Qb(`L#F3Vyg{BKYRbo5jUatePu|Y3qT1m_@O5%c*i!8QUa`GpaBD+DGt; zi!+<{_4Y~!uKs!U?Aeg-X)UeuAD)@@IhdJ!LVB^zM`AgaWneGGel^=zCSqfCT&3>` zmx32TI1N=rSDRIOi4dP(hST*8I1ZGM5qDBk<=)2~-0I-q;I5p+ubbp^`SSB2c{#c0 zm>8qer?Z7BJf}_zcVr7K{~ivKOwrrFKljQN%Dit_9Wp{qO)cQG!ud9~0|yS+kzV7z z3uA|m9C`BO$@AVbCMLdqem40hPn=+;jE;*NXV$|;AuSD6`G$#Dlsa)OeVHF^B?#dQ z*+L&beR8z7*Lm1ody0F-5a(|HHD#uU7Cg#VV#vOk^eOMZnU(?&`=w=MoUCp zy^7qob<36sGl_!-J>T9rNCa0^DY9xR$jcXu8t&WXz)uj59zVX$esB`u+_!ITmQ06w zdbSbbUekSXJSq-p=kfLTwY>b{ComJpo-^UDAo{XI`No2;*Y=u1Cl3tuIfBO*^WqBkNHl z=&YXh^}@Xk%clhf{E06J{!yeJt;4sxva<5`Z#wdELj;3eN5-jvjqGSnghUs*l07_o*+UZ;7_>lK#Ce+4m}! z7wrk+){!6IzgxZtT#8Rk)xFo%Cn-^~t#>q6yP3$_wVRh$RZT5q<=Eyud-qQK_;I~j zbnjlWjhbVR?%!YhWT~GfJM#0V69VVbB~C7`r;i@d5WFnWsWQ&yi znJRIP19rZm|F)A)`17y4g8BLR8@F$(xP5#5!r_Ckh{#^nBbl$r$;q>`vv=>=^J#Ff zZ=>6(ub{rAWiKx;ii=J6gQNKG%0h<IuT~ z*eT0``#9jqL!*VO^V9v3OW}Pl6lJETrwJnOer8fqQ%y-tO@_O;mzNigJ~m8DNJv~t zs`17_qOPIg>urm`{%XJ9cmf>eLg{miqrRT9@tq;Qr;QQR%YXhD8X2uDFF&)Wt?7{1 zv}qGHBj@bg+?K6d82#inbKJ2XS%7E?=%FF7^nr`D~!l+s?+!-1+I# zC!5^mApgZ-3Mf4lTVoj1Ss{Yzu~6}D|8%?M(rdI ziBC(r#($bnMP=xIcubD6ySI1y&YgS3#Df0Jj-ZH?mXugu|4I;Bwj>-)mF5=|L_*K_ z#Yq`CZ_K7B$Ej0Rr?_A5cO|Ke}6@7=pCYIgO-&{FTC-1q20) zMAZ-M(YjXV2fS42{cCZtpt=e;`2v@iIlxO$*Tg%qooa)DqAK&};LRNV2KmaM_&)lA?*>B&zrQ0rC z_vTSSh)ye@aLIanXP){|`liI7!bC^)u_9j6QZ1P&>+fg_9KG|t(%;GHXMXMan?QUNup#$_ zbfZX$&9cdML0SM|0LgCN-WEmYuSY~s5ubsU?Ap_iNMwexHbe&vEMr-i`Dab?qAcP@!rl z<5+*@P1FP|CVDKtVpS{P4J4yTZ`SzE;I)cCFYy+2=Gy;1`kMcnMoIZAV89u3(rXA? zlYhZ0f}T8t7aNVknU!_minhS?rbe%&GOYSY~|Guy9 z4+VLCcdckY}qFzAfhvZp;$#p1+? zckkYX{vH=$mRC^7ee%Rq9$ym!kmu*;M{eXfV69qlt-$=&M(q z`k&|AyGJn-MTK;0)0!lLx(kGh_Q_fz#YemG7D97v<@ZUUn_Kp1H8wZ@_FhO%PF_E+ zUo+m1h?J9)qo4>wRSk6fv-M4TyR^7?d}3nj>(_M(N$XY;DIp;tG@*cz$m&~WT&_@E z*HS<~jM@N5VrIrQG_rWi%#74{8>_r6q5QUVB?x zqXKi*hj;I?^Yfi8EoXmC8R51Oj*j!+TIA*BjUTpU?NU%MH8fmQ+4##O6TXSRLt07- zRR_J;M)9Z3ft+X|N=pIKw|~=(z$fw2kf+l5nH|j4hO$;U4b?YC^ICyr5QM&1? z;tKk!=&geDCHnSX8lypDyi~Xvgch^YUdku?uQpZ^z?0nbokfkmoY%DR=FOXNh04Q; z0$_J)H`Y@lJ?CXRdf&faU7pIXdb;(*$&GSd|w@!cIIgdNm0>IhuEr z^GkgNJ0;Jvac~$J8lu1>*Q)hZ-n?n(;4sBI9i{8&=tvOlg7Sib538!uexVgB1ejW% zAElFivb7{$hfmbFKvhqV-fsm+V*J}T*6rK(2??z(4LF13`10jTK(E&B1Qg6~qocom z{p!yz@R|Q%J-j277io``Rud%4sZ+m9wSPbLd0tec;{T`9j_oV5kxHO{X0CXs*Sp#k z3l5rv!*+uF{F{i+bFUZICevp>1)34T$;oVtn?Obsm~SDqpH<4Ova+%Sfvm89|NfP2 z+?mt;McPM?ibzQn1FdFdjkKpLfcd(5^(vM+Y-=5{oG`oX_MD>6EGW`_`%p{j&h!lq zUUGJ3B4!sCZ9QpbCMRiWXga&QD}f?GQD6(u9)Zj=;X<1+magE5M`RdgxyrsiD4@?Z6G>w8SO>v;V zzhyM+(_r(SD#7&dao_EczHHGN**HWmUU;gjlcRzbE`6>K12p&?WHj@q0;nv4fy3+P z;00^zmo;bg^rrvJeFd8K+0-O>=gu7f7(g5lQj*8^vF_Mmx2A4uK|@%I#9h1AhO9+P zJ2_V*wQt{5jooXt8^1SQ7 zs>8izH+*tHz}gNm^Twtox4yyN-rkol$sJVfM5bp-rz(Y5X$jRshrU+wuUv~XGdJf> zYIq=cC@;S_M%SGVmS92|UbG!={t=uPEIzK0GqU|SI|rI-3|WM+zqiK$$C{|HNJ zQR(%zt!=tPWdlbUXUh-4nV&y{E1=95fHy;U0_Inim%Bcz1%@pvOV-$ZolBvl!EvzmC^$bqzLO)AJhNUAimezo+N6`uh5U zk^A<|R{3q#URJ^MQkPa}6nJ63aq6s`fi#?ls`^)sasHzW!4l&{6+M6cuB+>?o?c@T zHlwnpCa~oOKY-eY4?Bng+m;&uhG+35s_(UfsCzNiiL0{Zaq7Hl#e(ns3 zgNKI)8-^0Gd8+`YtP4VT8u458N7y$G>z1O&emyB8qXt1jwlSRh__4{l^EA`Jn!q)7 z|H>G)B@4#=4fV+fYzU(7sNMFTwPwS>?rsPig#N_T6tD_H)4KFzO|G{hczGmkya1Q> z?%g}sEdIKn-hsq+ThuB8m!NON16s)lE}x2<&G1m(`QG=HpNp3lBRxGm6B83X{mrDL z*nfQGl;q=_2M;E{e-GaHbZq+j_qwE$j}4&(tQ8`!a~!<*9!azCl(A{s|AwmUo2gfx z0$aH;Qe0Zv+|-0E$z#X_s^P{krCKF^an?e9g`6k_nH5;nYjDn zMNemE{K`%lxs4lNc=F2cJ$))7ATWkdq@|_p3s<}y!Ne2zrE&8TKX7-SAVC-y8d4Je zxt`<-(ZfGD;(kdsJh2{GANVC=E8+Y8(ecBF598zjQVnh_O>@O1C86YRC+=2Ormkok zsRXXRo=IGP8sRfNuIui;fZDWs_in9gY`ggRUj=NKAeH%t+GX&wM6a)}2L=X`G8LF% zkU51j*3JR~0>}_ZgV=t61aP!{Zs-NkbE2EJvH6PdL=wg|t#fH8$%)`!ep$_8tkd_J zC0>_KHaE52J@FVRE>Af?>D$=YJA0|6Yu6mZk6I0X{XpBR&cnYYKkrQYX#4Ku7D?M3gu5kb6>FWrGCJ`0&x>P>Jy0vis4o2|T6vX$g z+bONiM#xSp)TG*c(4p5d9}99+PY(#&$iSe$|L;6h5=I{7GH2~6PM;i15x|^E?m6QUAJvy$B zcyxtO4XbC!dp>-~RPc5}qD5*(gF4+xM&v!CnQn^Z(&b|b3kx%OfwutXme-Oop)W;pbqmIeX-kq+G-p6O|izdqUts^30V#Da+ zm)>)w=ph+`tvdfHr~XV(ffna%ZKg_IgjpV2Nz$RU*x1-guODyTyg5_u#-F>7Pz5&* zKCQB{5hh?5Ay`X<>bmCPT{lyb*`fG?ds~%y)F9cjPoXj z1RXw>Xr%QwZ}!Q{FN1hSxklCzOl%o63eC0$ix;=edmR22U+9kIR$||_?bSt7 zY62SMpXFutojcRz+^I~}?{yW_S_y;6=8#x*tp1-~0O+oTHl$X#mx5_=W1vS+K7FXO zv##POEzwuunF~n`zmv|V|2-$3(gv1OZR*rJ!QNrRJZ~eEZ3umk4OTph%zci@2cdOt zic?|o+E@>m-uaF6K)&;ore)}zjPlL1gpNGyZg}~!AkgqX6mBDxw70jnATte?>Y;x6 zM`)`ds(r;5wqDH!x1w}eBaZFB7ZQ6rGt|@F-LNzd_7&90(G10%#OJZGCG=EnZFr#pwrqQ}8M#Ox4jiuFM0 z?JIY>coDr=ZGm$w>aMLV-;zm|(B-LKkwb?LL6=94`TY6wh3*HApDJ$sD(DQOW&%1V zBluV@;ADXOb@A{>Q}F(YD%_tr!`WAw>;0{-rr@%1oZD$b!`Ce>*mP=YQoruLlWA#X z2S@&z>9O#o3oaSdHZM5hTWs-55Df+GuZb^Ph7yM;#uWuPJ3cYCA%BDGFZ_^qY#&+( zTpr03$iWwQ7lI0Ob!D3-dh?!+XD?p-0!T$07T^R~d>y&LIY8SFP!~#!rIPT5Sy+;t zU0bp%ZWn~W*)LY&Z0Lz!eG~;F?qgo-vNMg;L^#^mG>ka!tNpsAEwOz;F~%+^EYNDE zE`*`<lr0q06z#MW3`VKksuQhzUpFY<|8g=$&tx-C@3Wca=`cx{tL% z;YCOwPUCh;Hnq2l;sbZ@R(HwZ9Nz}+@$I3lVN`SxL4s#aoN&XYBd>DeghF4$!Tnpj zM@{Qtclq@CL0Ql(78?$9?T4G4ZY(SXamH=@e)IaZl#I+mi9RD(K)lEZq2`**mp@x? zi}e*alatdu0M7$yF31l>K1De|ek!^q^C$|m_sS%b0Qi@8?@k2HXfo@|C)FdR`x*$ z4=MvJ0&FnJrJm}?G87Mpi`RiRu(!8IkSSeWq?u8T$b(8eIe9VU&cuA_a3J_nyk06W z*Z9qUi%v@$L?24}_=UXd*N@_kRo^OzO@l7_1BoN#P9ujJGl&jASI{-jvAKNw{44%X zn8nbU;s2>L96omB$Q^Jc&Oy5uWINhZBqPU| zyJPv6VS{%j^`Ya%kYO}6&wZ-!Tzj%}GBGnV^Tv&LKn}Bv_nA<5HJJJK@2A6h-E41f z$Js$X|H`E^j8+CDc)9=2+REwYj&mosytfZE6U6>ffTmxq;uLzkENWkbUp3NiK09k8kj5)u-x zZQWd4#D_v?ssZ)@11&5pswn;{;~$$hM+Y*f2z-W2-eT*fr9}l!REQ)=oH_I4(Idnb zP5#A|oQjH%ot*~9j~5mfv(6Zo0my{#M%C7;r0X{;Y`20lM}#)q8n}ivb62`PkbZdx;I{(EqBv| zi3&NavSCV12}KG7AuK4Pt+$J)4sQ3yQ{&JHvP6UH+ctFi-q_fA5S`#J5H2pYx9Ubs zST*s`=%#h}(0lU8?3rFK24A_hx{4n_Rr)NmV=*Z;H5c#5&Sv4_5~-uLz{l}2PeEh+Kp$WQ`G1W69jYRfkci?o3CRbTMH8oRq*zZMb@(29E2 zPGx~U)k{g%@nbPQ{R>xnol?NE$H(FeeZPG0o1qbZ3vly#de;&Xwj}7B1q{L6te7?s z^TMG^b`i30h7fgiV>g|hoQ5jBok7JRzJWOZBi4!t3JMy8)iSVCg>``tJac9lIt(@+ z*b<5`%oa;*w;?g9eOJ!LpFu8B!ef9~giixbB13?r_zT)|P!hYa@rH&T=t_Uj3{Oo= zIHCff`+TWP3)2w^i!(3;tS!HQEC3D?H3%DexovNFK6V+o2e)i@{yg9rOj*Ct`cErW zACMtw{pcYB&$ZXL79|5>p?coW$-!UVynQ?9@BF#Wrrd2pl;mpYeomfre|P^dI@AnF zJN-UO2(2%SDk<36GRqa{+k7PD~W%E|Rn}b2?{=KZ%DR?P;yoS)%sWHn?#oLAZ46*w^e)0q>Bq=Cp2R(Lm zASNQB2?-`QH+N%op#%40f8m0!j}NR`bIx%vQF68wQOI0)cOP2N_wU~iMKaELYU998 z^*%+3Hp8ak(HDRHLOsCato+)sEtI#aPI2WB2m$p&hc^CvjcaVw2%OQ?&}f9&0_6|f z2K4_0;47&M?*QrGS*rDBQ0t5f_Fd9OtX=4Na!NNzcxRvg*jhMm6uf+HZu2++*gB&; z;{$lO`1p8~NBWmTyJ*;nWINx_0F@{KpzCph!b(m;rvmGOwh1Z&kJ4q2#;7g0U5+*a z7EzYAB1P5R2>=A>H7+?iQoC1J5WzSKFwlW%1^Jf}AAdI|XB2IstWhsBrR(M~lcBo? zLg;*P2WUdWhW8|^XXTle!uT)^Scp=RDRGXr>Nu5JD8-mb#&IK~V>&vJPBM^xM9F}k zfciia!vO){4Mp%+viL4k{<{@1hdPfv8t&Mu2t8!-{o_?Soj#BrO1|^9knTy!gUk(J zOW+MA9%WnxuAbxfv`Bf1gN2fT3~vSB_0wpKFXGCTMF;9N#!10LSq4!WU*N3(@jV;x z$U;v~4^`&SAqv6(2Mngmr6n(r86kHxw}oC|3|H^!>G5=R9SKZaH|tP8JHN0H^N-6E zKX9O4VLL(CJ31n5OoQ45vkgKXDU&wnrYbOxZ<1KD-h;%%Zh%efCK|37Z`lnnz}SbM z{YB%DJJ8Q#)lJJ>vRoLbsMKE4jF|+&3JFRaR)hwsx+aCRAYYI}z)j#mUKAGxZmfAb zJ39kcSA~V%-9a+u38T2Aq@t`0wz!S1-rgn!AsY4*mK!GP;D3%l zH*0HKoSUmxNUFi&gkQO0cg(yjC4%A%+*IW<^0Gs2U=!us_O_z1`u=`j&|Nr-+Go#l4i&nn z^D-C2^dqH$<+$wYdwr+m7*ZcnfKMcqnmT<+2P1dh$sZv3q5RCnhVMsH3Zh%Vee4>V zSFn+*tE;%dIY!#hD@?dP7G2c5N)~W(|NhpxI%3A9?39HC&$exz;QwL9s4PQw{#?_@ z==OpDAW4MT4&JCuB^>nJg#w%^mx;RrH!mevIC?tg-jim#A;Z5P{a|;V7y{Pj1 zDSAyewnS^(fR?8f|CQy|k#renZo(227^nxp;b(xc)6?IEcP-NWPsc!4)}csPJfeAD zgV!Y4F1^pj-wpHKE(1;D#EBDVvClzhZ=OG-9JF4APsK_?n=ZH^9HGMpe-Fw~VCfAM z8xhkI7#$}kCIAj~g_O7cH;MnT;l7~})leJ_#dEf{X#B9Vn}Fc%78SX}ENBFPx8 zW@soSB67W<#M9Fg@DC3QZDdCU-6~QL1qB7N5cK>in-EIYwj$X|IFmwok@}!n^1u!$ z3aQ!7K_EnxH$ewvT!53Yq2c{!&y>ND17oYjrWiq{1_A^a)6k$K`BZSQSJ6B&sl_Af zLhNOd^PT653~^(oM2}S+SD2lx4*c={eQ{P6+3f<~@PD?gJv4A?Z6nNBo7|!fmJ1SSxYG0R;sGq!uG1oSuwU1`zY3qoeRH*Vp#J zyQbpMD@>@uB*Juh8y6R>F3^H~S=gi~>*g3Jqsq#B+}xf6<_w9&S(kcy|{uW>T-7W$<&b ze9!LP){c&!`ud{0WmnxM-|wZSrv9m|f-n@9k?Ck_6W+Ub#KKUC`#GEVe-qkYCDQJ) zqF%_WgQErxIao)hpl+QpHJxLO{7vfZFiin!Mzj^}wW_wZppXy^(YbP?1W6y=AQ6nv zga-8sV!NI|;)|psIov4eNQgLu=ZBvZ6)k|zLnmMEyFl__uk52#1FVG}k1P$7iGwd% z7tp7u#nQLg$CJ4@Ir;eb5XohVTJ}*5l_TVnFkW#%a?3L*LS)0$(frK3`iMXxIGQry z8QAp<41%*C;atMksjExp(1Y3rV>jRh6uP|p{J6KVn4gGx3UqK#QqsZR9uFxR$_sB) z-#id$YD$WxmKK2G8DnGnix;hV=0P@)5$JKCZs0`(gLJYy!f4(fSZ@&O9JfYm>)gsQPI zn_mc&6gXGSD?B!9b^-oDHi4x%IUl7RPW=LFWLB^uugp#VyH&eB<5a`E@RZX4!tQ-f zk4Y+4$uhrC_v_ueyzL2*SFT*!DH+k)a3w;z&xyCJDUK%-WPC!x$mr;+byMR$L_Yk? z`DeE?GBH6%6Ir_4|NI=19*mW?V!_w9mv~H^Ai=CRu#%7wfPf@F$$M0Af&k(*V14zG z`iQP>cXv1Tr{FDY_6UqJ%X;$D;dz1Qab~c%#&!5JcqL&p!V3~aL`1}Jx+Kn_qs~y< z6{=v1>Mgr6#HFS6b#&m6xt)+u|7EbZ&FKh~G_1(uvNBl#0V-1oxDQ~N2gMrH zbZuvz^>jzpKdR5b#AGu8_;VOGuei8U7*C9h@}E7UA}qb%0m2)n`a2YRN~BzS(Q)Fj zApssf7((pt$i4jh2l-MzWRV5?p6U{>x1RY3FjaaVhfZR*Ewwzkk9s46b@Jb?iA zJV_Coh^E2H%4*s-iED}TBfMk;fx?1T4RRms|7Z*9Xe}MfAdo|g&3g*A8r@y(wuq=G z8san1J=D{@aEsbNxVFZa6+`PHgYRxo3@}`&gUKJfC*mI(#5Hf>ut}&&Al;^QQI2Kd zd;}U_5flSy1CIzpw)+^!Rd;f`g;SmwfJL)|F&On}$5zLe(h1QzL@3(K?hPwv` z;pNMhRn^sqFcXUIvdYS>G?eJCadyxs$EfmN`dEwuh8Dl~x)>a2tE>L3nh+L{-pL3M z!Z4u1B@F$FlAxrdl!6=N#S1GXP~oh!;XS{DDe{i`)@8Ct-K?7liQi01yPKJYB#kS? zhkO<2aO-Go)jf6UMQ-jC8iwlT@IQ+aC%wI8mMRJh69P`52w7R}auAV0SU~0ljg~ilVxE?soL|BEJe>88DZ+e0U8!#@ebPk zlxm=iP|MQO(g6Hxdz^Vfc?Xf<8d2~)Jfza~q3Qetpy=mu3FXysfscIfOZF}y6`AE0#MH*V`I{eAEgu&Dlud?;z!fj zNwF|(fT9hm0X2YR!GnZR)v)stq7zypQV8Z^WL-X!W(G6Wkjbsi5d@wDCHM1ichp)LoSu0<*g~-= zccL_`5eFfv$H{mhunMwL{G&-%Vtqb?} z>Gaimh3$&b;nUL8#7tOUSJ#2PdpFOxtY_W3w}3|F=0kTotFJuI1?H_SenCTOAE2V7 z1WAk{T~S^RpX~g;`!JJEOY9`w%Ns-<;2UXmr>BKw-^SwfJ6^ajqR78P#(1kg83CYH z7c4Np+$&|R@)N}kzaKq(D!w4h*DLA}21JD~jlQ`Rvt0zv+-3z%f?xx)gKTfSwUe<8 z{SA`3!$p$o8IE%)xS0teGP(+cAau+UBl&d9?4VlL9K3Gq>-#tE%I(ZdBrBZF6`seG z?DDhe?PTnn&_+LexUIv7oVjzx*nm|Ny63H%H{n#EI(rBscF`J`Jb)mw4-%rtjQj3< zQ~)Fpq7E}&xMA-f9}hyeA?kR7R#EJJBQ^sYL2JON99Y0&{~D}}T}aLumS|QkuIt{y z_Av2YyQT;KbDZJ)-vzt8^wQG6qu;{a(zGrS87e{gd@SLY8D*kMnQuNU-NQ?2m1@8( zQ&2Nr8Z6r~ti#A9Ukp0-%NOhEcWy!{81Mx4)7NJV<@ISM-%JT}y*!!~WR*4C&lYy} zt2W5@j^IO(w-CU)5?f@oUYY{_K?*+vOS*IIT7= zCRkm#HThgDGuC`@c;nQw&?&nH)kg8?XDA-#V=;PmHrlyqLk%Sxu3xk%s6M2p;KWm0 zMAHY01&TKgNBx0oxIA)@Nzr+XrhH{&@4zky zO65&!E2<76W0tl7WHUNNbR38T_=lRc0=LitJz^3{!T--JI-WQ#1uZ_7xmX$&4NSFA z0?JyRJNL>`9N`$FRCkq*{kj*{Pi12j4%0?tPw1VXOvNj;(47EqKqz=nP(Y#rplP2x zb?TLZkd6z63djgmcrsBNFpB}21RS61wQp#HMn*n{om>lHX@*mr*p5dY4DWk(Hw#0kKs;{B5o z&2c9)+4#xe^>94_818_^eSCdk*QFY^bKhleAMCq*awa2@MVB?;4+X{2TPrK zNPiI@vc|ys3;~K%39hGic(@j3J7HmZFZEzv(fSojgALe)QKEsx)}XYar}v4ZP*X>9 z_GlQq9U4kZwxlE{Ke~4>%v+Y3@4MxS@Ox)mEpUCc9A_sX;kduQBI%<@lmt5sI&utP z<80tzk@q1WaBs4g`Ut|yC7L0WlA*1rlSt6H4;C^aJe*73<8^&~772Se0vH38AP(ke znL;V4FJ*=Y8e$R{O<1(X7s!?1u?Yf%CE7{t;~w8$C%}M=cI%~r7R}48)uwNc;J5yy z?**vJ2oJm&9o+(I7wHJ474+n9BxFpTQK}iRK7H~8&()xyO7jv_Q@9V*9}tUze0&-( z3BoZY#eV$-Ttc}dnf!n>%}dg-zt|7d3Pka=F8r}KZwl|*$1dl_XMS9bxyBNgph{({ zLJ4WUeN|5Y27WjK8!nV)Wp2eY_)usb2iJud9SSPHAcc9CA>>Ba&Gexz)cJP1hGgMC zM!u9~;dKM}HI$@Y)ev5|jM#aSF9zVY2_DM<0 zg{w$rm|T9Gn;Y|C7ZYWg5hpvFj}qM+ePWA0R2MjT&=epjlJx`tuxETQzHN5)tf*N< zW7Z99cX(u^wx%X#5HLZGkrGJUn{~8oBvR0|<6*#fV|5Wpiwg^q7;01y)%l#o+(?bn zhxFv??F}$XO&XkKq1o`3{0xX3;Pmd(r-0edYCCsA8p=V@#$1?WN}C#EsxGdE)R%^N z?NDC0PT;}v(Wcxim29_b9YZ2$6X1`4J*#P%1MmR3^qF=cdJQncuC8;C9pTtGtIiet z=Z_Dv7t$RxK@!8WcbpZJItb6mtcUM!R4QS}u?piW_#y$Q2>23%uk1Fp zo?c$qXggr%+Ku%Uq&}&XK0cLUwYIDTwAHxmj0QA%1GXK_x94+{vp>cagea3q1GHmmVZ5qzO` zh`^^YqB5bmc@wbbJjMyi%Y9LR4j)7 zuzsoYOx%j-%+QRG6N@$X!6z%YeM7s6yN4A3zF%Ogv9e_WE7B{c(MY0g z8HBYHfdpQu&uAA7`hFy4sF!coJ6--K{j!0P1du**&C{@a85%-JYko_neuyWwLq}ER zA)<&-g{XLY6kP#IiUBK>Js8HDno3{62Z65&ID)A%z!G$x&~69<$^FvP{QP`ahTsfB zb;b-41H-GN+MtagFi{c`$dK=F)srWS;Jwl8!aFEPU!sBL5-);4AU8?-t}H#Rt`0y< zT3Kab5E6Dq=!)Y7i2G8a&bT(pe zB=1HIy3}^%e^4!|XU<>9Of zSyq023gfQ<2>*P%L%(^8?7Fa2A2{s1`}Z4wlbN_kwslLhBZhXfJ}mrVBEq9tf(XfS#Ad0iX`14+6}jETVt$03Z= z^CN6hZ$Mo&dvUP`(vpcT0H-pv$$|p$CB;_#e{3&F?fYkEMp}ff4DB77rsbvr=|LE9 zBqb$#PlHRsHV)HLaOD3lOiC3dQG@A^F^({naHxh({V&`}+~k{a2QKQtw6m4^Y+N_ zA_Set$Yua596>x6NT1NqP;{Sw@^{XfFyzxyg=yXM^!9FTX?bd1y$se8Vj>B$#>SF} zFcfiKf0|C_kl)v3zd!s6xfY{F<$A`($spoy+&E!xFO;rtCxY{|4x=A|uK~dqy=22@ z0cHZSHlh~v)zHuo1V50{##VswmS|le>N`0DC5v;i1{7ZVjt!gmdHc3N7PT3Cqf-yfs&9kaube45XkI(hOWzCI*3w{^|N z5|t3EiB&Y-BW6cxR*UVotZr-~^WmXqXGh4uuYFm}&e_ZI*mHtFMh6KW_yasZmW3H3 zFAc?j-L4TZvqQK)Z&v2U&22^T1=(HpD3fT1m(ft-y!tUw(y#~>d?Hv*!zK-ODDUAb zULDK&DHEDd-gSV%P?%9HE6Mme|HrJ+_!Ddga!7`t-{YrG0hz8{y^86RQ!@`Qz#anC zRvJD!^x_%QjLZFXigcT$@I>s_&s$kR|JJ#r=q#UZZe|t$X%lkA?7j|6+K-Qo1@6yE z{O5ryWKyC~TSJB8>tv=(Ip~mtDRW3Z4&sN1;Fy@!5DIFa7q`KA9nDlmnt9ss0{9*y zKUE)hEN%_`Q54T?d3{p@!r%*{y1^`7XZ8-ommPmTg5hC1{R-T?m3a z_hzn^n(b)FBeQ-4kVia$Tg2E$!ufj>b6%*j^4?!PhJ3+l<7kq;a zPC1Mbg)@)ftbsoR01?DK@(+6OYQg^SyMZC39Da!TO2DMEC?EznRWbtBNeDQGOpQWMA|3o@vL zuDZ!lvrBzLyT%|5z=aPab4Ew=9CM!B6EBWI^m6g`CXM4uOGCkc-E;M)9&9~MpR)!>ww*$)2xTxQawb0*1?hkGzS*DMnTM*X_#F+RXwZVn0HjRkXH;= zO+-TC1ZHf3eV~sxJ33Fb@R8mI9PMi&} z^=y)zL<%ZZwcjR7tyoS>3*XAfh|RXg!9nE$&~$f~yskyZ$k_D29;gX|Q86f;$dnoY z5HbRPh~-2p9f!$ad=*a#UGKi1afP|L`z0maVJ{kVCTBS3qko5DEe{v0QP5-?!^mZy zq6|$aIE({gV)@!3K)NW=MDX+HAVJ2ftE*vl1NpWHb_SRfV@?>wfRO;hv|ircHluzW zi=J!Cp5OBf!U-2xgiqphAF5n5KjtU^`9$cC^A1T{t8#@viHC=25f;7 zkqyH%N_3R;4N&0C^NnusO$xVqySgT{*na$hPDV=X_R|m*o?54D3uE zV9K<-JmpBvY$aKsY6p4B*RNkID-|@4`z!N!CXE^kZ*Q@E-gEKslZu)eeJ<)eawR%j zfkYC_@KFr(_qSz>kZ)(92{qVv%hqH}Hdda_m}bb6Y-i=CKv>;58JQRvGcq$DfAx>K zaObc8`t)?(Szt3jgG1|t z$9hF+M5A?Kr>9wW@%bWr=-Qf6>+^>XA4Wz-zVE7g*I8sK_vFdxecKM-xLnQcnKbM! z%L(RBv14XtCdk%}ZFL;)FspdxEuW4Suhdoi8-kiGVs2$Eu$D)%YUFEY5kcgJ`-v05 mJ?b#M=54>cov?giPIiF#yM(;CDKIoa9M;s=c&2U{`hNfjwLz-@ literal 7887 zcmX|G1ymE<+aIV1NJt1sNtbj;hje$RlynM6gES&7Al)D(9fF8}2uOEHNk~YCf(rj< z?|05O&v9(KySw%L>PD-p%3))YVj>U-Yz28~O#}j^5dIcMM}z;TXEvPS3C%)DP8xBI z{Fm2Wnv6hDhABut*7nZY%l0!S+_>r$uP2s3w^E==Dom=dMGay8k%yj6XKz7hC#jy{ z6PH%=2}hooXvip|xgqUkn8z3|R`|_{zB_a*VGQ{tG3M?XVG>a>pZ5cUf?U0VsG1k8 zXAGV!RnPpbJrUsh1p?esssPx}Q4#dkE6vARp7KS$O|_wu|oJ zS@7kHtno+x`_B)Sdd!0U6<180`@D*crN)ouw4Y?sH!!GWE0t3>Fo+&V<0vdI$Bd1Q zbsX4ke3O~kJv~jNCU!vwt>;oL5AWh(-npZpuOC%j&T=}r>Ps1aTS-YtKtKR~90jX; zYxDCYHp|0@b_1zw>w9}Ds4s#Mu9=k0tKE?kb=Ct+;^G~`%~g6yxw&eqtE;^Jzg?#f zw9FQ6qN4ct`Awv<8NIEmOLEfUWU}JEPtV9WktO&{o({h@u-cFV@Tue8zx6RjaRzhll5Jx~0Lw&R+88*Fim7wVsxi zmXuz#X>q&XFHL!Q^z_WkoliV92kHXS2lvOX(Agt_f_kwSyr1cQ*@IcrK< zTCy>_jZw~Y--bI22S;hW&B%C(N+z<+XHKl>9t%ZP)#>ww4B^6}B05rD+q(w(`lFX; zyMjMX5;T|yU#F(Zs;a75IXWuCR+L6Wpfy>GdXSQm+Fl%QAm4=#k!>);L!1l(GBPqq z4Lbrwk$vPn4rO9yj&@S0q)Jh=`}&$0e(u(-TW8T}vSr$ej~_pV*DC4UGMU$vA9*yH z2np}qlfmj9{or%5HJmM+LG&eG3c9mhXmYZ$vs0j?q}0~c{nAtvDQjSG-^bfKp}3gd zX`v|=+RUbY9t#nEzK{HFlsU=EmoIm;I54)ix9RYs`=+K+xOsTyQcp(v2M6i&^z`tf zrC;adyz9^35iGpC^uRi%$KZSg&0fkh$Zwvx{!QTjSEQc5iqk)Y37 zQlVE}#}-*gfRB&g*Vh+?ii-O7>Sr)S(iJ-$*$hF7t3X{yIik6my_4*j_XHu}p z!3Mc}@T00(0%HN;a`>erNJna>1nX^77f#?tGN= z^mODN9(?@6zMy$3sj7;To{=#Qg)y6I;TjehnH(LBVQp>gnbP>o=5()l8NZv;c*Ynv zzosU^(b18KlQY4IS%?vy;MH4r(}|hfFd-p90>;(695~QKn60Uy@wlm}Y5m8KnF^!8 zd789={*jS*M<=JYouRGS`%_a>V{lMxmp=Hk>hAhJb#lAzzU_5S3W!SK#p zYS$R{=1`_wC>r*T&csJz4pU_>FE4Eqlc6TU(BjtCjGsS$+8%xH$+q5|y)Pptm;C;{ zU`lH0jwwZ?X*!oBS}ZAFx!xdma=+F3_wSN{fq{-nt6K~(vB{30pd@)ZN2M{0i;D}o zyXaddBjPqjFFTWA68>VjffpNTadiy`uK+^&CnsM|SDRIfdy@OEL4nW_Vr~y`bXXZF zHeVbMa40Ylj-Tz$z*zHdKr^+Hl9F~B&F;Z;p8mzf?97@xG$@g8i;H%fgXt937bS}l zWoG_Iw|@JJ5wRQ3nsP_J;BlPg{Qc*T<;*)1N2TpYaG=9FI>aNe$-XoZ;!xDMu1X$W z`1`|%;8UWWo*sD>l^)@P4~1>Bj_o87<~5FU+(jiN1uZQtiz0hMg;J3?oy*G)Ha9nY z@Ac)2hlGYErlf?|)p0i!+YV(5KX*OKx9C5OaSXse*0fb6@!zn_zbryG`H zr0F$fC=3DsEiox++}W4R#^d@bz{=X%d}p%Em$)}y+~42-(~lFkok?b7zhzpb@QTal z*s7`6b?dH~nHjV_+lty@RLl8Xq>%i?%IY(+&%{K$9G}hmSpseai>HrP1V^6Igc7D3>jJ%0E}6;o5n zU#})n`T3i1auuAi#`YGPQ4rU^d&N&HUP>LzE-X~++o-Ld?=56eoJ;=P+e68dTX3P3+m|KM_1otIJ`2he=P^e>FN>%Z^rYg zWIn>CNtCau!wOGI!lz?kkYq{uJ|_2|XF^RJ8y6S%TdU_C_xI#Ta$3MgLBxw3quV<; z%%$e@ot>T8FHj?ZJkY|!!>i5(g@i1=wYarBKcE~RAJ0=~(zf##d%*GG5LH=OS^E!i zX2`Z3e~<5=VUYxv=J;YJGpfmU1pX6ZlcTzu7j%79Q&$&KU;iv~I!kP~Kh&2b;zeyO z7b`34%KCa(?}MNZ1G|$cSA&Dfe~)?}WZQeWxxI*qQ7ZKbe%f|(v{1aOEZXT@r_C{5 zHCF+5xLVkC1<_dFCPhj{rqheagKAPe`Sa%w0pj@dw5Xtfrg4CaaJte!>iqn?!Ff^W zawE;`Z9zfE$LlM<Wo4WM$D%s4OilzYYyK zrRbWNs6gf242D9Uu|Kl5w4{}hmQF}cCP4D)gP^~U%gV|K$;p*r{j4g^@Ss|d{R8B& zvavA>31yuBoRb0&W(W!j;^yMYx0@(w#9S{Q@g3J32}ZfGm8>R~Ka|Nop`|7&BSIP9 z)zxKqi)Bi-Loz=PI!{E5u5^ZOkLF8xY>iSYDk~SU88wX_u68qXbJv|@PM{(@Rz9IL zo{*7d>>R{+%~59mPHWnI#p@|6J#>cv2v`llL`9X??GMFC%frKiI!a6Y(P`;JIw1eQ z(+M@FaiGMl-0Q!LJ-xm4d6fZJJ@<8Vb?xsp8W{b95?o(d8FikAT1JLD}?m zcD{fEvOsinOV1@wrfK<@k zsv-dB^JcJarT&<6pvox$9sp0gv9a+yxt5`!qPe-by#pVi4e+IG(DlFOFTHk!9o6&J zNW*xdFl!%3FnjG^5cgG6qz4>E%`km zL4*C>E6L2r=$f0mpT=$?X<<=d_#;a!K!`ytr;^mnQQ`S+G=sjrJ_12bPR=Xzj^`gP zs0r+F$rrG*_EpI$pb7DaiEndoaLmrlQPa?%0%=+q=~g!loR60AAUEOLw{M3RKXTVV zY*mfJkmC54{p-7@zAB}$_x!y$!6PSs1#??_|0Abc?mfVj%IXph@y88Er%k8^#rSW@wsN$%&IN8UKQ6#0LxPq?yt*oq8{{32(3k(#a zp{0dxE4?m22e!CxV1mphr=SpSN88`uM`X-6sALP>)6voSeGqhghXzRo_O;8zX8tH@ zYHF2+jhJQuXZH#U3-RvXkIu>>2eEwf_HE0eNRP3M&>Qd1I`xs2jRg|@;5W<)Eld-D0x0Aib}0oYP^s0 z)t?My@F9Y4-668|_m{ggqDk&YR)QpZngioF;x78l^0ZH|lNN9^NO+!N0j1RXU$`5$ zdF|yp>>t8UhXJ!_^zP^qlDl+=l_5AFtr!ZdZrA=-C5v^R@ zXD}i<+W>2_K0bmWAt6+Rn0Tb%^w2ReC7(WJ0Ig71?kX!Q`y1Hka7xc?Rs8w_Hz_IU z5HNmax4PpC6m2+iJJ{H;`S|$kQ-V%5RS?1Yth#=Q3$Tl;D=WciW`XxpQ&YW9hWJ-^ zcVkvoo)8ifuR&)zp81GR;dh7+7hF0zySr~FrLuNHpK;7uB~MPb#%62GZ#aKzc>%mv zrsJiya?o*&hIpNpX8B_{`;CAb4VV`T3k%nOmuJqo9SseH&wdO$)r*ouY#wh6AX-ho z=2f14{ky{no(iEpq-!7DbXN4x-rgR0=q#tobzHr?WPyh92?$mX4yupd3ylY@eZltj z^Xpz%AOm?P;JzL;?Td|9?3DWY^^>(Pu_Rm;H{rP85fDr~ZOSM?LO|prt+uv-N`v~l z_wI#L2zybnuwVk(M#aa=xw^WR;vP>77+}fYrhfFO5FiS}taV%aqWg!K z%`hzVHm=1;j_B`|P+aYQpI^LqfygNJTlyG4CjR&EhOvo>+tptmgoKk5+m|?s81NXe z9*7|q-UgT?IY#aLK41i=v{Um9HreK?Y8>Iuz6X1Hsp`JyD9n zyDaR~%?AoE?ySWbz+;EkWG(~dt>5m;r~A&hjFd;$^nuD&g;yDl&~sT39^icSTRoV) z_U6NDYB>GR=WJNk_M$Kd7*>EUd|Q}EoB5ro(NzAl85)vqXO7@ zo~MKA8>>edWWH?JAKDq-9T%`e48|dqkXEkh)KWj7V2zkCtiVN?CR~6E9|LmA7l3nA8y-5tenl5MW&?OYjT_m0sQWUkEc+#qoShFKlk=p z0&}3_;5a{fh9uB&B@QI^f)(}tk^P)A@UJ&Oq$XpA@WY^$PcKOL>coghg@j z$}UGzV!B^5Wh>c46neZSW;eD?E*YZf>`!J4jnZE<^lJ8sP-nV1`m=!^9|I@}&Betf zmLidX21o{-2o^21Exqr1d)Q*R)ngYZFuEI+3s3z*&v3gqu|VXIM0B>e zt<_i$5FtK+KRhK0&u5$~em5G!1Ma#ziC#%vQ!`|ARQAt9*9fl@TF@>VfIHAhI(*flmb z4@&fhVG!J*>tt+;~S``HTF|1!2YCn zh*)hW%=~w!*(!~iaj2=OYiesB+uAZg24*y*FX;c96V&%D7ncLw`K!MtYC4pO@?ik* z-@m*fPRsrNZ9QYcG9!zN& znX=TIh{bBgZ0h8Gbq$R%drh2C5mE2&pQEE*zLW$CXg+;Nh&eemb@tmJJ9}(tAQ6^B zSs5$G`#VO}$b#OUCM~Z%^#XgTYIXt8KWO)^@H^YUX5|eq*0Ji2D@Ey{3V-o`r&{hF z9&`vR7Z)`$erN4~BQ83+FmDmcx%v5VkTrI|GN0Fuwz8iuQPUJa$PtIMSLP32FF@q5 z_4{be+Qox!qIO6DtTeoj(fvL!C4)GmZ+STv6j$T8xZk-WDl*oA+Hb|8n7GfGfR2^<$Vt;W%_-%=jC%kI`4^S~m&US5UVL=n{?`#HAt;Zn03-1uKj{>6EL9BNQzG=7p z@9naxs$xhbH36MVe^gdimqMEcZgx*VgHizQD#`7;_v3hkynd1lrSn84B_|sR{(SdD zs>7JQw9#P(KX-%?K}bMwqCRl&kmM!L%lPImEiaX)hWaC+k?q##0zkBu&N zvEokG)pEwZC6+r|et+IU)_e4|7;Jp|+&!Zs(p>-_6pj)bRYqioD7RxBv?!o0j- zr~5#qA!%uP6@8TC^I9e**m*u|+G@p+FqB_+5{ZtnA1t<&9&_Q2msl6Q+OLTD{p2#_ zne>j^-h898ikvkWB>K7`+U{G#8=`yLO?G`F@=_aM5h%{B8h2kw)8Gx~h*mr|C%-Ig zX(6Gfr+0n!%n}kEk+VrHCU$mNH#e>YO#zR-i<2M7=->PB2{J@_!)56Tj1>`G~vFbsWz^R;~BIe-Wpiu1jlPzyw->$*ISM@!nvhZ$+YW94g zpMZZr0H~DM{{pX5lKpS*LjkxgA-38pX%^08=j6N#_`)4^<%_cy6%!*RAt6z^EXm~o z5OD}%yUEaec&t8Au~;DB(jz{ef!k@G7yK5Lm{^VzvuK2<-}$HU@j5A+$^9^wbY)qK z+BcxyPlbMDNr}_Z)8ln>E*et1FhQhC(9QY!_3O{b2=6W-p)@pvtAqv3RuwBNIs+pk z2lDVd4ow4tvX`WRB|*gR?&(Pn(OpyV*6WrQ0etkE zP8J{C{)&UQ226l`dspw6Eldk3K22g2>Wv!;`RZG`)RDsq%F1+<@p8gmKc5)A9G=EMbBi2EB_W;_BIwKa1968;V8K+*r55nR6TE8Bdli00Plt~I?G)A2Aho*sw4?LJ50f#sjlIe&-j+R>4f3rh-gL%YRFZF3^rUl0)y z@djL;ng#^H_Ne5FWkZ(6#KsouBuH*TmE6w+uuc+@54s$Z^c0W}bxlnrwU)i^Y;^X{ zc(D}1sQ~(Ad3h4qQj^bMz5kr=(Gn04fV3;z*|Fc#ao@rUmwas0>`X6~s|H4CYU>0` zGzBifGK8PAA6@v*1HaA$IOf3xQgUwYgY-9Vkiq_J>WMlN6H^{cD51SQAeT}KqBMFx zKR;3~i?G(XD0u=KY3bJ~DKe0-BX18dFfhJ_2FtLUevk*}3)E)|W$HNKvsG!*mI}NG zFf!H?Lp+z-eI!nZd5fNoE&-e{u%#wMoC`^mEMUG*f7XvANl@h#E2W*6*)6A}q%?SJ zYr+{oeo#KaH-kTvg@-qm8+4@*L(IVd(*g4i;n@qZBUxuA@VRdd(LgLZ+& zKMpmqw!8f~cQUMhiVfwG92<)bLdEVhzw7!4TS~fU$bSCA2N7vGIi%R-n@}SAcTtLBDKeENr%Cung!g& zwD@0eBdv}?GD9asFE`Mzg5e5e0pE`e+%=s1FR*-W-#=qaLYf5ZssG-c9&)$Y)LtRD z$QGSxJSrKvv$3mPQ(etF!8$&XEyZ zSart%Zh0t+qs8aTtDx|ZV~2|!R|x2vtj`Pwhlb1@9AY5+T1&Ud>4bfVe{th>9oxW) zt*z}Rum|y$y>Zn1{KODRLlT|yIDki$01gSntw)~;)Se8!;d&$F$pTJedXczeU-Uk4^KS%W6weMJ|;IANIbXOrfQp;$#p++dk Ls7k++d=m0Mi}_Qm From c5e8fcbe4546c753f3b5577ad5746f8fbaa553e6 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 08:25:15 +0100 Subject: [PATCH 11/91] Update dependency diagram - fix indentation. --- dependency-diagram.dot | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dependency-diagram.dot b/dependency-diagram.dot index 7ab01b86..a6f89905 100644 --- a/dependency-diagram.dot +++ b/dependency-diagram.dot @@ -1,17 +1,17 @@ digraph MagmaCore { - rankdir=LR - node[shape=rect,style="filled,rounded",color=black,fillcolor=white] + rankdir=LR; + node[shape=rect,style="filled,rounded",color=black,fillcolor=white]; - jena[label="Apache\nJena"] - fuseki[label="Apache\nFuseki"] + jena[label="Apache\nJena"]; + fuseki[label="Apache\nFuseki"]; - subgraph cluster_mc { - label="MagmaCore Ecosystem" + subgraph cluster_mc { + label="MagmaCore Ecosystem"; - mc[label="MagmaCore"] - hqdm[label="HQDM"] - rdf[label="HQDM-RDF"] - } + mc[label="MagmaCore"]; + hqdm[label="HQDM"]; + rdf[label="HQDM-RDF"]; + } mc -> rdf -> hqdm; mc -> jena; From 7d85a8965de13bb4b170ca5d8ba36d9dd13562c5 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 13:58:25 +0100 Subject: [PATCH 12/91] Update dependency diagram - improve appearance. --- dependency-diagram.dot | 1 + dependency-diagram.png | Bin 20447 -> 21133 bytes 2 files changed, 1 insertion(+) diff --git a/dependency-diagram.dot b/dependency-diagram.dot index a6f89905..d8a655a6 100644 --- a/dependency-diagram.dot +++ b/dependency-diagram.dot @@ -7,6 +7,7 @@ digraph MagmaCore { subgraph cluster_mc { label="MagmaCore Ecosystem"; + style=rounded; mc[label="MagmaCore"]; hqdm[label="HQDM"]; diff --git a/dependency-diagram.png b/dependency-diagram.png index bdd2231b8effefef3cf3f337285d9640990f4c25..c23d8f01c1f143269a09187a5095ea9366835ab5 100644 GIT binary patch literal 21133 zcmb`vc|4YXyES|ol914#%pnbkWF9gmMbRY6REWx$d7jf?2#Jy@X(B^rGG$5#Df5_l z%#_TY<#+GBpS}0H-{<+`eXsj-f9`Is%XOaL@9{m3b*#0H^MS^>Q`@PSs0f1Cep*H8 z0zr_};lJdRr1(ii$)YI!hvJ6nDJ5cK^FMKgZ^8(IgE*}uf64L1M3A%k^ zEGBePcvYz{Tsa_i?Z~ymx(bOJ^GVn8I&*ccRWp+;TrTWtXHk#P7N162}Ehx`zun)OdEv(UHrO`jkl$l-_a2 zXos{Zy*Wy~o%VQhsH7Rh_;FA&@I{*Jr}QSL{{QkTPRf_x83pvDT^5ovGc!MY_>hxx zh0foTgYp+63++K(-lPv7WZaf*ZES3g9Xqz(96W8k-uC+S>n~rvL`FtFf6m14z{tQL zE-tR*?|od$;-gZ7%PJrWvZuG|Lj@w#hx&#` zZY<3X{_Za9_~c}xq4C()w|u(Hn}hPR#)S*thw7rDoSf%XEIQlabX|+*emUnGzNCzGJWjs?jCPRO)%k? zmGvkQ3JMA$2pgNZ_V#vqT1z>Xzf+g5T-mW>hrrRJ7PoHYx%^E@OiT<7y>Q_|sAo`Q zM8rW(PR@e|Bj)v6Qgl0t+zPzCy*-1z6vo7`B`bQ~tN8x?dwIEUsljwUSG`kqdir@~ zWgc#B-xk*RzJx|oAt51xFfkbxi2d;P?c*m;$O+$j_ktWv$;9stP==_u&JJu_QKs^n zZBm!5C@-g+%DsB^>ihTa*F=|>mudUPOZAI4)}^A)Rf$rVia&h#aN2RT;t``$SIDrt z?wfPb47+!;Ugg>%tmY`Khiz+a7Cn6Uff~K|! zU;8xmrDK&sjpw+iXmd>s^+H&MhJitEq08U(p%Q1Gl{mS4caa-2Ub}YvXl>og z$oS^v%U?r7JiNTuE??fw&Mv^o`D<{nqI*`#V6DL6HwDq!(c!UgqxRYHXB&mQ4ILdT zBaMhCHk^gJSXup3r?z(K;e(8fjC=Oj4}XjP_)*Bi!-F%VwXxB9ZTZja>|Jy7$)8DA zY&M1mWH*+A!^3xv7t6@V%*@PS!+Cgkva_=hG%tKe2x+I;fp5`Lva8c%wEov}EV@2i z%gHY&AVIR?(=TEnG_GDdl~ z-R9!yhx+@E+YHs>6d4*Cvf1~Kj^*U$?jf8m{t)#f1a69rjg9w8N_qbb&YIKwNaO5a&6O0L(;RdYlamrH!FqRgQu=mx z>(QqADa2z@hugF6n46m)Jon=9)2BsFb39?y(jM!p4n1yLiTjTpMTwd-5gZ2(4*wZ% zp{1qWw{KrXMFj-~g`}h;K1HS}W&KNO!QKa_0z2C5(NpAh=lXSeR#x3>*X|e_Cw};F zHeN%Vyv#_5jEqb`zo_%)PrE;3ml2*kVcL3nDevD?5gcLFru!tLEsTxrW(Q7F_{k!Iev?=)wKpylxL(|D(av7bqV zXK$~8t>Kj`El58uE-uBj8Tc?lNSS?ne7yd-2({a%TTMI+50nxwJX7Oo5A3U#-B5~c zPdD63^frIEHsT>>(Md_t`0&y0}RBFCRaCoP@~F&wrs`^Kdusr%#`>Hteje z=@}VM{q8mI%HLg=p~f>8>#=@aaIdJSXmWvx!&D~;L1Q0g@T>g6jT<*o{&_uO6nOgN z$)$@I4Q1{a8fI8@NzPkipS?LAJb1w3Jvu&qQA6YH+qZH#8w(wlBR(||0%SzPt7;>m zmF4AtfB;kBc7wr2hwwjL`z8jb=Z6#{r)OtBW@iuGV(e}=LCyK|=T9H`u}B*`JEUEF zV0CrrIKjcgQ`yz!R#JLobaa$i)Qs4ed?^>N(J*Nww9otiLA*^$3TBsGuMRsna&crw zYg>j%!p7Q66*~!m8Z+WyXJXWGc`H*UO)j*fo)nrEE%wuJ@qWlU_W<&7KPJ32ZV8q!P~Ip+_v z&~7CR)%gq%(Z~$At7TojE zxCSS%@pV3GYP75eTbD!0tWFV2Ot&lLPJj)Ze(A~29e>R9_4SK)?zmpj(Q!>rZyhNR zWho;&n}c;iH{vb=}x_@b%d!Dr)M$fB>x)A*@~xJ`yA2a^%PnBV*%6QDfS{r9XE$ z%pN>^IGgWEqLXtoGxW)m`I(t_si}Ye{OQWP)#Pc6&+lN99_jBddu|@R)Wf_+>HYTI zJ64IiD5;B!i$*tZo>5huV%~$k3WYM)2|R6-hTB z{H7gUO-&CaWe*MA%=CMr3IqfggHkHaa#TblTx9LS<;y?khU+EBn|}V>&C1FzAmB0Z zCB%ORyS=^r%fNnupr;S1ixPYD`n5%S<^vHsHvd`Ey{=9Y4I`v;6QNqiHT3ZA}DAdbPJwd-c7_IFr}qC%gPkB zwcA=+a`N++OMSMET&%9HMlN~!^l7q>`|2XS+nICcEKuL-V`MTiGe6xOJfox2`8Axk zvAIJaD<>y|ot`K$5L{oKQ%4Aih=`y9M+oR6lXVw+$O77Ma~q+Guy`YJ#mC2^9ufos zbK6dyv>dWz-2zQ{`S|>N=c&%TWW()RY->4bX@XKx*K~AT(;~{&qILxGNOy@S{_dO2 zq%IfO!G1#NjfhsUyPKXKTfTMKz3r)bg*Swr2{Z9?a^Cp<>NG*v+5J)Ur_IXF7J8!I zLtx!pb4Z)D?EZBA{P~cuFe#UX38bve5=Jh$8vRDsG3wOK(eH_bCsHHL;Y7t&Qwxiy z;o&DwozBY2iZATk$-rPL{5&wQt}2+lAV0soqeJz~8H?^u)%kJEH`gYxjeu+-hy#+} zH_jh=;<3JTN?koTDsccf60muGex9PBurl%9y?ZzkZfCy`s7kk9FmcOXv!0<3qx>}5MUUD)GD>JD)ONsOf|8pq^3uR^Ht5@6693&+r z9aM`nFfn1=y<0?USa3wuNJv{pXBD|}gyuF~IZ16s&!KDoya*z!+LvtA(b&wav$gfU z-L8hWBrA4q;|8IA9P&Q@f48ImwZAnRiZvE`h7^Iz0<5w{G3KcyZ^QZQYj7fDBMY2dcvc2M5!GPI_Lwc1=}PwWGb=*~KM2Xiy(ej~~BLj};XYYZ|q67g&~(Y#5yfn!wNQ`T7criXtD? zBY1)Txa=j#UlkNc@$sqY>dJ6)D=8}WuP)8u7Fk(YwTgQb;@`Y^laew8JdVx{SX@X@ zaB*okmY0_|{lu-Z%i7vYbM>;!d-vk<#U&-X^K9_$ls9j-j{jZpu(h>)5)lzA>!GKp z$c4X+Z{XugE+}yE?dFQP0c3;M;Gf;0)kX*ha(T^UEqR_Wr>?bYay(&IlC``z?tl0& zIpX#R-KL1JunPBgFS4x$7J~t$2AxH29mqD9E(sqxbYCIffVELW%_wFg*xWSoPpkM4B-BNpaS~@B`d~-8QO(UbD>zaak;wC1{ z6crUEBoNws$%cK~eM%{5X_e{9Yih>J{C8;iAHS{f56AH3>(}RzkyynWthAO)%*>mUP!0)H(@{F3S6i_$1N@%`KFjoA;Ki#<;(j@FQcM54z1b9%pThH5CAPi zCE(%1&yssA>>M1B;vU_ zWUPfQNl8iRMRasQK|x;U$=umZkPfC``*v3TVjf>|T=(|vC+P-Ig|w<>?QA8x+S&l} z*U_hIRS7-J%FK+6ib{I_zWK)w1J;@rK-IVJ-#?Fv%E`<$V5Mf4c3;)f)9Y?)dsfqN zQsIdSH5C;%H@Ex7nnTQ(zZNMeX?b}$XoGax0bXw(p9f06)>i(e(;EF49~p@hGJY5z z-#1(zn;zsBhB$b3++=KYG(K9W>K<12{P{-Njn%NI&!0n0u3f!~%mR#B)HX$4cIr(N z0v(MGDPbBE+qwQkG+jenIzr0&d$y!;o(Rw>9oG}SOPloJg2##E2>ng zF-VgM@891>qo59an3h!FB!3)Y0O%4)I+Cl!?lNq_#f~$a9!Y~XF@<*HPhY(n zKrdF?bGz6W?*mWtS(IDs@Zsvl#`DNP<8qZe4i0~@5$GS1$(CABUt>QLu z;OC!21Vl!D>AAi1!h~JgQP5#Zhn}8(U2}zhCq4Z$G0X0MB4t1yNii=k4?wU=^6{~n z_I9S=Ds&%o<8teNru!77*({BXv0bFdlMzu-H9ggpi!V&{i(Dnl+lAMgx1Eg=-Q*Fp zPR*o(R5%h&rJmV~mR;?+@aebbmH|u-o_)@}e?P8?R1ECmk?>{Q({%c|6T@w&!|d*h zUd46_V`F2$FIAEcJ>pACcJgZ|IDRhU0>Nh%y^<+wxg?yAGaP~@_(VtxFpUF z82rDJX6uwJx@XS3&&aSLr!7y!))B<;&gihPi@LgX%fEq{Z+?5R1g^$b^PnvkTd>33 zyGVA58!Ncxfq{WtjEuZTj(m$eR`&HPfTe3mJ0-a{8p}_gR-YWc*qWNQI6Hbn7PKu& z4mU$JG9oz5v@2p-(rs;Rz;4Wf0q-t?sgkrSd86^!{(JHAPl|-4R~ccUp`^sL(@p0X z=Yy_U`iw*`3O5VY{KCS^LQaBMT3RA|YHe#vP9RgXG&j%git(K2D!79DEiL^iH#avi zad4`u03aBx(dpBtxptP&Er(Fq~npuv%{~K_DC6u%rAvIk}yN zMp#fV*KWKS$P#C-tE&s0tv0LwKAK7(P*x5Zmx}ce|X#40l zS0I)tp|Zul#!-3n^lyI~wz8s)i7Rt_Vb!nx8%HR&VdkEdGyUa%A3@ZPZ)pv z__1hZN(%I!NqtQGwZ%W9p%D=+O-+Vt4iyh~6Q1CG=XvLTI!3C!&dpr}d(!p@Wp8n1 z#fH|vXx2F|W0+gB779I|;ufPK)h`q%bF8w2jGm|w1qaI4az&to8=-bz? zRNJ>2P;khTrv0A+GcSDP}$F(iE;_KHjwDCB>-@bht*?z;_Eq|HyPTg}6!t+i` ziuIx62GSF$PfnuGtE%$1A-EDiiWU4Wx|U{8I#?62^i%DavwD87L3X#ffdPk4=^|K# zR|npEf>=S|T<_@yaWYi&UmegX#&UGD!^| zP*I_bKBum#DuqNGer5{+#G(W$lbrm8w9|#RObA|JI5Dx7s;W~bPx=-2$k1k6bUjST zYP2kXNPsh__sNl-oxT3L1K=DmQ6@=rR!EC_%asrnZo>2F)8;Fxw0n0HfPJL!iBCv4 z?kh;{rJR6RuSa8f{=7BNJwTY7o16EEk+7d3BRnj1z^ENOQ{iP861 z`%{x{1f+kbIoaC5K} zLrzxKCK;v1W7D2_%k8EAWl@}5Yf%9Mozx4ic(zh29hNh%E~16K~Noh(J+VfSGG=U+PDPPP$5^e^&? zrZ?kBdub}se3B4|tHIZ+5i@BGrkMzY#!*{6L%Kt@Ph2f61teFM09DG$xI{!Q%iS>z zdKmUiKXOo;kTWnau(bS*8*SXch4tjyjn~Lp6P~#G*0#38hYq#2wvLRB0{g@akM9vv9GCodCXrY#(!nQHh_x}Aa=+2Jn=Fis%6m#?N6oDiFppQ7JOGQPM z@3vx(Xz^bL-%3sFMFTo~oe^8qh}4j6_AEJhBDHw^HuQ(7DZMLKhDS#qthbUAt80II zHdg0?al666!8tiO0J*`k>yFdCrC1L@&AI-<0a?lDZw7*IFWtU*a|qnjz16NerlwkJ z#jRUKkaoRG3+~73OJve)g^)l_#EC^~=Wf_;f1Qx93Eq)hV}y*)0L;3&N;^vpCKUy| zdH?<^5*C!B%a=v?`2$z>D({taIt!8(tl%C2z2vuV7jc7eVh0`HZ{`=0eT{Y%E7o>) z+i7Wo0s?4gY4NQ=4;~=+*ahDuzIih~I_kC2t^P{m(1^Xzvw*U`23buMRWOAf5LK3U zweLCZvS2n}EW5tQMU-@QvaF?U7QeWnBDOUdaf3DT&n-PKrlzJqGJ%jt&o*mK+m9EZ z5;r%wc^CjD8G({M3djJG5``PA0O9%V+c_>SuBj`X1FNcMtQv-bP_dyc>F3*?K7XFR z@bU0>5ate`_!jul2#iP(1Qa|{f~Hy0E2cbkA@J17v-r#DRvV*CG$AS=3|vva(D4Bm z{wJOwIXN*QEFyxc(Kv~e3l1376>pZlx`qWQOt@1jal*OvuW0`V!smEaPu+WL1T z%R9SaD+L8k%-xNn>3q8Rwv;Y2Y~Pd&t`$1}xiVhfXSFsZn-=>B z49R`SjLp@%x`OobtTfJ_Cm}{!BA(T#Ujc!z!dzfn^K?72Xk0Lag}T~Wbe=j|TDi`D z#z0rO|Lt;k!PQ5%p1h!C6RF;<`#iDn~h!sQuhl~kcF*!LIeVy7$U_j5q=5=HBc8Dg!g(7wL=((;ziI0(%7(`GH3ayr z^M{0lXrn_7V#U69a<`>2(96wbF#Bju4X-qimhk)C9i$;>fLphN+FMRSNYf(_u_&TdD(OdRls#Oo1D%ZrOYT3VnMfWN#|BIM`ihc*M0>vcP->u#O&VsCu-u|kvCB&5kIEj5|iH(1nASgzCLhMU%!3@5e?!dc_rpQ@v$GDmjE+2r|NG^ zv>jJft=ZJyDk?tcP4QkAdIl+CZMmL= zXy^z|p2TkfK^{GLa6Rh-8G(j9H8nLoeFoZ0Bmbo%yVsa2p;CDgf%|%mf{gxfQC`u;BKN|dKe}4vy1Zin$&?o1$ zC8OEs=;B_z%0vWQPSWJp&3~d0ALkM;Q2z7hAIRaReYmyE8ezgyiPKu*u0wgHPdua0 z$h-rnVV@7vm1m`a+4a!AEuR4#ZM5lXZeD27_lS>OM@m8_Ncg=wtooDNN_I#{BkD9d z83jc}aF963Uzzyk7iSF72oi*sT%@QuPC{5l#vGgu*yZ{YMK-3fDFR%lg8iDyn7(RX zyvTL%;3*C|G!D4iZ^qIizx8d47D|=vgM~qfM5fU;F`}Fa=nm`NF)S@A zS=mK<7LE#iefH(ZKj$i{s`Lw;vydd9h;J%2D9mUifJ4htm)q>@?N7KZXXfQOm2@GA zZLF{SE0BPp1!a9I;)-iE7BM0d-&0BAXwe7V{xB zH76sZe_HHv!wlu{>0y_cijT!4>a9{%aZQt#G&NstKSoX}4_M`PMqgi6RyJ1P&tI;? zha~_lO6{Sr54)exJbCiudba&cji>JTDH>XTuryFvujbtyMCXLK+G@t{x2SUV>?Fcq zFU54=3)_I-KHE=$g}it%%-_EXh5F7vuZ)i$S65fD4 zW}rol`mrGM+`;I2r>Alp0j-grQQvMF867%&_yZ^ksH;FnwJ_m4e8>8Q7)2DkR$?w!E>hpN?xPmJfZF(c?vJe2S0LTM1AAExV5G&|G zu&6g!zeK{eaz$TX;1aJc`tt+;5s(LMRT`mmWECQQiQ#@%;Hiuu__5&O8M1;+a5|e#64z=;6al{4eIw!UBBH{XHlYJ2&CI zg<6ICf|?qQN7CBUipol)KdQ?yTZr7eJQ>$TD{`iZqO<5I5t(dO&YH>hA3WgK{^%=m z;Z8DVSTz*aUn_^so*34KOoGlE+TK8omqP;`+9~|o2)Whg?B09fNJnEMBPB;|z2TF& z1il`v*$q||4U(&-IlsL#VB6@(h{om1Ym+%Wj_>y|J&uiy z{rGVf>yt)nMBw~_n*y8ySN0n4UoBFww5*H_q}r3L@Q4-$A)sSXM~gj}Fr5X|+*yR@Ug)7}LIe zf3C%{{-Vf#6_}D@aqSv&bGqwEP0c+aDm2@-S4ciSFMusqQ25-^!ZeRx1BEN>suNbflj}qt^L4` zPY3!fxMU6vPvr#A!=`pC3+6D!Sz5{-=~iS4ylH8v&KUyC7ih;S#Wod>aPo{r0vMc z@8aQ6xle;_@YIBX$DEK6=DlsQ-yx6O=w02Nqgn@Dq?a9=fe8^jYPi@=@2UuyAo%K?OkN zk#$=(LKAW0hS2rTCPtzcb8< z3zHp9-@gOnfgKkE5ensGzqb9ZYrCjWrxKArKx@PHB_b%;igpoud1{4E1)dmmvA|4t z%k$^YH?0j|=wH6PQ7n>}_7kiwQrM+SwlH#_6Fd26&tzxbT+Lu$@q2hKTU*5i1nOH` zBUcI?YcdE=zyTOD$Hs2kE-C0i>jbz!8Q8UFkLHyt9x$zy4<+qBBF=ISjQzE1E|8SL z@9Km0@nqlBVBmmTT3K;%ayotHOpxmfMSLhCH1saM8SMp{zK^N57VFR~;kZS?{*|nq z0cpT-`DG9lx+Pf5AV2cLm4fm#I$A3E(&MzMYSP=ctBd`?;K5g*M`^1H&whncgRF^& z{bequm--B$XKZAoprGK`WgQ^Dk^|D~!n;eQtbEWMV%UD1G-k6f@t5fv|}`3R@@4DT*oAYg^N<`{d?2f+|sA%Y6IxOIewZ90x=n z(JHRu< z(Wx#e&XBh-I^)Dc3^7ym=IB#;(*)J{i_u+O-Du?bjEoGl7a<|^#bd)JF~&|azbcTt zkPv*$C%V2sb$0wS_7f-K$IqYXL0eEsFM+t!)D+r_ViO2p3Wts%>n`$bj0@J&U>IDB zC3mUB_~9Orae(eXM5G06AqddY_0dueAkW*|uOcPERQU~Nyzw}Wk!vJ#$#U?Zq8EqJ zVR&Ew%*(cMtMwf|r7G&`JqRsa5dMz)%480V$N?$UB^;*0-cFhtXpO?dFC&>tl883< ztp)=!0zAsf$Uul52FlmXv4}<;YL=I8h}<%lOl*pe&!6MoPB>1>QJRQwhgIVv0YO2a zm%0(9SP0k}Hs8LNd@k7lH~K6xa&^8*9c|v{CF;U=??%CkZ+^?fgigNgXspLN>e(YZ z4Laf1y=k-t0ZomK$PEP^8%4pvJDSsJ)U>rFpgE&OLDvogGIk3k4!KvWYKy$#*4hkG z6EiawU}{!Yx5eq}s5nocVZC`{0$K?6raO0%K);|f0X!o!zPIE#>d zWFeBJ1^Mk{q4n3RJ>jvggIL6wMFgOK9G{x1loY09sxVlY_#!X$6Le{b_Nu&QTNRIs&`_4Vp!&u+(Fn9h4S*$<#!M2}`-WF+l8|D~aUZrm#OCpa{iuJI|< z8t{=2z7hDbb4Nk<`sy-r+~1PT9Kgat>i|DXto!mUI0{e?DkNDfkP6J(K5iyGR9e(C zF+st!^z_qb&$1@Fg6CA1U7JUf5JJP??Yr+&4C^fj|1iuhtuEP|I~N4gRCC`n1?zcx zd^1>@TTQRc!EHdVASd-I4Dj($yn6Nd`}bow%g`DHUzEXH^pf||--QKQ0jqVnQ>Ay{ zptyAlN7_!jVWc!dyO<*e()qba!Ru(KU=660e7gS#AD_~dI#_yWcI+^zv(P(#-iwEW z)QdwvU<3GQ|0PgB40Lp!OTH#7U#hG5^^2qr9N3bCOx3t$NZSkz)BCq?VNbsJ?h^Jd z9}NsVhbT0mD%`TN#mM^LpI|o?-UpuK)~!(#erx^x&(uKOA0rHKTd)d2Z9p8MxX^d1 z_HK(lXK7*KjvNm$0X6dx#}}yYmR5k(7FIg)^sKA{VbxmxWZMKH zP14bZAK>I<*tN^oj>EN~si}Wp;796*J%ndjpVG;b$AyH%CpubNO<`f+<=qUg^A29I z(b49>lQ74Jhx^&_J$?*>iy_LXG9Au17f`nj^fhQsWZ5@=S&5T+J&ueN?+rp-0Te*{ zCm$c>;wqG&07Rvn zg9i{|QWg+L3ly0@^YhpjL7JH0|70j2XE-WYPqjrddI~;te*Wl)2!A_1MeDy)x(koA z$>ky2U@3~tQs8Ys?Htjwu&_WT0Sy#c`Ar=*htg8{lP8Tc^L_`1uWB$Z})4?`@heZ7J0>=Y|T0zUbVzorQ4x_HgBovkf=gpv{xCzX_@k4c-_mPs}$Zj4P$p#{%|?Fy#P zw4jq5=$MduK4xTqfCKpmqeE_IdO^Xae-vQO`_Uw#3>brquyt_Qk?|hsQkqR)N2fNT zB<>jT&5}b2Bo^2S4xT1V82>$Y0=H|OccE5x^ z3k7KDLin3E!vXt_XM+uiXvbe0((Y5>48cGMFARZq?w|@iv=jG+0q_>6?Yb?V;l%sHJ*zwOI*F0pOE15=LgE? zW~X)eGEDK(#$R{Y+S!6_n%9QSmzw$!iW20W{ge!BY(W+tD+?b$=|LehH~#?k6ur$d z&+oR3tpxhl0ffuw=r*D?!(>N(4I~NdGWZyfCU!n%j%` zI4o=vxSs0LxbzK18oV!;Pv_!AOmwi!&)~W?-LUi%Tb}Y?<2iiTY4rO6;FyL6gBv$U z2|53zuV21QK;P$ooti3prv5+XB8F62)ey{VWVQhAPoR7eQczO)^fLK}wIG(luEf`Dxs5+MJb ze)y(~m|58rXaIJ%NiRbYD9= zJ8K0a89<~83=E|H4^uZ&r{7H(BsLaWkWFXaG&N2livR))(^dY5UHgvozbOezGYs*T zq_r6dWdg;kcNeGoHrpHh@qxWhLqkD~%ncetU*rl@MptWMe#_D__1!yp_8wpw^o4Mk zDJYN<7&A~yXhh9HZH28-nI{ZagslPv2;RgQ?H+Ch=0tQYn5^KrqFKfpeGZmaTq3|0 zj*Z8{#4{u>#20*5nkhP?LqnpZmZZYU1}@CBzcz(%KaMY;=3qF}(t+JkS63ne({oVy zE@*1f;==TO#t{W*+zEnQ9_s^A7seAfdGg>G$CrZv!+1mn&+D1#>5@JxBxbbT0A^ye z{uur{9#(B;X=&26`2EKZzC(u${^_IO3nK`2_E}jmJ`kZr+L0=oIT#;pXK0R?{k^t0PVSHA7j z4$&i%J;fUl`tDc+6;;(T$vw5OHX;qkK&(UGjuy=7`yLh3(($(Q+jPUhJV{7NfvOYG zN+ZVa3(9dbK%f65>?o!$9UUDzKRGqQM#iJ9B3>#jwFgxU1;7U5 zpCBWU@?qV)i!9%8@0OHQLFwx*Z;o2LO*!t4_;XC6Xlu*3EYOTwDbq@B?2$~|L%!`` zq)8Pm0F1A%FNplwSlJCkoR+`OGZMzx_sPkf+2+hXr5Kljn;gR)H}zNUq#2iU+!sJ+ za1kdO-0v~VZfWRDXxj}~X(_%KeS~Em8XMg2c2MRN70c9PPhiRfV`Q#Cj;I_cdiW8# zr7n;^4Z3LF5WD?Y(%ZN5t@=I#q!_L+#HDW?YD-sEQX0T&fapZWn(wi3qPZ_Xn4O&+ zX60+wI@mo{X8?C_%;C<{%fg816K7Dcp zhrn@rDD5#L?O$2hE{ww75@uR_Ztv(c6QeF9Tn3gGGU}&Rlnhl8&Ei>CMI5l zhN7L=fP)OAknybDB%kfNVzYwYgu2`M>a)2b0D83Njg5_zELHeYfmih}_YHhhz9aUT*2tUTPu^0OMZf;}(OO``debw(huD_q-zFeOx2$ zP}?zD`Nv2h=q8R{%jP?FjD8%ty#c0dnV6W8x0w15K^Xaf6rBLdT!pQZj}InO1!Y zQ@lg5FgpnFefzeVw7f-af`$Zw0oXZJCvTH!#XySI)-9Xe z=6-@OH8Xo5>){Rp82H&%EN;^dryh;Y>c!vhGs;Ti0lztbTBz7Dd#W^ z526gi>|ef6j^}b*-#W)P?*TP*ptn~8YFkXqQJS4`pOBV8*MlBJQ-#`(4wt})`Tr({ z!BHuMuI=yJ{B$Z(9CZE{FJ3GzIwB<{mwCkes3=wGxH-maXMk; zl0UoRHsrY(`hWex69qmM7Q!8y#u`N}Z%9^~q2WR4?d#`e=i)=4Ot zoYLI(F#Uk3K}Sai=NV$R9A`)x?N)DPUM$AB*||C7I`_pse+W^nCwF<@qrer29}^Y* zR#yl64pKxj%mV*>;6S8Fd}>2uqZ0t1@3x(_b#;EXyL2d-`0?0;qI2iY9p&OG!`yat z=z*2LzpEr!D4C40arb%2N&7%th4GxFqND_oitX}@rsKG;I(=eqc@!KmJ9Y$P(V#nn z+1oR2#bLV3(`nByZFzYwP~y;r?%w@~;ojyxIS>$&8FckvJGC!ediDDCO>AUj?L?mMmzS=HeV9;|5jrTXyDNH#4Il;6{9qm<1opAO;snvBw7REMNycIouVHE5NvGZKago>(i1!=K+EX+kvk{ zroumhFv1y=53>>EiemxWz0EX-u*9Tu;cn1vu&iyiOLCVi8pJMzL z`$6X*S2FvPf|Y<}V6WzPzc_k|;SjGy&vS18S;ACaVXh3*h)_QTYB(rA+Kzrl@;MrD zQ?6wLeZI+n)(~h8^F;8K)sf226v-@;9f2k(M|qZJz7!(CU|oB z&aN(4(9(k_8Ey;KD|lBJ2tv<*^$|7IdqM1RXs9!Kl;RsOe<5=KdjkRjTu1s!k|U*V z3MUsXfb`a?BHbp?YC#0P05<|Q5LR^j1E#5+lp78%93moiAO=x$K$rDIHxM9bEaj*b{YUmvFGZn+lg!pz&m6VtOAR-`Lc2eBccD zWm;CrOtcH1KP#N5qzJU%yk>EX`hg7xCa*dh#pkEcmU-(Um5Gi5XdkhhN39=7;$B`7yAducvo3_wC}(j?({lJjB1hU70DYIv_9* z4_XL){J8h^Dyk0F9^w~4=<9vgyuA4hyNGEJXQ}&|6XRcj~QivCPRtvmN5I85&_`5PPBm{7{yo1x)au(QV zWCCmJbO1oG3=rmr(;(91n0HjxFp~vpV+*wCP4tVr!i{5 zw2S+ZGy$dQvuQ@=;NtSBHu^tvEieTOZA6)DCfE~bN&W}E1*r%MZ|5gv(^{WNiUt*4 z0Rhy|Q*^#jpK+$(i&0`vy_yB&xcR`Ai7m)=r@6mF!X+UfbB~z)f&rHBL}LYeCPAQB zZ9X;Ogod^@ehvf1{i!10d5~}75)$c0;DtHGj$MKuiHrbQ7>hUk*T(_;z!ANo(l5;z=q%*@Ug-A<>iHWL_AXi{sfTw zO4M=Yxj5V41(OTmnGApOgo2tZI<*&GEf_S6%~w~KFpDkh--|!!XXJdB(k88oV9%%2Q|A;)>+9G1Af&swx@y_@9)G6xj}w^IU-j(S z#HP`a1#AaunhmAlf4DHS&VhqHKEXz9y<9*&3#cxX#8AOrhN@_4R>ze zZm5D8Pee%QuD!joR3MD!O{SShpkN5#!vSjvweWu)4JU}q>hPb_AaCAXx(&exBdF;9 zVr5)z-n!)kVhUbHuqF9Mbp;QH zaf8<%K5Qo_X=uzKvS7a6#hHY_AY0OJlC7puvyXcYnDTke*~xR6|NF%CbYeD;RcE0K zhU@c_lhtr`RaGCYwP98oUAb-C6&!es#E!p%PW{jPwA+-w7ZgM!d6@U(13$g^w*l$t zl`SNW>@-ZwxL=5(#hu@}CrV?g4c8Pfy0mW|mXnmy%jRbt5|= z0)rcRh}pqIn`7}vln)+khIT~4EpY5mPP5J0KHmO$q={l!!&A zxa|o`ra(=7eGepjuq^I_ZE(_K%&wF{(n}5xsxgRlrto$oo#W&FK}U``x)|&^Jo$Ho z6p0c{Vc-D{Us4kwtD=%fad8=zn1DrusJvvyH^K}!6o1}RgpuYEf)|n~`wn@Ik~_32 z8oegeOm0Xfczgu-X&iTq8^9j<=n*x+f$6z3iQuj?Qe0!Do$jKVV{DGZzbyUrIy_={ z4i-E&dD+>UPkU*kAXzwV2KOOC;GZW+VRO;p;;@2Ro0#KNp!?hVhfnzHzlJyBGnjB3 zPAMrt^Q3SCL2QP}i4i;}%@gxd*jCV~z`qOdexDLU{=l>$sE7|&v&N8j5CpN9Hguqb zf(5$cNO-TL6JtCUrfV zKB`VnU%yJQ)<6&=TG#a6G_EgSE1muD=+Prc)Hp97eQw_5x%^d5#I2&Ls>Vo&rY!U7 zhs#Zj@^ol8k>oFNkyR9hQ*fVdZ}p;Zm;RzX-6bt8{o{64mnELM@ZsIN^oK219#jDF z{leHYOVuf5Wena#oz({_I}-l2t!-)PQMS%_qSzzzlHVk;%$~n1jfCFCC>4N?OgiLx z+1@_;OyX?}MjYD3LOa~sTk?JW&uSXn5;ZNbxEx~&1j+RDAyWY$7b^FT81hw`#~Hl^ za51v6vKF@0m=E@d)-KG>I_o*8gmVA6ulA-1kII5~#@^2EbmD~%ni!Xxx!H6@Mdb@d zMZnUI@aPFTWv3yOzbdfVbY4wF)c{uxJ}uv^B)6_x#UH#5$?amhR4$-u&r+%g^! z5pg;c{bgr+JCY<`PR`D^&CL^!Fj=$gpr!`&-e{ap{CWEr4QAzCPZZw`dnPg^=!K$^@0f3-5<3tE*2R+VyqtZW5WTq^_;4 z@V)D(RtX6S0P`nKoB%C@@p)7iTr0W}I6;uT3%}#RqUAqQ`hLl4Gpu$xfaZ+;P5hl0mN(!DAO+@>&1kGptq%H96~T?)RVH14)Dn-9tj5@@U6Zc4Sjsf;PI~R?o9%6 zc(}|%jG+Fa?WqQ$bZqRs8V|%id6}AF!KgZ5#=Chs?=CGbEyc5K6{o_xYS-4>0F*V8 zy4u^JGAYY^J4i?62lU49fV|53M+UK#bUdFB!V_bhoq-J`;m@3%W%wh`t`Pc4g&XM* z6r1Yz~d#yN*gr7OI3zpQ6Z4-D3$7VSiG4=4+h$s|M ziLARBsH{l0`Mepl5V(`5x~Y+oFLiY%Wtgl?A7_;G9SZ*nM;-#Pzu)jj#wWN#BkG5# z$-TjXU$dtrD`pwsv(kaF6Mt}Q>|r}Cg#=UJ(Bvd5R)C3#%EghaL;f2nQPSc)Y=9Y? kEUXC8d*@$2THgA1@9UkH7c1}-8G<-{@|;qNf`Rw{0*;l&ga7~l literal 20447 zcmb`v2{e{(`!;$TLgu8BxiVFzka^BjB$YxkD@x`$GnrC`l*kmNi9%!^BN7=B5s?ZR z%9zTykEi$h{_DT?x4*sDUVA_9`>x;b<#9jveO>2up2v9{$N5AX=xa03veOa-!Ejhd z;{-vFy~Y11X~^-DS9O1+@ee9%U2P3wgY=)f)ejR1f|od~p=RilHvP%>tlr9o?CkH9 zoazf**-p2&>*hqI>hKpI-+d

U?63X%t6*PI-yT4;Ibmx{r%_e?{Ln*nMC0WcH~e zdw&$A4fBkzq$re1JZSScKOeY0a=^WPrK)49ZD)RaRmV!zFwNC$B9xcr3kUfSnJP0S zgR6LlIy2?mjvcRh0d|R^BrAudzAFsC*_we-et;w&dsw#CJUMfGLr`Oif5)bzkg58%pA5$xy~U|QCXR(9B_GgaUwL{_V>?E3Z9eipFIg}>GmUACVPDu&a&#}(CXV1L@HcffPg)cigj!g!=ww1Vb#H{-AL6xOGF*7qWpGaba z!n}i)Vat{++S=MXcczSujRmYM{rb6gZRy9r;-Uu;93CEi=MFpff%VpeJ=&pRVKbj9 z?X0asMG6ZG56H-59^Iqnw;`j*jW^@v1o|{PL81X75HuQWL62j?l(^Umu<9$>or~ z)K~5%&C%LlZicfMr7i17_?CH}}vz#al$W2gK2jImb7 zjvZUlidLQ)e&Mi#sO#-5@m@_7Jf?M=)$dbJ&#iy2oF`A@{gy6?h=^SBH8C;q@bJ*l zdHrLcG$tlS=2D-kK%(iHGuGDDM~)nkI(QH_)xMUQxUv4bcKi12d8O&;=~&);i&|-E z>5`I??K^gibJ7!^M;am#CF{RFSZt;YEiL{1HdSU|V1SIE2^BW4Vk2gke@)>^wf(B@tIkrmOvsdOGX56>j$a$>&V_+8~H|hz0W_&J9J0t0?XCx zt%CZj+qOM@`t+O#6D_U0_s_G~5aM%P2u0p#O-;@D^XC~D7`$hOG@1FNq*zVOEiCeL zay-{p{~|tvg9#!S>-G5YL{F|!p>!lx%G>*Qj_z%i=*Dom9p}%T6EUyynRu7O$I{Z< zo8-RM_d+^aV{&rxi;FN97nkJuwlc3DXHK5%p8MLIlau2-SQe7~{qMqfBohxK5fvMo zA?v!E;1v`c$09B*EnT>90g-w6^5rvU&KRFmb+&1`cKrBptLh)q)5Xu9TUQ5ctXHR` znAqCdo;#O=cRqMTpt=l*>IR*}7X@wa4z!DGWb`mp+f zf&y9BFO-Qb(`L#F3Vyg{BKYRbo5jUatePu|Y3qT1m_@O5%c*i!8QUa`GpaBD+DGt; zi!+<{_4Y~!uKs!U?Aeg-X)UeuAD)@@IhdJ!LVB^zM`AgaWneGGel^=zCSqfCT&3>` zmx32TI1N=rSDRIOi4dP(hST*8I1ZGM5qDBk<=)2~-0I-q;I5p+ubbp^`SSB2c{#c0 zm>8qer?Z7BJf}_zcVr7K{~ivKOwrrFKljQN%Dit_9Wp{qO)cQG!ud9~0|yS+kzV7z z3uA|m9C`BO$@AVbCMLdqem40hPn=+;jE;*NXV$|;AuSD6`G$#Dlsa)OeVHF^B?#dQ z*+L&beR8z7*Lm1ody0F-5a(|HHD#uU7Cg#VV#vOk^eOMZnU(?&`=w=MoUCp zy^7qob<36sGl_!-J>T9rNCa0^DY9xR$jcXu8t&WXz)uj59zVX$esB`u+_!ITmQ06w zdbSbbUekSXJSq-p=kfLTwY>b{ComJpo-^UDAo{XI`No2;*Y=u1Cl3tuIfBO*^WqBkNHl z=&YXh^}@Xk%clhf{E06J{!yeJt;4sxva<5`Z#wdELj;3eN5-jvjqGSnghUs*l07_o*+UZ;7_>lK#Ce+4m}! z7wrk+){!6IzgxZtT#8Rk)xFo%Cn-^~t#>q6yP3$_wVRh$RZT5q<=Eyud-qQK_;I~j zbnjlWjhbVR?%!YhWT~GfJM#0V69VVbB~C7`r;i@d5WFnWsWQ&yi znJRIP19rZm|F)A)`17y4g8BLR8@F$(xP5#5!r_Ckh{#^nBbl$r$;q>`vv=>=^J#Ff zZ=>6(ub{rAWiKx;ii=J6gQNKG%0h<IuT~ z*eT0``#9jqL!*VO^V9v3OW}Pl6lJETrwJnOer8fqQ%y-tO@_O;mzNigJ~m8DNJv~t zs`17_qOPIg>urm`{%XJ9cmf>eLg{miqrRT9@tq;Qr;QQR%YXhD8X2uDFF&)Wt?7{1 zv}qGHBj@bg+?K6d82#inbKJ2XS%7E?=%FF7^nr`D~!l+s?+!-1+I# zC!5^mApgZ-3Mf4lTVoj1Ss{Yzu~6}D|8%?M(rdI ziBC(r#($bnMP=xIcubD6ySI1y&YgS3#Df0Jj-ZH?mXugu|4I;Bwj>-)mF5=|L_*K_ z#Yq`CZ_K7B$Ej0Rr?_A5cO|Ke}6@7=pCYIgO-&{FTC-1q20) zMAZ-M(YjXV2fS42{cCZtpt=e;`2v@iIlxO$*Tg%qooa)DqAK&};LRNV2KmaM_&)lA?*>B&zrQ0rC z_vTSSh)ye@aLIanXP){|`liI7!bC^)u_9j6QZ1P&>+fg_9KG|t(%;GHXMXMan?QUNup#$_ zbfZX$&9cdML0SM|0LgCN-WEmYuSY~s5ubsU?Ap_iNMwexHbe&vEMr-i`Dab?qAcP@!rl z<5+*@P1FP|CVDKtVpS{P4J4yTZ`SzE;I)cCFYy+2=Gy;1`kMcnMoIZAV89u3(rXA? zlYhZ0f}T8t7aNVknU!_minhS?rbe%&GOYSY~|Guy9 z4+VLCcdckY}qFzAfhvZp;$#p1+? zckkYX{vH=$mRC^7ee%Rq9$ym!kmu*;M{eXfV69qlt-$=&M(q z`k&|AyGJn-MTK;0)0!lLx(kGh_Q_fz#YemG7D97v<@ZUUn_Kp1H8wZ@_FhO%PF_E+ zUo+m1h?J9)qo4>wRSk6fv-M4TyR^7?d}3nj>(_M(N$XY;DIp;tG@*cz$m&~WT&_@E z*HS<~jM@N5VrIrQG_rWi%#74{8>_r6q5QUVB?x zqXKi*hj;I?^Yfi8EoXmC8R51Oj*j!+TIA*BjUTpU?NU%MH8fmQ+4##O6TXSRLt07- zRR_J;M)9Z3ft+X|N=pIKw|~=(z$fw2kf+l5nH|j4hO$;U4b?YC^ICyr5QM&1? z;tKk!=&geDCHnSX8lypDyi~Xvgch^YUdku?uQpZ^z?0nbokfkmoY%DR=FOXNh04Q; z0$_J)H`Y@lJ?CXRdf&faU7pIXdb;(*$&GSd|w@!cIIgdNm0>IhuEr z^GkgNJ0;Jvac~$J8lu1>*Q)hZ-n?n(;4sBI9i{8&=tvOlg7Sib538!uexVgB1ejW% zAElFivb7{$hfmbFKvhqV-fsm+V*J}T*6rK(2??z(4LF13`10jTK(E&B1Qg6~qocom z{p!yz@R|Q%J-j277io``Rud%4sZ+m9wSPbLd0tec;{T`9j_oV5kxHO{X0CXs*Sp#k z3l5rv!*+uF{F{i+bFUZICevp>1)34T$;oVtn?Obsm~SDqpH<4Ova+%Sfvm89|NfP2 z+?mt;McPM?ibzQn1FdFdjkKpLfcd(5^(vM+Y-=5{oG`oX_MD>6EGW`_`%p{j&h!lq zUUGJ3B4!sCZ9QpbCMRiWXga&QD}f?GQD6(u9)Zj=;X<1+magE5M`RdgxyrsiD4@?Z6G>w8SO>v;V zzhyM+(_r(SD#7&dao_EczHHGN**HWmUU;gjlcRzbE`6>K12p&?WHj@q0;nv4fy3+P z;00^zmo;bg^rrvJeFd8K+0-O>=gu7f7(g5lQj*8^vF_Mmx2A4uK|@%I#9h1AhO9+P zJ2_V*wQt{5jooXt8^1SQ7 zs>8izH+*tHz}gNm^Twtox4yyN-rkol$sJVfM5bp-rz(Y5X$jRshrU+wuUv~XGdJf> zYIq=cC@;S_M%SGVmS92|UbG!={t=uPEIzK0GqU|SI|rI-3|WM+zqiK$$C{|HNJ zQR(%zt!=tPWdlbUXUh-4nV&y{E1=95fHy;U0_Inim%Bcz1%@pvOV-$ZolBvl!EvzmC^$bqzLO)AJhNUAimezo+N6`uh5U zk^A<|R{3q#URJ^MQkPa}6nJ63aq6s`fi#?ls`^)sasHzW!4l&{6+M6cuB+>?o?c@T zHlwnpCa~oOKY-eY4?Bng+m;&uhG+35s_(UfsCzNiiL0{Zaq7Hl#e(ns3 zgNKI)8-^0Gd8+`YtP4VT8u458N7y$G>z1O&emyB8qXt1jwlSRh__4{l^EA`Jn!q)7 z|H>G)B@4#=4fV+fYzU(7sNMFTwPwS>?rsPig#N_T6tD_H)4KFzO|G{hczGmkya1Q> z?%g}sEdIKn-hsq+ThuB8m!NON16s)lE}x2<&G1m(`QG=HpNp3lBRxGm6B83X{mrDL z*nfQGl;q=_2M;E{e-GaHbZq+j_qwE$j}4&(tQ8`!a~!<*9!azCl(A{s|AwmUo2gfx z0$aH;Qe0Zv+|-0E$z#X_s^P{krCKF^an?e9g`6k_nH5;nYjDn zMNemE{K`%lxs4lNc=F2cJ$))7ATWkdq@|_p3s<}y!Ne2zrE&8TKX7-SAVC-y8d4Je zxt`<-(ZfGD;(kdsJh2{GANVC=E8+Y8(ecBF598zjQVnh_O>@O1C86YRC+=2Ormkok zsRXXRo=IGP8sRfNuIui;fZDWs_in9gY`ggRUj=NKAeH%t+GX&wM6a)}2L=X`G8LF% zkU51j*3JR~0>}_ZgV=t61aP!{Zs-NkbE2EJvH6PdL=wg|t#fH8$%)`!ep$_8tkd_J zC0>_KHaE52J@FVRE>Af?>D$=YJA0|6Yu6mZk6I0X{XpBR&cnYYKkrQYX#4Ku7D?M3gu5kb6>FWrGCJ`0&x>P>Jy0vis4o2|T6vX$g z+bONiM#xSp)TG*c(4p5d9}99+PY(#&$iSe$|L;6h5=I{7GH2~6PM;i15x|^E?m6QUAJvy$B zcyxtO4XbC!dp>-~RPc5}qD5*(gF4+xM&v!CnQn^Z(&b|b3kx%OfwutXme-Oop)W;pbqmIeX-kq+G-p6O|izdqUts^30V#Da+ zm)>)w=ph+`tvdfHr~XV(ffna%ZKg_IgjpV2Nz$RU*x1-guODyTyg5_u#-F>7Pz5&* zKCQB{5hh?5Ay`X<>bmCPT{lyb*`fG?ds~%y)F9cjPoXj z1RXw>Xr%QwZ}!Q{FN1hSxklCzOl%o63eC0$ix;=edmR22U+9kIR$||_?bSt7 zY62SMpXFutojcRz+^I~}?{yW_S_y;6=8#x*tp1-~0O+oTHl$X#mx5_=W1vS+K7FXO zv##POEzwuunF~n`zmv|V|2-$3(gv1OZR*rJ!QNrRJZ~eEZ3umk4OTph%zci@2cdOt zic?|o+E@>m-uaF6K)&;ore)}zjPlL1gpNGyZg}~!AkgqX6mBDxw70jnATte?>Y;x6 zM`)`ds(r;5wqDH!x1w}eBaZFB7ZQ6rGt|@F-LNzd_7&90(G10%#OJZGCG=EnZFr#pwrqQ}8M#Ox4jiuFM0 z?JIY>coDr=ZGm$w>aMLV-;zm|(B-LKkwb?LL6=94`TY6wh3*HApDJ$sD(DQOW&%1V zBluV@;ADXOb@A{>Q}F(YD%_tr!`WAw>;0{-rr@%1oZD$b!`Ce>*mP=YQoruLlWA#X z2S@&z>9O#o3oaSdHZM5hTWs-55Df+GuZb^Ph7yM;#uWuPJ3cYCA%BDGFZ_^qY#&+( zTpr03$iWwQ7lI0Ob!D3-dh?!+XD?p-0!T$07T^R~d>y&LIY8SFP!~#!rIPT5Sy+;t zU0bp%ZWn~W*)LY&Z0Lz!eG~;F?qgo-vNMg;L^#^mG>ka!tNpsAEwOz;F~%+^EYNDE zE`*`<lr0q06z#MW3`VKksuQhzUpFY<|8g=$&tx-C@3Wca=`cx{tL% z;YCOwPUCh;Hnq2l;sbZ@R(HwZ9Nz}+@$I3lVN`SxL4s#aoN&XYBd>DeghF4$!Tnpj zM@{Qtclq@CL0Ql(78?$9?T4G4ZY(SXamH=@e)IaZl#I+mi9RD(K)lEZq2`**mp@x? zi}e*alatdu0M7$yF31l>K1De|ek!^q^C$|m_sS%b0Qi@8?@k2HXfo@|C)FdR`x*$ z4=MvJ0&FnJrJm}?G87Mpi`RiRu(!8IkSSeWq?u8T$b(8eIe9VU&cuA_a3J_nyk06W z*Z9qUi%v@$L?24}_=UXd*N@_kRo^OzO@l7_1BoN#P9ujJGl&jASI{-jvAKNw{44%X zn8nbU;s2>L96omB$Q^Jc&Oy5uWINhZBqPU| zyJPv6VS{%j^`Ya%kYO}6&wZ-!Tzj%}GBGnV^Tv&LKn}Bv_nA<5HJJJK@2A6h-E41f z$Js$X|H`E^j8+CDc)9=2+REwYj&mosytfZE6U6>ffTmxq;uLzkENWkbUp3NiK09k8kj5)u-x zZQWd4#D_v?ssZ)@11&5pswn;{;~$$hM+Y*f2z-W2-eT*fr9}l!REQ)=oH_I4(Idnb zP5#A|oQjH%ot*~9j~5mfv(6Zo0my{#M%C7;r0X{;Y`20lM}#)q8n}ivb62`PkbZdx;I{(EqBv| zi3&NavSCV12}KG7AuK4Pt+$J)4sQ3yQ{&JHvP6UH+ctFi-q_fA5S`#J5H2pYx9Ubs zST*s`=%#h}(0lU8?3rFK24A_hx{4n_Rr)NmV=*Z;H5c#5&Sv4_5~-uLz{l}2PeEh+Kp$WQ`G1W69jYRfkci?o3CRbTMH8oRq*zZMb@(29E2 zPGx~U)k{g%@nbPQ{R>xnol?NE$H(FeeZPG0o1qbZ3vly#de;&Xwj}7B1q{L6te7?s z^TMG^b`i30h7fgiV>g|hoQ5jBok7JRzJWOZBi4!t3JMy8)iSVCg>``tJac9lIt(@+ z*b<5`%oa;*w;?g9eOJ!LpFu8B!ef9~giixbB13?r_zT)|P!hYa@rH&T=t_Uj3{Oo= zIHCff`+TWP3)2w^i!(3;tS!HQEC3D?H3%DexovNFK6V+o2e)i@{yg9rOj*Ct`cErW zACMtw{pcYB&$ZXL79|5>p?coW$-!UVynQ?9@BF#Wrrd2pl;mpYeomfre|P^dI@AnF zJN-UO2(2%SDk<36GRqa{+k7PD~W%E|Rn}b2?{=KZ%DR?P;yoS)%sWHn?#oLAZ46*w^e)0q>Bq=Cp2R(Lm zASNQB2?-`QH+N%op#%40f8m0!j}NR`bIx%vQF68wQOI0)cOP2N_wU~iMKaELYU998 z^*%+3Hp8ak(HDRHLOsCato+)sEtI#aPI2WB2m$p&hc^CvjcaVw2%OQ?&}f9&0_6|f z2K4_0;47&M?*QrGS*rDBQ0t5f_Fd9OtX=4Na!NNzcxRvg*jhMm6uf+HZu2++*gB&; z;{$lO`1p8~NBWmTyJ*;nWINx_0F@{KpzCph!b(m;rvmGOwh1Z&kJ4q2#;7g0U5+*a z7EzYAB1P5R2>=A>H7+?iQoC1J5WzSKFwlW%1^Jf}AAdI|XB2IstWhsBrR(M~lcBo? zLg;*P2WUdWhW8|^XXTle!uT)^Scp=RDRGXr>Nu5JD8-mb#&IK~V>&vJPBM^xM9F}k zfciia!vO){4Mp%+viL4k{<{@1hdPfv8t&Mu2t8!-{o_?Soj#BrO1|^9knTy!gUk(J zOW+MA9%WnxuAbxfv`Bf1gN2fT3~vSB_0wpKFXGCTMF;9N#!10LSq4!WU*N3(@jV;x z$U;v~4^`&SAqv6(2Mngmr6n(r86kHxw}oC|3|H^!>G5=R9SKZaH|tP8JHN0H^N-6E zKX9O4VLL(CJ31n5OoQ45vkgKXDU&wnrYbOxZ<1KD-h;%%Zh%efCK|37Z`lnnz}SbM z{YB%DJJ8Q#)lJJ>vRoLbsMKE4jF|+&3JFRaR)hwsx+aCRAYYI}z)j#mUKAGxZmfAb zJ39kcSA~V%-9a+u38T2Aq@t`0wz!S1-rgn!AsY4*mK!GP;D3%l zH*0HKoSUmxNUFi&gkQO0cg(yjC4%A%+*IW<^0Gs2U=!us_O_z1`u=`j&|Nr-+Go#l4i&nn z^D-C2^dqH$<+$wYdwr+m7*ZcnfKMcqnmT<+2P1dh$sZv3q5RCnhVMsH3Zh%Vee4>V zSFn+*tE;%dIY!#hD@?dP7G2c5N)~W(|NhpxI%3A9?39HC&$exz;QwL9s4PQw{#?_@ z==OpDAW4MT4&JCuB^>nJg#w%^mx;RrH!mevIC?tg-jim#A;Z5P{a|;V7y{Pj1 zDSAyewnS^(fR?8f|CQy|k#renZo(227^nxp;b(xc)6?IEcP-NWPsc!4)}csPJfeAD zgV!Y4F1^pj-wpHKE(1;D#EBDVvClzhZ=OG-9JF4APsK_?n=ZH^9HGMpe-Fw~VCfAM z8xhkI7#$}kCIAj~g_O7cH;MnT;l7~})leJ_#dEf{X#B9Vn}Fc%78SX}ENBFPx8 zW@soSB67W<#M9Fg@DC3QZDdCU-6~QL1qB7N5cK>in-EIYwj$X|IFmwok@}!n^1u!$ z3aQ!7K_EnxH$ewvT!53Yq2c{!&y>ND17oYjrWiq{1_A^a)6k$K`BZSQSJ6B&sl_Af zLhNOd^PT653~^(oM2}S+SD2lx4*c={eQ{P6+3f<~@PD?gJv4A?Z6nNBo7|!fmJ1SSxYG0R;sGq!uG1oSuwU1`zY3qoeRH*Vp#J zyQbpMD@>@uB*Juh8y6R>F3^H~S=gi~>*g3Jqsq#B+}xf6<_w9&S(kcy|{uW>T-7W$<&b ze9!LP){c&!`ud{0WmnxM-|wZSrv9m|f-n@9k?Ck_6W+Ub#KKUC`#GEVe-qkYCDQJ) zqF%_WgQErxIao)hpl+QpHJxLO{7vfZFiin!Mzj^}wW_wZppXy^(YbP?1W6y=AQ6nv zga-8sV!NI|;)|psIov4eNQgLu=ZBvZ6)k|zLnmMEyFl__uk52#1FVG}k1P$7iGwd% z7tp7u#nQLg$CJ4@Ir;eb5XohVTJ}*5l_TVnFkW#%a?3L*LS)0$(frK3`iMXxIGQry z8QAp<41%*C;atMksjExp(1Y3rV>jRh6uP|p{J6KVn4gGx3UqK#QqsZR9uFxR$_sB) z-#id$YD$WxmKK2G8DnGnix;hV=0P@)5$JKCZs0`(gLJYy!f4(fSZ@&O9JfYm>)gsQPI zn_mc&6gXGSD?B!9b^-oDHi4x%IUl7RPW=LFWLB^uugp#VyH&eB<5a`E@RZX4!tQ-f zk4Y+4$uhrC_v_ueyzL2*SFT*!DH+k)a3w;z&xyCJDUK%-WPC!x$mr;+byMR$L_Yk? z`DeE?GBH6%6Ir_4|NI=19*mW?V!_w9mv~H^Ai=CRu#%7wfPf@F$$M0Af&k(*V14zG z`iQP>cXv1Tr{FDY_6UqJ%X;$D;dz1Qab~c%#&!5JcqL&p!V3~aL`1}Jx+Kn_qs~y< z6{=v1>Mgr6#HFS6b#&m6xt)+u|7EbZ&FKh~G_1(uvNBl#0V-1oxDQ~N2gMrH zbZuvz^>jzpKdR5b#AGu8_;VOGuei8U7*C9h@}E7UA}qb%0m2)n`a2YRN~BzS(Q)Fj zApssf7((pt$i4jh2l-MzWRV5?p6U{>x1RY3FjaaVhfZR*Ewwzkk9s46b@Jb?iA zJV_Coh^E2H%4*s-iED}TBfMk;fx?1T4RRms|7Z*9Xe}MfAdo|g&3g*A8r@y(wuq=G z8san1J=D{@aEsbNxVFZa6+`PHgYRxo3@}`&gUKJfC*mI(#5Hf>ut}&&Al;^QQI2Kd zd;}U_5flSy1CIzpw)+^!Rd;f`g;SmwfJL)|F&On}$5zLe(h1QzL@3(K?hPwv` z;pNMhRn^sqFcXUIvdYS>G?eJCadyxs$EfmN`dEwuh8Dl~x)>a2tE>L3nh+L{-pL3M z!Z4u1B@F$FlAxrdl!6=N#S1GXP~oh!;XS{DDe{i`)@8Ct-K?7liQi01yPKJYB#kS? zhkO<2aO-Go)jf6UMQ-jC8iwlT@IQ+aC%wI8mMRJh69P`52w7R}auAV0SU~0ljg~ilVxE?soL|BEJe>88DZ+e0U8!#@ebPk zlxm=iP|MQO(g6Hxdz^Vfc?Xf<8d2~)Jfza~q3Qetpy=mu3FXysfscIfOZF}y6`AE0#MH*V`I{eAEgu&Dlud?;z!fj zNwF|(fT9hm0X2YR!GnZR)v)stq7zypQV8Z^WL-X!W(G6Wkjbsi5d@wDCHM1ichp)LoSu0<*g~-= zccL_`5eFfv$H{mhunMwL{G&-%Vtqb?} z>Gaimh3$&b;nUL8#7tOUSJ#2PdpFOxtY_W3w}3|F=0kTotFJuI1?H_SenCTOAE2V7 z1WAk{T~S^RpX~g;`!JJEOY9`w%Ns-<;2UXmr>BKw-^SwfJ6^ajqR78P#(1kg83CYH z7c4Np+$&|R@)N}kzaKq(D!w4h*DLA}21JD~jlQ`Rvt0zv+-3z%f?xx)gKTfSwUe<8 z{SA`3!$p$o8IE%)xS0teGP(+cAau+UBl&d9?4VlL9K3Gq>-#tE%I(ZdBrBZF6`seG z?DDhe?PTnn&_+LexUIv7oVjzx*nm|Ny63H%H{n#EI(rBscF`J`Jb)mw4-%rtjQj3< zQ~)Fpq7E}&xMA-f9}hyeA?kR7R#EJJBQ^sYL2JON99Y0&{~D}}T}aLumS|QkuIt{y z_Av2YyQT;KbDZJ)-vzt8^wQG6qu;{a(zGrS87e{gd@SLY8D*kMnQuNU-NQ?2m1@8( zQ&2Nr8Z6r~ti#A9Ukp0-%NOhEcWy!{81Mx4)7NJV<@ISM-%JT}y*!!~WR*4C&lYy} zt2W5@j^IO(w-CU)5?f@oUYY{_K?*+vOS*IIT7= zCRkm#HThgDGuC`@c;nQw&?&nH)kg8?XDA-#V=;PmHrlyqLk%Sxu3xk%s6M2p;KWm0 zMAHY01&TKgNBx0oxIA)@Nzr+XrhH{&@4zky zO65&!E2<76W0tl7WHUNNbR38T_=lRc0=LitJz^3{!T--JI-WQ#1uZ_7xmX$&4NSFA z0?JyRJNL>`9N`$FRCkq*{kj*{Pi12j4%0?tPw1VXOvNj;(47EqKqz=nP(Y#rplP2x zb?TLZkd6z63djgmcrsBNFpB}21RS61wQp#HMn*n{om>lHX@*mr*p5dY4DWk(Hw#0kKs;{B5o z&2c9)+4#xe^>94_818_^eSCdk*QFY^bKhleAMCq*awa2@MVB?;4+X{2TPrK zNPiI@vc|ys3;~K%39hGic(@j3J7HmZFZEzv(fSojgALe)QKEsx)}XYar}v4ZP*X>9 z_GlQq9U4kZwxlE{Ke~4>%v+Y3@4MxS@Ox)mEpUCc9A_sX;kduQBI%<@lmt5sI&utP z<80tzk@q1WaBs4g`Ut|yC7L0WlA*1rlSt6H4;C^aJe*73<8^&~772Se0vH38AP(ke znL;V4FJ*=Y8e$R{O<1(X7s!?1u?Yf%CE7{t;~w8$C%}M=cI%~r7R}48)uwNc;J5yy z?**vJ2oJm&9o+(I7wHJ474+n9BxFpTQK}iRK7H~8&()xyO7jv_Q@9V*9}tUze0&-( z3BoZY#eV$-Ttc}dnf!n>%}dg-zt|7d3Pka=F8r}KZwl|*$1dl_XMS9bxyBNgph{({ zLJ4WUeN|5Y27WjK8!nV)Wp2eY_)usb2iJud9SSPHAcc9CA>>Ba&Gexz)cJP1hGgMC zM!u9~;dKM}HI$@Y)ev5|jM#aSF9zVY2_DM<0 zg{w$rm|T9Gn;Y|C7ZYWg5hpvFj}qM+ePWA0R2MjT&=epjlJx`tuxETQzHN5)tf*N< zW7Z99cX(u^wx%X#5HLZGkrGJUn{~8oBvR0|<6*#fV|5Wpiwg^q7;01y)%l#o+(?bn zhxFv??F}$XO&XkKq1o`3{0xX3;Pmd(r-0edYCCsA8p=V@#$1?WN}C#EsxGdE)R%^N z?NDC0PT;}v(Wcxim29_b9YZ2$6X1`4J*#P%1MmR3^qF=cdJQncuC8;C9pTtGtIiet z=Z_Dv7t$RxK@!8WcbpZJItb6mtcUM!R4QS}u?piW_#y$Q2>23%uk1Fp zo?c$qXggr%+Ku%Uq&}&XK0cLUwYIDTwAHxmj0QA%1GXK_x94+{vp>cagea3q1GHmmVZ5qzO` zh`^^YqB5bmc@wbbJjMyi%Y9LR4j)7 zuzsoYOx%j-%+QRG6N@$X!6z%YeM7s6yN4A3zF%Ogv9e_WE7B{c(MY0g z8HBYHfdpQu&uAA7`hFy4sF!coJ6--K{j!0P1du**&C{@a85%-JYko_neuyWwLq}ER zA)<&-g{XLY6kP#IiUBK>Js8HDno3{62Z65&ID)A%z!G$x&~69<$^FvP{QP`ahTsfB zb;b-41H-GN+MtagFi{c`$dK=F)srWS;Jwl8!aFEPU!sBL5-);4AU8?-t}H#Rt`0y< zT3Kab5E6Dq=!)Y7i2G8a&bT(pe zB=1HIy3}^%e^4!|XU<>9Of zSyq023gfQ<2>*P%L%(^8?7Fa2A2{s1`}Z4wlbN_kwslLhBZhXfJ}mrVBEq9tf(XfS#Ad0iX`14+6}jETVt$03Z= z^CN6hZ$Mo&dvUP`(vpcT0H-pv$$|p$CB;_#e{3&F?fYkEMp}ff4DB77rsbvr=|LE9 zBqb$#PlHRsHV)HLaOD3lOiC3dQG@A^F^({naHxh({V&`}+~k{a2QKQtw6m4^Y+N_ zA_Set$Yua596>x6NT1NqP;{Sw@^{XfFyzxyg=yXM^!9FTX?bd1y$se8Vj>B$#>SF} zFcfiKf0|C_kl)v3zd!s6xfY{F<$A`($spoy+&E!xFO;rtCxY{|4x=A|uK~dqy=22@ z0cHZSHlh~v)zHuo1V50{##VswmS|le>N`0DC5v;i1{7ZVjt!gmdHc3N7PT3Cqf-yfs&9kaube45XkI(hOWzCI*3w{^|N z5|t3EiB&Y-BW6cxR*UVotZr-~^WmXqXGh4uuYFm}&e_ZI*mHtFMh6KW_yasZmW3H3 zFAc?j-L4TZvqQK)Z&v2U&22^T1=(HpD3fT1m(ft-y!tUw(y#~>d?Hv*!zK-ODDUAb zULDK&DHEDd-gSV%P?%9HE6Mme|HrJ+_!Ddga!7`t-{YrG0hz8{y^86RQ!@`Qz#anC zRvJD!^x_%QjLZFXigcT$@I>s_&s$kR|JJ#r=q#UZZe|t$X%lkA?7j|6+K-Qo1@6yE z{O5ryWKyC~TSJB8>tv=(Ip~mtDRW3Z4&sN1;Fy@!5DIFa7q`KA9nDlmnt9ss0{9*y zKUE)hEN%_`Q54T?d3{p@!r%*{y1^`7XZ8-ommPmTg5hC1{R-T?m3a z_hzn^n(b)FBeQ-4kVia$Tg2E$!ufj>b6%*j^4?!PhJ3+l<7kq;a zPC1Mbg)@)ftbsoR01?DK@(+6OYQg^SyMZC39Da!TO2DMEC?EznRWbtBNeDQGOpQWMA|3o@vL zuDZ!lvrBzLyT%|5z=aPab4Ew=9CM!B6EBWI^m6g`CXM4uOGCkc-E;M)9&9~MpR)!>ww*$)2xTxQawb0*1?hkGzS*DMnTM*X_#F+RXwZVn0HjRkXH;= zO+-TC1ZHf3eV~sxJ33Fb@R8mI9PMi&} z^=y)zL<%ZZwcjR7tyoS>3*XAfh|RXg!9nE$&~$f~yskyZ$k_D29;gX|Q86f;$dnoY z5HbRPh~-2p9f!$ad=*a#UGKi1afP|L`z0maVJ{kVCTBS3qko5DEe{v0QP5-?!^mZy zq6|$aIE({gV)@!3K)NW=MDX+HAVJ2ftE*vl1NpWHb_SRfV@?>wfRO;hv|ircHluzW zi=J!Cp5OBf!U-2xgiqphAF5n5KjtU^`9$cC^A1T{t8#@viHC=25f;7 zkqyH%N_3R;4N&0C^NnusO$xVqySgT{*na$hPDV=X_R|m*o?54D3uE zV9K<-JmpBvY$aKsY6p4B*RNkID-|@4`z!N!CXE^kZ*Q@E-gEKslZu)eeJ<)eawR%j zfkYC_@KFr(_qSz>kZ)(92{qVv%hqH}Hdda_m}bb6Y-i=CKv>;58JQRvGcq$DfAx>K zaObc8`t)?(Szt3jgG1|t z$9hF+M5A?Kr>9wW@%bWr=-Qf6>+^>XA4Wz-zVE7g*I8sK_vFdxecKM-xLnQcnKbM! z%L(RBv14XtCdk%}ZFL;)FspdxEuW4Suhdoi8-kiGVs2$Eu$D)%YUFEY5kcgJ`-v05 mJ?b#M=54>cov?giPIiF#yM(;CDKIoa9M;s=c&2U{`hNfjwLz-@ From ce8a71c92fed63acc44364a2aaa8f192a90adb9e Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 14:34:11 +0100 Subject: [PATCH 13/91] Remove extra code added by vim macro. --- .../gchq/magmacore/demo/ExampleDataObjects.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index ff700941..4f90fda5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -89,20 +89,20 @@ public static List createDataObjects() { // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewable.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE"); + viewable.addStringValue(ENTITY_NAME.toString(), "VIEWABLE"); objects.add(viewable); // A sub-set of the Viewable class. final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); viewableObject.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); - viewableObject.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE_OBJECT"); + viewableObject.addStringValue(ENTITY_NAME.toString(), "VIEWABLE_OBJECT"); objects.add(viewableObject); // A sub-set of the Viewable Class for viewable Associations. final uk.gov.gchq.hqdm.model.Class viewableAssociation = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); viewableAssociation.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); - viewableAssociation.addStringValue(ENTITY_NAME.toString().toString(), "VIEWABLE_ASSOCIATION"); + viewableAssociation.addStringValue(ENTITY_NAME.toString(), "VIEWABLE_ASSOCIATION"); objects.add(viewableAssociation); // An system is composed of components so this is the class of components that a whole-life @@ -110,7 +110,7 @@ public static List createDataObjects() { final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.toString().toString(), + kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.toString(), "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); objects.add(kindOfBiologicalSystemHumanComponent); @@ -119,21 +119,21 @@ public static List createDataObjects() { kindOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS.toString(), kindOfBiologicalSystemHumanComponent.getId()); - kindOfPerson.addStringValue(ENTITY_NAME.toString().toString(), "KIND_OF_PERSON"); + kindOfPerson.addStringValue(ENTITY_NAME.toString(), "KIND_OF_PERSON"); objects.add(kindOfPerson); // A class of temporal part (state) of a (whole-life) person. final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).toString()); classOfStateOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); - classOfStateOfPerson.addStringValue(ENTITY_NAME.toString().toString(), "CLASS_OF_STATE_OF_PERSON"); + classOfStateOfPerson.addStringValue(ENTITY_NAME.toString(), "CLASS_OF_STATE_OF_PERSON"); objects.add(classOfStateOfPerson); // A class of whole-life system that is a Building. final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.toString().toString(), + kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.toString(), "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); objects.add(kindOfFunctionalSystemBuilding); @@ -142,7 +142,7 @@ public static List createDataObjects() { final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.toString().toString(), + kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.toString(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); objects.add(kindOfFunctionalSystemDomesticPropertyComponent); From 07b3339b8809aef47f277f66252eac1b0f238814 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 29 May 2022 14:55:49 +0100 Subject: [PATCH 14/91] Add missing values lost during the refactor. --- .../java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 4f90fda5..9ec4aead 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -217,6 +217,7 @@ public static List createDataObjects() { // Person B Whole Life Object. final Event e1 = event(new IRI(USER_BASE, "1991-02-18T00:00:00").toString()); + e1.addStringValue(HQDM.ENTITY_NAME.toString(), "1991-02-18T00:00:00"); e1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid()).toString()); @@ -230,8 +231,10 @@ public static List createDataObjects() { // Person B states. final Event e2 = event(new IRI(USER_BASE, "2020-08-15T17:50:00").toString()); + e2.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-15T17:50:00"); e2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final Event e3 = event(new IRI(USER_BASE, "2020-08-15T19:21:00").toString()); + e3.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-15T19:21:00"); e3.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); @@ -245,8 +248,10 @@ public static List createDataObjects() { objects.add(personBs1); final Event e4 = event(new IRI(USER_BASE, "2020-08-16T22:33:00").toString()); + e4.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-16T22:33:00"); e4.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final Event e5 = event(new IRI(USER_BASE, "2020-08-17T10:46:00").toString()); + e5.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-17T10:46:00"); e5.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); @@ -261,6 +266,7 @@ public static List createDataObjects() { // House B Whole Life Object. final Event e6 = event(new IRI(USER_BASE, "1972-06-01T00:00:00").toString()); + e6.addStringValue(HQDM.ENTITY_NAME.toString(), "1972-06-01T00:00:00"); e6.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid()).toString()); From 88b58be2f99d1c6d93ef0c849e604ef5435a3ab1 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 30 May 2022 10:01:31 +0100 Subject: [PATCH 15/91] Use getIri() instead of toString() --- .../magmacore/demo/ExampleDataObjects.java | 218 +++++++++--------- 1 file changed, 109 insertions(+), 109 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 9ec4aead..73e119c9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -89,20 +89,20 @@ public static List createDataObjects() { // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewable.addStringValue(ENTITY_NAME.toString(), "VIEWABLE"); + viewable.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE"); objects.add(viewable); // A sub-set of the Viewable class. final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewableObject.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); - viewableObject.addStringValue(ENTITY_NAME.toString(), "VIEWABLE_OBJECT"); + viewableObject.addValue(HQDM.HAS_SUPERCLASS.getIri(), viewable.getId()); + viewableObject.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE_OBJECT"); objects.add(viewableObject); // A sub-set of the Viewable Class for viewable Associations. final uk.gov.gchq.hqdm.model.Class viewableAssociation = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewableAssociation.addValue(HQDM.HAS_SUPERCLASS.toString(), viewable.getId()); - viewableAssociation.addStringValue(ENTITY_NAME.toString(), "VIEWABLE_ASSOCIATION"); + viewableAssociation.addValue(HQDM.HAS_SUPERCLASS.getIri(), viewable.getId()); + viewableAssociation.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE_ASSOCIATION"); objects.add(viewableAssociation); // An system is composed of components so this is the class of components that a whole-life @@ -110,30 +110,30 @@ public static List createDataObjects() { final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.toString(), + kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); objects.add(kindOfBiologicalSystemHumanComponent); // A class of whole-life person (re-)created as Reference Data. final KindOfPerson kindOfPerson = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid()).toString()); - kindOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); - kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS.toString(), kindOfBiologicalSystemHumanComponent.getId()); - kindOfPerson.addStringValue(ENTITY_NAME.toString(), "KIND_OF_PERSON"); + kindOfPerson.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); + kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), kindOfBiologicalSystemHumanComponent.getId()); + kindOfPerson.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_PERSON"); objects.add(kindOfPerson); // A class of temporal part (state) of a (whole-life) person. final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).toString()); - classOfStateOfPerson.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); - classOfStateOfPerson.addStringValue(ENTITY_NAME.toString(), "CLASS_OF_STATE_OF_PERSON"); + classOfStateOfPerson.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); + classOfStateOfPerson.addStringValue(ENTITY_NAME.getIri(), "CLASS_OF_STATE_OF_PERSON"); objects.add(classOfStateOfPerson); // A class of whole-life system that is a Building. final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.toString(), + kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); objects.add(kindOfFunctionalSystemBuilding); @@ -142,7 +142,7 @@ public static List createDataObjects() { final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.toString(), + kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); objects.add(kindOfFunctionalSystemDomesticPropertyComponent); @@ -150,10 +150,10 @@ public static List createDataObjects() { final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS.toString(), kindOfFunctionalSystemBuilding.getId()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS.toString(), kindOfFunctionalSystemDomesticPropertyComponent.getId()); - kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.toString(), + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS.getIri(), kindOfFunctionalSystemBuilding.getId()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); + kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), kindOfFunctionalSystemDomesticPropertyComponent.getId()); + kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(kindOfFunctionalSystemDomesticProperty); @@ -161,38 +161,38 @@ public static List createDataObjects() { final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.toString(), viewableObject.getId()); - classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.toString(), + classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); + classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.getIri(), "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); objects.add(classOfStateOfFunctionalSystemDomesticProperty); // The class of role that every member of class of person plays. final Role personRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - personRole.addStringValue(ENTITY_NAME.toString(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + personRole.addStringValue(ENTITY_NAME.getIri(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); objects.add(personRole); // The class of role that every member of class of domestic property plays. final Role domesticPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - domesticPropertyRole.addStringValue(ENTITY_NAME.toString(), + domesticPropertyRole.addStringValue(ENTITY_NAME.getIri(), "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); objects.add(domesticPropertyRole); final Role domesticOccupantInPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS.toString(), domesticPropertyRole.getId()); + domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS.getIri(), domesticPropertyRole.getId()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - domesticOccupantInPropertyRole.addStringValue(ENTITY_NAME.toString(), + domesticOccupantInPropertyRole.addStringValue(ENTITY_NAME.getIri(), "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); objects.add(domesticOccupantInPropertyRole); final Role occupierOfPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS.toString(), classOfStateOfPerson.getId()); + occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS.getIri(), classOfStateOfPerson.getId()); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - occupierOfPropertyRole.addStringValue(ENTITY_NAME.toString(), + occupierOfPropertyRole.addStringValue(ENTITY_NAME.getIri(), "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); objects.add(occupierOfPropertyRole); @@ -200,10 +200,10 @@ public static List createDataObjects() { final KindOfAssociation occupantInPropertyKindOfAssociation = ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid()).toString()); - occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF.toString(), viewableAssociation.getId()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.toString(), domesticOccupantInPropertyRole.getId()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.toString(), occupierOfPropertyRole.getId()); - occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME.toString(), + occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF.getIri(), viewableAssociation.getId()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), domesticOccupantInPropertyRole.getId()); + occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), occupierOfPropertyRole.getId()); + occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME.getIri(), "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // STATES @@ -212,68 +212,68 @@ public static List createDataObjects() { // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid()).toString()); - possibleWorld.addStringValue(ENTITY_NAME.toString(), "Example1_World"); + possibleWorld.addStringValue(ENTITY_NAME.getIri(), "Example1_World"); objects.add(possibleWorld); // Person B Whole Life Object. final Event e1 = event(new IRI(USER_BASE, "1991-02-18T00:00:00").toString()); - e1.addStringValue(HQDM.ENTITY_NAME.toString(), "1991-02-18T00:00:00"); - e1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e1.addStringValue(HQDM.ENTITY_NAME.getIri(), "1991-02-18T00:00:00"); + e1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid()).toString()); - personB1.addValue(HQDM.MEMBER_OF_KIND.toString(), kindOfPerson.getId()); - personB1.addValue(HQDM.NATURAL_ROLE.toString(), personRole.getId()); - personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - personB1.addValue(HQDM.BEGINNING.toString(), e1.getId()); - personB1.addStringValue(ENTITY_NAME.toString(), "PersonB1_Bob"); + personB1.addValue(HQDM.MEMBER_OF_KIND.getIri(), kindOfPerson.getId()); + personB1.addValue(HQDM.NATURAL_ROLE.getIri(), personRole.getId()); + personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + personB1.addValue(HQDM.BEGINNING.getIri(), e1.getId()); + personB1.addStringValue(ENTITY_NAME.getIri(), "PersonB1_Bob"); objects.add(e1); objects.add(personB1); // Person B states. final Event e2 = event(new IRI(USER_BASE, "2020-08-15T17:50:00").toString()); - e2.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-15T17:50:00"); - e2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e2.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-15T17:50:00"); + e2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final Event e3 = event(new IRI(USER_BASE, "2020-08-15T19:21:00").toString()); - e3.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-15T19:21:00"); - e3.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e3.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-15T19:21:00"); + e3.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); - personBs1.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfPerson.getId()); - personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - personBs1.addValue(HQDM.TEMPORAL_PART_OF.toString(), personB1.getId()); - personBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); - personBs1.addValue(HQDM.ENDING.toString(), e3.getId()); + personBs1.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfPerson.getId()); + personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + personBs1.addValue(HQDM.TEMPORAL_PART_OF.getIri(), personB1.getId()); + personBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); + personBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); objects.add(e2); objects.add(e3); objects.add(personBs1); final Event e4 = event(new IRI(USER_BASE, "2020-08-16T22:33:00").toString()); - e4.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-16T22:33:00"); - e4.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e4.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-16T22:33:00"); + e4.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final Event e5 = event(new IRI(USER_BASE, "2020-08-17T10:46:00").toString()); - e5.addStringValue(HQDM.ENTITY_NAME.toString(), "2020-08-17T10:46:00"); - e5.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e5.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-17T10:46:00"); + e5.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); - personBs2.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfPerson.getId()); - personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - personBs2.addValue(HQDM.TEMPORAL_PART_OF.toString(), personB1.getId()); - personBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); - personBs2.addValue(HQDM.ENDING.toString(), e5.getId()); + personBs2.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfPerson.getId()); + personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + personBs2.addValue(HQDM.TEMPORAL_PART_OF.getIri(), personB1.getId()); + personBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); + personBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); objects.add(e4); objects.add(e5); objects.add(personBs2); // House B Whole Life Object. final Event e6 = event(new IRI(USER_BASE, "1972-06-01T00:00:00").toString()); - e6.addStringValue(HQDM.ENTITY_NAME.toString(), "1972-06-01T00:00:00"); - e6.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); + e6.addStringValue(HQDM.ENTITY_NAME.getIri(), "1972-06-01T00:00:00"); + e6.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid()).toString()); - houseB.addValue(HQDM.MEMBER_OF_KIND.toString(), kindOfFunctionalSystemDomesticProperty.getId()); - houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - houseB.addValue(HQDM.INTENDED_ROLE.toString(), domesticPropertyRole.getId()); - houseB.addValue(HQDM.BEGINNING.toString(), e6.getId()); + houseB.addValue(HQDM.MEMBER_OF_KIND.getIri(), kindOfFunctionalSystemDomesticProperty.getId()); + houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + houseB.addValue(HQDM.INTENDED_ROLE.getIri(), domesticPropertyRole.getId()); + houseB.addValue(HQDM.BEGINNING.getIri(), e6.getId()); objects.add(e6); objects.add(houseB); @@ -281,20 +281,20 @@ public static List createDataObjects() { final StateOfFunctionalSystem houseBs1 = SpatioTemporalExtentServices.createStateOfFunctionalSystem( new IRI(USER_BASE, uid()).toString()); - houseBs1.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfFunctionalSystemDomesticProperty.getId()); - houseBs1.addValue(HQDM.TEMPORAL_PART_OF.toString(), houseB.getId()); - houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - houseBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); - houseBs1.addValue(HQDM.ENDING.toString(), e3.getId()); + houseBs1.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfFunctionalSystemDomesticProperty.getId()); + houseBs1.addValue(HQDM.TEMPORAL_PART_OF.getIri(), houseB.getId()); + houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + houseBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); + houseBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); objects.add(houseBs1); final StateOfFunctionalSystem houseBs2 = SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, uid()).toString()); - houseBs2.addValue(HQDM.MEMBER_OF.toString(), classOfStateOfFunctionalSystemDomesticProperty.getId()); - houseBs2.addValue(HQDM.TEMPORAL_PART_OF.toString(), houseB.getId()); - houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - houseBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); - houseBs2.addValue(HQDM.ENDING.toString(), e5.getId()); + houseBs2.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfFunctionalSystemDomesticProperty.getId()); + houseBs2.addValue(HQDM.TEMPORAL_PART_OF.getIri(), houseB.getId()); + houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + houseBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); + houseBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); objects.add(houseBs2); // Add the Associations and map the states above to the appropriate participant objects. @@ -303,72 +303,72 @@ public static List createDataObjects() { // state_of_person (see issues list). final Participant pPersonBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pPersonBs1.addValue(HQDM.MEMBER_OF_KIND.toString(), occupierOfPropertyRole.getId()); - pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF.toString(), personBs1.getId()); - pPersonBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); - pPersonBs1.addValue(HQDM.ENDING.toString(), e3.getId()); - pPersonBs1.addStringValue(ENTITY_NAME.toString(), + pPersonBs1.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupierOfPropertyRole.getId()); + pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF.getIri(), personBs1.getId()); + pPersonBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); + pPersonBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); + pPersonBs1.addStringValue(ENTITY_NAME.getIri(), "Note this is the state of person Bs1 that is participating the association"); objects.add(pPersonBs1); final Participant pHouseBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pHouseBs1.addValue(HQDM.MEMBER_OF_KIND.toString(), domesticOccupantInPropertyRole.getId()); - pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF.toString(), houseBs1.getId()); - pHouseBs1.addValue(HQDM.BEGINNING.toString(), e2.getId()); - pHouseBs1.addValue(HQDM.ENDING.toString(), e3.getId()); - pHouseBs1.addStringValue(ENTITY_NAME.toString(), + pHouseBs1.addValue(HQDM.MEMBER_OF_KIND.getIri(), domesticOccupantInPropertyRole.getId()); + pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF.getIri(), houseBs1.getId()); + pHouseBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); + pHouseBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); + pHouseBs1.addStringValue(ENTITY_NAME.getIri(), "Note this is the state of houseBs1 that is participating in the association"); objects.add(pHouseBs1); final Participant pPersonBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pPersonBs2.addValue(HQDM.MEMBER_OF_KIND.toString(), occupierOfPropertyRole.getId()); - pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF.toString(), personBs2.getId()); - pPersonBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); - pPersonBs2.addValue(HQDM.ENDING.toString(), e5.getId()); - pPersonBs2.addStringValue(ENTITY_NAME.toString(), + pPersonBs2.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupierOfPropertyRole.getId()); + pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF.getIri(), personBs2.getId()); + pPersonBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); + pPersonBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); + pPersonBs2.addStringValue(ENTITY_NAME.getIri(), "Note this is the state of person Bs2 that is participating in the association"); objects.add(pPersonBs2); final Participant pHouseBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - pHouseBs2.addValue(HQDM.MEMBER_OF_KIND.toString(), domesticOccupantInPropertyRole.getId()); - pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF.toString(), houseBs2.getId()); - pHouseBs2.addValue(HQDM.BEGINNING.toString(), e4.getId()); - pHouseBs2.addValue(HQDM.ENDING.toString(), e5.getId()); - pHouseBs2.addStringValue(ENTITY_NAME.toString(), + pHouseBs2.addValue(HQDM.MEMBER_OF_KIND.getIri(), domesticOccupantInPropertyRole.getId()); + pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF.getIri(), houseBs2.getId()); + pHouseBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); + pHouseBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); + pHouseBs2.addStringValue(ENTITY_NAME.getIri(), "Note this is the state of houseBs2 that is participating in the association"); objects.add(pHouseBs2); final Association houseOccupantPresentState1 = SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); - houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND.toString(), occupantInPropertyKindOfAssociation.getId()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pHouseBs1.getId()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pPersonBs1.getId()); - houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - houseOccupantPresentState1.addValue(HQDM.BEGINNING.toString(), e2.getId()); - houseOccupantPresentState1.addValue(HQDM.ENDING.toString(), e3.getId()); + houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupantInPropertyKindOfAssociation.getId()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pHouseBs1.getId()); + houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pPersonBs1.getId()); + houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + houseOccupantPresentState1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); + houseOccupantPresentState1.addValue(HQDM.ENDING.getIri(), e3.getId()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState1.addStringValue(ENTITY_NAME.toString(), "HouseOccupantPresent1"); + houseOccupantPresentState1.addStringValue(ENTITY_NAME.getIri(), "HouseOccupantPresent1"); objects.add(houseOccupantPresentState1); final Association houseOccupantPresentState2 = SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); - houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND.toString(), occupantInPropertyKindOfAssociation.getId()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pHouseBs2.getId()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.toString(), pPersonBs2.getId()); - houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.toString(), possibleWorld.getId()); - houseOccupantPresentState2.addValue(HQDM.BEGINNING.toString(), e4.getId()); - houseOccupantPresentState2.addValue(HQDM.ENDING.toString(), e5.getId()); + houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupantInPropertyKindOfAssociation.getId()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pHouseBs2.getId()); + houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pPersonBs2.getId()); + houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + houseOccupantPresentState2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); + houseOccupantPresentState2.addValue(HQDM.ENDING.getIri(), e5.getId()); // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState2.addStringValue(ENTITY_NAME.toString(), "HouseOccupantPresent2"); + houseOccupantPresentState2.addStringValue(ENTITY_NAME.getIri(), "HouseOccupantPresent2"); objects.add(houseOccupantPresentState2); return objects; From 31f6276a41abf20fff0837491571092af4eaf74a Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 31 May 2022 14:31:37 +0100 Subject: [PATCH 16/91] Broken - temporary checkin. --- .../magmacore/demo/ExampleDataObjects.java | 144 +++------ .../gov/gchq/magmacore/demo/ModelBuilder.java | 286 ++++++++++++++++++ 2 files changed, 334 insertions(+), 96 deletions(-) create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 73e119c9..77200185 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -16,11 +16,9 @@ import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; import static uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices.event; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; -import java.util.ArrayList; import java.util.List; import org.apache.jena.query.Dataset; @@ -48,7 +46,6 @@ import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.services.ClassServices; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; /** @@ -82,152 +79,107 @@ public static final Dataset buildDataset() { * @return A list of HQDM objects. */ public static List createDataObjects() { - final List objects = new ArrayList<>(); + final ModelBuilder builder = new ModelBuilder(); // RDL CLASSES - Can be created, stored and queried separately. // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final uk.gov.gchq.hqdm.model.Class viewable = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewable.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE"); - objects.add(viewable); + final uk.gov.gchq.hqdm.model.Class viewable = builder.createClass("VIEWABLE"); // A sub-set of the Viewable class. - final uk.gov.gchq.hqdm.model.Class viewableObject = ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewableObject.addValue(HQDM.HAS_SUPERCLASS.getIri(), viewable.getId()); - viewableObject.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE_OBJECT"); - objects.add(viewableObject); + final uk.gov.gchq.hqdm.model.Class viewableObject = builder.createClass("VIEWABLE_OBJECT"); // A sub-set of the Viewable Class for viewable Associations. - final uk.gov.gchq.hqdm.model.Class viewableAssociation = - ClassServices.createClass(new IRI(REF_BASE, uid()).toString()); - viewableAssociation.addValue(HQDM.HAS_SUPERCLASS.getIri(), viewable.getId()); - viewableAssociation.addStringValue(ENTITY_NAME.getIri(), "VIEWABLE_ASSOCIATION"); - objects.add(viewableAssociation); + final uk.gov.gchq.hqdm.model.Class viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); - // An system is composed of components so this is the class of components that a whole-life + // A system is composed of components so this is the class of components that a whole-life // person can have. final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = - ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).toString()); - - kindOfBiologicalSystemHumanComponent.addStringValue(ENTITY_NAME.getIri(), - "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); - objects.add(kindOfBiologicalSystemHumanComponent); + builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); // A class of whole-life person (re-)created as Reference Data. - final KindOfPerson kindOfPerson = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid()).toString()); - - kindOfPerson.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); - kindOfPerson.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), kindOfBiologicalSystemHumanComponent.getId()); - kindOfPerson.addStringValue(ENTITY_NAME.getIri(), "KIND_OF_PERSON"); - objects.add(kindOfPerson); + final KindOfPerson kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); // A class of temporal part (state) of a (whole-life) person. - final ClassOfStateOfPerson classOfStateOfPerson = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).toString()); - - classOfStateOfPerson.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); - classOfStateOfPerson.addStringValue(ENTITY_NAME.getIri(), "CLASS_OF_STATE_OF_PERSON"); - objects.add(classOfStateOfPerson); + final ClassOfStateOfPerson classOfStateOfPerson = builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); // A class of whole-life system that is a Building. final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = - ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - - kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME.getIri(), - "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); - objects.add(kindOfFunctionalSystemBuilding); + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = - ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).toString()); - - kindOfFunctionalSystemDomesticPropertyComponent.addStringValue(ENTITY_NAME.getIri(), - "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); - objects.add(kindOfFunctionalSystemDomesticPropertyComponent); + builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); // The class of whole-life system that is domestic property. final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_SUPERCLASS.getIri(), kindOfFunctionalSystemBuilding.getId()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); - kindOfFunctionalSystemDomesticProperty.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), kindOfFunctionalSystemDomesticPropertyComponent.getId()); - kindOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.getIri(), - "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - objects.add(kindOfFunctionalSystemDomesticProperty); + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of state of system whose members are temporal parts of domestic properties. final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid()).toString()); - - classOfStateOfFunctionalSystemDomesticProperty.addValue(HQDM.MEMBER__OF.getIri(), viewableObject.getId()); - classOfStateOfFunctionalSystemDomesticProperty.addStringValue(ENTITY_NAME.getIri(), - "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - objects.add(classOfStateOfFunctionalSystemDomesticProperty); + builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of role that every member of class of person plays. - final Role personRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - personRole.addStringValue(ENTITY_NAME.getIri(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - objects.add(personRole); + final Role personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); // The class of role that every member of class of domestic property plays. - final Role domesticPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - domesticPropertyRole.addStringValue(ENTITY_NAME.getIri(), - "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - objects.add(domesticPropertyRole); + final Role domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - final Role domesticOccupantInPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - domesticOccupantInPropertyRole.addValue(HQDM.HAS_SUPERCLASS.getIri(), domesticPropertyRole.getId()); + final Role domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - domesticOccupantInPropertyRole.addStringValue(ENTITY_NAME.getIri(), - "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - objects.add(domesticOccupantInPropertyRole); - - final Role occupierOfPropertyRole = ClassServices.createRole(new IRI(REF_BASE, uid()).toString()); - occupierOfPropertyRole.addValue(HQDM.HAS_SUPERCLASS.getIri(), classOfStateOfPerson.getId()); + final Role occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - occupierOfPropertyRole.addStringValue(ENTITY_NAME.getIri(), - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - objects.add(occupierOfPropertyRole); // Add the Association Types (Participants and Associations). final KindOfAssociation occupantInPropertyKindOfAssociation = - ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid()).toString()); + builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + + builder.addSubclass(viewable, viewableObject); + builder.addSubclass(viewable, viewableAssociation); + builder.addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty); + builder.addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole); + builder.addSubclass(classOfStateOfPerson, occupierOfPropertyRole); - occupantInPropertyKindOfAssociation.addValue(HQDM.MEMBER__OF.getIri(), viewableAssociation.getId()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), domesticOccupantInPropertyRole.getId()); - occupantInPropertyKindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), occupierOfPropertyRole.getId()); - occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME.getIri(), - "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + builder.addClassMember(viewableObject, kindOfPerson); + builder.addClassMember(viewableObject, classOfStateOfPerson); + builder.addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty); + builder.addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty); + builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); + + builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); + builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, kindOfFunctionalSystemDomesticPropertyComponent); + + builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); + builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); // STATES // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid()).toString()); - possibleWorld.addStringValue(ENTITY_NAME.getIri(), "Example1_World"); - objects.add(possibleWorld); + final PossibleWorld possibleWorld = builder.createPossibleWorld("Example1_World"); // Person B Whole Life Object. - final Event e1 = event(new IRI(USER_BASE, "1991-02-18T00:00:00").toString()); - e1.addStringValue(HQDM.ENTITY_NAME.getIri(), "1991-02-18T00:00:00"); - e1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final Person personB1 = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, uid()).toString()); - - personB1.addValue(HQDM.MEMBER_OF_KIND.getIri(), kindOfPerson.getId()); - personB1.addValue(HQDM.NATURAL_ROLE.getIri(), personRole.getId()); - personB1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - personB1.addValue(HQDM.BEGINNING.getIri(), e1.getId()); - personB1.addStringValue(ENTITY_NAME.getIri(), "PersonB1_Bob"); - objects.add(e1); - objects.add(personB1); + final Event e1 = builder.createPointInTime("1991-02-18T00:00:00"); + builder.addToPossibleWorld(possibleWorld, e1); + + final Person personB1 = builder.createPerson("PersonB1_Bob"); + + builder.addMemberOfKind(personB1, kindOfPerson); + builder.addNaturalRole(personB1, personRole); + builder.addToPossibleWorld(possibleWorld, personB1); + builder.addBeginningEvent(personB1, e1); + + + + // Person B states. final Event e2 = event(new IRI(USER_BASE, "2020-08-15T17:50:00").toString()); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java new file mode 100644 index 00000000..d9a32a4c --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java @@ -0,0 +1,286 @@ +package uk.gov.gchq.magmacore.demo; + +import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; + +import java.util.ArrayList; +import java.util.List; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Class; +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.model.KindOfAssociation; +import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.model.KindOfPerson; +import uk.gov.gchq.hqdm.model.KindOfSystem; +import uk.gov.gchq.hqdm.model.KindOfSystemComponent; +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.model.PointInTime; +import uk.gov.gchq.hqdm.model.PossibleWorld; +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.services.ClassServices; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; + +/** + * Class for building HQDM models. + * + * */ +public class ModelBuilder { + + private List objects; + + public ModelBuilder() { + objects = new ArrayList<>(); + } + + /** + * Create a new Class. + * + * @param name {@link String} + * @return a {@link Class} + * */ + public Class createClass(final String name) { + final Class c = ClassServices.createClass(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new ClassOfStateOfFunctionalSystem. + * + * @param name {@link String} + * @return a {@link ClassOfStateOfFunctionalSystem} + * */ + public ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final String name) { + final ClassOfStateOfFunctionalSystem c = + ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new ClassOfStateOfPerson. + * + * @param name {@link String} + * @return a {@link ClassOfStateOfPerson} + * */ + public ClassOfStateOfPerson createClassOfStateOfPerson(final String name) { + final ClassOfStateOfPerson c = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new KindOfAssociation. + * + * @param name {@link String} + * @return a {@link KindOfAssociation} + * */ + public KindOfAssociation createKindOfAssociation(final String name) { + final KindOfAssociation c = ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new Role. + * + * @param name {@link String} + * @return a {@link Role} + * */ + public Role createRole(final String name) { + final Role c = ClassServices.createRole(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new {@link KindOfBiologicalSystemComponent}. + * + * @param name the name {@link String} + * @return {@link KindOfBiologicalSystemComponent} + */ + public KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final String name) { + final KindOfBiologicalSystemComponent c = + ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new {@link KindOfFunctionalSystem}. + * + * @param name the name {@link String} + * @return {@link KindOfFunctionalSystem} + */ + public KindOfFunctionalSystem createKindOfFunctionalSystem(final String name) { + final KindOfFunctionalSystem c = ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new {@link KindOfFunctionalSystemComponent}. + * + * @param name the name {@link String} + * @return {@link KindOfFunctionalSystemComponent} + */ + public KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final String name) { + final KindOfFunctionalSystemComponent c = + ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a new {@link KindOfPerson}. + * + * @param name the name {@link String} + * @return {@link KindOfPerson} + */ + public KindOfPerson createKindOfPerson(final String name) { + final KindOfPerson c = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid()).getIri()); + c.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(c); + return c; + } + + /** + * Create a subclass relationship. + * + * @param superclass {@link Class} + * @param subclass {@link Class} + */ + public void addSubclass(final Class superclass, final Class subclass) { + subclass.addValue(HQDM.HAS_SUPERCLASS.getIri(), superclass.getId()); + } + + /** + * Add a {@link Class} as a member__of another {@link Class}. + * + * @param set the {@link Class} that the member is a member__of. + * @param member the {@link Class} that is the member of the set. + */ + public void addClassMember(final Class set, final Class member) { + member.addValue(HQDM.MEMBER__OF.getIri(), set.getId()); + } + + /** + * Add a HAS_COMPONENT_BY_CLASS relationship. + * + * @param system a {@link KindOfSystem} + * @param component a {@link KindOfSystemComponent} + */ + public void addHasComponentByClass(final KindOfSystem system, + final KindOfSystemComponent component) { + system.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), component.getId()); + } + + /** + * Add a CONSISTS_OF_BY_CLASS relationship. + * + * @param kindOfAssociation {@link KindOfAssociation} + * @param role {@link Role} + */ + public void addConsistsOfByClass(final KindOfAssociation kindOfAssociation, + final Role role) { + kindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), role.getId()); + } + + /** + * Create a new {@link PossibleWorld}. + * + * @param name {@link String} + * @return {@link PossibleWorld} + */ + public PossibleWorld createPossibleWorld(final String name) { + final PossibleWorld o = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid()).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Create a PointInTime. + * + * @param value {@link String} value of the date-time. + * @return {@link PointInTime} + */ + public PointInTime createPointInTime(final String value) { + final PointInTime o = SpatioTemporalExtentServices.createPointInTime(new IRI(USER_BASE, value).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), value); + objects.add(o); + return o; + } + + /** + * Create a Person. + * + * @param name {@link String} name of the entity. + * @return {@link Person} + */ + public Person createPerson(final String name) { + final Person o = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Add a {@link SpatioTemporalExtent} to a {@link PossibleWorld}. + * + * @param pw {@link PossibleWorld} + * @param ste {@link SpatioTemporalExtent} + */ + public void addToPossibleWorld(final PossibleWorld pw, final SpatioTemporalExtent ste) { + ste.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), pw.getId()); + } + + /** + * Add a MEMBER_OF_KIND. + * + * @param ste {@link SpatioTemporalExtent} + * @param k {@link Class} which should be a Kind of something. + */ + public void addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { + k.addValue(HQDM.MEMBER_OF_KIND.getIri(), ste.getId()); + } + + /** + * Add a NATURAL_ROLE. + * + * @param ste {@link SpatioTemporalExtent} + * @param r {@link Role} + */ + public void addNaturalRole(final SpatioTemporalExtent ste, final Role r) { + r.addValue(HQDM.NATURAL_ROLE.getIri(), ste.getId()); + } + + /** + * Add BEGINNING {@link Event}. + * + * @param ste {@link SpatioTemporalExtent} + * @param e {@link Event} + */ + public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { + ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); + } + +} From 29c280ff54019180fbd9fbaf4de1ddb3a8489d70 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 2 Jun 2022 17:31:52 +0100 Subject: [PATCH 17/91] Complete the use of ModelBuilder in ExampleDataObjects --- .../database/MagmaCoreJenaDatabase.java | 2 +- .../MagmaCoreRemoteSparqlDatabase.java | 2 +- .../magmacore/demo/ExampleDataObjects.java | 245 ++++++++---------- .../gov/gchq/magmacore/demo/ModelBuilder.java | 137 +++++++++- 4 files changed, 242 insertions(+), 144 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index ece8ec4a..5c12b9ad 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -48,8 +48,8 @@ import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.Triples; -import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 25a7dea9..3d1753b4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -43,8 +43,8 @@ import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.Triples; -import uk.gov.gchq.hqdm.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 77200185..b7a5b5ad 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -14,11 +14,6 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; -import static uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices.event; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; - import java.util.List; import org.apache.jena.query.Dataset; @@ -27,8 +22,6 @@ import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Resource; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Association; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; @@ -46,7 +39,6 @@ import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; /** * Constructs a set of example HQDM objects for demonstrating Magma Core. @@ -168,13 +160,13 @@ public static List createDataObjects() { // Person B Whole Life Object. final Event e1 = builder.createPointInTime("1991-02-18T00:00:00"); - builder.addToPossibleWorld(possibleWorld, e1); + builder.addToPossibleWorld(e1, possibleWorld); final Person personB1 = builder.createPerson("PersonB1_Bob"); builder.addMemberOfKind(personB1, kindOfPerson); builder.addNaturalRole(personB1, personRole); - builder.addToPossibleWorld(possibleWorld, personB1); + builder.addToPossibleWorld(personB1, possibleWorld); builder.addBeginningEvent(personB1, e1); @@ -182,147 +174,120 @@ public static List createDataObjects() { // Person B states. - final Event e2 = event(new IRI(USER_BASE, "2020-08-15T17:50:00").toString()); - e2.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-15T17:50:00"); - e2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final Event e3 = event(new IRI(USER_BASE, "2020-08-15T19:21:00").toString()); - e3.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-15T19:21:00"); - e3.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final StateOfPerson personBs1 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); - - personBs1.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfPerson.getId()); - personBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - personBs1.addValue(HQDM.TEMPORAL_PART_OF.getIri(), personB1.getId()); - personBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); - personBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); - objects.add(e2); - objects.add(e3); - objects.add(personBs1); - - final Event e4 = event(new IRI(USER_BASE, "2020-08-16T22:33:00").toString()); - e4.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-16T22:33:00"); - e4.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final Event e5 = event(new IRI(USER_BASE, "2020-08-17T10:46:00").toString()); - e5.addStringValue(HQDM.ENTITY_NAME.getIri(), "2020-08-17T10:46:00"); - e5.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final StateOfPerson personBs2 = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, uid()).toString()); - - personBs2.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfPerson.getId()); - personBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - personBs2.addValue(HQDM.TEMPORAL_PART_OF.getIri(), personB1.getId()); - personBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); - personBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); - objects.add(e4); - objects.add(e5); - objects.add(personBs2); + final Event e2 = builder.createPointInTime("2020-08-15T17:50:00"); + final Event e3 = builder.createPointInTime("2020-08-15T19:21:00"); + + builder.addToPossibleWorld(e2, possibleWorld); + builder.addToPossibleWorld(e3, possibleWorld); + + final StateOfPerson personBs1 = builder.createStateOfPerson(""); + + builder.addMemberOf(personBs1, classOfStateOfPerson); + builder.addToPossibleWorld(personBs1, possibleWorld); + builder.addTemporalPartOf(personBs1, personB1); + builder.addBeginningEvent(personBs1, e2); + builder.addEndingEvent(personBs1, e3); + + final Event e4 = builder.createPointInTime("2020-08-16T22:33:00"); + final Event e5 = builder.createPointInTime("2020-08-17T10:46:00"); + + builder.addToPossibleWorld(e4, possibleWorld); + builder.addToPossibleWorld(e5, possibleWorld); + + final StateOfPerson personBs2 = builder.createStateOfPerson(""); + + builder.addMemberOf(personBs2, classOfStateOfPerson); + builder.addToPossibleWorld(personBs2, possibleWorld); + builder.addTemporalPartOf(personBs2, personB1); + builder.addBeginningEvent(personBs2, e4); + builder.addEndingEvent(personBs2, e5); + // House B Whole Life Object. - final Event e6 = event(new IRI(USER_BASE, "1972-06-01T00:00:00").toString()); - e6.addStringValue(HQDM.ENTITY_NAME.getIri(), "1972-06-01T00:00:00"); - e6.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - final FunctionalSystem houseB = SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, uid()).toString()); - - houseB.addValue(HQDM.MEMBER_OF_KIND.getIri(), kindOfFunctionalSystemDomesticProperty.getId()); - houseB.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - houseB.addValue(HQDM.INTENDED_ROLE.getIri(), domesticPropertyRole.getId()); - houseB.addValue(HQDM.BEGINNING.getIri(), e6.getId()); - objects.add(e6); - objects.add(houseB); + final Event e6 = builder.createPointInTime("1972-06-01T00:00:00"); + builder.addToPossibleWorld(e6, possibleWorld); + final FunctionalSystem houseB = builder.createFunctionalSystem(""); + + builder.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); + builder.addToPossibleWorld(houseB, possibleWorld); + builder.addIntendedRole(houseB, domesticPropertyRole); + builder.addBeginningEvent(houseB, e6); // States of house when Occupant personBs1 is present. - final StateOfFunctionalSystem houseBs1 = SpatioTemporalExtentServices.createStateOfFunctionalSystem( - new IRI(USER_BASE, uid()).toString()); + final StateOfFunctionalSystem houseBs1 = builder.createStateOfFunctionalSystem(""); - houseBs1.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfFunctionalSystemDomesticProperty.getId()); - houseBs1.addValue(HQDM.TEMPORAL_PART_OF.getIri(), houseB.getId()); - houseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - houseBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); - houseBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); - objects.add(houseBs1); + builder.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); + builder.addTemporalPartOf(houseB, houseBs1); + builder.addToPossibleWorld(houseBs1, possibleWorld); + builder.addBeginningEvent(houseBs1, e2); + builder.addEndingEvent(houseBs1, e3); - final StateOfFunctionalSystem houseBs2 = SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, uid()).toString()); + final StateOfFunctionalSystem houseBs2 = builder.createStateOfFunctionalSystem("");; - houseBs2.addValue(HQDM.MEMBER_OF.getIri(), classOfStateOfFunctionalSystemDomesticProperty.getId()); - houseBs2.addValue(HQDM.TEMPORAL_PART_OF.getIri(), houseB.getId()); - houseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - houseBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); - houseBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); - objects.add(houseBs2); + builder.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); + builder.addTemporalPartOf(houseB, houseBs2); + builder.addToPossibleWorld(houseBs2, possibleWorld); + builder.addBeginningEvent(houseBs2, e4); + builder.addEndingEvent(houseBs2, e5); // Add the Associations and map the states above to the appropriate participant objects. // If we had full has_superClass resolving in HQDM classes then this participant object // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of // state_of_person (see issues list). - final Participant pPersonBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - - pPersonBs1.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupierOfPropertyRole.getId()); - pPersonBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - pPersonBs1.addValue(HQDM.TEMPORAL__PART_OF.getIri(), personBs1.getId()); - pPersonBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); - pPersonBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); - pPersonBs1.addStringValue(ENTITY_NAME.getIri(), - "Note this is the state of person Bs1 that is participating the association"); - objects.add(pPersonBs1); - - final Participant pHouseBs1 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - - pHouseBs1.addValue(HQDM.MEMBER_OF_KIND.getIri(), domesticOccupantInPropertyRole.getId()); - pHouseBs1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - pHouseBs1.addValue(HQDM.TEMPORAL__PART_OF.getIri(), houseBs1.getId()); - pHouseBs1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); - pHouseBs1.addValue(HQDM.ENDING.getIri(), e3.getId()); - pHouseBs1.addStringValue(ENTITY_NAME.getIri(), - "Note this is the state of houseBs1 that is participating in the association"); - objects.add(pHouseBs1); - - final Participant pPersonBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - - pPersonBs2.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupierOfPropertyRole.getId()); - pPersonBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - pPersonBs2.addValue(HQDM.TEMPORAL__PART_OF.getIri(), personBs2.getId()); - pPersonBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); - pPersonBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); - pPersonBs2.addStringValue(ENTITY_NAME.getIri(), - "Note this is the state of person Bs2 that is participating in the association"); - objects.add(pPersonBs2); - - final Participant pHouseBs2 = SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, uid()).toString()); - - pHouseBs2.addValue(HQDM.MEMBER_OF_KIND.getIri(), domesticOccupantInPropertyRole.getId()); - pHouseBs2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - pHouseBs2.addValue(HQDM.TEMPORAL__PART_OF.getIri(), houseBs2.getId()); - pHouseBs2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); - pHouseBs2.addValue(HQDM.ENDING.getIri(), e5.getId()); - pHouseBs2.addStringValue(ENTITY_NAME.getIri(), - "Note this is the state of houseBs2 that is participating in the association"); - objects.add(pHouseBs2); - - final Association houseOccupantPresentState1 = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); - - houseOccupantPresentState1.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupantInPropertyKindOfAssociation.getId()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pHouseBs1.getId()); - houseOccupantPresentState1.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pPersonBs1.getId()); - houseOccupantPresentState1.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - houseOccupantPresentState1.addValue(HQDM.BEGINNING.getIri(), e2.getId()); - houseOccupantPresentState1.addValue(HQDM.ENDING.getIri(), e3.getId()); - // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState1.addStringValue(ENTITY_NAME.getIri(), "HouseOccupantPresent1"); - objects.add(houseOccupantPresentState1); - - final Association houseOccupantPresentState2 = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, uid()).toString()); - - houseOccupantPresentState2.addValue(HQDM.MEMBER_OF_KIND.getIri(), occupantInPropertyKindOfAssociation.getId()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pHouseBs2.getId()); - houseOccupantPresentState2.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), pPersonBs2.getId()); - houseOccupantPresentState2.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - houseOccupantPresentState2.addValue(HQDM.BEGINNING.getIri(), e4.getId()); - houseOccupantPresentState2.addValue(HQDM.ENDING.getIri(), e5.getId()); - // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState2.addStringValue(ENTITY_NAME.getIri(), "HouseOccupantPresent2"); - objects.add(houseOccupantPresentState2); - - return objects; + final Participant pPersonBs1 = + builder.createParticipant("Note this is the state of person Bs1 that is participating the association"); + + builder.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); + builder.addToPossibleWorld(pPersonBs1, possibleWorld); + builder.addTemporalPartOf(pPersonBs1, personBs1); + builder.addBeginningEvent(pPersonBs1, e2); + builder.addEndingEvent(pPersonBs1, e3); + + final Participant pHouseBs1 = + builder.createParticipant("Note this is the state of houseBs1 that is participating in the association"); + + builder.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); + builder.addToPossibleWorld(pHouseBs1, possibleWorld); + builder.addTemporalPartOf(pHouseBs1, houseBs1); + builder.addBeginningEvent(pHouseBs1, e2); + builder.addEndingEvent(pHouseBs1, e3); + + final Participant pPersonBs2 = + builder.createParticipant("Note this is the state of person Bs2 that is participating in the association"); + + builder.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); + builder.addToPossibleWorld(pPersonBs2, possibleWorld); + builder.addTemporalPartOf(pPersonBs2, personBs2); + builder.addBeginningEvent(pPersonBs2, e4); + builder.addEndingEvent(pPersonBs2, e5); + + final Participant pHouseBs2 = + builder.createParticipant("Note this is the state of houseBs2 that is participating in the association"); + + builder.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); + builder.addToPossibleWorld(pHouseBs2, possibleWorld); + builder.addTemporalPartOf(pHouseBs2, houseBs2); + builder.addBeginningEvent(pHouseBs2, e4); + builder.addEndingEvent(pHouseBs2, e5); + + final Association houseOccupantPresentState1 = builder.createAssociation("HouseOccupantPresent1"); + + builder.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); + builder.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); + builder.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); + builder.addToPossibleWorld(houseOccupantPresentState1, possibleWorld); + builder.addBeginningEvent(houseOccupantPresentState1, e2); + builder.addEndingEvent(houseOccupantPresentState1, e3); + + final Association houseOccupantPresentState2 = builder.createAssociation("HouseOccupantPresent2"); + + builder.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); + builder.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); + builder.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); + builder.addToPossibleWorld(houseOccupantPresentState2, possibleWorld); + builder.addBeginningEvent(houseOccupantPresentState2, e4); + builder.addEndingEvent(houseOccupantPresentState2, e5); + + return builder.getObjects(); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java index d9a32a4c..870c89e7 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java @@ -10,10 +10,12 @@ import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Association; import uk.gov.gchq.hqdm.model.Class; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.model.FunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfAssociation; import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; @@ -21,11 +23,14 @@ import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.KindOfSystem; import uk.gov.gchq.hqdm.model.KindOfSystemComponent; +import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.Person; import uk.gov.gchq.hqdm.model.PointInTime; import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.services.ClassServices; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; @@ -42,6 +47,15 @@ public ModelBuilder() { objects = new ArrayList<>(); } + /** + * Get the model objects. + * + * @return a {@link List} of {@link Thing} + */ + public List getObjects() { + return objects; + } + /** * Create a new Class. * @@ -243,13 +257,82 @@ public Person createPerson(final String name) { return o; } + /** + * Create a StateOfPerson. + * + * @param name {@link String} name of the entity. + * @return {@link StateOfPerson} + */ + public StateOfPerson createStateOfPerson(final String name) { + final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Create a FunctionalSystem. + * + * @param name {@link String} name of the entity. + * @return {@link FunctionalSystem} + */ + public FunctionalSystem createFunctionalSystem(final String name) { + final FunctionalSystem o = + SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Create a StateOfFunctionalSystem. + * + * @param name {@link String} name of the entity. + * @return {@link StateOfFunctionalSystem} + */ + public StateOfFunctionalSystem createStateOfFunctionalSystem(final String name) { + final StateOfFunctionalSystem o = + SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Create a Participant. + * + * @param name {@link String} name of the entity. + * @return {@link Participant} + */ + public Participant createParticipant(final String name) { + final Participant o = + SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + + /** + * Create a Association. + * + * @param name {@link String} name of the entity. + * @return {@link Association} + */ + public Association createAssociation(final String name) { + final Association o = + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + return o; + } + /** * Add a {@link SpatioTemporalExtent} to a {@link PossibleWorld}. * - * @param pw {@link PossibleWorld} * @param ste {@link SpatioTemporalExtent} + * @param pw {@link PossibleWorld} */ - public void addToPossibleWorld(final PossibleWorld pw, final SpatioTemporalExtent ste) { + public void addToPossibleWorld(final SpatioTemporalExtent ste, final PossibleWorld pw) { ste.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), pw.getId()); } @@ -283,4 +366,54 @@ public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); } + /** + * Add ENDING {@link Event}. + * + * @param ste {@link SpatioTemporalExtent} + * @param e {@link Event} + */ + public void addEndingEvent(final SpatioTemporalExtent ste, final Event e) { + ste.addValue(HQDM.ENDING.getIri(), e.getId()); + } + + /** + * Add MEMBER_OF. + * + * @param ste {@link SpatioTemporalExtent} + * @param c {@link Class} + */ + public void addMemberOf(final SpatioTemporalExtent ste, final Class c) { + ste.addValue(HQDM.MEMBER_OF.getIri(), c.getId()); + } + + /** + * Add TEMPORAL_PART_OF. + * + * @param whole {@link SpatioTemporalExtent} + * @param part {@link SpatioTemporalExtent} + */ + public void addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { + part.addValue(HQDM.TEMPORAL_PART_OF.getIri(), whole.getId()); + } + + /** + * Add INTENDED_ROLE. + * + * @param ste {@link SpatioTemporalExtent} + * @param r {@link Role} + */ + public void addIntendedRole(final SpatioTemporalExtent ste, final Role r) { + ste.addValue(HQDM.INTENDED_ROLE.getIri(), r.getId()); + } + + /** + * Add CONSISTS_OF_PARTICIPANT. + * + * @param a {@link Association} + * @param p {@link Participant} + */ + public void addConsistsOfParticipant(final Association a, final Participant p) { + a.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), p.getId()); + } + } From ba36ae3a70fdaacc4a15b1abd13a69d4b16e2405 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 4 Jun 2022 12:30:53 +0100 Subject: [PATCH 18/91] Checkpoint - add higher level model operations. --- builder_deps.dot | 151 +++++++++++ .../magmacore/demo/ExampleDataObjects.java | 164 +++++------- .../gov/gchq/magmacore/demo/ModelBuilder.java | 214 +-------------- .../magmacore/demo/PossibleWorldContext.java | 247 ++++++++++++++++++ 4 files changed, 474 insertions(+), 302 deletions(-) create mode 100644 builder_deps.dot create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java diff --git a/builder_deps.dot b/builder_deps.dot new file mode 100644 index 00000000..602de066 --- /dev/null +++ b/builder_deps.dot @@ -0,0 +1,151 @@ +digraph { + layout=dot; + rankdir=LR; + node[shape=rect,style="rounded,filled",color=black,fillcolor=white]; + + subgraph cluster_classes { + style=rounded; + label="Classes"; + + classOfStateOfFunctionalSystemDomesticProperty; + classOfStateOfPerson; + domesticOccupantInPropertyRole; + domesticPropertyRole; + kindOfBiologicalSystemHumanComponent; + kindOfFunctionalSystemBuilding; + kindOfFunctionalSystemDomesticProperty; + kindOfFunctionalSystemDomesticPropertyComponent; + kindOfPerson; + occupantInPropertyKindOfAssociation; + occupierOfPropertyRole; + personRole; + viewable; + viewableAssociation; + viewableObject; + } + subgraph cluster_stes { + style=rounded; + label="SpatioTemporalExtents"; + + subgraph cluster_events { + style=rounded; + label="Events"; + + e1; + e2; + e3; + e4; + e5; + e6; + } + + subgraph cluster_individuals { + label="Individuals"; + houseB; + personB1; + } + + subgraph cluster_states { + label="States"; + houseBs1; + houseBs2; + personBs1; + personBs2; + } + + subgraph cluster_participants { + label="Participants"; + pHouseBs1; + pHouseBs2; + pPersonBs1; + pPersonBs2; + } + + subgraph cluster_associations { + label="Associations"; + houseOccupantPresentState1; + houseOccupantPresentState2; + } + possibleWorld[fillcolor=lightblue]; + }; + + houseOccupantPresentState2 -> occupantInPropertyKindOfAssociation; + houseOccupantPresentState2 -> pHouseBs2; + houseOccupantPresentState2 -> pPersonBs2; + houseOccupantPresentState2 -> e4; + houseOccupantPresentState2 -> e5; + + houseOccupantPresentState1 -> occupantInPropertyKindOfAssociation; + houseOccupantPresentState1 -> pHouseBs1; + houseOccupantPresentState1 -> pPersonBs1; + houseOccupantPresentState1 -> e2; + houseOccupantPresentState1 -> e3; + + viewable -> viewableObject; + viewable -> viewableAssociation; + kindOfFunctionalSystemBuilding -> kindOfFunctionalSystemDomesticProperty; + domesticPropertyRole -> domesticOccupantInPropertyRole; + classOfStateOfPerson -> occupierOfPropertyRole; + + viewableObject -> kindOfPerson; + viewableObject -> classOfStateOfPerson; + viewableObject -> kindOfFunctionalSystemDomesticProperty; + viewableObject -> classOfStateOfFunctionalSystemDomesticProperty; + viewableAssociation -> occupantInPropertyKindOfAssociation; + + kindOfPerson -> kindOfBiologicalSystemHumanComponent; + kindOfFunctionalSystemDomesticProperty -> kindOfFunctionalSystemDomesticPropertyComponent; + + occupantInPropertyKindOfAssociation -> domesticOccupantInPropertyRole; + occupantInPropertyKindOfAssociation -> occupierOfPropertyRole; + + + personB1 -> kindOfPerson; + personB1 -> personRole; + personB1 -> e1; + + personBs1 -> classOfStateOfPerson; + personBs1 -> personB1; + personBs1 -> e2; + personBs1 -> e3; + + personBs2 -> classOfStateOfPerson; + personBs2 -> personB1; + personBs2 -> e4; + personBs2 -> e5; + + houseB -> kindOfFunctionalSystemDomesticProperty; + houseB -> domesticPropertyRole; + houseB -> e6; + + houseBs1 -> classOfStateOfFunctionalSystemDomesticProperty; + houseBs1 -> houseB; + houseBs1 -> e2; + houseBs1 -> e3; + + houseBs2 -> classOfStateOfFunctionalSystemDomesticProperty; + houseBs2 -> houseB; + houseBs2 -> e4; + houseBs2 -> e5; + + pPersonBs1 -> occupierOfPropertyRole; + pPersonBs1 -> personBs1; + pPersonBs1 -> e2; + pPersonBs1 -> e3; + + pHouseBs1 -> domesticOccupantInPropertyRole; + pHouseBs1 -> houseBs1; + pHouseBs1 -> e2; + pHouseBs1 -> e3; + + pPersonBs2 -> occupierOfPropertyRole; + pPersonBs2 -> personBs2; + pPersonBs2 -> e4; + pPersonBs2 -> e5; + + pHouseBs2 -> domesticOccupantInPropertyRole; + pHouseBs2 -> houseBs2; + pHouseBs2 -> e4; + pHouseBs2 -> e5; + +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index b7a5b5ad..852e11f4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -14,6 +14,7 @@ package uk.gov.gchq.magmacore.demo; +import java.util.ArrayList; import java.util.List; import org.apache.jena.query.Dataset; @@ -34,7 +35,6 @@ import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.StateOfPerson; @@ -150,144 +150,124 @@ public static List createDataObjects() { builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); - // STATES // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorld possibleWorld = builder.createPossibleWorld("Example1_World"); + final PossibleWorldContext pwContext = new PossibleWorldContext("Example1_World"); // Person B Whole Life Object. - final Event e1 = builder.createPointInTime("1991-02-18T00:00:00"); - builder.addToPossibleWorld(e1, possibleWorld); - - final Person personB1 = builder.createPerson("PersonB1_Bob"); - - builder.addMemberOfKind(personB1, kindOfPerson); - builder.addNaturalRole(personB1, personRole); - builder.addToPossibleWorld(personB1, possibleWorld); - builder.addBeginningEvent(personB1, e1); - - + final Event e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); + final Person personB1 = pwContext.createPerson("PersonB1_Bob"); + pwContext.addMemberOfKind(personB1, kindOfPerson); + pwContext.addNaturalRole(personB1, personRole); + pwContext.addBeginningEvent(personB1, e1); // Person B states. - final Event e2 = builder.createPointInTime("2020-08-15T17:50:00"); - final Event e3 = builder.createPointInTime("2020-08-15T19:21:00"); + final Event e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); + final Event e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); - builder.addToPossibleWorld(e2, possibleWorld); - builder.addToPossibleWorld(e3, possibleWorld); - final StateOfPerson personBs1 = builder.createStateOfPerson(""); + final StateOfPerson personBs1 = pwContext.createStateOfPerson(""); - builder.addMemberOf(personBs1, classOfStateOfPerson); - builder.addToPossibleWorld(personBs1, possibleWorld); - builder.addTemporalPartOf(personBs1, personB1); - builder.addBeginningEvent(personBs1, e2); - builder.addEndingEvent(personBs1, e3); + pwContext.addMemberOf(personBs1, classOfStateOfPerson); + pwContext.addTemporalPartOf(personBs1, personB1); + pwContext.addBeginningEvent(personBs1, e2); + pwContext.addEndingEvent(personBs1, e3); - final Event e4 = builder.createPointInTime("2020-08-16T22:33:00"); - final Event e5 = builder.createPointInTime("2020-08-17T10:46:00"); + final Event e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); + final Event e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); - builder.addToPossibleWorld(e4, possibleWorld); - builder.addToPossibleWorld(e5, possibleWorld); - final StateOfPerson personBs2 = builder.createStateOfPerson(""); + final StateOfPerson personBs2 = pwContext.createStateOfPerson(""); - builder.addMemberOf(personBs2, classOfStateOfPerson); - builder.addToPossibleWorld(personBs2, possibleWorld); - builder.addTemporalPartOf(personBs2, personB1); - builder.addBeginningEvent(personBs2, e4); - builder.addEndingEvent(personBs2, e5); + pwContext.addMemberOf(personBs2, classOfStateOfPerson); + pwContext.addTemporalPartOf(personBs2, personB1); + pwContext.addBeginningEvent(personBs2, e4); + pwContext.addEndingEvent(personBs2, e5); // House B Whole Life Object. - final Event e6 = builder.createPointInTime("1972-06-01T00:00:00"); - builder.addToPossibleWorld(e6, possibleWorld); - final FunctionalSystem houseB = builder.createFunctionalSystem(""); + final Event e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); + final FunctionalSystem houseB = pwContext.createFunctionalSystem(""); - builder.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); - builder.addToPossibleWorld(houseB, possibleWorld); - builder.addIntendedRole(houseB, domesticPropertyRole); - builder.addBeginningEvent(houseB, e6); + pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); + pwContext.addIntendedRole(houseB, domesticPropertyRole); + pwContext.addBeginningEvent(houseB, e6); // States of house when Occupant personBs1 is present. - final StateOfFunctionalSystem houseBs1 = builder.createStateOfFunctionalSystem(""); + final StateOfFunctionalSystem houseBs1 = pwContext.createStateOfFunctionalSystem(""); - builder.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); - builder.addTemporalPartOf(houseB, houseBs1); - builder.addToPossibleWorld(houseBs1, possibleWorld); - builder.addBeginningEvent(houseBs1, e2); - builder.addEndingEvent(houseBs1, e3); + pwContext.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); + pwContext.addTemporalPartOf(houseB, houseBs1); + pwContext.addBeginningEvent(houseBs1, e2); + pwContext.addEndingEvent(houseBs1, e3); - final StateOfFunctionalSystem houseBs2 = builder.createStateOfFunctionalSystem("");; + final StateOfFunctionalSystem houseBs2 = pwContext.createStateOfFunctionalSystem("");; - builder.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); - builder.addTemporalPartOf(houseB, houseBs2); - builder.addToPossibleWorld(houseBs2, possibleWorld); - builder.addBeginningEvent(houseBs2, e4); - builder.addEndingEvent(houseBs2, e5); + pwContext.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); + pwContext.addTemporalPartOf(houseB, houseBs2); + pwContext.addBeginningEvent(houseBs2, e4); + pwContext.addEndingEvent(houseBs2, e5); // Add the Associations and map the states above to the appropriate participant objects. // If we had full has_superClass resolving in HQDM classes then this participant object // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of // state_of_person (see issues list). final Participant pPersonBs1 = - builder.createParticipant("Note this is the state of person Bs1 that is participating the association"); + pwContext.createParticipant("Note this is the state of person Bs1 that is participating the association"); - builder.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); - builder.addToPossibleWorld(pPersonBs1, possibleWorld); - builder.addTemporalPartOf(pPersonBs1, personBs1); - builder.addBeginningEvent(pPersonBs1, e2); - builder.addEndingEvent(pPersonBs1, e3); + pwContext.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); + pwContext.addTemporalPartOf(pPersonBs1, personBs1); + pwContext.addBeginningEvent(pPersonBs1, e2); + pwContext.addEndingEvent(pPersonBs1, e3); final Participant pHouseBs1 = - builder.createParticipant("Note this is the state of houseBs1 that is participating in the association"); + pwContext.createParticipant("Note this is the state of houseBs1 that is participating in the association"); - builder.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); - builder.addToPossibleWorld(pHouseBs1, possibleWorld); - builder.addTemporalPartOf(pHouseBs1, houseBs1); - builder.addBeginningEvent(pHouseBs1, e2); - builder.addEndingEvent(pHouseBs1, e3); + pwContext.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); + pwContext.addTemporalPartOf(pHouseBs1, houseBs1); + pwContext.addBeginningEvent(pHouseBs1, e2); + pwContext.addEndingEvent(pHouseBs1, e3); final Participant pPersonBs2 = - builder.createParticipant("Note this is the state of person Bs2 that is participating in the association"); + pwContext.createParticipant("Note this is the state of person Bs2 that is participating in the association"); - builder.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); - builder.addToPossibleWorld(pPersonBs2, possibleWorld); - builder.addTemporalPartOf(pPersonBs2, personBs2); - builder.addBeginningEvent(pPersonBs2, e4); - builder.addEndingEvent(pPersonBs2, e5); + pwContext.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); + pwContext.addTemporalPartOf(pPersonBs2, personBs2); + pwContext.addBeginningEvent(pPersonBs2, e4); + pwContext.addEndingEvent(pPersonBs2, e5); final Participant pHouseBs2 = - builder.createParticipant("Note this is the state of houseBs2 that is participating in the association"); + pwContext.createParticipant("Note this is the state of houseBs2 that is participating in the association"); - builder.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); - builder.addToPossibleWorld(pHouseBs2, possibleWorld); - builder.addTemporalPartOf(pHouseBs2, houseBs2); - builder.addBeginningEvent(pHouseBs2, e4); - builder.addEndingEvent(pHouseBs2, e5); + pwContext.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); + pwContext.addTemporalPartOf(pHouseBs2, houseBs2); + pwContext.addBeginningEvent(pHouseBs2, e4); + pwContext.addEndingEvent(pHouseBs2, e5); - final Association houseOccupantPresentState1 = builder.createAssociation("HouseOccupantPresent1"); + final Association houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); - builder.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); - builder.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); - builder.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); - builder.addToPossibleWorld(houseOccupantPresentState1, possibleWorld); - builder.addBeginningEvent(houseOccupantPresentState1, e2); - builder.addEndingEvent(houseOccupantPresentState1, e3); + pwContext.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); + pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); + pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); + pwContext.addBeginningEvent(houseOccupantPresentState1, e2); + pwContext.addEndingEvent(houseOccupantPresentState1, e3); - final Association houseOccupantPresentState2 = builder.createAssociation("HouseOccupantPresent2"); + final Association houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); - builder.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); - builder.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); - builder.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); - builder.addToPossibleWorld(houseOccupantPresentState2, possibleWorld); - builder.addBeginningEvent(houseOccupantPresentState2, e4); - builder.addEndingEvent(houseOccupantPresentState2, e5); + pwContext.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); + pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); + pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); + pwContext.addBeginningEvent(houseOccupantPresentState2, e4); + pwContext.addEndingEvent(houseOccupantPresentState2, e5); - return builder.getObjects(); + final var result = new ArrayList(); + result.addAll(builder.getObjects()); + result.addAll(pwContext.getObjects()); + return result; } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java index 870c89e7..c43cbd0d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java @@ -2,7 +2,6 @@ import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; import java.util.ArrayList; @@ -10,12 +9,9 @@ import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Association; import uk.gov.gchq.hqdm.model.Class; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.model.FunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfAssociation; import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; @@ -23,17 +19,9 @@ import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.KindOfSystem; import uk.gov.gchq.hqdm.model.KindOfSystemComponent; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.model.PointInTime; -import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.services.ClassServices; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; /** * Class for building HQDM models. @@ -43,6 +31,10 @@ public class ModelBuilder { private List objects; + /** + * Constructor. + * + * */ public ModelBuilder() { objects = new ArrayList<>(); } @@ -218,202 +210,4 @@ public void addConsistsOfByClass(final KindOfAssociation kindOfAssociation, kindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), role.getId()); } - /** - * Create a new {@link PossibleWorld}. - * - * @param name {@link String} - * @return {@link PossibleWorld} - */ - public PossibleWorld createPossibleWorld(final String name) { - final PossibleWorld o = SpatioTemporalExtentServices.createPossibleWorld(new IRI(USER_BASE, uid()).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a PointInTime. - * - * @param value {@link String} value of the date-time. - * @return {@link PointInTime} - */ - public PointInTime createPointInTime(final String value) { - final PointInTime o = SpatioTemporalExtentServices.createPointInTime(new IRI(USER_BASE, value).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), value); - objects.add(o); - return o; - } - - /** - * Create a Person. - * - * @param name {@link String} name of the entity. - * @return {@link Person} - */ - public Person createPerson(final String name) { - final Person o = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a StateOfPerson. - * - * @param name {@link String} name of the entity. - * @return {@link StateOfPerson} - */ - public StateOfPerson createStateOfPerson(final String name) { - final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a FunctionalSystem. - * - * @param name {@link String} name of the entity. - * @return {@link FunctionalSystem} - */ - public FunctionalSystem createFunctionalSystem(final String name) { - final FunctionalSystem o = - SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a StateOfFunctionalSystem. - * - * @param name {@link String} name of the entity. - * @return {@link StateOfFunctionalSystem} - */ - public StateOfFunctionalSystem createStateOfFunctionalSystem(final String name) { - final StateOfFunctionalSystem o = - SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a Participant. - * - * @param name {@link String} name of the entity. - * @return {@link Participant} - */ - public Participant createParticipant(final String name) { - final Participant o = - SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Create a Association. - * - * @param name {@link String} name of the entity. - * @return {@link Association} - */ - public Association createAssociation(final String name) { - final Association o = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, name).getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - return o; - } - - /** - * Add a {@link SpatioTemporalExtent} to a {@link PossibleWorld}. - * - * @param ste {@link SpatioTemporalExtent} - * @param pw {@link PossibleWorld} - */ - public void addToPossibleWorld(final SpatioTemporalExtent ste, final PossibleWorld pw) { - ste.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), pw.getId()); - } - - /** - * Add a MEMBER_OF_KIND. - * - * @param ste {@link SpatioTemporalExtent} - * @param k {@link Class} which should be a Kind of something. - */ - public void addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { - k.addValue(HQDM.MEMBER_OF_KIND.getIri(), ste.getId()); - } - - /** - * Add a NATURAL_ROLE. - * - * @param ste {@link SpatioTemporalExtent} - * @param r {@link Role} - */ - public void addNaturalRole(final SpatioTemporalExtent ste, final Role r) { - r.addValue(HQDM.NATURAL_ROLE.getIri(), ste.getId()); - } - - /** - * Add BEGINNING {@link Event}. - * - * @param ste {@link SpatioTemporalExtent} - * @param e {@link Event} - */ - public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { - ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); - } - - /** - * Add ENDING {@link Event}. - * - * @param ste {@link SpatioTemporalExtent} - * @param e {@link Event} - */ - public void addEndingEvent(final SpatioTemporalExtent ste, final Event e) { - ste.addValue(HQDM.ENDING.getIri(), e.getId()); - } - - /** - * Add MEMBER_OF. - * - * @param ste {@link SpatioTemporalExtent} - * @param c {@link Class} - */ - public void addMemberOf(final SpatioTemporalExtent ste, final Class c) { - ste.addValue(HQDM.MEMBER_OF.getIri(), c.getId()); - } - - /** - * Add TEMPORAL_PART_OF. - * - * @param whole {@link SpatioTemporalExtent} - * @param part {@link SpatioTemporalExtent} - */ - public void addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { - part.addValue(HQDM.TEMPORAL_PART_OF.getIri(), whole.getId()); - } - - /** - * Add INTENDED_ROLE. - * - * @param ste {@link SpatioTemporalExtent} - * @param r {@link Role} - */ - public void addIntendedRole(final SpatioTemporalExtent ste, final Role r) { - ste.addValue(HQDM.INTENDED_ROLE.getIri(), r.getId()); - } - - /** - * Add CONSISTS_OF_PARTICIPANT. - * - * @param a {@link Association} - * @param p {@link Participant} - */ - public void addConsistsOfParticipant(final Association a, final Participant p) { - a.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), p.getId()); - } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java new file mode 100644 index 00000000..48d1e3ef --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java @@ -0,0 +1,247 @@ +package uk.gov.gchq.magmacore.demo; + +import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; + +import java.util.ArrayList; +import java.util.List; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Association; +import uk.gov.gchq.hqdm.model.Class; +import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.model.FunctionalSystem; +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.model.PointInTime; +import uk.gov.gchq.hqdm.model.PossibleWorld; +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.StateOfPerson; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; + +/** + * Class for building HQDM models. + * Adds objects to the supplied {@link PossibleWorld}. + * + * */ +public class PossibleWorldContext { + + private List objects; + private PossibleWorld possibleWorld; + + /** + * Constructor that creates a new {@link PossibleWorld}. + * + * @param name The {@link PossibleWorld} name. + * */ + public PossibleWorldContext(final String name) { + this(SpatioTemporalExtentServices.createPossibleWorld(name)); + } + + /** + * Constructor. + * + * @param p {@link PossibleWorld} + */ + public PossibleWorldContext(final PossibleWorld p) { + this.possibleWorld = p; + objects = new ArrayList<>(); + objects.add(p); + } + + /** + * Get the model objects. + * + * @return a {@link List} of {@link Thing} + */ + public List getObjects() { + return objects; + } + + /** + * Create a PointInTime. + * + * @param value {@link String} value of the date-time. + * @return {@link PointInTime} + */ + public PointInTime createPointInTime(final String value) { + final PointInTime o = SpatioTemporalExtentServices.createPointInTime(new IRI(USER_BASE, value).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), value); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a Person. + * + * @param name {@link String} name of the entity. + * @return {@link Person} + */ + public Person createPerson(final String name) { + final Person o = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a StateOfPerson. + * + * @param name {@link String} name of the entity. + * @return {@link StateOfPerson} + */ + public StateOfPerson createStateOfPerson(final String name) { + final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a FunctionalSystem. + * + * @param name {@link String} name of the entity. + * @return {@link FunctionalSystem} + */ + public FunctionalSystem createFunctionalSystem(final String name) { + final FunctionalSystem o = + SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a StateOfFunctionalSystem. + * + * @param name {@link String} name of the entity. + * @return {@link StateOfFunctionalSystem} + */ + public StateOfFunctionalSystem createStateOfFunctionalSystem(final String name) { + final StateOfFunctionalSystem o = + SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a Participant. + * + * @param name {@link String} name of the entity. + * @return {@link Participant} + */ + public Participant createParticipant(final String name) { + final Participant o = + SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Create a Association. + * + * @param name {@link String} name of the entity. + * @return {@link Association} + */ + public Association createAssociation(final String name) { + final Association o = + SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, name).getIri()); + o.addStringValue(ENTITY_NAME.getIri(), name); + objects.add(o); + o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); + return o; + } + + /** + * Add a MEMBER_OF_KIND. + * + * @param ste {@link SpatioTemporalExtent} + * @param k {@link Class} which should be a Kind of something. + */ + public void addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { + k.addValue(HQDM.MEMBER_OF_KIND.getIri(), ste.getId()); + } + + /** + * Add a NATURAL_ROLE. + * + * @param ste {@link SpatioTemporalExtent} + * @param r {@link Role} + */ + public void addNaturalRole(final SpatioTemporalExtent ste, final Role r) { + r.addValue(HQDM.NATURAL_ROLE.getIri(), ste.getId()); + } + + /** + * Add BEGINNING {@link Event}. + * + * @param ste {@link SpatioTemporalExtent} + * @param e {@link Event} + */ + public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { + ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); + } + + /** + * Add ENDING {@link Event}. + * + * @param ste {@link SpatioTemporalExtent} + * @param e {@link Event} + */ + public void addEndingEvent(final SpatioTemporalExtent ste, final Event e) { + ste.addValue(HQDM.ENDING.getIri(), e.getId()); + } + + /** + * Add MEMBER_OF. + * + * @param ste {@link SpatioTemporalExtent} + * @param c {@link Class} + */ + public void addMemberOf(final SpatioTemporalExtent ste, final Class c) { + ste.addValue(HQDM.MEMBER_OF.getIri(), c.getId()); + } + + /** + * Add TEMPORAL_PART_OF. + * + * @param whole {@link SpatioTemporalExtent} + * @param part {@link SpatioTemporalExtent} + */ + public void addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { + part.addValue(HQDM.TEMPORAL_PART_OF.getIri(), whole.getId()); + } + + /** + * Add INTENDED_ROLE. + * + * @param ste {@link SpatioTemporalExtent} + * @param r {@link Role} + */ + public void addIntendedRole(final SpatioTemporalExtent ste, final Role r) { + ste.addValue(HQDM.INTENDED_ROLE.getIri(), r.getId()); + } + + /** + * Add CONSISTS_OF_PARTICIPANT. + * + * @param a {@link Association} + * @param p {@link Participant} + */ + public void addConsistsOfParticipant(final Association a, final Participant p) { + a.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), p.getId()); + } + +} From a64cc8f18f9b0fc4f04f4d0cea2b147cd93e07ce Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 4 Jun 2022 14:41:46 +0100 Subject: [PATCH 19/91] A better way to populate the example database. --- .../gchq/magmacore/demo/SystemFunctions.java | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java b/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java new file mode 100644 index 00000000..c46d1e35 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java @@ -0,0 +1,285 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.function.Function; +import java.util.function.Supplier; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.model.Association; +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.model.FunctionalSystem; +import uk.gov.gchq.hqdm.model.KindOfAssociation; +import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.model.KindOfPerson; +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.StateOfPerson; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class SystemFunctions { + + // A Supplier of a MagmaCoreDatabase. + private static Supplier createDatabase = () -> new MagmaCoreObjectDatabase(); + + // A Supplier of a ModelBuilder. + private static Supplier createRefDataObjects = () -> { + final ModelBuilder builder = new ModelBuilder(); + + // RDL CLASSES - Can be created, stored and queried separately. + + // Viewable is a class to assign other data objects to, to indicate that they are likely to + // be of direct interest to a system user. + final uk.gov.gchq.hqdm.model.Class viewable = builder.createClass("VIEWABLE"); + + // A sub-set of the Viewable class. + final uk.gov.gchq.hqdm.model.Class viewableObject = builder.createClass("VIEWABLE_OBJECT"); + + // A sub-set of the Viewable Class for viewable Associations. + final uk.gov.gchq.hqdm.model.Class viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); + + // A system is composed of components so this is the class of components that a whole-life + // person can have. + final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = + builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); + + // A class of whole-life person (re-)created as Reference Data. + final KindOfPerson kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); + + // A class of temporal part (state) of a (whole-life) person. + final ClassOfStateOfPerson classOfStateOfPerson = + builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); + + // A class of whole-life system that is a Building. + final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); + + // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front + // door, etc). This is the class of those whole-life system components. + final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = + builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); + + // The class of whole-life system that is domestic property. + final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + + // The class of state of system whose members are temporal parts of domestic properties. + final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = + builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + + // The class of role that every member of class of person plays. + final Role personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + + // The class of role that every member of class of domestic property plays. + final Role domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + + final Role domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't + // neatly do that in the class as it can only be added after + // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. + + final Role occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't + // neatly do that in the class as it can only be added after + // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. + + // Add the Association Types (Participants and Associations). + final KindOfAssociation occupantInPropertyKindOfAssociation = + builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + + builder.addSubclass(viewable, viewableObject); + builder.addSubclass(viewable, viewableAssociation); + builder.addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty); + builder.addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole); + builder.addSubclass(classOfStateOfPerson, occupierOfPropertyRole); + + builder.addClassMember(viewableObject, kindOfPerson); + builder.addClassMember(viewableObject, classOfStateOfPerson); + builder.addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty); + builder.addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty); + builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); + + builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); + builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, + kindOfFunctionalSystemDomesticPropertyComponent); + + builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); + builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); + + return builder; + }; + + // A DB transformer that adds example entity instances. + private static Function addExampleEntities = (db) -> { + final var kindOfPerson = (KindOfPerson) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "KIND_OF_PERSON").get(0); + final var personRole = (Role) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE").get(0); + final var classOfStateOfPerson = (ClassOfStateOfPerson) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON").get(0); + final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY").get(0); + final var domesticPropertyRole = (Role) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE").get(0); + final var classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY").get(0); + final var occupierOfPropertyRole = (Role) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + "OCCUPIER_LOCATED_IN_PROPERTY_ROLE").get(0); + final var domesticOccupantInPropertyRole = (Role) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE").get(0); + final var occupantInPropertyKindOfAssociation = (KindOfAssociation) + db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION").get(0); + + // STATES + + // The main state: This is a mandatory component of all datasets if we are to stick to the + // commitments in HQDM. This is the least strict treatment, the creation of a single + // possible world. + final PossibleWorldContext pwContext = new PossibleWorldContext("Example1_World"); + + // Person B Whole Life Object. + final Event e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); + + final Person personB1 = pwContext.createPerson("PersonB1_Bob"); + + pwContext.addMemberOfKind(personB1, kindOfPerson); + pwContext.addNaturalRole(personB1, personRole); + pwContext.addBeginningEvent(personB1, e1); + + // Person B states. + final Event e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); + final Event e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); + + + final StateOfPerson personBs1 = pwContext.createStateOfPerson(""); + + pwContext.addMemberOf(personBs1, classOfStateOfPerson); + pwContext.addTemporalPartOf(personBs1, personB1); + pwContext.addBeginningEvent(personBs1, e2); + pwContext.addEndingEvent(personBs1, e3); + + final Event e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); + final Event e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); + + + final StateOfPerson personBs2 = pwContext.createStateOfPerson(""); + + pwContext.addMemberOf(personBs2, classOfStateOfPerson); + pwContext.addTemporalPartOf(personBs2, personB1); + pwContext.addBeginningEvent(personBs2, e4); + pwContext.addEndingEvent(personBs2, e5); + + + // House B Whole Life Object. + final Event e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); + final FunctionalSystem houseB = pwContext.createFunctionalSystem(""); + + pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); + pwContext.addIntendedRole(houseB, domesticPropertyRole); + pwContext.addBeginningEvent(houseB, e6); + + // States of house when Occupant personBs1 is present. + final StateOfFunctionalSystem houseBs1 = pwContext.createStateOfFunctionalSystem(""); + + pwContext.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); + pwContext.addTemporalPartOf(houseB, houseBs1); + pwContext.addBeginningEvent(houseBs1, e2); + pwContext.addEndingEvent(houseBs1, e3); + + final StateOfFunctionalSystem houseBs2 = pwContext.createStateOfFunctionalSystem("");; + + pwContext.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); + pwContext.addTemporalPartOf(houseB, houseBs2); + pwContext.addBeginningEvent(houseBs2, e4); + pwContext.addEndingEvent(houseBs2, e5); + + // Add the Associations and map the states above to the appropriate participant objects. + // If we had full has_superClass resolving in HQDM classes then this participant object + // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of + // state_of_person (see issues list). + final Participant pPersonBs1 = + pwContext.createParticipant("Note this is the state of person Bs1 that is participating the association"); + + pwContext.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); + pwContext.addTemporalPartOf(pPersonBs1, personBs1); + pwContext.addBeginningEvent(pPersonBs1, e2); + pwContext.addEndingEvent(pPersonBs1, e3); + + final Participant pHouseBs1 = + pwContext.createParticipant("Note this is the state of houseBs1 that is participating in the association"); + + pwContext.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); + pwContext.addTemporalPartOf(pHouseBs1, houseBs1); + pwContext.addBeginningEvent(pHouseBs1, e2); + pwContext.addEndingEvent(pHouseBs1, e3); + + final Participant pPersonBs2 = + pwContext.createParticipant("Note this is the state of person Bs2 that is participating in the association"); + + pwContext.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); + pwContext.addTemporalPartOf(pPersonBs2, personBs2); + pwContext.addBeginningEvent(pPersonBs2, e4); + pwContext.addEndingEvent(pPersonBs2, e5); + + final Participant pHouseBs2 = + pwContext.createParticipant("Note this is the state of houseBs2 that is participating in the association"); + + pwContext.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); + pwContext.addTemporalPartOf(pHouseBs2, houseBs2); + pwContext.addBeginningEvent(pHouseBs2, e4); + pwContext.addEndingEvent(pHouseBs2, e5); + + final Association houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); + + pwContext.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); + pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); + pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); + pwContext.addBeginningEvent(houseOccupantPresentState1, e2); + pwContext.addEndingEvent(houseOccupantPresentState1, e3); + + final Association houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); + + pwContext.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); + pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); + pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); + pwContext.addBeginningEvent(houseOccupantPresentState2, e4); + pwContext.addEndingEvent(houseOccupantPresentState2, e5); + + return db; + }; + + // A DB transformer that adds Reference Data entities. + private static Function addReferenceDataLibrary = (db) -> { + + createRefDataObjects.get().getObjects().forEach(object -> { + db.create(object); + }); + + return db; + }; + + // A Runnable that creates a database and populates it. + public static Runnable runner = () -> { + + final Function runDbOperations = + addReferenceDataLibrary + .andThen(addExampleEntities); + + runDbOperations.apply(createDatabase.get()); + }; + +} From fae65f8893a489118b6106a749054fb2c439fa86 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 4 Jun 2022 15:58:16 +0100 Subject: [PATCH 20/91] Improvements to the new example code. --- .../gchq/magmacore/demo/SystemFunctions.java | 155 +++++++++--------- 1 file changed, 81 insertions(+), 74 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java b/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java index c46d1e35..c37bf0b4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java @@ -1,24 +1,16 @@ package uk.gov.gchq.magmacore.demo; -import java.util.function.Function; import java.util.function.Supplier; +import java.util.function.UnaryOperator; import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.model.Association; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.model.FunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.Person; import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.StateOfPerson; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; @@ -31,69 +23,69 @@ public class SystemFunctions { // A Supplier of a MagmaCoreDatabase. private static Supplier createDatabase = () -> new MagmaCoreObjectDatabase(); - // A Supplier of a ModelBuilder. - private static Supplier createRefDataObjects = () -> { - final ModelBuilder builder = new ModelBuilder(); + // A DB transformer that adds the RDL entities. + private static UnaryOperator createRefDataObjects = (db) -> { + final var builder = new ModelBuilder(); // RDL CLASSES - Can be created, stored and queried separately. // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final uk.gov.gchq.hqdm.model.Class viewable = builder.createClass("VIEWABLE"); + final var viewable = builder.createClass("VIEWABLE"); // A sub-set of the Viewable class. - final uk.gov.gchq.hqdm.model.Class viewableObject = builder.createClass("VIEWABLE_OBJECT"); + final var viewableObject = builder.createClass("VIEWABLE_OBJECT"); // A sub-set of the Viewable Class for viewable Associations. - final uk.gov.gchq.hqdm.model.Class viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); + final var viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); // A system is composed of components so this is the class of components that a whole-life // person can have. - final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = + final var kindOfBiologicalSystemHumanComponent = builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); // A class of whole-life person (re-)created as Reference Data. - final KindOfPerson kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); + final var kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); // A class of temporal part (state) of a (whole-life) person. - final ClassOfStateOfPerson classOfStateOfPerson = + final var classOfStateOfPerson = builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); // A class of whole-life system that is a Building. - final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = + final var kindOfFunctionalSystemBuilding = builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. - final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = + final var kindOfFunctionalSystemDomesticPropertyComponent = builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); // The class of whole-life system that is domestic property. - final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = + final var kindOfFunctionalSystemDomesticProperty = builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of state of system whose members are temporal parts of domestic properties. - final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = + final var classOfStateOfFunctionalSystemDomesticProperty = builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of role that every member of class of person plays. - final Role personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final var personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); // The class of role that every member of class of domestic property plays. - final Role domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + final var domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - final Role domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final var domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - final Role occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final var occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. // Add the Association Types (Participants and Associations). - final KindOfAssociation occupantInPropertyKindOfAssociation = + final var occupantInPropertyKindOfAssociation = builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); builder.addSubclass(viewable, viewableObject); @@ -109,74 +101,95 @@ public class SystemFunctions { builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); - builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, + builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, kindOfFunctionalSystemDomesticPropertyComponent); builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); - return builder; + builder.getObjects().forEach(object -> { + db.create(object); + }); + + return db; }; + + /** + * Find an object by its ENTITY_NAME. + * + * @param db the {@link MagmaCoreDatabase} to seaerch. + * @param name the name {@link String} to seaerch for. + * @return the {@link Thing}that was found. + * @throws RuntimeException if no or multiple results found. + */ + private static Thing findByEntityName(final MagmaCoreDatabase db, final String name) { + final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + if (searchResult.size() == 1) { + return searchResult.get(0); + } else if (searchResult.size() == 0) { + throw new RuntimeException("No entity found with name: " + name); + } else { + throw new RuntimeException("Multiple entities found with name: " + name); + } + } + // A DB transformer that adds example entity instances. - private static Function addExampleEntities = (db) -> { + private static UnaryOperator addExampleEntities = (db) -> { + + // Find the required classes, kinds, and roles. final var kindOfPerson = (KindOfPerson) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "KIND_OF_PERSON").get(0); + findByEntityName(db, "KIND_OF_PERSON"); final var personRole = (Role) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE").get(0); + findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); final var classOfStateOfPerson = (ClassOfStateOfPerson) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON").get(0); + findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY").get(0); + findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final var domesticPropertyRole = (Role) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE").get(0); + findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); final var classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY").get(0); + findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final var occupierOfPropertyRole = (Role) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE").get(0); + findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); final var domesticOccupantInPropertyRole = (Role) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE").get(0); - final var occupantInPropertyKindOfAssociation = (KindOfAssociation) - db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION").get(0); + findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final var occupantInPropertyKindOfAssociation = (KindOfAssociation) + findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // STATES // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorldContext pwContext = new PossibleWorldContext("Example1_World"); + final var pwContext = new PossibleWorldContext("Example1_World"); // Person B Whole Life Object. - final Event e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); + final var e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); - final Person personB1 = pwContext.createPerson("PersonB1_Bob"); + final var personB1 = pwContext.createPerson("PersonB1_Bob"); pwContext.addMemberOfKind(personB1, kindOfPerson); pwContext.addNaturalRole(personB1, personRole); pwContext.addBeginningEvent(personB1, e1); // Person B states. - final Event e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); - final Event e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); + final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); + final var e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); - final StateOfPerson personBs1 = pwContext.createStateOfPerson(""); + final var personBs1 = pwContext.createStateOfPerson(""); pwContext.addMemberOf(personBs1, classOfStateOfPerson); pwContext.addTemporalPartOf(personBs1, personB1); pwContext.addBeginningEvent(personBs1, e2); pwContext.addEndingEvent(personBs1, e3); - final Event e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); - final Event e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); + final var e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); + final var e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); - final StateOfPerson personBs2 = pwContext.createStateOfPerson(""); + final var personBs2 = pwContext.createStateOfPerson(""); pwContext.addMemberOf(personBs2, classOfStateOfPerson); pwContext.addTemporalPartOf(personBs2, personB1); @@ -185,22 +198,22 @@ public class SystemFunctions { // House B Whole Life Object. - final Event e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); - final FunctionalSystem houseB = pwContext.createFunctionalSystem(""); + final var e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); + final var houseB = pwContext.createFunctionalSystem(""); pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); pwContext.addIntendedRole(houseB, domesticPropertyRole); pwContext.addBeginningEvent(houseB, e6); // States of house when Occupant personBs1 is present. - final StateOfFunctionalSystem houseBs1 = pwContext.createStateOfFunctionalSystem(""); + final var houseBs1 = pwContext.createStateOfFunctionalSystem(""); pwContext.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); pwContext.addTemporalPartOf(houseB, houseBs1); pwContext.addBeginningEvent(houseBs1, e2); pwContext.addEndingEvent(houseBs1, e3); - final StateOfFunctionalSystem houseBs2 = pwContext.createStateOfFunctionalSystem("");; + final var houseBs2 = pwContext.createStateOfFunctionalSystem("");; pwContext.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); pwContext.addTemporalPartOf(houseB, houseBs2); @@ -211,7 +224,7 @@ public class SystemFunctions { // If we had full has_superClass resolving in HQDM classes then this participant object // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of // state_of_person (see issues list). - final Participant pPersonBs1 = + final var pPersonBs1 = pwContext.createParticipant("Note this is the state of person Bs1 that is participating the association"); pwContext.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); @@ -219,7 +232,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(pPersonBs1, e2); pwContext.addEndingEvent(pPersonBs1, e3); - final Participant pHouseBs1 = + final var pHouseBs1 = pwContext.createParticipant("Note this is the state of houseBs1 that is participating in the association"); pwContext.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); @@ -227,7 +240,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(pHouseBs1, e2); pwContext.addEndingEvent(pHouseBs1, e3); - final Participant pPersonBs2 = + final var pPersonBs2 = pwContext.createParticipant("Note this is the state of person Bs2 that is participating in the association"); pwContext.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); @@ -235,7 +248,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(pPersonBs2, e4); pwContext.addEndingEvent(pPersonBs2, e5); - final Participant pHouseBs2 = + final var pHouseBs2 = pwContext.createParticipant("Note this is the state of houseBs2 that is participating in the association"); pwContext.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); @@ -243,7 +256,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(pHouseBs2, e4); pwContext.addEndingEvent(pHouseBs2, e5); - final Association houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); + final var houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); pwContext.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); @@ -251,7 +264,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(houseOccupantPresentState1, e2); pwContext.addEndingEvent(houseOccupantPresentState1, e3); - final Association houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); + final var houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); pwContext.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); @@ -259,13 +272,7 @@ public class SystemFunctions { pwContext.addBeginningEvent(houseOccupantPresentState2, e4); pwContext.addEndingEvent(houseOccupantPresentState2, e5); - return db; - }; - - // A DB transformer that adds Reference Data entities. - private static Function addReferenceDataLibrary = (db) -> { - - createRefDataObjects.get().getObjects().forEach(object -> { + pwContext.getObjects().forEach(object -> { db.create(object); }); @@ -275,8 +282,8 @@ public class SystemFunctions { // A Runnable that creates a database and populates it. public static Runnable runner = () -> { - final Function runDbOperations = - addReferenceDataLibrary + final var runDbOperations = + createRefDataObjects .andThen(addExampleEntities); runDbOperations.apply(createDatabase.get()); From c4250ed111ab0327552d77da5775a6a82889746d Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 5 Jun 2022 09:46:22 +0100 Subject: [PATCH 21/91] More realistic example code for how to use HQDM with a MagmaCoreDatabase. --- builder_deps.dot | 63 +-- .../magmacore/demo/ExampleDataObjects.java | 380 ++++++++++-------- ...lBuilder.java => ExampleModelBuilder.java} | 4 +- .../gchq/magmacore/demo/FusekiService.java | 5 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 5 +- .../magmacore/demo/ObjectDatabaseDemo.java | 5 +- .../demo/RemoteSparqlDatabaseDemo.java | 6 +- .../gchq/magmacore/demo/SystemFunctions.java | 292 -------------- 8 files changed, 216 insertions(+), 544 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/demo/{ModelBuilder.java => ExampleModelBuilder.java} (98%) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java diff --git a/builder_deps.dot b/builder_deps.dot index 602de066..c82e841a 100644 --- a/builder_deps.dot +++ b/builder_deps.dot @@ -5,28 +5,11 @@ digraph { subgraph cluster_classes { style=rounded; - label="Classes"; + label="Roles"; - classOfStateOfFunctionalSystemDomesticProperty; - classOfStateOfPerson; domesticOccupantInPropertyRole; - domesticPropertyRole; - kindOfBiologicalSystemHumanComponent; - kindOfFunctionalSystemBuilding; - kindOfFunctionalSystemDomesticProperty; - kindOfFunctionalSystemDomesticPropertyComponent; - kindOfPerson; - occupantInPropertyKindOfAssociation; occupierOfPropertyRole; - personRole; - viewable; - viewableAssociation; - viewableObject; } - subgraph cluster_stes { - style=rounded; - label="SpatioTemporalExtents"; - subgraph cluster_events { style=rounded; label="Events"; @@ -54,7 +37,7 @@ digraph { } subgraph cluster_participants { - label="Participants"; + label="Participations"; pHouseBs1; pHouseBs2; pPersonBs1; @@ -67,85 +50,43 @@ digraph { houseOccupantPresentState2; } possibleWorld[fillcolor=lightblue]; - }; - houseOccupantPresentState2 -> occupantInPropertyKindOfAssociation; houseOccupantPresentState2 -> pHouseBs2; houseOccupantPresentState2 -> pPersonBs2; - houseOccupantPresentState2 -> e4; - houseOccupantPresentState2 -> e5; - houseOccupantPresentState1 -> occupantInPropertyKindOfAssociation; houseOccupantPresentState1 -> pHouseBs1; houseOccupantPresentState1 -> pPersonBs1; - houseOccupantPresentState1 -> e2; - houseOccupantPresentState1 -> e3; - - viewable -> viewableObject; - viewable -> viewableAssociation; - kindOfFunctionalSystemBuilding -> kindOfFunctionalSystemDomesticProperty; - domesticPropertyRole -> domesticOccupantInPropertyRole; - classOfStateOfPerson -> occupierOfPropertyRole; - - viewableObject -> kindOfPerson; - viewableObject -> classOfStateOfPerson; - viewableObject -> kindOfFunctionalSystemDomesticProperty; - viewableObject -> classOfStateOfFunctionalSystemDomesticProperty; - viewableAssociation -> occupantInPropertyKindOfAssociation; - - kindOfPerson -> kindOfBiologicalSystemHumanComponent; - kindOfFunctionalSystemDomesticProperty -> kindOfFunctionalSystemDomesticPropertyComponent; - - occupantInPropertyKindOfAssociation -> domesticOccupantInPropertyRole; - occupantInPropertyKindOfAssociation -> occupierOfPropertyRole; - - personB1 -> kindOfPerson; - personB1 -> personRole; personB1 -> e1; - personBs1 -> classOfStateOfPerson; personBs1 -> personB1; personBs1 -> e2; personBs1 -> e3; - personBs2 -> classOfStateOfPerson; personBs2 -> personB1; personBs2 -> e4; personBs2 -> e5; - houseB -> kindOfFunctionalSystemDomesticProperty; - houseB -> domesticPropertyRole; houseB -> e6; - houseBs1 -> classOfStateOfFunctionalSystemDomesticProperty; houseBs1 -> houseB; houseBs1 -> e2; houseBs1 -> e3; - houseBs2 -> classOfStateOfFunctionalSystemDomesticProperty; houseBs2 -> houseB; houseBs2 -> e4; houseBs2 -> e5; pPersonBs1 -> occupierOfPropertyRole; pPersonBs1 -> personBs1; - pPersonBs1 -> e2; - pPersonBs1 -> e3; pHouseBs1 -> domesticOccupantInPropertyRole; pHouseBs1 -> houseBs1; - pHouseBs1 -> e2; - pHouseBs1 -> e3; pPersonBs2 -> occupierOfPropertyRole; pPersonBs2 -> personBs2; - pPersonBs2 -> e4; - pPersonBs2 -> e5; pHouseBs2 -> domesticOccupantInPropertyRole; pHouseBs2 -> houseBs2; - pHouseBs2 -> e4; - pHouseBs2 -> e5; } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 852e11f4..4ffb744f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -1,137 +1,93 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - package uk.gov.gchq.magmacore.demo; -import java.util.ArrayList; -import java.util.List; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; -import org.apache.jena.query.Dataset; -import org.apache.jena.query.DatasetFactory; -import org.apache.jena.rdf.model.Model; -import org.apache.jena.rdf.model.ModelFactory; -import org.apache.jena.rdf.model.Resource; +import java.util.function.UnaryOperator; -import uk.gov.gchq.hqdm.model.Association; +import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; import uk.gov.gchq.hqdm.model.Event; import uk.gov.gchq.hqdm.model.FunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.StateOfPerson; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** - * Constructs a set of example HQDM objects for demonstrating Magma Core. - */ -public final class ExampleDataObjects { - - private ExampleDataObjects() {} - - /** - * Creates and populates a Jena dataset with the example data objects. - * - * @return The populated Jena dataset. - */ - public static final Dataset buildDataset() { - final Model model = ModelFactory.createDefaultModel(); - - createDataObjects().forEach(object -> { - final Resource resource = model.createResource(object.getId()); - object.getPredicates() - .forEach((iri, predicates) -> predicates.forEach(predicate -> resource - .addProperty(model.createProperty(iri.toString()), - predicate.toString()))); - }); - return DatasetFactory.create(model); - } + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleDataObjects { - /** - * Generates a set of example data objects using HQDM. - * - * @return A list of HQDM objects. - */ - public static List createDataObjects() { - final ModelBuilder builder = new ModelBuilder(); + // A DB transformer that adds the RDL entities. + private static UnaryOperator createRefDataObjects = (db) -> { + final var builder = new ExampleModelBuilder(); // RDL CLASSES - Can be created, stored and queried separately. // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final uk.gov.gchq.hqdm.model.Class viewable = builder.createClass("VIEWABLE"); + final var viewable = builder.createClass("VIEWABLE"); // A sub-set of the Viewable class. - final uk.gov.gchq.hqdm.model.Class viewableObject = builder.createClass("VIEWABLE_OBJECT"); + final var viewableObject = builder.createClass("VIEWABLE_OBJECT"); // A sub-set of the Viewable Class for viewable Associations. - final uk.gov.gchq.hqdm.model.Class viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); + final var viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); // A system is composed of components so this is the class of components that a whole-life // person can have. - final KindOfBiologicalSystemComponent kindOfBiologicalSystemHumanComponent = - builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); + final var kindOfBiologicalSystemHumanComponent = + builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); // A class of whole-life person (re-)created as Reference Data. - final KindOfPerson kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); + final var kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); // A class of temporal part (state) of a (whole-life) person. - final ClassOfStateOfPerson classOfStateOfPerson = builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); + final var classOfStateOfPerson = + builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); // A class of whole-life system that is a Building. - final KindOfFunctionalSystem kindOfFunctionalSystemBuilding = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); + final var kindOfFunctionalSystemBuilding = + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. - final KindOfFunctionalSystemComponent kindOfFunctionalSystemDomesticPropertyComponent = - builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); + final var kindOfFunctionalSystemDomesticPropertyComponent = + builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); // The class of whole-life system that is domestic property. - final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final var kindOfFunctionalSystemDomesticProperty = + builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of state of system whose members are temporal parts of domestic properties. - final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final var classOfStateOfFunctionalSystemDomesticProperty = + builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of role that every member of class of person plays. - final Role personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final var personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); // The class of role that every member of class of domestic property plays. - final Role domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + final var domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - final Role domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final var domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - final Role occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final var occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. // Add the Association Types (Participants and Associations). - final KindOfAssociation occupantInPropertyKindOfAssociation = - builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + final var occupantInPropertyKindOfAssociation = + builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); builder.addSubclass(viewable, viewableObject); builder.addSubclass(viewable, viewableAssociation); @@ -146,128 +102,206 @@ public static List createDataObjects() { builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); - builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, kindOfFunctionalSystemDomesticPropertyComponent); + builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, + kindOfFunctionalSystemDomesticPropertyComponent); builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); + + builder.getObjects().forEach(object -> { + db.create(object); + }); + + return db; + }; + + + /** + * Find an object by its ENTITY_NAME. + * + * @param db the {@link MagmaCoreDatabase} to seaerch. + * @param name the name {@link String} to seaerch for. + * @return the {@link Thing}that was found. + * @throws RuntimeException if no or multiple results found. + */ + private static Thing findByEntityName(final MagmaCoreDatabase db, final String name) { + final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + if (searchResult.size() == 1) { + return searchResult.get(0); + } else if (searchResult.size() == 0) { + throw new RuntimeException("No entity found with name: " + name); + } else { + throw new RuntimeException("Multiple entities found with name: " + name); + } + } + + // A DB transformer that adds whole life individuals. + private static UnaryOperator addWholeLifeIndividuals = (db) -> { + + // Find the required classes, kinds, and roles. + final var kindOfPerson = (KindOfPerson) + findByEntityName(db, "KIND_OF_PERSON"); + final var personRole = (Role) + findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) + findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final var domesticPropertyRole = (Role) + findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + // STATES // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final PossibleWorldContext pwContext = new PossibleWorldContext("Example1_World"); + final var pwContext = new PossibleWorldContext("Example1_World"); // Person B Whole Life Object. - final Event e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); + final var e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); + final var e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); - final Person personB1 = pwContext.createPerson("PersonB1_Bob"); + final var personB1 = pwContext.createPerson("PersonB1_Bob"); pwContext.addMemberOfKind(personB1, kindOfPerson); pwContext.addNaturalRole(personB1, personRole); pwContext.addBeginningEvent(personB1, e1); + // + // House B Whole Life Object. + final var houseB = pwContext.createFunctionalSystem("HouseB"); + + pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); + pwContext.addIntendedRole(houseB, domesticPropertyRole); + pwContext.addBeginningEvent(houseB, e6); + + pwContext.getObjects().forEach(object -> { + db.create(object); + }); + + return db; + }; + + /** + * Create a person-occupies-house association. + * + * @param db a {@link MagmaCoreDatabase} + * @param possibleWorld a {@link PossibleWorld} + * @param person the {@link Person} occupying the house. + * @param house the house as a {@link FunctionalSystem} that is occupied. + * @param beginning {@link Event} + * @param ending {@link Event} + */ + private static void occupyHouse( + final MagmaCoreDatabase db, + final PossibleWorld possibleWorld, + final Person person, + final FunctionalSystem house, + final Event beginning, + final Event ending) { + + // Find the required classes, kinds, and roles. + final var classOfStateOfPerson = (ClassOfStateOfPerson) + findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); + final var classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) + findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final var occupierOfPropertyRole = (Role) + findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final var domesticOccupantInPropertyRole = (Role) + findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final var occupantInPropertyKindOfAssociation = (KindOfAssociation) + findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + + // STATES + + // The main state: This is a mandatory component of all datasets if we are to stick to the + // commitments in HQDM. This is the least strict treatment, the creation of a single + // possible world. + final var pwContext = new PossibleWorldContext(possibleWorld); // Person B states. - final Event e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); - final Event e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); + final var personState = pwContext.createStateOfPerson(uid()); + pwContext.addMemberOf(personState, classOfStateOfPerson); + pwContext.addTemporalPartOf(personState, person); + pwContext.addBeginningEvent(personState, beginning); + pwContext.addEndingEvent(personState, ending); - final StateOfPerson personBs1 = pwContext.createStateOfPerson(""); + // States of house when Occupant personBs1 is present. + final var houseState = pwContext.createStateOfFunctionalSystem(uid()); - pwContext.addMemberOf(personBs1, classOfStateOfPerson); - pwContext.addTemporalPartOf(personBs1, personB1); - pwContext.addBeginningEvent(personBs1, e2); - pwContext.addEndingEvent(personBs1, e3); + pwContext.addMemberOf(houseState, classOfStateOfFunctionalSystemDomesticProperty); + pwContext.addTemporalPartOf(house, houseState); + pwContext.addBeginningEvent(houseState, beginning); + pwContext.addEndingEvent(houseState, ending); - final Event e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); - final Event e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); + final var personParticipant = + pwContext.createParticipant(uid()); + pwContext.addMemberOfKind(personParticipant, occupierOfPropertyRole); + pwContext.addTemporalPartOf(personParticipant, personState); + pwContext.addBeginningEvent(personParticipant, beginning); + pwContext.addEndingEvent(personParticipant, ending); - final StateOfPerson personBs2 = pwContext.createStateOfPerson(""); + final var houseParticipant = + pwContext.createParticipant(uid()); - pwContext.addMemberOf(personBs2, classOfStateOfPerson); - pwContext.addTemporalPartOf(personBs2, personB1); - pwContext.addBeginningEvent(personBs2, e4); - pwContext.addEndingEvent(personBs2, e5); + pwContext.addMemberOfKind(houseParticipant, domesticOccupantInPropertyRole); + pwContext.addTemporalPartOf(houseParticipant, houseState); + pwContext.addBeginningEvent(houseParticipant, beginning); + pwContext.addEndingEvent(houseParticipant, ending); + final var houseOccupiedAssociation = pwContext.createAssociation(uid()); - // House B Whole Life Object. - final Event e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); - final FunctionalSystem houseB = pwContext.createFunctionalSystem(""); + pwContext.addMemberOfKind(houseOccupiedAssociation, occupantInPropertyKindOfAssociation); + pwContext.addConsistsOfParticipant(houseOccupiedAssociation, houseParticipant); + pwContext.addConsistsOfParticipant(houseOccupiedAssociation, personParticipant); + pwContext.addBeginningEvent(houseOccupiedAssociation, beginning); + pwContext.addEndingEvent(houseOccupiedAssociation, ending); - pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); - pwContext.addIntendedRole(houseB, domesticPropertyRole); - pwContext.addBeginningEvent(houseB, e6); + pwContext.getObjects().forEach(object -> { + db.create(object); + }); - // States of house when Occupant personBs1 is present. - final StateOfFunctionalSystem houseBs1 = pwContext.createStateOfFunctionalSystem(""); - - pwContext.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); - pwContext.addTemporalPartOf(houseB, houseBs1); - pwContext.addBeginningEvent(houseBs1, e2); - pwContext.addEndingEvent(houseBs1, e3); - - final StateOfFunctionalSystem houseBs2 = pwContext.createStateOfFunctionalSystem("");; - - pwContext.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); - pwContext.addTemporalPartOf(houseB, houseBs2); - pwContext.addBeginningEvent(houseBs2, e4); - pwContext.addEndingEvent(houseBs2, e5); - - // Add the Associations and map the states above to the appropriate participant objects. - // If we had full has_superClass resolving in HQDM classes then this participant object - // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of - // state_of_person (see issues list). - final Participant pPersonBs1 = - pwContext.createParticipant("Note this is the state of person Bs1 that is participating the association"); - - pwContext.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); - pwContext.addTemporalPartOf(pPersonBs1, personBs1); - pwContext.addBeginningEvent(pPersonBs1, e2); - pwContext.addEndingEvent(pPersonBs1, e3); - - final Participant pHouseBs1 = - pwContext.createParticipant("Note this is the state of houseBs1 that is participating in the association"); - - pwContext.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); - pwContext.addTemporalPartOf(pHouseBs1, houseBs1); - pwContext.addBeginningEvent(pHouseBs1, e2); - pwContext.addEndingEvent(pHouseBs1, e3); - - final Participant pPersonBs2 = - pwContext.createParticipant("Note this is the state of person Bs2 that is participating in the association"); - - pwContext.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); - pwContext.addTemporalPartOf(pPersonBs2, personBs2); - pwContext.addBeginningEvent(pPersonBs2, e4); - pwContext.addEndingEvent(pPersonBs2, e5); - - final Participant pHouseBs2 = - pwContext.createParticipant("Note this is the state of houseBs2 that is participating in the association"); - - pwContext.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); - pwContext.addTemporalPartOf(pHouseBs2, houseBs2); - pwContext.addBeginningEvent(pHouseBs2, e4); - pwContext.addEndingEvent(pHouseBs2, e5); - - final Association houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); - - pwContext.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); - pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); - pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); - pwContext.addBeginningEvent(houseOccupantPresentState1, e2); - pwContext.addEndingEvent(houseOccupantPresentState1, e3); - - final Association houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); - - pwContext.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); - pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); - pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); - pwContext.addBeginningEvent(houseOccupantPresentState2, e4); - pwContext.addEndingEvent(houseOccupantPresentState2, e5); - - final var result = new ArrayList(); - result.addAll(builder.getObjects()); - result.addAll(pwContext.getObjects()); - return result; } + + // A DB transformer that adds house occupancy associations. + private static UnaryOperator addHouseOccupancies = (db) -> { + + final var possibleWorld = (PossibleWorld) findByEntityName(db, "Example1_World"); + final var pwContext = new PossibleWorldContext(possibleWorld); + + final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); + final var e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); + final var e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); + final var e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); + + // Persist the events + pwContext.getObjects().forEach(object -> { + db.create(object); + }); + + // The person occupies the house twice at different times. + final var person = (Person) findByEntityName(db, "PersonB1_Bob"); + final var house = (FunctionalSystem) findByEntityName(db, "HouseB"); + + // This will create and persist the associations. + occupyHouse(db, possibleWorld, person, house, e2, e3); + occupyHouse(db, possibleWorld, person, house, e4, e5); + + return db; + }; + + /** + * A Runnable that creates a database and populates it. + * + * @param db a {@link MagmaCoreDatabase} + */ + public static void populateExampleData(final MagmaCoreDatabase db) { + + final var runDbOperations = + createRefDataObjects + .andThen(addWholeLifeIndividuals) + .andThen(addHouseOccupancies); + + runDbOperations.apply(db); + } + } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java rename to src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java index c43cbd0d..91a78e6b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ModelBuilder.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java @@ -27,7 +27,7 @@ * Class for building HQDM models. * * */ -public class ModelBuilder { +public class ExampleModelBuilder { private List objects; @@ -35,7 +35,7 @@ public class ModelBuilder { * Constructor. * * */ - public ModelBuilder() { + public ExampleModelBuilder() { objects = new ArrayList<>(); } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java index c68603ae..3ef1ca6e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java @@ -16,7 +16,6 @@ import org.apache.jena.fuseki.main.FusekiServer; import org.apache.jena.fuseki.system.FusekiLogging; -import org.apache.jena.query.Dataset; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; @@ -51,10 +50,8 @@ public void run(final boolean populate) { tdb.begin(); if (tdb.getDataset().isEmpty() && populate) { // Build example data objects Dataset. - final Dataset objects = ExampleDataObjects.buildDataset(); + ExampleDataObjects.populateExampleData(tdb); - // Add example objects to default model in persistent dataset. - tdb.getDataset().getDefaultModel().add(objects.getDefaultModel()); tdb.commit(); } else { tdb.abort(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 4a9a2d4d..578114b8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -58,12 +58,9 @@ public void run() { jenaDatabase.register(REF_BASE); jenaDatabase.register(USER_BASE); - // Create set of example data objects. - final List objects = ExampleDataObjects.createDataObjects(); - // Add example data objects to dataset. jenaDatabase.begin(); - objects.forEach(jenaDatabase::create); + ExampleDataObjects.populateExampleData(jenaDatabase); jenaDatabase.commit(); // Query database to check its populated. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java index ba090a29..3f91f18a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java @@ -42,11 +42,8 @@ public final class ObjectDatabaseDemo { public void run() { final MagmaCoreObjectDatabase objectDatabase = new MagmaCoreObjectDatabase(); - // Create set of example data objects. - final List objects = ExampleDataObjects.createDataObjects(); - // Add example data objects to dataset. - objects.forEach(objectDatabase::create); + ExampleDataObjects.populateExampleData(objectDatabase); // Query database to check it's populated. final List queryResults = diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index 66c52a3a..166a3db9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -14,8 +14,6 @@ package uk.gov.gchq.magmacore.demo; -import org.apache.jena.query.Dataset; - import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; @@ -37,8 +35,8 @@ public void run(final boolean populate) { final MagmaCoreDatabase db; if (populate) { - final Dataset dataset = ExampleDataObjects.buildDataset(); - db = new MagmaCoreRemoteSparqlDatabase(url, dataset); + db = new MagmaCoreRemoteSparqlDatabase(url); + ExampleDataObjects.populateExampleData(db); } else { db = new MagmaCoreRemoteSparqlDatabase(url); } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java b/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java deleted file mode 100644 index c37bf0b4..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/SystemFunctions.java +++ /dev/null @@ -1,292 +0,0 @@ -package uk.gov.gchq.magmacore.demo; - -import java.util.function.Supplier; -import java.util.function.UnaryOperator; - -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; -import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; - -/** - * Functions for creating systems using MagmaCore and HQDM. - * - * */ -public class SystemFunctions { - - // A Supplier of a MagmaCoreDatabase. - private static Supplier createDatabase = () -> new MagmaCoreObjectDatabase(); - - // A DB transformer that adds the RDL entities. - private static UnaryOperator createRefDataObjects = (db) -> { - final var builder = new ModelBuilder(); - - // RDL CLASSES - Can be created, stored and queried separately. - - // Viewable is a class to assign other data objects to, to indicate that they are likely to - // be of direct interest to a system user. - final var viewable = builder.createClass("VIEWABLE"); - - // A sub-set of the Viewable class. - final var viewableObject = builder.createClass("VIEWABLE_OBJECT"); - - // A sub-set of the Viewable Class for viewable Associations. - final var viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); - - // A system is composed of components so this is the class of components that a whole-life - // person can have. - final var kindOfBiologicalSystemHumanComponent = - builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); - - // A class of whole-life person (re-)created as Reference Data. - final var kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); - - // A class of temporal part (state) of a (whole-life) person. - final var classOfStateOfPerson = - builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); - - // A class of whole-life system that is a Building. - final var kindOfFunctionalSystemBuilding = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); - - // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front - // door, etc). This is the class of those whole-life system components. - final var kindOfFunctionalSystemDomesticPropertyComponent = - builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); - - // The class of whole-life system that is domestic property. - final var kindOfFunctionalSystemDomesticProperty = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - - // The class of state of system whose members are temporal parts of domestic properties. - final var classOfStateOfFunctionalSystemDomesticProperty = - builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - - // The class of role that every member of class of person plays. - final var personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); - - // The class of role that every member of class of domestic property plays. - final var domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - - final var domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't - // neatly do that in the class as it can only be added after - // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - - final var occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't - // neatly do that in the class as it can only be added after - // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - - // Add the Association Types (Participants and Associations). - final var occupantInPropertyKindOfAssociation = - builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - - builder.addSubclass(viewable, viewableObject); - builder.addSubclass(viewable, viewableAssociation); - builder.addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty); - builder.addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole); - builder.addSubclass(classOfStateOfPerson, occupierOfPropertyRole); - - builder.addClassMember(viewableObject, kindOfPerson); - builder.addClassMember(viewableObject, classOfStateOfPerson); - builder.addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty); - builder.addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty); - builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); - - builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); - builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, - kindOfFunctionalSystemDomesticPropertyComponent); - - builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); - builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); - - builder.getObjects().forEach(object -> { - db.create(object); - }); - - return db; - }; - - - /** - * Find an object by its ENTITY_NAME. - * - * @param db the {@link MagmaCoreDatabase} to seaerch. - * @param name the name {@link String} to seaerch for. - * @return the {@link Thing}that was found. - * @throws RuntimeException if no or multiple results found. - */ - private static Thing findByEntityName(final MagmaCoreDatabase db, final String name) { - final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); - if (searchResult.size() == 1) { - return searchResult.get(0); - } else if (searchResult.size() == 0) { - throw new RuntimeException("No entity found with name: " + name); - } else { - throw new RuntimeException("Multiple entities found with name: " + name); - } - } - - // A DB transformer that adds example entity instances. - private static UnaryOperator addExampleEntities = (db) -> { - - // Find the required classes, kinds, and roles. - final var kindOfPerson = (KindOfPerson) - findByEntityName(db, "KIND_OF_PERSON"); - final var personRole = (Role) - findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - final var classOfStateOfPerson = (ClassOfStateOfPerson) - findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); - final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) - findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final var domesticPropertyRole = (Role) - findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - final var classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) - findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final var occupierOfPropertyRole = (Role) - findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - final var domesticOccupantInPropertyRole = (Role) - findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - final var occupantInPropertyKindOfAssociation = (KindOfAssociation) - findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - - // STATES - - // The main state: This is a mandatory component of all datasets if we are to stick to the - // commitments in HQDM. This is the least strict treatment, the creation of a single - // possible world. - final var pwContext = new PossibleWorldContext("Example1_World"); - - // Person B Whole Life Object. - final var e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); - - final var personB1 = pwContext.createPerson("PersonB1_Bob"); - - pwContext.addMemberOfKind(personB1, kindOfPerson); - pwContext.addNaturalRole(personB1, personRole); - pwContext.addBeginningEvent(personB1, e1); - - // Person B states. - final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); - final var e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); - - - final var personBs1 = pwContext.createStateOfPerson(""); - - pwContext.addMemberOf(personBs1, classOfStateOfPerson); - pwContext.addTemporalPartOf(personBs1, personB1); - pwContext.addBeginningEvent(personBs1, e2); - pwContext.addEndingEvent(personBs1, e3); - - final var e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); - final var e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); - - - final var personBs2 = pwContext.createStateOfPerson(""); - - pwContext.addMemberOf(personBs2, classOfStateOfPerson); - pwContext.addTemporalPartOf(personBs2, personB1); - pwContext.addBeginningEvent(personBs2, e4); - pwContext.addEndingEvent(personBs2, e5); - - - // House B Whole Life Object. - final var e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); - final var houseB = pwContext.createFunctionalSystem(""); - - pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); - pwContext.addIntendedRole(houseB, domesticPropertyRole); - pwContext.addBeginningEvent(houseB, e6); - - // States of house when Occupant personBs1 is present. - final var houseBs1 = pwContext.createStateOfFunctionalSystem(""); - - pwContext.addMemberOf(houseBs1, classOfStateOfFunctionalSystemDomesticProperty); - pwContext.addTemporalPartOf(houseB, houseBs1); - pwContext.addBeginningEvent(houseBs1, e2); - pwContext.addEndingEvent(houseBs1, e3); - - final var houseBs2 = pwContext.createStateOfFunctionalSystem("");; - - pwContext.addMemberOf(houseBs2, classOfStateOfFunctionalSystemDomesticProperty); - pwContext.addTemporalPartOf(houseB, houseBs2); - pwContext.addBeginningEvent(houseBs2, e4); - pwContext.addEndingEvent(houseBs2, e5); - - // Add the Associations and map the states above to the appropriate participant objects. - // If we had full has_superClass resolving in HQDM classes then this participant object - // wouldn't be needed as the class occupierOfPropertyRole is also a sub-type of - // state_of_person (see issues list). - final var pPersonBs1 = - pwContext.createParticipant("Note this is the state of person Bs1 that is participating the association"); - - pwContext.addMemberOfKind(pPersonBs1, occupierOfPropertyRole); - pwContext.addTemporalPartOf(pPersonBs1, personBs1); - pwContext.addBeginningEvent(pPersonBs1, e2); - pwContext.addEndingEvent(pPersonBs1, e3); - - final var pHouseBs1 = - pwContext.createParticipant("Note this is the state of houseBs1 that is participating in the association"); - - pwContext.addMemberOfKind(pHouseBs1, domesticOccupantInPropertyRole); - pwContext.addTemporalPartOf(pHouseBs1, houseBs1); - pwContext.addBeginningEvent(pHouseBs1, e2); - pwContext.addEndingEvent(pHouseBs1, e3); - - final var pPersonBs2 = - pwContext.createParticipant("Note this is the state of person Bs2 that is participating in the association"); - - pwContext.addMemberOfKind(pPersonBs2, occupierOfPropertyRole); - pwContext.addTemporalPartOf(pPersonBs2, personBs2); - pwContext.addBeginningEvent(pPersonBs2, e4); - pwContext.addEndingEvent(pPersonBs2, e5); - - final var pHouseBs2 = - pwContext.createParticipant("Note this is the state of houseBs2 that is participating in the association"); - - pwContext.addMemberOfKind(pHouseBs2, domesticOccupantInPropertyRole); - pwContext.addTemporalPartOf(pHouseBs2, houseBs2); - pwContext.addBeginningEvent(pHouseBs2, e4); - pwContext.addEndingEvent(pHouseBs2, e5); - - final var houseOccupantPresentState1 = pwContext.createAssociation("HouseOccupantPresent1"); - - pwContext.addMemberOfKind(houseOccupantPresentState1, occupantInPropertyKindOfAssociation); - pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pHouseBs1); - pwContext.addConsistsOfParticipant(houseOccupantPresentState1, pPersonBs1); - pwContext.addBeginningEvent(houseOccupantPresentState1, e2); - pwContext.addEndingEvent(houseOccupantPresentState1, e3); - - final var houseOccupantPresentState2 = pwContext.createAssociation("HouseOccupantPresent2"); - - pwContext.addMemberOfKind(houseOccupantPresentState2, occupantInPropertyKindOfAssociation); - pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pHouseBs2); - pwContext.addConsistsOfParticipant(houseOccupantPresentState2, pPersonBs2); - pwContext.addBeginningEvent(houseOccupantPresentState2, e4); - pwContext.addEndingEvent(houseOccupantPresentState2, e5); - - pwContext.getObjects().forEach(object -> { - db.create(object); - }); - - return db; - }; - - // A Runnable that creates a database and populates it. - public static Runnable runner = () -> { - - final var runDbOperations = - createRefDataObjects - .andThen(addExampleEntities); - - runDbOperations.apply(createDatabase.get()); - }; - -} From 342c7b2ab922c6d21b758fe373ca5fced6887c1e Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 5 Jun 2022 15:30:00 +0100 Subject: [PATCH 22/91] Be more fluent in the builders. --- .../magmacore/demo/ExampleDataObjects.java | 143 +++++++++--------- .../magmacore/demo/ExampleModelBuilder.java | 16 +- .../magmacore/demo/PossibleWorldContext.java | 32 +++- 3 files changed, 108 insertions(+), 83 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 4ffb744f..397a5036 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -70,7 +70,7 @@ public class ExampleDataObjects { builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of role that every member of class of person plays. - final var personRole = builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); // The class of role that every member of class of domestic property plays. final var domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); @@ -89,28 +89,30 @@ public class ExampleDataObjects { final var occupantInPropertyKindOfAssociation = builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - builder.addSubclass(viewable, viewableObject); - builder.addSubclass(viewable, viewableAssociation); - builder.addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty); - builder.addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole); - builder.addSubclass(classOfStateOfPerson, occupierOfPropertyRole); - - builder.addClassMember(viewableObject, kindOfPerson); - builder.addClassMember(viewableObject, classOfStateOfPerson); - builder.addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty); - builder.addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty); - builder.addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation); - - builder.addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent); - builder.addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, - kindOfFunctionalSystemDomesticPropertyComponent); - - builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole); - builder.addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole); - - builder.getObjects().forEach(object -> { - db.create(object); - }); + builder + // Create the class hierarchy + .addSubclass(viewable, viewableObject) + .addSubclass(viewable, viewableAssociation) + .addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty) + .addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole) + .addSubclass(classOfStateOfPerson, occupierOfPropertyRole) + // Set class memberships + .addClassMember(viewableObject, kindOfPerson) + .addClassMember(viewableObject, classOfStateOfPerson) + .addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty) + .addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty) + .addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation) + // Set the has component by class predicates + .addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent) + .addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, + kindOfFunctionalSystemDomesticPropertyComponent) + // Set the consists of by class predicates + .addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole) + .addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole) + // store the objects in the database + .getObjects().forEach(object -> { + db.create(object); + }); return db; }; @@ -139,10 +141,9 @@ private static Thing findByEntityName(final MagmaCoreDatabase db, final String n private static UnaryOperator addWholeLifeIndividuals = (db) -> { // Find the required classes, kinds, and roles. - final var kindOfPerson = (KindOfPerson) - findByEntityName(db, "KIND_OF_PERSON"); - final var personRole = (Role) - findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final var kindOfPerson = (KindOfPerson) findByEntityName(db, "KIND_OF_PERSON"); + final var personRole = (Role) findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final var domesticPropertyRole = (Role) @@ -161,20 +162,21 @@ private static Thing findByEntityName(final MagmaCoreDatabase db, final String n final var personB1 = pwContext.createPerson("PersonB1_Bob"); - pwContext.addMemberOfKind(personB1, kindOfPerson); - pwContext.addNaturalRole(personB1, personRole); - pwContext.addBeginningEvent(personB1, e1); // // House B Whole Life Object. final var houseB = pwContext.createFunctionalSystem("HouseB"); - pwContext.addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty); - pwContext.addIntendedRole(houseB, domesticPropertyRole); - pwContext.addBeginningEvent(houseB, e6); - - pwContext.getObjects().forEach(object -> { - db.create(object); - }); + pwContext + .addMemberOfKind(personB1, kindOfPerson) + .addNaturalRole(personB1, personRole) + .addBeginningEvent(personB1, e1) + .addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty) + .addIntendedRole(houseB, domesticPropertyRole) + .addBeginningEvent(houseB, e6) + // Store the objects in the database + .getObjects().forEach(object -> { + db.create(object); + }); return db; }; @@ -219,47 +221,46 @@ private static void occupyHouse( // Person B states. final var personState = pwContext.createStateOfPerson(uid()); - pwContext.addMemberOf(personState, classOfStateOfPerson); - pwContext.addTemporalPartOf(personState, person); - pwContext.addBeginningEvent(personState, beginning); - pwContext.addEndingEvent(personState, ending); - // States of house when Occupant personBs1 is present. final var houseState = pwContext.createStateOfFunctionalSystem(uid()); - pwContext.addMemberOf(houseState, classOfStateOfFunctionalSystemDomesticProperty); - pwContext.addTemporalPartOf(house, houseState); - pwContext.addBeginningEvent(houseState, beginning); - pwContext.addEndingEvent(houseState, ending); - - final var personParticipant = - pwContext.createParticipant(uid()); - - pwContext.addMemberOfKind(personParticipant, occupierOfPropertyRole); - pwContext.addTemporalPartOf(personParticipant, personState); - pwContext.addBeginningEvent(personParticipant, beginning); - pwContext.addEndingEvent(personParticipant, ending); - - final var houseParticipant = - pwContext.createParticipant(uid()); + final var personParticipant = pwContext.createParticipant(uid()); - pwContext.addMemberOfKind(houseParticipant, domesticOccupantInPropertyRole); - pwContext.addTemporalPartOf(houseParticipant, houseState); - pwContext.addBeginningEvent(houseParticipant, beginning); - pwContext.addEndingEvent(houseParticipant, ending); + final var houseParticipant = pwContext.createParticipant(uid()); final var houseOccupiedAssociation = pwContext.createAssociation(uid()); - pwContext.addMemberOfKind(houseOccupiedAssociation, occupantInPropertyKindOfAssociation); - pwContext.addConsistsOfParticipant(houseOccupiedAssociation, houseParticipant); - pwContext.addConsistsOfParticipant(houseOccupiedAssociation, personParticipant); - pwContext.addBeginningEvent(houseOccupiedAssociation, beginning); - pwContext.addEndingEvent(houseOccupiedAssociation, ending); - - pwContext.getObjects().forEach(object -> { - db.create(object); - }); - + pwContext + // personState predicates + .addMemberOf(personState, classOfStateOfPerson) + .addTemporalPartOf(personState, person) + .addBeginningEvent(personState, beginning) + .addEndingEvent(personState, ending) + // houseState predicates + .addMemberOf(houseState, classOfStateOfFunctionalSystemDomesticProperty) + .addTemporalPartOf(house, houseState) + .addBeginningEvent(houseState, beginning) + .addEndingEvent(houseState, ending) + // personParticipant predicates + .addMemberOfKind(personParticipant, occupierOfPropertyRole) + .addTemporalPartOf(personParticipant, personState) + .addBeginningEvent(personParticipant, beginning) + .addEndingEvent(personParticipant, ending) + // houseParticipant predicates + .addMemberOfKind(houseParticipant, domesticOccupantInPropertyRole) + .addTemporalPartOf(houseParticipant, houseState) + .addBeginningEvent(houseParticipant, beginning) + .addEndingEvent(houseParticipant, ending) + // houseOccupiedAssociation predicates + .addMemberOfKind(houseOccupiedAssociation, occupantInPropertyKindOfAssociation) + .addConsistsOfParticipant(houseOccupiedAssociation, houseParticipant) + .addConsistsOfParticipant(houseOccupiedAssociation, personParticipant) + .addBeginningEvent(houseOccupiedAssociation, beginning) + .addEndingEvent(houseOccupiedAssociation, ending) + // Store the objects in the database + .getObjects().forEach(object -> { + db.create(object); + }); } // A DB transformer that adds house occupancy associations. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java index 91a78e6b..9cdbab53 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java @@ -173,9 +173,11 @@ public KindOfPerson createKindOfPerson(final String name) { * * @param superclass {@link Class} * @param subclass {@link Class} + * @return {@link ExampleModelBuilder} */ - public void addSubclass(final Class superclass, final Class subclass) { + public ExampleModelBuilder addSubclass(final Class superclass, final Class subclass) { subclass.addValue(HQDM.HAS_SUPERCLASS.getIri(), superclass.getId()); + return this; } /** @@ -183,9 +185,11 @@ public void addSubclass(final Class superclass, final Class subclass) { * * @param set the {@link Class} that the member is a member__of. * @param member the {@link Class} that is the member of the set. + * @return {@link ExampleModelBuilder} */ - public void addClassMember(final Class set, final Class member) { + public ExampleModelBuilder addClassMember(final Class set, final Class member) { member.addValue(HQDM.MEMBER__OF.getIri(), set.getId()); + return this; } /** @@ -193,10 +197,12 @@ public void addClassMember(final Class set, final Class member) { * * @param system a {@link KindOfSystem} * @param component a {@link KindOfSystemComponent} + * @return {@link ExampleModelBuilder} */ - public void addHasComponentByClass(final KindOfSystem system, + public ExampleModelBuilder addHasComponentByClass(final KindOfSystem system, final KindOfSystemComponent component) { system.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), component.getId()); + return this; } /** @@ -204,10 +210,12 @@ public void addHasComponentByClass(final KindOfSystem system, * * @param kindOfAssociation {@link KindOfAssociation} * @param role {@link Role} + * @return {@link ExampleModelBuilder} */ - public void addConsistsOfByClass(final KindOfAssociation kindOfAssociation, + public ExampleModelBuilder addConsistsOfByClass(final KindOfAssociation kindOfAssociation, final Role role) { kindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), role.getId()); + return this; } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java index 48d1e3ef..bf68238f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java @@ -169,9 +169,11 @@ public Association createAssociation(final String name) { * * @param ste {@link SpatioTemporalExtent} * @param k {@link Class} which should be a Kind of something. + * @return {@link PossibleWorldContext} */ - public void addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { + public PossibleWorldContext addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { k.addValue(HQDM.MEMBER_OF_KIND.getIri(), ste.getId()); + return this; } /** @@ -179,9 +181,11 @@ public void addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { * * @param ste {@link SpatioTemporalExtent} * @param r {@link Role} + * @return {@link PossibleWorldContext} */ - public void addNaturalRole(final SpatioTemporalExtent ste, final Role r) { + public PossibleWorldContext addNaturalRole(final SpatioTemporalExtent ste, final Role r) { r.addValue(HQDM.NATURAL_ROLE.getIri(), ste.getId()); + return this; } /** @@ -189,9 +193,11 @@ public void addNaturalRole(final SpatioTemporalExtent ste, final Role r) { * * @param ste {@link SpatioTemporalExtent} * @param e {@link Event} + * @return {@link PossibleWorldContext} */ - public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { + public PossibleWorldContext addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); + return this; } /** @@ -199,9 +205,11 @@ public void addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { * * @param ste {@link SpatioTemporalExtent} * @param e {@link Event} + * @return {@link PossibleWorldContext} */ - public void addEndingEvent(final SpatioTemporalExtent ste, final Event e) { + public PossibleWorldContext addEndingEvent(final SpatioTemporalExtent ste, final Event e) { ste.addValue(HQDM.ENDING.getIri(), e.getId()); + return this; } /** @@ -209,9 +217,11 @@ public void addEndingEvent(final SpatioTemporalExtent ste, final Event e) { * * @param ste {@link SpatioTemporalExtent} * @param c {@link Class} + * @return {@link PossibleWorldContext} */ - public void addMemberOf(final SpatioTemporalExtent ste, final Class c) { + public PossibleWorldContext addMemberOf(final SpatioTemporalExtent ste, final Class c) { ste.addValue(HQDM.MEMBER_OF.getIri(), c.getId()); + return this; } /** @@ -219,9 +229,11 @@ public void addMemberOf(final SpatioTemporalExtent ste, final Class c) { * * @param whole {@link SpatioTemporalExtent} * @param part {@link SpatioTemporalExtent} + * @return {@link PossibleWorldContext} */ - public void addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { + public PossibleWorldContext addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { part.addValue(HQDM.TEMPORAL_PART_OF.getIri(), whole.getId()); + return this; } /** @@ -229,9 +241,11 @@ public void addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemp * * @param ste {@link SpatioTemporalExtent} * @param r {@link Role} + * @return {@link PossibleWorldContext} */ - public void addIntendedRole(final SpatioTemporalExtent ste, final Role r) { + public PossibleWorldContext addIntendedRole(final SpatioTemporalExtent ste, final Role r) { ste.addValue(HQDM.INTENDED_ROLE.getIri(), r.getId()); + return this; } /** @@ -239,9 +253,11 @@ public void addIntendedRole(final SpatioTemporalExtent ste, final Role r) { * * @param a {@link Association} * @param p {@link Participant} + * @return {@link PossibleWorldContext} */ - public void addConsistsOfParticipant(final Association a, final Participant p) { + public PossibleWorldContext addConsistsOfParticipant(final Association a, final Participant p) { a.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), p.getId()); + return this; } } From 546c0ae55061ef0b2f0133f9911985a4057255af Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 5 Jun 2022 15:37:25 +0100 Subject: [PATCH 23/91] Remove ugly casts. --- .../magmacore/demo/ExampleDataObjects.java | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 397a5036..e5644cce 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -105,13 +105,13 @@ public class ExampleDataObjects { // Set the has component by class predicates .addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent) .addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, - kindOfFunctionalSystemDomesticPropertyComponent) + kindOfFunctionalSystemDomesticPropertyComponent) // Set the consists of by class predicates .addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole) .addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole) // store the objects in the database .getObjects().forEach(object -> { - db.create(object); + db.create(object); }); return db; @@ -125,11 +125,11 @@ public class ExampleDataObjects { * @param name the name {@link String} to seaerch for. * @return the {@link Thing}that was found. * @throws RuntimeException if no or multiple results found. - */ - private static Thing findByEntityName(final MagmaCoreDatabase db, final String name) { + */ + private static T findByEntityName(final MagmaCoreDatabase db, final String name) { final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); if (searchResult.size() == 1) { - return searchResult.get(0); + return (T) searchResult.get(0); } else if (searchResult.size() == 0) { throw new RuntimeException("No entity found with name: " + name); } else { @@ -141,12 +141,12 @@ private static Thing findByEntityName(final MagmaCoreDatabase db, final String n private static UnaryOperator addWholeLifeIndividuals = (db) -> { // Find the required classes, kinds, and roles. - final var kindOfPerson = (KindOfPerson) findByEntityName(db, "KIND_OF_PERSON"); - final var personRole = (Role) findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final KindOfPerson kindOfPerson = findByEntityName(db, "KIND_OF_PERSON"); + final Role personRole = findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - final var kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) + final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final var domesticPropertyRole = (Role) + final Role domesticPropertyRole = findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // STATES @@ -190,25 +190,22 @@ private static Thing findByEntityName(final MagmaCoreDatabase db, final String n * @param house the house as a {@link FunctionalSystem} that is occupied. * @param beginning {@link Event} * @param ending {@link Event} - */ + */ private static void occupyHouse( - final MagmaCoreDatabase db, - final PossibleWorld possibleWorld, - final Person person, - final FunctionalSystem house, - final Event beginning, + final MagmaCoreDatabase db, + final PossibleWorld possibleWorld, + final Person person, + final FunctionalSystem house, + final Event beginning, final Event ending) { // Find the required classes, kinds, and roles. - final var classOfStateOfPerson = (ClassOfStateOfPerson) - findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); - final var classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) + final ClassOfStateOfPerson classOfStateOfPerson = findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); + final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final var occupierOfPropertyRole = (Role) - findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - final var domesticOccupantInPropertyRole = (Role) - findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - final var occupantInPropertyKindOfAssociation = (KindOfAssociation) + final Role occupierOfPropertyRole = findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final Role domesticOccupantInPropertyRole = findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final KindOfAssociation occupantInPropertyKindOfAssociation = findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // STATES @@ -261,12 +258,12 @@ private static void occupyHouse( .getObjects().forEach(object -> { db.create(object); }); - } + } // A DB transformer that adds house occupancy associations. private static UnaryOperator addHouseOccupancies = (db) -> { - final var possibleWorld = (PossibleWorld) findByEntityName(db, "Example1_World"); + final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); final var pwContext = new PossibleWorldContext(possibleWorld); final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); @@ -280,8 +277,8 @@ private static void occupyHouse( }); // The person occupies the house twice at different times. - final var person = (Person) findByEntityName(db, "PersonB1_Bob"); - final var house = (FunctionalSystem) findByEntityName(db, "HouseB"); + final Person person = findByEntityName(db, "PersonB1_Bob"); + final FunctionalSystem house = findByEntityName(db, "HouseB"); // This will create and persist the associations. occupyHouse(db, possibleWorld, person, house, e2, e3); @@ -294,7 +291,7 @@ private static void occupyHouse( * A Runnable that creates a database and populates it. * * @param db a {@link MagmaCoreDatabase} - */ + */ public static void populateExampleData(final MagmaCoreDatabase db) { final var runDbOperations = From 5d7faa448a1948a556582882a34558758e761c2c Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 5 Jun 2022 15:42:17 +0100 Subject: [PATCH 24/91] Minor code improvement --- .../java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index e5644cce..3ea63ba2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -130,7 +130,7 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); if (searchResult.size() == 1) { return (T) searchResult.get(0); - } else if (searchResult.size() == 0) { + } else if (searchResult.isEmpty()) { throw new RuntimeException("No entity found with name: " + name); } else { throw new RuntimeException("Multiple entities found with name: " + name); From d3b314124393e717236614eefdc928299daf8aa4 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 5 Jun 2022 15:52:02 +0100 Subject: [PATCH 25/91] Update comments --- .../magmacore/demo/ExampleDataObjects.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 3ea63ba2..05bc5545 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -143,7 +143,6 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n // Find the required classes, kinds, and roles. final KindOfPerson kindOfPerson = findByEntityName(db, "KIND_OF_PERSON"); final Role personRole = findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final Role domesticPropertyRole = @@ -156,20 +155,22 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n // possible world. final var pwContext = new PossibleWorldContext("Example1_World"); - // Person B Whole Life Object. + // Create the beginning events for the person and house final var e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); final var e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); + // Person B Whole Life Object. final var personB1 = pwContext.createPerson("PersonB1_Bob"); - // // House B Whole Life Object. final var houseB = pwContext.createFunctionalSystem("HouseB"); pwContext + // Add the person predicates .addMemberOfKind(personB1, kindOfPerson) .addNaturalRole(personB1, personRole) .addBeginningEvent(personB1, e1) + // Add the house predicates .addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty) .addIntendedRole(houseB, domesticPropertyRole) .addBeginningEvent(houseB, e6) @@ -215,18 +216,20 @@ private static void occupyHouse( // possible world. final var pwContext = new PossibleWorldContext(possibleWorld); - // Person B states. + // Person state. final var personState = pwContext.createStateOfPerson(uid()); - // States of house when Occupant personBs1 is present. + // States of house when Occupant person is present. final var houseState = pwContext.createStateOfFunctionalSystem(uid()); + // Create Participants to link the states to their roles in the association final var personParticipant = pwContext.createParticipant(uid()); - final var houseParticipant = pwContext.createParticipant(uid()); + // Create the association final var houseOccupiedAssociation = pwContext.createAssociation(uid()); + // Build the full structure of the association pwContext // personState predicates .addMemberOf(personState, classOfStateOfPerson) @@ -263,9 +266,11 @@ private static void occupyHouse( // A DB transformer that adds house occupancy associations. private static UnaryOperator addHouseOccupancies = (db) -> { + // Use an existing PossibleWorld final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); final var pwContext = new PossibleWorldContext(possibleWorld); + // Create the bounding events for the associations final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); final var e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); final var e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); @@ -288,17 +293,19 @@ private static void occupyHouse( }; /** - * A Runnable that creates a database and populates it. + * A function that populates a database. * * @param db a {@link MagmaCoreDatabase} */ public static void populateExampleData(final MagmaCoreDatabase db) { + // Compose 3 functions final var runDbOperations = createRefDataObjects .andThen(addWholeLifeIndividuals) .andThen(addHouseOccupancies); + // Apply the composed function to the database. runDbOperations.apply(db); } From 1f145949d882e9f2195847178c346fee7afb2776 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 6 Jun 2022 11:21:19 +0100 Subject: [PATCH 26/91] Move IRIs to application-specific code, in this case this is the example data objects code. --- .../magmacore/demo/ExampleDataObjects.java | 86 ++++++++++++------- .../magmacore/demo/ExampleModelBuilder.java | 48 ++++++----- .../magmacore/demo/PossibleWorldContext.java | 44 ++++++---- .../gchq/magmacore/util/DataObjectUtils.java | 21 ----- 4 files changed, 111 insertions(+), 88 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 05bc5545..747e34c1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -5,6 +5,8 @@ import java.util.function.UnaryOperator; import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; import uk.gov.gchq.hqdm.model.Event; @@ -24,6 +26,32 @@ * */ public class ExampleDataObjects { + /** IriBase for Reference Data Library. */ + private static final IriBase REF_BASE = + new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); + + /** IriBase for User data. */ + private static final IriBase USER_BASE = + new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); + + /** + * Create a new IRI in the REF_BASE namespace. + * + * @return {@link IRI} + */ + private static IRI mkRefBaseIri() { + return new IRI(REF_BASE, uid()); + } + + /** + * Create a new IRI in the USER_BASE namespace. + * + * @return {@link IRI} + */ + private static IRI mkUserBaseIri() { + return new IRI(USER_BASE, uid()); + } + // A DB transformer that adds the RDL entities. private static UnaryOperator createRefDataObjects = (db) -> { final var builder = new ExampleModelBuilder(); @@ -32,62 +60,62 @@ public class ExampleDataObjects { // Viewable is a class to assign other data objects to, to indicate that they are likely to // be of direct interest to a system user. - final var viewable = builder.createClass("VIEWABLE"); + final var viewable = builder.createClass(mkRefBaseIri(), "VIEWABLE"); // A sub-set of the Viewable class. - final var viewableObject = builder.createClass("VIEWABLE_OBJECT"); + final var viewableObject = builder.createClass(mkRefBaseIri(), "VIEWABLE_OBJECT"); // A sub-set of the Viewable Class for viewable Associations. - final var viewableAssociation = builder.createClass("VIEWABLE_ASSOCIATION"); + final var viewableAssociation = builder.createClass(mkRefBaseIri(), "VIEWABLE_ASSOCIATION"); // A system is composed of components so this is the class of components that a whole-life // person can have. final var kindOfBiologicalSystemHumanComponent = - builder.createKindOfBiologicalSystemComponent("KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); + builder.createKindOfBiologicalSystemComponent(mkRefBaseIri(), "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); // A class of whole-life person (re-)created as Reference Data. - final var kindOfPerson = builder.createKindOfPerson("KIND_OF_PERSON"); + final var kindOfPerson = builder.createKindOfPerson(mkRefBaseIri(), "KIND_OF_PERSON"); // A class of temporal part (state) of a (whole-life) person. final var classOfStateOfPerson = - builder.createClassOfStateOfPerson("CLASS_OF_STATE_OF_PERSON"); + builder.createClassOfStateOfPerson(mkRefBaseIri(), "CLASS_OF_STATE_OF_PERSON"); // A class of whole-life system that is a Building. final var kindOfFunctionalSystemBuilding = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); + builder.createKindOfFunctionalSystem(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front // door, etc). This is the class of those whole-life system components. final var kindOfFunctionalSystemDomesticPropertyComponent = - builder.createKindOfFunctionalSystemComponent("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); + builder.createKindOfFunctionalSystemComponent(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); // The class of whole-life system that is domestic property. final var kindOfFunctionalSystemDomesticProperty = - builder.createKindOfFunctionalSystem("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + builder.createKindOfFunctionalSystem(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of state of system whose members are temporal parts of domestic properties. final var classOfStateOfFunctionalSystemDomesticProperty = - builder.createClassOfStateOfFunctionalSystem("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + builder.createClassOfStateOfFunctionalSystem(mkRefBaseIri(), "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); // The class of role that every member of class of person plays. - builder.createRole("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + builder.createRole(mkRefBaseIri(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); // The class of role that every member of class of domestic property plays. - final var domesticPropertyRole = builder.createRole("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + final var domesticPropertyRole = builder.createRole(mkRefBaseIri(), "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - final var domesticOccupantInPropertyRole = builder.createRole("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final var domesticOccupantInPropertyRole = builder.createRole(mkRefBaseIri(), "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - final var occupierOfPropertyRole = builder.createRole("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final var occupierOfPropertyRole = builder.createRole(mkRefBaseIri(), "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't // neatly do that in the class as it can only be added after // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. // Add the Association Types (Participants and Associations). final var occupantInPropertyKindOfAssociation = - builder.createKindOfAssociation("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + builder.createKindOfAssociation(mkRefBaseIri(), "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); builder // Create the class hierarchy @@ -153,17 +181,17 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n // The main state: This is a mandatory component of all datasets if we are to stick to the // commitments in HQDM. This is the least strict treatment, the creation of a single // possible world. - final var pwContext = new PossibleWorldContext("Example1_World"); + final var pwContext = new PossibleWorldContext(mkUserBaseIri(), "Example1_World"); // Create the beginning events for the person and house - final var e1 = pwContext.createPointInTime("1991-02-18T00:00:00"); - final var e6 = pwContext.createPointInTime("1972-06-01T00:00:00"); + final var e1 = pwContext.createPointInTime(mkUserBaseIri(), "1991-02-18T00:00:00"); + final var e6 = pwContext.createPointInTime(mkUserBaseIri(), "1972-06-01T00:00:00"); // Person B Whole Life Object. - final var personB1 = pwContext.createPerson("PersonB1_Bob"); + final var personB1 = pwContext.createPerson(mkUserBaseIri(), "PersonB1_Bob"); // House B Whole Life Object. - final var houseB = pwContext.createFunctionalSystem("HouseB"); + final var houseB = pwContext.createFunctionalSystem(mkUserBaseIri(), "HouseB"); pwContext // Add the person predicates @@ -217,17 +245,17 @@ private static void occupyHouse( final var pwContext = new PossibleWorldContext(possibleWorld); // Person state. - final var personState = pwContext.createStateOfPerson(uid()); + final var personState = pwContext.createStateOfPerson(mkUserBaseIri(), uid()); // States of house when Occupant person is present. - final var houseState = pwContext.createStateOfFunctionalSystem(uid()); + final var houseState = pwContext.createStateOfFunctionalSystem(mkUserBaseIri(), uid()); // Create Participants to link the states to their roles in the association - final var personParticipant = pwContext.createParticipant(uid()); - final var houseParticipant = pwContext.createParticipant(uid()); + final var personParticipant = pwContext.createParticipant(mkUserBaseIri(), uid()); + final var houseParticipant = pwContext.createParticipant(mkUserBaseIri(), uid()); // Create the association - final var houseOccupiedAssociation = pwContext.createAssociation(uid()); + final var houseOccupiedAssociation = pwContext.createAssociation(mkUserBaseIri(), uid()); // Build the full structure of the association pwContext @@ -271,10 +299,10 @@ private static void occupyHouse( final var pwContext = new PossibleWorldContext(possibleWorld); // Create the bounding events for the associations - final var e2 = pwContext.createPointInTime("2020-08-15T17:50:00"); - final var e3 = pwContext.createPointInTime("2020-08-15T19:21:00"); - final var e4 = pwContext.createPointInTime("2020-08-16T22:33:00"); - final var e5 = pwContext.createPointInTime("2020-08-17T10:46:00"); + final var e2 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-15T17:50:00"); + final var e3 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-15T19:21:00"); + final var e4 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-16T22:33:00"); + final var e5 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-17T10:46:00"); // Persist the events pwContext.getObjects().forEach(object -> { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java index 9cdbab53..8ad995e7 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java @@ -1,8 +1,6 @@ package uk.gov.gchq.magmacore.demo; import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; import java.util.ArrayList; import java.util.List; @@ -28,7 +26,6 @@ * * */ public class ExampleModelBuilder { - private List objects; /** @@ -51,11 +48,12 @@ public List getObjects() { /** * Create a new Class. * + * @param iri {@link IRI} * @param name {@link String} * @return a {@link Class} * */ - public Class createClass(final String name) { - final Class c = ClassServices.createClass(new IRI(REF_BASE, uid()).getIri()); + public Class createClass(final IRI iri, final String name) { + final Class c = ClassServices.createClass(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -64,12 +62,13 @@ public Class createClass(final String name) { /** * Create a new ClassOfStateOfFunctionalSystem. * + * @param iri {@link IRI} * @param name {@link String} * @return a {@link ClassOfStateOfFunctionalSystem} * */ - public ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final String name) { + public ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final IRI iri, final String name) { final ClassOfStateOfFunctionalSystem c = - ClassServices.createClassOfStateOfFunctionalSystem(new IRI(REF_BASE, uid()).getIri()); + ClassServices.createClassOfStateOfFunctionalSystem(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -78,11 +77,12 @@ public ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final /** * Create a new ClassOfStateOfPerson. * + * @param iri {@link IRI} * @param name {@link String} * @return a {@link ClassOfStateOfPerson} * */ - public ClassOfStateOfPerson createClassOfStateOfPerson(final String name) { - final ClassOfStateOfPerson c = ClassServices.createClassOfStateOfPerson(new IRI(REF_BASE, uid()).getIri()); + public ClassOfStateOfPerson createClassOfStateOfPerson(final IRI iri, final String name) { + final ClassOfStateOfPerson c = ClassServices.createClassOfStateOfPerson(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -91,11 +91,12 @@ public ClassOfStateOfPerson createClassOfStateOfPerson(final String name) { /** * Create a new KindOfAssociation. * + * @param iri {@link IRI} * @param name {@link String} * @return a {@link KindOfAssociation} * */ - public KindOfAssociation createKindOfAssociation(final String name) { - final KindOfAssociation c = ClassServices.createKindOfAssociation(new IRI(REF_BASE, uid()).getIri()); + public KindOfAssociation createKindOfAssociation(final IRI iri, final String name) { + final KindOfAssociation c = ClassServices.createKindOfAssociation(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -104,11 +105,12 @@ public KindOfAssociation createKindOfAssociation(final String name) { /** * Create a new Role. * + * @param iri {@link IRI} * @param name {@link String} * @return a {@link Role} * */ - public Role createRole(final String name) { - final Role c = ClassServices.createRole(new IRI(REF_BASE, uid()).getIri()); + public Role createRole(final IRI iri, final String name) { + final Role c = ClassServices.createRole(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -117,12 +119,13 @@ public Role createRole(final String name) { /** * Create a new {@link KindOfBiologicalSystemComponent}. * + * @param iri {@link IRI} * @param name the name {@link String} * @return {@link KindOfBiologicalSystemComponent} */ - public KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final String name) { + public KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final IRI iri, final String name) { final KindOfBiologicalSystemComponent c = - ClassServices.createKindOfBiologicalSystemComponent(new IRI(REF_BASE, uid()).getIri()); + ClassServices.createKindOfBiologicalSystemComponent(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -131,11 +134,12 @@ public KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(fin /** * Create a new {@link KindOfFunctionalSystem}. * + * @param iri {@link IRI} * @param name the name {@link String} * @return {@link KindOfFunctionalSystem} */ - public KindOfFunctionalSystem createKindOfFunctionalSystem(final String name) { - final KindOfFunctionalSystem c = ClassServices.createKindOfFunctionalSystem(new IRI(REF_BASE, uid()).getIri()); + public KindOfFunctionalSystem createKindOfFunctionalSystem(final IRI iri, final String name) { + final KindOfFunctionalSystem c = ClassServices.createKindOfFunctionalSystem(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -144,12 +148,13 @@ public KindOfFunctionalSystem createKindOfFunctionalSystem(final String name) { /** * Create a new {@link KindOfFunctionalSystemComponent}. * + * @param iri {@link IRI} * @param name the name {@link String} * @return {@link KindOfFunctionalSystemComponent} */ - public KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final String name) { + public KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final IRI iri, final String name) { final KindOfFunctionalSystemComponent c = - ClassServices.createKindOfFunctionalSystemComponent(new IRI(REF_BASE, uid()).getIri()); + ClassServices.createKindOfFunctionalSystemComponent(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; @@ -158,11 +163,12 @@ public KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(fin /** * Create a new {@link KindOfPerson}. * + * @param iri {@link IRI} * @param name the name {@link String} * @return {@link KindOfPerson} */ - public KindOfPerson createKindOfPerson(final String name) { - final KindOfPerson c = ClassServices.createKindOfPerson(new IRI(REF_BASE, uid()).getIri()); + public KindOfPerson createKindOfPerson(final IRI iri, final String name) { + final KindOfPerson c = ClassServices.createKindOfPerson(iri.getIri()); c.addStringValue(ENTITY_NAME.getIri(), name); objects.add(c); return c; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java index bf68238f..83dd15e3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java @@ -1,7 +1,6 @@ package uk.gov.gchq.magmacore.demo; import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; import java.util.ArrayList; import java.util.List; @@ -36,10 +35,14 @@ public class PossibleWorldContext { /** * Constructor that creates a new {@link PossibleWorld}. * + * @param iri {@link IRI} * @param name The {@link PossibleWorld} name. * */ - public PossibleWorldContext(final String name) { - this(SpatioTemporalExtentServices.createPossibleWorld(name)); + public PossibleWorldContext(final IRI iri, final String name) { + possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(iri.getIri()); + possibleWorld.addStringValue(ENTITY_NAME.getIri(), name); + objects = new ArrayList<>(); + objects.add(possibleWorld); } /** @@ -65,11 +68,12 @@ public List getObjects() { /** * Create a PointInTime. * + * @param iri {@link IRI} * @param value {@link String} value of the date-time. * @return {@link PointInTime} */ - public PointInTime createPointInTime(final String value) { - final PointInTime o = SpatioTemporalExtentServices.createPointInTime(new IRI(USER_BASE, value).getIri()); + public PointInTime createPointInTime(final IRI iri, final String value) { + final PointInTime o = SpatioTemporalExtentServices.createPointInTime(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), value); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -79,11 +83,12 @@ public PointInTime createPointInTime(final String value) { /** * Create a Person. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link Person} */ - public Person createPerson(final String name) { - final Person o = SpatioTemporalExtentServices.createPerson(new IRI(USER_BASE, name).getIri()); + public Person createPerson(final IRI iri, final String name) { + final Person o = SpatioTemporalExtentServices.createPerson(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -93,11 +98,12 @@ public Person createPerson(final String name) { /** * Create a StateOfPerson. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link StateOfPerson} */ - public StateOfPerson createStateOfPerson(final String name) { - final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(new IRI(USER_BASE, name).getIri()); + public StateOfPerson createStateOfPerson(final IRI iri, final String name) { + final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -107,12 +113,13 @@ public StateOfPerson createStateOfPerson(final String name) { /** * Create a FunctionalSystem. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link FunctionalSystem} */ - public FunctionalSystem createFunctionalSystem(final String name) { + public FunctionalSystem createFunctionalSystem(final IRI iri, final String name) { final FunctionalSystem o = - SpatioTemporalExtentServices.createFunctionalSystem(new IRI(USER_BASE, name).getIri()); + SpatioTemporalExtentServices.createFunctionalSystem(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -122,12 +129,13 @@ public FunctionalSystem createFunctionalSystem(final String name) { /** * Create a StateOfFunctionalSystem. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link StateOfFunctionalSystem} */ - public StateOfFunctionalSystem createStateOfFunctionalSystem(final String name) { + public StateOfFunctionalSystem createStateOfFunctionalSystem(final IRI iri, final String name) { final StateOfFunctionalSystem o = - SpatioTemporalExtentServices.createStateOfFunctionalSystem(new IRI(USER_BASE, name).getIri()); + SpatioTemporalExtentServices.createStateOfFunctionalSystem(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -137,12 +145,13 @@ public StateOfFunctionalSystem createStateOfFunctionalSystem(final String name) /** * Create a Participant. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link Participant} */ - public Participant createParticipant(final String name) { + public Participant createParticipant(final IRI iri, final String name) { final Participant o = - SpatioTemporalExtentServices.createParticipant(new IRI(USER_BASE, name).getIri()); + SpatioTemporalExtentServices.createParticipant(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); @@ -152,12 +161,13 @@ public Participant createParticipant(final String name) { /** * Create a Association. * + * @param iri {@link IRI} * @param name {@link String} name of the entity. * @return {@link Association} */ - public Association createAssociation(final String name) { + public Association createAssociation(final IRI iri, final String name) { final Association o = - SpatioTemporalExtentServices.createAssociation(new IRI(USER_BASE, name).getIri()); + SpatioTemporalExtentServices.createAssociation(iri.getIri()); o.addStringValue(ENTITY_NAME.getIri(), name); objects.add(o); o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); diff --git a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java index a300d8a3..e67c062a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java @@ -14,24 +14,13 @@ package uk.gov.gchq.magmacore.util; -import java.time.LocalDateTime; import java.util.UUID; -import uk.gov.gchq.hqdm.iri.IriBase; - /** * Utilities for building and generating HQDM objects. */ public final class DataObjectUtils { - /** IriBase for Reference Data Library. */ - public static final IriBase REF_BASE = - new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); - - /** IriBase for User data. */ - public static final IriBase USER_BASE = - new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); - private DataObjectUtils() {} /** @@ -43,14 +32,4 @@ public static String uid() { return UUID.randomUUID().toString(); } - /** - * Get the current date-time in the ISO-8601 calendar system. - * - * @return Local date-time in the format {@code 2007-12-03T10:15:30.123456789}. - */ - public static String timeNow() { - final LocalDateTime now = LocalDateTime.now(); - return now.toString(); - } - } From 2bec6272bf9dc31a146af133df8f412697d7fdf4 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 6 Jun 2022 13:33:21 +0100 Subject: [PATCH 27/91] Don't register REF_BASE and USER_BASE with Jena. --- .../java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 578114b8..5751cca0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -17,8 +17,6 @@ import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; import static uk.gov.gchq.hqdm.iri.HQDM.HQDM; import static uk.gov.gchq.hqdm.iri.RDFS.RDFS; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.REF_BASE; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE; import java.util.List; @@ -55,8 +53,6 @@ public void run() { final MagmaCoreJenaDatabase jenaDatabase = new MagmaCoreJenaDatabase(); jenaDatabase.register(HQDM); jenaDatabase.register(RDFS); - jenaDatabase.register(REF_BASE); - jenaDatabase.register(USER_BASE); // Add example data objects to dataset. jenaDatabase.begin(); From beed4b593ec5f32c1cbf9d6773266f446769d20c Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 6 Jun 2022 16:57:16 +0100 Subject: [PATCH 28/91] Add support for PossibleWorld being a part of another PossibleWorld --- .../magmacore/demo/PossibleWorldContext.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java index 83dd15e3..c443ad51 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java @@ -41,8 +41,7 @@ public class PossibleWorldContext { public PossibleWorldContext(final IRI iri, final String name) { possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(iri.getIri()); possibleWorld.addStringValue(ENTITY_NAME.getIri(), name); - objects = new ArrayList<>(); - objects.add(possibleWorld); + init(possibleWorld); } /** @@ -51,11 +50,31 @@ public PossibleWorldContext(final IRI iri, final String name) { * @param p {@link PossibleWorld} */ public PossibleWorldContext(final PossibleWorld p) { + init(p); + } + + /** + * Common initialisation steps. + * + * @param p {@link PossibleWorld} + */ + private void init(final PossibleWorld p) { this.possibleWorld = p; objects = new ArrayList<>(); objects.add(p); } + /** + * Make this {@link PossibleWorld} part of another {@link PossibleWorld}. + * + * @param p the parent {@link PossibleWorld} + * @return this {@link PossibleWorldContext} + */ + public PossibleWorldContext addParentPossibleWorld(final PossibleWorld p) { + possibleWorld.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), p.getId()); + return this; + } + /** * Get the model objects. * From ee58f3c7fb9145ad25d9d1acf3a9a15596e933dd Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 7 Jun 2022 10:08:56 +0100 Subject: [PATCH 29/91] Move RDF services to the HQDM-RDF repo. --- .../magmacore/demo/ExampleDataObjects.java | 4 +- .../magmacore/demo/ExampleModelBuilder.java | 227 -------------- .../magmacore/demo/PossibleWorldContext.java | 292 ------------------ 3 files changed, 3 insertions(+), 520 deletions(-) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 747e34c1..5f114715 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -18,6 +18,8 @@ import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.services.ModelBuilder; +import uk.gov.gchq.hqdm.rdf.services.PossibleWorldContext; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** @@ -54,7 +56,7 @@ private static IRI mkUserBaseIri() { // A DB transformer that adds the RDL entities. private static UnaryOperator createRefDataObjects = (db) -> { - final var builder = new ExampleModelBuilder(); + final var builder = new ModelBuilder(); // RDL CLASSES - Can be created, stored and queried separately. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java deleted file mode 100644 index 8ad995e7..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleModelBuilder.java +++ /dev/null @@ -1,227 +0,0 @@ -package uk.gov.gchq.magmacore.demo; - -import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; - -import java.util.ArrayList; -import java.util.List; - -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Class; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; -import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.KindOfSystem; -import uk.gov.gchq.hqdm.model.KindOfSystemComponent; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.services.ClassServices; - -/** - * Class for building HQDM models. - * - * */ -public class ExampleModelBuilder { - private List objects; - - /** - * Constructor. - * - * */ - public ExampleModelBuilder() { - objects = new ArrayList<>(); - } - - /** - * Get the model objects. - * - * @return a {@link List} of {@link Thing} - */ - public List getObjects() { - return objects; - } - - /** - * Create a new Class. - * - * @param iri {@link IRI} - * @param name {@link String} - * @return a {@link Class} - * */ - public Class createClass(final IRI iri, final String name) { - final Class c = ClassServices.createClass(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new ClassOfStateOfFunctionalSystem. - * - * @param iri {@link IRI} - * @param name {@link String} - * @return a {@link ClassOfStateOfFunctionalSystem} - * */ - public ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final IRI iri, final String name) { - final ClassOfStateOfFunctionalSystem c = - ClassServices.createClassOfStateOfFunctionalSystem(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new ClassOfStateOfPerson. - * - * @param iri {@link IRI} - * @param name {@link String} - * @return a {@link ClassOfStateOfPerson} - * */ - public ClassOfStateOfPerson createClassOfStateOfPerson(final IRI iri, final String name) { - final ClassOfStateOfPerson c = ClassServices.createClassOfStateOfPerson(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new KindOfAssociation. - * - * @param iri {@link IRI} - * @param name {@link String} - * @return a {@link KindOfAssociation} - * */ - public KindOfAssociation createKindOfAssociation(final IRI iri, final String name) { - final KindOfAssociation c = ClassServices.createKindOfAssociation(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new Role. - * - * @param iri {@link IRI} - * @param name {@link String} - * @return a {@link Role} - * */ - public Role createRole(final IRI iri, final String name) { - final Role c = ClassServices.createRole(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new {@link KindOfBiologicalSystemComponent}. - * - * @param iri {@link IRI} - * @param name the name {@link String} - * @return {@link KindOfBiologicalSystemComponent} - */ - public KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final IRI iri, final String name) { - final KindOfBiologicalSystemComponent c = - ClassServices.createKindOfBiologicalSystemComponent(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new {@link KindOfFunctionalSystem}. - * - * @param iri {@link IRI} - * @param name the name {@link String} - * @return {@link KindOfFunctionalSystem} - */ - public KindOfFunctionalSystem createKindOfFunctionalSystem(final IRI iri, final String name) { - final KindOfFunctionalSystem c = ClassServices.createKindOfFunctionalSystem(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new {@link KindOfFunctionalSystemComponent}. - * - * @param iri {@link IRI} - * @param name the name {@link String} - * @return {@link KindOfFunctionalSystemComponent} - */ - public KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final IRI iri, final String name) { - final KindOfFunctionalSystemComponent c = - ClassServices.createKindOfFunctionalSystemComponent(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a new {@link KindOfPerson}. - * - * @param iri {@link IRI} - * @param name the name {@link String} - * @return {@link KindOfPerson} - */ - public KindOfPerson createKindOfPerson(final IRI iri, final String name) { - final KindOfPerson c = ClassServices.createKindOfPerson(iri.getIri()); - c.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(c); - return c; - } - - /** - * Create a subclass relationship. - * - * @param superclass {@link Class} - * @param subclass {@link Class} - * @return {@link ExampleModelBuilder} - */ - public ExampleModelBuilder addSubclass(final Class superclass, final Class subclass) { - subclass.addValue(HQDM.HAS_SUPERCLASS.getIri(), superclass.getId()); - return this; - } - - /** - * Add a {@link Class} as a member__of another {@link Class}. - * - * @param set the {@link Class} that the member is a member__of. - * @param member the {@link Class} that is the member of the set. - * @return {@link ExampleModelBuilder} - */ - public ExampleModelBuilder addClassMember(final Class set, final Class member) { - member.addValue(HQDM.MEMBER__OF.getIri(), set.getId()); - return this; - } - - /** - * Add a HAS_COMPONENT_BY_CLASS relationship. - * - * @param system a {@link KindOfSystem} - * @param component a {@link KindOfSystemComponent} - * @return {@link ExampleModelBuilder} - */ - public ExampleModelBuilder addHasComponentByClass(final KindOfSystem system, - final KindOfSystemComponent component) { - system.addValue(HQDM.HAS_COMPONENT_BY_CLASS.getIri(), component.getId()); - return this; - } - - /** - * Add a CONSISTS_OF_BY_CLASS relationship. - * - * @param kindOfAssociation {@link KindOfAssociation} - * @param role {@link Role} - * @return {@link ExampleModelBuilder} - */ - public ExampleModelBuilder addConsistsOfByClass(final KindOfAssociation kindOfAssociation, - final Role role) { - kindOfAssociation.addValue(HQDM.CONSISTS_OF_BY_CLASS.getIri(), role.getId()); - return this; - } - -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java b/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java deleted file mode 100644 index c443ad51..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/PossibleWorldContext.java +++ /dev/null @@ -1,292 +0,0 @@ -package uk.gov.gchq.magmacore.demo; - -import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; - -import java.util.ArrayList; -import java.util.List; - -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Association; -import uk.gov.gchq.hqdm.model.Class; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.model.FunctionalSystem; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.model.PointInTime; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.StateOfPerson; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; - -/** - * Class for building HQDM models. - * Adds objects to the supplied {@link PossibleWorld}. - * - * */ -public class PossibleWorldContext { - - private List objects; - private PossibleWorld possibleWorld; - - /** - * Constructor that creates a new {@link PossibleWorld}. - * - * @param iri {@link IRI} - * @param name The {@link PossibleWorld} name. - * */ - public PossibleWorldContext(final IRI iri, final String name) { - possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(iri.getIri()); - possibleWorld.addStringValue(ENTITY_NAME.getIri(), name); - init(possibleWorld); - } - - /** - * Constructor. - * - * @param p {@link PossibleWorld} - */ - public PossibleWorldContext(final PossibleWorld p) { - init(p); - } - - /** - * Common initialisation steps. - * - * @param p {@link PossibleWorld} - */ - private void init(final PossibleWorld p) { - this.possibleWorld = p; - objects = new ArrayList<>(); - objects.add(p); - } - - /** - * Make this {@link PossibleWorld} part of another {@link PossibleWorld}. - * - * @param p the parent {@link PossibleWorld} - * @return this {@link PossibleWorldContext} - */ - public PossibleWorldContext addParentPossibleWorld(final PossibleWorld p) { - possibleWorld.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), p.getId()); - return this; - } - - /** - * Get the model objects. - * - * @return a {@link List} of {@link Thing} - */ - public List getObjects() { - return objects; - } - - /** - * Create a PointInTime. - * - * @param iri {@link IRI} - * @param value {@link String} value of the date-time. - * @return {@link PointInTime} - */ - public PointInTime createPointInTime(final IRI iri, final String value) { - final PointInTime o = SpatioTemporalExtentServices.createPointInTime(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), value); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a Person. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link Person} - */ - public Person createPerson(final IRI iri, final String name) { - final Person o = SpatioTemporalExtentServices.createPerson(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a StateOfPerson. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link StateOfPerson} - */ - public StateOfPerson createStateOfPerson(final IRI iri, final String name) { - final StateOfPerson o = SpatioTemporalExtentServices.createStateOfPerson(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a FunctionalSystem. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link FunctionalSystem} - */ - public FunctionalSystem createFunctionalSystem(final IRI iri, final String name) { - final FunctionalSystem o = - SpatioTemporalExtentServices.createFunctionalSystem(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a StateOfFunctionalSystem. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link StateOfFunctionalSystem} - */ - public StateOfFunctionalSystem createStateOfFunctionalSystem(final IRI iri, final String name) { - final StateOfFunctionalSystem o = - SpatioTemporalExtentServices.createStateOfFunctionalSystem(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a Participant. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link Participant} - */ - public Participant createParticipant(final IRI iri, final String name) { - final Participant o = - SpatioTemporalExtentServices.createParticipant(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Create a Association. - * - * @param iri {@link IRI} - * @param name {@link String} name of the entity. - * @return {@link Association} - */ - public Association createAssociation(final IRI iri, final String name) { - final Association o = - SpatioTemporalExtentServices.createAssociation(iri.getIri()); - o.addStringValue(ENTITY_NAME.getIri(), name); - objects.add(o); - o.addValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), possibleWorld.getId()); - return o; - } - - /** - * Add a MEMBER_OF_KIND. - * - * @param ste {@link SpatioTemporalExtent} - * @param k {@link Class} which should be a Kind of something. - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addMemberOfKind(final SpatioTemporalExtent ste, final Class k) { - k.addValue(HQDM.MEMBER_OF_KIND.getIri(), ste.getId()); - return this; - } - - /** - * Add a NATURAL_ROLE. - * - * @param ste {@link SpatioTemporalExtent} - * @param r {@link Role} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addNaturalRole(final SpatioTemporalExtent ste, final Role r) { - r.addValue(HQDM.NATURAL_ROLE.getIri(), ste.getId()); - return this; - } - - /** - * Add BEGINNING {@link Event}. - * - * @param ste {@link SpatioTemporalExtent} - * @param e {@link Event} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addBeginningEvent(final SpatioTemporalExtent ste, final Event e) { - ste.addValue(HQDM.BEGINNING.getIri(), e.getId()); - return this; - } - - /** - * Add ENDING {@link Event}. - * - * @param ste {@link SpatioTemporalExtent} - * @param e {@link Event} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addEndingEvent(final SpatioTemporalExtent ste, final Event e) { - ste.addValue(HQDM.ENDING.getIri(), e.getId()); - return this; - } - - /** - * Add MEMBER_OF. - * - * @param ste {@link SpatioTemporalExtent} - * @param c {@link Class} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addMemberOf(final SpatioTemporalExtent ste, final Class c) { - ste.addValue(HQDM.MEMBER_OF.getIri(), c.getId()); - return this; - } - - /** - * Add TEMPORAL_PART_OF. - * - * @param whole {@link SpatioTemporalExtent} - * @param part {@link SpatioTemporalExtent} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addTemporalPartOf(final SpatioTemporalExtent whole, final SpatioTemporalExtent part) { - part.addValue(HQDM.TEMPORAL_PART_OF.getIri(), whole.getId()); - return this; - } - - /** - * Add INTENDED_ROLE. - * - * @param ste {@link SpatioTemporalExtent} - * @param r {@link Role} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addIntendedRole(final SpatioTemporalExtent ste, final Role r) { - ste.addValue(HQDM.INTENDED_ROLE.getIri(), r.getId()); - return this; - } - - /** - * Add CONSISTS_OF_PARTICIPANT. - * - * @param a {@link Association} - * @param p {@link Participant} - * @return {@link PossibleWorldContext} - */ - public PossibleWorldContext addConsistsOfParticipant(final Association a, final Participant p) { - a.addValue(HQDM.CONSISTS_OF_PARTICIPANT.getIri(), p.getId()); - return this; - } - -} From 764dab9ae4923fbaf152c17afa407c4ab9420d33 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Wed, 8 Jun 2022 11:07:39 +0100 Subject: [PATCH 30/91] Add some invertible DB transformation classes --- .../gchq/magmacore/database/DbChangeSet.java | 59 ++++++++++++++++ .../magmacore/database/DbCreateOperation.java | 66 ++++++++++++++++++ .../magmacore/database/DbDeleteOperation.java | 57 ++++++++++++++++ .../magmacore/database/DbTransformation.java | 54 +++++++++++++++ .../exception/DbTransformationException.java | 67 +++++++++++++++++++ 5 files changed, 303 insertions(+) create mode 100644 src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java new file mode 100644 index 00000000..e219153b --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java @@ -0,0 +1,59 @@ +package uk.gov.gchq.magmacore.database; + +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * Class representing an invertible set of deletes and creates. + * + * */ +public class DbChangeSet implements Function { + private Set deletes; + private Set creates; + + /** + * Constructor. + * + * @param deletes a {@link Set} of {@link DbDeleteOperation} + * @param creates a {@link Set} of {@link DbCreateOperation} + */ + public DbChangeSet(final Set deletes, final Set creates) { + this.deletes = deletes; + this.creates = creates; + } + + /** + * Apply this {@link DbChangeSet} to a {@link MagmaCoreDatabase}. + * + * */ + @Override + public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + final var deleteFunction = deletes + .stream() + .map(x -> (Function) x) + .reduce(Function::andThen) + .orElse(Function.identity()); + + final var createFunction = creates + .stream() + .map(x -> (Function) x) + .reduce(Function::andThen) + .orElse(Function.identity()); + + return deleteFunction.andThen(createFunction).apply(db); + } + + /** + * Invert a {@link DbChangeSet}. + * + * @param c a {@link DbChangeSet} + * @return a {@link DbChangeSet} + */ + public static DbChangeSet invert(final DbChangeSet c) { + return new DbChangeSet( + c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toSet()), + c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toSet()) + ); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java new file mode 100644 index 00000000..3ef05902 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java @@ -0,0 +1,66 @@ +package uk.gov.gchq.magmacore.database; + +import java.util.function.Function; + +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; + +/** + * Class representing an invertible operation to create a predicate. + * + * */ +public class DbCreateOperation implements Function { + private IRI subject; + private IRI predicate; + private String object; + + /** + * Constructor. + * + * @param subject {@link IRI} + * @param predicate {@link IRI} + * @param object {@link String} + */ + public DbCreateOperation(final IRI subject, final IRI predicate, final String object) { + this.subject = subject; + this.predicate = predicate; + this.object = object; + } + + /** + * {@inheritDoc} + * + * */ + @Override + public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + final var thing = db.get(subject); + if (thing == null) { + final var newThing = SpatioTemporalExtentServices.createSpatioTemporalExtent(subject.getIri()); + newThing.addStringValue(predicate.getIri(), object); + db.create(newThing); + } else { + if (!thing.hasThisValue(predicate.getIri(), object)) { + thing.addValue(predicate.getIri(), object); + db.update(thing); + } else { + throw new RuntimeException( + String.format("Triple already exists: %s, %s, %s", subject, predicate, object) + ); + } + } + + return db; + } + + /** + * Invert an operation. + * + * @param c {@link DbCreateOperation} + * @return {@link DbDeleteOperation} + */ + public static DbDeleteOperation invert(final DbCreateOperation c) { + return new DbDeleteOperation(c.subject, c.predicate, c.object); + } + +} + diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java new file mode 100644 index 00000000..2ff9eca4 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java @@ -0,0 +1,57 @@ +package uk.gov.gchq.magmacore.database; + +import java.util.function.Function; + +import uk.gov.gchq.hqdm.iri.IRI; + +/** + * Class representing an invertible operation to delete a predicate. + * + * */ +public class DbDeleteOperation implements Function { + private IRI subject; + private IRI predicate; + private String object; + + /** + * Constructor. + * + * @param subject {@link IRI} + * @param predicate {@link IRI} + * @param object {@link String} + */ + public DbDeleteOperation(final IRI subject, final IRI predicate, final String object) { + this.subject = subject; + this.predicate = predicate; + this.object = object; + } + + /** + * Apply the operation to a {@link MagmaCoreDatabase}. + * + * @param db {@link MagmaCoreDatabase} + * */ + public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + final var thing = db.get(subject); + + if (thing != null && thing.hasThisValue(predicate.getIri(), object)) { + thing.removeValue(predicate.getIri(), object); + db.update(thing); + return db; + } + + throw new RuntimeException( + String.format("Triple not found for delete: %s, %s, %s", subject, predicate, object) + ); + } + + /** + * Invert a {@link DbDeleteOperation}. + * + * @param d the {@link DbDeleteOperation} + * @return {@link DbCreateOperation} + */ + public static DbCreateOperation invert(final DbDeleteOperation d) { + return new DbCreateOperation(d.subject, d.predicate, d.object); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java new file mode 100644 index 00000000..893c9168 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java @@ -0,0 +1,54 @@ +package uk.gov.gchq.magmacore.database; + +import java.util.Collections; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * Class representing an invertible ordered sequence of change sets. + * + * */ +public class DbTransformation implements Function { + private List transformations; + + /** + * Constructor. + * + * @param transformations a {@link List} of {@link DbChangeSet} + */ + public DbTransformation(final List transformations) { + this.transformations = transformations; + } + + /** + * Apply this {@link DbTransformation} to a {@link MagmaCoreDatabase}. + * + * */ + @Override + public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + final var transformation = transformations + .stream() + .map(x -> (Function) x) + .reduce(Function::andThen) + .orElse(Function.identity()); + + return transformation.apply(db); + } + + /** + * Invert this {@link DbTransformation}. + * + * @return a {@link DbTransformation} + */ + public DbTransformation invert() { + final var list = transformations + .stream() + .map(DbChangeSet::invert) + .collect(Collectors.toList()); + + Collections.reverse(list); + + return new DbTransformation(list); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java b/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java new file mode 100644 index 00000000..c89645e0 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java @@ -0,0 +1,67 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.magmacore.exception; + +/** + * An exception thrown by DbTransformation classes. This is a {@link RuntimeException} to make it + * work nicely with functional programming constructs such as `map`, `apply`, etc. + */ +public class DbTransformationException extends RuntimeException { + + /** + * Constructs a new DbTransformationException with null as its detail message. The cause is not + * initialized, and may subsequently be initialized by a call to {@link #initCause(Throwable)}. + */ + public DbTransformationException() { + super(); + } + + /** + * Constructs a new DbTransformationException with the specified detail message. The cause is not + * initialized, and may subsequently be initialized by a call to {@link #initCause(Throwable)}. + * + * @param message The detail message. The detail message is saved for later retrieval by the + * {@link #getMessage()} method. + */ + public DbTransformationException(final String message) { + super(message); + } + + /** + * Constructs a new DbTransformationException with the specified cause and a detail message of + * (cause==null ? null : cause.toString()) (which typically contains the class and detail + * message of cause). + * + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} + * method). (A {@code null} value is permitted, and indicates that the cause is + * nonexistent or unknown.) + */ + public DbTransformationException(final Throwable cause) { + super(cause); + } + + /** + * Constructs a new DbTransformationException with the specified detail message and cause. + * + * @param message The detail message (which is saved for later retrieval by the + * {@link #getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} + * method). (A {@code null} value is permitted, and indicates that the cause is + * nonexistent or unknown.) + */ + public DbTransformationException(final String message, final Throwable cause) { + super(message, cause); + } +} From ab09e3f41656e399d469ee4f47860a6594e63c65 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 10 Jun 2022 08:21:46 +0100 Subject: [PATCH 31/91] Checkpoint --- .../magmacore/demo/ExampleDataObjects.java | 360 +++++++++++------- 1 file changed, 215 insertions(+), 145 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 5f114715..51f06d64 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -2,11 +2,14 @@ import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; +import java.util.List; +import java.util.Set; import java.util.function.UnaryOperator; import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.iri.IriBase; +import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; import uk.gov.gchq.hqdm.model.Event; @@ -18,8 +21,10 @@ import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.services.ModelBuilder; import uk.gov.gchq.hqdm.rdf.services.PossibleWorldContext; +import uk.gov.gchq.magmacore.database.DbChangeSet; +import uk.gov.gchq.magmacore.database.DbCreateOperation; +import uk.gov.gchq.magmacore.database.DbTransformation; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** @@ -30,123 +35,151 @@ public class ExampleDataObjects { /** IriBase for Reference Data Library. */ private static final IriBase REF_BASE = - new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); + new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); /** IriBase for User data. */ private static final IriBase USER_BASE = - new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); + new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); /** * Create a new IRI in the REF_BASE namespace. * * @return {@link IRI} - */ + */ private static IRI mkRefBaseIri() { - return new IRI(REF_BASE, uid()); + return new IRI(REF_BASE, uid()); } /** * Create a new IRI in the USER_BASE namespace. * * @return {@link IRI} - */ + */ private static IRI mkUserBaseIri() { - return new IRI(USER_BASE, uid()); + return new IRI(USER_BASE, uid()); } - // A DB transformer that adds the RDL entities. - private static UnaryOperator createRefDataObjects = (db) -> { - final var builder = new ModelBuilder(); - - // RDL CLASSES - Can be created, stored and queried separately. - - // Viewable is a class to assign other data objects to, to indicate that they are likely to - // be of direct interest to a system user. - final var viewable = builder.createClass(mkRefBaseIri(), "VIEWABLE"); - - // A sub-set of the Viewable class. - final var viewableObject = builder.createClass(mkRefBaseIri(), "VIEWABLE_OBJECT"); - - // A sub-set of the Viewable Class for viewable Associations. - final var viewableAssociation = builder.createClass(mkRefBaseIri(), "VIEWABLE_ASSOCIATION"); - - // A system is composed of components so this is the class of components that a whole-life - // person can have. - final var kindOfBiologicalSystemHumanComponent = - builder.createKindOfBiologicalSystemComponent(mkRefBaseIri(), "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"); - - // A class of whole-life person (re-)created as Reference Data. - final var kindOfPerson = builder.createKindOfPerson(mkRefBaseIri(), "KIND_OF_PERSON"); - - // A class of temporal part (state) of a (whole-life) person. - final var classOfStateOfPerson = - builder.createClassOfStateOfPerson(mkRefBaseIri(), "CLASS_OF_STATE_OF_PERSON"); - - // A class of whole-life system that is a Building. - final var kindOfFunctionalSystemBuilding = - builder.createKindOfFunctionalSystem(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"); - - // A Domestic Property is a system composed of components (e.g. walls, floors, roof, front - // door, etc). This is the class of those whole-life system components. - final var kindOfFunctionalSystemDomesticPropertyComponent = - builder.createKindOfFunctionalSystemComponent(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"); - - // The class of whole-life system that is domestic property. - final var kindOfFunctionalSystemDomesticProperty = - builder.createKindOfFunctionalSystem(mkRefBaseIri(), "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - - // The class of state of system whose members are temporal parts of domestic properties. - final var classOfStateOfFunctionalSystemDomesticProperty = - builder.createClassOfStateOfFunctionalSystem(mkRefBaseIri(), "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - - // The class of role that every member of class of person plays. - builder.createRole(mkRefBaseIri(), "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - - // The class of role that every member of class of domestic property plays. - final var domesticPropertyRole = builder.createRole(mkRefBaseIri(), "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - - final var domesticOccupantInPropertyRole = builder.createRole(mkRefBaseIri(), "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't - // neatly do that in the class as it can only be added after - // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - - final var occupierOfPropertyRole = builder.createRole(mkRefBaseIri(), "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - // Would be good to add part_of_by_class_(occupantInPropertyKindOfAssociation) but can't - // neatly do that in the class as it can only be added after - // occupantInPropertyKindOfAssociation is created. This can be added later for completeness. - - // Add the Association Types (Participants and Associations). - final var occupantInPropertyKindOfAssociation = - builder.createKindOfAssociation(mkRefBaseIri(), "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - - builder - // Create the class hierarchy - .addSubclass(viewable, viewableObject) - .addSubclass(viewable, viewableAssociation) - .addSubclass(kindOfFunctionalSystemBuilding, kindOfFunctionalSystemDomesticProperty) - .addSubclass(domesticPropertyRole, domesticOccupantInPropertyRole) - .addSubclass(classOfStateOfPerson, occupierOfPropertyRole) - // Set class memberships - .addClassMember(viewableObject, kindOfPerson) - .addClassMember(viewableObject, classOfStateOfPerson) - .addClassMember(viewableObject, kindOfFunctionalSystemDomesticProperty) - .addClassMember(viewableObject, classOfStateOfFunctionalSystemDomesticProperty) - .addClassMember(viewableAssociation, occupantInPropertyKindOfAssociation) - // Set the has component by class predicates - .addHasComponentByClass(kindOfPerson, kindOfBiologicalSystemHumanComponent) - .addHasComponentByClass(kindOfFunctionalSystemDomesticProperty, - kindOfFunctionalSystemDomesticPropertyComponent) - // Set the consists of by class predicates - .addConsistsOfByClass(occupantInPropertyKindOfAssociation, domesticOccupantInPropertyRole) - .addConsistsOfByClass(occupantInPropertyKindOfAssociation, occupierOfPropertyRole) - // store the objects in the database - .getObjects().forEach(object -> { - db.create(object); - }); + /** + * Create a DbChangeSet that adds the RDL. + * + * @return {@link DbChangeSet} + */ + private static DbChangeSet createRefDataObjects() { + + final var viewable = mkRefBaseIri(); + final var viewableObject = mkRefBaseIri(); + final var viewableAssociation = mkRefBaseIri(); + final var kindOfBiologicalSystemHumanComponent = mkRefBaseIri(); + final var kindOfPerson = mkRefBaseIri(); + final var classOfStateOfPerson = mkRefBaseIri(); + final var kindOfFunctionalSystemBuilding = mkRefBaseIri(); + final var kindOfFunctionalSystemDomesticPropertyComponent = mkRefBaseIri(); + final var kindOfFunctionalSystemDomesticProperty = mkRefBaseIri(); + final var classOfStateOfFunctionalSystemDomesticProperty = mkRefBaseIri(); + final var naturalMemberOfSocietyRole = mkRefBaseIri(); + final var domesticPropertyRole = mkRefBaseIri(); + final var domesticOccupantInPropertyRole = mkRefBaseIri(); + final var occupierOfPropertyRole = mkRefBaseIri(); + final var occupantInPropertyKindOfAssociation = mkRefBaseIri(); + + final var viewableObjectSpecializesViewable = mkRefBaseIri(); + + final var creates = Set.of( + new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewable, HQDM.ENTITY_NAME, "VIEWABLE"), + + new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewableObject, HQDM.ENTITY_NAME, "VIEWABLE_OBJECT"), + + new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewableAssociation, HQDM.ENTITY_NAME, "VIEWABLE_ASSOCIATION"), + + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.ENTITY_NAME, "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"), + + new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, HQDM.KIND_OF_PERSON.getIri()), + new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfPerson, HQDM.ENTITY_NAME, "KIND_OF_PERSON"), + + new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_PERSON.getIri()), + new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(classOfStateOfPerson, HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"), + + new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + + new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(naturalMemberOfSocietyRole, HQDM.ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE"), + + new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(domesticPropertyRole, HQDM.ENTITY_NAME, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"), + + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.ENTITY_NAME, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"), + + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(occupierOfPropertyRole, HQDM.ENTITY_NAME, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"), + + new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, HQDM.KIND_OF_ASSOCIATION.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), + + // Create the class hierarchy + new DbCreateOperation(viewableObject, HQDM.HAS_SUPERCLASS, viewable.getIri()), + new DbCreateOperation(viewableObject, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), + + new DbCreateOperation(viewableAssociation, HQDM.HAS_SUPERCLASS, viewable.getIri()), + new DbCreateOperation(viewableAssociation, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), + + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDFS_SUB_CLASS_OF, kindOfFunctionalSystemBuilding.getIri()), + + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDFS_SUB_CLASS_OF, domesticPropertyRole.getIri()), + + new DbCreateOperation(occupierOfPropertyRole, HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()), + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDFS_SUB_CLASS_OF, classOfStateOfPerson.getIri()), + + + // Set class memberships + new DbCreateOperation(kindOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(classOfStateOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, viewableAssociation.getIri()), + + // Set the has component by class predicates + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfPerson.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticProperty.getIri()), - return db; - }; + // Set the consists of by class predicates + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), + new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()) + ); + return new DbChangeSet(Set.of(), creates); + } /** * Find an object by its ENTITY_NAME. @@ -167,9 +200,13 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n } } - // A DB transformer that adds whole life individuals. - private static UnaryOperator addWholeLifeIndividuals = (db) -> { - + /** + * Create a DbChangeSet that adds the whole life individuals. + * + * @return {@link DbChangeSet} + */ + private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { + // // Find the required classes, kinds, and roles. final KindOfPerson kindOfPerson = findByEntityName(db, "KIND_OF_PERSON"); final Role personRole = findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); @@ -178,39 +215,41 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n final Role domesticPropertyRole = findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - // STATES - - // The main state: This is a mandatory component of all datasets if we are to stick to the - // commitments in HQDM. This is the least strict treatment, the creation of a single - // possible world. - final var pwContext = new PossibleWorldContext(mkUserBaseIri(), "Example1_World"); - - // Create the beginning events for the person and house - final var e1 = pwContext.createPointInTime(mkUserBaseIri(), "1991-02-18T00:00:00"); - final var e6 = pwContext.createPointInTime(mkUserBaseIri(), "1972-06-01T00:00:00"); - - // Person B Whole Life Object. - final var personB1 = pwContext.createPerson(mkUserBaseIri(), "PersonB1_Bob"); - - // House B Whole Life Object. - final var houseB = pwContext.createFunctionalSystem(mkUserBaseIri(), "HouseB"); - - pwContext - // Add the person predicates - .addMemberOfKind(personB1, kindOfPerson) - .addNaturalRole(personB1, personRole) - .addBeginningEvent(personB1, e1) - // Add the house predicates - .addMemberOfKind(houseB, kindOfFunctionalSystemDomesticProperty) - .addIntendedRole(houseB, domesticPropertyRole) - .addBeginningEvent(houseB, e6) - // Store the objects in the database - .getObjects().forEach(object -> { - db.create(object); - }); - - return db; - }; + final var possibleWorld = mkUserBaseIri(); + final var e1 = mkUserBaseIri(); + final var e2 = mkUserBaseIri(); + final var person = mkUserBaseIri(); + final var house = mkUserBaseIri(); + + final var creates = Set.of( + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), + + new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e1, HQDM.ENTITY_NAME, "1991-02-18T00:00:00"), + + new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e2, HQDM.ENTITY_NAME, "1972-06-01T00:00:00"), + + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(person, HQDM.ENTITY_NAME, "PersonB1_Bob"), + new DbCreateOperation(person, HQDM.MEMBER_OF_KIND, kindOfPerson.getId()), + new DbCreateOperation(person, HQDM.NATURAL_ROLE, personRole.getId()), + new DbCreateOperation(person, HQDM.BEGINNING, e1.getIri()), + + new DbCreateOperation(house, RDFS.RDF_TYPE, HQDM.FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(house, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(house, HQDM.ENTITY_NAME, "HouseB"), + new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), + new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), + new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) + ); + + return new DbChangeSet(Set.of(), creates); + } /** * Create a person-occupies-house association. @@ -290,11 +329,37 @@ private static void occupyHouse( // Store the objects in the database .getObjects().forEach(object -> { db.create(object); - }); - } + }); + } + + /** + * Add occupancy predicates. + * + * @param db {@link MagmaCoreDatabase} + * @return {@link MagmaCoreDatabase} + */ + private static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { + // Use an existing PossibleWorld + final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); + + // The person occupies the house twice at different times. + final Person person = findByEntityName(db, "PersonB1_Bob"); + final FunctionalSystem house = findByEntityName(db, "HouseB"); + + // Create the bounding events for the associations + final var e2 = mkUserBaseIri(); + final var e3 = mkUserBaseIri(); + final var e4 = mkUserBaseIri(); + final var e5 = mkUserBaseIri(); + + final var creates = Set.of( + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, ""), + ); + return new DbChangeSet(Set.of(), creates); + } // A DB transformer that adds house occupancy associations. - private static UnaryOperator addHouseOccupancies = (db) -> { + private static UnaryOperator addHouseOccupancies2 = (db) -> { // Use an existing PossibleWorld final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); @@ -326,17 +391,22 @@ private static void occupyHouse( * A function that populates a database. * * @param db a {@link MagmaCoreDatabase} + * @return {@link MagmaCoreDatabase} */ - public static void populateExampleData(final MagmaCoreDatabase db) { + public static MagmaCoreDatabase populateExampleData(final MagmaCoreDatabase db) { + + // The database would normally have RDL anyway, but in the + // example it is a new empty database and must be populated. + final var databaseWithRdl = createRefDataObjects().apply(db); - // Compose 3 functions - final var runDbOperations = - createRefDataObjects - .andThen(addWholeLifeIndividuals) - .andThen(addHouseOccupancies); + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one + // can be created. + final var databaseWithIndividuals = addWholeLifeIndividuals(databaseWithRdl).apply(databaseWithRdl); + final var databaseWithOccupancies = addWholeLifeIndividuals(databaseWithIndividuals).apply(databaseWithIndividuals); - // Apply the composed function to the database. - runDbOperations.apply(db); + return databaseWithOccupancies; } } From 8b4009f3bb20650c8695acfd3bf0a874ac2b87e8 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 10 Jun 2022 13:58:40 +0100 Subject: [PATCH 32/91] Use ComposableBiFunction to apply and record the DB changes. --- .../magmacore/database/DbTransformation.java | 17 ++ .../magmacore/demo/ExampleDataObjects.java | 188 +++++++++--------- .../magmacore/util/ComposableBiFunction.java | 37 ++++ 3 files changed, 149 insertions(+), 93 deletions(-) create mode 100644 src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java index 893c9168..b2f78bd8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java @@ -21,6 +21,14 @@ public DbTransformation(final List transformations) { this.transformations = transformations; } + /** + * Constructor. + * + */ + public DbTransformation() { + this(List.of()); + } + /** * Apply this {@link DbTransformation} to a {@link MagmaCoreDatabase}. * @@ -51,4 +59,13 @@ public DbTransformation invert() { return new DbTransformation(list); } + + /** + * Add a DbChangeSet to this transformation. + * + * @param changeSet {@link DbChangeSet} + */ + public void add(final DbChangeSet changeSet) { + this.transformations.add(changeSet); + } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 51f06d64..fb42ab38 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -2,9 +2,7 @@ import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; -import java.util.List; import java.util.Set; -import java.util.function.UnaryOperator; import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; @@ -21,11 +19,11 @@ import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.services.PossibleWorldContext; import uk.gov.gchq.magmacore.database.DbChangeSet; import uk.gov.gchq.magmacore.database.DbCreateOperation; import uk.gov.gchq.magmacore.database.DbTransformation; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.util.ComposableBiFunction; /** * Functions for creating systems using MagmaCore and HQDM. @@ -82,8 +80,6 @@ private static DbChangeSet createRefDataObjects() { final var occupierOfPropertyRole = mkRefBaseIri(); final var occupantInPropertyKindOfAssociation = mkRefBaseIri(); - final var viewableObjectSpecializesViewable = mkRefBaseIri(); - final var creates = Set.of( new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), @@ -255,6 +251,7 @@ private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { * Create a person-occupies-house association. * * @param db a {@link MagmaCoreDatabase} + * @param creates {@link Set} of {@link DbCreateOperation} * @param possibleWorld a {@link PossibleWorld} * @param person the {@link Person} occupying the house. * @param house the house as a {@link FunctionalSystem} that is occupied. @@ -263,11 +260,12 @@ private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { */ private static void occupyHouse( final MagmaCoreDatabase db, + final Set creates, final PossibleWorld possibleWorld, final Person person, final FunctionalSystem house, - final Event beginning, - final Event ending) { + final IRI beginning, + final IRI ending) { // Find the required classes, kinds, and roles. final ClassOfStateOfPerson classOfStateOfPerson = findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); @@ -278,58 +276,47 @@ private static void occupyHouse( final KindOfAssociation occupantInPropertyKindOfAssociation = findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - // STATES - - // The main state: This is a mandatory component of all datasets if we are to stick to the - // commitments in HQDM. This is the least strict treatment, the creation of a single - // possible world. - final var pwContext = new PossibleWorldContext(possibleWorld); - - // Person state. - final var personState = pwContext.createStateOfPerson(mkUserBaseIri(), uid()); - - // States of house when Occupant person is present. - final var houseState = pwContext.createStateOfFunctionalSystem(mkUserBaseIri(), uid()); - - // Create Participants to link the states to their roles in the association - final var personParticipant = pwContext.createParticipant(mkUserBaseIri(), uid()); - final var houseParticipant = pwContext.createParticipant(mkUserBaseIri(), uid()); - - // Create the association - final var houseOccupiedAssociation = pwContext.createAssociation(mkUserBaseIri(), uid()); - - // Build the full structure of the association - pwContext - // personState predicates - .addMemberOf(personState, classOfStateOfPerson) - .addTemporalPartOf(personState, person) - .addBeginningEvent(personState, beginning) - .addEndingEvent(personState, ending) - // houseState predicates - .addMemberOf(houseState, classOfStateOfFunctionalSystemDomesticProperty) - .addTemporalPartOf(house, houseState) - .addBeginningEvent(houseState, beginning) - .addEndingEvent(houseState, ending) - // personParticipant predicates - .addMemberOfKind(personParticipant, occupierOfPropertyRole) - .addTemporalPartOf(personParticipant, personState) - .addBeginningEvent(personParticipant, beginning) - .addEndingEvent(personParticipant, ending) - // houseParticipant predicates - .addMemberOfKind(houseParticipant, domesticOccupantInPropertyRole) - .addTemporalPartOf(houseParticipant, houseState) - .addBeginningEvent(houseParticipant, beginning) - .addEndingEvent(houseParticipant, ending) - // houseOccupiedAssociation predicates - .addMemberOfKind(houseOccupiedAssociation, occupantInPropertyKindOfAssociation) - .addConsistsOfParticipant(houseOccupiedAssociation, houseParticipant) - .addConsistsOfParticipant(houseOccupiedAssociation, personParticipant) - .addBeginningEvent(houseOccupiedAssociation, beginning) - .addEndingEvent(houseOccupiedAssociation, ending) - // Store the objects in the database - .getObjects().forEach(object -> { - db.create(object); - }); + final var personState = mkUserBaseIri(); + final var houseState = mkUserBaseIri(); + final var personParticipant = mkUserBaseIri(); + final var houseParticipant = mkUserBaseIri(); + final var houseOccupiedAssociation = mkUserBaseIri(); + + creates.add(new DbCreateOperation(personState, RDFS.RDF_TYPE, HQDM.STATE_OF_PERSON.getIri())); + creates.add(new DbCreateOperation(personState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(personState, HQDM.MEMBER_OF, classOfStateOfPerson.getId())); + creates.add(new DbCreateOperation(personState, HQDM.TEMPORAL_PART_OF, person.getId())); + creates.add(new DbCreateOperation(personState, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(personState, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseState, RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM.getIri())); + creates.add(new DbCreateOperation(houseState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.TEMPORAL_PART_OF, house.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseState, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(personParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(personParticipant, HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getId())); + creates.add(new DbCreateOperation(personParticipant, HQDM.TEMPORAL_PART_OF, personState.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getId())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.TEMPORAL_PART_OF, houseState.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseOccupiedAssociation, RDFS.RDF_TYPE, HQDM.ASSOCIATION.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, houseParticipant.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, personParticipant.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.ENDING, ending.getIri())); } /** @@ -353,60 +340,75 @@ private static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { final var e5 = mkUserBaseIri(); final var creates = Set.of( - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, ""), - ); - return new DbChangeSet(Set.of(), creates); - } + new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), + new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2020-08-15T17:50:00"), - // A DB transformer that adds house occupancy associations. - private static UnaryOperator addHouseOccupancies2 = (db) -> { + new DbCreateOperation(e3, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e3, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), + new DbCreateOperation(e3, HQDM.ENTITY_NAME, "2020-08-15T19:21:00"), - // Use an existing PossibleWorld - final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); - final var pwContext = new PossibleWorldContext(possibleWorld); + new DbCreateOperation(e4, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e4, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), + new DbCreateOperation(e4, HQDM.ENTITY_NAME, "2020-08-16T22:33:00"), - // Create the bounding events for the associations - final var e2 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-15T17:50:00"); - final var e3 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-15T19:21:00"); - final var e4 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-16T22:33:00"); - final var e5 = pwContext.createPointInTime(mkUserBaseIri(), "2020-08-17T10:46:00"); + new DbCreateOperation(e5, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e5, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), + new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00") + ); - // Persist the events - pwContext.getObjects().forEach(object -> { - db.create(object); - }); + occupyHouse(db, creates, possibleWorld, person, house, e2, e3); + occupyHouse(db, creates, possibleWorld, person, house, e4, e5); - // The person occupies the house twice at different times. - final Person person = findByEntityName(db, "PersonB1_Bob"); - final FunctionalSystem house = findByEntityName(db, "HouseB"); + return new DbChangeSet(Set.of(), creates); + } + + // A BiFunction to create the RDL + private static ComposableBiFunction createRefDataObjects = (t, d) -> { + final var changeSet = createRefDataObjects(); + t.add(changeSet); + return changeSet.apply(d); + }; - // This will create and persist the associations. - occupyHouse(db, possibleWorld, person, house, e2, e3); - occupyHouse(db, possibleWorld, person, house, e4, e5); + // A BiFunction to add the individuals + private static ComposableBiFunction addWholeLifeIndividuals = (t, d) -> { + final var changeSet = addWholeLifeIndividuals(d); + t.add(changeSet); + return changeSet.apply(d); + }; - return db; + // A BiFunction to create the occupancy associations + private static ComposableBiFunction addHouseOccupancies = (t, d) -> { + final var changeSet = addHouseOccupancies(d); + t.add(changeSet); + return changeSet.apply(d); }; /** * A function that populates a database. * * @param db a {@link MagmaCoreDatabase} - * @return {@link MagmaCoreDatabase} + * @return {@link DbTransformation} */ - public static MagmaCoreDatabase populateExampleData(final MagmaCoreDatabase db) { - - // The database would normally have RDL anyway, but in the - // example it is a new empty database and must be populated. - final var databaseWithRdl = createRefDataObjects().apply(db); + public static DbTransformation populateExampleData(final MagmaCoreDatabase db) { // Apply the transformation to the database. There are dependencies between these change sets // since they both depend on RDL being present, but also the occupancies depend on the // individuals being present, so each change set needs to be applied before the next one // can be created. - final var databaseWithIndividuals = addWholeLifeIndividuals(databaseWithRdl).apply(databaseWithRdl); - final var databaseWithOccupancies = addWholeLifeIndividuals(databaseWithIndividuals).apply(databaseWithIndividuals); + final var transform = + createRefDataObjects + .andThen(addWholeLifeIndividuals) + .andThen(addHouseOccupancies); + + // This will be updated to record the transformation that took place. + final var result = new DbTransformation(); + + // Apply the transform to the database + transform.apply(result, db); - return databaseWithOccupancies; + // Return the DbTransformation that took place. + return result; } } diff --git a/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java b/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java new file mode 100644 index 00000000..b7e92bc2 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java @@ -0,0 +1,37 @@ +package uk.gov.gchq.magmacore.util; + +import java.util.function.BiFunction; + +/** + * Utility functions to combing BiFunctions for use with an environment parameter. + * A pattern for composing BiFinctions. + * + * @author Tony Walmsley, AOSD Ltd. + */ +public interface ComposableBiFunction extends BiFunction { + + /** + * Combines two ComposableBiFunction by treating the first parameter to both functions as an `environment` that + * needs to be available to both ComposableBiFunction. The return type of the first BiFunction must match the + * second parameter type of the second ComposableBiFunction. + * + * @param first a ComposableBiFunction - executed before this + * @return a combination of the two ComposableBiFunction that implements `this(env, first(env, p1))` + */ + default ComposableBiFunction compose(final ComposableBiFunction first) { + return (e, t) -> this.apply(e, first.apply(e, t)); + } + + /** + * Combines two ComposableBiFunction by treating the first parameter to both functions as an `environment` that + * needs to be available to both ComposableBiFunction. The return type of the first ComposableBiFunction must + * match the second parameter type of the second ComposableBiFunction. + * + * @param second a ComposableBiFunction - executed after this + * @return a combination of the two ComposableBiFunction that implements `second(env, this(env, p1))` + */ + default ComposableBiFunction andThen(final ComposableBiFunction second) { + return (e, t) -> second.apply(e, this.apply(e, t)); + } + +} From 2e3dd4f305b6a29b1386cce31ec9a3f666288f7b Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 10 Jun 2022 15:03:10 +0100 Subject: [PATCH 33/91] Unit tests for the DB Transformations. --- .../magmacore/database/DbCreateOperation.java | 9 +- .../magmacore/database/DbDeleteOperation.java | 3 +- .../java/uk/gov/gchq/magmacore/AppTest.java | 32 ----- .../magmacore/database/DbChangeSetTest.java | 54 ++++++++ .../magmacore/database/DbOperationTest.java | 118 ++++++++++++++++++ .../database/DbTransformationTest.java | 77 ++++++++++++ 6 files changed, 259 insertions(+), 34 deletions(-) delete mode 100644 src/test/java/uk/gov/gchq/magmacore/AppTest.java create mode 100644 src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java create mode 100644 src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java create mode 100644 src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java index 3ef05902..971c97dc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java @@ -4,14 +4,21 @@ import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.magmacore.exception.DbTransformationException; /** * Class representing an invertible operation to create a predicate. * * */ public class DbCreateOperation implements Function { + + // The IRI of the Thing we're referring to. private IRI subject; + + // The IRI of the property we're referring to. private IRI predicate; + + // The value of the property we're referring to. private String object; /** @@ -43,7 +50,7 @@ public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { thing.addValue(predicate.getIri(), object); db.update(thing); } else { - throw new RuntimeException( + throw new DbTransformationException( String.format("Triple already exists: %s, %s, %s", subject, predicate, object) ); } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java index 2ff9eca4..954e61ff 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java @@ -3,6 +3,7 @@ import java.util.function.Function; import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.magmacore.exception.DbTransformationException; /** * Class representing an invertible operation to delete a predicate. @@ -40,7 +41,7 @@ public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { return db; } - throw new RuntimeException( + throw new DbTransformationException( String.format("Triple not found for delete: %s, %s, %s", subject, predicate, object) ); } diff --git a/src/test/java/uk/gov/gchq/magmacore/AppTest.java b/src/test/java/uk/gov/gchq/magmacore/AppTest.java deleted file mode 100644 index 72e21d56..00000000 --- a/src/test/java/uk/gov/gchq/magmacore/AppTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore; - -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -/** - * Unit test for simple App. - */ -public class AppTest { - /** - * Rigorous Test. - */ - @Test - public void shouldAnswerWithTrue() { - assertTrue(true); - } -} diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java new file mode 100644 index 00000000..2aee7f61 --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java @@ -0,0 +1,54 @@ +package uk.gov.gchq.magmacore.database; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Set; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.iri.HQDM; + +/** + * Check that {@link DbChangeSet} works correctly. + * + * */ +public class DbChangeSetTest { + + /** + * Test that {@link DbChangeSet} can be applied, inverted, and undone. + * + * */ + @Test + public void testApplyAndInvert() { + + // Create operations to add an object with dummy values. + final var changes = new DbChangeSet(Set.of(), Set.of( + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"), + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world") + )); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operations. + changes.apply(db); + + // Find the thing we just created and assert values are present. + final var thing = db.get(HQDM.ABSTRACT_OBJECT); + + assertNotNull(thing); + assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + + // Invert the operations, apply them in reverse order and assert they are no longer present. + DbChangeSet.invert(changes).apply(db); + + assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertFalse(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + } +} diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java new file mode 100644 index 00000000..3931b22b --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java @@ -0,0 +1,118 @@ +package uk.gov.gchq.magmacore.database; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.magmacore.exception.DbTransformationException; + +/** + * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. + * + * */ +public class DbOperationTest { + + /** + * Test that DbCreateOperations can be applied to a database and can also be + * inverted and used to undo the {@link DbCreateOperation}. + * */ + @Test + public void testSingleCreateAndDelete() { + + // Create an operation to add an object with dummy values. + final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operation. + op.apply(db); + + // Find the thing we just created and assert it's presence. + final var thing = db.get(HQDM.ABSTRACT_OBJECT); + + assertNotNull(thing); + assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + + // Invert the operation and assert that it is no longer present. + DbCreateOperation.invert(op).apply(db); + + assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + } + + /** + * Test that multiple DbCreateOperations can be applied to a database and can also be + * inverted and used to undo the {@link DbCreateOperation}. + * */ + @Test + public void testMultipleCreateAndDelete() { + + // Create operations to add an object with dummy values. + final var op1 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + final var op2 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + final var op3 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operations. + op1.apply(db); + op2.apply(db); + op3.apply(db); + + // Find the thing we just created and assert values are present. + final var thing = db.get(HQDM.ABSTRACT_OBJECT); + + assertNotNull(thing); + assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + + // Invert the operations, apply them in reverse order and assert they are no longer present. + DbCreateOperation.invert(op3).apply(db); + DbCreateOperation.invert(op2).apply(db); + DbCreateOperation.invert(op1).apply(db); + + assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertFalse(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + } + + /** + * Test that we get an exception when trying to create something that already exists. + * + * */ + @Test(expected = DbTransformationException.class) + public void testCreateWhenAlreadyPresent() { + + // Create an operation to add an object with dummy values. + final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operation twice, the second should throw an exception. + op.apply(db); + op.apply(db); + } + + /** + * Test that we get an exception when trying to delete something that does not exist. + * + * */ + @Test(expected = DbTransformationException.class) + public void testDeleteWhenNotPresent() { + + // Create an operation to add an object with dummy values. + final var op = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operation, it should throw an exception. + op.apply(db); + } +} diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java new file mode 100644 index 00000000..0b2e33c1 --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java @@ -0,0 +1,77 @@ +package uk.gov.gchq.magmacore.database; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; +import java.util.Set; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.iri.HQDM; + +/** + * Check that {@link DbTransformation} works correctly. + * + * */ +public class DbTransformationTest { + + /** + * Test that multiple DbChangeSets can be applied as a DbTransformation, inverted, and undone. + * + * */ + @Test + public void testApplyAndInvert() { + + // Create operations to add an object with dummy values. + final var changes1 = new DbChangeSet(Set.of(), Set.of( + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"), + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world") + )); + + final var changes2 = new DbChangeSet(Set.of(), Set.of( + new DbCreateOperation(HQDM.PERSON, HQDM.ENTITY_NAME, "Trillian"), + new DbCreateOperation(HQDM.PERSON, HQDM.MEMBER_OF, "class2"), + new DbCreateOperation(HQDM.PERSON, HQDM.PART_OF_POSSIBLE_WORLD, "another world") + )); + + final var transformation = new DbTransformation(List.of( + changes1, + changes2 + )); + + // Create a database to be updated. + final var db = new MagmaCoreObjectDatabase(); + + // Apply the operations. + transformation.apply(db); + + // Find the thing we just created and assert values are present. + final var thing1 = db.get(HQDM.ABSTRACT_OBJECT); + + assertNotNull(thing1); + assertTrue(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertTrue(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + + final var thing2 = db.get(HQDM.PERSON); + + assertNotNull(thing2); + assertTrue(thing2.hasThisValue(HQDM.ENTITY_NAME.getIri(), "Trillian")); + assertTrue(thing2.hasThisValue(HQDM.MEMBER_OF.getIri(), "class2")); + assertTrue(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); + + // Invert the operations, apply them in reverse order and assert they are no longer present. + transformation.invert().apply(db); + + assertFalse(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertFalse(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + assertFalse(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + + assertFalse(thing2.hasThisValue(HQDM.PERSON.getIri(), "Trillian")); + assertFalse(thing2.hasThisValue(HQDM.MEMBER_OF.getIri(), "class2")); + assertFalse(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); + } +} From a4967b11122227c0e206767e00ef39f1546270ad Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 10 Jun 2022 16:19:33 +0100 Subject: [PATCH 34/91] Comments for the ExampleDataObjects changes. --- .../gchq/magmacore/demo/ExampleDataObjects.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index fb42ab38..e27c970c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -64,6 +64,7 @@ private static IRI mkUserBaseIri() { */ private static DbChangeSet createRefDataObjects() { + // Create new unique IRIs for all the objects we need to create. final var viewable = mkRefBaseIri(); final var viewableObject = mkRefBaseIri(); final var viewableAssociation = mkRefBaseIri(); @@ -80,6 +81,7 @@ private static DbChangeSet createRefDataObjects() { final var occupierOfPropertyRole = mkRefBaseIri(); final var occupantInPropertyKindOfAssociation = mkRefBaseIri(); + // Add DbCreateOperations to create the objects and their properties. final var creates = Set.of( new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), @@ -172,8 +174,9 @@ private static DbChangeSet createRefDataObjects() { // Set the consists of by class predicates new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()) - ); + ); + // Put the operations in a change set and return it. return new DbChangeSet(Set.of(), creates); } @@ -202,7 +205,7 @@ private static T findByEntityName(final MagmaCoreDatabase db, final String n * @return {@link DbChangeSet} */ private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { - // + // Find the required classes, kinds, and roles. final KindOfPerson kindOfPerson = findByEntityName(db, "KIND_OF_PERSON"); final Role personRole = findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); @@ -211,12 +214,14 @@ private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { final Role domesticPropertyRole = findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + // Create IRIs for the objects we want to create. final var possibleWorld = mkUserBaseIri(); final var e1 = mkUserBaseIri(); final var e2 = mkUserBaseIri(); final var person = mkUserBaseIri(); final var house = mkUserBaseIri(); + // Create DbCreateOperations to create the objects and their properties. final var creates = Set.of( new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), @@ -244,6 +249,7 @@ private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) ); + // Create a change set and return it. return new DbChangeSet(Set.of(), creates); } @@ -276,12 +282,14 @@ private static void occupyHouse( final KindOfAssociation occupantInPropertyKindOfAssociation = findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + // Create DbCreateOperations to create the objects and their properties. final var personState = mkUserBaseIri(); final var houseState = mkUserBaseIri(); final var personParticipant = mkUserBaseIri(); final var houseParticipant = mkUserBaseIri(); final var houseOccupiedAssociation = mkUserBaseIri(); + // Create DbCreateOperations to create the objects and their properties. creates.add(new DbCreateOperation(personState, RDFS.RDF_TYPE, HQDM.STATE_OF_PERSON.getIri())); creates.add(new DbCreateOperation(personState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); creates.add(new DbCreateOperation(personState, HQDM.MEMBER_OF, classOfStateOfPerson.getId())); @@ -333,12 +341,13 @@ private static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { final Person person = findByEntityName(db, "PersonB1_Bob"); final FunctionalSystem house = findByEntityName(db, "HouseB"); - // Create the bounding events for the associations + // Create IRIs for the objects we want to create. final var e2 = mkUserBaseIri(); final var e3 = mkUserBaseIri(); final var e4 = mkUserBaseIri(); final var e5 = mkUserBaseIri(); + // Create DbCreateOperations to create the objects and their properties. final var creates = Set.of( new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), @@ -357,9 +366,11 @@ private static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00") ); + // Add more DbCreateOperations to create the required associations. occupyHouse(db, creates, possibleWorld, person, house, e2, e3); occupyHouse(db, creates, possibleWorld, person, house, e4, e5); + // Create and return a new change set. return new DbChangeSet(Set.of(), creates); } From 5bb0a00d9c29434d2b5379097e445cfadacb7298 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 11 Jun 2022 14:52:49 +0100 Subject: [PATCH 35/91] Make the example code more structured. --- checkstyle-suppressions.xml | 4 +- .../magmacore/database/DbCreateOperation.java | 10 +- .../magmacore/database/DbTransformation.java | 3 +- .../magmacore/demo/ExampleAssociations.java | 146 +++++++ .../magmacore/demo/ExampleCommonUtils.java | 61 +++ .../magmacore/demo/ExampleDataObjects.java | 370 +----------------- .../magmacore/demo/ExampleIndividuals.java | 73 ++++ .../gov/gchq/magmacore/demo/ExampleRdl.java | 138 +++++++ 8 files changed, 434 insertions(+), 371 deletions(-) create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index d0e6ac98..e9eb5578 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -3,5 +3,5 @@ - - \ No newline at end of file + + diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java index 971c97dc..9f5330dd 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java @@ -2,7 +2,9 @@ import java.util.function.Function; +import uk.gov.gchq.hqdm.exception.HqdmException; import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; @@ -40,7 +42,13 @@ public DbCreateOperation(final IRI subject, final IRI predicate, final String ob * */ @Override public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { - final var thing = db.get(subject); + Thing thing = null; + try { + thing = db.get(subject); + } catch (final HqdmException e) { + // The object does not exist. + } + if (thing == null) { final var newThing = SpatioTemporalExtentServices.createSpatioTemporalExtent(subject.getIri()); newThing.addStringValue(predicate.getIri(), object); diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java index b2f78bd8..2f02549e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java @@ -1,6 +1,7 @@ package uk.gov.gchq.magmacore.database; import java.util.Collections; +import java.util.LinkedList; import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; @@ -26,7 +27,7 @@ public DbTransformation(final List transformations) { * */ public DbTransformation() { - this(List.of()); + this(new LinkedList<>()); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java new file mode 100644 index 00000000..3b2c71f4 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -0,0 +1,146 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.HashSet; +import java.util.Set; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.model.FunctionalSystem; +import uk.gov.gchq.hqdm.model.KindOfAssociation; +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.model.PossibleWorld; +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.magmacore.database.DbChangeSet; +import uk.gov.gchq.magmacore.database.DbCreateOperation; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleAssociations { + + /** + * Create a person-occupies-house association. + * + * @param db a {@link MagmaCoreDatabase} + * @param creates {@link Set} of {@link DbCreateOperation} + * @param possibleWorld a {@link PossibleWorld} + * @param person the {@link Person} occupying the house. + * @param house the house as a {@link FunctionalSystem} that is occupied. + * @param beginning {@link Event} + * @param ending {@link Event} + */ + private static void occupyHouse( + final MagmaCoreDatabase db, + final Set creates, + final PossibleWorld possibleWorld, + final Person person, + final FunctionalSystem house, + final IRI beginning, + final IRI ending) { + + // Find the required classes, kinds, and roles. + final ClassOfStateOfPerson classOfStateOfPerson = ExampleCommonUtils.findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); + final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = + ExampleCommonUtils.findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final Role occupierOfPropertyRole = ExampleCommonUtils.findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final Role domesticOccupantInPropertyRole = ExampleCommonUtils.findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + final KindOfAssociation occupantInPropertyKindOfAssociation = + ExampleCommonUtils.findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + + // Create DbCreateOperations to create the objects and their properties. + final var personState = ExampleCommonUtils.mkUserBaseIri(); + final var houseState = ExampleCommonUtils.mkUserBaseIri(); + final var personParticipant = ExampleCommonUtils.mkUserBaseIri(); + final var houseParticipant = ExampleCommonUtils.mkUserBaseIri(); + final var houseOccupiedAssociation = ExampleCommonUtils.mkUserBaseIri(); + + // Create DbCreateOperations to create the objects and their properties. + creates.add(new DbCreateOperation(personState, RDFS.RDF_TYPE, HQDM.STATE_OF_PERSON.getIri())); + creates.add(new DbCreateOperation(personState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(personState, HQDM.MEMBER_OF, classOfStateOfPerson.getId())); + creates.add(new DbCreateOperation(personState, HQDM.TEMPORAL_PART_OF, person.getId())); + creates.add(new DbCreateOperation(personState, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(personState, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseState, RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM.getIri())); + creates.add(new DbCreateOperation(houseState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.TEMPORAL_PART_OF, house.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseState, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(personParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(personParticipant, HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getId())); + creates.add(new DbCreateOperation(personParticipant, HQDM.TEMPORAL_PART_OF, personState.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(personParticipant, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getId())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.TEMPORAL_PART_OF, houseState.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseParticipant, HQDM.ENDING, ending.getIri())); + + creates.add(new DbCreateOperation(houseOccupiedAssociation, RDFS.RDF_TYPE, HQDM.ASSOCIATION.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, houseParticipant.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, personParticipant.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.BEGINNING, beginning.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.ENDING, ending.getIri())); + } + + /** + * Add occupancy predicates. + * + * @param db {@link MagmaCoreDatabase} + * @return {@link MagmaCoreDatabase} + */ + public static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { + // Use an existing PossibleWorld + final PossibleWorld possibleWorld = ExampleCommonUtils.findByEntityName(db, "Example1_World"); + + // The person occupies the house twice at different times. + final Person person = ExampleCommonUtils.findByEntityName(db, "PersonB1_Bob"); + final FunctionalSystem house = ExampleCommonUtils.findByEntityName(db, "HouseB"); + + // Create IRIs for the objects we want to create. + final var e2 = ExampleCommonUtils.mkUserBaseIri(); + final var e3 = ExampleCommonUtils.mkUserBaseIri(); + final var e4 = ExampleCommonUtils.mkUserBaseIri(); + final var e5 = ExampleCommonUtils.mkUserBaseIri(); + + // Create DbCreateOperations to create the objects and their properties. + final var creates = new HashSet(); + creates.add(new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2020-08-15T17:50:00")); + + creates.add(new DbCreateOperation(e3, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(e3, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(e3, HQDM.ENTITY_NAME, "2020-08-15T19:21:00")); + + creates.add(new DbCreateOperation(e4, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(e4, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(e4, HQDM.ENTITY_NAME, "2020-08-16T22:33:00")); + + creates.add(new DbCreateOperation(e5, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(e5, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00")); + + // Add more DbCreateOperations to create the required associations. + occupyHouse(db, creates, possibleWorld, person, house, e2, e3); + occupyHouse(db, creates, possibleWorld, person, house, e4, e5); + + // Create and return a new change set. + return new DbChangeSet(Set.of(), creates); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java new file mode 100644 index 00000000..b550de8d --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -0,0 +1,61 @@ +package uk.gov.gchq.magmacore.demo; + +import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.iri.IriBase; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleCommonUtils { + + /** IriBase for User data. */ + public static final IriBase USER_BASE = + new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); + + /** + * Create a new IRI in the USER_BASE namespace. + * + * @return {@link IRI} + */ + public static IRI mkUserBaseIri() { + return new IRI(USER_BASE, uid()); + } + + /** IriBase for Reference Data Library. */ + public static final IriBase REF_BASE = + new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); + + /** + * Create a new IRI in the REF_BASE namespace. + * + * @return {@link IRI} + */ + public static IRI mkRefBaseIri() { + return new IRI(REF_BASE, uid()); + } + + /** + * Find an object by its ENTITY_NAME. + * + * @param db the {@link MagmaCoreDatabase} to seaerch. + * @param name the name {@link String} to seaerch for. + * @return the {@link Thing}that was found. + * @throws RuntimeException if no or multiple results found. + */ + public static T findByEntityName(final MagmaCoreDatabase db, final String name) { + final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + if (searchResult.size() == 1) { + return (T) searchResult.get(0); + } else if (searchResult.isEmpty()) { + throw new RuntimeException("No entity found with name: " + name); + } else { + throw new RuntimeException("Multiple entities found with name: " + name); + } + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index e27c970c..a1150962 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -1,26 +1,5 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; - -import java.util.Set; - -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.IriBase; -import uk.gov.gchq.hqdm.iri.RDFS; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.model.FunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.DbChangeSet; -import uk.gov.gchq.magmacore.database.DbCreateOperation; import uk.gov.gchq.magmacore.database.DbTransformation; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.util.ComposableBiFunction; @@ -31,366 +10,23 @@ * */ public class ExampleDataObjects { - /** IriBase for Reference Data Library. */ - private static final IriBase REF_BASE = - new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); - - /** IriBase for User data. */ - private static final IriBase USER_BASE = - new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); - - /** - * Create a new IRI in the REF_BASE namespace. - * - * @return {@link IRI} - */ - private static IRI mkRefBaseIri() { - return new IRI(REF_BASE, uid()); - } - - /** - * Create a new IRI in the USER_BASE namespace. - * - * @return {@link IRI} - */ - private static IRI mkUserBaseIri() { - return new IRI(USER_BASE, uid()); - } - - /** - * Create a DbChangeSet that adds the RDL. - * - * @return {@link DbChangeSet} - */ - private static DbChangeSet createRefDataObjects() { - - // Create new unique IRIs for all the objects we need to create. - final var viewable = mkRefBaseIri(); - final var viewableObject = mkRefBaseIri(); - final var viewableAssociation = mkRefBaseIri(); - final var kindOfBiologicalSystemHumanComponent = mkRefBaseIri(); - final var kindOfPerson = mkRefBaseIri(); - final var classOfStateOfPerson = mkRefBaseIri(); - final var kindOfFunctionalSystemBuilding = mkRefBaseIri(); - final var kindOfFunctionalSystemDomesticPropertyComponent = mkRefBaseIri(); - final var kindOfFunctionalSystemDomesticProperty = mkRefBaseIri(); - final var classOfStateOfFunctionalSystemDomesticProperty = mkRefBaseIri(); - final var naturalMemberOfSocietyRole = mkRefBaseIri(); - final var domesticPropertyRole = mkRefBaseIri(); - final var domesticOccupantInPropertyRole = mkRefBaseIri(); - final var occupierOfPropertyRole = mkRefBaseIri(); - final var occupantInPropertyKindOfAssociation = mkRefBaseIri(); - - // Add DbCreateOperations to create the objects and their properties. - final var creates = Set.of( - new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), - new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(viewable, HQDM.ENTITY_NAME, "VIEWABLE"), - - new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), - new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(viewableObject, HQDM.ENTITY_NAME, "VIEWABLE_OBJECT"), - - new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), - new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(viewableAssociation, HQDM.ENTITY_NAME, "VIEWABLE_ASSOCIATION"), - - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT.getIri()), - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.ENTITY_NAME, "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"), - - new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, HQDM.KIND_OF_PERSON.getIri()), - new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfPerson, HQDM.ENTITY_NAME, "KIND_OF_PERSON"), - - new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_PERSON.getIri()), - new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(classOfStateOfPerson, HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"), - - new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), - new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemBuilding, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"), - - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"), - - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), - - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), - - new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), - new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(naturalMemberOfSocietyRole, HQDM.ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE"), - - new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), - new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(domesticPropertyRole, HQDM.ENTITY_NAME, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"), - - new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.ENTITY_NAME, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"), - - new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), - new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(occupierOfPropertyRole, HQDM.ENTITY_NAME, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"), - - new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, HQDM.KIND_OF_ASSOCIATION.getIri()), - new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), - - // Create the class hierarchy - new DbCreateOperation(viewableObject, HQDM.HAS_SUPERCLASS, viewable.getIri()), - new DbCreateOperation(viewableObject, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), - - new DbCreateOperation(viewableAssociation, HQDM.HAS_SUPERCLASS, viewable.getIri()), - new DbCreateOperation(viewableAssociation, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), - - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDFS_SUB_CLASS_OF, kindOfFunctionalSystemBuilding.getIri()), - - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDFS_SUB_CLASS_OF, domesticPropertyRole.getIri()), - - new DbCreateOperation(occupierOfPropertyRole, HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()), - new DbCreateOperation(occupierOfPropertyRole, RDFS.RDFS_SUB_CLASS_OF, classOfStateOfPerson.getIri()), - - - // Set class memberships - new DbCreateOperation(kindOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(classOfStateOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, viewableAssociation.getIri()), - - // Set the has component by class predicates - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfPerson.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticProperty.getIri()), - - // Set the consists of by class predicates - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), - new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()) - ); - - // Put the operations in a change set and return it. - return new DbChangeSet(Set.of(), creates); - } - - /** - * Find an object by its ENTITY_NAME. - * - * @param db the {@link MagmaCoreDatabase} to seaerch. - * @param name the name {@link String} to seaerch for. - * @return the {@link Thing}that was found. - * @throws RuntimeException if no or multiple results found. - */ - private static T findByEntityName(final MagmaCoreDatabase db, final String name) { - final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); - if (searchResult.size() == 1) { - return (T) searchResult.get(0); - } else if (searchResult.isEmpty()) { - throw new RuntimeException("No entity found with name: " + name); - } else { - throw new RuntimeException("Multiple entities found with name: " + name); - } - } - - /** - * Create a DbChangeSet that adds the whole life individuals. - * - * @return {@link DbChangeSet} - */ - private static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { - - // Find the required classes, kinds, and roles. - final KindOfPerson kindOfPerson = findByEntityName(db, "KIND_OF_PERSON"); - final Role personRole = findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); - final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final Role domesticPropertyRole = - findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); - - // Create IRIs for the objects we want to create. - final var possibleWorld = mkUserBaseIri(); - final var e1 = mkUserBaseIri(); - final var e2 = mkUserBaseIri(); - final var person = mkUserBaseIri(); - final var house = mkUserBaseIri(); - - // Create DbCreateOperations to create the objects and their properties. - final var creates = Set.of( - new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), - new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), - - new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e1, HQDM.ENTITY_NAME, "1991-02-18T00:00:00"), - - new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e2, HQDM.ENTITY_NAME, "1972-06-01T00:00:00"), - - new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(person, HQDM.ENTITY_NAME, "PersonB1_Bob"), - new DbCreateOperation(person, HQDM.MEMBER_OF_KIND, kindOfPerson.getId()), - new DbCreateOperation(person, HQDM.NATURAL_ROLE, personRole.getId()), - new DbCreateOperation(person, HQDM.BEGINNING, e1.getIri()), - - new DbCreateOperation(house, RDFS.RDF_TYPE, HQDM.FUNCTIONAL_SYSTEM.getIri()), - new DbCreateOperation(house, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(house, HQDM.ENTITY_NAME, "HouseB"), - new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), - new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), - new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) - ); - - // Create a change set and return it. - return new DbChangeSet(Set.of(), creates); - } - - /** - * Create a person-occupies-house association. - * - * @param db a {@link MagmaCoreDatabase} - * @param creates {@link Set} of {@link DbCreateOperation} - * @param possibleWorld a {@link PossibleWorld} - * @param person the {@link Person} occupying the house. - * @param house the house as a {@link FunctionalSystem} that is occupied. - * @param beginning {@link Event} - * @param ending {@link Event} - */ - private static void occupyHouse( - final MagmaCoreDatabase db, - final Set creates, - final PossibleWorld possibleWorld, - final Person person, - final FunctionalSystem house, - final IRI beginning, - final IRI ending) { - - // Find the required classes, kinds, and roles. - final ClassOfStateOfPerson classOfStateOfPerson = findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); - final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final Role occupierOfPropertyRole = findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - final Role domesticOccupantInPropertyRole = findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - final KindOfAssociation occupantInPropertyKindOfAssociation = - findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); - - // Create DbCreateOperations to create the objects and their properties. - final var personState = mkUserBaseIri(); - final var houseState = mkUserBaseIri(); - final var personParticipant = mkUserBaseIri(); - final var houseParticipant = mkUserBaseIri(); - final var houseOccupiedAssociation = mkUserBaseIri(); - - // Create DbCreateOperations to create the objects and their properties. - creates.add(new DbCreateOperation(personState, RDFS.RDF_TYPE, HQDM.STATE_OF_PERSON.getIri())); - creates.add(new DbCreateOperation(personState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(personState, HQDM.MEMBER_OF, classOfStateOfPerson.getId())); - creates.add(new DbCreateOperation(personState, HQDM.TEMPORAL_PART_OF, person.getId())); - creates.add(new DbCreateOperation(personState, HQDM.BEGINNING, beginning.getIri())); - creates.add(new DbCreateOperation(personState, HQDM.ENDING, ending.getIri())); - - creates.add(new DbCreateOperation(houseState, RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM.getIri())); - creates.add(new DbCreateOperation(houseState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseState, HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getId())); - creates.add(new DbCreateOperation(houseState, HQDM.TEMPORAL_PART_OF, house.getId())); - creates.add(new DbCreateOperation(houseState, HQDM.BEGINNING, beginning.getIri())); - creates.add(new DbCreateOperation(houseState, HQDM.ENDING, ending.getIri())); - - creates.add(new DbCreateOperation(personParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); - creates.add(new DbCreateOperation(personParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(personParticipant, HQDM.MEMBER_OF_KIND, occupierOfPropertyRole.getId())); - creates.add(new DbCreateOperation(personParticipant, HQDM.TEMPORAL_PART_OF, personState.getIri())); - creates.add(new DbCreateOperation(personParticipant, HQDM.BEGINNING, beginning.getIri())); - creates.add(new DbCreateOperation(personParticipant, HQDM.ENDING, ending.getIri())); - - creates.add(new DbCreateOperation(houseParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getId())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.TEMPORAL_PART_OF, houseState.getIri())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.BEGINNING, beginning.getIri())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.ENDING, ending.getIri())); - - creates.add(new DbCreateOperation(houseOccupiedAssociation, RDFS.RDF_TYPE, HQDM.ASSOCIATION.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getId())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, houseParticipant.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, personParticipant.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.BEGINNING, beginning.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.ENDING, ending.getIri())); - } - - /** - * Add occupancy predicates. - * - * @param db {@link MagmaCoreDatabase} - * @return {@link MagmaCoreDatabase} - */ - private static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { - // Use an existing PossibleWorld - final PossibleWorld possibleWorld = findByEntityName(db, "Example1_World"); - - // The person occupies the house twice at different times. - final Person person = findByEntityName(db, "PersonB1_Bob"); - final FunctionalSystem house = findByEntityName(db, "HouseB"); - - // Create IRIs for the objects we want to create. - final var e2 = mkUserBaseIri(); - final var e3 = mkUserBaseIri(); - final var e4 = mkUserBaseIri(); - final var e5 = mkUserBaseIri(); - - // Create DbCreateOperations to create the objects and their properties. - final var creates = Set.of( - new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), - new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2020-08-15T17:50:00"), - - new DbCreateOperation(e3, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e3, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), - new DbCreateOperation(e3, HQDM.ENTITY_NAME, "2020-08-15T19:21:00"), - - new DbCreateOperation(e4, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e4, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), - new DbCreateOperation(e4, HQDM.ENTITY_NAME, "2020-08-16T22:33:00"), - - new DbCreateOperation(e5, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e5, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId()), - new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00") - ); - - // Add more DbCreateOperations to create the required associations. - occupyHouse(db, creates, possibleWorld, person, house, e2, e3); - occupyHouse(db, creates, possibleWorld, person, house, e4, e5); - - // Create and return a new change set. - return new DbChangeSet(Set.of(), creates); - } - // A BiFunction to create the RDL private static ComposableBiFunction createRefDataObjects = (t, d) -> { - final var changeSet = createRefDataObjects(); + final var changeSet = ExampleRdl.createRefDataObjects(); t.add(changeSet); return changeSet.apply(d); }; // A BiFunction to add the individuals private static ComposableBiFunction addWholeLifeIndividuals = (t, d) -> { - final var changeSet = addWholeLifeIndividuals(d); + final var changeSet = ExampleIndividuals.addWholeLifeIndividuals(d); t.add(changeSet); return changeSet.apply(d); }; // A BiFunction to create the occupancy associations private static ComposableBiFunction addHouseOccupancies = (t, d) -> { - final var changeSet = addHouseOccupancies(d); + final var changeSet = ExampleAssociations.addHouseOccupancies(d); t.add(changeSet); return changeSet.apply(d); }; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java new file mode 100644 index 00000000..38daf2cd --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -0,0 +1,73 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.Set; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.hqdm.model.KindOfPerson; +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.magmacore.database.DbChangeSet; +import uk.gov.gchq.magmacore.database.DbCreateOperation; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleIndividuals { + + /** + * Create a DbChangeSet that adds the whole life individuals. + * + * @return {@link DbChangeSet} + */ + public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { + + // Find the required classes, kinds, and roles. + final KindOfPerson kindOfPerson = ExampleCommonUtils.findByEntityName(db, "KIND_OF_PERSON"); + final Role personRole = ExampleCommonUtils.findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = + ExampleCommonUtils.findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final Role domesticPropertyRole = + ExampleCommonUtils.findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + + // Create IRIs for the objects we want to create. + final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); + final var e1 = ExampleCommonUtils.mkUserBaseIri(); + final var e2 = ExampleCommonUtils.mkUserBaseIri(); + final var person = ExampleCommonUtils.mkUserBaseIri(); + final var house = ExampleCommonUtils.mkUserBaseIri(); + + // Create DbCreateOperations to create the objects and their properties. + final var creates = Set.of( + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), + + new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e1, HQDM.ENTITY_NAME, "1991-02-18T00:00:00"), + + new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e2, HQDM.ENTITY_NAME, "1972-06-01T00:00:00"), + + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(person, HQDM.ENTITY_NAME, "PersonB1_Bob"), + new DbCreateOperation(person, HQDM.MEMBER_OF_KIND, kindOfPerson.getId()), + new DbCreateOperation(person, HQDM.NATURAL_ROLE, personRole.getId()), + new DbCreateOperation(person, HQDM.BEGINNING, e1.getIri()), + + new DbCreateOperation(house, RDFS.RDF_TYPE, HQDM.FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(house, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(house, HQDM.ENTITY_NAME, "HouseB"), + new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), + new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), + new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) + ); + + // Create a change set and return it. + return new DbChangeSet(Set.of(), creates); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java new file mode 100644 index 00000000..7c66cfbf --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -0,0 +1,138 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.Set; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.magmacore.database.DbChangeSet; +import uk.gov.gchq.magmacore.database.DbCreateOperation; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleRdl { + + /** + * Create a DbChangeSet that adds the RDL. + * + * @return {@link DbChangeSet} + */ + public static DbChangeSet createRefDataObjects() { + + // Create new unique IRIs for all the objects we need to create. + final var viewable = ExampleCommonUtils.mkRefBaseIri(); + final var viewableObject = ExampleCommonUtils.mkRefBaseIri(); + final var viewableAssociation = ExampleCommonUtils.mkRefBaseIri(); + final var kindOfBiologicalSystemHumanComponent = ExampleCommonUtils.mkRefBaseIri(); + final var kindOfPerson = ExampleCommonUtils.mkRefBaseIri(); + final var classOfStateOfPerson = ExampleCommonUtils.mkRefBaseIri(); + final var kindOfFunctionalSystemBuilding = ExampleCommonUtils.mkRefBaseIri(); + final var kindOfFunctionalSystemDomesticPropertyComponent = ExampleCommonUtils.mkRefBaseIri(); + final var kindOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); + final var classOfStateOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); + final var naturalMemberOfSocietyRole = ExampleCommonUtils.mkRefBaseIri(); + final var domesticPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final var domesticOccupantInPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final var occupierOfPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final var occupantInPropertyKindOfAssociation = ExampleCommonUtils.mkRefBaseIri(); + + // Add DbCreateOperations to create the objects and their properties. + final var creates = Set.of( + new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewable, HQDM.ENTITY_NAME, "VIEWABLE"), + + new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewableObject, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewableObject, HQDM.ENTITY_NAME, "VIEWABLE_OBJECT"), + + new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), + new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(viewableAssociation, HQDM.ENTITY_NAME, "VIEWABLE_ASSOCIATION"), + + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.ENTITY_NAME, "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"), + + new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, HQDM.KIND_OF_PERSON.getIri()), + new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfPerson, HQDM.ENTITY_NAME, "KIND_OF_PERSON"), + + new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_PERSON.getIri()), + new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(classOfStateOfPerson, HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"), + + new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + + new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(naturalMemberOfSocietyRole, HQDM.ENTITY_NAME, "NATURAL_MEMBER_OF_SOCIETY_ROLE"), + + new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(domesticPropertyRole, HQDM.ENTITY_NAME, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"), + + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.ENTITY_NAME, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"), + + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(occupierOfPropertyRole, HQDM.ENTITY_NAME, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"), + + new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, HQDM.KIND_OF_ASSOCIATION.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), + + // Create the class hierarchy + new DbCreateOperation(viewableObject, HQDM.HAS_SUPERCLASS, viewable.getIri()), + new DbCreateOperation(viewableObject, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), + + new DbCreateOperation(viewableAssociation, HQDM.HAS_SUPERCLASS, viewable.getIri()), + new DbCreateOperation(viewableAssociation, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), + + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDFS_SUB_CLASS_OF, kindOfFunctionalSystemBuilding.getIri()), + + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDFS_SUB_CLASS_OF, domesticPropertyRole.getIri()), + + new DbCreateOperation(occupierOfPropertyRole, HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()), + new DbCreateOperation(occupierOfPropertyRole, RDFS.RDFS_SUB_CLASS_OF, classOfStateOfPerson.getIri()), + + + // Set class memberships + new DbCreateOperation(kindOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(classOfStateOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, viewableAssociation.getIri()), + + // Set the has component by class predicates + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfPerson.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticProperty.getIri()), + + // Set the consists of by class predicates + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), + new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()) + ); + + // Put the operations in a change set and return it. + return new DbChangeSet(Set.of(), creates); + } +} From cd8a5de1c51285ab26445a274d62b17007d9235b Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 12 Jun 2022 09:58:48 +0100 Subject: [PATCH 36/91] ExampleDataObjects now uses MagmaCoreService instead of MagmaCoreDatabase. --- src/main/java/module-info.java | 3 + .../magmacore/demo/ExampleAssociations.java | 33 ++++----- .../magmacore/demo/ExampleCommonUtils.java | 21 ------ .../magmacore/demo/ExampleDataObjects.java | 26 +++---- .../magmacore/demo/ExampleIndividuals.java | 16 ++--- .../gov/gchq/magmacore/demo/ExampleRdl.java | 4 +- .../gchq/magmacore/demo/FusekiService.java | 3 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 3 +- .../magmacore/demo/ObjectDatabaseDemo.java | 3 +- .../demo/RemoteSparqlDatabaseDemo.java | 3 +- .../{database => service}/DbChangeSet.java | 14 ++-- .../DbCreateOperation.java | 14 ++-- .../DbDeleteOperation.java | 16 ++--- .../DbTransformation.java | 12 ++-- .../magmacore/service/MagmaCoreService.java | 72 +++++++++++++++++++ .../magmacore/database/DbChangeSetTest.java | 11 +-- .../magmacore/database/DbOperationTest.java | 37 +++++----- .../database/DbTransformationTest.java | 14 ++-- 18 files changed, 187 insertions(+), 118 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/{database => service}/DbChangeSet.java (74%) rename src/main/java/uk/gov/gchq/magmacore/{database => service}/DbCreateOperation.java (85%) rename src/main/java/uk/gov/gchq/magmacore/{database => service}/DbDeleteOperation.java (75%) rename src/main/java/uk/gov/gchq/magmacore/{database => service}/DbTransformation.java (82%) create mode 100644 src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index f09a2210..3a98e6eb 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -9,4 +9,7 @@ requires org.apache.jena.rdfconnection; requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; + + exports uk.gov.gchq.magmacore.service; + exports uk.gov.gchq.magmacore.exception; } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 3b2c71f4..f46cdb1d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -14,9 +14,10 @@ import uk.gov.gchq.hqdm.model.Person; import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.magmacore.database.DbChangeSet; -import uk.gov.gchq.magmacore.database.DbCreateOperation; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Functions for creating systems using MagmaCore and HQDM. @@ -27,7 +28,7 @@ public class ExampleAssociations { /** * Create a person-occupies-house association. * - * @param db a {@link MagmaCoreDatabase} + * @param mcService a {@link MagmaCoreDatabase} * @param creates {@link Set} of {@link DbCreateOperation} * @param possibleWorld a {@link PossibleWorld} * @param person the {@link Person} occupying the house. @@ -36,7 +37,7 @@ public class ExampleAssociations { * @param ending {@link Event} */ private static void occupyHouse( - final MagmaCoreDatabase db, + final MagmaCoreService mcService, final Set creates, final PossibleWorld possibleWorld, final Person person, @@ -45,13 +46,13 @@ private static void occupyHouse( final IRI ending) { // Find the required classes, kinds, and roles. - final ClassOfStateOfPerson classOfStateOfPerson = ExampleCommonUtils.findByEntityName(db, "CLASS_OF_STATE_OF_PERSON"); + final ClassOfStateOfPerson classOfStateOfPerson = mcService.findByEntityName("CLASS_OF_STATE_OF_PERSON"); final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - ExampleCommonUtils.findByEntityName(db, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final Role occupierOfPropertyRole = ExampleCommonUtils.findByEntityName(db, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - final Role domesticOccupantInPropertyRole = ExampleCommonUtils.findByEntityName(db, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + mcService.findByEntityName("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final Role occupierOfPropertyRole = mcService.findByEntityName("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final Role domesticOccupantInPropertyRole = mcService.findByEntityName("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); final KindOfAssociation occupantInPropertyKindOfAssociation = - ExampleCommonUtils.findByEntityName(db, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + mcService.findByEntityName("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // Create DbCreateOperations to create the objects and their properties. final var personState = ExampleCommonUtils.mkUserBaseIri(); @@ -101,16 +102,16 @@ private static void occupyHouse( /** * Add occupancy predicates. * - * @param db {@link MagmaCoreDatabase} + * @param mcService {@link MagmaCoreDatabase} * @return {@link MagmaCoreDatabase} */ - public static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { + public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) { // Use an existing PossibleWorld - final PossibleWorld possibleWorld = ExampleCommonUtils.findByEntityName(db, "Example1_World"); + final PossibleWorld possibleWorld = mcService.findByEntityName("Example1_World"); // The person occupies the house twice at different times. - final Person person = ExampleCommonUtils.findByEntityName(db, "PersonB1_Bob"); - final FunctionalSystem house = ExampleCommonUtils.findByEntityName(db, "HouseB"); + final Person person = mcService.findByEntityName("PersonB1_Bob"); + final FunctionalSystem house = mcService.findByEntityName("HouseB"); // Create IRIs for the objects we want to create. final var e2 = ExampleCommonUtils.mkUserBaseIri(); @@ -137,8 +138,8 @@ public static DbChangeSet addHouseOccupancies(final MagmaCoreDatabase db) { creates.add(new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00")); // Add more DbCreateOperations to create the required associations. - occupyHouse(db, creates, possibleWorld, person, house, e2, e3); - occupyHouse(db, creates, possibleWorld, person, house, e4, e5); + occupyHouse(mcService, creates, possibleWorld, person, house, e2, e3); + occupyHouse(mcService, creates, possibleWorld, person, house, e4, e5); // Create and return a new change set. return new DbChangeSet(Set.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index b550de8d..6c15e2ae 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -2,11 +2,8 @@ import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; -import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.iri.IriBase; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** * Functions for creating systems using MagmaCore and HQDM. @@ -40,22 +37,4 @@ public static IRI mkRefBaseIri() { return new IRI(REF_BASE, uid()); } - /** - * Find an object by its ENTITY_NAME. - * - * @param db the {@link MagmaCoreDatabase} to seaerch. - * @param name the name {@link String} to seaerch for. - * @return the {@link Thing}that was found. - * @throws RuntimeException if no or multiple results found. - */ - public static T findByEntityName(final MagmaCoreDatabase db, final String name) { - final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); - if (searchResult.size() == 1) { - return (T) searchResult.get(0); - } else if (searchResult.isEmpty()) { - throw new RuntimeException("No entity found with name: " + name); - } else { - throw new RuntimeException("Multiple entities found with name: " + name); - } - } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index a1150962..578586fb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -1,7 +1,7 @@ package uk.gov.gchq.magmacore.demo; -import uk.gov.gchq.magmacore.database.DbTransformation; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.service.DbTransformation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.util.ComposableBiFunction; /** @@ -11,33 +11,33 @@ public class ExampleDataObjects { // A BiFunction to create the RDL - private static ComposableBiFunction createRefDataObjects = (t, d) -> { + private static ComposableBiFunction createRefDataObjects = (t, s) -> { final var changeSet = ExampleRdl.createRefDataObjects(); t.add(changeSet); - return changeSet.apply(d); + return changeSet.apply(s); }; // A BiFunction to add the individuals - private static ComposableBiFunction addWholeLifeIndividuals = (t, d) -> { - final var changeSet = ExampleIndividuals.addWholeLifeIndividuals(d); + private static ComposableBiFunction addWholeLifeIndividuals = (t, s) -> { + final var changeSet = ExampleIndividuals.addWholeLifeIndividuals(s); t.add(changeSet); - return changeSet.apply(d); + return changeSet.apply(s); }; // A BiFunction to create the occupancy associations - private static ComposableBiFunction addHouseOccupancies = (t, d) -> { - final var changeSet = ExampleAssociations.addHouseOccupancies(d); + private static ComposableBiFunction addHouseOccupancies = (t, s) -> { + final var changeSet = ExampleAssociations.addHouseOccupancies(s); t.add(changeSet); - return changeSet.apply(d); + return changeSet.apply(s); }; /** * A function that populates a database. * - * @param db a {@link MagmaCoreDatabase} + * @param mcService a {@link MagmaCoreService} * @return {@link DbTransformation} */ - public static DbTransformation populateExampleData(final MagmaCoreDatabase db) { + public static DbTransformation populateExampleData(final MagmaCoreService mcService) { // Apply the transformation to the database. There are dependencies between these change sets // since they both depend on RDL being present, but also the occupancies depend on the @@ -52,7 +52,7 @@ public static DbTransformation populateExampleData(final MagmaCoreDatabase db) { final var result = new DbTransformation(); // Apply the transform to the database - transform.apply(result, db); + transform.apply(result, mcService); // Return the DbTransformation that took place. return result; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 38daf2cd..4f0f418d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -7,9 +7,9 @@ import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.magmacore.database.DbChangeSet; -import uk.gov.gchq.magmacore.database.DbCreateOperation; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Functions for creating systems using MagmaCore and HQDM. @@ -22,15 +22,15 @@ public class ExampleIndividuals { * * @return {@link DbChangeSet} */ - public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreDatabase db) { + public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { // Find the required classes, kinds, and roles. - final KindOfPerson kindOfPerson = ExampleCommonUtils.findByEntityName(db, "KIND_OF_PERSON"); - final Role personRole = ExampleCommonUtils.findByEntityName(db, "NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final KindOfPerson kindOfPerson = mcService.findByEntityName("KIND_OF_PERSON"); + final Role personRole = mcService.findByEntityName("NATURAL_MEMBER_OF_SOCIETY_ROLE"); final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - ExampleCommonUtils.findByEntityName(db, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + mcService.findByEntityName("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final Role domesticPropertyRole = - ExampleCommonUtils.findByEntityName(db, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + mcService.findByEntityName("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // Create IRIs for the objects we want to create. final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index 7c66cfbf..89317430 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -4,8 +4,8 @@ import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.RDFS; -import uk.gov.gchq.magmacore.database.DbChangeSet; -import uk.gov.gchq.magmacore.database.DbCreateOperation; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java index 3ef1ca6e..d7e9ac64 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java @@ -18,6 +18,7 @@ import org.apache.jena.fuseki.system.FusekiLogging; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Example use-case scenario for hosting {@link MagmaCoreJenaDatabase} on a Fuseki server. @@ -50,7 +51,7 @@ public void run(final boolean populate) { tdb.begin(); if (tdb.getDataset().isEmpty() && populate) { // Build example data objects Dataset. - ExampleDataObjects.populateExampleData(tdb); + ExampleDataObjects.populateExampleData(new MagmaCoreService(tdb)); tdb.commit(); } else { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 5751cca0..7da9d68b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -22,6 +22,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Example use-case scenario for {@link MagmaCoreJenaDatabase}. @@ -56,7 +57,7 @@ public void run() { // Add example data objects to dataset. jenaDatabase.begin(); - ExampleDataObjects.populateExampleData(jenaDatabase); + ExampleDataObjects.populateExampleData(new MagmaCoreService(jenaDatabase)); jenaDatabase.commit(); // Query database to check its populated. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java index 3f91f18a..079887fa 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java @@ -20,6 +20,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Example use-case scenario for {@link MagmaCoreObjectDatabase}. @@ -43,7 +44,7 @@ public void run() { final MagmaCoreObjectDatabase objectDatabase = new MagmaCoreObjectDatabase(); // Add example data objects to dataset. - ExampleDataObjects.populateExampleData(objectDatabase); + ExampleDataObjects.populateExampleData(new MagmaCoreService(objectDatabase)); // Query database to check it's populated. final List queryResults = diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index 166a3db9..0ec746af 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -16,6 +16,7 @@ import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote service. @@ -36,7 +37,7 @@ public void run(final boolean populate) { if (populate) { db = new MagmaCoreRemoteSparqlDatabase(url); - ExampleDataObjects.populateExampleData(db); + ExampleDataObjects.populateExampleData(new MagmaCoreService(db)); } else { db = new MagmaCoreRemoteSparqlDatabase(url); } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java similarity index 74% rename from src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java rename to src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index e219153b..0a329648 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import java.util.Set; import java.util.function.Function; @@ -8,7 +8,7 @@ * Class representing an invertible set of deletes and creates. * * */ -public class DbChangeSet implements Function { +public class DbChangeSet implements Function { private Set deletes; private Set creates; @@ -24,24 +24,24 @@ public DbChangeSet(final Set deletes, final Set (Function) x) + .map(x -> (Function) x) .reduce(Function::andThen) .orElse(Function.identity()); final var createFunction = creates .stream() - .map(x -> (Function) x) + .map(x -> (Function) x) .reduce(Function::andThen) .orElse(Function.identity()); - return deleteFunction.andThen(createFunction).apply(db); + return deleteFunction.andThen(createFunction).apply(mcService); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java similarity index 85% rename from src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java rename to src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index 9f5330dd..cd8c5458 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import java.util.function.Function; @@ -12,7 +12,7 @@ * Class representing an invertible operation to create a predicate. * * */ -public class DbCreateOperation implements Function { +public class DbCreateOperation implements Function { // The IRI of the Thing we're referring to. private IRI subject; @@ -41,10 +41,10 @@ public DbCreateOperation(final IRI subject, final IRI predicate, final String ob * * */ @Override - public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + public MagmaCoreService apply(final MagmaCoreService mcService) { Thing thing = null; try { - thing = db.get(subject); + thing = mcService.get(subject); } catch (final HqdmException e) { // The object does not exist. } @@ -52,11 +52,11 @@ public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { if (thing == null) { final var newThing = SpatioTemporalExtentServices.createSpatioTemporalExtent(subject.getIri()); newThing.addStringValue(predicate.getIri(), object); - db.create(newThing); + mcService.create(newThing); } else { if (!thing.hasThisValue(predicate.getIri(), object)) { thing.addValue(predicate.getIri(), object); - db.update(thing); + mcService.update(thing); } else { throw new DbTransformationException( String.format("Triple already exists: %s, %s, %s", subject, predicate, object) @@ -64,7 +64,7 @@ public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { } } - return db; + return mcService; } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java similarity index 75% rename from src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java rename to src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java index 954e61ff..723a88d8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import java.util.function.Function; @@ -9,7 +9,7 @@ * Class representing an invertible operation to delete a predicate. * * */ -public class DbDeleteOperation implements Function { +public class DbDeleteOperation implements Function { private IRI subject; private IRI predicate; private String object; @@ -28,17 +28,17 @@ public DbDeleteOperation(final IRI subject, final IRI predicate, final String ob } /** - * Apply the operation to a {@link MagmaCoreDatabase}. + * Apply the operation to a {@link MagmaCoreService}. * - * @param db {@link MagmaCoreDatabase} + * @param mcService {@link MagmaCoreService} * */ - public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { - final var thing = db.get(subject); + public MagmaCoreService apply(final MagmaCoreService mcService) { + final var thing = mcService.get(subject); if (thing != null && thing.hasThisValue(predicate.getIri(), object)) { thing.removeValue(predicate.getIri(), object); - db.update(thing); - return db; + mcService.update(thing); + return mcService; } throw new DbTransformationException( diff --git a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java similarity index 82% rename from src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java rename to src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java index 2f02549e..73ee160a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import java.util.Collections; import java.util.LinkedList; @@ -10,7 +10,7 @@ * Class representing an invertible ordered sequence of change sets. * * */ -public class DbTransformation implements Function { +public class DbTransformation implements Function { private List transformations; /** @@ -31,18 +31,18 @@ public DbTransformation() { } /** - * Apply this {@link DbTransformation} to a {@link MagmaCoreDatabase}. + * Apply this {@link DbTransformation} to a {@link MagmaCoreService}. * * */ @Override - public MagmaCoreDatabase apply(final MagmaCoreDatabase db) { + public MagmaCoreService apply(final MagmaCoreService mcService) { final var transformation = transformations .stream() - .map(x -> (Function) x) + .map(x -> (Function) x) .reduce(Function::andThen) .orElse(Function.identity()); - return transformation.apply(db); + return transformation.apply(mcService); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java new file mode 100644 index 00000000..59c8659f --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -0,0 +1,72 @@ +package uk.gov.gchq.magmacore.service; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; + +/** + * Services exported by the MagmaCore module. + * + * */ +public class MagmaCoreService { + + // The service operates on a database. + private final MagmaCoreDatabase db; + + /** + * Constructor that requires a {@link MagmaCoreDatabase}. + * + * @param db {@link MagmaCoreDatabase} + */ + public MagmaCoreService(final MagmaCoreDatabase db) { + this.db = db; + } + + /** + * Find an object by its ENTITY_NAME. + * + * @param name the name {@link String} to seaerch for. + * @return the {@link Thing}that was found. + * @throws RuntimeException if no or multiple results found. + */ + public T findByEntityName(final String name) { + final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + if (searchResult.size() == 1) { + return (T) searchResult.get(0); + } else if (searchResult.isEmpty()) { + throw new RuntimeException("No entity found with name: " + name); + } else { + throw new RuntimeException("Multiple entities found with name: " + name); + } + } + + /** + * Create a new Thing. + * + * @param thing {@link Thing} + */ + public void create(final Thing thing) { + db.create(thing); + } + + /** + * Update an existing {@link Thing}. + * + * @param thing {@link Thing} + */ + public void update(final Thing thing) { + db.update(thing); + } + + /** + * Get a {@link Thing} with the given {@link IRI}. + * + * @param iri {@link IRI} + * @return {@link Thing} + */ + public Thing get(final IRI iri) { + return db.get(iri); + } + +} diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java index 2aee7f61..78263003 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java @@ -9,6 +9,9 @@ import org.junit.Test; import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Check that {@link DbChangeSet} works correctly. @@ -31,13 +34,13 @@ public void testApplyAndInvert() { )); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operations. - changes.apply(db); + changes.apply(mcService); // Find the thing we just created and assert values are present. - final var thing = db.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); assertNotNull(thing); assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); @@ -45,7 +48,7 @@ public void testApplyAndInvert() { assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); // Invert the operations, apply them in reverse order and assert they are no longer present. - DbChangeSet.invert(changes).apply(db); + DbChangeSet.invert(changes).apply(mcService); assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java index 3931b22b..dea8326c 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java @@ -8,6 +8,9 @@ import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.DbDeleteOperation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. @@ -26,19 +29,19 @@ public void testSingleCreateAndDelete() { final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operation. - op.apply(db); + op.apply(mcService); // Find the thing we just created and assert it's presence. - final var thing = db.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); assertNotNull(thing); assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); // Invert the operation and assert that it is no longer present. - DbCreateOperation.invert(op).apply(db); + DbCreateOperation.invert(op).apply(mcService); assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); } @@ -56,15 +59,15 @@ public void testMultipleCreateAndDelete() { final var op3 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operations. - op1.apply(db); - op2.apply(db); - op3.apply(db); + op1.apply(mcService); + op2.apply(mcService); + op3.apply(mcService); // Find the thing we just created and assert values are present. - final var thing = db.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); assertNotNull(thing); assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); @@ -72,9 +75,9 @@ public void testMultipleCreateAndDelete() { assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); // Invert the operations, apply them in reverse order and assert they are no longer present. - DbCreateOperation.invert(op3).apply(db); - DbCreateOperation.invert(op2).apply(db); - DbCreateOperation.invert(op1).apply(db); + DbCreateOperation.invert(op3).apply(mcService); + DbCreateOperation.invert(op2).apply(mcService); + DbCreateOperation.invert(op1).apply(mcService); assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); @@ -92,11 +95,11 @@ public void testCreateWhenAlreadyPresent() { final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operation twice, the second should throw an exception. - op.apply(db); - op.apply(db); + op.apply(mcService); + op.apply(mcService); } /** @@ -110,9 +113,9 @@ public void testDeleteWhenNotPresent() { final var op = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operation, it should throw an exception. - op.apply(db); + op.apply(mcService); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java index 0b2e33c1..5f02d78e 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java @@ -10,6 +10,10 @@ import org.junit.Test; import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.DbTransformation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Check that {@link DbTransformation} works correctly. @@ -43,20 +47,20 @@ public void testApplyAndInvert() { )); // Create a database to be updated. - final var db = new MagmaCoreObjectDatabase(); + final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); // Apply the operations. - transformation.apply(db); + transformation.apply(mcService); // Find the thing we just created and assert values are present. - final var thing1 = db.get(HQDM.ABSTRACT_OBJECT); + final var thing1 = mcService.get(HQDM.ABSTRACT_OBJECT); assertNotNull(thing1); assertTrue(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); assertTrue(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); assertTrue(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); - final var thing2 = db.get(HQDM.PERSON); + final var thing2 = mcService.get(HQDM.PERSON); assertNotNull(thing2); assertTrue(thing2.hasThisValue(HQDM.ENTITY_NAME.getIri(), "Trillian")); @@ -64,7 +68,7 @@ public void testApplyAndInvert() { assertTrue(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); // Invert the operations, apply them in reverse order and assert they are no longer present. - transformation.invert().apply(db); + transformation.invert().apply(mcService); assertFalse(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); assertFalse(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); From e32f51531587745d926e9f8d8c3a167ecd91727b Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 12 Jun 2022 14:23:27 +0100 Subject: [PATCH 37/91] Add MagmaCoreServiceFactory so that MagmaCoreDatabase doesn't need to be exorted from the module. --- src/main/java/module-info.java | 2 +- .../gchq/magmacore/demo/FusekiService.java | 4 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 35 ++--------- .../magmacore/demo/ObjectDatabaseDemo.java | 11 ++-- .../demo/RemoteSparqlDatabaseDemo.java | 14 ++--- .../magmacore/service/MagmaCoreService.java | 2 +- .../service/MagmaCoreServiceFactory.java | 62 +++++++++++++++++++ .../magmacore/database/DbChangeSetTest.java | 4 +- .../magmacore/database/DbOperationTest.java | 10 +-- .../database/DbTransformationTest.java | 4 +- 10 files changed, 89 insertions(+), 59 deletions(-) create mode 100644 src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 3a98e6eb..8496d49b 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,7 +1,7 @@ module MagmaCore.service.main { requires HQDM.model.main; - requires HQDM.rdf.main; + requires transitive HQDM.rdf.main; requires org.apache.jena.arq; requires org.apache.jena.core; requires org.apache.jena.fuseki.main; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java index d7e9ac64..c3bfce61 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java @@ -18,7 +18,7 @@ import org.apache.jena.fuseki.system.FusekiLogging; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Example use-case scenario for hosting {@link MagmaCoreJenaDatabase} on a Fuseki server. @@ -51,7 +51,7 @@ public void run(final boolean populate) { tdb.begin(); if (tdb.getDataset().isEmpty() && populate) { // Build example data objects Dataset. - ExampleDataObjects.populateExampleData(new MagmaCoreService(tdb)); + ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); tdb.commit(); } else { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 7da9d68b..875190af 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -14,15 +14,8 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; -import static uk.gov.gchq.hqdm.iri.HQDM.HQDM; -import static uk.gov.gchq.hqdm.iri.RDFS.RDFS; - -import java.util.List; - import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Example use-case scenario for {@link MagmaCoreJenaDatabase}. @@ -32,14 +25,8 @@ * {@link ExampleDataObjects} as RDF triples. *

*

- * The Jena dataset is transactional, so {@link MagmaCoreJenaDatabase#begin()} must be called before - * any operations can be performed on the dataset, including queries. Once complete, - * {@link MagmaCoreJenaDatabase#commit()} or {@link MagmaCoreJenaDatabase#abort()} should be called - * to finish a transaction. - *

- *

* {@code PersonB1_Bob} can be queried for using the - * {@link MagmaCoreJenaDatabase#findByPredicateIriAndStringValue(uk.gov.gchq.hqdm.iri.IRI, String)} + * {@link MagmaCoreJenaDatabase#findByEntityName(String)} * method. The resulting object(s) of this query are output to the command-line as RDF triples. *

* @@ -51,27 +38,17 @@ public final class JenaDatabaseDemo { */ public void run() { // Instantiate new in-memory Jena database. - final MagmaCoreJenaDatabase jenaDatabase = new MagmaCoreJenaDatabase(); - jenaDatabase.register(HQDM); - jenaDatabase.register(RDFS); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Add example data objects to dataset. - jenaDatabase.begin(); - ExampleDataObjects.populateExampleData(new MagmaCoreService(jenaDatabase)); - jenaDatabase.commit(); + ExampleDataObjects.populateExampleData(mcService); // Query database to check its populated. - jenaDatabase.begin(); - final List queryResults = - jenaDatabase.findByPredicateIriAndStringValue(ENTITY_NAME, "PersonB1_Bob"); - jenaDatabase.abort(); + final Thing queryResults = mcService.findByEntityName("PersonB1_Bob"); // Output results of query to console. - queryResults.forEach(object -> System.out.println(object.toString())); + System.out.println(queryResults); - jenaDatabase.begin(); - jenaDatabase.drop(); - jenaDatabase.commit(); System.out.println("\n--- Jena Example End ---"); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java index 079887fa..10e375a7 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.hqdm.iri.HQDM.ENTITY_NAME; - import java.util.List; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Example use-case scenario for {@link MagmaCoreObjectDatabase}. @@ -41,14 +39,13 @@ public final class ObjectDatabaseDemo { * Run the in-memory Object Database example. */ public void run() { - final MagmaCoreObjectDatabase objectDatabase = new MagmaCoreObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Add example data objects to dataset. - ExampleDataObjects.populateExampleData(new MagmaCoreService(objectDatabase)); + ExampleDataObjects.populateExampleData(mcService); // Query database to check it's populated. - final List queryResults = - objectDatabase.findByPredicateIriAndStringValue(ENTITY_NAME, "PersonB1_Bob"); + final List queryResults = mcService.findByEntityName("PersonB1_Bob"); // Output results of query to console. queryResults.forEach(object -> System.out.println(object.toString())); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index 0ec746af..b23ac855 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -14,9 +14,8 @@ package uk.gov.gchq.magmacore.demo; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote service. @@ -33,16 +32,11 @@ public RemoteSparqlDatabaseDemo(final String url) { * Run the demo. */ public void run(final boolean populate) { - final MagmaCoreDatabase db; + final var mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); if (populate) { - db = new MagmaCoreRemoteSparqlDatabase(url); - ExampleDataObjects.populateExampleData(new MagmaCoreService(db)); - } else { - db = new MagmaCoreRemoteSparqlDatabase(url); - } - - db.dump(System.out); + ExampleDataObjects.populateExampleData(mcService); + } } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 59c8659f..d4890e9d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -19,7 +19,7 @@ public class MagmaCoreService { * * @param db {@link MagmaCoreDatabase} */ - public MagmaCoreService(final MagmaCoreDatabase db) { + MagmaCoreService(final MagmaCoreDatabase db) { this.db = db; } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java new file mode 100644 index 00000000..bc1cb3db --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -0,0 +1,62 @@ +package uk.gov.gchq.magmacore.service; + +import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; +import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; + +/** + * Factory for creating MagmaCoreService instances. This + * removes the need to expose MagmaCoreDatabase interface to + * clients of the library. + * + * */ +public class MagmaCoreServiceFactory { + + /** + * Create an in-memory object database. + * + * @return {@link MagmaCoreService} + * */ + public static MagmaCoreService createWithObjectDatabase() { + return new MagmaCoreService(new MagmaCoreObjectDatabase()); + } + + /** + * Create a Jena database. + * + * @return {@link MagmaCoreService} + */ + public static MagmaCoreService createWithJenaDatabase() { + return new MagmaCoreService(new MagmaCoreJenaDatabase()); + } + + /** + * Create a Jena database. + * + * @param name a database name String + * @return {@link MagmaCoreService} + */ + public static MagmaCoreService createWithJenaDatabase(final String name) { + return new MagmaCoreService(new MagmaCoreJenaDatabase(name)); + } + + /** + * Create a Jena database. + * + * @param db a {@link MagmaCoreJenaDatabase} + * @return {@link MagmaCoreService} + */ + public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase db) { + return new MagmaCoreService(db); + } + + /** + * Attach to a remote SPARQL Endpoint. + * + * @param url the url {@link String} + * @return {@link MagmaCoreService} + */ + public static MagmaCoreService attachRemoteSparqlEndpoint(final String url) { + return new MagmaCoreService(new MagmaCoreRemoteSparqlDatabase(url)); + } +} diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java index 78263003..2ad298af 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java @@ -11,7 +11,7 @@ import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbChangeSet} works correctly. @@ -34,7 +34,7 @@ public void testApplyAndInvert() { )); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operations. changes.apply(mcService); diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java index dea8326c..9dece03c 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java @@ -10,7 +10,7 @@ import uk.gov.gchq.magmacore.exception.DbTransformationException; import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.DbDeleteOperation; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. @@ -29,7 +29,7 @@ public void testSingleCreateAndDelete() { final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operation. op.apply(mcService); @@ -59,7 +59,7 @@ public void testMultipleCreateAndDelete() { final var op3 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operations. op1.apply(mcService); @@ -95,7 +95,7 @@ public void testCreateWhenAlreadyPresent() { final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operation twice, the second should throw an exception. op.apply(mcService); @@ -113,7 +113,7 @@ public void testDeleteWhenNotPresent() { final var op = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operation, it should throw an exception. op.apply(mcService); diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java index 5f02d78e..a373215e 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java @@ -13,7 +13,7 @@ import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.DbTransformation; -import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbTransformation} works correctly. @@ -47,7 +47,7 @@ public void testApplyAndInvert() { )); // Create a database to be updated. - final var mcService = new MagmaCoreService(new MagmaCoreObjectDatabase()); + final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); // Apply the operations. transformation.apply(mcService); From dbda460be65043f6d54f0aab0dbba9db386bc016 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 12 Jun 2022 14:53:33 +0100 Subject: [PATCH 38/91] Don't use ComposableBiFunction - it's overkill. --- .../magmacore/demo/ExampleDataObjects.java | 54 ++++++++----------- .../magmacore/util/ComposableBiFunction.java | 37 ------------- 2 files changed, 22 insertions(+), 69 deletions(-) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 578586fb..c6a79a96 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -1,8 +1,9 @@ package uk.gov.gchq.magmacore.demo; +import java.util.List; + import uk.gov.gchq.magmacore.service.DbTransformation; import uk.gov.gchq.magmacore.service.MagmaCoreService; -import uk.gov.gchq.magmacore.util.ComposableBiFunction; /** * Functions for creating systems using MagmaCore and HQDM. @@ -10,27 +11,6 @@ * */ public class ExampleDataObjects { - // A BiFunction to create the RDL - private static ComposableBiFunction createRefDataObjects = (t, s) -> { - final var changeSet = ExampleRdl.createRefDataObjects(); - t.add(changeSet); - return changeSet.apply(s); - }; - - // A BiFunction to add the individuals - private static ComposableBiFunction addWholeLifeIndividuals = (t, s) -> { - final var changeSet = ExampleIndividuals.addWholeLifeIndividuals(s); - t.add(changeSet); - return changeSet.apply(s); - }; - - // A BiFunction to create the occupancy associations - private static ComposableBiFunction addHouseOccupancies = (t, s) -> { - final var changeSet = ExampleAssociations.addHouseOccupancies(s); - t.add(changeSet); - return changeSet.apply(s); - }; - /** * A function that populates a database. * @@ -39,23 +19,33 @@ public class ExampleDataObjects { */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { + // svc is updated by each DbChangeSet and used to create the next DbChangeSet since + // they are sequentially dependent. + var svc = mcService; + // Apply the transformation to the database. There are dependencies between these change sets // since they both depend on RDL being present, but also the occupancies depend on the // individuals being present, so each change set needs to be applied before the next one // can be created. - final var transform = - createRefDataObjects - .andThen(addWholeLifeIndividuals) - .andThen(addHouseOccupancies); + final var rdlChangeSet = ExampleRdl.createRefDataObjects(); + + // Apply the DbChangeSet + svc = rdlChangeSet.apply(svc); + + // svc now contains the RDL needed for the next DbChangeSet + final var individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(svc); + + // Apply the DbChangeSet + svc = individualsChangeSet.apply(svc); - // This will be updated to record the transformation that took place. - final var result = new DbTransformation(); + // svc now contains the individuals needed for creating the next DbChangeSet + final var occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(svc); - // Apply the transform to the database - transform.apply(result, mcService); + // Apply the DbChangeSet + svc = occupanciesChangeSet.apply(svc); - // Return the DbTransformation that took place. - return result; + // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. + return new DbTransformation(List.of(rdlChangeSet, individualsChangeSet, occupanciesChangeSet)); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java b/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java deleted file mode 100644 index b7e92bc2..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/util/ComposableBiFunction.java +++ /dev/null @@ -1,37 +0,0 @@ -package uk.gov.gchq.magmacore.util; - -import java.util.function.BiFunction; - -/** - * Utility functions to combing BiFunctions for use with an environment parameter. - * A pattern for composing BiFinctions. - * - * @author Tony Walmsley, AOSD Ltd. - */ -public interface ComposableBiFunction extends BiFunction { - - /** - * Combines two ComposableBiFunction by treating the first parameter to both functions as an `environment` that - * needs to be available to both ComposableBiFunction. The return type of the first BiFunction must match the - * second parameter type of the second ComposableBiFunction. - * - * @param first a ComposableBiFunction - executed before this - * @return a combination of the two ComposableBiFunction that implements `this(env, first(env, p1))` - */ - default ComposableBiFunction compose(final ComposableBiFunction first) { - return (e, t) -> this.apply(e, first.apply(e, t)); - } - - /** - * Combines two ComposableBiFunction by treating the first parameter to both functions as an `environment` that - * needs to be available to both ComposableBiFunction. The return type of the first ComposableBiFunction must - * match the second parameter type of the second ComposableBiFunction. - * - * @param second a ComposableBiFunction - executed after this - * @return a combination of the two ComposableBiFunction that implements `second(env, this(env, p1))` - */ - default ComposableBiFunction andThen(final ComposableBiFunction second) { - return (e, t) -> second.apply(e, this.apply(e, t)); - } - -} From 37c6852359ad35cc8981797ae9b7523da484399a Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 12 Jun 2022 15:02:08 +0100 Subject: [PATCH 39/91] Code tidy --- .../magmacore/demo/ExampleDataObjects.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index c6a79a96..d73609ad 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -19,10 +19,6 @@ public class ExampleDataObjects { */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - // svc is updated by each DbChangeSet and used to create the next DbChangeSet since - // they are sequentially dependent. - var svc = mcService; - // Apply the transformation to the database. There are dependencies between these change sets // since they both depend on RDL being present, but also the occupancies depend on the // individuals being present, so each change set needs to be applied before the next one @@ -30,19 +26,19 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ final var rdlChangeSet = ExampleRdl.createRefDataObjects(); // Apply the DbChangeSet - svc = rdlChangeSet.apply(svc); + rdlChangeSet.apply(mcService); - // svc now contains the RDL needed for the next DbChangeSet - final var individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(svc); + // mcService now contains the RDL needed for the next DbChangeSet + final var individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(mcService); // Apply the DbChangeSet - svc = individualsChangeSet.apply(svc); + individualsChangeSet.apply(mcService); - // svc now contains the individuals needed for creating the next DbChangeSet - final var occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(svc); + // mcService now contains the individuals needed for creating the next DbChangeSet + final var occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(mcService); // Apply the DbChangeSet - svc = occupanciesChangeSet.apply(svc); + occupanciesChangeSet.apply(mcService); // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. return new DbTransformation(List.of(rdlChangeSet, individualsChangeSet, occupanciesChangeSet)); From 21b5a6cff3f2c447c687ea2d47e3487f499909d2 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 13 Jun 2022 15:24:03 +0100 Subject: [PATCH 40/91] Add hashcode and equals for DbCreateOperation and DbDeleteOperation. --- .../magmacore/service/DbCreateOperation.java | 57 ++++++++++++++++++ .../magmacore/service/DbDeleteOperation.java | 58 +++++++++++++++++++ .../magmacore/database/DbOperationTest.java | 29 ++++++++++ 3 files changed, 144 insertions(+) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index cd8c5458..cc4b1f41 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -77,5 +77,62 @@ public static DbDeleteOperation invert(final DbCreateOperation c) { return new DbDeleteOperation(c.subject, c.predicate, c.object); } + /** + * Calculate a hashcode. + * + * @return int + * */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((object == null) ? 0 : object.hashCode()); + result = prime * result + ((predicate == null) ? 0 : predicate.hashCode()); + result = prime * result + ((subject == null) ? 0 : subject.hashCode()); + return result; + } + + /** + * Check for equality. + * + * @param obj {@link Object} + * @return true if the objects are euqal, false otherwise. + * */ + @Override + public boolean equals(final Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DbCreateOperation other = (DbCreateOperation) obj; + if (object == null) { + if (other.object != null) { + return false; + } + } else if (!object.equals(other.object)) { + return false; + } + if (predicate == null) { + if (other.predicate != null) { + return false; + } + } else if (!predicate.equals(other.predicate)) { + return false; + } + if (subject == null) { + if (other.subject != null) { + return false; + } + } else if (!subject.equals(other.subject)) { + return false; + } + return true; + } + } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java index 723a88d8..61df9991 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java @@ -55,4 +55,62 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { public static DbCreateOperation invert(final DbDeleteOperation d) { return new DbCreateOperation(d.subject, d.predicate, d.object); } + + /** + * Calculate a hashcode. + * + * @return int + * */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((object == null) ? 0 : object.hashCode()); + result = prime * result + ((predicate == null) ? 0 : predicate.hashCode()); + result = prime * result + ((subject == null) ? 0 : subject.hashCode()); + return result; + } + + /** + * Check for equality. + * + * @param obj {@link Object} + * @return true if the objects are euqal, false otherwise. + * */ + @Override + public boolean equals(final Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final DbDeleteOperation other = (DbDeleteOperation) obj; + if (object == null) { + if (other.object != null) { + return false; + } + } else if (!object.equals(other.object)) { + return false; + } + if (predicate == null) { + if (other.predicate != null) { + return false; + } + } else if (!predicate.equals(other.predicate)) { + return false; + } + if (subject == null) { + if (other.subject != null) { + return false; + } + } else if (!subject.equals(other.subject)) { + return false; + } + return true; + } + } diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java index 9dece03c..780349df 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java @@ -1,5 +1,6 @@ package uk.gov.gchq.magmacore.database; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -118,4 +119,32 @@ public void testDeleteWhenNotPresent() { // Apply the operation, it should throw an exception. op.apply(mcService); } + + /** + * Test the equals method for {@link DbCreateOperation}. + * + * */ + @Test + public void testDbCreateEquals() { + + final var op1 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + final var op2 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + + assertTrue(op1.equals(op2)); + assertEquals(op1.hashCode(), op2.hashCode()); + } + + /** + * Test the equals method for {@link DbDeleteOperation}. + * + * */ + @Test + public void testDbDeleteEquals() { + + final var op1 = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + final var op2 = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + + assertTrue(op1.equals(op2)); + assertEquals(op1.hashCode(), op2.hashCode()); + } } From 2ebd6782d8600c9ef02804445b114cade5e06f05 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 14 Jun 2022 08:00:33 +0100 Subject: [PATCH 41/91] Temporarily Broken - Added multi-inherit classes. --- pom.xml | 17 ++ src/main/java/module-info.java | 6 + .../McAssistMultInheritFromDataApp.java | 134 +++++++++ .../generators/GenerateHqdmClass.java | 151 ++++++++++ .../generators/GenerateHqdmInterface.java | 40 +++ .../generators/GeneratorsConfig.java | 23 ++ .../generators/MultipleInheritEntrypoint.java | 129 +++++++++ .../MultipleInheritGenerateFromThing.java | 139 +++++++++ .../gchq/magmacore/util/ClassGenUtils.java | 265 ++++++++++++++++++ 9 files changed, 904 insertions(+) create mode 100644 src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java diff --git a/pom.xml b/pom.xml index 71dccc4a..ed17d184 100644 --- a/pom.xml +++ b/pom.xml @@ -85,6 +85,23 @@ hqdm-rdf 1.0 + + io.vavr + vavr + 0.10.4 + + + + org.projectlombok + lombok + 1.18.24 + provided + + + org.javassist + javassist + 3.28.0-GA + diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 8496d49b..80cca456 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -10,6 +10,12 @@ requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; + requires lombok; + requires javassist; + requires org.apache.logging.log4j; + requires org.apache.commons.lang3; + requires io.vavr; + exports uk.gov.gchq.magmacore.service; exports uk.gov.gchq.magmacore.exception; } diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java new file mode 100644 index 00000000..b1705124 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java @@ -0,0 +1,134 @@ +package uk.gov.gchq.magmacore; + +import static uk.gov.gchq.magmacore.util.ClassGenUtils.drop; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.dumpClass; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.dumpDatabase; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.initJenaDatabase; + +import lombok.NonNull; +import lombok.experimental.UtilityClass; +import lombok.extern.log4j.Log4j2; +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.model.StateOfOrganization; +import uk.gov.gchq.hqdm.model.impl.HqdmObject; +import uk.gov.gchq.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.demo.BasicHqdmInherit; +import uk.gov.gchq.magmacore.generators.MultipleInheritGenerateFromThing; + +/** + * Demonstrate how to create a new class dynamically. + */ +@Log4j2 +@UtilityClass +public class McAssistMultInheritFromDataApp { + + public static final String PARTICIPANT_TYPE_NAME = "PARTICIPANT_TYPE"; + public static final String STATE_OF_ORGANIZATION_TYPE_NAME = "STATE_OF_ORGANIZATION_TYPE"; + public static final String NEW_ENTITY_NAME = "PARTICIPANT_TYPE_AND_STATE_OF_ORGANIZATION"; + public static final String ORG_SUPER_TYPE = "StateOfOrganization"; + public static final String PARTICIPANT_SUPER_TYPE = "Participant"; + public static final String TTL_FILE_NAME = "objectsWithNewTypeIncluded.ttl"; + + private static final Function1 getParticipantType = jenaDatabase -> { + jenaDatabase.begin(); + final var queryResults = + jenaDatabase.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, PARTICIPANT_TYPE_NAME); + jenaDatabase.abort(); + + queryResults.forEach(log::info); + + return (Participant) queryResults.get(0); + }; + + private static final Function1 getStateOfOrgType = + jenaDatabase -> { + jenaDatabase.begin(); + final var queryResults = + jenaDatabase.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, + STATE_OF_ORGANIZATION_TYPE_NAME); + jenaDatabase.abort(); + + queryResults.forEach(log::info); + + return (StateOfOrganization) queryResults.get(0); + }; + + private static Function1 createNewObject( + @NonNull final Class newHqdmClass) { + return jenaDatabase -> { + try { + final var newObj = newHqdmClass + .getDeclaredConstructor(IRI.class) + .newInstance(new IRI(uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE, uid())); + + // Add name and commit to Jena database + final var newTypeObj = (HqdmObject) newObj; + newTypeObj.addStringValue(HQDM.ENTITY_NAME, NEW_ENTITY_NAME); + newTypeObj.addStringValue(HQDM.HAS_SUPERTYPE, ORG_SUPER_TYPE); + newTypeObj.addStringValue(HQDM.HAS_SUPERTYPE, PARTICIPANT_SUPER_TYPE); + + jenaDatabase.begin(); + jenaDatabase.create(newTypeObj); + jenaDatabase.commit(); + return jenaDatabase; + } catch (final Exception e) { + log.error(e); + throw new RuntimeException(e); + } + }; + } + + /** + * Example program for creating classes dynamically. + * + * @param args an array of Strings. + */ + public static void main(final String[] args) { + + log.info( + "Starting the Magma Core Assist app, multiple inheritance new HQDM class generation from HQDM data " + + "objects.\n"); + + final var jenaDatabase = initJenaDatabase(BasicHqdmInherit.createDataObjects()) + .get(); + final var participantType = jenaDatabase.map(getParticipantType) + .getOrElseThrow(RuntimeException::new); + final var stateOfOrganizationType = jenaDatabase.map(getStateOfOrgType) + .getOrElseThrow(RuntimeException::new); + final var newHqdmClass = jenaDatabase.map(createNewType(participantType, stateOfOrganizationType)) + .getOrElseThrow(RuntimeException::new); + + log.info( + "New Java Class Generated for the new Hqdm Type.\nNow create a record of it in the database, " + + "using the new Java Class: " + newHqdmClass.getName()); + + dumpClass(newHqdmClass); + + jenaDatabase + .map(createNewObject(newHqdmClass)) + .map(dumpDatabase(TTL_FILE_NAME)) + .map(drop); + + log.info("Ending the Magma Core Assist app."); + } + + private static Function1> createNewType( + @NonNull final Participant participantType, @NonNull final StateOfOrganization stateOfOrganizationType) { + return jenaDatabase -> { + // Generate Hqdm Objects that specify the multiple inheritance using the **NEW** has_supertype relationship + // Specify a new Thing that has_supertype as the two types that it inherits from + final var dataSpecForNewType = (ThingImpl) new ThingImpl.Builder(new IRI(REF_BASE, uid())) + .has_supertype(participantType) + .has_supertype(stateOfOrganizationType) + .build(); + //Now parse this object to generate the new Java interfaces and Classes + return MultipleInheritGenerateFromThing.generateNewTypeClasses( + dataSpecForNewType, + jenaDatabase); + }; + } + +} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java new file mode 100644 index 00000000..a9d31c8a --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java @@ -0,0 +1,151 @@ +package uk.gov.gchq.magmacore.generators; + +import static io.vavr.API.Option; +import static io.vavr.API.Tuple; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.BUILDER_CLASS_SHORT_NAME; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.BUILDER_METHOD_NAME; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IRI_CLASS; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.addConstructor; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.addMethodWithBody; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.addNestedBuilder; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.setSuperInterface; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.setSuperclass; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.toJavaImplClass; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import io.vavr.Tuple2; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtConstructor; +import javassist.CtField; +import javassist.CtMethod; +import javassist.Modifier; +import lombok.NonNull; +import lombok.SneakyThrows; +import lombok.experimental.UtilityClass; +import lombok.extern.log4j.Log4j2; +import org.apache.commons.lang3.StringUtils; + +/** + * Functions for generating new classes. + */ +@Log4j2 +@UtilityClass +public class GenerateHqdmClass { + + public static final CtClass[] NO_PARAMETERS = null; + private static final ClassPool pool = ClassPool.getDefault(); + + /** + * Generate a new class. + * + * @param classNameShort a String. + * @param className a String. + * @param superImplClazz a Class. + * @param intface a Class. + * @param superClassesWithBuilders a List of String + * @return a Class + */ + public static Class generateClass( + @NonNull final String classNameShort, + @NonNull final String className, + @NonNull final Class superImplClazz, + @NonNull final Class intface, + @NonNull final Collection superClassesWithBuilders + ) { + final var dedupedMethodPairs = new HashMap>(); + + final var cc = Option(className) + .map(pool::makeClass) + .map(setSuperclass(superImplClazz)) + .map(setSuperInterface(intface)) + .map(addConstructor(classNameShort)) + .getOrElseThrow(RuntimeException::new); + + final var ccNestedClass = addNestedBuilder.apply(cc); + final var fullClass = toJavaImplClass.apply(cc); + + // Add forEach to extract Builder Method pairs and de-dupe (may need to id preferred Class in case of clash) + + superClassesWithBuilders.forEach( + item -> addClassBuildMethodsFromSuperclass(dedupedMethodPairs, item + "$" + BUILDER_CLASS_SHORT_NAME)); + + generateBuilder(ccNestedClass, className, dedupedMethodPairs.values(), cc); + + return fullClass; + } + + @SneakyThrows + private static void addClassBuildMethodsFromSuperclass( + @NonNull final HashMap> methodPairs, + @NonNull final String builderClassName) { + final var superClazzBuilderMethods = pool.get(builderClassName) + .getDeclaredMethods(); + + Arrays.stream(superClazzBuilderMethods) + .forEach(superMethod -> extractSingleParameterMethodFromSuperclass(methodPairs, superMethod)); + } + + @SneakyThrows + private static void extractSingleParameterMethodFromSuperclass( + @NonNull final Map> methodPairs, @NonNull final CtMethod superMethod) { + final var superMethodParameterTypes = superMethod.getParameterTypes(); + if (superMethodParameterTypes.length > 0) { + final var superMethodName = superMethod.getName(); + + methodPairs.putIfAbsent(superMethodName, Tuple(superMethodName, superMethodParameterTypes[0])); + + } + } + + @SneakyThrows + private static void generateBuilder( + @NonNull final CtClass ccNestedClass, + @NonNull final String parentClassName, + @NonNull final Collection> methodList, + @NonNull final CtClass parentCc) { + + // Create a field like: private final OrganizationImpl organizationImpl; + final var fieldName = StringUtils.uncapitalize(StringUtils.substringAfterLast(parentClassName, ".")); + + final var ctOnlyField = new CtField(parentCc, fieldName, ccNestedClass); + ctOnlyField.setModifiers(Modifier.PRIVATE); + ccNestedClass.addField(ctOnlyField); + + // Add the Builder Object constructor call + final var ccNestedConstructor = + new CtConstructor(new CtClass[]{pool.get(IRI_CLASS.getName())}, ccNestedClass); + ccNestedConstructor.setBody(fieldName + " = new " + parentClassName + "($1);"); + ccNestedClass.addConstructor(ccNestedConstructor); + + // Add the builder predicate methods + methodList.forEach(methodPair -> { + + final var newMethod = methodPair.apply((s, c) -> new CtMethod( + ccNestedClass, + s, + new CtClass[]{c}, + ccNestedClass)); + + final var predicateName = StringUtils.removeEnd(methodPair._1() + .toUpperCase(), "_M"); + + addMethodWithBody(newMethod, + "{" + fieldName + ".addValue(uk.gov.gchq.hqdm.iri.HQDM." + predicateName + + ", $1.getIri()); return $0;}") + .apply(ccNestedClass); + }); + + final var newBuildMethod = new CtMethod(parentCc, BUILDER_METHOD_NAME, NO_PARAMETERS, ccNestedClass); + + addMethodWithBody(newBuildMethod, "{return " + fieldName + ";}") + .apply(ccNestedClass); + + toJavaImplClass.apply(ccNestedClass); + } + +} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java new file mode 100644 index 00000000..371a6f7a --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java @@ -0,0 +1,40 @@ +package uk.gov.gchq.magmacore.generators; + +import static uk.gov.gchq.magmacore.util.ClassGenUtils.pool; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.setInterfaces; +import static uk.gov.gchq.magmacore.util.ClassGenUtils.toJavaInterface; + +import java.util.Collection; +import java.util.function.Function; + +import javassist.CtClass; +import lombok.NonNull; +import lombok.experimental.UtilityClass; +import lombok.extern.log4j.Log4j2; + +/** + * Functions for generating a new interface. + */ +@Log4j2 +@UtilityClass +public class GenerateHqdmInterface { + + private static final Function makeInterface = pool::makeInterface; + + /** + * Generate a new interface. + * + * @param interfaceName the interface name. + * @param extendsNames a List of Strings that are the super interface names. + * @return a Class. + */ + public static Class generateInterface( + @NonNull final String interfaceName, + @NonNull final Collection extendsNames + ) { + return toJavaInterface + .compose(setInterfaces(extendsNames)) + .compose(makeInterface) + .apply(interfaceName); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java b/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java new file mode 100644 index 00000000..cb511a65 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.generators; + +import lombok.experimental.UtilityClass; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Thing; + +/** + * Configuration values. + */ +@UtilityClass +public class GeneratorsConfig { + public static final Class NEIGHBOUR_INTERFACE_CLASS = Thing.class; + public static final Class IRI_CLASS = IRI.class; + public static final String BUILDER_CLASS_SHORT_NAME = "Builder"; + public static final String TARGET_CLASSES_DIR = "./target/classes/"; + public static final String BUILDER_METHOD_NAME = "build"; + public static final String MODEL_PACKAGE = "uk.gov.gchq.hqdm.model."; + public static final String IMPL_SUFFIX = "Impl"; + public static final String CLASS_NAME_CONJUNCTION = "And"; + public static final String IMPL_PACKAGE = "uk.gov.gchq.hqdm.model.impl."; + public static final String IMPL_PATH = "uk/gov/gchq/hqdm/model/impl/"; + public static final String MODEL_PATH = "uk/gov/gchq/hqdm/model/"; +} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java new file mode 100644 index 00000000..5ae676b6 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java @@ -0,0 +1,129 @@ +package uk.gov.gchq.magmacore.generators; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.jena.query.ReadWrite; + +import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; + +import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.iri.IriBase; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +public class MultipleInheritEntrypoint { + + public static Class newTypeSpecificationAndGenerate( + List superTypeList, + MagmaCoreRemoteSparqlDatabase hqdmFusekiDb, + Thing dataSpecForNewType + ){ + StringBuilder newObjNameBuilder = new StringBuilder(); + List superTypeIRIList = new ArrayList(); + List typeToTest = new ArrayList(); + newObjNameBuilder.setLength(0); + superTypeIRIList.clear(); + typeToTest.clear(); + + Collections.sort(superTypeList); + for (String superType : superTypeList) { + newObjNameBuilder.append(superType); + newObjNameBuilder.append("and"); + hqdmFusekiDb.begin(ReadWrite.READ); + final List queryResults = hqdmFusekiDb.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, superType); + hqdmFusekiDb.abort(); + + IRI superTypeIRI = null; + for (Thing thing : queryResults) { + Map> thingPredicates = thing.getPredicates(); + String possibleName = thingPredicates.get(HQDM.ENTITY_NAME).iterator().next().toString(); + if(possibleName.equals(superType)){ + superTypeIRI = thing.getIri(); + typeToTest.add(thing); + } + } + superTypeIRIList.add(superTypeIRI); + dataSpecForNewType.addValue(HQDM.HAS_SUPERTYPE, superTypeIRI); + } + + HqdmObject dataSpecForNewTypeAsHqdmObject = (HqdmObject) dataSpecForNewType; + + if(newObjNameBuilder.toString().endsWith("and")){ + newObjNameBuilder.delete(newObjNameBuilder.length()-3, newObjNameBuilder.length()); + } + + Class newHqdmClass = + MultipleInheritGenerateFromThing.generateNewTypeClasses( + dataSpecForNewTypeAsHqdmObject, + hqdmFusekiDb); + + + HqdmObject newTypeObj = instanceOfSuppliedHqdmClass(newHqdmClass, newObjNameBuilder.toString().toLowerCase(), HQDM.HQDM); + + boolean descendantOfClass = inheritsFromClass( typeToTest.get(0)); + superTypeIRIList.forEach( iri -> { + if( descendantOfClass ){ + newTypeObj.addValue(HQDM.HAS_SUPERCLASS, iri); + } else { + newTypeObj.addValue(HQDM.HAS_SUPERTYPE, iri); + } + }); + + hqdmFusekiDb.begin(ReadWrite.WRITE); + hqdmFusekiDb.create(newTypeObj); + hqdmFusekiDb.commit(); + hqdmFusekiDb.abort(); + + return newHqdmClass; + } + + public static HqdmObject instanceOfSuppliedHqdmClass( Class newHqdmClass, String newClassName, IriBase suppliedIriBase){ + Object newObj = null; + + try { + newObj = newHqdmClass + .getDeclaredConstructor( IRI.class ) + .newInstance( new IRI( suppliedIriBase, uid()) ); + } catch (NoSuchMethodException e){ + e.printStackTrace(); + } catch (SecurityException e){ + e.printStackTrace(); + } catch (InstantiationException e){ + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + + // Add name and commit to Jena database + HqdmObject newTypeObj = (HqdmObject) newObj; + + if( !newClassName.equals("") && newTypeObj != null){ + newTypeObj.addStringValue(HQDM.ENTITY_NAME, newClassName); + } + + return newTypeObj; + } + + public static boolean inheritsFromClass( + Thing testType + ){ + // Test whether the type has a has_superclass predicate + Map> thingPredicates = testType.getPredicates(); + Set hasSuperclassSet = thingPredicates.get(HQDM.HAS_SUPERCLASS); + if(hasSuperclassSet != null){ + return !hasSuperclassSet.isEmpty(); + } + return false; + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java new file mode 100644 index 00000000..5ab30f57 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java @@ -0,0 +1,139 @@ +package uk.gov.gchq.magmacore.generators; + +import static io.vavr.API.Option; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.CLASS_NAME_CONJUNCTION; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IMPL_PACKAGE; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IMPL_SUFFIX; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.MODEL_PACKAGE; +import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.SUPER_IMPL_CLASS; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Objects; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; + +import io.vavr.Function1; +import lombok.NonNull; +import lombok.experimental.UtilityClass; +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; + +/** + * Class generation functions. + */ +@UtilityClass +public class MultipleInheritGenerateFromThing { + + /** + * Create a function to find a Thing by IRI in a jenaDatabase. + * + * @param iri the IRI. + * @return a Function. + */ + private static Function1 findByIri(@NonNull final IRI iri) { + return magmaCoreDatabase -> { + try { + magmaCoreDatabase.begin(); + return magmaCoreDatabase.get(iri); + } finally { + magmaCoreDatabase.abort(); + } + }; + } + + /** + * Generate classes dynamically. + * + * @param newTypeSpecificationObject a Thing specifying what needs to be created. + * @param magmaCoreDatabase a MagmaCoreJenaDatabase. + * @return a Class. + */ + public static Class generateNewTypeClasses( + @NonNull final Thing newTypeSpecificationObject, + @NonNull final MagmaCoreDatabase magmaCoreDatabase + ) { + final var nameComponents = new ArrayList(); + final var classSuperTypeInterfaceNames = new ArrayList(); + final var classSuperTypeImplNames = new ArrayList(); + final var typeExtractor = createTypeExtractor(magmaCoreDatabase, nameComponents, classSuperTypeInterfaceNames, + classSuperTypeImplNames); + + // Get the type names from the MC database + final var iris = newTypeSpecificationObject.getPredicates() + .get(HQDM.HAS_SUPERTYPE) + .stream() + .map(iri -> typeExtractor.apply((IRI) iri)) + .collect(Collectors.toList()); + + // There is a hidden dependency (due to side effects) which means that the typeExtractor needs to be called + // before the following code so that the `nameComponents` list is populated. The check on the `iris` list + // enforces that ordering. + if (!iris.isEmpty()) { + // Compose the new Interface name + final var rootName = nameComponents + .stream() + .filter(Objects::nonNull) + .sorted() + .collect(Collectors.joining(CLASS_NAME_CONJUNCTION)); + + final var classClazzName = IMPL_PACKAGE + rootName + IMPL_SUFFIX; + + // Test to see if Classfile exists already, return if so + try { + return Class.forName(classClazzName); + } catch (final ClassNotFoundException ex) { + return createClass(classSuperTypeInterfaceNames, classSuperTypeImplNames, rootName, classClazzName); + } + } else { + throw new RuntimeException("No supertypes found."); + } + } + + public static Class createClass(@NonNull final Collection classSuperTypeInterfaceNames, + @NonNull final Collection classSuperTypeImplNames, @NonNull final String rootName, + @NonNull final String classClazzName) { + // Class does not exist so create it. + final var intfzz = GenerateHqdmInterface.generateInterface(MODEL_PACKAGE + rootName, + classSuperTypeInterfaceNames); + + // Generate class with method + return GenerateHqdmClass.generateClass( + rootName + IMPL_SUFFIX, + classClazzName, + SUPER_IMPL_CLASS, + intfzz, + classSuperTypeImplNames); + } + + private static Function1 createTypeExtractor(@NonNull final MagmaCoreDatabase magmaCoreDatabase, + @NonNull final Collection nameComponents, + @NonNull final Collection classSuperTypeInterfaceNames, + @NonNull final Collection classSuperTypeImplNames) { + return iri -> { + final var stNameString = Option(magmaCoreDatabase) + .map(findByIri(iri)) + .map(MultipleInheritGenerateFromThing::getEntityClassNamePredicates) + .getOrElseThrow(RuntimeException::new); + + final var parentInterfaceShort = StringUtils.substringBefore( + StringUtils.substringAfterLast(stNameString, "."), IMPL_SUFFIX); + + nameComponents.add(parentInterfaceShort); + classSuperTypeInterfaceNames.add(MODEL_PACKAGE + parentInterfaceShort); + classSuperTypeImplNames.add(stNameString); + return iri; + }; + } + + private static String getEntityClassNamePredicates(@NonNull final Thing t) { + return (String) t.getPredicates() + .get(HQDM.ENTITY_CLASS_NAME) + .stream() + .findFirst() + .orElseThrow(); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java new file mode 100644 index 00000000..403dff1d --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java @@ -0,0 +1,265 @@ +package uk.gov.gchq.magmacore.util; + +import java.io.FileNotFoundException; +import java.io.PrintStream; +import java.util.Arrays; +import java.util.Collection; + +import io.vavr.API; +import io.vavr.Function0; +import io.vavr.Function1; +import io.vavr.control.Option; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtClass; +import javassist.CtConstructor; +import javassist.CtMethod; +import lombok.NonNull; +import lombok.extern.log4j.Log4j2; +import org.apache.jena.riot.Lang; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.generators.GeneratorsConfig; + +/** + * General utility methods for class generation. + */ +@Log4j2 +public class ClassGenUtils { + + /** + * Write a class file to the target classes directory. + */ + public static final Function1 writeClass = cc -> { + try { + cc.writeFile(TARGET_CLASSES_DIR); + return cc; + } catch (final Exception e) { + log.error(e); + throw new RuntimeException(e); + } + }; + + /** + * Convert a CtClass to a java Class. + */ + public static final Function1> toJavaImplClass = c -> API.unchecked( + () -> c.toClass(NEIGHBOUR_IMPL_CLASS)) + .apply(); + + /** + * Convert a CtClass to a java interface. + */ + public static final Function1> toJavaInterface = c -> API.unchecked( + () -> c.toClass(NEIGHBOUR_INTERFACE_CLASS)) + .apply(); + + /** + * The default class pool. + */ + public static final ClassPool pool = ClassPool.getDefault(); + + public static final Function1 getCtClass = name -> API.unchecked(() -> pool.get(name)) + .apply(); + + /** + * Add a nested Builder class to a class. + */ + public static final Function1 addNestedBuilder = c -> c.makeNestedClass( + GeneratorsConfig.BUILDER_CLASS_SHORT_NAME, true); + + public static final Function1 drop = jenaDatabase -> jenaDatabase.begin() + .drop() + .commit(); + + /** + * Instantiate a MagmaCoreJenaDatabase and populate it with example objects. + */ + public static Function0> initJenaDatabase( + @NonNull final Collection inputObjects) { + return () -> { + final var jenaDatabase = new MagmaCoreJenaDatabase(); + jenaDatabase.register(HQDM.HQDM); + jenaDatabase.register(RDFS.RDFS); + + // Add example data objects to dataset. + jenaDatabase.begin(); + inputObjects.forEach(jenaDatabase::create); + jenaDatabase.commit(); + + return Option(jenaDatabase); + }; + } + + /** + * Set the superclass for a class. + * + * @param superImplClass a CtClass + * @return a Function that adds a superclass to a CtClass + */ + public static Function1 setSuperclass(@NonNull final Class superImplClass) { + return c -> { + try { + c.setSuperclass(pool.get(superImplClass.getName())); + } catch (final Exception e) { + log.error(e); + throw new RuntimeException(e); + } + return c; + }; + } + + /** + * Set the implemented interfaces for a CtClass. + * + * @param l a List of Strings that are fully qualified interface names. + * @return a Function that adds implemented interfaces to a CtClass. + */ + public static Function1 setInterfaces(@NonNull final Collection l) { + return c -> { + c.setInterfaces(l.stream() + .map(ClassGenUtils.getCtClass) + .toArray(CtClass[]::new)); + return c; + }; + } + + /** + * Dump the details of an Object's class. + * + * @param o an Object. + */ + public static void dumpObjectsClass(@NonNull final Thing o) { + dumpClass(o.getClass()); + log.debug("The object's iri is: " + o.getId()); + } + + /** + * Dump the details for a Class. + * + * @param c the Class + */ + public static void dumpClass(@NonNull final Class c) { + // First inspect the object's class by reflection + log.debug("test class name = " + c.getName()); + log.debug("Methods:"); + for (final var method : c.getMethods()) { + log.debug("\t" + + method.getName() + " with parameter types: " + + Arrays.toString(method.getParameterTypes()) + + " and return type: " + + method.getReturnType()); + } + log.debug("test package name = " + c.getPackage() + .getName()); + log.debug("test superclass name = " + c.getSuperclass() + .getName()); + + log.debug("Interfaces:"); + for (final var dcinterface : c.getInterfaces()) { + log.debug("\t" + dcinterface.getName()); + } + + log.debug("Constructors:"); + for (final var dcconstructor : c.getConstructors()) { + log.debug("\t" + dcconstructor.getName()); + } + + log.debug("Fields:"); + for (final var dcfield : c.getDeclaredFields()) { + log.debug("\t" + dcfield.getName() + " of type: " + dcfield.getType()); + } + + // Search for nested classed link the Builder + log.debug("Nested classes (e.g. builder):"); + for (final var dcclasses : c.getClasses()) { + log.debug("\t" + dcclasses.getName()); + } + } + + /** + * Create a Function that adds a constructor. + * + * @param classNameShort a String. + * @return a Function that adds a constructor to a CtClass. + */ + public static Function1 addConstructor(@NonNull final String classNameShort) { + return c -> { + try { + final var ccConstructor = new CtConstructor(new CtClass[]{pool.get(IRI_CLASS.getName())}, c); + ccConstructor.setBody( + "{super($class,$1, new uk.gov.gchq.hqdm.iri.HqdmIri(new uk.gov.gchq.hqdm.iri.IriBase" + + "(\"hqdm\", " + "\"http://www.semanticweb.org/hqdm#\"),\"" + classNameShort + + "\"));}"); + c.addConstructor(ccConstructor); + return c; + } catch (final Exception e) { + log.error(e); + throw new RuntimeException(e); + } + }; + } + + /** + * Create a Function to dump a MagmaCoreJenaDatabase to a file. + * + * @param filename a String + * @return a Function + */ + public static Function1 dumpDatabase(@NonNull final String filename) { + return jenaDatabase -> { + try (final var ps = new PrintStream(filename)) { + jenaDatabase.dump(ps, Lang.TTL); + } catch (final FileNotFoundException e) { + log.error(e); + throw new RuntimeException(e); + } + return jenaDatabase; + }; + } + + /** + * Create a Function to add a method to a class. + * + * @param newMethod a CtMethod + * @param methodBody a String with the method body. + * @return a Function. + */ + public static Function1 addMethodWithBody( + @NonNull final CtMethod newMethod, + @NonNull final String methodBody) { + + return c -> { + try { + newMethod.setBody(methodBody); + c.addMethod(newMethod); + return c; + } catch (final CannotCompileException e) { + log.error(e); + throw new RuntimeException(e); + } + }; + } + + /** + * Create a Function to set a class's super interface. + * + * @param i the interface Class. + * @return a Function + */ + public static Function1 setSuperInterface(@NonNull final Class i) { + return c -> { + try { + c.addInterface(pool.get(i.getName())); + return c; + } catch (final Exception e) { + log.error(e); + throw new RuntimeException(e); + } + }; + } +} From aae9288f11f0a23bcde3d36b6fcfd81a0e75807b Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 14 Jun 2022 14:56:10 +0100 Subject: [PATCH 42/91] Simpler Mult-inherit implementation. --- pom.xml | 17 -- src/main/java/module-info.java | 3 - .../McAssistMultInheritFromDataApp.java | 133 ++------- .../generators/GenerateHqdmClass.java | 151 ---------- .../generators/GenerateHqdmInterface.java | 40 --- .../generators/GeneratorsConfig.java | 23 -- .../generators/MultipleInheritEntrypoint.java | 129 --------- .../MultipleInheritGenerateFromThing.java | 139 --------- .../gchq/magmacore/util/ClassGenUtils.java | 265 ------------------ 9 files changed, 19 insertions(+), 881 deletions(-) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java diff --git a/pom.xml b/pom.xml index ed17d184..71dccc4a 100644 --- a/pom.xml +++ b/pom.xml @@ -85,23 +85,6 @@ hqdm-rdf 1.0 - - io.vavr - vavr - 0.10.4 - - - - org.projectlombok - lombok - 1.18.24 - provided - - - org.javassist - javassist - 3.28.0-GA - diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 80cca456..f1fefd58 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -10,11 +10,8 @@ requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; - requires lombok; - requires javassist; requires org.apache.logging.log4j; requires org.apache.commons.lang3; - requires io.vavr; exports uk.gov.gchq.magmacore.service; exports uk.gov.gchq.magmacore.exception; diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java index b1705124..7c71fdb1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java @@ -1,86 +1,17 @@ package uk.gov.gchq.magmacore; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.drop; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.dumpClass; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.dumpDatabase; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.initJenaDatabase; +import java.util.UUID; -import lombok.NonNull; -import lombok.experimental.UtilityClass; -import lombok.extern.log4j.Log4j2; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; -import uk.gov.gchq.hqdm.model.impl.HqdmObject; -import uk.gov.gchq.hqdm.model.impl.ThingImpl; -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.demo.BasicHqdmInherit; -import uk.gov.gchq.magmacore.generators.MultipleInheritGenerateFromThing; +import uk.gov.gchq.hqdm.services.DynamicObjects; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; /** * Demonstrate how to create a new class dynamically. */ -@Log4j2 -@UtilityClass public class McAssistMultInheritFromDataApp { - public static final String PARTICIPANT_TYPE_NAME = "PARTICIPANT_TYPE"; - public static final String STATE_OF_ORGANIZATION_TYPE_NAME = "STATE_OF_ORGANIZATION_TYPE"; - public static final String NEW_ENTITY_NAME = "PARTICIPANT_TYPE_AND_STATE_OF_ORGANIZATION"; - public static final String ORG_SUPER_TYPE = "StateOfOrganization"; - public static final String PARTICIPANT_SUPER_TYPE = "Participant"; - public static final String TTL_FILE_NAME = "objectsWithNewTypeIncluded.ttl"; - - private static final Function1 getParticipantType = jenaDatabase -> { - jenaDatabase.begin(); - final var queryResults = - jenaDatabase.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, PARTICIPANT_TYPE_NAME); - jenaDatabase.abort(); - - queryResults.forEach(log::info); - - return (Participant) queryResults.get(0); - }; - - private static final Function1 getStateOfOrgType = - jenaDatabase -> { - jenaDatabase.begin(); - final var queryResults = - jenaDatabase.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, - STATE_OF_ORGANIZATION_TYPE_NAME); - jenaDatabase.abort(); - - queryResults.forEach(log::info); - - return (StateOfOrganization) queryResults.get(0); - }; - - private static Function1 createNewObject( - @NonNull final Class newHqdmClass) { - return jenaDatabase -> { - try { - final var newObj = newHqdmClass - .getDeclaredConstructor(IRI.class) - .newInstance(new IRI(uk.gov.gchq.magmacore.util.DataObjectUtils.USER_BASE, uid())); - - // Add name and commit to Jena database - final var newTypeObj = (HqdmObject) newObj; - newTypeObj.addStringValue(HQDM.ENTITY_NAME, NEW_ENTITY_NAME); - newTypeObj.addStringValue(HQDM.HAS_SUPERTYPE, ORG_SUPER_TYPE); - newTypeObj.addStringValue(HQDM.HAS_SUPERTYPE, PARTICIPANT_SUPER_TYPE); - - jenaDatabase.begin(); - jenaDatabase.create(newTypeObj); - jenaDatabase.commit(); - return jenaDatabase; - } catch (final Exception e) { - log.error(e); - throw new RuntimeException(e); - } - }; - } - /** * Example program for creating classes dynamically. * @@ -88,47 +19,21 @@ private static Function1 createNew */ public static void main(final String[] args) { - log.info( - "Starting the Magma Core Assist app, multiple inheritance new HQDM class generation from HQDM data " - + "objects.\n"); - - final var jenaDatabase = initJenaDatabase(BasicHqdmInherit.createDataObjects()) - .get(); - final var participantType = jenaDatabase.map(getParticipantType) - .getOrElseThrow(RuntimeException::new); - final var stateOfOrganizationType = jenaDatabase.map(getStateOfOrgType) - .getOrElseThrow(RuntimeException::new); - final var newHqdmClass = jenaDatabase.map(createNewType(participantType, stateOfOrganizationType)) - .getOrElseThrow(RuntimeException::new); - - log.info( - "New Java Class Generated for the new Hqdm Type.\nNow create a record of it in the database, " - + "using the new Java Class: " + newHqdmClass.getName()); - - dumpClass(newHqdmClass); - - jenaDatabase - .map(createNewObject(newHqdmClass)) - .map(dumpDatabase(TTL_FILE_NAME)) - .map(drop); - - log.info("Ending the Magma Core Assist app."); - } - - private static Function1> createNewType( - @NonNull final Participant participantType, @NonNull final StateOfOrganization stateOfOrganizationType) { - return jenaDatabase -> { - // Generate Hqdm Objects that specify the multiple inheritance using the **NEW** has_supertype relationship - // Specify a new Thing that has_supertype as the two types that it inherits from - final var dataSpecForNewType = (ThingImpl) new ThingImpl.Builder(new IRI(REF_BASE, uid())) - .has_supertype(participantType) - .has_supertype(stateOfOrganizationType) - .build(); - //Now parse this object to generate the new Java interfaces and Classes - return MultipleInheritGenerateFromThing.generateNewTypeClasses( - dataSpecForNewType, - jenaDatabase); - }; + // Create a StateOfOrganization. + final var orgState = SpatioTemporalExtentServices.createStateOfOrganization(UUID.randomUUID().toString()); + + // Add the Participant interface and return it as a Participant. + final Participant orgStateAsParticipant = + DynamicObjects.implementInterfaces(orgState, Participant.class, new java.lang.Class[]{ + Participant.class, + StateOfOrganization.class + }); + + // Check that it was successful. + if (orgStateAsParticipant instanceof Participant && orgStateAsParticipant instanceof StateOfOrganization) { + System.out.println("Successfully implemented the Participant and StateOfOrganization interfaces."); + } else { + System.err.println("Faile to implement the Participant and StateOfOrganization interfaces."); + } } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java deleted file mode 100644 index a9d31c8a..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmClass.java +++ /dev/null @@ -1,151 +0,0 @@ -package uk.gov.gchq.magmacore.generators; - -import static io.vavr.API.Option; -import static io.vavr.API.Tuple; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.BUILDER_CLASS_SHORT_NAME; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.BUILDER_METHOD_NAME; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IRI_CLASS; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.addConstructor; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.addMethodWithBody; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.addNestedBuilder; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.setSuperInterface; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.setSuperclass; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.toJavaImplClass; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; - -import io.vavr.Tuple2; -import javassist.ClassPool; -import javassist.CtClass; -import javassist.CtConstructor; -import javassist.CtField; -import javassist.CtMethod; -import javassist.Modifier; -import lombok.NonNull; -import lombok.SneakyThrows; -import lombok.experimental.UtilityClass; -import lombok.extern.log4j.Log4j2; -import org.apache.commons.lang3.StringUtils; - -/** - * Functions for generating new classes. - */ -@Log4j2 -@UtilityClass -public class GenerateHqdmClass { - - public static final CtClass[] NO_PARAMETERS = null; - private static final ClassPool pool = ClassPool.getDefault(); - - /** - * Generate a new class. - * - * @param classNameShort a String. - * @param className a String. - * @param superImplClazz a Class. - * @param intface a Class. - * @param superClassesWithBuilders a List of String - * @return a Class - */ - public static Class generateClass( - @NonNull final String classNameShort, - @NonNull final String className, - @NonNull final Class superImplClazz, - @NonNull final Class intface, - @NonNull final Collection superClassesWithBuilders - ) { - final var dedupedMethodPairs = new HashMap>(); - - final var cc = Option(className) - .map(pool::makeClass) - .map(setSuperclass(superImplClazz)) - .map(setSuperInterface(intface)) - .map(addConstructor(classNameShort)) - .getOrElseThrow(RuntimeException::new); - - final var ccNestedClass = addNestedBuilder.apply(cc); - final var fullClass = toJavaImplClass.apply(cc); - - // Add forEach to extract Builder Method pairs and de-dupe (may need to id preferred Class in case of clash) - - superClassesWithBuilders.forEach( - item -> addClassBuildMethodsFromSuperclass(dedupedMethodPairs, item + "$" + BUILDER_CLASS_SHORT_NAME)); - - generateBuilder(ccNestedClass, className, dedupedMethodPairs.values(), cc); - - return fullClass; - } - - @SneakyThrows - private static void addClassBuildMethodsFromSuperclass( - @NonNull final HashMap> methodPairs, - @NonNull final String builderClassName) { - final var superClazzBuilderMethods = pool.get(builderClassName) - .getDeclaredMethods(); - - Arrays.stream(superClazzBuilderMethods) - .forEach(superMethod -> extractSingleParameterMethodFromSuperclass(methodPairs, superMethod)); - } - - @SneakyThrows - private static void extractSingleParameterMethodFromSuperclass( - @NonNull final Map> methodPairs, @NonNull final CtMethod superMethod) { - final var superMethodParameterTypes = superMethod.getParameterTypes(); - if (superMethodParameterTypes.length > 0) { - final var superMethodName = superMethod.getName(); - - methodPairs.putIfAbsent(superMethodName, Tuple(superMethodName, superMethodParameterTypes[0])); - - } - } - - @SneakyThrows - private static void generateBuilder( - @NonNull final CtClass ccNestedClass, - @NonNull final String parentClassName, - @NonNull final Collection> methodList, - @NonNull final CtClass parentCc) { - - // Create a field like: private final OrganizationImpl organizationImpl; - final var fieldName = StringUtils.uncapitalize(StringUtils.substringAfterLast(parentClassName, ".")); - - final var ctOnlyField = new CtField(parentCc, fieldName, ccNestedClass); - ctOnlyField.setModifiers(Modifier.PRIVATE); - ccNestedClass.addField(ctOnlyField); - - // Add the Builder Object constructor call - final var ccNestedConstructor = - new CtConstructor(new CtClass[]{pool.get(IRI_CLASS.getName())}, ccNestedClass); - ccNestedConstructor.setBody(fieldName + " = new " + parentClassName + "($1);"); - ccNestedClass.addConstructor(ccNestedConstructor); - - // Add the builder predicate methods - methodList.forEach(methodPair -> { - - final var newMethod = methodPair.apply((s, c) -> new CtMethod( - ccNestedClass, - s, - new CtClass[]{c}, - ccNestedClass)); - - final var predicateName = StringUtils.removeEnd(methodPair._1() - .toUpperCase(), "_M"); - - addMethodWithBody(newMethod, - "{" + fieldName + ".addValue(uk.gov.gchq.hqdm.iri.HQDM." + predicateName - + ", $1.getIri()); return $0;}") - .apply(ccNestedClass); - }); - - final var newBuildMethod = new CtMethod(parentCc, BUILDER_METHOD_NAME, NO_PARAMETERS, ccNestedClass); - - addMethodWithBody(newBuildMethod, "{return " + fieldName + ";}") - .apply(ccNestedClass); - - toJavaImplClass.apply(ccNestedClass); - } - -} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java b/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java deleted file mode 100644 index 371a6f7a..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/generators/GenerateHqdmInterface.java +++ /dev/null @@ -1,40 +0,0 @@ -package uk.gov.gchq.magmacore.generators; - -import static uk.gov.gchq.magmacore.util.ClassGenUtils.pool; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.setInterfaces; -import static uk.gov.gchq.magmacore.util.ClassGenUtils.toJavaInterface; - -import java.util.Collection; -import java.util.function.Function; - -import javassist.CtClass; -import lombok.NonNull; -import lombok.experimental.UtilityClass; -import lombok.extern.log4j.Log4j2; - -/** - * Functions for generating a new interface. - */ -@Log4j2 -@UtilityClass -public class GenerateHqdmInterface { - - private static final Function makeInterface = pool::makeInterface; - - /** - * Generate a new interface. - * - * @param interfaceName the interface name. - * @param extendsNames a List of Strings that are the super interface names. - * @return a Class. - */ - public static Class generateInterface( - @NonNull final String interfaceName, - @NonNull final Collection extendsNames - ) { - return toJavaInterface - .compose(setInterfaces(extendsNames)) - .compose(makeInterface) - .apply(interfaceName); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java b/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java deleted file mode 100644 index cb511a65..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/generators/GeneratorsConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package uk.gov.gchq.magmacore.generators; - -import lombok.experimental.UtilityClass; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Thing; - -/** - * Configuration values. - */ -@UtilityClass -public class GeneratorsConfig { - public static final Class NEIGHBOUR_INTERFACE_CLASS = Thing.class; - public static final Class IRI_CLASS = IRI.class; - public static final String BUILDER_CLASS_SHORT_NAME = "Builder"; - public static final String TARGET_CLASSES_DIR = "./target/classes/"; - public static final String BUILDER_METHOD_NAME = "build"; - public static final String MODEL_PACKAGE = "uk.gov.gchq.hqdm.model."; - public static final String IMPL_SUFFIX = "Impl"; - public static final String CLASS_NAME_CONJUNCTION = "And"; - public static final String IMPL_PACKAGE = "uk.gov.gchq.hqdm.model.impl."; - public static final String IMPL_PATH = "uk/gov/gchq/hqdm/model/impl/"; - public static final String MODEL_PATH = "uk/gov/gchq/hqdm/model/"; -} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java deleted file mode 100644 index 5ae676b6..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritEntrypoint.java +++ /dev/null @@ -1,129 +0,0 @@ -package uk.gov.gchq.magmacore.generators; - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.jena.query.ReadWrite; - -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; - -import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.IriBase; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObject; - -public class MultipleInheritEntrypoint { - - public static Class newTypeSpecificationAndGenerate( - List superTypeList, - MagmaCoreRemoteSparqlDatabase hqdmFusekiDb, - Thing dataSpecForNewType - ){ - StringBuilder newObjNameBuilder = new StringBuilder(); - List superTypeIRIList = new ArrayList(); - List typeToTest = new ArrayList(); - newObjNameBuilder.setLength(0); - superTypeIRIList.clear(); - typeToTest.clear(); - - Collections.sort(superTypeList); - for (String superType : superTypeList) { - newObjNameBuilder.append(superType); - newObjNameBuilder.append("and"); - hqdmFusekiDb.begin(ReadWrite.READ); - final List queryResults = hqdmFusekiDb.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, superType); - hqdmFusekiDb.abort(); - - IRI superTypeIRI = null; - for (Thing thing : queryResults) { - Map> thingPredicates = thing.getPredicates(); - String possibleName = thingPredicates.get(HQDM.ENTITY_NAME).iterator().next().toString(); - if(possibleName.equals(superType)){ - superTypeIRI = thing.getIri(); - typeToTest.add(thing); - } - } - superTypeIRIList.add(superTypeIRI); - dataSpecForNewType.addValue(HQDM.HAS_SUPERTYPE, superTypeIRI); - } - - HqdmObject dataSpecForNewTypeAsHqdmObject = (HqdmObject) dataSpecForNewType; - - if(newObjNameBuilder.toString().endsWith("and")){ - newObjNameBuilder.delete(newObjNameBuilder.length()-3, newObjNameBuilder.length()); - } - - Class newHqdmClass = - MultipleInheritGenerateFromThing.generateNewTypeClasses( - dataSpecForNewTypeAsHqdmObject, - hqdmFusekiDb); - - - HqdmObject newTypeObj = instanceOfSuppliedHqdmClass(newHqdmClass, newObjNameBuilder.toString().toLowerCase(), HQDM.HQDM); - - boolean descendantOfClass = inheritsFromClass( typeToTest.get(0)); - superTypeIRIList.forEach( iri -> { - if( descendantOfClass ){ - newTypeObj.addValue(HQDM.HAS_SUPERCLASS, iri); - } else { - newTypeObj.addValue(HQDM.HAS_SUPERTYPE, iri); - } - }); - - hqdmFusekiDb.begin(ReadWrite.WRITE); - hqdmFusekiDb.create(newTypeObj); - hqdmFusekiDb.commit(); - hqdmFusekiDb.abort(); - - return newHqdmClass; - } - - public static HqdmObject instanceOfSuppliedHqdmClass( Class newHqdmClass, String newClassName, IriBase suppliedIriBase){ - Object newObj = null; - - try { - newObj = newHqdmClass - .getDeclaredConstructor( IRI.class ) - .newInstance( new IRI( suppliedIriBase, uid()) ); - } catch (NoSuchMethodException e){ - e.printStackTrace(); - } catch (SecurityException e){ - e.printStackTrace(); - } catch (InstantiationException e){ - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - - // Add name and commit to Jena database - HqdmObject newTypeObj = (HqdmObject) newObj; - - if( !newClassName.equals("") && newTypeObj != null){ - newTypeObj.addStringValue(HQDM.ENTITY_NAME, newClassName); - } - - return newTypeObj; - } - - public static boolean inheritsFromClass( - Thing testType - ){ - // Test whether the type has a has_superclass predicate - Map> thingPredicates = testType.getPredicates(); - Set hasSuperclassSet = thingPredicates.get(HQDM.HAS_SUPERCLASS); - if(hasSuperclassSet != null){ - return !hasSuperclassSet.isEmpty(); - } - return false; - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java b/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java deleted file mode 100644 index 5ab30f57..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/generators/MultipleInheritGenerateFromThing.java +++ /dev/null @@ -1,139 +0,0 @@ -package uk.gov.gchq.magmacore.generators; - -import static io.vavr.API.Option; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.CLASS_NAME_CONJUNCTION; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IMPL_PACKAGE; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.IMPL_SUFFIX; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.MODEL_PACKAGE; -import static uk.gov.gchq.magmacore.generators.GeneratorsConfig.SUPER_IMPL_CLASS; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Objects; -import java.util.stream.Collectors; - -import org.apache.commons.lang3.StringUtils; - -import io.vavr.Function1; -import lombok.NonNull; -import lombok.experimental.UtilityClass; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; - -/** - * Class generation functions. - */ -@UtilityClass -public class MultipleInheritGenerateFromThing { - - /** - * Create a function to find a Thing by IRI in a jenaDatabase. - * - * @param iri the IRI. - * @return a Function. - */ - private static Function1 findByIri(@NonNull final IRI iri) { - return magmaCoreDatabase -> { - try { - magmaCoreDatabase.begin(); - return magmaCoreDatabase.get(iri); - } finally { - magmaCoreDatabase.abort(); - } - }; - } - - /** - * Generate classes dynamically. - * - * @param newTypeSpecificationObject a Thing specifying what needs to be created. - * @param magmaCoreDatabase a MagmaCoreJenaDatabase. - * @return a Class. - */ - public static Class generateNewTypeClasses( - @NonNull final Thing newTypeSpecificationObject, - @NonNull final MagmaCoreDatabase magmaCoreDatabase - ) { - final var nameComponents = new ArrayList(); - final var classSuperTypeInterfaceNames = new ArrayList(); - final var classSuperTypeImplNames = new ArrayList(); - final var typeExtractor = createTypeExtractor(magmaCoreDatabase, nameComponents, classSuperTypeInterfaceNames, - classSuperTypeImplNames); - - // Get the type names from the MC database - final var iris = newTypeSpecificationObject.getPredicates() - .get(HQDM.HAS_SUPERTYPE) - .stream() - .map(iri -> typeExtractor.apply((IRI) iri)) - .collect(Collectors.toList()); - - // There is a hidden dependency (due to side effects) which means that the typeExtractor needs to be called - // before the following code so that the `nameComponents` list is populated. The check on the `iris` list - // enforces that ordering. - if (!iris.isEmpty()) { - // Compose the new Interface name - final var rootName = nameComponents - .stream() - .filter(Objects::nonNull) - .sorted() - .collect(Collectors.joining(CLASS_NAME_CONJUNCTION)); - - final var classClazzName = IMPL_PACKAGE + rootName + IMPL_SUFFIX; - - // Test to see if Classfile exists already, return if so - try { - return Class.forName(classClazzName); - } catch (final ClassNotFoundException ex) { - return createClass(classSuperTypeInterfaceNames, classSuperTypeImplNames, rootName, classClazzName); - } - } else { - throw new RuntimeException("No supertypes found."); - } - } - - public static Class createClass(@NonNull final Collection classSuperTypeInterfaceNames, - @NonNull final Collection classSuperTypeImplNames, @NonNull final String rootName, - @NonNull final String classClazzName) { - // Class does not exist so create it. - final var intfzz = GenerateHqdmInterface.generateInterface(MODEL_PACKAGE + rootName, - classSuperTypeInterfaceNames); - - // Generate class with method - return GenerateHqdmClass.generateClass( - rootName + IMPL_SUFFIX, - classClazzName, - SUPER_IMPL_CLASS, - intfzz, - classSuperTypeImplNames); - } - - private static Function1 createTypeExtractor(@NonNull final MagmaCoreDatabase magmaCoreDatabase, - @NonNull final Collection nameComponents, - @NonNull final Collection classSuperTypeInterfaceNames, - @NonNull final Collection classSuperTypeImplNames) { - return iri -> { - final var stNameString = Option(magmaCoreDatabase) - .map(findByIri(iri)) - .map(MultipleInheritGenerateFromThing::getEntityClassNamePredicates) - .getOrElseThrow(RuntimeException::new); - - final var parentInterfaceShort = StringUtils.substringBefore( - StringUtils.substringAfterLast(stNameString, "."), IMPL_SUFFIX); - - nameComponents.add(parentInterfaceShort); - classSuperTypeInterfaceNames.add(MODEL_PACKAGE + parentInterfaceShort); - classSuperTypeImplNames.add(stNameString); - return iri; - }; - } - - private static String getEntityClassNamePredicates(@NonNull final Thing t) { - return (String) t.getPredicates() - .get(HQDM.ENTITY_CLASS_NAME) - .stream() - .findFirst() - .orElseThrow(); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java deleted file mode 100644 index 403dff1d..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/util/ClassGenUtils.java +++ /dev/null @@ -1,265 +0,0 @@ -package uk.gov.gchq.magmacore.util; - -import java.io.FileNotFoundException; -import java.io.PrintStream; -import java.util.Arrays; -import java.util.Collection; - -import io.vavr.API; -import io.vavr.Function0; -import io.vavr.Function1; -import io.vavr.control.Option; -import javassist.CannotCompileException; -import javassist.ClassPool; -import javassist.CtClass; -import javassist.CtConstructor; -import javassist.CtMethod; -import lombok.NonNull; -import lombok.extern.log4j.Log4j2; -import org.apache.jena.riot.Lang; - -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.RDFS; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.generators.GeneratorsConfig; - -/** - * General utility methods for class generation. - */ -@Log4j2 -public class ClassGenUtils { - - /** - * Write a class file to the target classes directory. - */ - public static final Function1 writeClass = cc -> { - try { - cc.writeFile(TARGET_CLASSES_DIR); - return cc; - } catch (final Exception e) { - log.error(e); - throw new RuntimeException(e); - } - }; - - /** - * Convert a CtClass to a java Class. - */ - public static final Function1> toJavaImplClass = c -> API.unchecked( - () -> c.toClass(NEIGHBOUR_IMPL_CLASS)) - .apply(); - - /** - * Convert a CtClass to a java interface. - */ - public static final Function1> toJavaInterface = c -> API.unchecked( - () -> c.toClass(NEIGHBOUR_INTERFACE_CLASS)) - .apply(); - - /** - * The default class pool. - */ - public static final ClassPool pool = ClassPool.getDefault(); - - public static final Function1 getCtClass = name -> API.unchecked(() -> pool.get(name)) - .apply(); - - /** - * Add a nested Builder class to a class. - */ - public static final Function1 addNestedBuilder = c -> c.makeNestedClass( - GeneratorsConfig.BUILDER_CLASS_SHORT_NAME, true); - - public static final Function1 drop = jenaDatabase -> jenaDatabase.begin() - .drop() - .commit(); - - /** - * Instantiate a MagmaCoreJenaDatabase and populate it with example objects. - */ - public static Function0> initJenaDatabase( - @NonNull final Collection inputObjects) { - return () -> { - final var jenaDatabase = new MagmaCoreJenaDatabase(); - jenaDatabase.register(HQDM.HQDM); - jenaDatabase.register(RDFS.RDFS); - - // Add example data objects to dataset. - jenaDatabase.begin(); - inputObjects.forEach(jenaDatabase::create); - jenaDatabase.commit(); - - return Option(jenaDatabase); - }; - } - - /** - * Set the superclass for a class. - * - * @param superImplClass a CtClass - * @return a Function that adds a superclass to a CtClass - */ - public static Function1 setSuperclass(@NonNull final Class superImplClass) { - return c -> { - try { - c.setSuperclass(pool.get(superImplClass.getName())); - } catch (final Exception e) { - log.error(e); - throw new RuntimeException(e); - } - return c; - }; - } - - /** - * Set the implemented interfaces for a CtClass. - * - * @param l a List of Strings that are fully qualified interface names. - * @return a Function that adds implemented interfaces to a CtClass. - */ - public static Function1 setInterfaces(@NonNull final Collection l) { - return c -> { - c.setInterfaces(l.stream() - .map(ClassGenUtils.getCtClass) - .toArray(CtClass[]::new)); - return c; - }; - } - - /** - * Dump the details of an Object's class. - * - * @param o an Object. - */ - public static void dumpObjectsClass(@NonNull final Thing o) { - dumpClass(o.getClass()); - log.debug("The object's iri is: " + o.getId()); - } - - /** - * Dump the details for a Class. - * - * @param c the Class - */ - public static void dumpClass(@NonNull final Class c) { - // First inspect the object's class by reflection - log.debug("test class name = " + c.getName()); - log.debug("Methods:"); - for (final var method : c.getMethods()) { - log.debug("\t" - + method.getName() + " with parameter types: " - + Arrays.toString(method.getParameterTypes()) - + " and return type: " - + method.getReturnType()); - } - log.debug("test package name = " + c.getPackage() - .getName()); - log.debug("test superclass name = " + c.getSuperclass() - .getName()); - - log.debug("Interfaces:"); - for (final var dcinterface : c.getInterfaces()) { - log.debug("\t" + dcinterface.getName()); - } - - log.debug("Constructors:"); - for (final var dcconstructor : c.getConstructors()) { - log.debug("\t" + dcconstructor.getName()); - } - - log.debug("Fields:"); - for (final var dcfield : c.getDeclaredFields()) { - log.debug("\t" + dcfield.getName() + " of type: " + dcfield.getType()); - } - - // Search for nested classed link the Builder - log.debug("Nested classes (e.g. builder):"); - for (final var dcclasses : c.getClasses()) { - log.debug("\t" + dcclasses.getName()); - } - } - - /** - * Create a Function that adds a constructor. - * - * @param classNameShort a String. - * @return a Function that adds a constructor to a CtClass. - */ - public static Function1 addConstructor(@NonNull final String classNameShort) { - return c -> { - try { - final var ccConstructor = new CtConstructor(new CtClass[]{pool.get(IRI_CLASS.getName())}, c); - ccConstructor.setBody( - "{super($class,$1, new uk.gov.gchq.hqdm.iri.HqdmIri(new uk.gov.gchq.hqdm.iri.IriBase" - + "(\"hqdm\", " + "\"http://www.semanticweb.org/hqdm#\"),\"" + classNameShort - + "\"));}"); - c.addConstructor(ccConstructor); - return c; - } catch (final Exception e) { - log.error(e); - throw new RuntimeException(e); - } - }; - } - - /** - * Create a Function to dump a MagmaCoreJenaDatabase to a file. - * - * @param filename a String - * @return a Function - */ - public static Function1 dumpDatabase(@NonNull final String filename) { - return jenaDatabase -> { - try (final var ps = new PrintStream(filename)) { - jenaDatabase.dump(ps, Lang.TTL); - } catch (final FileNotFoundException e) { - log.error(e); - throw new RuntimeException(e); - } - return jenaDatabase; - }; - } - - /** - * Create a Function to add a method to a class. - * - * @param newMethod a CtMethod - * @param methodBody a String with the method body. - * @return a Function. - */ - public static Function1 addMethodWithBody( - @NonNull final CtMethod newMethod, - @NonNull final String methodBody) { - - return c -> { - try { - newMethod.setBody(methodBody); - c.addMethod(newMethod); - return c; - } catch (final CannotCompileException e) { - log.error(e); - throw new RuntimeException(e); - } - }; - } - - /** - * Create a Function to set a class's super interface. - * - * @param i the interface Class. - * @return a Function - */ - public static Function1 setSuperInterface(@NonNull final Class i) { - return c -> { - try { - c.addInterface(pool.get(i.getName())); - return c; - } catch (final Exception e) { - log.error(e); - throw new RuntimeException(e); - } - }; - } -} From 9c157db8db055571530e66ee2516214c096dcaf3 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 14 Jun 2022 15:13:32 +0100 Subject: [PATCH 43/91] Update the example for multiple inheritance. --- .../McAssistMultInheritFromDataApp.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java index 7c71fdb1..187d88fe 100644 --- a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java @@ -1,11 +1,14 @@ package uk.gov.gchq.magmacore; +import java.util.List; import java.util.UUID; +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; -import uk.gov.gchq.hqdm.services.DynamicObjects; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.Pair; /** * Demonstrate how to create a new class dynamically. @@ -19,18 +22,17 @@ public class McAssistMultInheritFromDataApp { */ public static void main(final String[] args) { - // Create a StateOfOrganization. - final var orgState = SpatioTemporalExtentServices.createStateOfOrganization(UUID.randomUUID().toString()); + // Create a new type specification. + final List> newTypeSpecification = List.of( + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.STATE_OF_ORGANIZATION.getIri()), + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri()) + ); - // Add the Participant interface and return it as a Participant. - final Participant orgStateAsParticipant = - DynamicObjects.implementInterfaces(orgState, Participant.class, new java.lang.Class[]{ - Participant.class, - StateOfOrganization.class - }); + // Create a new object using the type specification. + final var orgState = HqdmObjectFactory.create(UUID.randomUUID().toString(), newTypeSpecification); - // Check that it was successful. - if (orgStateAsParticipant instanceof Participant && orgStateAsParticipant instanceof StateOfOrganization) { + // Check that it implements the two interfaces. + if (orgState instanceof Participant && orgState instanceof StateOfOrganization) { System.out.println("Successfully implemented the Participant and StateOfOrganization interfaces."); } else { System.err.println("Faile to implement the Participant and StateOfOrganization interfaces."); From 30062ebfa08ffc0afb4e15d6e7275b5122420b77 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Wed, 15 Jun 2022 13:50:07 +0100 Subject: [PATCH 44/91] Consistent MagmaCoreDatabase interface and better control of transaction boundaries. --- .../magmacore/database/MagmaCoreDatabase.java | 30 ++++++++++ .../database/MagmaCoreJenaDatabase.java | 12 ++-- .../database/MagmaCoreObjectDatabase.java | 41 ++++++++++++++ .../MagmaCoreRemoteSparqlDatabase.java | 52 +++++++++++++++--- .../magmacore/demo/ExampleAssociations.java | 36 ++++++++---- .../magmacore/demo/ExampleIndividuals.java | 21 +++++-- .../gchq/magmacore/demo/FusekiService.java | 12 ++-- .../gchq/magmacore/service/DbChangeSet.java | 3 +- .../magmacore/service/MagmaCoreService.java | 55 +++++++++++++++++-- 9 files changed, 223 insertions(+), 39 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index 99da38c8..70a2c6e1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -97,4 +97,34 @@ public interface MagmaCoreDatabase { * @param out Output stream to dump to. */ void dump(PrintStream out); + + /** + * Begin a writeable transaction initially in READ mode, + * but in Jena it will switch to WRITE mode if updates are made. + * + * @return the {@link MagmaCoreDatabase} + */ + MagmaCoreDatabase begin(); + + /** + * Abort the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + MagmaCoreDatabase abort(); + + /** + * Drop the entire database. + * + * @return the {@link MagmaCoreDatabase} + */ + MagmaCoreDatabase drop(); + + /** + * Commit the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + MagmaCoreDatabase commit(); + } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 5c12b9ad..630d16d6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -109,35 +109,39 @@ public void register(final IriBase base) { * Start a transaction which is READ mode and which will switch to WRITE if an update is * attempted but only if no intermediate transaction has performed an update. */ - public void begin() { + public MagmaCoreDatabase begin() { if (!dataset.isInTransaction()) { dataset.begin(); } + return this; } /** * Commit a transaction - finish the transaction and make any changes permanent (if a "write" * transaction). */ - public void commit() { + public MagmaCoreDatabase commit() { dataset.commit(); dataset.end(); + return this; } /** * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). */ - public void abort() { + public MagmaCoreDatabase abort() { dataset.abort(); dataset.end(); + return this; } /** * Drop all data from the dataset. */ - public void drop() { + public MagmaCoreDatabase drop() { final String drop = "drop all"; executeUpdate(drop); + return this; } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java index 9a285e91..55bf0d97 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java @@ -138,4 +138,45 @@ public void dump(final PrintStream out) { public final void dumpTurtle(final PrintStream out) { objects.values().forEach(object -> out.println(Triples.toTriples(object))); } + + /** + * Begin a writeable transaction initially in READ mode, + * but in Jena it will switch to WRITE mode if updates are made. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase begin() { + // no-op + return this; + } + + /** + * Abort the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase abort() { + // no-op + return this; + } + + /** + * Drop the entire database. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase drop() { + objects.clear(); + return this; + } + + /** + * Commit the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase commit() { + // no-op + return this; + } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 3d1753b4..b694e48f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -81,14 +81,6 @@ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset data connection.load(dataset.getDefaultModel()); } - /** - * Drop all data from the dataset. - */ - public void drop() { - final String drop = "drop all"; - executeUpdate(drop); - } - /** * {@inheritDoc} */ @@ -296,4 +288,48 @@ public final void dump(final PrintStream out, final Lang language) { final Dataset dataset = connection.fetchDataset(); RDFDataMgr.write(out, dataset.getDefaultModel(), language); } + + /** + * Begin a writeable transaction initially in READ mode, + * but in Jena it will switch to WRITE mode if updates are made. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase begin() { + if (!connection.isInTransaction()) { + connection.begin(); + } + return this; + } + + /** + * Abort the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase abort() { + connection.abort(); + return this; + } + + /** + * Drop the entire database. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase drop() { + final String drop = "drop all"; + executeUpdate(drop); + return this; + } + + /** + * Commit the current transaction. + * + * @return the {@link MagmaCoreDatabase} + */ + public final MagmaCoreDatabase commit() { + connection.commit(); + return this; + } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index f46cdb1d..598bc7d4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -1,6 +1,7 @@ package uk.gov.gchq.magmacore.demo; import java.util.HashSet; +import java.util.List; import java.util.Set; import uk.gov.gchq.hqdm.iri.HQDM; @@ -45,14 +46,22 @@ private static void occupyHouse( final IRI beginning, final IRI ending) { + final var entities = mcService.findByEntityNameInTransaction(List.of( + "CLASS_OF_STATE_OF_PERSON", + "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", + "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION" + )); + // Find the required classes, kinds, and roles. - final ClassOfStateOfPerson classOfStateOfPerson = mcService.findByEntityName("CLASS_OF_STATE_OF_PERSON"); + final ClassOfStateOfPerson classOfStateOfPerson = (ClassOfStateOfPerson) entities.get("CLASS_OF_STATE_OF_PERSON"); final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - mcService.findByEntityName("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final Role occupierOfPropertyRole = mcService.findByEntityName("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - final Role domesticOccupantInPropertyRole = mcService.findByEntityName("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); + (ClassOfStateOfFunctionalSystem) entities.get("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final Role occupierOfPropertyRole = (Role) entities.get("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); + final Role domesticOccupantInPropertyRole = (Role) entities.get("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); final KindOfAssociation occupantInPropertyKindOfAssociation = - mcService.findByEntityName("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + (KindOfAssociation) entities.get("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // Create DbCreateOperations to create the objects and their properties. final var personState = ExampleCommonUtils.mkUserBaseIri(); @@ -97,21 +106,28 @@ private static void occupyHouse( creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, personParticipant.getIri())); creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.BEGINNING, beginning.getIri())); creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.ENDING, ending.getIri())); - } + } /** * Add occupancy predicates. * * @param mcService {@link MagmaCoreDatabase} * @return {@link MagmaCoreDatabase} - */ + */ public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) { + + final var entities = mcService.findByEntityNameInTransaction(List.of( + "Example1_World", + "PersonB1_Bob", + "HouseB" + )); + // Use an existing PossibleWorld - final PossibleWorld possibleWorld = mcService.findByEntityName("Example1_World"); + final PossibleWorld possibleWorld = (PossibleWorld) entities.get("Example1_World"); // The person occupies the house twice at different times. - final Person person = mcService.findByEntityName("PersonB1_Bob"); - final FunctionalSystem house = mcService.findByEntityName("HouseB"); + final Person person = (Person) entities.get("PersonB1_Bob"); + final FunctionalSystem house = (FunctionalSystem) entities.get("HouseB"); // Create IRIs for the objects we want to create. final var e2 = ExampleCommonUtils.mkUserBaseIri(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 4f0f418d..88c93afe 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -1,5 +1,6 @@ package uk.gov.gchq.magmacore.demo; +import java.util.List; import java.util.Set; import uk.gov.gchq.hqdm.iri.HQDM; @@ -24,13 +25,20 @@ public class ExampleIndividuals { */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { + final var entities = mcService.findByEntityNameInTransaction(List.of( + "KIND_OF_PERSON", + "NATURAL_MEMBER_OF_SOCIETY_ROLE", + "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE" + )); + // Find the required classes, kinds, and roles. - final KindOfPerson kindOfPerson = mcService.findByEntityName("KIND_OF_PERSON"); - final Role personRole = mcService.findByEntityName("NATURAL_MEMBER_OF_SOCIETY_ROLE"); + final KindOfPerson kindOfPerson = (KindOfPerson) entities.get("KIND_OF_PERSON"); + final Role personRole = (Role) entities.get("NATURAL_MEMBER_OF_SOCIETY_ROLE"); final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - mcService.findByEntityName("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + (KindOfFunctionalSystem) entities.get("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final Role domesticPropertyRole = - mcService.findByEntityName("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + (Role) entities.get("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // Create IRIs for the objects we want to create. final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); @@ -65,9 +73,12 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) - ); + ); // Create a change set and return it. return new DbChangeSet(Set.of(), creates); } + + public ExampleIndividuals() { + } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java index c3bfce61..875704eb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java @@ -49,14 +49,14 @@ public void run(final boolean populate) { // If TDB is not already populated create set of example data objects to // store in TDB. tdb.begin(); - if (tdb.getDataset().isEmpty() && populate) { - // Build example data objects Dataset. - ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); + final boolean dbIsEmpty = tdb.getDataset().isEmpty(); + tdb.commit(); - tdb.commit(); - } else { - tdb.abort(); + if (dbIsEmpty && populate) { + // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. + ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); } + // Build and start Fuseki server. FusekiLogging.setLogging(); FusekiServer diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index 0a329648..dcd842ae 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -41,7 +41,8 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { .reduce(Function::andThen) .orElse(Function.identity()); - return deleteFunction.andThen(createFunction).apply(mcService); + mcService.runInTransaction(deleteFunction.andThen(createFunction)); + return mcService; } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index d4890e9d..7dcfea68 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -1,5 +1,10 @@ package uk.gov.gchq.magmacore.service; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + import uk.gov.gchq.hqdm.iri.HQDM; import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; @@ -10,7 +15,7 @@ * * */ public class MagmaCoreService { - + // The service operates on a database. private final MagmaCoreDatabase db; @@ -18,7 +23,7 @@ public class MagmaCoreService { * Constructor that requires a {@link MagmaCoreDatabase}. * * @param db {@link MagmaCoreDatabase} - */ + */ MagmaCoreService(final MagmaCoreDatabase db) { this.db = db; } @@ -32,6 +37,7 @@ public class MagmaCoreService { */ public T findByEntityName(final String name) { final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + if (searchResult.size() == 1) { return (T) searchResult.get(0); } else if (searchResult.isEmpty()) { @@ -45,7 +51,7 @@ public T findByEntityName(final String name) { * Create a new Thing. * * @param thing {@link Thing} - */ + */ public void create(final Thing thing) { db.create(thing); } @@ -54,7 +60,7 @@ public void create(final Thing thing) { * Update an existing {@link Thing}. * * @param thing {@link Thing} - */ + */ public void update(final Thing thing) { db.update(thing); } @@ -64,9 +70,48 @@ public void update(final Thing thing) { * * @param iri {@link IRI} * @return {@link Thing} - */ + */ public Thing get(final IRI iri) { return db.get(iri); } + /** + * Run a function in a transaction. + * + * @param f the {@link Function} to run. + */ + public void runInTransaction(final Function f) { + try { + db.begin(); + f.apply(this); + db.commit(); + } catch (final Exception e) { + db.abort(); + throw e; + } + } + + /** + * Find many entities by name. + * + * @param names a {@link List} of {@link String} + * @return a {@link Map} of {@link String} to {@link Thing} + */ + public Map findByEntityNameInTransaction(final List names) { + try { + db.begin(); + final var result = new HashMap(); + + for (final String name : names) { + result.put(name, findByEntityName(name)); + } + + db.commit(); + + return result; + } catch (final Exception e) { + db.abort(); + throw e; + } + } } From 115cf4ab3421275b3e3e3330d686a676a0cc6c2e Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 17 Jun 2022 08:57:43 +0100 Subject: [PATCH 45/91] Added a signs example. --- .../gov/gchq/magmacore/demo/ExampleSigns.java | 125 ++++++++++++++++++ .../gchq/magmacore/demo/ExampleSignsRdl.java | 39 ++++++ 2 files changed, 164 insertions(+) create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java new file mode 100644 index 00000000..cc7b0062 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -0,0 +1,125 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.List; +import java.util.Set; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.model.Description; +import uk.gov.gchq.hqdm.model.Pattern; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.DbTransformation; +import uk.gov.gchq.magmacore.service.MagmaCoreService; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleSigns { + + /** + * A function that populates a database. + * + * @param mcService a {@link MagmaCoreService} + * @return {@link DbTransformation} + */ + public static DbTransformation populateExampleData(final MagmaCoreService mcService) { + + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one + // can be created. + final var rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); + + // Apply the DbChangeSet + rdlChangeSet.apply(mcService); + + // mcService now contains the RDL needed for the next DbChangeSet + final var signsChangeSet = addSigns(mcService); + + // Apply the DbChangeSet + signsChangeSet.apply(mcService); + // + // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. + return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); + } + + /** + * Create a {@link DbChangeSet} to add the representation by sign. + * + * @param mcService {@link MagmaCoreService} + * @return {@link DbChangeSet} + */ + private static DbChangeSet addSigns(final MagmaCoreService mcService) { + final var entities = mcService.findByEntityNameInTransaction(List.of( + "URL Pattern", + "Description By URL" + )); + + // Find the required classes, kinds, and roles. + final var urlPattern = (Pattern) entities.get("URL Pattern"); + final var descriptionByUrl = (Description) entities.get("Description By URL"); + final var descriptionByUrlIri = new IRI(descriptionByUrl.getId()); + + // Create IRIs for the new entities. + final var person = ExampleCommonUtils.mkUserBaseIri(); + final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); + final var wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); + final var brittanica = ExampleCommonUtils.mkUserBaseIri(); + final var biography = ExampleCommonUtils.mkUserBaseIri(); + final var stanford = ExampleCommonUtils.mkUserBaseIri(); + final var nationalGeographic = ExampleCommonUtils.mkUserBaseIri(); + final var repBySign = ExampleCommonUtils.mkUserBaseIri(); + + // Create the set of DbCreateOperations + final var creates = Set.of( + // Create the thing represented + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + + // Create the community that recognizes the signs + new DbCreateOperation(englishSpeakers, RDFS.RDF_TYPE, HQDM.RECOGNIZING_LANGUAGE_COMMUNITY.getIri()), + new DbCreateOperation(englishSpeakers, HQDM.ENTITY_NAME, "English Speakers"), + new DbCreateOperation(englishSpeakers, HQDM.PARTICIPANT_IN, repBySign.getIri()), + + // Create the signs that represent the thing + new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), + + new DbCreateOperation(brittanica, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(brittanica, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(brittanica, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(brittanica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), + + new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(biography, HQDM.VALUE_, "https://www.biography.com/scholar/socrates"), + + new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(stanford, HQDM.VALUE_, "https://plato.stanford.edu/entries/socrates/"), + + new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.VALUE_, "https://www.nationalgeographic.com/culture/article/socrates"), + + // Create the representation by signs + new DbCreateOperation(repBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(repBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), + new DbCreateOperation(repBySign, HQDM.REPRESENTS, person.getIri()), + + // Link the description to the Pattern + new DbCreateOperation(descriptionByUrlIri, HQDM.CONSISTS_OF_BY_CLASS, urlPattern.getId()) + + ); + + // Create a change set and return it. + return new DbChangeSet(Set.of(), creates); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java new file mode 100644 index 00000000..e58bf2f6 --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -0,0 +1,39 @@ +package uk.gov.gchq.magmacore.demo; + +import java.util.Set; + +import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.magmacore.service.DbChangeSet; +import uk.gov.gchq.magmacore.service.DbCreateOperation; + +/** + * Functions for creating systems using MagmaCore and HQDM. + * + * */ +public class ExampleSignsRdl { + + /** + * Create a DbChangeSet that adds the RDL. + * + * @return {@link DbChangeSet} + */ + public static DbChangeSet createRefDataObjects() { + + // Create new unique IRIs for all the objects we need to create. + final var urlPattern = ExampleCommonUtils.mkRefBaseIri(); + final var description = ExampleCommonUtils.mkRefBaseIri(); + + // Add DbCreateOperations to create the objects and their properties. + final var creates = Set.of( + new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), + new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), + + new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION.getIri()), + new DbCreateOperation(description, HQDM.ENTITY_NAME, "Description By URL") + ); + + // Put the operations in a change set and return it. + return new DbChangeSet(Set.of(), creates); + } +} From 3d62121fbda0ebb41a38b4ab7dc1c12ff2daa394 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 17 Jun 2022 09:09:30 +0100 Subject: [PATCH 46/91] Updated the signs example. --- .../gov/gchq/magmacore/demo/ExampleSigns.java | 28 ++++++++----------- .../gchq/magmacore/demo/ExampleSignsRdl.java | 11 +++++++- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index cc7b0062..aad7ac25 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -8,6 +8,7 @@ import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.Description; import uk.gov.gchq.hqdm.model.Pattern; +import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.DbTransformation; @@ -55,17 +56,18 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final var entities = mcService.findByEntityNameInTransaction(List.of( "URL Pattern", - "Description By URL" + "Description By URL", + "English Speakers" )); // Find the required classes, kinds, and roles. final var urlPattern = (Pattern) entities.get("URL Pattern"); final var descriptionByUrl = (Description) entities.get("Description By URL"); - final var descriptionByUrlIri = new IRI(descriptionByUrl.getId()); + final var englishSpeakers = (RecognizingLanguageCommunity) entities.get("English Speakers"); + final var englishSpeakersIri = new IRI(englishSpeakers.getId()); // Create IRIs for the new entities. final var person = ExampleCommonUtils.mkUserBaseIri(); - final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); final var wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); final var brittanica = ExampleCommonUtils.mkUserBaseIri(); final var biography = ExampleCommonUtils.mkUserBaseIri(); @@ -78,35 +80,25 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { // Create the thing represented new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - // Create the community that recognizes the signs - new DbCreateOperation(englishSpeakers, RDFS.RDF_TYPE, HQDM.RECOGNIZING_LANGUAGE_COMMUNITY.getIri()), - new DbCreateOperation(englishSpeakers, HQDM.ENTITY_NAME, "English Speakers"), - new DbCreateOperation(englishSpeakers, HQDM.PARTICIPANT_IN, repBySign.getIri()), - // Create the signs that represent the thing new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), new DbCreateOperation(brittanica, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), new DbCreateOperation(brittanica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(brittanica, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(brittanica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(biography, HQDM.VALUE_, "https://www.biography.com/scholar/socrates"), new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(stanford, HQDM.VALUE_, "https://plato.stanford.edu/entries/socrates/"), new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(nationalGeographic, HQDM.VALUE_, "https://www.nationalgeographic.com/culture/article/socrates"), // Create the representation by signs @@ -114,9 +106,13 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(repBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), new DbCreateOperation(repBySign, HQDM.REPRESENTS, person.getIri()), - // Link the description to the Pattern - new DbCreateOperation(descriptionByUrlIri, HQDM.CONSISTS_OF_BY_CLASS, urlPattern.getId()) - + // Add the participants + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(brittanica, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri()) ); // Create a change set and return it. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index e58bf2f6..7b56a44b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -23,6 +23,7 @@ public static DbChangeSet createRefDataObjects() { // Create new unique IRIs for all the objects we need to create. final var urlPattern = ExampleCommonUtils.mkRefBaseIri(); final var description = ExampleCommonUtils.mkRefBaseIri(); + final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); // Add DbCreateOperations to create the objects and their properties. final var creates = Set.of( @@ -30,7 +31,15 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION.getIri()), - new DbCreateOperation(description, HQDM.ENTITY_NAME, "Description By URL") + new DbCreateOperation(description, HQDM.ENTITY_NAME, "Description By URL"), + + // Create the community that recognizes the signs + new DbCreateOperation(englishSpeakers, RDFS.RDF_TYPE, HQDM.RECOGNIZING_LANGUAGE_COMMUNITY.getIri()), + new DbCreateOperation(englishSpeakers, HQDM.ENTITY_NAME, "English Speakers"), + + // Link the description to the Pattern + new DbCreateOperation(description, HQDM.CONSISTS_OF_BY_CLASS, urlPattern.getIri()) + ); // Put the operations in a change set and return it. From 9a9457fb74c6b692913f91286ce3319cf25b068f Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 17 Jun 2022 13:15:40 +0100 Subject: [PATCH 47/91] Added some simple unit tests to invoke the examples. --- .../gov/gchq/magmacore/demo/ExampleSigns.java | 57 ++++++++++++++----- .../gchq/magmacore/demo/ExampleDataTest.java | 27 +++++++++ .../magmacore/demo/ExampleiSignsTest.java | 27 +++++++++ 3 files changed, 96 insertions(+), 15 deletions(-) create mode 100644 src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java create mode 100644 src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index aad7ac25..7e8d5085 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -28,9 +28,9 @@ public class ExampleSigns { */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - // Apply the transformation to the database. There are dependencies between these change sets - // since they both depend on RDL being present, but also the occupancies depend on the - // individuals being present, so each change set needs to be applied before the next one + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one // can be created. final var rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); @@ -52,7 +52,7 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ * * @param mcService {@link MagmaCoreService} * @return {@link DbChangeSet} - */ + */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final var entities = mcService.findByEntityNameInTransaction(List.of( "URL Pattern", @@ -67,6 +67,7 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final var englishSpeakersIri = new IRI(englishSpeakers.getId()); // Create IRIs for the new entities. + final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); final var person = ExampleCommonUtils.mkUserBaseIri(); final var wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); final var brittanica = ExampleCommonUtils.mkUserBaseIri(); @@ -74,37 +75,63 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final var stanford = ExampleCommonUtils.mkUserBaseIri(); final var nationalGeographic = ExampleCommonUtils.mkUserBaseIri(); final var repBySign = ExampleCommonUtils.mkUserBaseIri(); + final var e1 = ExampleCommonUtils.mkUserBaseIri(); + final var e2 = ExampleCommonUtils.mkUserBaseIri(); // Create the set of DbCreateOperations final var creates = Set.of( + + // Create the possible world that we are working in. + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), + // Create the thing represented new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Create the signs that represent the thing - new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), - - new DbCreateOperation(brittanica, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(brittanica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(brittanica, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(brittanica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), - - new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(brittanica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(biography, HQDM.VALUE_, "https://www.biography.com/scholar/socrates"), - - new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(stanford, HQDM.VALUE_, "https://plato.stanford.edu/entries/socrates/"), - - new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.SIGN.getIri()), + new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(nationalGeographic, HQDM.VALUE_, "https://www.nationalgeographic.com/culture/article/socrates"), - + new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + // Create the representation by signs new DbCreateOperation(repBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), new DbCreateOperation(repBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), new DbCreateOperation(repBySign, HQDM.REPRESENTS, person.getIri()), + new DbCreateOperation(repBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + // Add beginning, ending, etc. from `association` + new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e1, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), + + new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), + + new DbCreateOperation(repBySign, HQDM.BEGINNING, e1.getIri()), + new DbCreateOperation(repBySign, HQDM.ENDING, e2.getIri()), // Add the participants new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, repBySign.getIri()), @@ -113,7 +140,7 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri()) - ); + ); // Create a change set and return it. return new DbChangeSet(Set.of(), creates); diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java new file mode 100644 index 00000000..6cdd0b9f --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -0,0 +1,27 @@ +package uk.gov.gchq.magmacore.demo; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; + +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Exercise the {@link ExampleDataObjects} code during the build. + * + * */ +public class ExampleDataTest { + + /** + * Test the {@link ExampleDataObjects} code. + * + * */ + @Test + public void testApplyAndInvert() { + final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); + + final var transformation = ExampleDataObjects.populateExampleData(service); + + assertNotNull(transformation); + } +} diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java new file mode 100644 index 00000000..fa510018 --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java @@ -0,0 +1,27 @@ +package uk.gov.gchq.magmacore.demo; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; + +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Exercise the {@link ExampleSigns} code during the build. + * + * */ +public class ExampleiSignsTest { + + /** + * Test the {@link ExampleSigns} code. + * + * */ + @Test + public void testApplyAndInvert() { + final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); + + final var transformation = ExampleSigns.populateExampleData(service); + + assertNotNull(transformation); + } +} From de8d425a6af086cf0c3b91505cd43d840b5a06af Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Fri, 17 Jun 2022 14:31:16 +0100 Subject: [PATCH 48/91] Rename class --- .../demo/{ExampleiSignsTest.java => ExampleSignsTest.java} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/test/java/uk/gov/gchq/magmacore/demo/{ExampleiSignsTest.java => ExampleSignsTest.java} (88%) diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java similarity index 88% rename from src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java rename to src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java index fa510018..04d526f5 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleiSignsTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java @@ -10,14 +10,14 @@ * Exercise the {@link ExampleSigns} code during the build. * * */ -public class ExampleiSignsTest { +public class ExampleSignsTest { /** * Test the {@link ExampleSigns} code. * * */ @Test - public void testApplyAndInvert() { + public void testSignsExample() { final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); final var transformation = ExampleSigns.populateExampleData(service); From 3a71114031b33d47aa8209b1ab1937690e163e8e Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sat, 18 Jun 2022 11:15:26 +0100 Subject: [PATCH 49/91] Update to latest hqdm-rdf --- pom.xml | 2 +- src/main/java/module-info.java | 2 +- .../gchq/magmacore/McAssistMultInheritFromDataApp.java | 4 ++-- .../uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java | 4 ++-- .../gchq/magmacore/database/MagmaCoreJenaDatabase.java | 6 +++--- .../gchq/magmacore/database/MagmaCoreObjectDatabase.java | 4 ++-- .../magmacore/database/MagmaCoreRemoteSparqlDatabase.java | 4 ++-- .../uk/gov/gchq/magmacore/demo/ExampleAssociations.java | 6 +++--- .../uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java | 4 ++-- .../uk/gov/gchq/magmacore/demo/ExampleIndividuals.java | 4 ++-- src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java | 4 ++-- .../java/uk/gov/gchq/magmacore/demo/ExampleSigns.java | 6 +++--- .../java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java | 4 ++-- .../uk/gov/gchq/magmacore/service/DbCreateOperation.java | 4 ++-- .../uk/gov/gchq/magmacore/service/DbDeleteOperation.java | 2 +- .../uk/gov/gchq/magmacore/service/MagmaCoreService.java | 4 ++-- .../magmacore/{database => service}/DbChangeSetTest.java | 7 ++----- .../magmacore/{database => service}/DbOperationTest.java | 7 ++----- .../{database => service}/DbTransformationTest.java | 8 ++------ 19 files changed, 38 insertions(+), 48 deletions(-) rename src/test/java/uk/gov/gchq/magmacore/{database => service}/DbChangeSetTest.java (88%) rename src/test/java/uk/gov/gchq/magmacore/{database => service}/DbOperationTest.java (95%) rename src/test/java/uk/gov/gchq/magmacore/{database => service}/DbTransformationTest.java (90%) diff --git a/pom.xml b/pom.xml index 71dccc4a..6dbad682 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 2.17.0 - uk.gov.gchq.hqdm + uk.gov.gchq hqdm-rdf 1.0 diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index f1fefd58..5aed7af2 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,7 +1,7 @@ module MagmaCore.service.main { requires HQDM.model.main; - requires transitive HQDM.rdf.main; + requires transitive uk.gov.gchq.hqdm.rdf; requires org.apache.jena.arq; requires org.apache.jena.core; requires org.apache.jena.fuseki.main; diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java index 187d88fe..7a34f8b2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java @@ -3,12 +3,12 @@ import java.util.List; import java.util.UUID; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; /** * Demonstrate how to create a new class dynamically. diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index 70a2c6e1..c2fdef20 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -17,9 +17,9 @@ import java.io.PrintStream; import java.util.List; -import uk.gov.gchq.hqdm.iri.HqdmIri; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; /** * Interface defining CRUD operations and generic queries for Magma Core data collections. diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 630d16d6..5c131b66 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -43,13 +43,13 @@ import org.apache.jena.update.UpdateRequest; import org.apache.jena.util.PrintUtil; -import uk.gov.gchq.hqdm.iri.HqdmIri; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.IriBase; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.Triples; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java index 55bf0d97..49be86c6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java @@ -20,10 +20,10 @@ import java.util.Map; import java.util.stream.Collectors; -import uk.gov.gchq.hqdm.iri.HqdmIri; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.Triples; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; /** * In-memory collection of HQDM objects. diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index b694e48f..f9c69b1b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -39,12 +39,12 @@ import org.apache.jena.riot.RDFFormat; import org.apache.jena.util.PrintUtil; -import uk.gov.gchq.hqdm.iri.HqdmIri; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.Triples; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 598bc7d4..d3a0b64f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -4,9 +4,6 @@ import java.util.List; import java.util.Set; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; import uk.gov.gchq.hqdm.model.Event; @@ -15,6 +12,9 @@ import uk.gov.gchq.hqdm.model.Person; import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index 6c15e2ae..3df8e307 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -2,8 +2,8 @@ import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.IriBase; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 88c93afe..884e5152 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -3,11 +3,11 @@ import java.util.List; import java.util.Set; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.MagmaCoreService; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index 89317430..cac861e3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -2,8 +2,8 @@ import java.util.Set; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index 7e8d5085..d9904b31 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -3,12 +3,12 @@ import java.util.List; import java.util.Set; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.iri.RDFS; import uk.gov.gchq.hqdm.model.Description; import uk.gov.gchq.hqdm.model.Pattern; import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.DbTransformation; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index 7b56a44b..c7d8a3ad 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -2,8 +2,8 @@ import java.util.Set; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.RDFS; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.DbChangeSet; import uk.gov.gchq.magmacore.service.DbCreateOperation; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index cc4b1f41..6d786ef1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -2,9 +2,9 @@ import java.util.function.Function; -import uk.gov.gchq.hqdm.exception.HqdmException; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.exception.HqdmException; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java index 61df9991..b7cad1b3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java @@ -2,7 +2,7 @@ import java.util.function.Function; -import uk.gov.gchq.hqdm.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.exception.DbTransformationException; /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 7dcfea68..9361d8d5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -5,9 +5,9 @@ import java.util.Map; import java.util.function.Function; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.hqdm.iri.IRI; import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java similarity index 88% rename from src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java index 2ad298af..36e68883 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; @@ -8,10 +8,7 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; -import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; /** * Check that {@link DbChangeSet} works correctly. diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java similarity index 95% rename from src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java index 780349df..1d9678c3 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -7,11 +7,8 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.magmacore.exception.DbTransformationException; -import uk.gov.gchq.magmacore.service.DbCreateOperation; -import uk.gov.gchq.magmacore.service.DbDeleteOperation; -import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. diff --git a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java similarity index 90% rename from src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java index a373215e..2e2d50de 100644 --- a/src/test/java/uk/gov/gchq/magmacore/database/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java @@ -1,4 +1,4 @@ -package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; @@ -9,11 +9,7 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.iri.HQDM; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; -import uk.gov.gchq.magmacore.service.DbTransformation; -import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; /** * Check that {@link DbTransformation} works correctly. From c4d0b4958ade2919d1ad95fa647e6827ab669c66 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Wed, 22 Jun 2022 09:08:52 +0100 Subject: [PATCH 50/91] Fix the pom dependencies for the modular and changes.' --- pom.xml | 4 ++-- src/main/java/module-info.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6dbad682..b7468332 100644 --- a/pom.xml +++ b/pom.xml @@ -81,9 +81,9 @@ 2.17.0 - uk.gov.gchq + uk.gov.gchq.hqdm hqdm-rdf - 1.0 + 1.0-SNAPSHOT diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 5aed7af2..4fb844ec 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,6 +1,6 @@ module MagmaCore.service.main { - requires HQDM.model.main; + requires uk.gov.gchq.hqdm.core; requires transitive uk.gov.gchq.hqdm.rdf; requires org.apache.jena.arq; requires org.apache.jena.core; From 99573c5977c119b0865fe152a3f27489e9a347ac Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Jun 2022 09:35:00 +0100 Subject: [PATCH 51/91] Delete out of date diagrams. --- builder_deps.dot | 92 ----------------------------------------- dependency-diagram.dot | 20 --------- dependency-diagram.png | Bin 21133 -> 0 bytes 3 files changed, 112 deletions(-) delete mode 100644 builder_deps.dot delete mode 100644 dependency-diagram.dot delete mode 100644 dependency-diagram.png diff --git a/builder_deps.dot b/builder_deps.dot deleted file mode 100644 index c82e841a..00000000 --- a/builder_deps.dot +++ /dev/null @@ -1,92 +0,0 @@ -digraph { - layout=dot; - rankdir=LR; - node[shape=rect,style="rounded,filled",color=black,fillcolor=white]; - - subgraph cluster_classes { - style=rounded; - label="Roles"; - - domesticOccupantInPropertyRole; - occupierOfPropertyRole; - } - subgraph cluster_events { - style=rounded; - label="Events"; - - e1; - e2; - e3; - e4; - e5; - e6; - } - - subgraph cluster_individuals { - label="Individuals"; - houseB; - personB1; - } - - subgraph cluster_states { - label="States"; - houseBs1; - houseBs2; - personBs1; - personBs2; - } - - subgraph cluster_participants { - label="Participations"; - pHouseBs1; - pHouseBs2; - pPersonBs1; - pPersonBs2; - } - - subgraph cluster_associations { - label="Associations"; - houseOccupantPresentState1; - houseOccupantPresentState2; - } - possibleWorld[fillcolor=lightblue]; - - houseOccupantPresentState2 -> pHouseBs2; - houseOccupantPresentState2 -> pPersonBs2; - - houseOccupantPresentState1 -> pHouseBs1; - houseOccupantPresentState1 -> pPersonBs1; - - personB1 -> e1; - - personBs1 -> personB1; - personBs1 -> e2; - personBs1 -> e3; - - personBs2 -> personB1; - personBs2 -> e4; - personBs2 -> e5; - - houseB -> e6; - - houseBs1 -> houseB; - houseBs1 -> e2; - houseBs1 -> e3; - - houseBs2 -> houseB; - houseBs2 -> e4; - houseBs2 -> e5; - - pPersonBs1 -> occupierOfPropertyRole; - pPersonBs1 -> personBs1; - - pHouseBs1 -> domesticOccupantInPropertyRole; - pHouseBs1 -> houseBs1; - - pPersonBs2 -> occupierOfPropertyRole; - pPersonBs2 -> personBs2; - - pHouseBs2 -> domesticOccupantInPropertyRole; - pHouseBs2 -> houseBs2; - -} diff --git a/dependency-diagram.dot b/dependency-diagram.dot deleted file mode 100644 index d8a655a6..00000000 --- a/dependency-diagram.dot +++ /dev/null @@ -1,20 +0,0 @@ -digraph MagmaCore { - rankdir=LR; - node[shape=rect,style="filled,rounded",color=black,fillcolor=white]; - - jena[label="Apache\nJena"]; - fuseki[label="Apache\nFuseki"]; - - subgraph cluster_mc { - label="MagmaCore Ecosystem"; - style=rounded; - - mc[label="MagmaCore"]; - hqdm[label="HQDM"]; - rdf[label="HQDM-RDF"]; - } - - mc -> rdf -> hqdm; - mc -> jena; - mc -> fuseki; -} diff --git a/dependency-diagram.png b/dependency-diagram.png deleted file mode 100644 index c23d8f01c1f143269a09187a5095ea9366835ab5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21133 zcmb`vc|4YXyES|ol914#%pnbkWF9gmMbRY6REWx$d7jf?2#Jy@X(B^rGG$5#Df5_l z%#_TY<#+GBpS}0H-{<+`eXsj-f9`Is%XOaL@9{m3b*#0H^MS^>Q`@PSs0f1Cep*H8 z0zr_};lJdRr1(ii$)YI!hvJ6nDJ5cK^FMKgZ^8(IgE*}uf64L1M3A%k^ zEGBePcvYz{Tsa_i?Z~ymx(bOJ^GVn8I&*ccRWp+;TrTWtXHk#P7N162}Ehx`zun)OdEv(UHrO`jkl$l-_a2 zXos{Zy*Wy~o%VQhsH7Rh_;FA&@I{*Jr}QSL{{QkTPRf_x83pvDT^5ovGc!MY_>hxx zh0foTgYp+63++K(-lPv7WZaf*ZES3g9Xqz(96W8k-uC+S>n~rvL`FtFf6m14z{tQL zE-tR*?|od$;-gZ7%PJrWvZuG|Lj@w#hx&#` zZY<3X{_Za9_~c}xq4C()w|u(Hn}hPR#)S*thw7rDoSf%XEIQlabX|+*emUnGzNCzGJWjs?jCPRO)%k? zmGvkQ3JMA$2pgNZ_V#vqT1z>Xzf+g5T-mW>hrrRJ7PoHYx%^E@OiT<7y>Q_|sAo`Q zM8rW(PR@e|Bj)v6Qgl0t+zPzCy*-1z6vo7`B`bQ~tN8x?dwIEUsljwUSG`kqdir@~ zWgc#B-xk*RzJx|oAt51xFfkbxi2d;P?c*m;$O+$j_ktWv$;9stP==_u&JJu_QKs^n zZBm!5C@-g+%DsB^>ihTa*F=|>mudUPOZAI4)}^A)Rf$rVia&h#aN2RT;t``$SIDrt z?wfPb47+!;Ugg>%tmY`Khiz+a7Cn6Uff~K|! zU;8xmrDK&sjpw+iXmd>s^+H&MhJitEq08U(p%Q1Gl{mS4caa-2Ub}YvXl>og z$oS^v%U?r7JiNTuE??fw&Mv^o`D<{nqI*`#V6DL6HwDq!(c!UgqxRYHXB&mQ4ILdT zBaMhCHk^gJSXup3r?z(K;e(8fjC=Oj4}XjP_)*Bi!-F%VwXxB9ZTZja>|Jy7$)8DA zY&M1mWH*+A!^3xv7t6@V%*@PS!+Cgkva_=hG%tKe2x+I;fp5`Lva8c%wEov}EV@2i z%gHY&AVIR?(=TEnG_GDdl~ z-R9!yhx+@E+YHs>6d4*Cvf1~Kj^*U$?jf8m{t)#f1a69rjg9w8N_qbb&YIKwNaO5a&6O0L(;RdYlamrH!FqRgQu=mx z>(QqADa2z@hugF6n46m)Jon=9)2BsFb39?y(jM!p4n1yLiTjTpMTwd-5gZ2(4*wZ% zp{1qWw{KrXMFj-~g`}h;K1HS}W&KNO!QKa_0z2C5(NpAh=lXSeR#x3>*X|e_Cw};F zHeN%Vyv#_5jEqb`zo_%)PrE;3ml2*kVcL3nDevD?5gcLFru!tLEsTxrW(Q7F_{k!Iev?=)wKpylxL(|D(av7bqV zXK$~8t>Kj`El58uE-uBj8Tc?lNSS?ne7yd-2({a%TTMI+50nxwJX7Oo5A3U#-B5~c zPdD63^frIEHsT>>(Md_t`0&y0}RBFCRaCoP@~F&wrs`^Kdusr%#`>Hteje z=@}VM{q8mI%HLg=p~f>8>#=@aaIdJSXmWvx!&D~;L1Q0g@T>g6jT<*o{&_uO6nOgN z$)$@I4Q1{a8fI8@NzPkipS?LAJb1w3Jvu&qQA6YH+qZH#8w(wlBR(||0%SzPt7;>m zmF4AtfB;kBc7wr2hwwjL`z8jb=Z6#{r)OtBW@iuGV(e}=LCyK|=T9H`u}B*`JEUEF zV0CrrIKjcgQ`yz!R#JLobaa$i)Qs4ed?^>N(J*Nww9otiLA*^$3TBsGuMRsna&crw zYg>j%!p7Q66*~!m8Z+WyXJXWGc`H*UO)j*fo)nrEE%wuJ@qWlU_W<&7KPJ32ZV8q!P~Ip+_v z&~7CR)%gq%(Z~$At7TojE zxCSS%@pV3GYP75eTbD!0tWFV2Ot&lLPJj)Ze(A~29e>R9_4SK)?zmpj(Q!>rZyhNR zWho;&n}c;iH{vb=}x_@b%d!Dr)M$fB>x)A*@~xJ`yA2a^%PnBV*%6QDfS{r9XE$ z%pN>^IGgWEqLXtoGxW)m`I(t_si}Ye{OQWP)#Pc6&+lN99_jBddu|@R)Wf_+>HYTI zJ64IiD5;B!i$*tZo>5huV%~$k3WYM)2|R6-hTB z{H7gUO-&CaWe*MA%=CMr3IqfggHkHaa#TblTx9LS<;y?khU+EBn|}V>&C1FzAmB0Z zCB%ORyS=^r%fNnupr;S1ixPYD`n5%S<^vHsHvd`Ey{=9Y4I`v;6QNqiHT3ZA}DAdbPJwd-c7_IFr}qC%gPkB zwcA=+a`N++OMSMET&%9HMlN~!^l7q>`|2XS+nICcEKuL-V`MTiGe6xOJfox2`8Axk zvAIJaD<>y|ot`K$5L{oKQ%4Aih=`y9M+oR6lXVw+$O77Ma~q+Guy`YJ#mC2^9ufos zbK6dyv>dWz-2zQ{`S|>N=c&%TWW()RY->4bX@XKx*K~AT(;~{&qILxGNOy@S{_dO2 zq%IfO!G1#NjfhsUyPKXKTfTMKz3r)bg*Swr2{Z9?a^Cp<>NG*v+5J)Ur_IXF7J8!I zLtx!pb4Z)D?EZBA{P~cuFe#UX38bve5=Jh$8vRDsG3wOK(eH_bCsHHL;Y7t&Qwxiy z;o&DwozBY2iZATk$-rPL{5&wQt}2+lAV0soqeJz~8H?^u)%kJEH`gYxjeu+-hy#+} zH_jh=;<3JTN?koTDsccf60muGex9PBurl%9y?ZzkZfCy`s7kk9FmcOXv!0<3qx>}5MUUD)GD>JD)ONsOf|8pq^3uR^Ht5@6693&+r z9aM`nFfn1=y<0?USa3wuNJv{pXBD|}gyuF~IZ16s&!KDoya*z!+LvtA(b&wav$gfU z-L8hWBrA4q;|8IA9P&Q@f48ImwZAnRiZvE`h7^Iz0<5w{G3KcyZ^QZQYj7fDBMY2dcvc2M5!GPI_Lwc1=}PwWGb=*~KM2Xiy(ej~~BLj};XYYZ|q67g&~(Y#5yfn!wNQ`T7criXtD? zBY1)Txa=j#UlkNc@$sqY>dJ6)D=8}WuP)8u7Fk(YwTgQb;@`Y^laew8JdVx{SX@X@ zaB*okmY0_|{lu-Z%i7vYbM>;!d-vk<#U&-X^K9_$ls9j-j{jZpu(h>)5)lzA>!GKp z$c4X+Z{XugE+}yE?dFQP0c3;M;Gf;0)kX*ha(T^UEqR_Wr>?bYay(&IlC``z?tl0& zIpX#R-KL1JunPBgFS4x$7J~t$2AxH29mqD9E(sqxbYCIffVELW%_wFg*xWSoPpkM4B-BNpaS~@B`d~-8QO(UbD>zaak;wC1{ z6crUEBoNws$%cK~eM%{5X_e{9Yih>J{C8;iAHS{f56AH3>(}RzkyynWthAO)%*>mUP!0)H(@{F3S6i_$1N@%`KFjoA;Ki#<;(j@FQcM54z1b9%pThH5CAPi zCE(%1&yssA>>M1B;vU_ zWUPfQNl8iRMRasQK|x;U$=umZkPfC``*v3TVjf>|T=(|vC+P-Ig|w<>?QA8x+S&l} z*U_hIRS7-J%FK+6ib{I_zWK)w1J;@rK-IVJ-#?Fv%E`<$V5Mf4c3;)f)9Y?)dsfqN zQsIdSH5C;%H@Ex7nnTQ(zZNMeX?b}$XoGax0bXw(p9f06)>i(e(;EF49~p@hGJY5z z-#1(zn;zsBhB$b3++=KYG(K9W>K<12{P{-Njn%NI&!0n0u3f!~%mR#B)HX$4cIr(N z0v(MGDPbBE+qwQkG+jenIzr0&d$y!;o(Rw>9oG}SOPloJg2##E2>ng zF-VgM@891>qo59an3h!FB!3)Y0O%4)I+Cl!?lNq_#f~$a9!Y~XF@<*HPhY(n zKrdF?bGz6W?*mWtS(IDs@Zsvl#`DNP<8qZe4i0~@5$GS1$(CABUt>QLu z;OC!21Vl!D>AAi1!h~JgQP5#Zhn}8(U2}zhCq4Z$G0X0MB4t1yNii=k4?wU=^6{~n z_I9S=Ds&%o<8teNru!77*({BXv0bFdlMzu-H9ggpi!V&{i(Dnl+lAMgx1Eg=-Q*Fp zPR*o(R5%h&rJmV~mR;?+@aebbmH|u-o_)@}e?P8?R1ECmk?>{Q({%c|6T@w&!|d*h zUd46_V`F2$FIAEcJ>pACcJgZ|IDRhU0>Nh%y^<+wxg?yAGaP~@_(VtxFpUF z82rDJX6uwJx@XS3&&aSLr!7y!))B<;&gihPi@LgX%fEq{Z+?5R1g^$b^PnvkTd>33 zyGVA58!Ncxfq{WtjEuZTj(m$eR`&HPfTe3mJ0-a{8p}_gR-YWc*qWNQI6Hbn7PKu& z4mU$JG9oz5v@2p-(rs;Rz;4Wf0q-t?sgkrSd86^!{(JHAPl|-4R~ccUp`^sL(@p0X z=Yy_U`iw*`3O5VY{KCS^LQaBMT3RA|YHe#vP9RgXG&j%git(K2D!79DEiL^iH#avi zad4`u03aBx(dpBtxptP&Er(Fq~npuv%{~K_DC6u%rAvIk}yN zMp#fV*KWKS$P#C-tE&s0tv0LwKAK7(P*x5Zmx}ce|X#40l zS0I)tp|Zul#!-3n^lyI~wz8s)i7Rt_Vb!nx8%HR&VdkEdGyUa%A3@ZPZ)pv z__1hZN(%I!NqtQGwZ%W9p%D=+O-+Vt4iyh~6Q1CG=XvLTI!3C!&dpr}d(!p@Wp8n1 z#fH|vXx2F|W0+gB779I|;ufPK)h`q%bF8w2jGm|w1qaI4az&to8=-bz? zRNJ>2P;khTrv0A+GcSDP}$F(iE;_KHjwDCB>-@bht*?z;_Eq|HyPTg}6!t+i` ziuIx62GSF$PfnuGtE%$1A-EDiiWU4Wx|U{8I#?62^i%DavwD87L3X#ffdPk4=^|K# zR|npEf>=S|T<_@yaWYi&UmegX#&UGD!^| zP*I_bKBum#DuqNGer5{+#G(W$lbrm8w9|#RObA|JI5Dx7s;W~bPx=-2$k1k6bUjST zYP2kXNPsh__sNl-oxT3L1K=DmQ6@=rR!EC_%asrnZo>2F)8;Fxw0n0HfPJL!iBCv4 z?kh;{rJR6RuSa8f{=7BNJwTY7o16EEk+7d3BRnj1z^ENOQ{iP861 z`%{x{1f+kbIoaC5K} zLrzxKCK;v1W7D2_%k8EAWl@}5Yf%9Mozx4ic(zh29hNh%E~16K~Noh(J+VfSGG=U+PDPPP$5^e^&? zrZ?kBdub}se3B4|tHIZ+5i@BGrkMzY#!*{6L%Kt@Ph2f61teFM09DG$xI{!Q%iS>z zdKmUiKXOo;kTWnau(bS*8*SXch4tjyjn~Lp6P~#G*0#38hYq#2wvLRB0{g@akM9vv9GCodCXrY#(!nQHh_x}Aa=+2Jn=Fis%6m#?N6oDiFppQ7JOGQPM z@3vx(Xz^bL-%3sFMFTo~oe^8qh}4j6_AEJhBDHw^HuQ(7DZMLKhDS#qthbUAt80II zHdg0?al666!8tiO0J*`k>yFdCrC1L@&AI-<0a?lDZw7*IFWtU*a|qnjz16NerlwkJ z#jRUKkaoRG3+~73OJve)g^)l_#EC^~=Wf_;f1Qx93Eq)hV}y*)0L;3&N;^vpCKUy| zdH?<^5*C!B%a=v?`2$z>D({taIt!8(tl%C2z2vuV7jc7eVh0`HZ{`=0eT{Y%E7o>) z+i7Wo0s?4gY4NQ=4;~=+*ahDuzIih~I_kC2t^P{m(1^Xzvw*U`23buMRWOAf5LK3U zweLCZvS2n}EW5tQMU-@QvaF?U7QeWnBDOUdaf3DT&n-PKrlzJqGJ%jt&o*mK+m9EZ z5;r%wc^CjD8G({M3djJG5``PA0O9%V+c_>SuBj`X1FNcMtQv-bP_dyc>F3*?K7XFR z@bU0>5ate`_!jul2#iP(1Qa|{f~Hy0E2cbkA@J17v-r#DRvV*CG$AS=3|vva(D4Bm z{wJOwIXN*QEFyxc(Kv~e3l1376>pZlx`qWQOt@1jal*OvuW0`V!smEaPu+WL1T z%R9SaD+L8k%-xNn>3q8Rwv;Y2Y~Pd&t`$1}xiVhfXSFsZn-=>B z49R`SjLp@%x`OobtTfJ_Cm}{!BA(T#Ujc!z!dzfn^K?72Xk0Lag}T~Wbe=j|TDi`D z#z0rO|Lt;k!PQ5%p1h!C6RF;<`#iDn~h!sQuhl~kcF*!LIeVy7$U_j5q=5=HBc8Dg!g(7wL=((;ziI0(%7(`GH3ayr z^M{0lXrn_7V#U69a<`>2(96wbF#Bju4X-qimhk)C9i$;>fLphN+FMRSNYf(_u_&TdD(OdRls#Oo1D%ZrOYT3VnMfWN#|BIM`ihc*M0>vcP->u#O&VsCu-u|kvCB&5kIEj5|iH(1nASgzCLhMU%!3@5e?!dc_rpQ@v$GDmjE+2r|NG^ zv>jJft=ZJyDk?tcP4QkAdIl+CZMmL= zXy^z|p2TkfK^{GLa6Rh-8G(j9H8nLoeFoZ0Bmbo%yVsa2p;CDgf%|%mf{gxfQC`u;BKN|dKe}4vy1Zin$&?o1$ zC8OEs=;B_z%0vWQPSWJp&3~d0ALkM;Q2z7hAIRaReYmyE8ezgyiPKu*u0wgHPdua0 z$h-rnVV@7vm1m`a+4a!AEuR4#ZM5lXZeD27_lS>OM@m8_Ncg=wtooDNN_I#{BkD9d z83jc}aF963Uzzyk7iSF72oi*sT%@QuPC{5l#vGgu*yZ{YMK-3fDFR%lg8iDyn7(RX zyvTL%;3*C|G!D4iZ^qIizx8d47D|=vgM~qfM5fU;F`}Fa=nm`NF)S@A zS=mK<7LE#iefH(ZKj$i{s`Lw;vydd9h;J%2D9mUifJ4htm)q>@?N7KZXXfQOm2@GA zZLF{SE0BPp1!a9I;)-iE7BM0d-&0BAXwe7V{xB zH76sZe_HHv!wlu{>0y_cijT!4>a9{%aZQt#G&NstKSoX}4_M`PMqgi6RyJ1P&tI;? zha~_lO6{Sr54)exJbCiudba&cji>JTDH>XTuryFvujbtyMCXLK+G@t{x2SUV>?Fcq zFU54=3)_I-KHE=$g}it%%-_EXh5F7vuZ)i$S65fD4 zW}rol`mrGM+`;I2r>Alp0j-grQQvMF867%&_yZ^ksH;FnwJ_m4e8>8Q7)2DkR$?w!E>hpN?xPmJfZF(c?vJe2S0LTM1AAExV5G&|G zu&6g!zeK{eaz$TX;1aJc`tt+;5s(LMRT`mmWECQQiQ#@%;Hiuu__5&O8M1;+a5|e#64z=;6al{4eIw!UBBH{XHlYJ2&CI zg<6ICf|?qQN7CBUipol)KdQ?yTZr7eJQ>$TD{`iZqO<5I5t(dO&YH>hA3WgK{^%=m z;Z8DVSTz*aUn_^so*34KOoGlE+TK8omqP;`+9~|o2)Whg?B09fNJnEMBPB;|z2TF& z1il`v*$q||4U(&-IlsL#VB6@(h{om1Ym+%Wj_>y|J&uiy z{rGVf>yt)nMBw~_n*y8ySN0n4UoBFww5*H_q}r3L@Q4-$A)sSXM~gj}Fr5X|+*yR@Ug)7}LIe zf3C%{{-Vf#6_}D@aqSv&bGqwEP0c+aDm2@-S4ciSFMusqQ25-^!ZeRx1BEN>suNbflj}qt^L4` zPY3!fxMU6vPvr#A!=`pC3+6D!Sz5{-=~iS4ylH8v&KUyC7ih;S#Wod>aPo{r0vMc z@8aQ6xle;_@YIBX$DEK6=DlsQ-yx6O=w02Nqgn@Dq?a9=fe8^jYPi@=@2UuyAo%K?OkN zk#$=(LKAW0hS2rTCPtzcb8< z3zHp9-@gOnfgKkE5ensGzqb9ZYrCjWrxKArKx@PHB_b%;igpoud1{4E1)dmmvA|4t z%k$^YH?0j|=wH6PQ7n>}_7kiwQrM+SwlH#_6Fd26&tzxbT+Lu$@q2hKTU*5i1nOH` zBUcI?YcdE=zyTOD$Hs2kE-C0i>jbz!8Q8UFkLHyt9x$zy4<+qBBF=ISjQzE1E|8SL z@9Km0@nqlBVBmmTT3K;%ayotHOpxmfMSLhCH1saM8SMp{zK^N57VFR~;kZS?{*|nq z0cpT-`DG9lx+Pf5AV2cLm4fm#I$A3E(&MzMYSP=ctBd`?;K5g*M`^1H&whncgRF^& z{bequm--B$XKZAoprGK`WgQ^Dk^|D~!n;eQtbEWMV%UD1G-k6f@t5fv|}`3R@@4DT*oAYg^N<`{d?2f+|sA%Y6IxOIewZ90x=n z(JHRu< z(Wx#e&XBh-I^)Dc3^7ym=IB#;(*)J{i_u+O-Du?bjEoGl7a<|^#bd)JF~&|azbcTt zkPv*$C%V2sb$0wS_7f-K$IqYXL0eEsFM+t!)D+r_ViO2p3Wts%>n`$bj0@J&U>IDB zC3mUB_~9Orae(eXM5G06AqddY_0dueAkW*|uOcPERQU~Nyzw}Wk!vJ#$#U?Zq8EqJ zVR&Ew%*(cMtMwf|r7G&`JqRsa5dMz)%480V$N?$UB^;*0-cFhtXpO?dFC&>tl883< ztp)=!0zAsf$Uul52FlmXv4}<;YL=I8h}<%lOl*pe&!6MoPB>1>QJRQwhgIVv0YO2a zm%0(9SP0k}Hs8LNd@k7lH~K6xa&^8*9c|v{CF;U=??%CkZ+^?fgigNgXspLN>e(YZ z4Laf1y=k-t0ZomK$PEP^8%4pvJDSsJ)U>rFpgE&OLDvogGIk3k4!KvWYKy$#*4hkG z6EiawU}{!Yx5eq}s5nocVZC`{0$K?6raO0%K);|f0X!o!zPIE#>d zWFeBJ1^Mk{q4n3RJ>jvggIL6wMFgOK9G{x1loY09sxVlY_#!X$6Le{b_Nu&QTNRIs&`_4Vp!&u+(Fn9h4S*$<#!M2}`-WF+l8|D~aUZrm#OCpa{iuJI|< z8t{=2z7hDbb4Nk<`sy-r+~1PT9Kgat>i|DXto!mUI0{e?DkNDfkP6J(K5iyGR9e(C zF+st!^z_qb&$1@Fg6CA1U7JUf5JJP??Yr+&4C^fj|1iuhtuEP|I~N4gRCC`n1?zcx zd^1>@TTQRc!EHdVASd-I4Dj($yn6Nd`}bow%g`DHUzEXH^pf||--QKQ0jqVnQ>Ay{ zptyAlN7_!jVWc!dyO<*e()qba!Ru(KU=660e7gS#AD_~dI#_yWcI+^zv(P(#-iwEW z)QdwvU<3GQ|0PgB40Lp!OTH#7U#hG5^^2qr9N3bCOx3t$NZSkz)BCq?VNbsJ?h^Jd z9}NsVhbT0mD%`TN#mM^LpI|o?-UpuK)~!(#erx^x&(uKOA0rHKTd)d2Z9p8MxX^d1 z_HK(lXK7*KjvNm$0X6dx#}}yYmR5k(7FIg)^sKA{VbxmxWZMKH zP14bZAK>I<*tN^oj>EN~si}Wp;796*J%ndjpVG;b$AyH%CpubNO<`f+<=qUg^A29I z(b49>lQ74Jhx^&_J$?*>iy_LXG9Au17f`nj^fhQsWZ5@=S&5T+J&ueN?+rp-0Te*{ zCm$c>;wqG&07Rvn zg9i{|QWg+L3ly0@^YhpjL7JH0|70j2XE-WYPqjrddI~;te*Wl)2!A_1MeDy)x(koA z$>ky2U@3~tQs8Ys?Htjwu&_WT0Sy#c`Ar=*htg8{lP8Tc^L_`1uWB$Z})4?`@heZ7J0>=Y|T0zUbVzorQ4x_HgBovkf=gpv{xCzX_@k4c-_mPs}$Zj4P$p#{%|?Fy#P zw4jq5=$MduK4xTqfCKpmqeE_IdO^Xae-vQO`_Uw#3>brquyt_Qk?|hsQkqR)N2fNT zB<>jT&5}b2Bo^2S4xT1V82>$Y0=H|OccE5x^ z3k7KDLin3E!vXt_XM+uiXvbe0((Y5>48cGMFARZq?w|@iv=jG+0q_>6?Yb?V;l%sHJ*zwOI*F0pOE15=LgE? zW~X)eGEDK(#$R{Y+S!6_n%9QSmzw$!iW20W{ge!BY(W+tD+?b$=|LehH~#?k6ur$d z&+oR3tpxhl0ffuw=r*D?!(>N(4I~NdGWZyfCU!n%j%` zI4o=vxSs0LxbzK18oV!;Pv_!AOmwi!&)~W?-LUi%Tb}Y?<2iiTY4rO6;FyL6gBv$U z2|53zuV21QK;P$ooti3prv5+XB8F62)ey{VWVQhAPoR7eQczO)^fLK}wIG(luEf`Dxs5+MJb ze)y(~m|58rXaIJ%NiRbYD9= zJ8K0a89<~83=E|H4^uZ&r{7H(BsLaWkWFXaG&N2livR))(^dY5UHgvozbOezGYs*T zq_r6dWdg;kcNeGoHrpHh@qxWhLqkD~%ncetU*rl@MptWMe#_D__1!yp_8wpw^o4Mk zDJYN<7&A~yXhh9HZH28-nI{ZagslPv2;RgQ?H+Ch=0tQYn5^KrqFKfpeGZmaTq3|0 zj*Z8{#4{u>#20*5nkhP?LqnpZmZZYU1}@CBzcz(%KaMY;=3qF}(t+JkS63ne({oVy zE@*1f;==TO#t{W*+zEnQ9_s^A7seAfdGg>G$CrZv!+1mn&+D1#>5@JxBxbbT0A^ye z{uur{9#(B;X=&26`2EKZzC(u${^_IO3nK`2_E}jmJ`kZr+L0=oIT#;pXK0R?{k^t0PVSHA7j z4$&i%J;fUl`tDc+6;;(T$vw5OHX;qkK&(UGjuy=7`yLh3(($(Q+jPUhJV{7NfvOYG zN+ZVa3(9dbK%f65>?o!$9UUDzKRGqQM#iJ9B3>#jwFgxU1;7U5 zpCBWU@?qV)i!9%8@0OHQLFwx*Z;o2LO*!t4_;XC6Xlu*3EYOTwDbq@B?2$~|L%!`` zq)8Pm0F1A%FNplwSlJCkoR+`OGZMzx_sPkf+2+hXr5Kljn;gR)H}zNUq#2iU+!sJ+ za1kdO-0v~VZfWRDXxj}~X(_%KeS~Em8XMg2c2MRN70c9PPhiRfV`Q#Cj;I_cdiW8# zr7n;^4Z3LF5WD?Y(%ZN5t@=I#q!_L+#HDW?YD-sEQX0T&fapZWn(wi3qPZ_Xn4O&+ zX60+wI@mo{X8?C_%;C<{%fg816K7Dcp zhrn@rDD5#L?O$2hE{ww75@uR_Ztv(c6QeF9Tn3gGGU}&Rlnhl8&Ei>CMI5l zhN7L=fP)OAknybDB%kfNVzYwYgu2`M>a)2b0D83Njg5_zELHeYfmih}_YHhhz9aUT*2tUTPu^0OMZf;}(OO``debw(huD_q-zFeOx2$ zP}?zD`Nv2h=q8R{%jP?FjD8%ty#c0dnV6W8x0w15K^Xaf6rBLdT!pQZj}InO1!Y zQ@lg5FgpnFefzeVw7f-af`$Zw0oXZJCvTH!#XySI)-9Xe z=6-@OH8Xo5>){Rp82H&%EN;^dryh;Y>c!vhGs;Ti0lztbTBz7Dd#W^ z526gi>|ef6j^}b*-#W)P?*TP*ptn~8YFkXqQJS4`pOBV8*MlBJQ-#`(4wt})`Tr({ z!BHuMuI=yJ{B$Z(9CZE{FJ3GzIwB<{mwCkes3=wGxH-maXMk; zl0UoRHsrY(`hWex69qmM7Q!8y#u`N}Z%9^~q2WR4?d#`e=i)=4Ot zoYLI(F#Uk3K}Sai=NV$R9A`)x?N)DPUM$AB*||C7I`_pse+W^nCwF<@qrer29}^Y* zR#yl64pKxj%mV*>;6S8Fd}>2uqZ0t1@3x(_b#;EXyL2d-`0?0;qI2iY9p&OG!`yat z=z*2LzpEr!D4C40arb%2N&7%th4GxFqND_oitX}@rsKG;I(=eqc@!KmJ9Y$P(V#nn z+1oR2#bLV3(`nByZFzYwP~y;r?%w@~;ojyxIS>$&8FckvJGC!ediDDCO>AUj?L?mMmzS=HeV9;|5jrTXyDNH#4Il;6{9qm<1opAO;snvBw7REMNycIouVHE5NvGZKago>(i1!=K+EX+kvk{ zroumhFv1y=53>>EiemxWz0EX-u*9Tu;cn1vu&iyiOLCVi8pJMzL z`$6X*S2FvPf|Y<}V6WzPzc_k|;SjGy&vS18S;ACaVXh3*h)_QTYB(rA+Kzrl@;MrD zQ?6wLeZI+n)(~h8^F;8K)sf226v-@;9f2k(M|qZJz7!(CU|oB z&aN(4(9(k_8Ey;KD|lBJ2tv<*^$|7IdqM1RXs9!Kl;RsOe<5=KdjkRjTu1s!k|U*V z3MUsXfb`a?BHbp?YC#0P05<|Q5LR^j1E#5+lp78%93moiAO=x$K$rDIHxM9bEaj*b{YUmvFGZn+lg!pz&m6VtOAR-`Lc2eBccD zWm;CrOtcH1KP#N5qzJU%yk>EX`hg7xCa*dh#pkEcmU-(Um5Gi5XdkhhN39=7;$B`7yAducvo3_wC}(j?({lJjB1hU70DYIv_9* z4_XL){J8h^Dyk0F9^w~4=<9vgyuA4hyNGEJXQ}&|6XRcj~QivCPRtvmN5I85&_`5PPBm{7{yo1x)au(QV zWCCmJbO1oG3=rmr(;(91n0HjxFp~vpV+*wCP4tVr!i{5 zw2S+ZGy$dQvuQ@=;NtSBHu^tvEieTOZA6)DCfE~bN&W}E1*r%MZ|5gv(^{WNiUt*4 z0Rhy|Q*^#jpK+$(i&0`vy_yB&xcR`Ai7m)=r@6mF!X+UfbB~z)f&rHBL}LYeCPAQB zZ9X;Ogod^@ehvf1{i!10d5~}75)$c0;DtHGj$MKuiHrbQ7>hUk*T(_;z!ANo(l5;z=q%*@Ug-A<>iHWL_AXi{sfTw zO4M=Yxj5V41(OTmnGApOgo2tZI<*&GEf_S6%~w~KFpDkh--|!!XXJdB(k88oV9%%2Q|A;)>+9G1Af&swx@y_@9)G6xj}w^IU-j(S z#HP`a1#AaunhmAlf4DHS&VhqHKEXz9y<9*&3#cxX#8AOrhN@_4R>ze zZm5D8Pee%QuD!joR3MD!O{SShpkN5#!vSjvweWu)4JU}q>hPb_AaCAXx(&exBdF;9 zVr5)z-n!)kVhUbHuqF9Mbp;QH zaf8<%K5Qo_X=uzKvS7a6#hHY_AY0OJlC7puvyXcYnDTke*~xR6|NF%CbYeD;RcE0K zhU@c_lhtr`RaGCYwP98oUAb-C6&!es#E!p%PW{jPwA+-w7ZgM!d6@U(13$g^w*l$t zl`SNW>@-ZwxL=5(#hu@}CrV?g4c8Pfy0mW|mXnmy%jRbt5|= z0)rcRh}pqIn`7}vln)+khIT~4EpY5mPP5J0KHmO$q={l!!&A zxa|o`ra(=7eGepjuq^I_ZE(_K%&wF{(n}5xsxgRlrto$oo#W&FK}U``x)|&^Jo$Ho z6p0c{Vc-D{Us4kwtD=%fad8=zn1DrusJvvyH^K}!6o1}RgpuYEf)|n~`wn@Ik~_32 z8oegeOm0Xfczgu-X&iTq8^9j<=n*x+f$6z3iQuj?Qe0!Do$jKVV{DGZzbyUrIy_={ z4i-E&dD+>UPkU*kAXzwV2KOOC;GZW+VRO;p;;@2Ro0#KNp!?hVhfnzHzlJyBGnjB3 zPAMrt^Q3SCL2QP}i4i;}%@gxd*jCV~z`qOdexDLU{=l>$sE7|&v&N8j5CpN9Hguqb zf(5$cNO-TL6JtCUrfV zKB`VnU%yJQ)<6&=TG#a6G_EgSE1muD=+Prc)Hp97eQw_5x%^d5#I2&Ls>Vo&rY!U7 zhs#Zj@^ol8k>oFNkyR9hQ*fVdZ}p;Zm;RzX-6bt8{o{64mnELM@ZsIN^oK219#jDF z{leHYOVuf5Wena#oz({_I}-l2t!-)PQMS%_qSzzzlHVk;%$~n1jfCFCC>4N?OgiLx z+1@_;OyX?}MjYD3LOa~sTk?JW&uSXn5;ZNbxEx~&1j+RDAyWY$7b^FT81hw`#~Hl^ za51v6vKF@0m=E@d)-KG>I_o*8gmVA6ulA-1kII5~#@^2EbmD~%ni!Xxx!H6@Mdb@d zMZnUI@aPFTWv3yOzbdfVbY4wF)c{uxJ}uv^B)6_x#UH#5$?amhR4$-u&r+%g^! z5pg;c{bgr+JCY<`PR`D^&CL^!Fj=$gpr!`&-e{ap{CWEr4QAzCPZZw`dnPg^=!K$^@0f3-5<3tE*2R+VyqtZW5WTq^_;4 z@V)D(RtX6S0P`nKoB%C@@p)7iTr0W}I6;uT3%}#RqUAqQ`hLl4Gpu$xfaZ+;P5hl0mN(!DAO+@>&1kGptq%H96~T?)RVH14)Dn-9tj5@@U6Zc4Sjsf;PI~R?o9%6 zc(}|%jG+Fa?WqQ$bZqRs8V|%id6}AF!KgZ5#=Chs?=CGbEyc5K6{o_xYS-4>0F*V8 zy4u^JGAYY^J4i?62lU49fV|53M+UK#bUdFB!V_bhoq-J`;m@3%W%wh`t`Pc4g&XM* z6r1Yz~d#yN*gr7OI3zpQ6Z4-D3$7VSiG4=4+h$s|M ziLARBsH{l0`Mepl5V(`5x~Y+oFLiY%Wtgl?A7_;G9SZ*nM;-#Pzu)jj#wWN#BkG5# z$-TjXU$dtrD`pwsv(kaF6Mt}Q>|r}Cg#=UJ(Bvd5R)C3#%EghaL;f2nQPSc)Y=9Y? kEUXC8d*@$2THgA1@9UkH7c1}-8G<-{@|;qNf`Rw{0*;l&ga7~l From 817bd7047c0adb7a493dae4eb966ae17d5a088d2 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Thu, 23 Jun 2022 12:36:05 +0100 Subject: [PATCH 52/91] Add copyright header. --- src/main/java/module-info.java | 16 ++++++++++++++++ .../McAssistMultInheritFromDataApp.java | 14 ++++++++++++++ .../magmacore/demo/ExampleAssociations.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleCommonUtils.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleDataObjects.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleIndividuals.java | 17 +++++++++++++++-- .../uk/gov/gchq/magmacore/demo/ExampleRdl.java | 17 +++++++++++++++-- .../gov/gchq/magmacore/demo/ExampleSigns.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleSignsRdl.java | 17 +++++++++++++++-- .../gov/gchq/magmacore/service/DbChangeSet.java | 17 +++++++++++++++-- .../magmacore/service/DbCreateOperation.java | 17 +++++++++++++++-- .../magmacore/service/DbDeleteOperation.java | 17 +++++++++++++++-- .../magmacore/service/DbTransformation.java | 17 +++++++++++++++-- .../magmacore/service/MagmaCoreService.java | 17 +++++++++++++++-- .../service/MagmaCoreServiceFactory.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleDataTest.java | 17 +++++++++++++++-- .../gchq/magmacore/demo/ExampleSignsTest.java | 17 +++++++++++++++-- .../gchq/magmacore/service/DbChangeSetTest.java | 17 +++++++++++++++-- .../gchq/magmacore/service/DbOperationTest.java | 17 +++++++++++++++-- .../magmacore/service/DbTransformationTest.java | 17 +++++++++++++++-- 20 files changed, 300 insertions(+), 36 deletions(-) diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 4fb844ec..549b3e9e 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,4 +1,20 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/** + * Module dependencies. + */ module MagmaCore.service.main { requires uk.gov.gchq.hqdm.core; requires transitive uk.gov.gchq.hqdm.rdf; diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java index 7a34f8b2..fd46bea1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore; import java.util.List; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index d3a0b64f..9c4600eb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.HashSet; @@ -22,8 +36,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleAssociations { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index 3df8e307..4412bab3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; @@ -7,8 +21,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleCommonUtils { /** IriBase for User data. */ diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index d73609ad..0729eb2a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.List; @@ -7,8 +21,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleDataObjects { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 884e5152..89d13642 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.List; @@ -14,8 +28,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleIndividuals { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index cac861e3..c2392d7e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.Set; @@ -9,8 +23,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleRdl { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index d9904b31..415f876b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.List; @@ -16,8 +30,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleSigns { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index c7d8a3ad..32b01e77 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import java.util.Set; @@ -9,8 +23,7 @@ /** * Functions for creating systems using MagmaCore and HQDM. - * - * */ + */ public class ExampleSignsRdl { /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index dcd842ae..f969cc03 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import java.util.Set; @@ -6,8 +20,7 @@ /** * Class representing an invertible set of deletes and creates. - * - * */ + */ public class DbChangeSet implements Function { private Set deletes; private Set creates; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index 6d786ef1..dd45ad2f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import java.util.function.Function; @@ -10,8 +24,7 @@ /** * Class representing an invertible operation to create a predicate. - * - * */ + */ public class DbCreateOperation implements Function { // The IRI of the Thing we're referring to. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java index b7cad1b3..b4a90b2d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import java.util.function.Function; @@ -7,8 +21,7 @@ /** * Class representing an invertible operation to delete a predicate. - * - * */ + */ public class DbDeleteOperation implements Function { private IRI subject; private IRI predicate; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java index 73ee160a..feb6fab6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import java.util.Collections; @@ -8,8 +22,7 @@ /** * Class representing an invertible ordered sequence of change sets. - * - * */ + */ public class DbTransformation implements Function { private List transformations; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 9361d8d5..4857ff2f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import java.util.HashMap; @@ -12,8 +26,7 @@ /** * Services exported by the MagmaCore module. - * - * */ + */ public class MagmaCoreService { // The service operates on a database. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index bc1cb3db..45fb1d08 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; @@ -8,8 +22,7 @@ * Factory for creating MagmaCoreService instances. This * removes the need to expose MagmaCoreDatabase interface to * clients of the library. - * - * */ + */ public class MagmaCoreServiceFactory { /** diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index 6cdd0b9f..eb23a3cb 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import static org.junit.Assert.assertNotNull; @@ -8,8 +22,7 @@ /** * Exercise the {@link ExampleDataObjects} code during the build. - * - * */ + */ public class ExampleDataTest { /** diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java index 04d526f5..b2c5ff01 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.demo; import static org.junit.Assert.assertNotNull; @@ -8,8 +22,7 @@ /** * Exercise the {@link ExampleSigns} code during the build. - * - * */ + */ public class ExampleSignsTest { /** diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java index 36e68883..7f5f4fc1 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertFalse; @@ -12,8 +26,7 @@ /** * Check that {@link DbChangeSet} works correctly. - * - * */ + */ public class DbChangeSetTest { /** diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java index 1d9678c3..f1a4cd51 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertEquals; @@ -12,8 +26,7 @@ /** * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. - * - * */ + */ public class DbOperationTest { /** diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java index 2e2d50de..d1b63258 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java @@ -1,3 +1,17 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertFalse; @@ -13,8 +27,7 @@ /** * Check that {@link DbTransformation} works correctly. - * - * */ + */ public class DbTransformationTest { /** From b5c774055c14b964757772c1f960151c58e19eca Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 07:58:50 +0100 Subject: [PATCH 53/91] Update checkstyle-suppressions.xml Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- checkstyle-suppressions.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index e9eb5578..0bfacab6 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -3,5 +3,6 @@ - + + From fed45d64e069b0ff2ccd44ffc7ad56f3b47e91e2 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 08:05:31 +0100 Subject: [PATCH 54/91] Move McAssistMultInheritFromDataApp to the demo package --- .../magmacore/{ => demo}/McAssistMultInheritFromDataApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/main/java/uk/gov/gchq/magmacore/{ => demo}/McAssistMultInheritFromDataApp.java (98%) diff --git a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java rename to src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index fd46bea1..48eef75a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore; +package uk.gov.gchq.magmacore.demo; import java.util.List; import java.util.UUID; From 88632a91f86f7b9eb0514993118bb6fc665bbd57 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 08:13:03 +0100 Subject: [PATCH 55/91] McAssistMultInheritFromDataApp now uses the 'uid()' helper method. --- .../magmacore/demo/McAssistMultInheritFromDataApp.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index 48eef75a..2eb7d3fb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -14,8 +14,9 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; + import java.util.List; -import java.util.UUID; import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; @@ -43,13 +44,13 @@ public static void main(final String[] args) { ); // Create a new object using the type specification. - final var orgState = HqdmObjectFactory.create(UUID.randomUUID().toString(), newTypeSpecification); + final var orgState = HqdmObjectFactory.create(uid(), newTypeSpecification); // Check that it implements the two interfaces. if (orgState instanceof Participant && orgState instanceof StateOfOrganization) { System.out.println("Successfully implemented the Participant and StateOfOrganization interfaces."); } else { - System.err.println("Faile to implement the Participant and StateOfOrganization interfaces."); + System.err.println("Failed to implement the Participant and StateOfOrganization interfaces."); } } } From 33785737f0b23b20721d3713a789b41b86f4130d Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 08:43:32 +0100 Subject: [PATCH 56/91] Fix missing @param --- src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 89d13642..82463c17 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -34,6 +34,7 @@ public class ExampleIndividuals { /** * Create a DbChangeSet that adds the whole life individuals. * + * @param mcService {@link MagmaCoreService} * @return {@link DbChangeSet} */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { From fb8e200f5eddfc07217b7aebd4e7d5dd1d925c5d Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 08:50:30 +0100 Subject: [PATCH 57/91] Resolve review comments for FusekiService. --- src/main/java/uk/gov/gchq/magmacore/MagmaCore.java | 6 +++--- .../demo/{FusekiService.java => FusekiServiceDemo.java} | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/demo/{FusekiService.java => FusekiServiceDemo.java} (90%) diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index 205ad46c..6e7b24b6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore; -import uk.gov.gchq.magmacore.demo.FusekiService; +import uk.gov.gchq.magmacore.demo.FusekiServiceDemo; import uk.gov.gchq.magmacore.demo.JenaDatabaseDemo; import uk.gov.gchq.magmacore.demo.ObjectDatabaseDemo; import uk.gov.gchq.magmacore.demo.RemoteSparqlDatabaseDemo; @@ -54,12 +54,12 @@ public static void main(final String[] args) { } /** - * Executes the FusekiService. + * Executes the FusekiServiceDemo. * * @param populate true if the dataset should be populated with example data */ public static void fuseki(final boolean populate) { - new FusekiService().run(populate); + new FusekiServiceDemo().run(populate); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java similarity index 90% rename from src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java rename to src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index 875704eb..5d180553 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -24,7 +24,7 @@ * Example use-case scenario for hosting {@link MagmaCoreJenaDatabase} on a Fuseki server. * *

- * The FusekiService class can be used to host in-memory or persistent Magma Core Jena Datasets over + * The FusekiServiceDemo class can be used to host in-memory or persistent Magma Core Jena Datasets over * HTTP using a Fuseki server. *

*

@@ -37,10 +37,12 @@ * {@code localhost:/}. *

*/ -public final class FusekiService { +public final class FusekiServiceDemo { /** * Run the example Fuseki server. + * + * @param populate true if the dataset should be populated with example data */ public void run(final boolean populate) { // Create/connect to persistent TDB. From 54408daf3392a179f9111c1dbf76c1d4ef19f5f6 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 08:55:19 +0100 Subject: [PATCH 58/91] Fix broken javadoc links --- .../java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 875190af..1d33bda1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -18,15 +18,14 @@ import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** - * Example use-case scenario for {@link MagmaCoreJenaDatabase}. + * Example use-case scenario for the {@link uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase} * *

* This example demo creates an in-memory {@link MagmaCoreJenaDatabase} populated with the * {@link ExampleDataObjects} as RDF triples. *

*

- * {@code PersonB1_Bob} can be queried for using the - * {@link MagmaCoreJenaDatabase#findByEntityName(String)} + * {@code PersonB1_Bob} can be queried for using the `findByEntityName` method. * method. The resulting object(s) of this query are output to the command-line as RDF triples. *

* From a786194d1c56388795f1382c0aab6aa965ed1f7b Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 10:09:29 +0100 Subject: [PATCH 59/91] Update src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- .../java/uk/gov/gchq/magmacore/service/DbTransformation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java index feb6fab6..959d3135 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java @@ -61,7 +61,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { /** * Invert this {@link DbTransformation}. * - * @return a {@link DbTransformation} + * @return The inverted {@link DbTransformation}. */ public DbTransformation invert() { final var list = transformations From 1a0bd2c94a647eb4e59892ab48d5e9e6f6c2606f Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 10:29:29 +0100 Subject: [PATCH 60/91] Update src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- .../java/uk/gov/gchq/magmacore/service/MagmaCoreService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 4857ff2f..e168fe51 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -44,7 +44,7 @@ public class MagmaCoreService { /** * Find an object by its ENTITY_NAME. * - * @param name the name {@link String} to seaerch for. + * @param name the name {@link String} to search for. * @return the {@link Thing}that was found. * @throws RuntimeException if no or multiple results found. */ From 806cda840a04bdf3abd1aa88ea32320ef42df8a1 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 15:30:28 +0100 Subject: [PATCH 61/91] Fix javadoc errors. --- .../uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java | 2 ++ .../java/uk/gov/gchq/magmacore/service/MagmaCoreService.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index b23ac855..ffb516f5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -30,6 +30,8 @@ public RemoteSparqlDatabaseDemo(final String url) { /** * Run the demo. + * + * @param populate true if the dataset should be populated with example data */ public void run(final boolean populate) { final var mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 4857ff2f..46b2ea6f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -44,6 +44,7 @@ public class MagmaCoreService { /** * Find an object by its ENTITY_NAME. * + * @param the return type. * @param name the name {@link String} to seaerch for. * @return the {@link Thing}that was found. * @throws RuntimeException if no or multiple results found. From 3d13d00d4db4551c25295ccdeea490c31f876d59 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 15:45:36 +0100 Subject: [PATCH 62/91] Renamed DataObjectUtils to UID and fixed the knock-on errors. --- checkstyle-suppressions.xml | 1 + .../uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java | 2 +- .../magmacore/demo/McAssistMultInheritFromDataApp.java | 2 +- .../magmacore/util/{DataObjectUtils.java => UID.java} | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/util/{DataObjectUtils.java => UID.java} (84%) diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 0bfacab6..df82a633 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -2,6 +2,7 @@ + diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index 4412bab3..8b41672b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; +import static uk.gov.gchq.magmacore.util.UID.uid; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.IriBase; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index 2eb7d3fb..f93103cc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore.demo; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; +import static uk.gov.gchq.magmacore.util.UID.uid; import java.util.List; diff --git a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/UID.java similarity index 84% rename from src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java rename to src/main/java/uk/gov/gchq/magmacore/util/UID.java index e67c062a..8c1cebd0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/UID.java @@ -17,16 +17,16 @@ import java.util.UUID; /** - * Utilities for building and generating HQDM objects. + * Wrapper for UUID to generate a random UUID {@link String}. */ -public final class DataObjectUtils { +public final class UID { - private DataObjectUtils() {} + private UID() {} /** * Create a new random UUID to assign to an object. * - * @return A Random UUID. + * @return A Random UUID {@link String}. */ public static String uid() { return UUID.randomUUID().toString(); From 40d248eeaf69ea4a5d27a82587ce2171fcfc8892 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 16:04:19 +0100 Subject: [PATCH 63/91] Update src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index f969cc03..df46f8bf 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -62,7 +62,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * Invert a {@link DbChangeSet}. * * @param c a {@link DbChangeSet} - * @return a {@link DbChangeSet} + * @return The inverted {@link DbChangeSet}. */ public static DbChangeSet invert(final DbChangeSet c) { return new DbChangeSet( From 7c24c1b71bdb88d0c727d9ff9fa164141ab75cdc Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 16:14:04 +0100 Subject: [PATCH 64/91] Update src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- .../java/uk/gov/gchq/magmacore/service/DbCreateOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index dd45ad2f..d7347db0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -84,7 +84,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * Invert an operation. * * @param c {@link DbCreateOperation} - * @return {@link DbDeleteOperation} + * @return The inverted {@link DbDeleteOperation}. */ public static DbDeleteOperation invert(final DbCreateOperation c) { return new DbDeleteOperation(c.subject, c.predicate, c.object); From c39bad1fb0f0da1b1af559bae5f8ba401bc825c4 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jun 2022 16:14:32 +0100 Subject: [PATCH 65/91] Update src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java Co-authored-by: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> --- .../java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java index b4a90b2d..09e11563 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java @@ -63,7 +63,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * Invert a {@link DbDeleteOperation}. * * @param d the {@link DbDeleteOperation} - * @return {@link DbCreateOperation} + * @return The inverted {@link DbCreateOperation}. */ public static DbCreateOperation invert(final DbDeleteOperation d) { return new DbCreateOperation(d.subject, d.predicate, d.object); From 478913f13c89b44cf300f18a4223e7b0a464c4ec Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Sun, 26 Jun 2022 16:17:12 +0100 Subject: [PATCH 66/91] Fix javadoc --- .../java/uk/gov/gchq/magmacore/service/DbChangeSet.java | 5 ++--- .../uk/gov/gchq/magmacore/service/DbCreateOperation.java | 3 +-- .../uk/gov/gchq/magmacore/service/DbDeleteOperation.java | 6 ++---- .../uk/gov/gchq/magmacore/service/DbTransformation.java | 5 ++--- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index f969cc03..b31f4692 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -37,9 +37,8 @@ public DbChangeSet(final Set deletes, final Set Date: Mon, 27 Jun 2022 13:03:37 +0100 Subject: [PATCH 67/91] Make MagmaCoreDatabase methods --- .../magmacore/database/MagmaCoreDatabase.java | 16 ++++----------- .../database/MagmaCoreJenaDatabase.java | 12 ++++------- .../database/MagmaCoreObjectDatabase.java | 20 ++++--------------- .../MagmaCoreRemoteSparqlDatabase.java | 20 ++++--------------- 4 files changed, 16 insertions(+), 52 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index c2fdef20..e1e73e8b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -101,30 +101,22 @@ public interface MagmaCoreDatabase { /** * Begin a writeable transaction initially in READ mode, * but in Jena it will switch to WRITE mode if updates are made. - * - * @return the {@link MagmaCoreDatabase} */ - MagmaCoreDatabase begin(); + void begin(); /** * Abort the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - MagmaCoreDatabase abort(); + void abort(); /** * Drop the entire database. - * - * @return the {@link MagmaCoreDatabase} */ - MagmaCoreDatabase drop(); + void drop(); /** * Commit the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - MagmaCoreDatabase commit(); + void commit(); } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 5c131b66..e84cf9fd 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -109,39 +109,35 @@ public void register(final IriBase base) { * Start a transaction which is READ mode and which will switch to WRITE if an update is * attempted but only if no intermediate transaction has performed an update. */ - public MagmaCoreDatabase begin() { + public void begin() { if (!dataset.isInTransaction()) { dataset.begin(); } - return this; } /** * Commit a transaction - finish the transaction and make any changes permanent (if a "write" * transaction). */ - public MagmaCoreDatabase commit() { + public void commit() { dataset.commit(); dataset.end(); - return this; } /** * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). */ - public MagmaCoreDatabase abort() { + public void abort() { dataset.abort(); dataset.end(); - return this; } /** * Drop all data from the dataset. */ - public MagmaCoreDatabase drop() { + public void drop() { final String drop = "drop all"; executeUpdate(drop); - return this; } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java index 49be86c6..9b360c38 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java @@ -142,41 +142,29 @@ public final void dumpTurtle(final PrintStream out) { /** * Begin a writeable transaction initially in READ mode, * but in Jena it will switch to WRITE mode if updates are made. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase begin() { + public final void begin() { // no-op - return this; } /** * Abort the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase abort() { + public final void abort() { // no-op - return this; } /** * Drop the entire database. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase drop() { + public final void drop() { objects.clear(); - return this; } /** * Commit the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase commit() { + public final void commit() { // no-op - return this; } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index f9c69b1b..4ceedc6e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -292,44 +292,32 @@ public final void dump(final PrintStream out, final Lang language) { /** * Begin a writeable transaction initially in READ mode, * but in Jena it will switch to WRITE mode if updates are made. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase begin() { + public final void begin() { if (!connection.isInTransaction()) { connection.begin(); } - return this; } /** * Abort the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase abort() { + public final void abort() { connection.abort(); - return this; } /** * Drop the entire database. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase drop() { + public final void drop() { final String drop = "drop all"; executeUpdate(drop); - return this; } /** * Commit the current transaction. - * - * @return the {@link MagmaCoreDatabase} */ - public final MagmaCoreDatabase commit() { + public final void commit() { connection.commit(); - return this; } } From 5b0dc49f07bc92a1c21a88697ac0b5c8f9f464dd Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 27 Jun 2022 13:15:08 +0100 Subject: [PATCH 68/91] McAssistMultInheritFromDataApp - dump the resulting triples. --- .../gchq/magmacore/demo/McAssistMultInheritFromDataApp.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index f93103cc..f37dbcd1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -22,6 +22,7 @@ import uk.gov.gchq.hqdm.model.StateOfOrganization; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; +import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -52,5 +53,9 @@ public static void main(final String[] args) { } else { System.err.println("Failed to implement the Participant and StateOfOrganization interfaces."); } + + // DIsplay the object as triples. + System.out.println("Result as TTL triples:"); + System.out.println(Triples.toTriples(orgState)); } } From fa363f59eff955e86dc793f368a3078d536846b9 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Mon, 27 Jun 2022 14:19:38 +0100 Subject: [PATCH 69/91] JenaDatabaseDemo needs to run its query in a transaction. --- .../gov/gchq/magmacore/demo/JenaDatabaseDemo.java | 6 +++++- .../gchq/magmacore/service/DbCreateOperation.java | 2 +- .../gov/gchq/magmacore/demo/ExampleDataTest.java | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 3a69d136..4521a59b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -14,7 +14,11 @@ package uk.gov.gchq.magmacore.demo; +import java.util.List; +import java.util.Map; + import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -43,7 +47,7 @@ public void run() { ExampleDataObjects.populateExampleData(mcService); // Query database to check its populated. - final Thing queryResults = mcService.findByEntityName("PersonB1_Bob"); + final Map queryResults = mcService.findByEntityNameInTransaction(List.of("PersonB1_Bob")); // Output results of query to console. System.out.println(queryResults); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java index cdf4f715..8f43a9df 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java @@ -62,7 +62,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { } if (thing == null) { - final var newThing = SpatioTemporalExtentServices.createSpatioTemporalExtent(subject.getIri()); + final var newThing = SpatioTemporalExtentServices.createThing(subject.getIri()); newThing.addStringValue(predicate.getIri(), object); mcService.create(newThing); } else { diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index eb23a3cb..20946e83 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -30,11 +30,24 @@ public class ExampleDataTest { * * */ @Test - public void testApplyAndInvert() { + public void testWithJenaDatabase() { final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); final var transformation = ExampleDataObjects.populateExampleData(service); assertNotNull(transformation); } + + /** + * Test the {@link ExampleDataObjects} code. + * + * */ + @Test + public void testWithObjectDatabase() { + final var service = MagmaCoreServiceFactory.createWithObjectDatabase(); + + final var transformation = ExampleDataObjects.populateExampleData(service); + + assertNotNull(transformation); + } } From d67356138e0e246b640d3c976368092d517bdd54 Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 28 Jun 2022 16:37:32 +0100 Subject: [PATCH 70/91] Remove MagmaCoreObjectDatabase and fix the associated fallout. --- .../java/uk/gov/gchq/magmacore/MagmaCore.java | 12 +- .../database/MagmaCoreJenaDatabase.java | 15 +- .../database/MagmaCoreObjectDatabase.java | 170 ------------------ .../MagmaCoreRemoteSparqlDatabase.java | 11 +- .../magmacore/demo/ExampleAssociations.java | 11 +- .../magmacore/demo/ExampleIndividuals.java | 5 +- .../gov/gchq/magmacore/demo/ExampleRdl.java | 6 +- .../gov/gchq/magmacore/demo/ExampleSigns.java | 5 +- .../gchq/magmacore/demo/ExampleSignsRdl.java | 6 +- .../magmacore/demo/ObjectDatabaseDemo.java | 55 ------ .../gchq/magmacore/service/DbChangeSet.java | 22 +-- .../magmacore/service/MagmaCoreService.java | 18 ++ .../service/MagmaCoreServiceFactory.java | 10 -- .../gchq/magmacore/demo/ExampleDataTest.java | 13 -- .../magmacore/service/DbChangeSetTest.java | 34 ++-- .../magmacore/service/DbOperationTest.java | 89 +++++---- .../service/DbTransformationTest.java | 51 +++--- .../service/MagmaCoreServiceTest.java | 64 +++++++ 18 files changed, 229 insertions(+), 368 deletions(-) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java create mode 100644 src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index 6e7b24b6..b859736c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -16,7 +16,6 @@ import uk.gov.gchq.magmacore.demo.FusekiServiceDemo; import uk.gov.gchq.magmacore.demo.JenaDatabaseDemo; -import uk.gov.gchq.magmacore.demo.ObjectDatabaseDemo; import uk.gov.gchq.magmacore.demo.RemoteSparqlDatabaseDemo; /** @@ -47,8 +46,8 @@ public static void main(final String[] args) { remoteSparqlDatabaseDemo(true); } else if (option.equals("jena")) { jenaDemo(); - } else if (option.equals("object")) { - objectDemo(); + } else { + System.out.println("Unknown option: " + option); } } } @@ -71,13 +70,6 @@ public static void remoteSparqlDatabaseDemo(final boolean populate) { new RemoteSparqlDatabaseDemo("http://localhost:3330/tdb").run(populate); } - /** - * Executes the ObjectDatabaseDemo. - */ - public static void objectDemo() { - new ObjectDatabaseDemo().run(); - } - /** * Executes the JenaDatabaseDemo. */ diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index e84cf9fd..75981477 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -46,7 +46,6 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; -import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.IriBase; @@ -120,16 +119,20 @@ public void begin() { * transaction). */ public void commit() { - dataset.commit(); - dataset.end(); + if (dataset.isInTransaction()) { + dataset.commit(); + dataset.end(); + } } /** * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). */ public void abort() { - dataset.abort(); - dataset.end(); + if (dataset.isInTransaction()) { + dataset.abort(); + dataset.end(); + } } /** @@ -185,7 +188,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", Triples.toTriples(object))); + executeUpdate(String.format("delete {<%s> ?p ?o} WHERE {<%s> ?p ?o}", object.getId(), object.getId())); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java deleted file mode 100644 index 9b360c38..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore.database; - -import java.io.PrintStream; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.Triples; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; - -/** - * In-memory collection of HQDM objects. - */ -public class MagmaCoreObjectDatabase implements MagmaCoreDatabase { - - private final Map objects; - - /** - * Instantiate a new empty MagmaCoreObjectDatabase. - */ - public MagmaCoreObjectDatabase() { - objects = new HashMap<>(); - } - - /** - * {@inheritDoc} - */ - @Override - public Thing get(final IRI iri) { - return objects.get(iri); - } - - /** - * {@inheritDoc} - */ - @Override - public void create(final Thing object) { - final IRI iri = new IRI(object.getId()); - if (!objects.keySet().contains(iri)) { - objects.put(iri, object); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void update(final Thing object) { - final IRI iri = new IRI(object.getId()); - if (objects.keySet().contains(iri)) { - objects.put(iri, object); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void delete(final Thing object) { - final IRI iri = new IRI(object.getId()); - if (objects.keySet().contains(iri)) { - objects.remove(iri, object); - } - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIri(final IRI predicateIri, final IRI objectIri) { - return objects.values().stream() - .filter(object -> object.hasThisValue(predicateIri.toString(), objectIri.toString())) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriOnly(final HqdmIri predicateIri) { - return objects.values().stream() - .filter(object -> object.hasValue(predicateIri.toString())) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriAndStringValue(final IRI predicateIri, - final String value) { - return objects.values().stream() - .filter(object -> object.hasThisStringValue(predicateIri.toString(), value)) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, - final String value) { - return objects.values().stream() - .filter(object -> object.hasThisStringValueIgnoreCase(predicateIri.toString(), value)) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public void dump(final PrintStream out) { - objects.values().forEach(object -> out.println(object.toString())); - } - - /** - * Dump contents of dataset to output as RDF triples in turtle format. - * - * @param out Output stream to dump data to. - */ - public final void dumpTurtle(final PrintStream out) { - objects.values().forEach(object -> out.println(Triples.toTriples(object))); - } - - /** - * Begin a writeable transaction initially in READ mode, - * but in Jena it will switch to WRITE mode if updates are made. - */ - public final void begin() { - // no-op - } - - /** - * Abort the current transaction. - */ - public final void abort() { - // no-op - } - - /** - * Drop the entire database. - */ - public final void drop() { - objects.clear(); - } - - /** - * Commit the current transaction. - */ - public final void commit() { - // no-op - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 4ceedc6e..b1d62bae 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -42,7 +42,6 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.Pair; -import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.query.QueryResult; @@ -134,7 +133,7 @@ public void update(final Thing object) { */ @Override public void delete(final Thing object) { - executeUpdate(String.format("delete data {%s}", Triples.toTriples(object))); + executeUpdate(String.format("delete {<%s> ?p ?o} WHERE {<%s> ?p ?o}", object.getId(), object.getId())); } /** @@ -303,7 +302,9 @@ public final void begin() { * Abort the current transaction. */ public final void abort() { - connection.abort(); + if (connection.isInTransaction()) { + connection.abort(); + } } /** @@ -318,6 +319,8 @@ public final void drop() { * Commit the current transaction. */ public final void commit() { - connection.commit(); + if (connection.isInTransaction()) { + connection.commit(); + } } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 9c4600eb..58557b43 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -14,9 +14,8 @@ package uk.gov.gchq.magmacore.demo; -import java.util.HashSet; +import java.util.ArrayList; import java.util.List; -import java.util.Set; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; @@ -43,7 +42,7 @@ public class ExampleAssociations { * Create a person-occupies-house association. * * @param mcService a {@link MagmaCoreDatabase} - * @param creates {@link Set} of {@link DbCreateOperation} + * @param creates {@link List} of {@link DbCreateOperation} * @param possibleWorld a {@link PossibleWorld} * @param person the {@link Person} occupying the house. * @param house the house as a {@link FunctionalSystem} that is occupied. @@ -52,7 +51,7 @@ public class ExampleAssociations { */ private static void occupyHouse( final MagmaCoreService mcService, - final Set creates, + final List creates, final PossibleWorld possibleWorld, final Person person, final FunctionalSystem house, @@ -149,7 +148,7 @@ public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) final var e5 = ExampleCommonUtils.mkUserBaseIri(); // Create DbCreateOperations to create the objects and their properties. - final var creates = new HashSet(); + final var creates = new ArrayList(); creates.add(new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); creates.add(new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); creates.add(new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2020-08-15T17:50:00")); @@ -171,6 +170,6 @@ public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) occupyHouse(mcService, creates, possibleWorld, person, house, e4, e5); // Create and return a new change set. - return new DbChangeSet(Set.of(), creates); + return new DbChangeSet(List.of(), creates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index 82463c17..f8c8224a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.demo; import java.util.List; -import java.util.Set; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfPerson; @@ -62,7 +61,7 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi final var house = ExampleCommonUtils.mkUserBaseIri(); // Create DbCreateOperations to create the objects and their properties. - final var creates = Set.of( + final var creates = List.of( new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), @@ -90,7 +89,7 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi ); // Create a change set and return it. - return new DbChangeSet(Set.of(), creates); + return new DbChangeSet(List.of(), creates); } public ExampleIndividuals() { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index c2392d7e..b3bd614c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore.demo; -import java.util.Set; +import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -51,7 +51,7 @@ public static DbChangeSet createRefDataObjects() { final var occupantInPropertyKindOfAssociation = ExampleCommonUtils.mkRefBaseIri(); // Add DbCreateOperations to create the objects and their properties. - final var creates = Set.of( + final var creates = List.of( new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), new DbCreateOperation(viewable, HQDM.ENTITY_NAME, "VIEWABLE"), @@ -146,6 +146,6 @@ public static DbChangeSet createRefDataObjects() { ); // Put the operations in a change set and return it. - return new DbChangeSet(Set.of(), creates); + return new DbChangeSet(List.of(), creates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index 415f876b..ce135dfa 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.demo; import java.util.List; -import java.util.Set; import uk.gov.gchq.hqdm.model.Description; import uk.gov.gchq.hqdm.model.Pattern; @@ -92,7 +91,7 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final var e2 = ExampleCommonUtils.mkUserBaseIri(); // Create the set of DbCreateOperations - final var creates = Set.of( + final var creates = List.of( // Create the possible world that we are working in. new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), @@ -156,6 +155,6 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { ); // Create a change set and return it. - return new DbChangeSet(Set.of(), creates); + return new DbChangeSet(List.of(), creates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index 32b01e77..dff86385 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore.demo; -import java.util.Set; +import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -39,7 +39,7 @@ public static DbChangeSet createRefDataObjects() { final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); // Add DbCreateOperations to create the objects and their properties. - final var creates = Set.of( + final var creates = List.of( new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), @@ -56,6 +56,6 @@ public static DbChangeSet createRefDataObjects() { ); // Put the operations in a change set and return it. - return new DbChangeSet(Set.of(), creates); + return new DbChangeSet(List.of(), creates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java deleted file mode 100644 index 10e375a7..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore.demo; - -import java.util.List; - -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; - -/** - * Example use-case scenario for {@link MagmaCoreObjectDatabase}. - * - *

- * This example demo creates an in-memory {@link MagmaCoreObjectDatabase} populated with the - * {@link ExampleDataObjects} as HQDM Java objects. - *

- *

- * {@code PersonB1_Bob} can be queried for using the - * {@link MagmaCoreObjectDatabase#findByPredicateIriAndStringValue(uk.gov.gchq.hqdm.iri.IRI, String)} - * method. The resulting object(s) of this query are output to the command-line as RDF triples. - *

- */ -public final class ObjectDatabaseDemo { - - /** - * Run the in-memory Object Database example. - */ - public void run() { - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); - - // Add example data objects to dataset. - ExampleDataObjects.populateExampleData(mcService); - - // Query database to check it's populated. - final List queryResults = mcService.findByEntityName("PersonB1_Bob"); - - // Output results of query to console. - queryResults.forEach(object -> System.out.println(object.toString())); - - System.out.println("\n--- Object Example End ---"); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java index e3e1a54c..2bb36100 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java @@ -14,7 +14,8 @@ package uk.gov.gchq.magmacore.service; -import java.util.Set; +import java.util.Collections; +import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; @@ -22,16 +23,16 @@ * Class representing an invertible set of deletes and creates. */ public class DbChangeSet implements Function { - private Set deletes; - private Set creates; + private List deletes; + private List creates; /** * Constructor. * - * @param deletes a {@link Set} of {@link DbDeleteOperation} - * @param creates a {@link Set} of {@link DbCreateOperation} + * @param deletes a {@link List} of {@link DbDeleteOperation} + * @param creates a {@link List} of {@link DbCreateOperation} */ - public DbChangeSet(final Set deletes, final Set creates) { + public DbChangeSet(final List deletes, final List creates) { this.deletes = deletes; this.creates = creates; } @@ -64,9 +65,10 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * @return The inverted {@link DbChangeSet}. */ public static DbChangeSet invert(final DbChangeSet c) { - return new DbChangeSet( - c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toSet()), - c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toSet()) - ); + final var newDeletes = c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toList()); + final var newCreates = c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toList()); + Collections.reverse(newDeletes); + Collections.reverse(newCreates); + return new DbChangeSet(newDeletes, newCreates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 29574d74..5e4527a3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -89,6 +89,24 @@ public Thing get(final IRI iri) { return db.get(iri); } + /** + * Get a {@link Thing} with the given {@link IRI}. + * + * @param iri {@link IRI} + * @return {@link Thing} + */ + public Thing getInTransaction(final IRI iri) { + try { + db.begin(); + final var result = db.get(iri); + db.commit(); + return result; + } catch (final Exception e) { + db.abort(); + throw e; + } + } + /** * Run a function in a transaction. * diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index 45fb1d08..37c98080 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.service; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; /** @@ -25,15 +24,6 @@ */ public class MagmaCoreServiceFactory { - /** - * Create an in-memory object database. - * - * @return {@link MagmaCoreService} - * */ - public static MagmaCoreService createWithObjectDatabase() { - return new MagmaCoreService(new MagmaCoreObjectDatabase()); - } - /** * Create a Jena database. * diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index 20946e83..00d74615 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -37,17 +37,4 @@ public void testWithJenaDatabase() { assertNotNull(transformation); } - - /** - * Test the {@link ExampleDataObjects} code. - * - * */ - @Test - public void testWithObjectDatabase() { - final var service = MagmaCoreServiceFactory.createWithObjectDatabase(); - - final var transformation = ExampleDataObjects.populateExampleData(service); - - assertNotNull(transformation); - } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java index 7f5f4fc1..917f4a21 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java @@ -14,21 +14,26 @@ package uk.gov.gchq.magmacore.service; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import java.util.Set; +import java.util.List; import org.junit.Test; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; /** * Check that {@link DbChangeSet} works correctly. */ public class DbChangeSetTest { + // Dummy IRI for testing. + private static final String TEST_IRI = "http://example.com/test#test"; + /** * Test that {@link DbChangeSet} can be applied, inverted, and undone. * @@ -36,32 +41,33 @@ public class DbChangeSetTest { @Test public void testApplyAndInvert() { + final var iri = new IRI(TEST_IRI); + // Create operations to add an object with dummy values. - final var changes = new DbChangeSet(Set.of(), Set.of( - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"), - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world") + final var changes = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world") )); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. - changes.apply(mcService); + mcService.runInTransaction(changes); // Find the thing we just created and assert values are present. - final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.getInTransaction(iri); assertNotNull(thing); - assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); // Invert the operations, apply them in reverse order and assert they are no longer present. - DbChangeSet.invert(changes).apply(mcService); + mcService.runInTransaction(DbChangeSet.invert(changes)); - assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); - assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertFalse(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + final var thingFromDb = mcService.getInTransaction(iri); + assertNull(thingFromDb); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java index f1a4cd51..330f6b87 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java @@ -17,11 +17,14 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.junit.Test; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.exception.DbTransformationException; /** @@ -29,32 +32,39 @@ */ public class DbOperationTest { + // Dummy IRI for testing. + private static final String TEST_IRI = "http://example.com/test#test"; + /** * Test that DbCreateOperations can be applied to a database and can also be * inverted and used to undo the {@link DbCreateOperation}. * */ @Test - public void testSingleCreateAndDelete() { + public void testCreateAndDelete() { // Create an operation to add an object with dummy values. - final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + final var iri = new IRI(TEST_IRI); + final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation. - op.apply(mcService); + mcService.runInTransaction(op1); + mcService.runInTransaction(op2); // Find the thing we just created and assert it's presence. - final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.getInTransaction(iri); assertNotNull(thing); - assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); // Invert the operation and assert that it is no longer present. - DbCreateOperation.invert(op).apply(mcService); + mcService.runInTransaction(DbCreateOperation.invert(op2)); - assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + final var thingFromDb = mcService.getInTransaction(iri); + assertFalse(thingFromDb.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); } /** @@ -64,35 +74,36 @@ public void testSingleCreateAndDelete() { @Test public void testMultipleCreateAndDelete() { + final var iri = new IRI(TEST_IRI); + // Create operations to add an object with dummy values. - final var op1 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); - final var op2 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); - final var op3 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); + final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final var op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. - op1.apply(mcService); - op2.apply(mcService); - op3.apply(mcService); + mcService.runInTransaction(op1); + mcService.runInTransaction(op2); + mcService.runInTransaction(op3); // Find the thing we just created and assert values are present. - final var thing = mcService.get(HQDM.ABSTRACT_OBJECT); + final var thing = mcService.getInTransaction(iri); assertNotNull(thing); - assertTrue(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); - // Invert the operations, apply them in reverse order and assert they are no longer present. - DbCreateOperation.invert(op3).apply(mcService); - DbCreateOperation.invert(op2).apply(mcService); - DbCreateOperation.invert(op1).apply(mcService); + // Invert two of the operations, apply them in reverse order and assert they are no longer present. + mcService.runInTransaction(DbCreateOperation.invert(op3)); + mcService.runInTransaction(DbCreateOperation.invert(op2)); + mcService.runInTransaction(DbCreateOperation.invert(op1)); - assertFalse(thing.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); - assertFalse(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertFalse(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + final var thingFromDb = mcService.getInTransaction(iri); + assertNull(thingFromDb); } /** @@ -102,15 +113,17 @@ public void testMultipleCreateAndDelete() { @Test(expected = DbTransformationException.class) public void testCreateWhenAlreadyPresent() { + final var iri = new IRI(TEST_IRI); + // Create an operation to add an object with dummy values. - final var op = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + final var op = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation twice, the second should throw an exception. - op.apply(mcService); - op.apply(mcService); + mcService.runInTransaction(op); + mcService.runInTransaction(op); } /** @@ -120,14 +133,16 @@ public void testCreateWhenAlreadyPresent() { @Test(expected = DbTransformationException.class) public void testDeleteWhenNotPresent() { + final var iri = new IRI(TEST_IRI); + // Create an operation to add an object with dummy values. - final var op = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"); + final var op = new DbDeleteOperation(iri, HQDM.INDIVIDUAL, "value"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation, it should throw an exception. - op.apply(mcService); + mcService.runInTransaction(op); } /** @@ -137,8 +152,10 @@ public void testDeleteWhenNotPresent() { @Test public void testDbCreateEquals() { - final var op1 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); - final var op2 = new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + final var iri = new IRI(TEST_IRI); + + final var op1 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); assertTrue(op1.equals(op2)); assertEquals(op1.hashCode(), op2.hashCode()); @@ -151,8 +168,10 @@ public void testDbCreateEquals() { @Test public void testDbDeleteEquals() { - final var op1 = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); - final var op2 = new DbDeleteOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"); + final var iri = new IRI(TEST_IRI); + + final var op1 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); + final var op2 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); assertTrue(op1.equals(op2)); assertEquals(op1.hashCode(), op2.hashCode()); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java index d1b63258..3bda5c56 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java @@ -14,22 +14,26 @@ package uk.gov.gchq.magmacore.service; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.List; -import java.util.Set; import org.junit.Test; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; /** * Check that {@link DbTransformation} works correctly. */ public class DbTransformationTest { + // Dummy IRI for testing. + private static final String TEST_IRI = "http://example.com/test#test"; + /** * Test that multiple DbChangeSets can be applied as a DbTransformation, inverted, and undone. * @@ -37,17 +41,20 @@ public class DbTransformationTest { @Test public void testApplyAndInvert() { + final var individualIri = new IRI(TEST_IRI + "1"); + final var personIri = new IRI(TEST_IRI + "2"); + // Create operations to add an object with dummy values. - final var changes1 = new DbChangeSet(Set.of(), Set.of( - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.ABSTRACT_OBJECT, "value"), - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(HQDM.ABSTRACT_OBJECT, HQDM.PART_OF_POSSIBLE_WORLD, "a world") + final var changes1 = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "a world") )); - final var changes2 = new DbChangeSet(Set.of(), Set.of( - new DbCreateOperation(HQDM.PERSON, HQDM.ENTITY_NAME, "Trillian"), - new DbCreateOperation(HQDM.PERSON, HQDM.MEMBER_OF, "class2"), - new DbCreateOperation(HQDM.PERSON, HQDM.PART_OF_POSSIBLE_WORLD, "another world") + final var changes2 = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(personIri, HQDM.MEMBER_OF, "class2"), + new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "another world") )); final var transformation = new DbTransformation(List.of( @@ -56,35 +63,33 @@ public void testApplyAndInvert() { )); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithObjectDatabase(); + final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. - transformation.apply(mcService); + mcService.runInTransaction(transformation); // Find the thing we just created and assert values are present. - final var thing1 = mcService.get(HQDM.ABSTRACT_OBJECT); + final var thing1 = mcService.getInTransaction(individualIri); assertNotNull(thing1); - assertTrue(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); + assertTrue(thing1.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); assertTrue(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); assertTrue(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); - final var thing2 = mcService.get(HQDM.PERSON); + final var thing2 = mcService.getInTransaction(personIri); assertNotNull(thing2); - assertTrue(thing2.hasThisValue(HQDM.ENTITY_NAME.getIri(), "Trillian")); + assertTrue(thing2.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri())); assertTrue(thing2.hasThisValue(HQDM.MEMBER_OF.getIri(), "class2")); assertTrue(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); // Invert the operations, apply them in reverse order and assert they are no longer present. - transformation.invert().apply(mcService); + mcService.runInTransaction(transformation.invert()); - assertFalse(thing1.hasThisValue(HQDM.ABSTRACT_OBJECT.getIri(), "value")); - assertFalse(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertFalse(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + final var thing1FromDb = mcService.getInTransaction(individualIri); + assertNull(thing1FromDb); - assertFalse(thing2.hasThisValue(HQDM.PERSON.getIri(), "Trillian")); - assertFalse(thing2.hasThisValue(HQDM.MEMBER_OF.getIri(), "class2")); - assertFalse(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); + final var thing2FromDb = mcService.getInTransaction(personIri); + assertNull(thing2FromDb); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java new file mode 100644 index 00000000..1828e0b9 --- /dev/null +++ b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.magmacore.service; + +import static org.junit.Assert.assertNull; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; + +/** + * Check that {@link MagmaCoreService} works correctly. + */ +public class MagmaCoreServiceTest { + + // Dummy IRI for testing. + private static final String TEST_IRI = "http://example.com/test#test"; + + /** + * Test that triples can be deleted. + * + * */ + @Test + public void test() { + final var iri = new IRI(TEST_IRI); + + final var db = new MagmaCoreJenaDatabase(); + + final var thing = SpatioTemporalExtentServices.createIndividual(TEST_IRI); + + thing.addValue(HQDM.MEMBER_OF.getIri(), "class1"); + + db.begin(); + db.create(thing); + db.commit(); + + thing.removeValue(HQDM.MEMBER_OF.getIri(), "class1"); + + db.begin(); + db.update(thing); + db.commit(); + + db.begin(); + final var thingFromDb = db.get(iri); + db.commit(); + + assertNull(thingFromDb); + } +} From f236246a6f48a29719fe484a62435ae624e7c26a Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 28 Jun 2022 16:50:45 +0100 Subject: [PATCH 71/91] Move the DbTransformation classes to a new package --- .../uk/gov/gchq/magmacore/demo/ExampleAssociations.java | 4 ++-- .../java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java | 2 +- .../java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java | 4 ++-- src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java | 4 ++-- src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java | 6 +++--- .../java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java | 4 ++-- .../magmacore/service/{ => transformation}/DbChangeSet.java | 4 +++- .../service/{ => transformation}/DbCreateOperation.java | 3 ++- .../service/{ => transformation}/DbDeleteOperation.java | 3 ++- .../service/{ => transformation}/DbTransformation.java | 4 +++- .../service/{ => transformation}/DbChangeSetTest.java | 3 ++- .../service/{ => transformation}/DbOperationTest.java | 3 ++- .../service/{ => transformation}/DbTransformationTest.java | 3 ++- 13 files changed, 28 insertions(+), 19 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbChangeSet.java (95%) rename src/main/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbCreateOperation.java (97%) rename src/main/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbDeleteOperation.java (97%) rename src/main/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbTransformation.java (95%) rename src/test/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbChangeSetTest.java (95%) rename src/test/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbOperationTest.java (98%) rename src/test/java/uk/gov/gchq/magmacore/service/{ => transformation}/DbTransformationTest.java (96%) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 58557b43..2ee6a913 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -29,9 +29,9 @@ import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 0729eb2a..0a37ccf8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -16,8 +16,8 @@ import java.util.List; -import uk.gov.gchq.magmacore.service.DbTransformation; import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index f8c8224a..ddf7b6d4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -21,9 +21,9 @@ import uk.gov.gchq.hqdm.model.Role; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index b3bd614c..6645b4d5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -18,8 +18,8 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index ce135dfa..dba99791 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -22,10 +22,10 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; -import uk.gov.gchq.magmacore.service.DbTransformation; import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; +import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index dff86385..6c0916d3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -18,8 +18,8 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.service.DbChangeSet; -import uk.gov.gchq.magmacore.service.DbCreateOperation; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** * Functions for creating systems using MagmaCore and HQDM. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java similarity index 95% rename from src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java rename to src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java index 2bb36100..0333ccd2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -12,13 +12,15 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import java.util.Collections; import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; +import uk.gov.gchq.magmacore.service.MagmaCoreService; + /** * Class representing an invertible set of deletes and creates. */ diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java similarity index 97% rename from src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java rename to src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java index 8f43a9df..90894356 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import java.util.function.Function; @@ -21,6 +21,7 @@ import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Class representing an invertible operation to create a predicate. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java similarity index 97% rename from src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java rename to src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java index 36870eef..e8a22052 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java @@ -12,12 +12,13 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import java.util.function.Function; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.service.MagmaCoreService; /** * Class representing an invertible operation to delete a predicate. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java similarity index 95% rename from src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java rename to src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java index 4685e9f9..78598bf1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import java.util.Collections; import java.util.LinkedList; @@ -20,6 +20,8 @@ import java.util.function.Function; import java.util.stream.Collectors; +import uk.gov.gchq.magmacore.service.MagmaCoreService; + /** * Class representing an invertible ordered sequence of change sets. */ diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java similarity index 95% rename from src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index 917f4a21..9ca04671 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -25,6 +25,7 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbChangeSet} works correctly. diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java similarity index 98% rename from src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java index 330f6b87..9c531e3e 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -26,6 +26,7 @@ import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. diff --git a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java similarity index 96% rename from src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java rename to src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index 3bda5c56..fcf8efb0 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -25,6 +25,7 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** * Check that {@link DbTransformation} works correctly. From 3ed650c03228a0e6bb480430bee9e3c2c37488bf Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 28 Jun 2022 16:52:31 +0100 Subject: [PATCH 72/91] Export the 'service.transformation' package from the module. --- src/main/java/module-info.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 549b3e9e..220171a0 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -30,5 +30,6 @@ requires org.apache.commons.lang3; exports uk.gov.gchq.magmacore.service; + exports uk.gov.gchq.magmacore.service.transformation; exports uk.gov.gchq.magmacore.exception; } From 3ff71269253fc9904d99a4e07d80c07eda340d1f Mon Sep 17 00:00:00 2001 From: Tony Walmsley Date: Tue, 28 Jun 2022 17:08:48 +0100 Subject: [PATCH 73/91] Remove unnecessary try/catch. --- .../service/transformation/DbCreateOperation.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java index 90894356..1a1c9020 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -16,8 +16,6 @@ import java.util.function.Function; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.exception.HqdmException; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; @@ -55,12 +53,7 @@ public DbCreateOperation(final IRI subject, final IRI predicate, final String ob */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { - Thing thing = null; - try { - thing = mcService.get(subject); - } catch (final HqdmException e) { - // The object does not exist. - } + final var thing = mcService.get(subject); if (thing == null) { final var newThing = SpatioTemporalExtentServices.createThing(subject.getIri()); From 3a9b1547e8642e87259a9e6bb85473a82d5ecdc4 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper42 <70384549+GCHQDeveloper42@users.noreply.github.com> Date: Wed, 29 Jun 2022 13:52:02 +0100 Subject: [PATCH 74/91] Remove 'object' option from demo arguments in README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d66f1636..c64ccba0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ An introduction to Magma Core and the [HQDM Java object library](https://github. - `remote` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. - `remote-populate` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. It will populate the database with example data. - `jena` - executes the Apache Jena database demo. - - `object` - executes the object database demo. - Alternatively, if you are using an IDE, you should be able to run the main method in MagmaCore.java from the editor. ## Contributing From b50f62a5c89761b003e03072bbb3f89d3f1392e6 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Thu, 30 Jun 2022 09:17:51 +0100 Subject: [PATCH 75/91] Formatted code. --- .gitmodules | 3 - java-formatter.xml | 382 ++++++++++++++++++ .../java/uk/gov/gchq/magmacore/MagmaCore.java | 33 +- .../magmacore/database/MagmaCoreDatabase.java | 21 +- .../database/MagmaCoreJenaDatabase.java | 55 +-- .../MagmaCoreRemoteSparqlDatabase.java | 77 ++-- .../magmacore/demo/ExampleAssociations.java | 70 ++-- .../magmacore/demo/ExampleCommonUtils.java | 7 +- .../magmacore/demo/ExampleDataObjects.java | 7 +- .../magmacore/demo/ExampleIndividuals.java | 22 +- .../gov/gchq/magmacore/demo/ExampleSigns.java | 13 +- .../gchq/magmacore/demo/ExampleSignsRdl.java | 3 +- .../magmacore/demo/FusekiServiceDemo.java | 12 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 4 +- .../demo/McAssistMultInheritFromDataApp.java | 5 +- .../demo/RemoteSparqlDatabaseDemo.java | 8 +- .../exception/DbTransformationException.java | 22 +- .../exception/MagmaCoreException.java | 21 +- .../gov/gchq/magmacore/query/QueryResult.java | 6 +- .../gchq/magmacore/query/QueryResultList.java | 2 +- .../magmacore/service/MagmaCoreService.java | 2 +- .../service/MagmaCoreServiceFactory.java | 13 +- .../service/transformation/DbChangeSet.java | 26 +- .../transformation/DbCreateOperation.java | 21 +- .../transformation/DbDeleteOperation.java | 16 +- .../transformation/DbTransformation.java | 20 +- .../java/uk/gov/gchq/magmacore/util/UID.java | 4 +- .../gchq/magmacore/demo/ExampleDataTest.java | 6 +- .../gchq/magmacore/demo/ExampleSignsTest.java | 7 +- .../service/MagmaCoreServiceTest.java | 5 +- .../transformation/DbChangeSetTest.java | 14 +- .../transformation/DbOperationTest.java | 32 +- .../transformation/DbTransformationTest.java | 32 +- 33 files changed, 630 insertions(+), 341 deletions(-) delete mode 100644 .gitmodules create mode 100644 java-formatter.xml diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c0b12501..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "HQDM"] - path = HQDM - url = git@github.com:gchq/HQDM.git diff --git a/java-formatter.xml b/java-formatter.xml new file mode 100644 index 00000000..a90272fb --- /dev/null +++ b/java-formatter.xml @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index b859736c..8e0b99fc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -23,7 +23,8 @@ */ public final class MagmaCore { - private MagmaCore() {} + private MagmaCore() { + } /** * Executes the selected database example. @@ -34,21 +35,21 @@ public static void main(final String[] args) { if (args.length == 0) { fuseki(true); } else { - final String option = args[0]; + final String option = args[0]; - if (option.equals("fuseki")) { - fuseki(false); - } else if (option.equals("fuseki-populate")) { - fuseki(true); - } else if (option.equals("remote")) { - remoteSparqlDatabaseDemo(false); - } else if (option.equals("remote-populate")) { - remoteSparqlDatabaseDemo(true); - } else if (option.equals("jena")) { - jenaDemo(); - } else { - System.out.println("Unknown option: " + option); - } + if (option.equals("fuseki")) { + fuseki(false); + } else if (option.equals("fuseki-populate")) { + fuseki(true); + } else if (option.equals("remote")) { + remoteSparqlDatabaseDemo(false); + } else if (option.equals("remote-populate")) { + remoteSparqlDatabaseDemo(true); + } else if (option.equals("jena")) { + jenaDemo(); + } else { + System.out.println("Unknown option: " + option); + } } } @@ -74,6 +75,6 @@ public static void remoteSparqlDatabaseDemo(final boolean populate) { * Executes the JenaDatabaseDemo. */ public static void jenaDemo() { - new JenaDatabaseDemo().run(); + new JenaDatabaseDemo().run(); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index e1e73e8b..d1402988 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -59,7 +59,7 @@ public interface MagmaCoreDatabase { * Find object(s) that have a specific object associated with them. * * @param predicateIri IRI of the predicate being queried. - * @param objectIri IRI of the object to match. + * @param objectIri IRI of the object to match. * @return The object(s). */ List findByPredicateIri(IRI predicateIri, IRI objectIri); @@ -73,11 +73,10 @@ public interface MagmaCoreDatabase { List findByPredicateIriOnly(HqdmIri predicateIri); /** - * Find object(s) that have a specific case-sensitive string-value attribute associated with - * them. + * Find object(s) that have a specific case-sensitive string-value attribute associated with them. * * @param predicateIri IRI of the predicate being queried. - * @param value Case-sensitive string to match. + * @param value Case-sensitive string to match. * @return The object(s). */ List findByPredicateIriAndStringValue(IRI predicateIri, String value); @@ -86,7 +85,7 @@ public interface MagmaCoreDatabase { * Find object(s) that have a specific string-value attribute associated with them. * * @param predicateIri IRI of the predicate being queried. - * @param value Case-insensitive string to match. + * @param value Case-insensitive string to match. * @return The object(s). */ List findByPredicateIriAndStringCaseInsensitive(IRI predicateIri, String value); @@ -99,24 +98,24 @@ public interface MagmaCoreDatabase { void dump(PrintStream out); /** - * Begin a writeable transaction initially in READ mode, - * but in Jena it will switch to WRITE mode if updates are made. - */ + * Begin a writeable transaction initially in READ mode, but in Jena it will switch to WRITE mode if + * updates are made. + */ void begin(); /** * Abort the current transaction. - */ + */ void abort(); /** * Drop the entire database. - */ + */ void drop(); /** * Commit the current transaction. - */ + */ void commit(); } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 75981477..a0872fb8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -105,8 +105,8 @@ public void register(final IriBase base) { } /** - * Start a transaction which is READ mode and which will switch to WRITE if an update is - * attempted but only if no intermediate transaction has performed an update. + * Start a transaction which is READ mode and which will switch to WRITE if an update is attempted + * but only if no intermediate transaction has performed an update. */ public void begin() { if (!dataset.isInTransaction()) { @@ -148,8 +148,7 @@ public void drop() { */ @Override public Thing get(final IRI iri) { - final String query = - String.format("SELECT (<%1$s> as ?s) ?p ?o WHERE {<%1$s> ?p ?o.}", iri.toString()); + final String query = String.format("SELECT (<%1$s> as ?s) ?p ?o WHERE {<%1$s> ?p ?o.}", iri.toString()); final QueryResultList list = executeQuery(query); final List objects = toTopObjects(list); if (!objects.isEmpty()) { @@ -164,14 +163,10 @@ public Thing get(final IRI iri) { */ @Override public void create(final Thing object) { - final Resource resource = - dataset.getDefaultModel().createResource(object.getId()); - - object.getPredicates() - .forEach((iri, - predicates) -> predicates.forEach(predicate -> resource.addProperty( - dataset.getDefaultModel().createProperty(iri.toString()), - predicate.toString()))); + final Resource resource = dataset.getDefaultModel().createResource(object.getId()); + + object.getPredicates().forEach((iri, predicates) -> predicates.forEach(predicate -> resource + .addProperty(dataset.getDefaultModel().createProperty(iri.toString()), predicate.toString()))); } /** @@ -196,9 +191,8 @@ public void delete(final Thing object) { */ @Override public List findByPredicateIri(final IRI predicateIri, final IRI objectIri) { - final String query = - "SELECT ?s ?p ?o WHERE {?s ?p ?o. ?s <" + predicateIri.toString() + "> <" - + objectIri.toString() + ">.}"; + final String query = "SELECT ?s ?p ?o WHERE {?s ?p ?o. ?s <" + predicateIri.toString() + "> <" + + objectIri.toString() + ">.}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -208,9 +202,8 @@ public List findByPredicateIri(final IRI predicateIri, final IRI objectIr */ @Override public List findByPredicateIriOnly(final HqdmIri predicateIri) { - final String query = - "SELECT ?s ?p ?o WHERE {{select ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" - + predicateIri.toString() + "> ?o.}}}"; + final String query = "SELECT ?s ?p ?o WHERE {{select ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + "> ?o.}}}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -219,10 +212,9 @@ public List findByPredicateIriOnly(final HqdmIri predicateIri) { * {@inheritDoc} */ @Override - public List findByPredicateIriAndStringValue(final IRI predicateIri, - final String value) { - final String query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o. ?s <" + predicateIri.toString() - + "> \"\"\"" + value + "\"\"\".}"; + public List findByPredicateIriAndStringValue(final IRI predicateIri, final String value) { + final String query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o. ?s <" + predicateIri.toString() + "> \"\"\"" + value + + "\"\"\".}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -231,13 +223,10 @@ public List findByPredicateIriAndStringValue(final IRI predicateIri, * {@inheritDoc} */ @Override - public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, - final String value) { - final String query = - "SELECT ?s ?p ?o WHERE {{ SELECT ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" - + predicateIri.toString() - + "> ?o. BIND(LCASE(?o) AS ?lcase) FILTER(?lcase= \"\"\"" + value - + "\"\"\")}}}"; + public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, final String value) { + final String query = "SELECT ?s ?p ?o WHERE {{ SELECT ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + "> ?o. BIND(LCASE(?o) AS ?lcase) FILTER(?lcase= \"\"\"" + value + + "\"\"\")}}}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -274,8 +263,7 @@ protected QueryResultList executeQuery(final String sparqlQueryString) { private final QueryResultList getQueryResultList(final QueryExecution queryExec) { final ResultSet resultSet = queryExec.execSelect(); final List queryResults = new ArrayList<>(); - final QueryResultList queryResultList = - new QueryResultList(resultSet.getResultVars(), queryResults); + final QueryResultList queryResultList = new QueryResultList(resultSet.getResultVars(), queryResults); while (resultSet.hasNext()) { final QuerySolution querySolution = resultSet.next(); final Iterator varNames = querySolution.varNames(); @@ -313,8 +301,7 @@ private final List toTopObjects(final QueryResultList queryResultsList) { dataModelObject.add(new Pair<>(predicateValue, objectValue)); }); - return objectMap.entrySet().stream() - .map(entry -> HqdmObjectFactory.create(entry.getKey(), entry.getValue())) + return objectMap.entrySet().stream().map(entry -> HqdmObjectFactory.create(entry.getKey(), entry.getValue())) .collect(Collectors.toList()); } @@ -337,7 +324,7 @@ public void dump(final PrintStream out) { /** * Dump the contents of the collection as text in specified RDF language. * - * @param out Output stream to dump to. + * @param out Output stream to dump to. * @param language RDF language syntax to output data as. */ public final void dump(final PrintStream out, final Lang language) { diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index b1d62bae..5ab23b68 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -12,7 +12,7 @@ * the License. */ - package uk.gov.gchq.magmacore.database; +package uk.gov.gchq.magmacore.database; import java.io.PrintStream; import java.util.ArrayList; @@ -60,19 +60,15 @@ public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { * @param serviceUrl the URL String of the SPARQL update endpoint */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { - connection = RDFConnectionRemote.newBuilder() - .destination(serviceUrl) - .queryEndpoint("query") - .updateEndpoint("update") - .triplesFormat(RDFFormat.RDFJSON) - .build(); + connection = RDFConnectionRemote.newBuilder().destination(serviceUrl).queryEndpoint("query") + .updateEndpoint("update").triplesFormat(RDFFormat.RDFJSON).build(); } /** * Constructor to create a connection to a SPARQL endpoint and load it with a dataset. * * @param serviceUrl the URL String of the SPARQL update endpoint - * @param dataset the Dataset to be loaded into the database + * @param dataset the Dataset to be loaded into the database */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset dataset) { this(serviceUrl); @@ -80,14 +76,13 @@ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset data connection.load(dataset.getDefaultModel()); } - /** + /** * {@inheritDoc} */ @Override public Thing get(final IRI iri) { - final String query = - String.format("SELECT (<%1$s> as ?s) ?p ?o WHERE {<%1$s> ?p ?o.}", iri.toString()); + final String query = String.format("SELECT (<%1$s> as ?s) ?p ?o WHERE {<%1$s> ?p ?o.}", iri.toString()); final QueryResultList list = executeQuery(query); final List objects = toTopObjects(list); @@ -107,15 +102,11 @@ public void create(final Thing object) { final Model model = ModelFactory.createDefaultModel(); - final Resource resource = - model.createResource(object.getId()); + final Resource resource = model.createResource(object.getId()); + + object.getPredicates().forEach((iri, predicates) -> predicates.forEach( + predicate -> resource.addProperty(model.createProperty(iri.toString()), predicate.toString()))); - object.getPredicates() - .forEach((iri, - predicates) -> predicates.forEach(predicate -> resource.addProperty( - model.createProperty(iri.toString()), - predicate.toString()))); - connection.load(model); } @@ -141,9 +132,8 @@ public void delete(final Thing object) { */ @Override public List findByPredicateIri(final IRI predicateIri, final IRI objectIri) { - final String query = - "SELECT ?s ?p ?o WHERE {?s ?p ?o. ?s <" + predicateIri.toString() + "> <" - + objectIri.toString() + ">.}"; + final String query = "SELECT ?s ?p ?o WHERE {?s ?p ?o. ?s <" + predicateIri.toString() + "> <" + + objectIri.toString() + ">.}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -153,9 +143,8 @@ public List findByPredicateIri(final IRI predicateIri, final IRI objectIr */ @Override public List findByPredicateIriOnly(final HqdmIri predicateIri) { - final String query = - "SELECT ?s ?p ?o WHERE {{select ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" - + predicateIri.toString() + "> ?o.}}}"; + final String query = "SELECT ?s ?p ?o WHERE {{select ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + "> ?o.}}}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -164,10 +153,9 @@ public List findByPredicateIriOnly(final HqdmIri predicateIri) { * {@inheritDoc} */ @Override - public List findByPredicateIriAndStringValue(final IRI predicateIri, - final String value) { - final String query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o. ?s <" + predicateIri.toString() - + "> \"\"\"" + value + "\"\"\".}"; + public List findByPredicateIriAndStringValue(final IRI predicateIri, final String value) { + final String query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o. ?s <" + predicateIri.toString() + "> \"\"\"" + value + + "\"\"\".}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -176,13 +164,10 @@ public List findByPredicateIriAndStringValue(final IRI predicateIri, * {@inheritDoc} */ @Override - public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, - final String value) { - final String query = - "SELECT ?s ?p ?o WHERE {{ SELECT ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" - + predicateIri.toString() - + "> ?o. BIND(LCASE(?o) AS ?lcase) FILTER(?lcase= \"\"\"" + value - + "\"\"\")}}}"; + public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, final String value) { + final String query = "SELECT ?s ?p ?o WHERE {{ SELECT ?s ?p ?o where { ?s ?p ?o.}}{select ?s where {?s <" + + predicateIri.toString() + "> ?o. BIND(LCASE(?o) AS ?lcase) FILTER(?lcase= \"\"\"" + value + + "\"\"\")}}}"; final QueryResultList list = executeQuery(query); return toTopObjects(list); } @@ -218,8 +203,7 @@ protected QueryResultList executeQuery(final String sparqlQueryString) { private final QueryResultList getQueryResultList(final QueryExecution queryExec) { final ResultSet resultSet = queryExec.execSelect(); final List queryResults = new ArrayList<>(); - final QueryResultList queryResultList = - new QueryResultList(resultSet.getResultVars(), queryResults); + final QueryResultList queryResultList = new QueryResultList(resultSet.getResultVars(), queryResults); while (resultSet.hasNext()) { final QuerySolution querySolution = resultSet.next(); final Iterator varNames = querySolution.varNames(); @@ -257,8 +241,7 @@ private final List toTopObjects(final QueryResultList queryResultsList) { dataModelObject.add(new Pair<>(predicateValue, objectValue)); }); - return objectMap.entrySet().stream() - .map(entry -> HqdmObjectFactory.create(entry.getKey(), entry.getValue())) + return objectMap.entrySet().stream().map(entry -> HqdmObjectFactory.create(entry.getKey(), entry.getValue())) .collect(Collectors.toList()); } @@ -280,7 +263,7 @@ public void dump(final PrintStream out) { /** * Dump the contents of the collection as text in specified RDF language. * - * @param out Output stream to dump to. + * @param out Output stream to dump to. * @param language RDF language syntax to output data as. */ public final void dump(final PrintStream out, final Lang language) { @@ -289,9 +272,9 @@ public final void dump(final PrintStream out, final Lang language) { } /** - * Begin a writeable transaction initially in READ mode, - * but in Jena it will switch to WRITE mode if updates are made. - */ + * Begin a writeable transaction initially in READ mode, but in Jena it will switch to WRITE mode if + * updates are made. + */ public final void begin() { if (!connection.isInTransaction()) { connection.begin(); @@ -300,7 +283,7 @@ public final void begin() { /** * Abort the current transaction. - */ + */ public final void abort() { if (connection.isInTransaction()) { connection.abort(); @@ -309,7 +292,7 @@ public final void abort() { /** * Drop the entire database. - */ + */ public final void drop() { final String drop = "drop all"; executeUpdate(drop); @@ -317,7 +300,7 @@ public final void drop() { /** * Commit the current transaction. - */ + */ public final void commit() { if (connection.isInTransaction()) { connection.commit(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 2ee6a913..897d18cb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -41,39 +41,32 @@ public class ExampleAssociations { /** * Create a person-occupies-house association. * - * @param mcService a {@link MagmaCoreDatabase} - * @param creates {@link List} of {@link DbCreateOperation} + * @param mcService a {@link MagmaCoreDatabase} + * @param creates {@link List} of {@link DbCreateOperation} * @param possibleWorld a {@link PossibleWorld} - * @param person the {@link Person} occupying the house. - * @param house the house as a {@link FunctionalSystem} that is occupied. - * @param beginning {@link Event} - * @param ending {@link Event} + * @param person the {@link Person} occupying the house. + * @param house the house as a {@link FunctionalSystem} that is occupied. + * @param beginning {@link Event} + * @param ending {@link Event} */ - private static void occupyHouse( - final MagmaCoreService mcService, - final List creates, - final PossibleWorld possibleWorld, - final Person person, - final FunctionalSystem house, - final IRI beginning, + private static void occupyHouse(final MagmaCoreService mcService, final List creates, + final PossibleWorld possibleWorld, final Person person, final FunctionalSystem house, final IRI beginning, final IRI ending) { - final var entities = mcService.findByEntityNameInTransaction(List.of( - "CLASS_OF_STATE_OF_PERSON", - "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", - "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", - "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION" - )); + final var entities = mcService.findByEntityNameInTransaction( + List.of("CLASS_OF_STATE_OF_PERSON", "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); // Find the required classes, kinds, and roles. - final ClassOfStateOfPerson classOfStateOfPerson = (ClassOfStateOfPerson) entities.get("CLASS_OF_STATE_OF_PERSON"); - final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = - (ClassOfStateOfFunctionalSystem) entities.get("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final ClassOfStateOfPerson classOfStateOfPerson = (ClassOfStateOfPerson) entities + .get("CLASS_OF_STATE_OF_PERSON"); + final ClassOfStateOfFunctionalSystem classOfStateOfFunctionalSystemDomesticProperty = (ClassOfStateOfFunctionalSystem) entities + .get("STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); final Role occupierOfPropertyRole = (Role) entities.get("OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); final Role domesticOccupantInPropertyRole = (Role) entities.get("DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - final KindOfAssociation occupantInPropertyKindOfAssociation = - (KindOfAssociation) entities.get("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); + final KindOfAssociation occupantInPropertyKindOfAssociation = (KindOfAssociation) entities + .get("OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"); // Create DbCreateOperations to create the objects and their properties. final var personState = ExampleCommonUtils.mkUserBaseIri(); @@ -92,7 +85,8 @@ private static void occupyHouse( creates.add(new DbCreateOperation(houseState, RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM.getIri())); creates.add(new DbCreateOperation(houseState, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseState, HQDM.MEMBER_OF, classOfStateOfFunctionalSystemDomesticProperty.getId())); + creates.add(new DbCreateOperation(houseState, HQDM.MEMBER_OF, + classOfStateOfFunctionalSystemDomesticProperty.getId())); creates.add(new DbCreateOperation(houseState, HQDM.TEMPORAL_PART_OF, house.getId())); creates.add(new DbCreateOperation(houseState, HQDM.BEGINNING, beginning.getIri())); creates.add(new DbCreateOperation(houseState, HQDM.ENDING, ending.getIri())); @@ -106,19 +100,24 @@ private static void occupyHouse( creates.add(new DbCreateOperation(houseParticipant, RDFS.RDF_TYPE, HQDM.PARTICIPANT.getIri())); creates.add(new DbCreateOperation(houseParticipant, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseParticipant, HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getId())); + creates.add( + new DbCreateOperation(houseParticipant, HQDM.MEMBER_OF_KIND, domesticOccupantInPropertyRole.getId())); creates.add(new DbCreateOperation(houseParticipant, HQDM.TEMPORAL_PART_OF, houseState.getIri())); creates.add(new DbCreateOperation(houseParticipant, HQDM.BEGINNING, beginning.getIri())); creates.add(new DbCreateOperation(houseParticipant, HQDM.ENDING, ending.getIri())); creates.add(new DbCreateOperation(houseOccupiedAssociation, RDFS.RDF_TYPE, HQDM.ASSOCIATION.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.MEMBER_OF_KIND, occupantInPropertyKindOfAssociation.getId())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, houseParticipant.getIri())); - creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, personParticipant.getIri())); + creates.add( + new DbCreateOperation(houseOccupiedAssociation, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.MEMBER_OF_KIND, + occupantInPropertyKindOfAssociation.getId())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, + houseParticipant.getIri())); + creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.CONSISTS_OF_PARTICIPANT, + personParticipant.getIri())); creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.BEGINNING, beginning.getIri())); creates.add(new DbCreateOperation(houseOccupiedAssociation, HQDM.ENDING, ending.getIri())); - } + } /** * Add occupancy predicates. @@ -128,11 +127,8 @@ private static void occupyHouse( */ public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) { - final var entities = mcService.findByEntityNameInTransaction(List.of( - "Example1_World", - "PersonB1_Bob", - "HouseB" - )); + final var entities = mcService + .findByEntityNameInTransaction(List.of("Example1_World", "PersonB1_Bob", "HouseB")); // Use an existing PossibleWorld final PossibleWorld possibleWorld = (PossibleWorld) entities.get("Example1_World"); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index 8b41672b..97a71da6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -25,8 +25,7 @@ public class ExampleCommonUtils { /** IriBase for User data. */ - public static final IriBase USER_BASE = - new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); + public static final IriBase USER_BASE = new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); /** * Create a new IRI in the USER_BASE namespace. @@ -38,8 +37,7 @@ public static IRI mkUserBaseIri() { } /** IriBase for Reference Data Library. */ - public static final IriBase REF_BASE = - new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); + public static final IriBase REF_BASE = new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); /** * Create a new IRI in the REF_BASE namespace. @@ -49,5 +47,4 @@ public static IRI mkUserBaseIri() { public static IRI mkRefBaseIri() { return new IRI(REF_BASE, uid()); } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 0a37ccf8..2eb8a117 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -32,9 +32,9 @@ public class ExampleDataObjects { */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - // Apply the transformation to the database. There are dependencies between these change sets - // since they both depend on RDL being present, but also the occupancies depend on the - // individuals being present, so each change set needs to be applied before the next one + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one // can be created. final var rdlChangeSet = ExampleRdl.createRefDataObjects(); @@ -56,5 +56,4 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. return new DbTransformation(List.of(rdlChangeSet, individualsChangeSet, occupanciesChangeSet)); } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index ddf7b6d4..cf5d66c5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -38,20 +38,16 @@ public class ExampleIndividuals { */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { - final var entities = mcService.findByEntityNameInTransaction(List.of( - "KIND_OF_PERSON", - "NATURAL_MEMBER_OF_SOCIETY_ROLE", - "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", - "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE" - )); + final var entities = mcService.findByEntityNameInTransaction(List.of("KIND_OF_PERSON", + "NATURAL_MEMBER_OF_SOCIETY_ROLE", "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE")); // Find the required classes, kinds, and roles. final KindOfPerson kindOfPerson = (KindOfPerson) entities.get("KIND_OF_PERSON"); final Role personRole = (Role) entities.get("NATURAL_MEMBER_OF_SOCIETY_ROLE"); - final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = - (KindOfFunctionalSystem) entities.get("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); - final Role domesticPropertyRole = - (Role) entities.get("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); + final KindOfFunctionalSystem kindOfFunctionalSystemDomesticProperty = (KindOfFunctionalSystem) entities + .get("KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"); + final Role domesticPropertyRole = (Role) entities.get("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // Create IRIs for the objects we want to create. final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); @@ -61,8 +57,7 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi final var house = ExampleCommonUtils.mkUserBaseIri(); // Create DbCreateOperations to create the objects and their properties. - final var creates = List.of( - new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + final var creates = List.of(new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), @@ -85,8 +80,7 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi new DbCreateOperation(house, HQDM.ENTITY_NAME, "HouseB"), new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), - new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri()) - ); + new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri())); // Create a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index dba99791..c2452765 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -66,11 +66,8 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ * @return {@link DbChangeSet} */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final var entities = mcService.findByEntityNameInTransaction(List.of( - "URL Pattern", - "Description By URL", - "English Speakers" - )); + final var entities = mcService + .findByEntityNameInTransaction(List.of("URL Pattern", "Description By URL", "English Speakers")); // Find the required classes, kinds, and roles. final var urlPattern = (Pattern) entities.get("URL Pattern"); @@ -124,7 +121,8 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(nationalGeographic, HQDM.VALUE_, "https://www.nationalgeographic.com/culture/article/socrates"), + new DbCreateOperation(nationalGeographic, HQDM.VALUE_, + "https://www.nationalgeographic.com/culture/article/socrates"), new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Create the representation by signs @@ -151,8 +149,7 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(brittanica, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri()) - ); + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri())); // Create a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index 6c0916d3..cd4856ac 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -39,8 +39,7 @@ public static DbChangeSet createRefDataObjects() { final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); // Add DbCreateOperations to create the objects and their properties. - final var creates = List.of( - new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), + final var creates = List.of(new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION.getIri()), diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index 5d180553..516bf454 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -24,8 +24,8 @@ * Example use-case scenario for hosting {@link MagmaCoreJenaDatabase} on a Fuseki server. * *

- * The FusekiServiceDemo class can be used to host in-memory or persistent Magma Core Jena Datasets over - * HTTP using a Fuseki server. + * The FusekiServiceDemo class can be used to host in-memory or persistent Magma Core Jena Datasets + * over HTTP using a Fuseki server. *

*

* By default, the Fuseki server is configured to run on localhost:3330, however this can be change @@ -58,13 +58,9 @@ public void run(final boolean populate) { // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); } - + // Build and start Fuseki server. FusekiLogging.setLogging(); - FusekiServer - .create() - .port(3330) - .add("/tdb", tdb.getDataset(), true) - .start(); + FusekiServer.create().port(3330).add("/tdb", tdb.getDataset(), true).start(); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 4521a59b..18ed72a8 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -29,8 +29,8 @@ * {@link ExampleDataObjects} as RDF triples. *

*

- * {@code PersonB1_Bob} can be queried for using the `findByEntityName` method. - * method. The resulting object(s) of this query are output to the command-line as RDF triples. + * {@code PersonB1_Bob} can be queried for using the `findByEntityName` method. method. The + * resulting object(s) of this query are output to the command-line as RDF triples. *

* */ diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index f37dbcd1..210efafc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -40,9 +40,8 @@ public static void main(final String[] args) { // Create a new type specification. final List> newTypeSpecification = List.of( - new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.STATE_OF_ORGANIZATION.getIri()), - new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri()) - ); + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.STATE_OF_ORGANIZATION.getIri()), + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri())); // Create a new object using the type specification. final var orgState = HqdmObjectFactory.create(uid(), newTypeSpecification); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index ffb516f5..45684dff 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -18,14 +18,15 @@ import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** - * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote service. + * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote + * service. */ public final class RemoteSparqlDatabaseDemo { private final String url; public RemoteSparqlDatabaseDemo(final String url) { - this.url = url; + this.url = url; } /** @@ -38,7 +39,6 @@ public void run(final boolean populate) { if (populate) { ExampleDataObjects.populateExampleData(mcService); - } + } } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java b/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java index c89645e0..0e3a0f24 100644 --- a/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java +++ b/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java @@ -15,7 +15,7 @@ package uk.gov.gchq.magmacore.exception; /** - * An exception thrown by DbTransformation classes. This is a {@link RuntimeException} to make it + * An exception thrown by DbTransformation classes. This is a {@link RuntimeException} to make it * work nicely with functional programming constructs such as `map`, `apply`, etc. */ public class DbTransformationException extends RuntimeException { @@ -33,7 +33,7 @@ public DbTransformationException() { * initialized, and may subsequently be initialized by a call to {@link #initCause(Throwable)}. * * @param message The detail message. The detail message is saved for later retrieval by the - * {@link #getMessage()} method. + * {@link #getMessage()} method. */ public DbTransformationException(final String message) { super(message); @@ -41,12 +41,12 @@ public DbTransformationException(final String message) { /** * Constructs a new DbTransformationException with the specified cause and a detail message of - * (cause==null ? null : cause.toString()) (which typically contains the class and detail - * message of cause). + * (cause==null ? null : cause.toString()) (which typically contains the class and detail message of + * cause). * - * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} - * method). (A {@code null} value is permitted, and indicates that the cause is - * nonexistent or unknown.) + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). (A + * {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) */ public DbTransformationException(final Throwable cause) { super(cause); @@ -56,10 +56,10 @@ public DbTransformationException(final Throwable cause) { * Constructs a new DbTransformationException with the specified detail message and cause. * * @param message The detail message (which is saved for later retrieval by the - * {@link #getMessage()} method). - * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} - * method). (A {@code null} value is permitted, and indicates that the cause is - * nonexistent or unknown.) + * {@link #getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). + * (A {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) */ public DbTransformationException(final String message, final Throwable cause) { super(message, cause); diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java b/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java index a893f999..34433187 100644 --- a/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java +++ b/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java @@ -32,20 +32,19 @@ public MagmaCoreException() { * initialized, and may subsequently be initialized by a call to {@link #initCause(Throwable)}. * * @param message The detail message. The detail message is saved for later retrieval by the - * {@link #getMessage()} method. + * {@link #getMessage()} method. */ public MagmaCoreException(final String message) { super(message); } /** - * Constructs a new MagmaCoreException with the specified cause and a detail message of - * (cause==null ? null : cause.toString()) (which typically contains the class and detail - * message of cause). + * Constructs a new MagmaCoreException with the specified cause and a detail message of (cause==null + * ? null : cause.toString()) (which typically contains the class and detail message of cause). * - * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} - * method). (A {@code null} value is permitted, and indicates that the cause is - * nonexistent or unknown.) + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). (A + * {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) */ public MagmaCoreException(final Throwable cause) { super(cause); @@ -55,10 +54,10 @@ public MagmaCoreException(final Throwable cause) { * Constructs a new MagmaCoreException with the specified detail message and cause. * * @param message The detail message (which is saved for later retrieval by the - * {@link #getMessage()} method). - * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} - * method). (A {@code null} value is permitted, and indicates that the cause is - * nonexistent or unknown.) + * {@link #getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). + * (A {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) */ public MagmaCoreException(final String message, final Throwable cause) { super(message, cause); diff --git a/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java b/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java index e063de49..ee7bc5c7 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java +++ b/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java @@ -43,7 +43,7 @@ public final RDFNode get(final String varName) { * Set either the subject (s), object (o), or predicate (p) of the result triple. * * @param varName Name of variable within the query result to set. - * @param node RDF node to set. + * @param node RDF node to set. */ public final void set(final String varName, final RDFNode node) { map.put(varName, node); @@ -62,8 +62,8 @@ public final Map getMap() { } /** - * Get the value of an RDF node. This could either be the URI of the node, string literal, or - * the local name of the property within this namespace. + * Get the value of an RDF node. This could either be the URI of the node, string literal, or the + * local name of the property within this namespace. * * @param node Node to get the value of. * @return Value of the RDF node. diff --git a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java b/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java index 325df9d9..41c44bbc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java +++ b/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java @@ -28,7 +28,7 @@ public class QueryResultList { /** * Construct a new QueryResultList from a list of QueryResults and variable names. * - * @param varNames Variable names used in the results list. + * @param varNames Variable names used in the results list. * @param queryResults Results of the query. */ public QueryResultList(final List varNames, final List queryResults) { diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 5e4527a3..cca83176 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -44,7 +44,7 @@ public class MagmaCoreService { /** * Find an object by its ENTITY_NAME. * - * @param the return type. + * @param the return type. * @param name the name {@link String} to search for. * @return the {@link Thing}that was found. * @throws RuntimeException if no or multiple results found. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index 37c98080..09dcdb55 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -18,9 +18,8 @@ import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; /** - * Factory for creating MagmaCoreService instances. This - * removes the need to expose MagmaCoreDatabase interface to - * clients of the library. + * Factory for creating MagmaCoreService instances. This removes the need to expose + * MagmaCoreDatabase interface to clients of the library. */ public class MagmaCoreServiceFactory { @@ -28,7 +27,7 @@ public class MagmaCoreServiceFactory { * Create a Jena database. * * @return {@link MagmaCoreService} - */ + */ public static MagmaCoreService createWithJenaDatabase() { return new MagmaCoreService(new MagmaCoreJenaDatabase()); } @@ -38,7 +37,7 @@ public static MagmaCoreService createWithJenaDatabase() { * * @param name a database name String * @return {@link MagmaCoreService} - */ + */ public static MagmaCoreService createWithJenaDatabase(final String name) { return new MagmaCoreService(new MagmaCoreJenaDatabase(name)); } @@ -48,7 +47,7 @@ public static MagmaCoreService createWithJenaDatabase(final String name) { * * @param db a {@link MagmaCoreJenaDatabase} * @return {@link MagmaCoreService} - */ + */ public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase db) { return new MagmaCoreService(db); } @@ -58,7 +57,7 @@ public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabas * * @param url the url {@link String} * @return {@link MagmaCoreService} - */ + */ public static MagmaCoreService attachRemoteSparqlEndpoint(final String url) { return new MagmaCoreService(new MagmaCoreRemoteSparqlDatabase(url)); } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java index 0333ccd2..22218f0d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -33,7 +33,7 @@ public class DbChangeSet implements Function * * @param deletes a {@link List} of {@link DbDeleteOperation} * @param creates a {@link List} of {@link DbCreateOperation} - */ + */ public DbChangeSet(final List deletes, final List creates) { this.deletes = deletes; this.creates = creates; @@ -44,17 +44,11 @@ public DbChangeSet(final List deletes, final List (Function) x) - .reduce(Function::andThen) - .orElse(Function.identity()); + final var deleteFunction = deletes.stream().map(x -> (Function) x) + .reduce(Function::andThen).orElse(Function.identity()); - final var createFunction = creates - .stream() - .map(x -> (Function) x) - .reduce(Function::andThen) - .orElse(Function.identity()); + final var createFunction = creates.stream().map(x -> (Function) x) + .reduce(Function::andThen).orElse(Function.identity()); mcService.runInTransaction(deleteFunction.andThen(createFunction)); return mcService; @@ -65,12 +59,12 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * * @param c a {@link DbChangeSet} * @return The inverted {@link DbChangeSet}. - */ + */ public static DbChangeSet invert(final DbChangeSet c) { - final var newDeletes = c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toList()); - final var newCreates = c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toList()); - Collections.reverse(newDeletes); - Collections.reverse(newCreates); + final var newDeletes = c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toList()); + final var newCreates = c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toList()); + Collections.reverse(newDeletes); + Collections.reverse(newCreates); return new DbChangeSet(newDeletes, newCreates); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java index 1a1c9020..8c91a89a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -38,10 +38,10 @@ public class DbCreateOperation implements Function transformations) { this.transformations = transformations; } /** * Constructor. - * - */ + */ public DbTransformation() { this(new LinkedList<>()); } @@ -50,11 +48,8 @@ public DbTransformation() { */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { - final var transformation = transformations - .stream() - .map(x -> (Function) x) - .reduce(Function::andThen) - .orElse(Function.identity()); + final var transformation = transformations.stream().map(x -> (Function) x) + .reduce(Function::andThen).orElse(Function.identity()); return transformation.apply(mcService); } @@ -65,10 +60,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * @return The inverted {@link DbTransformation}. */ public DbTransformation invert() { - final var list = transformations - .stream() - .map(DbChangeSet::invert) - .collect(Collectors.toList()); + final var list = transformations.stream().map(DbChangeSet::invert).collect(Collectors.toList()); Collections.reverse(list); @@ -79,7 +71,7 @@ public DbTransformation invert() { * Add a DbChangeSet to this transformation. * * @param changeSet {@link DbChangeSet} - */ + */ public void add(final DbChangeSet changeSet) { this.transformations.add(changeSet); } diff --git a/src/main/java/uk/gov/gchq/magmacore/util/UID.java b/src/main/java/uk/gov/gchq/magmacore/util/UID.java index 8c1cebd0..50d61519 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/UID.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/UID.java @@ -21,7 +21,8 @@ */ public final class UID { - private UID() {} + private UID() { + } /** * Create a new random UUID to assign to an object. @@ -31,5 +32,4 @@ private UID() {} public static String uid() { return UUID.randomUUID().toString(); } - } diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index 00d74615..3694619d 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.demo; import static org.junit.Assert.assertNotNull; @@ -27,12 +27,10 @@ public class ExampleDataTest { /** * Test the {@link ExampleDataObjects} code. - * - * */ + */ @Test public void testWithJenaDatabase() { final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); - final var transformation = ExampleDataObjects.populateExampleData(service); assertNotNull(transformation); diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java index b2c5ff01..46f1ddda 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.demo; import static org.junit.Assert.assertNotNull; @@ -27,12 +27,11 @@ public class ExampleSignsTest { /** * Test the {@link ExampleSigns} code. - * - * */ + */ @Test public void testSignsExample() { final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); - + final var transformation = ExampleSigns.populateExampleData(service); assertNotNull(transformation); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java index 1828e0b9..0250c626 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service; +package uk.gov.gchq.magmacore.service; import static org.junit.Assert.assertNull; @@ -33,8 +33,7 @@ public class MagmaCoreServiceTest { /** * Test that triples can be deleted. - * - * */ + */ @Test public void test() { final var iri = new IRI(TEST_IRI); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index 9ca04671..1891f53d 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service.transformation; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -37,19 +37,17 @@ public class DbChangeSetTest { /** * Test that {@link DbChangeSet} can be applied, inverted, and undone. - * - * */ + */ @Test public void testApplyAndInvert() { final var iri = new IRI(TEST_IRI); // Create operations to add an object with dummy values. - final var changes = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world") - )); + final var changes = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); // Create a database to be updated. final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java index 9c531e3e..4a945a77 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service.transformation; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -37,9 +37,9 @@ public class DbOperationTest { private static final String TEST_IRI = "http://example.com/test#test"; /** - * Test that DbCreateOperations can be applied to a database and can also be - * inverted and used to undo the {@link DbCreateOperation}. - * */ + * Test that DbCreateOperations can be applied to a database and can also be inverted and used to + * undo the {@link DbCreateOperation}. + */ @Test public void testCreateAndDelete() { @@ -69,18 +69,18 @@ public void testCreateAndDelete() { } /** - * Test that multiple DbCreateOperations can be applied to a database and can also be - * inverted and used to undo the {@link DbCreateOperation}. - * */ + * Test that multiple DbCreateOperations can be applied to a database and can also be inverted and + * used to undo the {@link DbCreateOperation}. + */ @Test public void testMultipleCreateAndDelete() { final var iri = new IRI(TEST_IRI); // Create operations to add an object with dummy values. - final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); - final var op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); + final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final var op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); // Create a database to be updated. final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); @@ -109,8 +109,7 @@ public void testMultipleCreateAndDelete() { /** * Test that we get an exception when trying to create something that already exists. - * - * */ + */ @Test(expected = DbTransformationException.class) public void testCreateWhenAlreadyPresent() { @@ -129,8 +128,7 @@ public void testCreateWhenAlreadyPresent() { /** * Test that we get an exception when trying to delete something that does not exist. - * - * */ + */ @Test(expected = DbTransformationException.class) public void testDeleteWhenNotPresent() { @@ -148,8 +146,7 @@ public void testDeleteWhenNotPresent() { /** * Test the equals method for {@link DbCreateOperation}. - * - * */ + */ @Test public void testDbCreateEquals() { @@ -164,8 +161,7 @@ public void testDbCreateEquals() { /** * Test the equals method for {@link DbDeleteOperation}. - * - * */ + */ @Test public void testDbDeleteEquals() { diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index fcf8efb0..b7d7ca1e 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.service.transformation; +package uk.gov.gchq.magmacore.service.transformation; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -37,8 +37,7 @@ public class DbTransformationTest { /** * Test that multiple DbChangeSets can be applied as a DbTransformation, inverted, and undone. - * - * */ + */ @Test public void testApplyAndInvert() { @@ -46,22 +45,17 @@ public void testApplyAndInvert() { final var personIri = new IRI(TEST_IRI + "2"); // Create operations to add an object with dummy values. - final var changes1 = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "a world") - )); - - final var changes2 = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(personIri, HQDM.MEMBER_OF, "class2"), - new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "another world") - )); - - final var transformation = new DbTransformation(List.of( - changes1, - changes2 - )); + final var changes1 = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "class1"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); + + final var changes2 = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(personIri, HQDM.MEMBER_OF, "class2"), + new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "another world"))); + + final var transformation = new DbTransformation(List.of(changes1, changes2)); // Create a database to be updated. final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); From 68117ba540515ca6d6f04f5fa7afc025fdd3d496 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Thu, 30 Jun 2022 09:20:18 +0100 Subject: [PATCH 76/91] Update HQDM dependency to latest develop. --- .../uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java | 3 +-- .../magmacore/database/MagmaCoreRemoteSparqlDatabase.java | 2 +- .../gchq/magmacore/demo/McAssistMultInheritFromDataApp.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index a0872fb8..1222c111 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -45,10 +45,10 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.hqdm.rdf.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; @@ -332,5 +332,4 @@ public final void dump(final PrintStream out, final Lang language) { RDFDataMgr.write(out, dataset.getDefaultModel(), language); abort(); } - } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 5ab23b68..494de535 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -41,9 +41,9 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.Pair; import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.util.Pair; import uk.gov.gchq.magmacore.query.QueryResult; import uk.gov.gchq.magmacore.query.QueryResultList; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index 210efafc..958f010f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -21,10 +21,10 @@ import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.Pair; -import uk.gov.gchq.hqdm.rdf.Triples; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.hqdm.rdf.util.Pair; +import uk.gov.gchq.hqdm.rdf.util.Triples; /** * Demonstrate how to create a new class dynamically. From d9e90bff5f93aca8fc1814253cb56c622ac6f646 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Thu, 30 Jun 2022 23:12:45 +0000 Subject: [PATCH 77/91] Ordered methods in MagmaCoreDatabase. --- .../magmacore/database/MagmaCoreDatabase.java | 44 ++++++------ .../database/MagmaCoreJenaDatabase.java | 20 +++--- .../MagmaCoreRemoteSparqlDatabase.java | 71 +++++++++---------- .../transformation/DbTransformation.java | 11 +-- 4 files changed, 74 insertions(+), 72 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index d1402988..bd427b99 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -26,6 +26,28 @@ */ public interface MagmaCoreDatabase { + /** + * Start a transaction in READ mode and which will switch to WRITE if an update is attempted but + * only if no intermediate transaction has performed an update. + */ + void begin(); + + /** + * Commit a transaction - finish the current transaction and make any changes permanent (if a + * "write" transaction). + */ + void commit(); + + /** + * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). + */ + void abort(); + + /** + * Drop all data from the dataset. + */ + void drop(); + /** * Get an object from the collection. * @@ -96,26 +118,4 @@ public interface MagmaCoreDatabase { * @param out Output stream to dump to. */ void dump(PrintStream out); - - /** - * Begin a writeable transaction initially in READ mode, but in Jena it will switch to WRITE mode if - * updates are made. - */ - void begin(); - - /** - * Abort the current transaction. - */ - void abort(); - - /** - * Drop the entire database. - */ - void drop(); - - /** - * Commit the current transaction. - */ - void commit(); - } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 1222c111..2364df56 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -105,9 +105,9 @@ public void register(final IriBase base) { } /** - * Start a transaction which is READ mode and which will switch to WRITE if an update is attempted - * but only if no intermediate transaction has performed an update. + * {@inheritDoc} */ + @Override public void begin() { if (!dataset.isInTransaction()) { dataset.begin(); @@ -115,34 +115,36 @@ public void begin() { } /** - * Commit a transaction - finish the transaction and make any changes permanent (if a "write" - * transaction). + * {@inheritDoc} */ + @Override public void commit() { if (dataset.isInTransaction()) { dataset.commit(); dataset.end(); } } - + /** - * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). + * {@inheritDoc} */ + @Override public void abort() { if (dataset.isInTransaction()) { dataset.abort(); dataset.end(); } } - + /** - * Drop all data from the dataset. + * {@inheritDoc} */ + @Override public void drop() { final String drop = "drop all"; executeUpdate(drop); } - + /** * {@inheritDoc} */ diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 494de535..6c4e3d6b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -76,6 +76,41 @@ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset data connection.load(dataset.getDefaultModel()); } + /** + * {@inheritDoc} + */ + public final void begin() { + if (!connection.isInTransaction()) { + connection.begin(); + } + } + + /** + * {@inheritDoc} + */ + public final void abort() { + if (connection.isInTransaction()) { + connection.abort(); + } + } + + /** + * {@inheritDoc} + */ + public final void drop() { + final String drop = "drop all"; + executeUpdate(drop); + } + + /** + * Commit the current transaction. + */ + public final void commit() { + if (connection.isInTransaction()) { + connection.commit(); + } + } + /** * {@inheritDoc} */ @@ -270,40 +305,4 @@ public final void dump(final PrintStream out, final Lang language) { final Dataset dataset = connection.fetchDataset(); RDFDataMgr.write(out, dataset.getDefaultModel(), language); } - - /** - * Begin a writeable transaction initially in READ mode, but in Jena it will switch to WRITE mode if - * updates are made. - */ - public final void begin() { - if (!connection.isInTransaction()) { - connection.begin(); - } - } - - /** - * Abort the current transaction. - */ - public final void abort() { - if (connection.isInTransaction()) { - connection.abort(); - } - } - - /** - * Drop the entire database. - */ - public final void drop() { - final String drop = "drop all"; - executeUpdate(drop); - } - - /** - * Commit the current transaction. - */ - public final void commit() { - if (connection.isInTransaction()) { - connection.commit(); - } - } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java index 3e0dee35..60e754b9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java @@ -30,17 +30,18 @@ public class DbTransformation implements Function transformations) { - this.transformations = transformations; + public DbTransformation() { + this(new LinkedList<>()); } /** * Constructor. + * + * @param transformations a {@link List} of {@link DbChangeSet} */ - public DbTransformation() { - this(new LinkedList<>()); + public DbTransformation(final List transformations) { + this.transformations = transformations; } /** From 08087466d0916a6ff4bc2381c86f0d10560bc74c Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 1 Jul 2022 09:17:27 +0000 Subject: [PATCH 78/91] Renamed variable & parameter names to be descriptive & use type declaration instead of to aid readability. --- .../magmacore/demo/ExampleAssociations.java | 54 ++++---- .../magmacore/demo/ExampleDataObjects.java | 7 +- .../magmacore/demo/ExampleIndividuals.java | 34 ++--- .../gov/gchq/magmacore/demo/ExampleRdl.java | 119 +++++++++++------- .../gov/gchq/magmacore/demo/ExampleSigns.java | 83 ++++++------ .../gchq/magmacore/demo/ExampleSignsRdl.java | 10 +- .../magmacore/demo/FusekiServiceDemo.java | 19 +-- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 3 +- .../demo/McAssistMultInheritFromDataApp.java | 3 +- .../demo/RemoteSparqlDatabaseDemo.java | 3 +- .../magmacore/service/MagmaCoreService.java | 60 ++++----- .../service/MagmaCoreServiceFactory.java | 18 +-- .../service/transformation/DbChangeSet.java | 20 +-- .../transformation/DbCreateOperation.java | 11 +- .../transformation/DbDeleteOperation.java | 9 +- .../transformation/DbTransformation.java | 7 +- .../gchq/magmacore/demo/ExampleDataTest.java | 6 +- .../gchq/magmacore/demo/ExampleSignsTest.java | 7 +- .../service/MagmaCoreServiceTest.java | 10 +- .../transformation/DbChangeSetTest.java | 12 +- .../transformation/DbOperationTest.java | 52 ++++---- .../transformation/DbTransformationTest.java | 22 ++-- 22 files changed, 314 insertions(+), 255 deletions(-) diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 897d18cb..91a469b0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; @@ -25,6 +26,7 @@ import uk.gov.gchq.hqdm.model.Person; import uk.gov.gchq.hqdm.model.PossibleWorld; import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -53,7 +55,7 @@ private static void occupyHouse(final MagmaCoreService mcService, final List entities = mcService.findByEntityNameInTransaction( List.of("CLASS_OF_STATE_OF_PERSON", "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); @@ -69,11 +71,11 @@ private static void occupyHouse(final MagmaCoreService mcService, final List entities = mcService .findByEntityNameInTransaction(List.of("Example1_World", "PersonB1_Bob", "HouseB")); // Use an existing PossibleWorld @@ -138,32 +140,32 @@ public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) final FunctionalSystem house = (FunctionalSystem) entities.get("HouseB"); // Create IRIs for the objects we want to create. - final var e2 = ExampleCommonUtils.mkUserBaseIri(); - final var e3 = ExampleCommonUtils.mkUserBaseIri(); - final var e4 = ExampleCommonUtils.mkUserBaseIri(); - final var e5 = ExampleCommonUtils.mkUserBaseIri(); + final IRI event1 = ExampleCommonUtils.mkUserBaseIri(); + final IRI event2 = ExampleCommonUtils.mkUserBaseIri(); + final IRI event3 = ExampleCommonUtils.mkUserBaseIri(); + final IRI event4 = ExampleCommonUtils.mkUserBaseIri(); // Create DbCreateOperations to create the objects and their properties. - final var creates = new ArrayList(); - creates.add(new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); - creates.add(new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2020-08-15T17:50:00")); + final List creates = new ArrayList(); + creates.add(new DbCreateOperation(event1, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(event1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(event1, HQDM.ENTITY_NAME, "2020-08-15T17:50:00")); - creates.add(new DbCreateOperation(e3, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); - creates.add(new DbCreateOperation(e3, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(e3, HQDM.ENTITY_NAME, "2020-08-15T19:21:00")); + creates.add(new DbCreateOperation(event2, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(event2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(event2, HQDM.ENTITY_NAME, "2020-08-15T19:21:00")); - creates.add(new DbCreateOperation(e4, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); - creates.add(new DbCreateOperation(e4, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(e4, HQDM.ENTITY_NAME, "2020-08-16T22:33:00")); + creates.add(new DbCreateOperation(event3, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(event3, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(event3, HQDM.ENTITY_NAME, "2020-08-16T22:33:00")); - creates.add(new DbCreateOperation(e5, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); - creates.add(new DbCreateOperation(e5, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); - creates.add(new DbCreateOperation(e5, HQDM.ENTITY_NAME, "2020-08-17T10:46:00")); + creates.add(new DbCreateOperation(event4, RDFS.RDF_TYPE, HQDM.EVENT.getIri())); + creates.add(new DbCreateOperation(event4, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getId())); + creates.add(new DbCreateOperation(event4, HQDM.ENTITY_NAME, "2020-08-17T10:46:00")); // Add more DbCreateOperations to create the required associations. - occupyHouse(mcService, creates, possibleWorld, person, house, e2, e3); - occupyHouse(mcService, creates, possibleWorld, person, house, e4, e5); + occupyHouse(mcService, creates, possibleWorld, person, house, event1, event2); + occupyHouse(mcService, creates, possibleWorld, person, house, event3, event4); // Create and return a new change set. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 2eb8a117..545cb518 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -17,6 +17,7 @@ import java.util.List; import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** @@ -36,19 +37,19 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ // since they both depend on RDL being present, but also the occupancies depend on the // individuals being present, so each change set needs to be applied before the next one // can be created. - final var rdlChangeSet = ExampleRdl.createRefDataObjects(); + final DbChangeSet rdlChangeSet = ExampleRdl.createRefDataObjects(); // Apply the DbChangeSet rdlChangeSet.apply(mcService); // mcService now contains the RDL needed for the next DbChangeSet - final var individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(mcService); + final DbChangeSet individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(mcService); // Apply the DbChangeSet individualsChangeSet.apply(mcService); // mcService now contains the individuals needed for creating the next DbChangeSet - final var occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(mcService); + final DbChangeSet occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(mcService); // Apply the DbChangeSet occupanciesChangeSet.apply(mcService); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index cf5d66c5..c997fd5d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -15,11 +15,14 @@ package uk.gov.gchq.magmacore.demo; import java.util.List; +import java.util.Map; import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; import uk.gov.gchq.hqdm.model.KindOfPerson; import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; @@ -38,7 +41,7 @@ public class ExampleIndividuals { */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { - final var entities = mcService.findByEntityNameInTransaction(List.of("KIND_OF_PERSON", + final Map entities = mcService.findByEntityNameInTransaction(List.of("KIND_OF_PERSON", "NATURAL_MEMBER_OF_SOCIETY_ROLE", "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE")); @@ -50,37 +53,38 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi final Role domesticPropertyRole = (Role) entities.get("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // Create IRIs for the objects we want to create. - final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); - final var e1 = ExampleCommonUtils.mkUserBaseIri(); - final var e2 = ExampleCommonUtils.mkUserBaseIri(); - final var person = ExampleCommonUtils.mkUserBaseIri(); - final var house = ExampleCommonUtils.mkUserBaseIri(); + final IRI possibleWorld = ExampleCommonUtils.mkUserBaseIri(); + final IRI startEvent = ExampleCommonUtils.mkUserBaseIri(); + final IRI endEvent = ExampleCommonUtils.mkUserBaseIri(); + final IRI person = ExampleCommonUtils.mkUserBaseIri(); + final IRI house = ExampleCommonUtils.mkUserBaseIri(); // Create DbCreateOperations to create the objects and their properties. - final var creates = List.of(new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + final List creates = List.of( + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), - new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e1, HQDM.ENTITY_NAME, "1991-02-18T00:00:00"), + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "1991-02-18T00:00:00"), - new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e2, HQDM.ENTITY_NAME, "1972-06-01T00:00:00"), + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "1972-06-01T00:00:00"), new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(person, HQDM.ENTITY_NAME, "PersonB1_Bob"), new DbCreateOperation(person, HQDM.MEMBER_OF_KIND, kindOfPerson.getId()), new DbCreateOperation(person, HQDM.NATURAL_ROLE, personRole.getId()), - new DbCreateOperation(person, HQDM.BEGINNING, e1.getIri()), + new DbCreateOperation(person, HQDM.BEGINNING, startEvent.getIri()), new DbCreateOperation(house, RDFS.RDF_TYPE, HQDM.FUNCTIONAL_SYSTEM.getIri()), new DbCreateOperation(house, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(house, HQDM.ENTITY_NAME, "HouseB"), new DbCreateOperation(house, HQDM.MEMBER_OF_KIND, kindOfFunctionalSystemDomesticProperty.getId()), new DbCreateOperation(house, HQDM.INTENDED_ROLE, domesticPropertyRole.getId()), - new DbCreateOperation(house, HQDM.BEGINNING, e2.getIri())); + new DbCreateOperation(house, HQDM.BEGINNING, endEvent.getIri())); // Create a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index 6645b4d5..f8ad7090 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -17,6 +17,7 @@ import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -34,24 +35,24 @@ public class ExampleRdl { public static DbChangeSet createRefDataObjects() { // Create new unique IRIs for all the objects we need to create. - final var viewable = ExampleCommonUtils.mkRefBaseIri(); - final var viewableObject = ExampleCommonUtils.mkRefBaseIri(); - final var viewableAssociation = ExampleCommonUtils.mkRefBaseIri(); - final var kindOfBiologicalSystemHumanComponent = ExampleCommonUtils.mkRefBaseIri(); - final var kindOfPerson = ExampleCommonUtils.mkRefBaseIri(); - final var classOfStateOfPerson = ExampleCommonUtils.mkRefBaseIri(); - final var kindOfFunctionalSystemBuilding = ExampleCommonUtils.mkRefBaseIri(); - final var kindOfFunctionalSystemDomesticPropertyComponent = ExampleCommonUtils.mkRefBaseIri(); - final var kindOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); - final var classOfStateOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); - final var naturalMemberOfSocietyRole = ExampleCommonUtils.mkRefBaseIri(); - final var domesticPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final var domesticOccupantInPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final var occupierOfPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final var occupantInPropertyKindOfAssociation = ExampleCommonUtils.mkRefBaseIri(); + final IRI viewable = ExampleCommonUtils.mkRefBaseIri(); + final IRI viewableObject = ExampleCommonUtils.mkRefBaseIri(); + final IRI viewableAssociation = ExampleCommonUtils.mkRefBaseIri(); + final IRI kindOfBiologicalSystemHumanComponent = ExampleCommonUtils.mkRefBaseIri(); + final IRI kindOfPerson = ExampleCommonUtils.mkRefBaseIri(); + final IRI classOfStateOfPerson = ExampleCommonUtils.mkRefBaseIri(); + final IRI kindOfFunctionalSystemBuilding = ExampleCommonUtils.mkRefBaseIri(); + final IRI kindOfFunctionalSystemDomesticPropertyComponent = ExampleCommonUtils.mkRefBaseIri(); + final IRI kindOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); + final IRI classOfStateOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); + final IRI naturalMemberOfSocietyRole = ExampleCommonUtils.mkRefBaseIri(); + final IRI domesticPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final IRI domesticOccupantInPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final IRI occupierOfPropertyRole = ExampleCommonUtils.mkRefBaseIri(); + final IRI occupantInPropertyKindOfAssociation = ExampleCommonUtils.mkRefBaseIri(); // Add DbCreateOperations to create the objects and their properties. - final var creates = List.of( + final List creates = List.of( new DbCreateOperation(viewable, RDFS.RDF_TYPE, HQDM.CLASS.getIri()), new DbCreateOperation(viewable, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), new DbCreateOperation(viewable, HQDM.ENTITY_NAME, "VIEWABLE"), @@ -64,33 +65,45 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(viewableAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), new DbCreateOperation(viewableAssociation, HQDM.ENTITY_NAME, "VIEWABLE_ASSOCIATION"), - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, + HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT.getIri()), new DbCreateOperation(kindOfBiologicalSystemHumanComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.ENTITY_NAME, "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.ENTITY_NAME, + "KIND_OF_BIOLOGICAL_SYSTEM_HUMAN_COMPONENT"), new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, HQDM.KIND_OF_PERSON.getIri()), new DbCreateOperation(kindOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfPerson, HQDM.ENTITY_NAME, "KIND_OF_PERSON"), + new DbCreateOperation(kindOfPerson, HQDM.ENTITY_NAME, "KIND_OF_PERSON"), new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_PERSON.getIri()), new DbCreateOperation(classOfStateOfPerson, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), new DbCreateOperation(classOfStateOfPerson, HQDM.ENTITY_NAME, "CLASS_OF_STATE_OF_PERSON"), - new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, + HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), new DbCreateOperation(kindOfFunctionalSystemBuilding, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemBuilding, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"), - - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"), - - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(kindOfFunctionalSystemBuilding, HQDM.ENTITY_NAME, + "KIND_OF_FUNCTIONAL_SYSTEM_BUILDING"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, + HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, RDFS.RDF_TYPE, + RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.ENTITY_NAME, + "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY_COMPONENT"), + + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, + HQDM.KIND_OF_FUNCTIONAL_SYSTEM.getIri()), new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, + "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, + HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, RDFS.RDF_TYPE, + RDFS.RDFS_CLASS.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.ENTITY_NAME, + "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY"), new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), new DbCreateOperation(naturalMemberOfSocietyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), @@ -98,19 +111,23 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), new DbCreateOperation(domesticPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(domesticPropertyRole, HQDM.ENTITY_NAME, "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"), + new DbCreateOperation(domesticPropertyRole, HQDM.ENTITY_NAME, + "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"), new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.ENTITY_NAME, "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"), + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.ENTITY_NAME, + "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"), new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, HQDM.ROLE.getIri()), new DbCreateOperation(occupierOfPropertyRole, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), new DbCreateOperation(occupierOfPropertyRole, HQDM.ENTITY_NAME, "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"), - new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, HQDM.KIND_OF_ASSOCIATION.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, + HQDM.KIND_OF_ASSOCIATION.getIri()), new DbCreateOperation(occupantInPropertyKindOfAssociation, RDFS.RDF_TYPE, RDFS.RDFS_CLASS.getIri()), - new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), // Create the class hierarchy new DbCreateOperation(viewableObject, HQDM.HAS_SUPERCLASS, viewable.getIri()), @@ -119,31 +136,39 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(viewableAssociation, HQDM.HAS_SUPERCLASS, viewable.getIri()), new DbCreateOperation(viewableAssociation, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.HAS_SUPERCLASS, kindOfFunctionalSystemBuilding.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDFS_SUB_CLASS_OF, kindOfFunctionalSystemBuilding.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.HAS_SUPERCLASS, + kindOfFunctionalSystemBuilding.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, RDFS.RDFS_SUB_CLASS_OF, + kindOfFunctionalSystemBuilding.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.HAS_SUPERCLASS, domesticPropertyRole.getIri()), - new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDFS_SUB_CLASS_OF, domesticPropertyRole.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.HAS_SUPERCLASS, + domesticPropertyRole.getIri()), + new DbCreateOperation(domesticOccupantInPropertyRole, RDFS.RDFS_SUB_CLASS_OF, + domesticPropertyRole.getIri()), new DbCreateOperation(occupierOfPropertyRole, HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()), new DbCreateOperation(occupierOfPropertyRole, RDFS.RDFS_SUB_CLASS_OF, classOfStateOfPerson.getIri()), - // Set class memberships new DbCreateOperation(kindOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), new DbCreateOperation(classOfStateOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), - new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, viewableAssociation.getIri()), + new DbCreateOperation(classOfStateOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, + viewableObject.getIri()), + new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, + viewableAssociation.getIri()), // Set the has component by class predicates - new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfPerson.getIri()), - new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticProperty.getIri()), + new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, + kindOfPerson.getIri()), + new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, + kindOfFunctionalSystemDomesticProperty.getIri()), // Set the consists of by class predicates - new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), - new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()) - ); + new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, + occupantInPropertyKindOfAssociation.getIri()), + new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, + occupantInPropertyKindOfAssociation.getIri())); // Put the operations in a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index c2452765..6d361d79 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -15,10 +15,12 @@ package uk.gov.gchq.magmacore.demo; import java.util.List; +import java.util.Map; import uk.gov.gchq.hqdm.model.Description; import uk.gov.gchq.hqdm.model.Pattern; import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -44,13 +46,13 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ // since they both depend on RDL being present, but also the occupancies depend on the // individuals being present, so each change set needs to be applied before the next one // can be created. - final var rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); + final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); // Apply the DbChangeSet rdlChangeSet.apply(mcService); // mcService now contains the RDL needed for the next DbChangeSet - final var signsChangeSet = addSigns(mcService); + final DbChangeSet signsChangeSet = addSigns(mcService); // Apply the DbChangeSet signsChangeSet.apply(mcService); @@ -66,29 +68,30 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ * @return {@link DbChangeSet} */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final var entities = mcService + final Map entities = mcService .findByEntityNameInTransaction(List.of("URL Pattern", "Description By URL", "English Speakers")); // Find the required classes, kinds, and roles. - final var urlPattern = (Pattern) entities.get("URL Pattern"); - final var descriptionByUrl = (Description) entities.get("Description By URL"); - final var englishSpeakers = (RecognizingLanguageCommunity) entities.get("English Speakers"); - final var englishSpeakersIri = new IRI(englishSpeakers.getId()); + final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); + final Description descriptionByUrl = (Description) entities.get("Description By URL"); + final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities + .get("English Speakers"); + final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); // Create IRIs for the new entities. - final var possibleWorld = ExampleCommonUtils.mkUserBaseIri(); - final var person = ExampleCommonUtils.mkUserBaseIri(); - final var wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); - final var brittanica = ExampleCommonUtils.mkUserBaseIri(); - final var biography = ExampleCommonUtils.mkUserBaseIri(); - final var stanford = ExampleCommonUtils.mkUserBaseIri(); - final var nationalGeographic = ExampleCommonUtils.mkUserBaseIri(); - final var repBySign = ExampleCommonUtils.mkUserBaseIri(); - final var e1 = ExampleCommonUtils.mkUserBaseIri(); - final var e2 = ExampleCommonUtils.mkUserBaseIri(); + final IRI possibleWorld = ExampleCommonUtils.mkUserBaseIri(); + final IRI person = ExampleCommonUtils.mkUserBaseIri(); + final IRI wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); + final IRI britannica = ExampleCommonUtils.mkUserBaseIri(); + final IRI biography = ExampleCommonUtils.mkUserBaseIri(); + final IRI stanford = ExampleCommonUtils.mkUserBaseIri(); + final IRI nationalGeographic = ExampleCommonUtils.mkUserBaseIri(); + final IRI representationBySign = ExampleCommonUtils.mkUserBaseIri(); + final IRI startEvent = ExampleCommonUtils.mkUserBaseIri(); + final IRI endEvent = ExampleCommonUtils.mkUserBaseIri(); // Create the set of DbCreateOperations - final var creates = List.of( + final List creates = List.of( // Create the possible world that we are working in. new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), @@ -104,10 +107,10 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(brittanica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(brittanica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(brittanica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), - new DbCreateOperation(brittanica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(britannica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), + new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), @@ -126,30 +129,30 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Create the representation by signs - new DbCreateOperation(repBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), - new DbCreateOperation(repBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), - new DbCreateOperation(repBySign, HQDM.REPRESENTS, person.getIri()), - new DbCreateOperation(repBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), + new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), + new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Add beginning, ending, etc. from `association` - new DbCreateOperation(e1, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e1, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e1, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), - new DbCreateOperation(e2, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(e2, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(e2, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), - new DbCreateOperation(repBySign, HQDM.BEGINNING, e1.getIri()), - new DbCreateOperation(repBySign, HQDM.ENDING, e2.getIri()), + new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), + new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), // Add the participants - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(brittanica, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, repBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, repBySign.getIri())); + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, representationBySign.getIri())); // Create a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index cd4856ac..3f473700 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -17,6 +17,7 @@ import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -34,12 +35,13 @@ public class ExampleSignsRdl { public static DbChangeSet createRefDataObjects() { // Create new unique IRIs for all the objects we need to create. - final var urlPattern = ExampleCommonUtils.mkRefBaseIri(); - final var description = ExampleCommonUtils.mkRefBaseIri(); - final var englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); + final IRI urlPattern = ExampleCommonUtils.mkRefBaseIri(); + final IRI description = ExampleCommonUtils.mkRefBaseIri(); + final IRI englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); // Add DbCreateOperations to create the objects and their properties. - final var creates = List.of(new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), + final List creates = List.of( + new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN.getIri()), new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION.getIri()), diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index 516bf454..7be97ef2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -48,15 +48,16 @@ public void run(final boolean populate) { // Create/connect to persistent TDB. final MagmaCoreJenaDatabase tdb = new MagmaCoreJenaDatabase("tdb"); - // If TDB is not already populated create set of example data objects to - // store in TDB. - tdb.begin(); - final boolean dbIsEmpty = tdb.getDataset().isEmpty(); - tdb.commit(); - - if (dbIsEmpty && populate) { - // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. - ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); + if (populate) { + // If TDB is not already populated create set of example data objects to store in TDB. + tdb.begin(); + if (tdb.getDataset().isEmpty()) { + // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. + ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); + tdb.commit(); + } else { + tdb.abort(); + } } // Build and start Fuseki server. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index 18ed72a8..ee37dc90 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -19,6 +19,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -41,7 +42,7 @@ public final class JenaDatabaseDemo { */ public void run() { // Instantiate new in-memory Jena database. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Add example data objects to dataset. ExampleDataObjects.populateExampleData(mcService); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index 958f010f..d22dd2bc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -20,6 +20,7 @@ import uk.gov.gchq.hqdm.model.Participant; import uk.gov.gchq.hqdm.model.StateOfOrganization; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.RDFS; @@ -44,7 +45,7 @@ public static void main(final String[] args) { new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri())); // Create a new object using the type specification. - final var orgState = HqdmObjectFactory.create(uid(), newTypeSpecification); + final Thing orgState = HqdmObjectFactory.create(uid(), newTypeSpecification); // Check that it implements the two interfaces. if (orgState instanceof Participant && orgState instanceof StateOfOrganization) { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index 45684dff..bb58c30a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -15,6 +15,7 @@ package uk.gov.gchq.magmacore.demo; import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -35,7 +36,7 @@ public RemoteSparqlDatabaseDemo(final String url) { * @param populate true if the dataset should be populated with example data */ public void run(final boolean populate) { - final var mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); + final MagmaCoreService mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); if (populate) { ExampleDataObjects.populateExampleData(mcService); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index cca83176..6e756402 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -30,34 +30,34 @@ public class MagmaCoreService { // The service operates on a database. - private final MagmaCoreDatabase db; + private final MagmaCoreDatabase database; /** * Constructor that requires a {@link MagmaCoreDatabase}. * - * @param db {@link MagmaCoreDatabase} + * @param database {@link MagmaCoreDatabase} */ - MagmaCoreService(final MagmaCoreDatabase db) { - this.db = db; + MagmaCoreService(final MagmaCoreDatabase database) { + this.database = database; } /** * Find an object by its ENTITY_NAME. * - * @param the return type. - * @param name the name {@link String} to search for. + * @param the return type. + * @param entityName the name {@link String} to search for. * @return the {@link Thing}that was found. * @throws RuntimeException if no or multiple results found. */ - public T findByEntityName(final String name) { - final var searchResult = db.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, name); + public T findByEntityName(final String entityName) { + final List searchResult = database.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, entityName); if (searchResult.size() == 1) { return (T) searchResult.get(0); } else if (searchResult.isEmpty()) { - throw new RuntimeException("No entity found with name: " + name); + throw new RuntimeException("No entity found with name: " + entityName); } else { - throw new RuntimeException("Multiple entities found with name: " + name); + throw new RuntimeException("Multiple entities found with name: " + entityName); } } @@ -67,7 +67,7 @@ public T findByEntityName(final String name) { * @param thing {@link Thing} */ public void create(final Thing thing) { - db.create(thing); + database.create(thing); } /** @@ -76,7 +76,7 @@ public void create(final Thing thing) { * @param thing {@link Thing} */ public void update(final Thing thing) { - db.update(thing); + database.update(thing); } /** @@ -86,7 +86,7 @@ public void update(final Thing thing) { * @return {@link Thing} */ public Thing get(final IRI iri) { - return db.get(iri); + return database.get(iri); } /** @@ -97,12 +97,12 @@ public Thing get(final IRI iri) { */ public Thing getInTransaction(final IRI iri) { try { - db.begin(); - final var result = db.get(iri); - db.commit(); + database.begin(); + final Thing result = database.get(iri); + database.commit(); return result; } catch (final Exception e) { - db.abort(); + database.abort(); throw e; } } @@ -110,15 +110,15 @@ public Thing getInTransaction(final IRI iri) { /** * Run a function in a transaction. * - * @param f the {@link Function} to run. + * @param func the {@link Function} to run. */ - public void runInTransaction(final Function f) { + public void runInTransaction(final Function func) { try { - db.begin(); - f.apply(this); - db.commit(); + database.begin(); + func.apply(this); + database.commit(); } catch (final Exception e) { - db.abort(); + database.abort(); throw e; } } @@ -126,23 +126,23 @@ public void runInTransaction(final Function /** * Find many entities by name. * - * @param names a {@link List} of {@link String} + * @param entityNames a {@link List} of {@link String} * @return a {@link Map} of {@link String} to {@link Thing} */ - public Map findByEntityNameInTransaction(final List names) { + public Map findByEntityNameInTransaction(final List entityNames) { try { - db.begin(); - final var result = new HashMap(); + database.begin(); + final HashMap result = new HashMap(); - for (final String name : names) { + for (final String name : entityNames) { result.put(name, findByEntityName(name)); } - db.commit(); + database.commit(); return result; } catch (final Exception e) { - db.abort(); + database.abort(); throw e; } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index 09dcdb55..91e7af35 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -35,30 +35,30 @@ public static MagmaCoreService createWithJenaDatabase() { /** * Create a Jena database. * - * @param name a database name String + * @param location a database name String * @return {@link MagmaCoreService} */ - public static MagmaCoreService createWithJenaDatabase(final String name) { - return new MagmaCoreService(new MagmaCoreJenaDatabase(name)); + public static MagmaCoreService createWithJenaDatabase(final String location) { + return new MagmaCoreService(new MagmaCoreJenaDatabase(location)); } /** * Create a Jena database. * - * @param db a {@link MagmaCoreJenaDatabase} + * @param database a {@link MagmaCoreJenaDatabase} * @return {@link MagmaCoreService} */ - public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase db) { - return new MagmaCoreService(db); + public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase database) { + return new MagmaCoreService(database); } /** * Attach to a remote SPARQL Endpoint. * - * @param url the url {@link String} + * @param serviceUrl the url {@link String} * @return {@link MagmaCoreService} */ - public static MagmaCoreService attachRemoteSparqlEndpoint(final String url) { - return new MagmaCoreService(new MagmaCoreRemoteSparqlDatabase(url)); + public static MagmaCoreService attachRemoteSparqlEndpoint(final String serviceUrl) { + return new MagmaCoreService(new MagmaCoreRemoteSparqlDatabase(serviceUrl)); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java index 22218f0d..9ddc827e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -44,11 +44,13 @@ public DbChangeSet(final List deletes, final List (Function) x) - .reduce(Function::andThen).orElse(Function.identity()); + final Function deleteFunction = deletes.stream() + .map(d -> (Function) d).reduce(Function::andThen) + .orElse(Function.identity()); - final var createFunction = creates.stream().map(x -> (Function) x) - .reduce(Function::andThen).orElse(Function.identity()); + final Function createFunction = creates.stream() + .map(c -> (Function) c).reduce(Function::andThen) + .orElse(Function.identity()); mcService.runInTransaction(deleteFunction.andThen(createFunction)); return mcService; @@ -57,12 +59,14 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { /** * Invert a {@link DbChangeSet}. * - * @param c a {@link DbChangeSet} + * @param changeSet a {@link DbChangeSet} * @return The inverted {@link DbChangeSet}. */ - public static DbChangeSet invert(final DbChangeSet c) { - final var newDeletes = c.creates.stream().map(DbCreateOperation::invert).collect(Collectors.toList()); - final var newCreates = c.deletes.stream().map(DbDeleteOperation::invert).collect(Collectors.toList()); + public static DbChangeSet invert(final DbChangeSet changeSet) { + final List newDeletes = changeSet.creates.stream().map(DbCreateOperation::invert) + .collect(Collectors.toList()); + final List newCreates = changeSet.deletes.stream().map(DbDeleteOperation::invert) + .collect(Collectors.toList()); Collections.reverse(newDeletes); Collections.reverse(newCreates); return new DbChangeSet(newDeletes, newCreates); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java index 8c91a89a..74587a3e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -16,6 +16,7 @@ import java.util.function.Function; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; @@ -53,10 +54,10 @@ public DbCreateOperation(final IRI subject, final IRI predicate, final String ob */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { - final var thing = mcService.get(subject); + final Thing thing = mcService.get(subject); if (thing == null) { - final var newThing = SpatioTemporalExtentServices.createThing(subject.getIri()); + final Thing newThing = SpatioTemporalExtentServices.createThing(subject.getIri()); newThing.addStringValue(predicate.getIri(), object); mcService.create(newThing); } else { @@ -75,11 +76,11 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { /** * Invert an operation. * - * @param c {@link DbCreateOperation} + * @param createOperation {@link DbCreateOperation} * @return The inverted {@link DbDeleteOperation}. */ - public static DbDeleteOperation invert(final DbCreateOperation c) { - return new DbDeleteOperation(c.subject, c.predicate, c.object); + public static DbDeleteOperation invert(final DbCreateOperation createOperation) { + return new DbDeleteOperation(createOperation.subject, createOperation.predicate, createOperation.object); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java index 3775bb36..19b89c35 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java @@ -16,6 +16,7 @@ import java.util.function.Function; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.exception.DbTransformationException; import uk.gov.gchq.magmacore.service.MagmaCoreService; @@ -45,7 +46,7 @@ public DbDeleteOperation(final IRI subject, final IRI predicate, final String ob * {@inheritDoc} */ public MagmaCoreService apply(final MagmaCoreService mcService) { - final var thing = mcService.get(subject); + final Thing thing = mcService.get(subject); if (thing != null && thing.hasThisValue(predicate.getIri(), object)) { thing.removeValue(predicate.getIri(), object); @@ -60,11 +61,11 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { /** * Invert a {@link DbDeleteOperation}. * - * @param d the {@link DbDeleteOperation} + * @param deleteOperation the {@link DbDeleteOperation} * @return The inverted {@link DbCreateOperation}. */ - public static DbCreateOperation invert(final DbDeleteOperation d) { - return new DbCreateOperation(d.subject, d.predicate, d.object); + public static DbCreateOperation invert(final DbDeleteOperation deleteOperation) { + return new DbCreateOperation(deleteOperation.subject, deleteOperation.predicate, deleteOperation.object); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java index 60e754b9..238fbe7f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java @@ -49,8 +49,9 @@ public DbTransformation(final List transformations) { */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { - final var transformation = transformations.stream().map(x -> (Function) x) - .reduce(Function::andThen).orElse(Function.identity()); + final Function transformation = transformations.stream() + .map(t -> (Function) t).reduce(Function::andThen) + .orElse(Function.identity()); return transformation.apply(mcService); } @@ -61,7 +62,7 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * @return The inverted {@link DbTransformation}. */ public DbTransformation invert() { - final var list = transformations.stream().map(DbChangeSet::invert).collect(Collectors.toList()); + final List list = transformations.stream().map(DbChangeSet::invert).collect(Collectors.toList()); Collections.reverse(list); diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index 3694619d..f94ea922 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -18,7 +18,9 @@ import org.junit.Test; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; +import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** * Exercise the {@link ExampleDataObjects} code during the build. @@ -30,8 +32,8 @@ public class ExampleDataTest { */ @Test public void testWithJenaDatabase() { - final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); - final var transformation = ExampleDataObjects.populateExampleData(service); + final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbTransformation transformation = ExampleDataObjects.populateExampleData(service); assertNotNull(transformation); } diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java index 46f1ddda..613f5240 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java @@ -18,7 +18,9 @@ import org.junit.Test; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; +import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** * Exercise the {@link ExampleSigns} code during the build. @@ -30,9 +32,8 @@ public class ExampleSignsTest { */ @Test public void testSignsExample() { - final var service = MagmaCoreServiceFactory.createWithJenaDatabase(); - - final var transformation = ExampleSigns.populateExampleData(service); + final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbTransformation transformation = ExampleSigns.populateExampleData(service); assertNotNull(transformation); } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java index 0250c626..3e727a80 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -18,6 +18,8 @@ import org.junit.Test; +import uk.gov.gchq.hqdm.model.Individual; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; @@ -36,11 +38,11 @@ public class MagmaCoreServiceTest { */ @Test public void test() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); - final var db = new MagmaCoreJenaDatabase(); + final MagmaCoreJenaDatabase db = new MagmaCoreJenaDatabase(); - final var thing = SpatioTemporalExtentServices.createIndividual(TEST_IRI); + final Individual thing = SpatioTemporalExtentServices.createIndividual(TEST_IRI); thing.addValue(HQDM.MEMBER_OF.getIri(), "class1"); @@ -55,7 +57,7 @@ public void test() { db.commit(); db.begin(); - final var thingFromDb = db.get(iri); + final Thing thingFromDb = db.get(iri); db.commit(); assertNull(thingFromDb); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index 1891f53d..7172636b 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -22,9 +22,11 @@ import org.junit.Test; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -41,22 +43,22 @@ public class DbChangeSetTest { @Test public void testApplyAndInvert() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); // Create operations to add an object with dummy values. - final var changes = new DbChangeSet(List.of(), + final DbChangeSet changes = new DbChangeSet(List.of(), List.of(new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"), new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. mcService.runInTransaction(changes); // Find the thing we just created and assert values are present. - final var thing = mcService.getInTransaction(iri); + final Thing thing = mcService.getInTransaction(iri); assertNotNull(thing); assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); @@ -66,7 +68,7 @@ public void testApplyAndInvert() { // Invert the operations, apply them in reverse order and assert they are no longer present. mcService.runInTransaction(DbChangeSet.invert(changes)); - final var thingFromDb = mcService.getInTransaction(iri); + final Thing thingFromDb = mcService.getInTransaction(iri); assertNull(thingFromDb); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java index 4a945a77..fb3fa6ff 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -22,10 +22,12 @@ import org.junit.Test; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -44,19 +46,19 @@ public class DbOperationTest { public void testCreateAndDelete() { // Create an operation to add an object with dummy values. - final var iri = new IRI(TEST_IRI); - final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final IRI iri = new IRI(TEST_IRI); + final DbCreateOperation op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation. mcService.runInTransaction(op1); mcService.runInTransaction(op2); // Find the thing we just created and assert it's presence. - final var thing = mcService.getInTransaction(iri); + final Thing thing = mcService.getInTransaction(iri); assertNotNull(thing); assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); @@ -64,7 +66,7 @@ public void testCreateAndDelete() { // Invert the operation and assert that it is no longer present. mcService.runInTransaction(DbCreateOperation.invert(op2)); - final var thingFromDb = mcService.getInTransaction(iri); + final Thing thingFromDb = mcService.getInTransaction(iri); assertFalse(thingFromDb.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); } @@ -75,15 +77,15 @@ public void testCreateAndDelete() { @Test public void testMultipleCreateAndDelete() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); // Create operations to add an object with dummy values. - final var op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); - final var op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); + final DbCreateOperation op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbCreateOperation op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. mcService.runInTransaction(op1); @@ -91,7 +93,7 @@ public void testMultipleCreateAndDelete() { mcService.runInTransaction(op3); // Find the thing we just created and assert values are present. - final var thing = mcService.getInTransaction(iri); + final Thing thing = mcService.getInTransaction(iri); assertNotNull(thing); assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); @@ -103,7 +105,7 @@ public void testMultipleCreateAndDelete() { mcService.runInTransaction(DbCreateOperation.invert(op2)); mcService.runInTransaction(DbCreateOperation.invert(op1)); - final var thingFromDb = mcService.getInTransaction(iri); + final Thing thingFromDb = mcService.getInTransaction(iri); assertNull(thingFromDb); } @@ -113,13 +115,13 @@ public void testMultipleCreateAndDelete() { @Test(expected = DbTransformationException.class) public void testCreateWhenAlreadyPresent() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); // Create an operation to add an object with dummy values. - final var op = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation op = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation twice, the second should throw an exception. mcService.runInTransaction(op); @@ -132,13 +134,13 @@ public void testCreateWhenAlreadyPresent() { @Test(expected = DbTransformationException.class) public void testDeleteWhenNotPresent() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); // Create an operation to add an object with dummy values. - final var op = new DbDeleteOperation(iri, HQDM.INDIVIDUAL, "value"); + final DbDeleteOperation op = new DbDeleteOperation(iri, HQDM.INDIVIDUAL, "value"); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operation, it should throw an exception. mcService.runInTransaction(op); @@ -150,10 +152,10 @@ public void testDeleteWhenNotPresent() { @Test public void testDbCreateEquals() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); - final var op1 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); - final var op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbCreateOperation op1 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); assertTrue(op1.equals(op2)); assertEquals(op1.hashCode(), op2.hashCode()); @@ -165,10 +167,10 @@ public void testDbCreateEquals() { @Test public void testDbDeleteEquals() { - final var iri = new IRI(TEST_IRI); + final IRI iri = new IRI(TEST_IRI); - final var op1 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); - final var op2 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbDeleteOperation op1 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbDeleteOperation op2 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); assertTrue(op1.equals(op2)); assertEquals(op1.hashCode(), op2.hashCode()); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index b7d7ca1e..70597529 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -22,9 +22,11 @@ import org.junit.Test; +import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** @@ -41,37 +43,37 @@ public class DbTransformationTest { @Test public void testApplyAndInvert() { - final var individualIri = new IRI(TEST_IRI + "1"); - final var personIri = new IRI(TEST_IRI + "2"); + final IRI individualIri = new IRI(TEST_IRI + "1"); + final IRI personIri = new IRI(TEST_IRI + "2"); // Create operations to add an object with dummy values. - final var changes1 = new DbChangeSet(List.of(), + final DbChangeSet changes1 = new DbChangeSet(List.of(), List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "class1"), new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); - final var changes2 = new DbChangeSet(List.of(), + final DbChangeSet changes2 = new DbChangeSet(List.of(), List.of(new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), new DbCreateOperation(personIri, HQDM.MEMBER_OF, "class2"), new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "another world"))); - final var transformation = new DbTransformation(List.of(changes1, changes2)); + final DbTransformation transformation = new DbTransformation(List.of(changes1, changes2)); // Create a database to be updated. - final var mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Apply the operations. mcService.runInTransaction(transformation); // Find the thing we just created and assert values are present. - final var thing1 = mcService.getInTransaction(individualIri); + final Thing thing1 = mcService.getInTransaction(individualIri); assertNotNull(thing1); assertTrue(thing1.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); assertTrue(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); assertTrue(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); - final var thing2 = mcService.getInTransaction(personIri); + final Thing thing2 = mcService.getInTransaction(personIri); assertNotNull(thing2); assertTrue(thing2.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri())); @@ -81,10 +83,10 @@ public void testApplyAndInvert() { // Invert the operations, apply them in reverse order and assert they are no longer present. mcService.runInTransaction(transformation.invert()); - final var thing1FromDb = mcService.getInTransaction(individualIri); + final Thing thing1FromDb = mcService.getInTransaction(individualIri); assertNull(thing1FromDb); - final var thing2FromDb = mcService.getInTransaction(personIri); + final Thing thing2FromDb = mcService.getInTransaction(personIri); assertNull(thing2FromDb); } } From 3fbbe05afd58f6b332dc8bef46fb76506c61aff3 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 1 Jul 2022 18:47:08 +0000 Subject: [PATCH 79/91] Updated Javadocs. --- src/main/java/module-info.java | 2 +- .../java/uk/gov/gchq/magmacore/MagmaCore.java | 4 +- .../magmacore/database/MagmaCoreDatabase.java | 12 ++--- .../database/MagmaCoreJenaDatabase.java | 20 ++++---- .../MagmaCoreRemoteSparqlDatabase.java | 13 ++--- .../magmacore/demo/ExampleAssociations.java | 16 +++--- .../magmacore/demo/ExampleCommonUtils.java | 6 +-- .../magmacore/demo/ExampleDataObjects.java | 18 +++---- .../magmacore/demo/ExampleIndividuals.java | 9 ++-- .../gov/gchq/magmacore/demo/ExampleRdl.java | 12 ++--- .../gov/gchq/magmacore/demo/ExampleSigns.java | 26 +++++----- .../gchq/magmacore/demo/ExampleSignsRdl.java | 8 +-- .../magmacore/demo/FusekiServiceDemo.java | 2 +- .../demo/McAssistMultInheritFromDataApp.java | 2 +- .../demo/RemoteSparqlDatabaseDemo.java | 9 +++- .../gchq/magmacore/query/QueryResultList.java | 2 +- .../magmacore/service/MagmaCoreService.java | 49 +++++++++---------- .../service/MagmaCoreServiceFactory.java | 24 ++++----- .../gchq/magmacore/service/package-info.java | 18 +++++++ .../service/transformation/DbChangeSet.java | 12 ++--- .../transformation/DbCreateOperation.java | 20 ++++---- .../transformation/DbDeleteOperation.java | 22 ++++----- .../transformation/DbTransformation.java | 12 ++--- .../service/transformation/package-info.java | 18 +++++++ .../java/uk/gov/gchq/magmacore/util/UID.java | 4 +- .../gov/gchq/magmacore/util/package-info.java | 2 +- 26 files changed, 191 insertions(+), 151 deletions(-) create mode 100644 src/main/java/uk/gov/gchq/magmacore/service/package-info.java create mode 100644 src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 220171a0..ae1de8ab 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -15,7 +15,7 @@ /** * Module dependencies. */ -module MagmaCore.service.main { +module uk.gov.gchq.magmacore { requires uk.gov.gchq.hqdm.core; requires transitive uk.gov.gchq.hqdm.rdf; requires org.apache.jena.arq; diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java index 8e0b99fc..1552ab34 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java @@ -56,7 +56,7 @@ public static void main(final String[] args) { /** * Executes the FusekiServiceDemo. * - * @param populate true if the dataset should be populated with example data + * @param populate {@code true} if the dataset should be populated with example data. */ public static void fuseki(final boolean populate) { new FusekiServiceDemo().run(populate); @@ -65,7 +65,7 @@ public static void fuseki(final boolean populate) { /** * Executes the RemoteSparqlDatabaseDemo. * - * @param populate true if the dataset should be populated with example data + * @param populate {@code true} if the dataset should be populated with example data. */ public static void remoteSparqlDatabaseDemo(final boolean populate) { new RemoteSparqlDatabaseDemo("http://localhost:3330/tdb").run(populate); diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index bd427b99..83cbadf9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -33,13 +33,13 @@ public interface MagmaCoreDatabase { void begin(); /** - * Commit a transaction - finish the current transaction and make any changes permanent (if a + * Commit a transaction - Finish the current transaction and make any changes permanent (if a * "write" transaction). */ void commit(); /** - * Abort a transaction - finish the transaction and undo any changes (if a "write" transaction). + * Abort a transaction - Finish the transaction and undo any changes (if a "write" transaction). */ void abort(); @@ -82,7 +82,7 @@ public interface MagmaCoreDatabase { * * @param predicateIri IRI of the predicate being queried. * @param objectIri IRI of the object to match. - * @return The object(s). + * @return The {@link Thing}(s) found. */ List findByPredicateIri(IRI predicateIri, IRI objectIri); @@ -90,7 +90,7 @@ public interface MagmaCoreDatabase { * Find object(s) that have a specific HQDM-defined predication. * * @param predicateIri IRI of the HQDM relationship type being queried. - * @return The object(s). + * @return The {@link Thing}(s) found. */ List findByPredicateIriOnly(HqdmIri predicateIri); @@ -99,7 +99,7 @@ public interface MagmaCoreDatabase { * * @param predicateIri IRI of the predicate being queried. * @param value Case-sensitive string to match. - * @return The object(s). + * @return The {@link Thing}(s) found. */ List findByPredicateIriAndStringValue(IRI predicateIri, String value); @@ -108,7 +108,7 @@ public interface MagmaCoreDatabase { * * @param predicateIri IRI of the predicate being queried. * @param value Case-insensitive string to match. - * @return The object(s). + * @return The {@link Thing}(s). */ List findByPredicateIriAndStringCaseInsensitive(IRI predicateIri, String value); diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 2364df56..97c7abfe 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -61,14 +61,14 @@ public class MagmaCoreJenaDatabase implements MagmaCoreDatabase { private final Dataset dataset; /** - * Instantiate a new in-memory Magma Core Jena dataset. + * Constructs a MagmaCoreJenaDatabase with a new in-memory Jena dataset. */ public MagmaCoreJenaDatabase() { dataset = TDB2Factory.createDataset(); } /** - * Instantiate a new in-memory Magma Core Jena database using an existing dataset. + * Constructs a MagmaCoreJenaDatabase with an existing Jena dataset. * * @param dataset Existing in-memory Jena dataset. */ @@ -77,18 +77,18 @@ public MagmaCoreJenaDatabase(final Dataset dataset) { } /** - * Create/connect a persistent Jena dataset using Apache TDB2. + * Constructs a MagmaCoreJenaDatabase connected to a remote Jena TDB2 dataset. * - * @param location Path of persistent TDB. + * @param location URL of the remote dataset. */ public MagmaCoreJenaDatabase(final String location) { dataset = TDB2Factory.connectDataset(location); } /** - * Get Jena dataset. + * Get the Jena {@link dataset}. * - * @return The Jena dataset. + * @return The Jena {@link dataset}. */ public final Dataset getDataset() { return dataset; @@ -98,7 +98,7 @@ public final Dataset getDataset() { * Register a new prefix/namespace mapping which will be used to shorten the print strings for * resources in known namespaces. * - * @param base IRI prefix to register. + * @param base {@link IriBase} to register. */ public void register(final IriBase base) { PrintUtil.registerPrefix(base.getPrefix(), base.getNamespace()); @@ -124,7 +124,7 @@ public void commit() { dataset.end(); } } - + /** * {@inheritDoc} */ @@ -135,7 +135,7 @@ public void abort() { dataset.end(); } } - + /** * {@inheritDoc} */ @@ -144,7 +144,7 @@ public void drop() { final String drop = "drop all"; executeUpdate(drop); } - + /** * {@inheritDoc} */ diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 6c4e3d6b..5aea9013 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -55,9 +55,9 @@ public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { private final RDFConnection connection; /** - * Constructor to create a connection to a SPARQL endpoint. + * Constructs a MagmaCoreRemoteSparqlDatabase connection to a SPARQL server. * - * @param serviceUrl the URL String of the SPARQL update endpoint + * @param serviceUrl The URL of the SPARQL update endpoint. */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { connection = RDFConnectionRemote.newBuilder().destination(serviceUrl).queryEndpoint("query") @@ -65,10 +65,11 @@ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { } /** - * Constructor to create a connection to a SPARQL endpoint and load it with a dataset. + * Constructs a MagmaCoreRemoteSparqlDatabase connection to a SPARQL server and populates it with + * the dataset. * - * @param serviceUrl the URL String of the SPARQL update endpoint - * @param dataset the Dataset to be loaded into the database + * @param serviceUrl The URL String of the SPARQL update endpoint. + * @param dataset The Dataset to be loaded into the database. */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset dataset) { this(serviceUrl); @@ -261,7 +262,7 @@ private final List toTopObjects(final QueryResultList queryResultsList) { final String predicateVarName = queryResultsList.getVarNames().get(1); final String objectVarName = queryResultsList.getVarNames().get(2); - // Create a map of the triples for each unique subject IRI + // Create a map of the triples for each unique subject IRI. final List queryResults = queryResultsList.getQueryResults(); queryResults.forEach(queryResult -> { final String subjectValue = queryResult.get(subjectVarName).toString(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index 91a469b0..b60fa868 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -36,20 +36,20 @@ import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example associations. */ public class ExampleAssociations { /** * Create a person-occupies-house association. * - * @param mcService a {@link MagmaCoreDatabase} - * @param creates {@link List} of {@link DbCreateOperation} - * @param possibleWorld a {@link PossibleWorld} - * @param person the {@link Person} occupying the house. - * @param house the house as a {@link FunctionalSystem} that is occupied. - * @param beginning {@link Event} - * @param ending {@link Event} + * @param mcService {@link MagmaCoreDatabase}. + * @param creates {@link List} of {@link DbCreateOperation}. + * @param possibleWorld A {@link PossibleWorld}. + * @param person {@link Person} occupying the house. + * @param house The house as a {@link FunctionalSystem} that is occupied. + * @param beginning Beginning {@link Event}. + * @param ending Ending {@link Event}. */ private static void occupyHouse(final MagmaCoreService mcService, final List creates, final PossibleWorld possibleWorld, final Person person, final FunctionalSystem house, final IRI beginning, diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java index 97a71da6..da722bbf 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java @@ -20,7 +20,7 @@ import uk.gov.gchq.hqdm.rdf.iri.IriBase; /** - * Functions for creating systems using MagmaCore and HQDM. + * Utilities for creating example data for the demos. */ public class ExampleCommonUtils { @@ -30,7 +30,7 @@ public class ExampleCommonUtils { /** * Create a new IRI in the USER_BASE namespace. * - * @return {@link IRI} + * @return {@link IRI}. */ public static IRI mkUserBaseIri() { return new IRI(USER_BASE, uid()); @@ -42,7 +42,7 @@ public static IRI mkUserBaseIri() { /** * Create a new IRI in the REF_BASE namespace. * - * @return {@link IRI} + * @return {@link IRI}. */ public static IRI mkRefBaseIri() { return new IRI(REF_BASE, uid()); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java index 545cb518..8acd2c32 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java @@ -21,15 +21,15 @@ import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example data objects. */ public class ExampleDataObjects { /** - * A function that populates a database. + * Populate a {@link MagmaCoreService} database. * - * @param mcService a {@link MagmaCoreService} - * @return {@link DbTransformation} + * @param mcService {@link MagmaCoreService} to populate. + * @return {@link DbTransformation} performed. */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { @@ -39,19 +39,19 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ // can be created. final DbChangeSet rdlChangeSet = ExampleRdl.createRefDataObjects(); - // Apply the DbChangeSet + // Apply the DbChangeSet. rdlChangeSet.apply(mcService); - // mcService now contains the RDL needed for the next DbChangeSet + // mcService now contains the RDL needed for the next DbChangeSet. final DbChangeSet individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(mcService); - // Apply the DbChangeSet + // Apply the DbChangeSet. individualsChangeSet.apply(mcService); - // mcService now contains the individuals needed for creating the next DbChangeSet + // mcService now contains the individuals needed for creating the next DbChangeSet. final DbChangeSet occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(mcService); - // Apply the DbChangeSet + // Apply the DbChangeSet. occupanciesChangeSet.apply(mcService); // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index c997fd5d..dae27cc9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -29,15 +29,15 @@ import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example invididuals. */ public class ExampleIndividuals { /** * Create a DbChangeSet that adds the whole life individuals. * - * @param mcService {@link MagmaCoreService} - * @return {@link DbChangeSet} + * @param mcService {@link MagmaCoreService}. + * @return {@link DbChangeSet}. */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { @@ -89,7 +89,4 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi // Create a change set and return it. return new DbChangeSet(List.of(), creates); } - - public ExampleIndividuals() { - } } diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index f8ad7090..0c0a91f0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -23,14 +23,14 @@ import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example reference data. */ public class ExampleRdl { /** * Create a DbChangeSet that adds the RDL. * - * @return {@link DbChangeSet} + * @return {@link DbChangeSet}. */ public static DbChangeSet createRefDataObjects() { @@ -129,7 +129,7 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.ENTITY_NAME, "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION"), - // Create the class hierarchy + // Create the class hierarchy. new DbCreateOperation(viewableObject, HQDM.HAS_SUPERCLASS, viewable.getIri()), new DbCreateOperation(viewableObject, RDFS.RDFS_SUB_CLASS_OF, viewable.getIri()), @@ -149,7 +149,7 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(occupierOfPropertyRole, HQDM.HAS_SUPERCLASS, classOfStateOfPerson.getIri()), new DbCreateOperation(occupierOfPropertyRole, RDFS.RDFS_SUB_CLASS_OF, classOfStateOfPerson.getIri()), - // Set class memberships + // Set class memberships. new DbCreateOperation(kindOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), new DbCreateOperation(classOfStateOfPerson, HQDM.MEMBER_OF, viewableObject.getIri()), new DbCreateOperation(kindOfFunctionalSystemDomesticProperty, HQDM.MEMBER_OF, viewableObject.getIri()), @@ -158,13 +158,13 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(occupantInPropertyKindOfAssociation, HQDM.MEMBER_OF, viewableAssociation.getIri()), - // Set the has component by class predicates + // Set the has component by class predicates. new DbCreateOperation(kindOfBiologicalSystemHumanComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfPerson.getIri()), new DbCreateOperation(kindOfFunctionalSystemDomesticPropertyComponent, HQDM.HAS_COMPONENT_BY_CLASS, kindOfFunctionalSystemDomesticProperty.getIri()), - // Set the consists of by class predicates + // Set the consists of by class predicates. new DbCreateOperation(domesticOccupantInPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, occupantInPropertyKindOfAssociation.getIri()), new DbCreateOperation(occupierOfPropertyRole, HQDM.CONSISTS_OF_BY_CLASS, diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index 6d361d79..68611bae 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -30,15 +30,15 @@ import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example signs. */ public class ExampleSigns { /** * A function that populates a database. * - * @param mcService a {@link MagmaCoreService} - * @return {@link DbTransformation} + * @param mcService A {@link MagmaCoreService}. + * @return {@link DbTransformation}. */ public static DbTransformation populateExampleData(final MagmaCoreService mcService) { @@ -48,13 +48,13 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ // can be created. final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); - // Apply the DbChangeSet + // Apply the DbChangeSet. rdlChangeSet.apply(mcService); // mcService now contains the RDL needed for the next DbChangeSet final DbChangeSet signsChangeSet = addSigns(mcService); - // Apply the DbChangeSet + // Apply the DbChangeSet. signsChangeSet.apply(mcService); // // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. @@ -64,8 +64,8 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ /** * Create a {@link DbChangeSet} to add the representation by sign. * - * @param mcService {@link MagmaCoreService} - * @return {@link DbChangeSet} + * @param mcService {@link MagmaCoreService}. + * @return {@link DbChangeSet}. */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final Map entities = mcService @@ -90,18 +90,18 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final IRI startEvent = ExampleCommonUtils.mkUserBaseIri(); final IRI endEvent = ExampleCommonUtils.mkUserBaseIri(); - // Create the set of DbCreateOperations + // Create the set of DbCreateOperations. final List creates = List.of( // Create the possible world that we are working in. new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), - // Create the thing represented + // Create the thing represented. new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - // Create the signs that represent the thing + // Create the signs that represent the thing. new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), @@ -128,13 +128,13 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { "https://www.nationalgeographic.com/culture/article/socrates"), new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - // Create the representation by signs + // Create the representation by signs. new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - // Add beginning, ending, etc. from `association` + // Add beginning, ending, etc. from `association`. new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), @@ -146,7 +146,7 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), - // Add the participants + // Add the participants. new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, representationBySign.getIri()), new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, representationBySign.getIri()), new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index 3f473700..5870a129 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -23,14 +23,14 @@ import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** - * Functions for creating systems using MagmaCore and HQDM. + * Example signs reference data. */ public class ExampleSignsRdl { /** * Create a DbChangeSet that adds the RDL. * - * @return {@link DbChangeSet} + * @return {@link DbChangeSet}. */ public static DbChangeSet createRefDataObjects() { @@ -47,11 +47,11 @@ public static DbChangeSet createRefDataObjects() { new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION.getIri()), new DbCreateOperation(description, HQDM.ENTITY_NAME, "Description By URL"), - // Create the community that recognizes the signs + // Create the community that recognizes the signs. new DbCreateOperation(englishSpeakers, RDFS.RDF_TYPE, HQDM.RECOGNIZING_LANGUAGE_COMMUNITY.getIri()), new DbCreateOperation(englishSpeakers, HQDM.ENTITY_NAME, "English Speakers"), - // Link the description to the Pattern + // Link the description to the Pattern. new DbCreateOperation(description, HQDM.CONSISTS_OF_BY_CLASS, urlPattern.getIri()) ); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index 7be97ef2..82bc2a65 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -42,7 +42,7 @@ public final class FusekiServiceDemo { /** * Run the example Fuseki server. * - * @param populate true if the dataset should be populated with example data + * @param populate {@code true} if the dataset should be populated with example data. */ public void run(final boolean populate) { // Create/connect to persistent TDB. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java index d22dd2bc..5f74ac73 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java @@ -35,7 +35,7 @@ public class McAssistMultInheritFromDataApp { /** * Example program for creating classes dynamically. * - * @param args an array of Strings. + * @param args An array of Strings. */ public static void main(final String[] args) { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index bb58c30a..7766c425 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -26,14 +26,19 @@ public final class RemoteSparqlDatabaseDemo { private final String url; + /** + * Constructs a RemoteSparqlDatabaseDemo with a remote SPARQL server connection. + * + * @param url URL of the SPARQL server. + */ public RemoteSparqlDatabaseDemo(final String url) { this.url = url; } /** - * Run the demo. + * Run the RemoteSparqlDatabase demo. * - * @param populate true if the dataset should be populated with example data + * @param populate {@code true} if the dataset should be populated with example data. */ public void run(final boolean populate) { final MagmaCoreService mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); diff --git a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java b/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java index 41c44bbc..3ad19c06 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java +++ b/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java @@ -26,7 +26,7 @@ public class QueryResultList { private List queryResults; /** - * Construct a new QueryResultList from a list of QueryResults and variable names. + * Constructs a new QueryResultList from a list of QueryResults and variable names. * * @param varNames Variable names used in the results list. * @param queryResults Results of the query. diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 6e756402..5443d3c0 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -25,31 +25,30 @@ import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; /** - * Services exported by the MagmaCore module. + * Service for interacting with a {@link MagmaCoreDatabase}. */ public class MagmaCoreService { - // The service operates on a database. private final MagmaCoreDatabase database; /** - * Constructor that requires a {@link MagmaCoreDatabase}. + * Constructs a MagmaCoreService for a {@link MagmaCoreDatabase}. * - * @param database {@link MagmaCoreDatabase} + * @param database {@link MagmaCoreDatabase} to build the service for. */ MagmaCoreService(final MagmaCoreDatabase database) { this.database = database; } /** - * Find an object by its ENTITY_NAME. + * Find an object by its {@link HQDM#ENTITY_NAME}. * - * @param the return type. - * @param entityName the name {@link String} to search for. - * @return the {@link Thing}that was found. - * @throws RuntimeException if no or multiple results found. + * @param HQDM entity type. + * @param entityName Entity name value to search for. + * @return {@link Thing} that was found. + * @throws RuntimeException If no or multiple results were found. */ - public T findByEntityName(final String entityName) { + public T findByEntityName(final String entityName) { final List searchResult = database.findByPredicateIriAndStringValue(HQDM.ENTITY_NAME, entityName); if (searchResult.size() == 1) { @@ -62,38 +61,38 @@ public T findByEntityName(final String entityName) { } /** - * Create a new Thing. + * Create a new Thing in the database. * - * @param thing {@link Thing} + * @param thing {@link Thing} to create. */ public void create(final Thing thing) { database.create(thing); } /** - * Update an existing {@link Thing}. + * Update an existing {@link Thing} in the database. * - * @param thing {@link Thing} + * @param thing {@link Thing} to update. */ public void update(final Thing thing) { database.update(thing); } /** - * Get a {@link Thing} with the given {@link IRI}. + * Get a {@link Thing} by its IRI. * - * @param iri {@link IRI} - * @return {@link Thing} + * @param iri IRI of the thing. + * @return {@link Thing} to get. */ public Thing get(final IRI iri) { return database.get(iri); } /** - * Get a {@link Thing} with the given {@link IRI}. + * Get a {@link Thing} by its IRI {@link IRI} in a transactional database. * - * @param iri {@link IRI} - * @return {@link Thing} + * @param iri {@link IRI} of the {@link Thing}. + * @return {@link Thing} to get. */ public Thing getInTransaction(final IRI iri) { try { @@ -108,9 +107,9 @@ public Thing getInTransaction(final IRI iri) { } /** - * Run a function in a transaction. + * Run a {@link Function} in a transaction. * - * @param func the {@link Function} to run. + * @param func {@link Function} to run. */ public void runInTransaction(final Function func) { try { @@ -124,10 +123,10 @@ public void runInTransaction(final Function } /** - * Find many entities by name. + * Find entities by their names. * - * @param entityNames a {@link List} of {@link String} - * @return a {@link Map} of {@link String} to {@link Thing} + * @param entityNames {@link List} of entity names. + * @return {@link Map} of {@link String} to {@link Thing}. */ public Map findByEntityNameInTransaction(final List entityNames) { try { diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index 91e7af35..4e057963 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -24,39 +24,41 @@ public class MagmaCoreServiceFactory { /** - * Create a Jena database. + * Create a {@link MagmaCoreService} for a new {@link MagmaCoreJenaDatabase}. * - * @return {@link MagmaCoreService} + * @return {@link MagmaCoreService}. */ public static MagmaCoreService createWithJenaDatabase() { return new MagmaCoreService(new MagmaCoreJenaDatabase()); } /** - * Create a Jena database. + * Create a {@link MagmaCoreService} for a new {@link MagmaCoreJenaDatabase} with a remote Jena + * server. * - * @param location a database name String - * @return {@link MagmaCoreService} + * @param location URL of the database. + * @return {@link MagmaCoreService}. */ public static MagmaCoreService createWithJenaDatabase(final String location) { return new MagmaCoreService(new MagmaCoreJenaDatabase(location)); } /** - * Create a Jena database. + * Create a {@link MagmaCoreService} for an existing {@link MagmaCoreJenaDatabase}. * - * @param database a {@link MagmaCoreJenaDatabase} - * @return {@link MagmaCoreService} + * @param database A {@link MagmaCoreJenaDatabase}. + * @return {@link MagmaCoreService}. */ public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase database) { return new MagmaCoreService(database); } /** - * Attach to a remote SPARQL Endpoint. + * Create a {@link MagmaCoreService} for a new {@link MagmaCoreRemoteSparqlDatabase} with a SPARQL + * server connection. * - * @param serviceUrl the url {@link String} - * @return {@link MagmaCoreService} + * @param serviceUrl URL of the SPARQL server. + * @return {@link MagmaCoreService}. */ public static MagmaCoreService attachRemoteSparqlEndpoint(final String serviceUrl) { return new MagmaCoreService(new MagmaCoreRemoteSparqlDatabase(serviceUrl)); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/package-info.java b/src/main/java/uk/gov/gchq/magmacore/service/package-info.java new file mode 100644 index 00000000..b3db716d --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/service/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Services for interacting with Magma Core Databases. + */ +package uk.gov.gchq.magmacore.service; diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java index 9ddc827e..883c95fa 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -22,17 +22,17 @@ import uk.gov.gchq.magmacore.service.MagmaCoreService; /** - * Class representing an invertible set of deletes and creates. + * An invertible set of delete and create operations. */ public class DbChangeSet implements Function { private List deletes; private List creates; /** - * Constructor. + * Constructs a DbChangeSet with a list of delete and create operations to perform. * - * @param deletes a {@link List} of {@link DbDeleteOperation} - * @param creates a {@link List} of {@link DbCreateOperation} + * @param deletes A {@link List} of {@link DbDeleteOperation}. + * @param creates A {@link List} of {@link DbCreateOperation}. */ public DbChangeSet(final List deletes, final List creates) { this.deletes = deletes; @@ -40,7 +40,7 @@ public DbChangeSet(final List deletes, final List { @@ -37,11 +37,11 @@ public class DbCreateOperation implements Function { private IRI subject; @@ -30,11 +30,11 @@ public class DbDeleteOperation implements Function { private List transformations; /** - * Constructor. + * Constructs a DbTransformation with no operations. */ public DbTransformation() { this(new LinkedList<>()); } /** - * Constructor. + * Constructs a DbTransformation with a list of transformations. * - * @param transformations a {@link List} of {@link DbChangeSet} + * @param transformations A {@link List} of {@link DbChangeSet}. */ public DbTransformation(final List transformations) { this.transformations = transformations; } /** - * {@inheritDoc} + * Apply the transformation to a {@link MagmaCoreService}. */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { @@ -72,7 +72,7 @@ public DbTransformation invert() { /** * Add a DbChangeSet to this transformation. * - * @param changeSet {@link DbChangeSet} + * @param changeSet {@link DbChangeSet} to add. */ public void add(final DbChangeSet changeSet) { this.transformations.add(changeSet); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java new file mode 100644 index 00000000..b021870d --- /dev/null +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Transformations that can be applied to a {@link uk.gov.gchq.magmacore.service.MagmaCoreService}. + */ +package uk.gov.gchq.magmacore.service.transformation; diff --git a/src/main/java/uk/gov/gchq/magmacore/util/UID.java b/src/main/java/uk/gov/gchq/magmacore/util/UID.java index 50d61519..abe09bda 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/UID.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/UID.java @@ -17,7 +17,7 @@ import java.util.UUID; /** - * Wrapper for UUID to generate a random UUID {@link String}. + * Wrapper for UUID to generate a random UUID. */ public final class UID { @@ -27,7 +27,7 @@ private UID() { /** * Create a new random UUID to assign to an object. * - * @return A Random UUID {@link String}. + * @return A Randomly generated UUID. */ public static String uid() { return UUID.randomUUID().toString(); diff --git a/src/main/java/uk/gov/gchq/magmacore/util/package-info.java b/src/main/java/uk/gov/gchq/magmacore/util/package-info.java index 7a575772..15395bb2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/util/package-info.java +++ b/src/main/java/uk/gov/gchq/magmacore/util/package-info.java @@ -13,6 +13,6 @@ */ /** - * Collection of Magma Core utility classes. + * Utilities for Magma Core. */ package uk.gov.gchq.magmacore.util; From e08492751c8082123663e411a7914ce1959d8079 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 1 Jul 2022 19:57:14 +0000 Subject: [PATCH 80/91] Aggregated DemoUtils into single class. Deleted make-IRI methods in favour of constructors. --- ...ExampleDataObjects.java => DemoUtils.java} | 11 +++- .../magmacore/demo/ExampleAssociations.java | 21 ++++---- .../magmacore/demo/ExampleCommonUtils.java | 50 ------------------- .../magmacore/demo/ExampleIndividuals.java | 13 +++-- .../gov/gchq/magmacore/demo/ExampleRdl.java | 35 +++++++------ .../gov/gchq/magmacore/demo/ExampleSigns.java | 23 +++++---- .../gchq/magmacore/demo/ExampleSignsRdl.java | 10 ++-- .../magmacore/demo/FusekiServiceDemo.java | 4 +- .../gchq/magmacore/demo/JenaDatabaseDemo.java | 10 ++-- .../demo/RemoteSparqlDatabaseDemo.java | 4 +- .../gchq/magmacore/demo/ExampleDataTest.java | 3 +- 11 files changed, 83 insertions(+), 101 deletions(-) rename src/main/java/uk/gov/gchq/magmacore/demo/{ExampleDataObjects.java => DemoUtils.java} (85%) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java similarity index 85% rename from src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java rename to src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java index 8acd2c32..99c3d068 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java @@ -16,14 +16,21 @@ import java.util.List; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbTransformation; /** - * Example data objects. + * Utilities for Magma Core demos. */ -public class ExampleDataObjects { +public class DemoUtils { + + /** IriBase for Reference Data Library. */ + public static final IriBase REF_BASE = new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); + + /** IriBase for User data. */ + public static final IriBase USER_BASE = new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); /** * Populate a {@link MagmaCoreService} database. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index b60fa868..c3816998 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -14,6 +14,9 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -71,11 +74,11 @@ private static void occupyHouse(final MagmaCoreService mcService, final List creates = new ArrayList(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java deleted file mode 100644 index da722bbf..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleCommonUtils.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore.demo; - -import static uk.gov.gchq.magmacore.util.UID.uid; - -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; - -/** - * Utilities for creating example data for the demos. - */ -public class ExampleCommonUtils { - - /** IriBase for User data. */ - public static final IriBase USER_BASE = new IriBase("user", "http://www.semanticweb.org/magma-core/user#"); - - /** - * Create a new IRI in the USER_BASE namespace. - * - * @return {@link IRI}. - */ - public static IRI mkUserBaseIri() { - return new IRI(USER_BASE, uid()); - } - - /** IriBase for Reference Data Library. */ - public static final IriBase REF_BASE = new IriBase("rdl", "http://www.semanticweb.org/magma-core/rdl#"); - - /** - * Create a new IRI in the REF_BASE namespace. - * - * @return {@link IRI}. - */ - public static IRI mkRefBaseIri() { - return new IRI(REF_BASE, uid()); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index dae27cc9..e8f7325d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -14,6 +14,9 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + import java.util.List; import java.util.Map; @@ -53,11 +56,11 @@ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcServi final Role domesticPropertyRole = (Role) entities.get("ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE"); // Create IRIs for the objects we want to create. - final IRI possibleWorld = ExampleCommonUtils.mkUserBaseIri(); - final IRI startEvent = ExampleCommonUtils.mkUserBaseIri(); - final IRI endEvent = ExampleCommonUtils.mkUserBaseIri(); - final IRI person = ExampleCommonUtils.mkUserBaseIri(); - final IRI house = ExampleCommonUtils.mkUserBaseIri(); + final IRI possibleWorld = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); + final IRI person = new IRI(USER_BASE, uid()); + final IRI house = new IRI(USER_BASE, uid()); // Create DbCreateOperations to create the objects and their properties. final List creates = List.of( diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java index 0c0a91f0..3d4867d5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java @@ -14,6 +14,9 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.REF_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; @@ -35,21 +38,23 @@ public class ExampleRdl { public static DbChangeSet createRefDataObjects() { // Create new unique IRIs for all the objects we need to create. - final IRI viewable = ExampleCommonUtils.mkRefBaseIri(); - final IRI viewableObject = ExampleCommonUtils.mkRefBaseIri(); - final IRI viewableAssociation = ExampleCommonUtils.mkRefBaseIri(); - final IRI kindOfBiologicalSystemHumanComponent = ExampleCommonUtils.mkRefBaseIri(); - final IRI kindOfPerson = ExampleCommonUtils.mkRefBaseIri(); - final IRI classOfStateOfPerson = ExampleCommonUtils.mkRefBaseIri(); - final IRI kindOfFunctionalSystemBuilding = ExampleCommonUtils.mkRefBaseIri(); - final IRI kindOfFunctionalSystemDomesticPropertyComponent = ExampleCommonUtils.mkRefBaseIri(); - final IRI kindOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); - final IRI classOfStateOfFunctionalSystemDomesticProperty = ExampleCommonUtils.mkRefBaseIri(); - final IRI naturalMemberOfSocietyRole = ExampleCommonUtils.mkRefBaseIri(); - final IRI domesticPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final IRI domesticOccupantInPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final IRI occupierOfPropertyRole = ExampleCommonUtils.mkRefBaseIri(); - final IRI occupantInPropertyKindOfAssociation = ExampleCommonUtils.mkRefBaseIri(); + final IRI viewable = new IRI(REF_BASE, uid()); + final IRI viewableObject = new IRI(REF_BASE, uid()); + final IRI viewableAssociation = new IRI(REF_BASE, uid()); + final IRI kindOfBiologicalSystemHumanComponent = new IRI(REF_BASE, uid()); + final IRI kindOfPerson = new IRI(REF_BASE, uid()); + final IRI classOfStateOfPerson = new IRI(REF_BASE, uid()); + final IRI kindOfFunctionalSystemBuilding = new IRI(REF_BASE, uid()); + final IRI kindOfFunctionalSystemDomesticPropertyComponent = new IRI(REF_BASE, + "kindOfFunctionalSystemDomesticPropertyComponent"); + final IRI kindOfFunctionalSystemDomesticProperty = new IRI(REF_BASE, uid()); + final IRI classOfStateOfFunctionalSystemDomesticProperty = new IRI(REF_BASE, + "classOfStateOfFunctionalSystemDomesticProperty"); + final IRI naturalMemberOfSocietyRole = new IRI(REF_BASE, uid()); + final IRI domesticPropertyRole = new IRI(REF_BASE, uid()); + final IRI domesticOccupantInPropertyRole = new IRI(REF_BASE, uid()); + final IRI occupierOfPropertyRole = new IRI(REF_BASE, "occupierOfPropertyRole "); + final IRI occupantInPropertyKindOfAssociation = new IRI(REF_BASE, uid()); // Add DbCreateOperations to create the objects and their properties. final List creates = List.of( diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index 68611bae..4c368528 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -14,6 +14,9 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + import java.util.List; import java.util.Map; @@ -79,16 +82,16 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); // Create IRIs for the new entities. - final IRI possibleWorld = ExampleCommonUtils.mkUserBaseIri(); - final IRI person = ExampleCommonUtils.mkUserBaseIri(); - final IRI wikipediaSign = ExampleCommonUtils.mkUserBaseIri(); - final IRI britannica = ExampleCommonUtils.mkUserBaseIri(); - final IRI biography = ExampleCommonUtils.mkUserBaseIri(); - final IRI stanford = ExampleCommonUtils.mkUserBaseIri(); - final IRI nationalGeographic = ExampleCommonUtils.mkUserBaseIri(); - final IRI representationBySign = ExampleCommonUtils.mkUserBaseIri(); - final IRI startEvent = ExampleCommonUtils.mkUserBaseIri(); - final IRI endEvent = ExampleCommonUtils.mkUserBaseIri(); + final IRI possibleWorld = new IRI(USER_BASE, uid()); + final IRI person = new IRI(USER_BASE, uid()); + final IRI wikipediaSign = new IRI(USER_BASE, uid()); + final IRI britannica = new IRI(USER_BASE, uid()); + final IRI biography = new IRI(USER_BASE, uid()); + final IRI stanford = new IRI(USER_BASE, uid()); + final IRI nationalGeographic = new IRI(USER_BASE, uid()); + final IRI representationBySign = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); // Create the set of DbCreateOperations. final List creates = List.of( diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java index 5870a129..e23eab5a 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java @@ -14,6 +14,10 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.REF_BASE; +import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.HQDM; @@ -35,9 +39,9 @@ public class ExampleSignsRdl { public static DbChangeSet createRefDataObjects() { // Create new unique IRIs for all the objects we need to create. - final IRI urlPattern = ExampleCommonUtils.mkRefBaseIri(); - final IRI description = ExampleCommonUtils.mkRefBaseIri(); - final IRI englishSpeakers = ExampleCommonUtils.mkUserBaseIri(); + final IRI urlPattern = new IRI(REF_BASE, uid()); + final IRI description = new IRI(REF_BASE, uid()); + final IRI englishSpeakers = new IRI(USER_BASE, uid()); // Add DbCreateOperations to create the objects and their properties. final List creates = List.of( diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index 82bc2a65..a7430b71 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -14,6 +14,8 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; + import org.apache.jena.fuseki.main.FusekiServer; import org.apache.jena.fuseki.system.FusekiLogging; @@ -53,7 +55,7 @@ public void run(final boolean populate) { tdb.begin(); if (tdb.getDataset().isEmpty()) { // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. - ExampleDataObjects.populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); + populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); tdb.commit(); } else { tdb.abort(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java index ee37dc90..6bdd7a21 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java @@ -14,6 +14,8 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; + import java.util.List; import java.util.Map; @@ -23,11 +25,11 @@ import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** - * Example use-case scenario for the {@link uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase}. + * Example use-case scenario for the {@link MagmaCoreJenaDatabase}. * *

- * This example demo creates an in-memory {@link MagmaCoreJenaDatabase} populated with the - * {@link ExampleDataObjects} as RDF triples. + * This example demo creates an in-memory {@link MagmaCoreJenaDatabase} populated with the example + * data libraries as RDF triples. *

*

* {@code PersonB1_Bob} can be queried for using the `findByEntityName` method. method. The @@ -45,7 +47,7 @@ public void run() { final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Add example data objects to dataset. - ExampleDataObjects.populateExampleData(mcService); + populateExampleData(mcService); // Query database to check its populated. final Map queryResults = mcService.findByEntityNameInTransaction(List.of("PersonB1_Bob")); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java index 7766c425..65dbb7d4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java @@ -14,6 +14,8 @@ package uk.gov.gchq.magmacore.demo; +import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; + import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; @@ -44,7 +46,7 @@ public void run(final boolean populate) { final MagmaCoreService mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); if (populate) { - ExampleDataObjects.populateExampleData(mcService); + populateExampleData(mcService); } } } diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java index f94ea922..27407ef3 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java @@ -15,6 +15,7 @@ package uk.gov.gchq.magmacore.demo; import static org.junit.Assert.assertNotNull; +import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; import org.junit.Test; @@ -33,7 +34,7 @@ public class ExampleDataTest { @Test public void testWithJenaDatabase() { final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); - final DbTransformation transformation = ExampleDataObjects.populateExampleData(service); + final DbTransformation transformation = populateExampleData(service); assertNotNull(transformation); } From 84241dce009cda4e351ec5e85066e36bb3c86857 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Mon, 4 Jul 2022 10:59:39 +0000 Subject: [PATCH 81/91] Refactored unit tests. --- .../service/MagmaCoreServiceTest.java | 35 +++-- .../transformation/DbChangeSetTest.java | 42 +++--- .../transformation/DbOperationTest.java | 130 +++++++++--------- .../transformation/DbTransformationTest.java | 55 ++++---- 4 files changed, 127 insertions(+), 135 deletions(-) diff --git a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java index 3e727a80..211212a5 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -22,6 +22,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; @@ -30,36 +31,34 @@ */ public class MagmaCoreServiceTest { - // Dummy IRI for testing. - private static final String TEST_IRI = "http://example.com/test#test"; + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test"); /** * Test that triples can be deleted. */ @Test public void test() { - final IRI iri = new IRI(TEST_IRI); + final MagmaCoreJenaDatabase database = new MagmaCoreJenaDatabase(); - final MagmaCoreJenaDatabase db = new MagmaCoreJenaDatabase(); + final IRI individualIri = new IRI(TEST_BASE, "individual"); + final Individual individual = SpatioTemporalExtentServices.createIndividual(individualIri.getIri()); - final Individual thing = SpatioTemporalExtentServices.createIndividual(TEST_IRI); + individual.addValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual"); - thing.addValue(HQDM.MEMBER_OF.getIri(), "class1"); + database.begin(); + database.create(individual); + database.commit(); - db.begin(); - db.create(thing); - db.commit(); + individual.removeValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual"); - thing.removeValue(HQDM.MEMBER_OF.getIri(), "class1"); + database.begin(); + database.update(individual); + database.commit(); - db.begin(); - db.update(thing); - db.commit(); + database.begin(); + final Thing individualFromDb = database.get(individualIri); + database.commit(); - db.begin(); - final Thing thingFromDb = db.get(iri); - db.commit(); - - assertNull(thingFromDb); + assertNull(individualFromDb); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index 7172636b..def3066a 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -25,6 +25,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; @@ -34,41 +35,36 @@ */ public class DbChangeSetTest { - // Dummy IRI for testing. - private static final String TEST_IRI = "http://example.com/test#test"; + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test"); /** * Test that {@link DbChangeSet} can be applied, inverted, and undone. */ @Test public void testApplyAndInvert() { - - final IRI iri = new IRI(TEST_IRI); + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Create operations to add an object with dummy values. - final DbChangeSet changes = new DbChangeSet(List.of(), - List.of(new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); - - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final IRI individualIri = new IRI(TEST_BASE, "individual"); + final DbChangeSet createIndividual = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); - // Apply the operations. - mcService.runInTransaction(changes); + // Apply the operations to the dataset. + mcService.runInTransaction(createIndividual); - // Find the thing we just created and assert values are present. - final Thing thing = mcService.getInTransaction(iri); + // Find the individual and assert values are present. + final Thing individual = mcService.getInTransaction(individualIri); - assertNotNull(thing); - assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); - assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + assertNotNull(individual); + assertTrue(individual.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); + assertTrue(individual.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual")); + assertTrue(individual.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "possible world")); - // Invert the operations, apply them in reverse order and assert they are no longer present. - mcService.runInTransaction(DbChangeSet.invert(changes)); + // Invert the operations and apply them in reverse order. + mcService.runInTransaction(DbChangeSet.invert(createIndividual)); - final Thing thingFromDb = mcService.getInTransaction(iri); - assertNull(thingFromDb); + assertNull(mcService.getInTransaction(individualIri)); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java index fb3fa6ff..9228c812 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -25,6 +25,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.exception.DbTransformationException; import uk.gov.gchq.magmacore.service.MagmaCoreService; @@ -35,8 +36,7 @@ */ public class DbOperationTest { - // Dummy IRI for testing. - private static final String TEST_IRI = "http://example.com/test#test"; + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test"); /** * Test that DbCreateOperations can be applied to a database and can also be inverted and used to @@ -44,30 +44,31 @@ public class DbOperationTest { */ @Test public void testCreateAndDelete() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); // Create an operation to add an object with dummy values. - final IRI iri = new IRI(TEST_IRI); - final DbCreateOperation op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final IRI individualIri = new IRI(TEST_BASE, "individual"); - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, RDFS.RDF_TYPE, + HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation createIndividualMemberOf = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); - // Apply the operation. - mcService.runInTransaction(op1); - mcService.runInTransaction(op2); + // Apply the operations. + mcService.runInTransaction(createIndividual); + mcService.runInTransaction(createIndividualMemberOf); - // Find the thing we just created and assert it's presence. - final Thing thing = mcService.getInTransaction(iri); + // Find the individual and assert it's presence. + final Thing individual = mcService.getInTransaction(individualIri); - assertNotNull(thing); - assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); + assertNotNull(individual); + assertTrue(individual.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); // Invert the operation and assert that it is no longer present. - mcService.runInTransaction(DbCreateOperation.invert(op2)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividualMemberOf)); - final Thing thingFromDb = mcService.getInTransaction(iri); - assertFalse(thingFromDb.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); + final Thing individualFromDb = mcService.getInTransaction(individualIri); + assertFalse(individualFromDb.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual")); } /** @@ -76,37 +77,38 @@ public void testCreateAndDelete() { */ @Test public void testMultipleCreateAndDelete() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); - final IRI iri = new IRI(TEST_IRI); - - // Create operations to add an object with dummy values. - final DbCreateOperation op1 = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); - final DbCreateOperation op3 = new DbCreateOperation(iri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"); + final IRI individualIri = new IRI(TEST_BASE, "individual"); - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + // Create operations to create an object. + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, RDFS.RDF_TYPE, + HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation createIndividualMemberOf = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + final DbCreateOperation createIndividualPartOfPossibleWorld = new DbCreateOperation(individualIri, + HQDM.PART_OF_POSSIBLE_WORLD, "possible world"); - // Apply the operations. - mcService.runInTransaction(op1); - mcService.runInTransaction(op2); - mcService.runInTransaction(op3); + // Apply the operations to the dataset. + mcService.runInTransaction(createIndividual); + mcService.runInTransaction(createIndividualMemberOf); + mcService.runInTransaction(createIndividualPartOfPossibleWorld); // Find the thing we just created and assert values are present. - final Thing thing = mcService.getInTransaction(iri); + final Thing individual = mcService.getInTransaction(individualIri); - assertNotNull(thing); - assertTrue(thing.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); - assertTrue(thing.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertTrue(thing.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + assertNotNull(individual); + assertTrue(individual.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); + assertTrue(individual.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual")); + assertTrue(individual.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "possible world")); // Invert two of the operations, apply them in reverse order and assert they are no longer present. - mcService.runInTransaction(DbCreateOperation.invert(op3)); - mcService.runInTransaction(DbCreateOperation.invert(op2)); - mcService.runInTransaction(DbCreateOperation.invert(op1)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividualPartOfPossibleWorld)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividualMemberOf)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividual)); - final Thing thingFromDb = mcService.getInTransaction(iri); - assertNull(thingFromDb); + final Thing individualFromDb = mcService.getInTransaction(individualIri); + assertNull(individualFromDb); } /** @@ -114,18 +116,17 @@ public void testMultipleCreateAndDelete() { */ @Test(expected = DbTransformationException.class) public void testCreateWhenAlreadyPresent() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); - final IRI iri = new IRI(TEST_IRI); + final IRI individualIri = new IRI(TEST_BASE, "individual"); // Create an operation to add an object with dummy values. - final DbCreateOperation op = new DbCreateOperation(iri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()); - - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, RDFS.RDF_TYPE, + HQDM.INDIVIDUAL.getIri()); // Apply the operation twice, the second should throw an exception. - mcService.runInTransaction(op); - mcService.runInTransaction(op); + mcService.runInTransaction(createIndividual); + mcService.runInTransaction(createIndividual); } /** @@ -133,17 +134,16 @@ public void testCreateWhenAlreadyPresent() { */ @Test(expected = DbTransformationException.class) public void testDeleteWhenNotPresent() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); - final IRI iri = new IRI(TEST_IRI); + final IRI individualIri = new IRI(TEST_BASE, "individual"); // Create an operation to add an object with dummy values. - final DbDeleteOperation op = new DbDeleteOperation(iri, HQDM.INDIVIDUAL, "value"); - - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbDeleteOperation deleteIndividual = new DbDeleteOperation(individualIri, HQDM.INDIVIDUAL, + "value not present"); // Apply the operation, it should throw an exception. - mcService.runInTransaction(op); + mcService.runInTransaction(deleteIndividual); } /** @@ -151,14 +151,15 @@ public void testDeleteWhenNotPresent() { */ @Test public void testDbCreateEquals() { + final IRI individualIri = new IRI(TEST_BASE, "individual"); - final IRI iri = new IRI(TEST_IRI); - - final DbCreateOperation op1 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); - final DbCreateOperation op2 = new DbCreateOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + final DbCreateOperation deleteIndividual = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); - assertTrue(op1.equals(op2)); - assertEquals(op1.hashCode(), op2.hashCode()); + assertTrue(createIndividual.equals(deleteIndividual)); + assertEquals(createIndividual.hashCode(), deleteIndividual.hashCode()); } /** @@ -166,13 +167,14 @@ public void testDbCreateEquals() { */ @Test public void testDbDeleteEquals() { + final IRI individualIri = new IRI(TEST_BASE, "individual"); - final IRI iri = new IRI(TEST_IRI); - - final DbDeleteOperation op1 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); - final DbDeleteOperation op2 = new DbDeleteOperation(iri, HQDM.MEMBER_OF, "class1"); + final DbDeleteOperation deleteIndividual = new DbDeleteOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + final DbDeleteOperation deleteAbsentIndividual = new DbDeleteOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); - assertTrue(op1.equals(op2)); - assertEquals(op1.hashCode(), op2.hashCode()); + assertTrue(deleteIndividual.equals(deleteAbsentIndividual)); + assertEquals(deleteIndividual.hashCode(), deleteAbsentIndividual.hashCode()); } } diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index 70597529..d0cd0e23 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -25,6 +25,7 @@ import uk.gov.gchq.hqdm.model.Thing; import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; @@ -34,59 +35,53 @@ */ public class DbTransformationTest { - // Dummy IRI for testing. - private static final String TEST_IRI = "http://example.com/test#test"; + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test"); /** * Test that multiple DbChangeSets can be applied as a DbTransformation, inverted, and undone. */ @Test public void testApplyAndInvert() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); - final IRI individualIri = new IRI(TEST_IRI + "1"); - final IRI personIri = new IRI(TEST_IRI + "2"); + final IRI individualIri = new IRI(TEST_BASE, "individual"); + final IRI personIri = new IRI(TEST_BASE, "person"); // Create operations to add an object with dummy values. - final DbChangeSet changes1 = new DbChangeSet(List.of(), + final DbChangeSet createIndividual = new DbChangeSet(List.of(), List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "class1"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "a world"))); + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); - final DbChangeSet changes2 = new DbChangeSet(List.of(), + final DbChangeSet createPerson = new DbChangeSet(List.of(), List.of(new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(personIri, HQDM.MEMBER_OF, "class2"), - new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "another world"))); - - final DbTransformation transformation = new DbTransformation(List.of(changes1, changes2)); + new DbCreateOperation(personIri, HQDM.MEMBER_OF, "classOfPerson"), + new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); - // Create a database to be updated. - final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbTransformation transformation = new DbTransformation(List.of(createIndividual, createPerson)); // Apply the operations. mcService.runInTransaction(transformation); - // Find the thing we just created and assert values are present. - final Thing thing1 = mcService.getInTransaction(individualIri); + // Find the individual we just created and assert values are present. + final Thing individual = mcService.getInTransaction(individualIri); - assertNotNull(thing1); - assertTrue(thing1.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); - assertTrue(thing1.hasThisValue(HQDM.MEMBER_OF.getIri(), "class1")); - assertTrue(thing1.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "a world")); + assertNotNull(individual); + assertTrue(individual.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.INDIVIDUAL.getIri())); + assertTrue(individual.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual")); + assertTrue(individual.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "possible world")); - final Thing thing2 = mcService.getInTransaction(personIri); + final Thing person = mcService.getInTransaction(personIri); - assertNotNull(thing2); - assertTrue(thing2.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri())); - assertTrue(thing2.hasThisValue(HQDM.MEMBER_OF.getIri(), "class2")); - assertTrue(thing2.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "another world")); + assertNotNull(person); + assertTrue(person.hasThisValue(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri())); + assertTrue(person.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfPerson")); + assertTrue(person.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD.getIri(), "possible world")); // Invert the operations, apply them in reverse order and assert they are no longer present. mcService.runInTransaction(transformation.invert()); - final Thing thing1FromDb = mcService.getInTransaction(individualIri); - assertNull(thing1FromDb); - - final Thing thing2FromDb = mcService.getInTransaction(personIri); - assertNull(thing2FromDb); + assertNull(mcService.getInTransaction(individualIri)); + assertNull(mcService.getInTransaction(personIri)); } } From 365eaadb14518a234a0d8c3c6eb6b72ad825d68e Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Tue, 5 Jul 2022 13:27:52 +0000 Subject: [PATCH 82/91] Updated Java formatter: disable join_wrapped_lines to allow method chaining on new lines. --- java-formatter.xml | 2 +- .../MagmaCoreRemoteSparqlDatabase.java | 9 ++++++-- .../magmacore/demo/ExampleAssociations.java | 10 +++++---- .../magmacore/demo/ExampleIndividuals.java | 6 +++-- .../gov/gchq/magmacore/demo/ExampleSigns.java | 6 +++-- .../magmacore/demo/FusekiServiceDemo.java | 6 ++++- .../service/transformation/DbChangeSet.java | 22 ++++++++++++++----- .../transformation/DbTransformation.java | 8 +++++-- .../transformation/DbChangeSetTest.java | 8 +++---- .../transformation/DbTransformationTest.java | 18 +++++++-------- 10 files changed, 62 insertions(+), 33 deletions(-) diff --git a/java-formatter.xml b/java-formatter.xml index a90272fb..b87bf946 100644 --- a/java-formatter.xml +++ b/java-formatter.xml @@ -199,7 +199,7 @@ - + diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 5aea9013..3673263c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -60,8 +60,13 @@ public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { * @param serviceUrl The URL of the SPARQL update endpoint. */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { - connection = RDFConnectionRemote.newBuilder().destination(serviceUrl).queryEndpoint("query") - .updateEndpoint("update").triplesFormat(RDFFormat.RDFJSON).build(); + connection = RDFConnectionRemote + .newBuilder() + .destination(serviceUrl) + .queryEndpoint("query") + .updateEndpoint("update") + .triplesFormat(RDFFormat.RDFJSON) + .build(); } /** diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java index c3816998..20885fe4 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java @@ -58,10 +58,12 @@ private static void occupyHouse(final MagmaCoreService mcService, final List entities = mcService.findByEntityNameInTransaction( - List.of("CLASS_OF_STATE_OF_PERSON", "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", - "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "CLASS_OF_STATE_OF_PERSON", + "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", + "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); // Find the required classes, kinds, and roles. final ClassOfStateOfPerson classOfStateOfPerson = (ClassOfStateOfPerson) entities diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java index e8f7325d..b5ce34cc 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java @@ -44,8 +44,10 @@ public class ExampleIndividuals { */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of("KIND_OF_PERSON", - "NATURAL_MEMBER_OF_SOCIETY_ROLE", "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "KIND_OF_PERSON", + "NATURAL_MEMBER_OF_SOCIETY_ROLE", + "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE")); // Find the required classes, kinds, and roles. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java index 4c368528..8f1fb1c6 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java @@ -71,8 +71,10 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ * @return {@link DbChangeSet}. */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final Map entities = mcService - .findByEntityNameInTransaction(List.of("URL Pattern", "Description By URL", "English Speakers")); + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "URL Pattern", + "Description By URL", + "English Speakers")); // Find the required classes, kinds, and roles. final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java index a7430b71..dec10e8b 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java @@ -64,6 +64,10 @@ public void run(final boolean populate) { // Build and start Fuseki server. FusekiLogging.setLogging(); - FusekiServer.create().port(3330).add("/tdb", tdb.getDataset(), true).start(); + FusekiServer + .create() + .port(3330) + .add("/tdb", tdb.getDataset(), true) + .start(); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java index 883c95fa..b669bbc5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -44,12 +44,16 @@ public DbChangeSet(final List deletes, final List deleteFunction = deletes.stream() - .map(d -> (Function) d).reduce(Function::andThen) + final Function deleteFunction = deletes + .stream() + .map(d -> (Function) d) + .reduce(Function::andThen) .orElse(Function.identity()); - final Function createFunction = creates.stream() - .map(c -> (Function) c).reduce(Function::andThen) + final Function createFunction = creates + .stream() + .map(c -> (Function) c) + .reduce(Function::andThen) .orElse(Function.identity()); mcService.runInTransaction(deleteFunction.andThen(createFunction)); @@ -63,10 +67,16 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * @return The inverted {@link DbChangeSet}. */ public static DbChangeSet invert(final DbChangeSet changeSet) { - final List newDeletes = changeSet.creates.stream().map(DbCreateOperation::invert) + final List newDeletes = changeSet.creates + .stream() + .map(DbCreateOperation::invert) .collect(Collectors.toList()); - final List newCreates = changeSet.deletes.stream().map(DbDeleteOperation::invert) + + final List newCreates = changeSet.deletes + .stream() + .map(DbDeleteOperation::invert) .collect(Collectors.toList()); + Collections.reverse(newDeletes); Collections.reverse(newCreates); return new DbChangeSet(newDeletes, newCreates); diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java index 6d18de65..06e7c7a3 100644 --- a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java +++ b/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java @@ -49,7 +49,8 @@ public DbTransformation(final List transformations) { */ @Override public MagmaCoreService apply(final MagmaCoreService mcService) { - final Function transformation = transformations.stream() + final Function transformation = transformations + .stream() .map(t -> (Function) t).reduce(Function::andThen) .orElse(Function.identity()); @@ -62,7 +63,10 @@ public MagmaCoreService apply(final MagmaCoreService mcService) { * @return The inverted {@link DbTransformation}. */ public DbTransformation invert() { - final List list = transformations.stream().map(DbChangeSet::invert).collect(Collectors.toList()); + final List list = transformations + .stream() + .map(DbChangeSet::invert) + .collect(Collectors.toList()); Collections.reverse(list); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index def3066a..3aef693d 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -46,10 +46,10 @@ public void testApplyAndInvert() { // Create operations to add an object with dummy values. final IRI individualIri = new IRI(TEST_BASE, "individual"); - final DbChangeSet createIndividual = new DbChangeSet(List.of(), - List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + final DbChangeSet createIndividual = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); // Apply the operations to the dataset. mcService.runInTransaction(createIndividual); diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index d0cd0e23..37e14222 100644 --- a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java +++ b/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -48,15 +48,15 @@ public void testApplyAndInvert() { final IRI personIri = new IRI(TEST_BASE, "person"); // Create operations to add an object with dummy values. - final DbChangeSet createIndividual = new DbChangeSet(List.of(), - List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); - - final DbChangeSet createPerson = new DbChangeSet(List.of(), - List.of(new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(personIri, HQDM.MEMBER_OF, "classOfPerson"), - new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + final DbChangeSet createIndividual = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + + final DbChangeSet createPerson = new DbChangeSet(List.of(), List.of( + new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(personIri, HQDM.MEMBER_OF, "classOfPerson"), + new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); final DbTransformation transformation = new DbTransformation(List.of(createIndividual, createPerson)); From 929fdc19f02d84fd5d2a28a7fd5e11d430791e22 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Tue, 5 Jul 2022 13:11:19 +0000 Subject: [PATCH 83/91] Modularised Magma Core. --- README.md | 13 -- core/pom.xml | 44 +++++ {src => core/src}/main/java/module-info.java | 14 +- .../magmacore/database/MagmaCoreDatabase.java | 0 .../database/MagmaCoreJenaDatabase.java | 4 +- .../MagmaCoreRemoteSparqlDatabase.java | 4 +- .../gchq/magmacore/database/package-info.java | 0 .../database}/query/QueryResult.java | 2 +- .../database}/query/QueryResultList.java | 2 +- .../database}/query/package-info.java | 2 +- .../exception/DbTransformationException.java | 0 .../exception/MagmaCoreException.java | 0 .../magmacore/exception/package-info.java | 0 .../magmacore/service/MagmaCoreService.java | 0 .../service/MagmaCoreServiceFactory.java | 0 .../gchq/magmacore/service/package-info.java | 0 .../service/transformation/DbChangeSet.java | 0 .../transformation/DbCreateOperation.java | 0 .../transformation/DbDeleteOperation.java | 0 .../transformation/DbTransformation.java | 0 .../service/transformation/package-info.java | 0 .../java/uk/gov/gchq/magmacore/util/UID.java | 0 .../gov/gchq/magmacore/util/package-info.java | 0 .../service/MagmaCoreServiceTest.java | 0 .../transformation/DbChangeSetTest.java | 0 .../transformation/DbOperationTest.java | 0 .../transformation/DbTransformationTest.java | 0 examples/pom.xml | 43 +++++ examples/src/main/java/module-info.java | 25 +++ .../examples/data}/ExampleAssociations.java | 7 +- .../examples/data}/ExampleIndividuals.java | 6 +- .../magmacore/examples/data}/ExampleRdl.java | 4 +- .../examples/data}/package-info.java | 5 +- .../examples/service}/JenaDatabaseDemo.java | 16 +- .../McAssistMultInheritFromDataApp.java | 2 +- .../service}/RemoteSparqlDatabaseDemo.java | 31 +-- .../examples/service}/package-info.java | 5 +- .../examples/signs/ExampleSigns.java | 176 ++++++++++++++++++ .../examples/signs}/ExampleSignsRdl.java | 6 +- .../magmacore/examples/util}/DemoUtils.java | 5 +- .../magmacore/examples/util/package-info.java | 18 ++ .../examples/data}/ExampleDataTest.java | 4 +- .../examples/signs}/ExampleSignsTest.java | 2 +- pom.xml | 92 ++++----- .../java/uk/gov/gchq/magmacore/MagmaCore.java | 80 -------- .../gov/gchq/magmacore/demo/ExampleSigns.java | 165 ---------------- .../magmacore/demo/FusekiServiceDemo.java | 73 -------- 47 files changed, 407 insertions(+), 443 deletions(-) create mode 100644 core/pom.xml rename {src => core/src}/main/java/module-info.java (80%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java (98%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java (98%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/database/package-info.java (100%) rename {src/main/java/uk/gov/gchq/magmacore => core/src/main/java/uk/gov/gchq/magmacore/database}/query/QueryResult.java (98%) rename {src/main/java/uk/gov/gchq/magmacore => core/src/main/java/uk/gov/gchq/magmacore/database}/query/QueryResultList.java (98%) rename {src/main/java/uk/gov/gchq/magmacore => core/src/main/java/uk/gov/gchq/magmacore/database}/query/package-info.java (93%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/exception/package-info.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/package-info.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/util/UID.java (100%) rename {src => core/src}/main/java/uk/gov/gchq/magmacore/util/package-info.java (100%) rename {src => core/src}/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java (100%) rename {src => core/src}/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java (100%) rename {src => core/src}/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java (100%) rename {src => core/src}/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java (100%) create mode 100644 examples/pom.xml create mode 100644 examples/src/main/java/module-info.java rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/data}/ExampleAssociations.java (97%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/data}/ExampleIndividuals.java (97%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/data}/ExampleRdl.java (98%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/data}/package-info.java (80%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/service}/JenaDatabaseDemo.java (79%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/service}/McAssistMultInheritFromDataApp.java (97%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/service}/RemoteSparqlDatabaseDemo.java (55%) rename {src/main/java/uk/gov/gchq/magmacore => examples/src/main/java/uk/gov/gchq/magmacore/examples/service}/package-info.java (77%) create mode 100644 examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/signs}/ExampleSignsRdl.java (92%) rename {src/main/java/uk/gov/gchq/magmacore/demo => examples/src/main/java/uk/gov/gchq/magmacore/examples/util}/DemoUtils.java (92%) create mode 100644 examples/src/main/java/uk/gov/gchq/magmacore/examples/util/package-info.java rename {src/test/java/uk/gov/gchq/magmacore/demo => examples/src/test/java/uk/gov/gchq/magmacore/examples/data}/ExampleDataTest.java (91%) rename {src/test/java/uk/gov/gchq/magmacore/demo => examples/src/test/java/uk/gov/gchq/magmacore/examples/signs}/ExampleSignsTest.java (96%) delete mode 100644 src/main/java/uk/gov/gchq/magmacore/MagmaCore.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java delete mode 100644 src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java diff --git a/README.md b/README.md index c64ccba0..3ef73afb 100644 --- a/README.md +++ b/README.md @@ -19,19 +19,6 @@ An introduction to Magma Core and the [HQDM Java object library](https://github. - [Java 15](https://openjdk.java.net/projects/jdk/15/) - Core language - [Maven](https://maven.apache.org/) - Dependency management -## Setup - -- To run Magma Core, run `mvn compile exec:java -Dexec.mainClass="uk.gov.gchq.magmacore.MagmaCore"`. This will execute the fuseki example from the `demo` package. It will populate the database with example data if it is empty. The Fuseki server is accessible at `localhost:3330/tdb` - - The dataset can then be queried via a web browser by going to `http://localhost:3330/tdb/sparql?query=SELECT ?s ?p ?o WHERE {?s ?p ?o.}` - - This can also be done via curl on the command line using: `curl -X POST -d "query=select ?s ?p ?o where { ?s ?p ?o . }" localhost:3330/tdb/query` -- You can also run the examples using `mvn compile exec:java -Dexec.mainClass="uk.gov.gchq.magmacore.MagmaCore" -Dexec.args=XXX` where XXX is one of: - - `fuseki` - same as no arguments except this does not populate the database with example data. - - `fuseki-populate` - same as no arguments. - - `remote` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. - - `remote-populate` - connects to a local SPARQL endpoint on `http://localhost:3330/tdb`, i.e. the `fuseki` server if executed in a separate shell session. It will populate the database with example data. - - `jena` - executes the Apache Jena database demo. -- Alternatively, if you are using an IDE, you should be able to run the main method in MagmaCore.java from the editor. - ## Contributing We welcome contributions to the project. Detailed information on our ways of working can be found [here](CONTRIBUTING.md). diff --git a/core/pom.xml b/core/pom.xml new file mode 100644 index 00000000..3527dc3a --- /dev/null +++ b/core/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 1.1-SNAPSHOT + + + uk.gov.gchq.magma-core + core + 1.0-SNAPSHOT + + core + + + UTF-8 + 17 + + + + + uk.gov.gchq.hqdm + hqdm-core + + + uk.gov.gchq.hqdm + hqdm-rdf + + + junit + junit + + + org.apache.jena + apache-jena-libs + pom + + + org.slf4j + slf4j-jdk14 + + + diff --git a/src/main/java/module-info.java b/core/src/main/java/module-info.java similarity index 80% rename from src/main/java/module-info.java rename to core/src/main/java/module-info.java index ae1de8ab..20477c3f 100644 --- a/src/main/java/module-info.java +++ b/core/src/main/java/module-info.java @@ -13,23 +13,23 @@ */ /** - * Module dependencies. + * Magma Core is a lightweight set of Java classes to enable HQDM data objects to be created and + * used as RDF Linked Data through Apache Jena. */ module uk.gov.gchq.magmacore { - requires uk.gov.gchq.hqdm.core; - requires transitive uk.gov.gchq.hqdm.rdf; requires org.apache.jena.arq; + requires org.apache.jena.base; requires org.apache.jena.core; - requires org.apache.jena.fuseki.main; - requires org.apache.jena.fuseki.core; + requires org.apache.jena.dboe.base; requires org.apache.jena.rdfconnection; requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; - requires org.apache.logging.log4j; - requires org.apache.commons.lang3; + requires uk.gov.gchq.hqdm.core; + requires transitive uk.gov.gchq.hqdm.rdf; exports uk.gov.gchq.magmacore.service; exports uk.gov.gchq.magmacore.service.transformation; exports uk.gov.gchq.magmacore.exception; + exports uk.gov.gchq.magmacore.util; } diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 97c7abfe..035d48fb 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -49,8 +49,8 @@ import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.hqdm.rdf.util.Pair; -import uk.gov.gchq.magmacore.query.QueryResult; -import uk.gov.gchq.magmacore.query.QueryResultList; +import uk.gov.gchq.magmacore.database.query.QueryResult; +import uk.gov.gchq.magmacore.database.query.QueryResultList; /** * Apache Jena triplestore to store HQDM objects as RDF triples either as an in-memory Jena dataset diff --git a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 3673263c..8c50897f 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -44,8 +44,8 @@ import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.util.Pair; -import uk.gov.gchq.magmacore.query.QueryResult; -import uk.gov.gchq.magmacore.query.QueryResultList; +import uk.gov.gchq.magmacore.database.query.QueryResult; +import uk.gov.gchq.magmacore.database.query.QueryResultList; /** * Connection to a remote SPARQL endpoint. diff --git a/src/main/java/uk/gov/gchq/magmacore/database/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/database/package-info.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/database/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/package-info.java diff --git a/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java b/core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResult.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResult.java index ee7bc5c7..af696423 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/QueryResult.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResult.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.query; +package uk.gov.gchq.magmacore.database.query; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java b/core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResultList.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResultList.java index 3ad19c06..8552b07e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/QueryResultList.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResultList.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.query; +package uk.gov.gchq.magmacore.database.query; import java.util.List; diff --git a/src/main/java/uk/gov/gchq/magmacore/query/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/database/query/package-info.java similarity index 93% rename from src/main/java/uk/gov/gchq/magmacore/query/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/database/query/package-info.java index b499e89b..3520dc40 100644 --- a/src/main/java/uk/gov/gchq/magmacore/query/package-info.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/query/package-info.java @@ -15,4 +15,4 @@ /** * Provides classes for building and performing SPARQL queries. */ -package uk.gov.gchq.magmacore.query; +package uk.gov.gchq.magmacore.database.query; diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java b/core/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java rename to core/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java b/core/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java rename to core/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java diff --git a/src/main/java/uk/gov/gchq/magmacore/exception/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/exception/package-info.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/exception/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/exception/package-info.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/service/package-info.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/package-info.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java diff --git a/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java diff --git a/src/main/java/uk/gov/gchq/magmacore/util/UID.java b/core/src/main/java/uk/gov/gchq/magmacore/util/UID.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/util/UID.java rename to core/src/main/java/uk/gov/gchq/magmacore/util/UID.java diff --git a/src/main/java/uk/gov/gchq/magmacore/util/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/util/package-info.java similarity index 100% rename from src/main/java/uk/gov/gchq/magmacore/util/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/util/package-info.java diff --git a/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java similarity index 100% rename from src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java rename to core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java similarity index 100% rename from src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java rename to core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java similarity index 100% rename from src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java rename to core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java diff --git a/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java similarity index 100% rename from src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java rename to core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java diff --git a/examples/pom.xml b/examples/pom.xml new file mode 100644 index 00000000..43e2c39b --- /dev/null +++ b/examples/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 1.1-SNAPSHOT + + + uk.gov.gchq.magma-core + demo + 1.0-SNAPSHOT + + examples + + + UTF-8 + 17 + + + + + uk.gov.gchq.magma-core + core + + + uk.gov.gchq.hqdm + hqdm-core + + + uk.gov.gchq.hqdm + hqdm-rdf + + + junit + junit + + + org.slf4j + slf4j-jdk14 + + + diff --git a/examples/src/main/java/module-info.java b/examples/src/main/java/module-info.java new file mode 100644 index 00000000..2940067f --- /dev/null +++ b/examples/src/main/java/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes demonstrating implementation and use of Magma Core databases, SPARQL queries and Fuseki + * server. + */ +module uk.gov.gchq.magmacore.examples { + requires uk.gov.gchq.hqdm.core; + requires uk.gov.gchq.hqdm.rdf; + requires uk.gov.gchq.magmacore; + + exports uk.gov.gchq.magmacore.examples.service; +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java similarity index 97% rename from src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java index 20885fe4..8da4a49e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleAssociations.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.data; -import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.USER_BASE; import static uk.gov.gchq.magmacore.util.UID.uid; import java.util.ArrayList; @@ -33,7 +33,6 @@ import uk.gov.gchq.hqdm.rdf.iri.HQDM; import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -46,7 +45,7 @@ public class ExampleAssociations { /** * Create a person-occupies-house association. * - * @param mcService {@link MagmaCoreDatabase}. + * @param mcService {@link MagmaCoreService}. * @param creates {@link List} of {@link DbCreateOperation}. * @param possibleWorld A {@link PossibleWorld}. * @param person {@link Person} occupying the house. diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java similarity index 97% rename from src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java index b5ce34cc..d65ecde1 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleIndividuals.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.data; -import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.USER_BASE; import static uk.gov.gchq.magmacore.util.UID.uid; import java.util.List; @@ -32,7 +32,7 @@ import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; /** - * Example invididuals. + * Example individuals. */ public class ExampleIndividuals { diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java similarity index 98% rename from src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java index 3d4867d5..1c0849d9 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.data; -import static uk.gov.gchq.magmacore.demo.DemoUtils.REF_BASE; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.REF_BASE; import static uk.gov.gchq.magmacore.util.UID.uid; import java.util.List; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/package-info.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/package-info.java similarity index 80% rename from src/main/java/uk/gov/gchq/magmacore/demo/package-info.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/data/package-info.java index 50b70a24..c445d81c 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/package-info.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/package-info.java @@ -13,7 +13,6 @@ */ /** - * Classes demonstrating implementation and use of Magma Core databases, SPARQL queries and Fuseki - * server. + * Example data sets for demonstrating building and using HQDM models with Magma Core. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.data; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java similarity index 79% rename from src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java index 6bdd7a21..47524101 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java @@ -12,24 +12,23 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.service; -import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; import java.util.List; import java.util.Map; import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** - * Example use-case scenario for the {@link MagmaCoreJenaDatabase}. + * Example use-case scenario for using Magma Core with an in-memory Jena database. * *

- * This example demo creates an in-memory {@link MagmaCoreJenaDatabase} populated with the example - * data libraries as RDF triples. + * This example demo creates an in-memory Jena database populated with the example data libraries as + * RDF triples. *

*

* {@code PersonB1_Bob} can be queried for using the `findByEntityName` method. method. The @@ -41,8 +40,11 @@ public final class JenaDatabaseDemo { /** * Run the in-memory Jena database example. + * + * @param args Application arguments. */ - public void run() { + public static void main(final String[] args) { + // Instantiate new in-memory Jena database. final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java similarity index 97% rename from src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java index 5f74ac73..d73a673e 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/McAssistMultInheritFromDataApp.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.service; import static uk.gov.gchq.magmacore.util.UID.uid; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java similarity index 55% rename from src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java index 65dbb7d4..3698e3a5 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/RemoteSparqlDatabaseDemo.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java @@ -12,41 +12,26 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.service; -import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; -import uk.gov.gchq.magmacore.database.MagmaCoreRemoteSparqlDatabase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; /** - * Example use-case scenario for using a {@link MagmaCoreRemoteSparqlDatabase} with a remote - * service. + * Example use-case scenario for using Magma Core with a remote SPARQL database connection. */ public final class RemoteSparqlDatabaseDemo { - private final String url; - /** * Constructs a RemoteSparqlDatabaseDemo with a remote SPARQL server connection. * - * @param url URL of the SPARQL server. + * @param args Application arguments. */ - public RemoteSparqlDatabaseDemo(final String url) { - this.url = url; - } - - /** - * Run the RemoteSparqlDatabase demo. - * - * @param populate {@code true} if the dataset should be populated with example data. - */ - public void run(final boolean populate) { - final MagmaCoreService mcService = MagmaCoreServiceFactory.attachRemoteSparqlEndpoint(url); - - if (populate) { - populateExampleData(mcService); - } + public static void main(final String[] args) { + final MagmaCoreService mcService = MagmaCoreServiceFactory + .attachRemoteSparqlEndpoint("http://localhost:3330/tdb"); + populateExampleData(mcService); } } diff --git a/src/main/java/uk/gov/gchq/magmacore/package-info.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/package-info.java similarity index 77% rename from src/main/java/uk/gov/gchq/magmacore/package-info.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/service/package-info.java index 6d44109a..888eb063 100644 --- a/src/main/java/uk/gov/gchq/magmacore/package-info.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/package-info.java @@ -13,7 +13,6 @@ */ /** - * Magma Core is a lightweight set of Java classes to enable HQDM data objects to be created and - * used as RDF Linked Data through Apache Jena. + * Services for creating and interacting with Magma Core databases. */ -package uk.gov.gchq.magmacore; +package uk.gov.gchq.magmacore.examples.service; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java new file mode 100644 index 00000000..a89c0f43 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java @@ -0,0 +1,176 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.magmacore.examples.signs; + +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + +import java.util.List; +import java.util.Map; + +import uk.gov.gchq.hqdm.model.Description; +import uk.gov.gchq.hqdm.model.Pattern; +import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; +import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; +import uk.gov.gchq.magmacore.service.transformation.DbTransformation; + +/** + * Example signs. + */ +public class ExampleSigns { + + /** + * A function that populates a database. + * + * @param mcService A {@link MagmaCoreService}. + * @return {@link DbTransformation}. + */ + public static DbTransformation populateExampleData(final MagmaCoreService mcService) { + + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one + // can be created. + final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); + + // Apply the DbChangeSet. + rdlChangeSet.apply(mcService); + + // mcService now contains the RDL needed for the next DbChangeSet + final DbChangeSet signsChangeSet = addSigns(mcService); + + // Apply the DbChangeSet. + signsChangeSet.apply(mcService); + // + // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. + return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); + } + + /** + * Create a {@link DbChangeSet} to add the representation by sign. + * + * @param mcService {@link MagmaCoreService}. + * @return {@link DbChangeSet}. + */ + private static DbChangeSet addSigns(final MagmaCoreService mcService) { + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "URL Pattern", + "Description By URL", + "English Speakers")); + + // Find the required classes, kinds, and roles. + final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); + final Description descriptionByUrl = (Description) entities.get("Description By URL"); + final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities + .get("English Speakers"); + final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); + + // Create IRIs for the new entities. + final IRI possibleWorld = new IRI(USER_BASE, uid()); + final IRI person = new IRI(USER_BASE, uid()); + final IRI wikipediaSign = new IRI(USER_BASE, uid()); + final IRI britannica = new IRI(USER_BASE, uid()); + final IRI biography = new IRI(USER_BASE, uid()); + final IRI stanford = new IRI(USER_BASE, uid()); + final IRI nationalGeographic = new IRI(USER_BASE, uid()); + final IRI representationBySign = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); + + // Create the set of DbCreateOperations. + final List creates = List.of( + + // Create the possible world that we are working in. + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), + + // Create the thing represented. + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + // Create the signs that represent the thing. + new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(wikipediaSign, HQDM.VALUE_, + "https://en.wikipedia.org/wiki/Socrates"), + new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(britannica, HQDM.VALUE_, + "https://www.britannica.com/biography/Socrates"), + new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(biography, HQDM.VALUE_, + "https://www.biography.com/scholar/socrates"), + new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(stanford, HQDM.VALUE_, + "https://plato.stanford.edu/entries/socrates/"), + new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(nationalGeographic, HQDM.VALUE_, + "https://www.nationalgeographic.com/culture/article/socrates"), + new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Create the representation by signs. + new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, + HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), + new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), + new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Add beginning, ending, etc. from `association`. + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), + + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), + + new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), + new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), + + // Add the participants. + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, + representationBySign.getIri())); + + // Create a change set and return it. + return new DbChangeSet(List.of(), creates); + } +} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java similarity index 92% rename from src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java index e23eab5a..454ec582 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSignsRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.signs; -import static uk.gov.gchq.magmacore.demo.DemoUtils.REF_BASE; -import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.REF_BASE; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.USER_BASE; import static uk.gov.gchq.magmacore.util.UID.uid; import java.util.List; diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java similarity index 92% rename from src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java rename to examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java index 99c3d068..cd3f8787 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/DemoUtils.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java @@ -12,11 +12,14 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.util; import java.util.List; import uk.gov.gchq.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.examples.data.ExampleAssociations; +import uk.gov.gchq.magmacore.examples.data.ExampleIndividuals; +import uk.gov.gchq.magmacore.examples.data.ExampleRdl; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbTransformation; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/package-info.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/package-info.java new file mode 100644 index 00000000..46db9871 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Utilities for Magma Core examples classes. + */ +package uk.gov.gchq.magmacore.examples.util; diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java similarity index 91% rename from src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java rename to examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java index 27407ef3..aa7abf04 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleDataTest.java +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.data; import static org.junit.Assert.assertNotNull; -import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; import org.junit.Test; diff --git a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java similarity index 96% rename from src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java rename to examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java index 613f5240..19f0d74b 100644 --- a/src/test/java/uk/gov/gchq/magmacore/demo/ExampleSignsTest.java +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.examples.signs; import static org.junit.Assert.assertNotNull; diff --git a/pom.xml b/pom.xml index b7468332..fcff31f3 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ uk.gov.gchq.magma-core magma-core 1.1-SNAPSHOT - jar + pom Magma Core @@ -42,50 +42,52 @@ 15 - - - junit - junit - 4.13.1 - test - - - commons-cli - commons-cli - 1.5.0 - - - org.apache.jena - apache-jena-libs - pom - 4.3.2 - - - org.apache.jena - jena-fuseki-main - 4.3.2 - - - org.apache.logging.log4j - log4j-api - 2.17.1 - - - org.apache.logging.log4j - log4j-core - 2.17.1 - - - org.apache.logging.log4j - log4j-slf4j-impl - 2.17.0 - - - uk.gov.gchq.hqdm - hqdm-rdf - 1.0-SNAPSHOT - - + + core + examples + + + + + + uk.gov.gchq.magma-core + core + 1.0-SNAPSHOT + + + uk.gov.gchq.hqdm + hqdm-core + 1.1-SNAPSHOT + + + uk.gov.gchq.hqdm + hqdm-rdf + 1.0-SNAPSHOT + + + junit + junit + 4.13.1 + test + + + commons-cli + commons-cli + 1.5.0 + + + org.apache.jena + apache-jena-libs + pom + 4.3.2 + + + org.slf4j + slf4j-jdk14 + 1.7.12 + + + diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java deleted file mode 100644 index 1552ab34..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore; - -import uk.gov.gchq.magmacore.demo.FusekiServiceDemo; -import uk.gov.gchq.magmacore.demo.JenaDatabaseDemo; -import uk.gov.gchq.magmacore.demo.RemoteSparqlDatabaseDemo; - -/** - * Application entry point. - */ -public final class MagmaCore { - - private MagmaCore() { - } - - /** - * Executes the selected database example. - * - * @param args Application arguments. - */ - public static void main(final String[] args) { - if (args.length == 0) { - fuseki(true); - } else { - final String option = args[0]; - - if (option.equals("fuseki")) { - fuseki(false); - } else if (option.equals("fuseki-populate")) { - fuseki(true); - } else if (option.equals("remote")) { - remoteSparqlDatabaseDemo(false); - } else if (option.equals("remote-populate")) { - remoteSparqlDatabaseDemo(true); - } else if (option.equals("jena")) { - jenaDemo(); - } else { - System.out.println("Unknown option: " + option); - } - } - } - - /** - * Executes the FusekiServiceDemo. - * - * @param populate {@code true} if the dataset should be populated with example data. - */ - public static void fuseki(final boolean populate) { - new FusekiServiceDemo().run(populate); - } - - /** - * Executes the RemoteSparqlDatabaseDemo. - * - * @param populate {@code true} if the dataset should be populated with example data. - */ - public static void remoteSparqlDatabaseDemo(final boolean populate) { - new RemoteSparqlDatabaseDemo("http://localhost:3330/tdb").run(populate); - } - - /** - * Executes the JenaDatabaseDemo. - */ - public static void jenaDemo() { - new JenaDatabaseDemo().run(); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java deleted file mode 100644 index 8f1fb1c6..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleSigns.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore.demo; - -import static uk.gov.gchq.magmacore.demo.DemoUtils.USER_BASE; -import static uk.gov.gchq.magmacore.util.UID.uid; - -import java.util.List; -import java.util.Map; - -import uk.gov.gchq.hqdm.model.Description; -import uk.gov.gchq.hqdm.model.Pattern; -import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.magmacore.service.MagmaCoreService; -import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; -import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; -import uk.gov.gchq.magmacore.service.transformation.DbTransformation; - -/** - * Example signs. - */ -public class ExampleSigns { - - /** - * A function that populates a database. - * - * @param mcService A {@link MagmaCoreService}. - * @return {@link DbTransformation}. - */ - public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - - // Apply the transformation to the database. There are dependencies between these change sets - // since they both depend on RDL being present, but also the occupancies depend on the - // individuals being present, so each change set needs to be applied before the next one - // can be created. - final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); - - // Apply the DbChangeSet. - rdlChangeSet.apply(mcService); - - // mcService now contains the RDL needed for the next DbChangeSet - final DbChangeSet signsChangeSet = addSigns(mcService); - - // Apply the DbChangeSet. - signsChangeSet.apply(mcService); - // - // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. - return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); - } - - /** - * Create a {@link DbChangeSet} to add the representation by sign. - * - * @param mcService {@link MagmaCoreService}. - * @return {@link DbChangeSet}. - */ - private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of( - "URL Pattern", - "Description By URL", - "English Speakers")); - - // Find the required classes, kinds, and roles. - final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); - final Description descriptionByUrl = (Description) entities.get("Description By URL"); - final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities - .get("English Speakers"); - final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); - - // Create IRIs for the new entities. - final IRI possibleWorld = new IRI(USER_BASE, uid()); - final IRI person = new IRI(USER_BASE, uid()); - final IRI wikipediaSign = new IRI(USER_BASE, uid()); - final IRI britannica = new IRI(USER_BASE, uid()); - final IRI biography = new IRI(USER_BASE, uid()); - final IRI stanford = new IRI(USER_BASE, uid()); - final IRI nationalGeographic = new IRI(USER_BASE, uid()); - final IRI representationBySign = new IRI(USER_BASE, uid()); - final IRI startEvent = new IRI(USER_BASE, uid()); - final IRI endEvent = new IRI(USER_BASE, uid()); - - // Create the set of DbCreateOperations. - final List creates = List.of( - - // Create the possible world that we are working in. - new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), - new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), - - // Create the thing represented. - new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - // Create the signs that represent the thing. - new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), - new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(britannica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), - new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(biography, HQDM.VALUE_, "https://www.biography.com/scholar/socrates"), - new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(stanford, HQDM.VALUE_, "https://plato.stanford.edu/entries/socrates/"), - new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(nationalGeographic, HQDM.VALUE_, - "https://www.nationalgeographic.com/culture/article/socrates"), - new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - // Create the representation by signs. - new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), - new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), - new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), - new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - // Add beginning, ending, etc. from `association`. - new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), - - new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), - - new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), - new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), - - // Add the participants. - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, representationBySign.getIri())); - - // Create a change set and return it. - return new DbChangeSet(List.of(), creates); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java deleted file mode 100644 index dec10e8b..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiServiceDemo.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.magmacore.demo; - -import static uk.gov.gchq.magmacore.demo.DemoUtils.populateExampleData; - -import org.apache.jena.fuseki.main.FusekiServer; -import org.apache.jena.fuseki.system.FusekiLogging; - -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; -import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; - -/** - * Example use-case scenario for hosting {@link MagmaCoreJenaDatabase} on a Fuseki server. - * - *

- * The FusekiServiceDemo class can be used to host in-memory or persistent Magma Core Jena Datasets - * over HTTP using a Fuseki server. - *

- *

- * By default, the Fuseki server is configured to run on localhost:3330, however this can be change - * by setting the {@code port(int)}. - *

- *

- * The Fuseki server can host either in-memory Datasets, or connected TDB stores. Datasets can be - * added to the server using the {@code add(name, dataset)} method. Datasets are hosted at - * {@code localhost:/}. - *

- */ -public final class FusekiServiceDemo { - - /** - * Run the example Fuseki server. - * - * @param populate {@code true} if the dataset should be populated with example data. - */ - public void run(final boolean populate) { - // Create/connect to persistent TDB. - final MagmaCoreJenaDatabase tdb = new MagmaCoreJenaDatabase("tdb"); - - if (populate) { - // If TDB is not already populated create set of example data objects to store in TDB. - tdb.begin(); - if (tdb.getDataset().isEmpty()) { - // Build example data objects Dataset, transactions are controlled by the MagmaCoreService. - populateExampleData(MagmaCoreServiceFactory.createWithJenaDatabase(tdb)); - tdb.commit(); - } else { - tdb.abort(); - } - } - - // Build and start Fuseki server. - FusekiLogging.setLogging(); - FusekiServer - .create() - .port(3330) - .add("/tdb", tdb.getDataset(), true) - .start(); - } -} From 5b97e4f6c9559f4d99602906e82616e8405b56f1 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 8 Jul 2022 14:14:37 +0000 Subject: [PATCH 84/91] Added HQDM & HQDM-RDF as Magma Core submodules. --- .gitignore | 2 + CONTRIBUTING.md | 2 + README.md | 16 +- checkstyle-suppressions.xml | 15 +- core/pom.xml | 6 +- core/src/main/java/module-info.java | 2 +- examples/pom.xml | 6 +- examples/src/main/java/module-info.java | 2 +- .../examples/signs/ExampleSigns.java | 272 +-- hqdm-rdf/pom.xml | 32 + hqdm-rdf/src/main/java/module-info.java | 25 + .../gov/gchq/hqdm/rdf/HqdmObjectFactory.java | 836 +++++++ .../gchq/hqdm/rdf/exception/IriException.java | 65 + .../gchq/hqdm/rdf/exception/package-info.java | 18 + .../java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java | 2134 +++++++++++++++++ .../uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java | 44 + .../java/uk/gov/gchq/hqdm/rdf/iri/IRI.java | 128 + .../uk/gov/gchq/hqdm/rdf/iri/IriBase.java | 97 + .../java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java | 71 + .../gov/gchq/hqdm/rdf/iri/package-info.java | 19 + .../uk/gov/gchq/hqdm/rdf/package-info.java | 18 + .../java/uk/gov/gchq/hqdm/rdf/util/Pair.java | 65 + .../uk/gov/gchq/hqdm/rdf/util/Triples.java | 70 + .../gov/gchq/hqdm/rdf/util/package-info.java | 18 + .../gchq/hqdm/rdf/HqdmObjectFactoryTest.java | 111 + .../uk/gov/gchq/hqdm/rdf/iri/IriTest.java | 60 + .../gov/gchq/hqdm/rdf/util/TriplesTest.java | 61 + hqdm/pom.xml | 28 + hqdm/src/main/java/module-info.java | 22 + .../gchq/hqdm/exception/HqdmException.java | 65 + .../gov/gchq/hqdm/exception/package-info.java | 18 + .../gov/gchq/hqdm/model/AbstractObject.java | 21 + .../gchq/hqdm/model/AcceptanceOfOffer.java | 22 + .../hqdm/model/AcceptanceOfOfferForGoods.java | 23 + .../java/uk/gov/gchq/hqdm/model/Activity.java | 21 + .../uk/gov/gchq/hqdm/model/Aggregation.java | 21 + .../uk/gov/gchq/hqdm/model/AgreeContract.java | 22 + .../gchq/hqdm/model/AgreementExecution.java | 22 + .../gov/gchq/hqdm/model/AgreementProcess.java | 23 + .../uk/gov/gchq/hqdm/model/AmountOfMoney.java | 25 + .../java/uk/gov/gchq/hqdm/model/Asset.java | 22 + .../uk/gov/gchq/hqdm/model/Association.java | 25 + .../gchq/hqdm/model/BeginningOfOwnership.java | 21 + .../gov/gchq/hqdm/model/BiologicalObject.java | 24 + .../gov/gchq/hqdm/model/BiologicalSystem.java | 25 + .../hqdm/model/BiologicalSystemComponent.java | 25 + .../java/uk/gov/gchq/hqdm/model/Class.java | 21 + .../hqdm/model/ClassOfAbstractObject.java | 21 + .../gov/gchq/hqdm/model/ClassOfActivity.java | 22 + .../gchq/hqdm/model/ClassOfAgreeContract.java | 21 + .../hqdm/model/ClassOfAgreementExecution.java | 22 + .../hqdm/model/ClassOfAgreementProcess.java | 22 + .../gchq/hqdm/model/ClassOfAmountOfMoney.java | 23 + .../gchq/hqdm/model/ClassOfAssociation.java | 22 + .../hqdm/model/ClassOfBiologicalObject.java | 22 + .../hqdm/model/ClassOfBiologicalSystem.java | 23 + .../ClassOfBiologicalSystemComponent.java | 23 + .../uk/gov/gchq/hqdm/model/ClassOfClass.java | 26 + .../ClassOfClassOfSpatioTemporalExtent.java | 21 + .../hqdm/model/ClassOfContractExecution.java | 21 + .../hqdm/model/ClassOfContractProcess.java | 21 + .../uk/gov/gchq/hqdm/model/ClassOfEvent.java | 21 + .../hqdm/model/ClassOfFunctionalObject.java | 23 + .../hqdm/model/ClassOfFunctionalSystem.java | 23 + .../ClassOfFunctionalSystemComponent.java | 23 + .../ClassOfInPlaceBiologicalComponent.java | 24 + .../gchq/hqdm/model/ClassOfIndividual.java | 27 + ...sOfInstalledFunctionalSystemComponent.java | 23 + .../hqdm/model/ClassOfInstalledObject.java | 23 + ...ClassOfIntentionallyConstructedObject.java | 23 + .../uk/gov/gchq/hqdm/model/ClassOfOffer.java | 21 + .../ClassOfOrdinaryBiologicalObject.java | 24 + .../ClassOfOrdinaryFunctionalObject.java | 24 + .../model/ClassOfOrdinaryPhysicalObject.java | 22 + .../gchq/hqdm/model/ClassOfOrganization.java | 23 + .../model/ClassOfOrganizationComponent.java | 24 + .../gchq/hqdm/model/ClassOfParticipant.java | 21 + .../uk/gov/gchq/hqdm/model/ClassOfParty.java | 21 + .../gchq/hqdm/model/ClassOfPeriodOfTime.java | 21 + .../uk/gov/gchq/hqdm/model/ClassOfPerson.java | 22 + .../hqdm/model/ClassOfPersonInPosition.java | 24 + .../hqdm/model/ClassOfPhysicalObject.java | 22 + .../hqdm/model/ClassOfPhysicalProperty.java | 22 + .../hqdm/model/ClassOfPhysicalQuantity.java | 21 + .../gchq/hqdm/model/ClassOfPointInTime.java | 21 + .../gov/gchq/hqdm/model/ClassOfPosition.java | 22 + .../gchq/hqdm/model/ClassOfPossibleWorld.java | 24 + .../hqdm/model/ClassOfReachingAgreement.java | 22 + .../gchq/hqdm/model/ClassOfRelationship.java | 21 + .../hqdm/model/ClassOfRepresentation.java | 22 + .../model/ClassOfSalesProductInstance.java | 24 + .../uk/gov/gchq/hqdm/model/ClassOfSign.java | 24 + .../ClassOfSociallyConstructedActivity.java | 22 + .../ClassOfSociallyConstructedObject.java | 23 + .../model/ClassOfSpatioTemporalExtent.java | 21 + .../uk/gov/gchq/hqdm/model/ClassOfState.java | 21 + .../hqdm/model/ClassOfStateOfActivity.java | 21 + .../model/ClassOfStateOfAmountOfMoney.java | 24 + .../hqdm/model/ClassOfStateOfAssociation.java | 21 + .../model/ClassOfStateOfBiologicalObject.java | 22 + .../model/ClassOfStateOfBiologicalSystem.java | 22 + ...assOfStateOfBiologicalSystemComponent.java | 23 + .../model/ClassOfStateOfFunctionalObject.java | 24 + .../model/ClassOfStateOfFunctionalSystem.java | 22 + ...assOfStateOfFunctionalSystemComponent.java | 25 + ...StateOfIntentionallyConstructedObject.java | 22 + ...lassOfStateOfOrdinaryBiologicalObject.java | 24 + ...lassOfStateOfOrdinaryFunctionalObject.java | 25 + .../ClassOfStateOfOrdinaryPhysicalObject.java | 22 + .../model/ClassOfStateOfOrganization.java | 24 + .../ClassOfStateOfOrganizationComponent.java | 25 + .../gchq/hqdm/model/ClassOfStateOfParty.java | 21 + .../gchq/hqdm/model/ClassOfStateOfPerson.java | 24 + .../model/ClassOfStateOfPhysicalObject.java | 21 + .../hqdm/model/ClassOfStateOfPosition.java | 22 + .../ClassOfStateOfSalesProductInstance.java | 22 + .../gchq/hqdm/model/ClassOfStateOfSign.java | 22 + ...sOfStateOfSociallyConstructedActivity.java | 23 + ...assOfStateOfSociallyConstructedObject.java | 22 + .../gchq/hqdm/model/ClassOfStateOfSystem.java | 22 + .../model/ClassOfStateOfSystemComponent.java | 22 + .../uk/gov/gchq/hqdm/model/ClassOfSystem.java | 24 + .../hqdm/model/ClassOfSystemComponent.java | 22 + .../gov/gchq/hqdm/model/Classification.java | 25 + .../uk/gov/gchq/hqdm/model/Composition.java | 22 + .../gchq/hqdm/model/ContractExecution.java | 22 + .../gov/gchq/hqdm/model/ContractProcess.java | 22 + .../java/uk/gov/gchq/hqdm/model/Currency.java | 22 + .../gchq/hqdm/model/DefinedRelationship.java | 21 + .../uk/gov/gchq/hqdm/model/Definition.java | 21 + .../uk/gov/gchq/hqdm/model/Description.java | 21 + .../java/uk/gov/gchq/hqdm/model/Employee.java | 21 + .../java/uk/gov/gchq/hqdm/model/Employer.java | 21 + .../uk/gov/gchq/hqdm/model/Employment.java | 22 + .../gchq/hqdm/model/EndingOfOwnership.java | 21 + .../gov/gchq/hqdm/model/EnumeratedClass.java | 21 + .../java/uk/gov/gchq/hqdm/model/Event.java | 22 + .../hqdm/model/ExchangeOfGoodsAndMoney.java | 22 + .../uk/gov/gchq/hqdm/model/Function_.java | 21 + .../gov/gchq/hqdm/model/FunctionalObject.java | 22 + .../gov/gchq/hqdm/model/FunctionalSystem.java | 22 + .../hqdm/model/FunctionalSystemComponent.java | 22 + .../gov/gchq/hqdm/model/Identification.java | 21 + .../IdentificationOfPhysicalQuantity.java | 23 + .../model/InPlaceBiologicalComponent.java | 23 + .../uk/gov/gchq/hqdm/model/Individual.java | 27 + .../InstalledFunctionalSystemComponent.java | 23 + .../gov/gchq/hqdm/model/InstalledObject.java | 23 + .../model/IntentionallyConstructedObject.java | 27 + .../gov/gchq/hqdm/model/KindOfActivity.java | 21 + .../gchq/hqdm/model/KindOfAssociation.java | 21 + .../hqdm/model/KindOfBiologicalObject.java | 22 + .../hqdm/model/KindOfBiologicalSystem.java | 22 + .../KindOfBiologicalSystemComponent.java | 22 + .../hqdm/model/KindOfFunctionalObject.java | 24 + .../hqdm/model/KindOfFunctionalSystem.java | 22 + .../KindOfFunctionalSystemComponent.java | 22 + .../gov/gchq/hqdm/model/KindOfIndividual.java | 21 + .../KindOfIntentionallyConstructedObject.java | 24 + .../model/KindOfOrdinaryBiologicalObject.java | 24 + .../model/KindOfOrdinaryFunctionalObject.java | 24 + .../model/KindOfOrdinaryPhysicalObject.java | 22 + .../gchq/hqdm/model/KindOfOrganization.java | 22 + .../model/KindOfOrganizationComponent.java | 25 + .../uk/gov/gchq/hqdm/model/KindOfParty.java | 22 + .../uk/gov/gchq/hqdm/model/KindOfPerson.java | 24 + .../gchq/hqdm/model/KindOfPhysicalObject.java | 22 + .../hqdm/model/KindOfPhysicalProperty.java | 22 + .../hqdm/model/KindOfPhysicalQuantity.java | 24 + .../gov/gchq/hqdm/model/KindOfPosition.java | 22 + .../KindOfRelationshipWithRestriction.java | 21 + .../KindOfRelationshipWithSignature.java | 23 + .../KindOfSociallyConstructedObject.java | 24 + .../uk/gov/gchq/hqdm/model/KindOfSystem.java | 22 + .../hqdm/model/KindOfSystemComponent.java | 24 + .../gchq/hqdm/model/LanguageCommunity.java | 28 + .../uk/gov/gchq/hqdm/model/MoneyAsset.java | 23 + .../java/uk/gov/gchq/hqdm/model/Offer.java | 22 + .../model/OfferAndAcceptanceForGoods.java | 22 + .../uk/gov/gchq/hqdm/model/OfferForGoods.java | 21 + .../java/uk/gov/gchq/hqdm/model/Offering.java | 22 + .../hqdm/model/OrdinaryBiologicalObject.java | 24 + .../hqdm/model/OrdinaryFunctionalObject.java | 25 + .../hqdm/model/OrdinaryPhysicalObject.java | 21 + .../uk/gov/gchq/hqdm/model/Organization.java | 22 + .../hqdm/model/OrganizationComponent.java | 26 + .../java/uk/gov/gchq/hqdm/model/Owner.java | 24 + .../uk/gov/gchq/hqdm/model/Ownership.java | 22 + .../uk/gov/gchq/hqdm/model/Participant.java | 21 + .../ParticipantInActivityOrAssociation.java | 24 + .../java/uk/gov/gchq/hqdm/model/Party.java | 22 + .../java/uk/gov/gchq/hqdm/model/Pattern.java | 21 + .../uk/gov/gchq/hqdm/model/PeriodOfTime.java | 21 + .../java/uk/gov/gchq/hqdm/model/Person.java | 22 + .../gov/gchq/hqdm/model/PersonInPosition.java | 26 + .../gov/gchq/hqdm/model/PhysicalObject.java | 23 + .../gov/gchq/hqdm/model/PhysicalProperty.java | 22 + .../hqdm/model/PhysicalPropertyRange.java | 27 + .../gov/gchq/hqdm/model/PhysicalQuantity.java | 22 + .../hqdm/model/PhysicalQuantityRange.java | 21 + .../java/uk/gov/gchq/hqdm/model/Plan.java | 21 + .../uk/gov/gchq/hqdm/model/PointInTime.java | 21 + .../java/uk/gov/gchq/hqdm/model/Position.java | 27 + .../uk/gov/gchq/hqdm/model/PossibleWorld.java | 21 + .../java/uk/gov/gchq/hqdm/model/Price.java | 21 + .../uk/gov/gchq/hqdm/model/ProductBrand.java | 22 + .../gov/gchq/hqdm/model/ProductOffering.java | 21 + .../gchq/hqdm/model/ReachingAgreement.java | 21 + .../model/RecognizingLanguageCommunity.java | 24 + .../uk/gov/gchq/hqdm/model/Relationship.java | 21 + .../hqdm/model/RepresentationByPattern.java | 22 + .../gchq/hqdm/model/RepresentationBySign.java | 22 + .../uk/gov/gchq/hqdm/model/Requirement.java | 22 + .../hqdm/model/RequirementSpecification.java | 22 + .../java/uk/gov/gchq/hqdm/model/Role.java | 22 + .../uk/gov/gchq/hqdm/model/SaleOfGoods.java | 22 + .../uk/gov/gchq/hqdm/model/SalesProduct.java | 22 + .../gchq/hqdm/model/SalesProductInstance.java | 23 + .../gchq/hqdm/model/SalesProductVersion.java | 22 + .../java/uk/gov/gchq/hqdm/model/Scale.java | 21 + .../java/uk/gov/gchq/hqdm/model/Sign.java | 23 + .../model/SociallyConstructedActivity.java | 21 + .../hqdm/model/SociallyConstructedObject.java | 24 + .../gchq/hqdm/model/SpatioTemporalExtent.java | 21 + .../gov/gchq/hqdm/model/Specialization.java | 22 + .../java/uk/gov/gchq/hqdm/model/State.java | 22 + .../gov/gchq/hqdm/model/StateOfActivity.java | 21 + .../gchq/hqdm/model/StateOfAmountOfMoney.java | 24 + .../gchq/hqdm/model/StateOfAssociation.java | 22 + .../hqdm/model/StateOfBiologicalObject.java | 22 + .../hqdm/model/StateOfBiologicalSystem.java | 24 + .../StateOfBiologicalSystemComponent.java | 23 + .../hqdm/model/StateOfFunctionalObject.java | 24 + .../hqdm/model/StateOfFunctionalSystem.java | 23 + .../StateOfFunctionalSystemComponent.java | 24 + ...StateOfIntentionallyConstructedObject.java | 22 + .../hqdm/model/StateOfLanguageCommunity.java | 21 + .../StateOfOrdinaryBiologicalObject.java | 23 + .../StateOfOrdinaryFunctionalObject.java | 23 + .../model/StateOfOrdinaryPhysicalObject.java | 22 + .../gchq/hqdm/model/StateOfOrganization.java | 22 + .../model/StateOfOrganizationComponent.java | 24 + .../uk/gov/gchq/hqdm/model/StateOfParty.java | 21 + .../uk/gov/gchq/hqdm/model/StateOfPerson.java | 22 + .../hqdm/model/StateOfPhysicalObject.java | 22 + .../gov/gchq/hqdm/model/StateOfPosition.java | 22 + .../model/StateOfSalesProductInstance.java | 22 + .../uk/gov/gchq/hqdm/model/StateOfSign.java | 22 + .../StateOfSociallyConstructedActivity.java | 23 + .../StateOfSociallyConstructedObject.java | 22 + .../uk/gov/gchq/hqdm/model/StateOfSystem.java | 22 + .../hqdm/model/StateOfSystemComponent.java | 22 + .../java/uk/gov/gchq/hqdm/model/System.java | 22 + .../gov/gchq/hqdm/model/SystemComponent.java | 29 + .../gchq/hqdm/model/TemporalComposition.java | 22 + .../java/uk/gov/gchq/hqdm/model/Thing.java | 33 + .../gchq/hqdm/model/TransferOfOwnership.java | 22 + .../model/TransferOfOwnershipOfMoney.java | 21 + .../uk/gov/gchq/hqdm/model/Transferee.java | 22 + .../uk/gov/gchq/hqdm/model/Transferor.java | 22 + .../uk/gov/gchq/hqdm/model/UnitOfMeasure.java | 21 + .../hqdm/model/impl/AbstractObjectImpl.java | 32 + .../impl/AcceptanceOfOfferForGoodsImpl.java | 32 + .../model/impl/AcceptanceOfOfferImpl.java | 32 + .../gchq/hqdm/model/impl/ActivityImpl.java | 32 + .../gchq/hqdm/model/impl/AggregationImpl.java | 32 + .../hqdm/model/impl/AgreeContractImpl.java | 32 + .../model/impl/AgreementExecutionImpl.java | 32 + .../hqdm/model/impl/AgreementProcessImpl.java | 32 + .../hqdm/model/impl/AmountOfMoneyImpl.java | 32 + .../gov/gchq/hqdm/model/impl/AssetImpl.java | 32 + .../gchq/hqdm/model/impl/AssociationImpl.java | 32 + .../model/impl/BeginningOfOwnershipImpl.java | 32 + .../hqdm/model/impl/BiologicalObjectImpl.java | 32 + .../impl/BiologicalSystemComponentImpl.java | 32 + .../hqdm/model/impl/BiologicalSystemImpl.java | 32 + .../gov/gchq/hqdm/model/impl/ClassImpl.java | 32 + .../model/impl/ClassOfAbstractObjectImpl.java | 32 + .../hqdm/model/impl/ClassOfActivityImpl.java | 32 + .../model/impl/ClassOfAgreeContractImpl.java | 32 + .../impl/ClassOfAgreementExecutionImpl.java | 32 + .../impl/ClassOfAgreementProcessImpl.java | 32 + .../model/impl/ClassOfAmountOfMoneyImpl.java | 32 + .../model/impl/ClassOfAssociationImpl.java | 32 + .../impl/ClassOfBiologicalObjectImpl.java | 32 + .../ClassOfBiologicalSystemComponentImpl.java | 32 + .../impl/ClassOfBiologicalSystemImpl.java | 32 + .../hqdm/model/impl/ClassOfClassImpl.java | 32 + ...lassOfClassOfSpatioTemporalExtentImpl.java | 32 + .../impl/ClassOfContractExecutionImpl.java | 32 + .../impl/ClassOfContractProcessImpl.java | 32 + .../hqdm/model/impl/ClassOfEventImpl.java | 32 + .../impl/ClassOfFunctionalObjectImpl.java | 32 + .../ClassOfFunctionalSystemComponentImpl.java | 32 + .../impl/ClassOfFunctionalSystemImpl.java | 32 + ...ClassOfInPlaceBiologicalComponentImpl.java | 32 + .../model/impl/ClassOfIndividualImpl.java | 32 + ...nstalledFunctionalSystemComponentImpl.java | 33 + .../impl/ClassOfInstalledObjectImpl.java | 32 + ...sOfIntentionallyConstructedObjectImpl.java | 33 + .../hqdm/model/impl/ClassOfOfferImpl.java | 32 + .../ClassOfOrdinaryBiologicalObjectImpl.java | 32 + .../ClassOfOrdinaryFunctionalObjectImpl.java | 32 + .../ClassOfOrdinaryPhysicalObjectImpl.java | 32 + .../ClassOfOrganizationComponentImpl.java | 32 + .../model/impl/ClassOfOrganizationImpl.java | 32 + .../model/impl/ClassOfParticipantImpl.java | 32 + .../hqdm/model/impl/ClassOfPartyImpl.java | 32 + .../model/impl/ClassOfPeriodOfTimeImpl.java | 32 + .../hqdm/model/impl/ClassOfPersonImpl.java | 32 + .../impl/ClassOfPersonInPositionImpl.java | 32 + .../model/impl/ClassOfPhysicalObjectImpl.java | 32 + .../impl/ClassOfPhysicalPropertyImpl.java | 32 + .../impl/ClassOfPhysicalQuantityImpl.java | 32 + .../model/impl/ClassOfPointInTimeImpl.java | 32 + .../hqdm/model/impl/ClassOfPositionImpl.java | 32 + .../model/impl/ClassOfPossibleWorldImpl.java | 32 + .../impl/ClassOfReachingAgreementImpl.java | 32 + .../model/impl/ClassOfRelationshipImpl.java | 32 + .../model/impl/ClassOfRepresentationImpl.java | 32 + .../impl/ClassOfSalesProductInstanceImpl.java | 32 + .../gchq/hqdm/model/impl/ClassOfSignImpl.java | 32 + ...lassOfSociallyConstructedActivityImpl.java | 32 + .../ClassOfSociallyConstructedObjectImpl.java | 32 + .../impl/ClassOfSpatioTemporalExtentImpl.java | 32 + .../hqdm/model/impl/ClassOfStateImpl.java | 32 + .../impl/ClassOfStateOfActivityImpl.java | 32 + .../impl/ClassOfStateOfAmountOfMoneyImpl.java | 32 + .../impl/ClassOfStateOfAssociationImpl.java | 32 + .../ClassOfStateOfBiologicalObjectImpl.java | 32 + ...fStateOfBiologicalSystemComponentImpl.java | 33 + .../ClassOfStateOfBiologicalSystemImpl.java | 32 + .../ClassOfStateOfFunctionalObjectImpl.java | 32 + ...fStateOfFunctionalSystemComponentImpl.java | 33 + .../ClassOfStateOfFunctionalSystemImpl.java | 32 + ...eOfIntentionallyConstructedObjectImpl.java | 33 + ...OfStateOfOrdinaryBiologicalObjectImpl.java | 33 + ...OfStateOfOrdinaryFunctionalObjectImpl.java | 33 + ...ssOfStateOfOrdinaryPhysicalObjectImpl.java | 33 + ...assOfStateOfOrganizationComponentImpl.java | 32 + .../impl/ClassOfStateOfOrganizationImpl.java | 32 + .../model/impl/ClassOfStateOfPartyImpl.java | 32 + .../model/impl/ClassOfStateOfPersonImpl.java | 32 + .../ClassOfStateOfPhysicalObjectImpl.java | 32 + .../impl/ClassOfStateOfPositionImpl.java | 32 + ...lassOfStateOfSalesProductInstanceImpl.java | 32 + .../model/impl/ClassOfStateOfSignImpl.java | 32 + ...tateOfSociallyConstructedActivityImpl.java | 33 + ...fStateOfSociallyConstructedObjectImpl.java | 33 + .../ClassOfStateOfSystemComponentImpl.java | 32 + .../model/impl/ClassOfStateOfSystemImpl.java | 32 + .../impl/ClassOfSystemComponentImpl.java | 32 + .../hqdm/model/impl/ClassOfSystemImpl.java | 32 + .../hqdm/model/impl/ClassificationImpl.java | 32 + .../gchq/hqdm/model/impl/CompositionImpl.java | 32 + .../model/impl/ContractExecutionImpl.java | 32 + .../hqdm/model/impl/ContractProcessImpl.java | 32 + .../gchq/hqdm/model/impl/CurrencyImpl.java | 32 + .../model/impl/DefinedRelationshipImpl.java | 32 + .../gchq/hqdm/model/impl/DefinitionImpl.java | 32 + .../gchq/hqdm/model/impl/DescriptionImpl.java | 32 + .../gchq/hqdm/model/impl/EmployeeImpl.java | 32 + .../gchq/hqdm/model/impl/EmployerImpl.java | 32 + .../gchq/hqdm/model/impl/EmploymentImpl.java | 32 + .../model/impl/EndingOfOwnershipImpl.java | 32 + .../hqdm/model/impl/EnumeratedClassImpl.java | 32 + .../gov/gchq/hqdm/model/impl/EventImpl.java | 32 + .../impl/ExchangeOfGoodsAndMoneyImpl.java | 32 + .../gchq/hqdm/model/impl/FunctionImpl.java | 32 + .../hqdm/model/impl/FunctionalObjectImpl.java | 32 + .../impl/FunctionalSystemComponentImpl.java | 32 + .../hqdm/model/impl/FunctionalSystemImpl.java | 32 + .../hqdm/model/impl/IdentificationImpl.java | 32 + .../IdentificationOfPhysicalQuantityImpl.java | 32 + .../impl/InPlaceBiologicalComponentImpl.java | 32 + .../gchq/hqdm/model/impl/IndividualImpl.java | 32 + ...nstalledFunctionalSystemComponentImpl.java | 32 + .../hqdm/model/impl/InstalledObjectImpl.java | 32 + .../IntentionallyConstructedObjectImpl.java | 32 + .../hqdm/model/impl/KindOfActivityImpl.java | 32 + .../model/impl/KindOfAssociationImpl.java | 32 + .../impl/KindOfBiologicalObjectImpl.java | 32 + .../KindOfBiologicalSystemComponentImpl.java | 32 + .../impl/KindOfBiologicalSystemImpl.java | 32 + .../impl/KindOfFunctionalObjectImpl.java | 32 + .../KindOfFunctionalSystemComponentImpl.java | 32 + .../impl/KindOfFunctionalSystemImpl.java | 32 + .../hqdm/model/impl/KindOfIndividualImpl.java | 32 + ...dOfIntentionallyConstructedObjectImpl.java | 33 + .../KindOfOrdinaryBiologicalObjectImpl.java | 32 + .../KindOfOrdinaryFunctionalObjectImpl.java | 32 + .../KindOfOrdinaryPhysicalObjectImpl.java | 32 + .../impl/KindOfOrganizationComponentImpl.java | 32 + .../model/impl/KindOfOrganizationImpl.java | 32 + .../gchq/hqdm/model/impl/KindOfPartyImpl.java | 32 + .../hqdm/model/impl/KindOfPersonImpl.java | 32 + .../model/impl/KindOfPhysicalObjectImpl.java | 32 + .../impl/KindOfPhysicalPropertyImpl.java | 32 + .../impl/KindOfPhysicalQuantityImpl.java | 32 + .../hqdm/model/impl/KindOfPositionImpl.java | 32 + ...KindOfRelationshipWithRestrictionImpl.java | 32 + .../KindOfRelationshipWithSignatureImpl.java | 32 + .../KindOfSociallyConstructedObjectImpl.java | 32 + .../model/impl/KindOfSystemComponentImpl.java | 32 + .../hqdm/model/impl/KindOfSystemImpl.java | 32 + .../model/impl/LanguageCommunityImpl.java | 32 + .../gchq/hqdm/model/impl/MoneyAssetImpl.java | 32 + .../impl/OfferAndAcceptanceForGoodsImpl.java | 32 + .../hqdm/model/impl/OfferForGoodsImpl.java | 32 + .../gov/gchq/hqdm/model/impl/OfferImpl.java | 32 + .../gchq/hqdm/model/impl/OfferingImpl.java | 32 + .../impl/OrdinaryBiologicalObjectImpl.java | 32 + .../impl/OrdinaryFunctionalObjectImpl.java | 32 + .../impl/OrdinaryPhysicalObjectImpl.java | 32 + .../model/impl/OrganizationComponentImpl.java | 32 + .../hqdm/model/impl/OrganizationImpl.java | 32 + .../gov/gchq/hqdm/model/impl/OwnerImpl.java | 32 + .../gchq/hqdm/model/impl/OwnershipImpl.java | 32 + .../gchq/hqdm/model/impl/ParticipantImpl.java | 32 + ...articipantInActivityOrAssociationImpl.java | 32 + .../gov/gchq/hqdm/model/impl/PartyImpl.java | 32 + .../gov/gchq/hqdm/model/impl/PatternImpl.java | 32 + .../hqdm/model/impl/PeriodOfTimeImpl.java | 32 + .../gov/gchq/hqdm/model/impl/PersonImpl.java | 32 + .../hqdm/model/impl/PersonInPositionImpl.java | 32 + .../hqdm/model/impl/PhysicalObjectImpl.java | 32 + .../hqdm/model/impl/PhysicalPropertyImpl.java | 32 + .../model/impl/PhysicalPropertyRangeImpl.java | 32 + .../hqdm/model/impl/PhysicalQuantityImpl.java | 32 + .../model/impl/PhysicalQuantityRangeImpl.java | 32 + .../uk/gov/gchq/hqdm/model/impl/PlanImpl.java | 32 + .../gchq/hqdm/model/impl/PointInTimeImpl.java | 32 + .../gchq/hqdm/model/impl/PositionImpl.java | 32 + .../hqdm/model/impl/PossibleWorldImpl.java | 32 + .../gov/gchq/hqdm/model/impl/PriceImpl.java | 32 + .../hqdm/model/impl/ProductBrandImpl.java | 32 + .../hqdm/model/impl/ProductOfferingImpl.java | 32 + .../model/impl/ReachingAgreementImpl.java | 32 + .../RecognizingLanguageCommunityImpl.java | 32 + .../hqdm/model/impl/RelationshipImpl.java | 32 + .../impl/RepresentationByPatternImpl.java | 32 + .../model/impl/RepresentationBySignImpl.java | 32 + .../gchq/hqdm/model/impl/RequirementImpl.java | 32 + .../impl/RequirementSpecificationImpl.java | 32 + .../uk/gov/gchq/hqdm/model/impl/RoleImpl.java | 32 + .../gchq/hqdm/model/impl/SaleOfGoodsImpl.java | 32 + .../hqdm/model/impl/SalesProductImpl.java | 32 + .../model/impl/SalesProductInstanceImpl.java | 32 + .../model/impl/SalesProductVersionImpl.java | 32 + .../gov/gchq/hqdm/model/impl/ScaleImpl.java | 32 + .../uk/gov/gchq/hqdm/model/impl/SignImpl.java | 32 + .../impl/SociallyConstructedActivityImpl.java | 32 + .../impl/SociallyConstructedObjectImpl.java | 32 + .../model/impl/SpatioTemporalExtentImpl.java | 32 + .../hqdm/model/impl/SpecializationImpl.java | 32 + .../gov/gchq/hqdm/model/impl/StateImpl.java | 32 + .../hqdm/model/impl/StateOfActivityImpl.java | 32 + .../model/impl/StateOfAmountOfMoneyImpl.java | 32 + .../model/impl/StateOfAssociationImpl.java | 32 + .../impl/StateOfBiologicalObjectImpl.java | 32 + .../StateOfBiologicalSystemComponentImpl.java | 32 + .../impl/StateOfBiologicalSystemImpl.java | 32 + .../impl/StateOfFunctionalObjectImpl.java | 32 + .../StateOfFunctionalSystemComponentImpl.java | 32 + .../impl/StateOfFunctionalSystemImpl.java | 32 + ...eOfIntentionallyConstructedObjectImpl.java | 33 + .../impl/StateOfLanguageCommunityImpl.java | 32 + .../StateOfOrdinaryBiologicalObjectImpl.java | 32 + .../StateOfOrdinaryFunctionalObjectImpl.java | 32 + .../StateOfOrdinaryPhysicalObjectImpl.java | 32 + .../StateOfOrganizationComponentImpl.java | 32 + .../model/impl/StateOfOrganizationImpl.java | 32 + .../hqdm/model/impl/StateOfPartyImpl.java | 32 + .../hqdm/model/impl/StateOfPersonImpl.java | 32 + .../model/impl/StateOfPhysicalObjectImpl.java | 32 + .../hqdm/model/impl/StateOfPositionImpl.java | 32 + .../impl/StateOfSalesProductInstanceImpl.java | 32 + .../gchq/hqdm/model/impl/StateOfSignImpl.java | 32 + ...tateOfSociallyConstructedActivityImpl.java | 32 + .../StateOfSociallyConstructedObjectImpl.java | 32 + .../impl/StateOfSystemComponentImpl.java | 32 + .../hqdm/model/impl/StateOfSystemImpl.java | 32 + .../hqdm/model/impl/SystemComponentImpl.java | 32 + .../gov/gchq/hqdm/model/impl/SystemImpl.java | 32 + .../model/impl/TemporalCompositionImpl.java | 32 + .../gov/gchq/hqdm/model/impl/ThingImpl.java | 32 + .../model/impl/TransferOfOwnershipImpl.java | 32 + .../impl/TransferOfOwnershipOfMoneyImpl.java | 32 + .../gchq/hqdm/model/impl/TransfereeImpl.java | 32 + .../gchq/hqdm/model/impl/TransferorImpl.java | 32 + .../hqdm/model/impl/UnitOfMeasureImpl.java | 32 + .../gchq/hqdm/model/impl/package-info.java | 18 + .../uk/gov/gchq/hqdm/model/package-info.java | 18 + .../uk/gov/gchq/hqdm/pojo/HqdmObject.java | 233 ++ .../main/java/uk/gov/gchq/hqdm/pojo/Top.java | 136 ++ .../uk/gov/gchq/hqdm/pojo/package-info.java | 18 + .../gov/gchq/hqdm/services/ClassServices.java | 1070 +++++++++ .../gchq/hqdm/services/DynamicObjects.java | 101 + .../hqdm/services/RelationshipServices.java | 141 ++ .../SpatioTemporalExtentServices.java | 1174 +++++++++ .../gov/gchq/hqdm/services/package-info.java | 18 + .../uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java | 80 + .../hqdm/services/DynamicObjectsTest.java | 74 + pom.xml | 8 +- 504 files changed, 19828 insertions(+), 149 deletions(-) create mode 100644 hqdm-rdf/pom.xml create mode 100644 hqdm-rdf/src/main/java/module-info.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/IriException.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/package-info.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java create mode 100644 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java create mode 100644 hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java create mode 100644 hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java create mode 100644 hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java create mode 100644 hqdm/pom.xml create mode 100644 hqdm/src/main/java/module-info.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java create mode 100755 hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java create mode 100644 hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java create mode 100755 hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java create mode 100755 hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java diff --git a/.gitignore b/.gitignore index 59b49979..2718b434 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ target/ bin/ tdb/ +out *.code-workspace *.iml *.ttl @@ -37,6 +38,7 @@ tdb/ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +# Vim files *.swp tags .vim/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 352a39ef..5d1babfe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,8 @@ Where possible a pull request should correlate to a single GitHub issue. An issu Please ensure your coding style is consistent with rest of the project and follows our coding standards and best practices. +> A `java-formatter.xml` configuration file is provided in the root of the project. Please include this in for editor settings when developing Magma Core. + Checkstyle is run as part of `mvn install` so you should ensure your code is compliant with these rules. The project will not build if there are checkstyle errors. In particular please ensure you have adhered to the following: diff --git a/README.md b/README.md index 3ef73afb..79f6bcea 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,27 @@ This code release is a contribution to support the adoption of data models that ## Getting Started -An introduction to Magma Core and the [HQDM Java object library](https://github.com/gchq/HQDM) is provided in the [Magma Core Wiki](https://github.com/gchq/MagmaCore/wiki). +An introduction to Magma Core is provided in the [Magma Core Wiki](https://github.com/gchq/MagmaCore/wiki). ### Prerequisites - [Java 15](https://openjdk.java.net/projects/jdk/15/) - Core language - [Maven](https://maven.apache.org/) - Dependency management +### Inclusion in other projects + +Magma Core can be incorporated into other maven projects using the following dependency: + +```xml + + uk.gov.gchq.magmacore + core + 1.0 + +``` + +_Magma Core is not currently hosted on Maven Central, so a local install of this repository will be required._ + ## Contributing We welcome contributions to the project. Detailed information on our ways of working can be found [here](CONTRIBUTING.md). diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index df82a633..0c9061e4 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -2,8 +2,21 @@ + + + + - + + + + + + + + + + diff --git a/core/pom.xml b/core/pom.xml index 3527dc3a..e8200b1e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -20,11 +20,11 @@ - uk.gov.gchq.hqdm - hqdm-core + uk.gov.gchq.magma-core + hqdm - uk.gov.gchq.hqdm + uk.gov.gchq.magma-core hqdm-rdf diff --git a/core/src/main/java/module-info.java b/core/src/main/java/module-info.java index 20477c3f..517cf0ff 100644 --- a/core/src/main/java/module-info.java +++ b/core/src/main/java/module-info.java @@ -25,7 +25,7 @@ requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; - requires uk.gov.gchq.hqdm.core; + requires uk.gov.gchq.hqdm; requires transitive uk.gov.gchq.hqdm.rdf; exports uk.gov.gchq.magmacore.service; diff --git a/examples/pom.xml b/examples/pom.xml index 43e2c39b..5ea47717 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -24,11 +24,11 @@ core - uk.gov.gchq.hqdm - hqdm-core + uk.gov.gchq.magma-core + hqdm - uk.gov.gchq.hqdm + uk.gov.gchq.magma-core hqdm-rdf diff --git a/examples/src/main/java/module-info.java b/examples/src/main/java/module-info.java index 2940067f..a7f79f67 100644 --- a/examples/src/main/java/module-info.java +++ b/examples/src/main/java/module-info.java @@ -17,7 +17,7 @@ * server. */ module uk.gov.gchq.magmacore.examples { - requires uk.gov.gchq.hqdm.core; + requires uk.gov.gchq.hqdm; requires uk.gov.gchq.hqdm.rdf; requires uk.gov.gchq.magmacore; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java index a89c0f43..b6efb18b 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java @@ -37,140 +37,140 @@ */ public class ExampleSigns { - /** - * A function that populates a database. - * - * @param mcService A {@link MagmaCoreService}. - * @return {@link DbTransformation}. - */ - public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - - // Apply the transformation to the database. There are dependencies between these change sets - // since they both depend on RDL being present, but also the occupancies depend on the - // individuals being present, so each change set needs to be applied before the next one - // can be created. - final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); - - // Apply the DbChangeSet. - rdlChangeSet.apply(mcService); - - // mcService now contains the RDL needed for the next DbChangeSet - final DbChangeSet signsChangeSet = addSigns(mcService); - - // Apply the DbChangeSet. - signsChangeSet.apply(mcService); - // - // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. - return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); - } - - /** - * Create a {@link DbChangeSet} to add the representation by sign. - * - * @param mcService {@link MagmaCoreService}. - * @return {@link DbChangeSet}. - */ - private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of( - "URL Pattern", - "Description By URL", - "English Speakers")); - - // Find the required classes, kinds, and roles. - final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); - final Description descriptionByUrl = (Description) entities.get("Description By URL"); - final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities - .get("English Speakers"); - final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); - - // Create IRIs for the new entities. - final IRI possibleWorld = new IRI(USER_BASE, uid()); - final IRI person = new IRI(USER_BASE, uid()); - final IRI wikipediaSign = new IRI(USER_BASE, uid()); - final IRI britannica = new IRI(USER_BASE, uid()); - final IRI biography = new IRI(USER_BASE, uid()); - final IRI stanford = new IRI(USER_BASE, uid()); - final IRI nationalGeographic = new IRI(USER_BASE, uid()); - final IRI representationBySign = new IRI(USER_BASE, uid()); - final IRI startEvent = new IRI(USER_BASE, uid()); - final IRI endEvent = new IRI(USER_BASE, uid()); - - // Create the set of DbCreateOperations. - final List creates = List.of( - - // Create the possible world that we are working in. - new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), - new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), - - // Create the thing represented. - new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - // Create the signs that represent the thing. - new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(wikipediaSign, HQDM.VALUE_, - "https://en.wikipedia.org/wiki/Socrates"), - new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(britannica, HQDM.VALUE_, - "https://www.britannica.com/biography/Socrates"), - new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(biography, HQDM.VALUE_, - "https://www.biography.com/scholar/socrates"), - new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(stanford, HQDM.VALUE_, - "https://plato.stanford.edu/entries/socrates/"), - new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(nationalGeographic, HQDM.VALUE_, - "https://www.nationalgeographic.com/culture/article/socrates"), - new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - // Create the representation by signs. - new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, - HQDM.REPRESENTATION_BY_SIGN.getIri()), - new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), - new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), - new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - // Add beginning, ending, etc. from `association`. - new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), - - new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), - - new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), - new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), - - // Add the participants. - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), - new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, - representationBySign.getIri())); - - // Create a change set and return it. - return new DbChangeSet(List.of(), creates); - } + /** + * A function that populates a database. + * + * @param mcService A {@link MagmaCoreService}. + * @return {@link DbTransformation}. + */ + public static DbTransformation populateExampleData(final MagmaCoreService mcService) { + + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one + // can be created. + final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); + + // Apply the DbChangeSet. + rdlChangeSet.apply(mcService); + + // mcService now contains the RDL needed for the next DbChangeSet + final DbChangeSet signsChangeSet = addSigns(mcService); + + // Apply the DbChangeSet. + signsChangeSet.apply(mcService); + // + // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. + return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); + } + + /** + * Create a {@link DbChangeSet} to add the representation by sign. + * + * @param mcService {@link MagmaCoreService}. + * @return {@link DbChangeSet}. + */ + private static DbChangeSet addSigns(final MagmaCoreService mcService) { + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "URL Pattern", + "Description By URL", + "English Speakers")); + + // Find the required classes, kinds, and roles. + final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); + final Description descriptionByUrl = (Description) entities.get("Description By URL"); + final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities + .get("English Speakers"); + final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); + + // Create IRIs for the new entities. + final IRI possibleWorld = new IRI(USER_BASE, uid()); + final IRI person = new IRI(USER_BASE, uid()); + final IRI wikipediaSign = new IRI(USER_BASE, uid()); + final IRI britannica = new IRI(USER_BASE, uid()); + final IRI biography = new IRI(USER_BASE, uid()); + final IRI stanford = new IRI(USER_BASE, uid()); + final IRI nationalGeographic = new IRI(USER_BASE, uid()); + final IRI representationBySign = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); + + // Create the set of DbCreateOperations. + final List creates = List.of( + + // Create the possible world that we are working in. + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), + + // Create the thing represented. + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + // Create the signs that represent the thing. + new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(wikipediaSign, HQDM.VALUE_, + "https://en.wikipedia.org/wiki/Socrates"), + new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(britannica, HQDM.VALUE_, + "https://www.britannica.com/biography/Socrates"), + new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(biography, HQDM.VALUE_, + "https://www.biography.com/scholar/socrates"), + new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(stanford, HQDM.VALUE_, + "https://plato.stanford.edu/entries/socrates/"), + new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(nationalGeographic, HQDM.VALUE_, + "https://www.nationalgeographic.com/culture/article/socrates"), + new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Create the representation by signs. + new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, + HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), + new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), + new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Add beginning, ending, etc. from `association`. + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), + + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), + + new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), + new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), + + // Add the participants. + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, + representationBySign.getIri())); + + // Create a change set and return it. + return new DbChangeSet(List.of(), creates); + } } diff --git a/hqdm-rdf/pom.xml b/hqdm-rdf/pom.xml new file mode 100644 index 00000000..2dc30be5 --- /dev/null +++ b/hqdm-rdf/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 1.1-SNAPSHOT + + + uk.gov.gchq.magma-core + hqdm-rdf + 1.0-SNAPSHOT + + hqdm-rdf + + + UTF-8 + 15 + + + + + uk.gov.gchq.magma-core + hqdm + + + junit + junit + + + + diff --git a/hqdm-rdf/src/main/java/module-info.java b/hqdm-rdf/src/main/java/module-info.java new file mode 100644 index 00000000..6bb1d8a5 --- /dev/null +++ b/hqdm-rdf/src/main/java/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes for constructing HQDM objects as RDF triples. + */ +module uk.gov.gchq.hqdm.rdf { + requires transitive uk.gov.gchq.hqdm; + + exports uk.gov.gchq.hqdm.rdf.exception; + exports uk.gov.gchq.hqdm.rdf.iri; + exports uk.gov.gchq.hqdm.rdf.util; + exports uk.gov.gchq.hqdm.rdf; +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java new file mode 100755 index 00000000..823bf329 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java @@ -0,0 +1,836 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf; + +import static uk.gov.gchq.hqdm.rdf.iri.RDFS.RDF_TYPE; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import uk.gov.gchq.hqdm.exception.HqdmException; +import uk.gov.gchq.hqdm.model.*; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.util.Pair; +import uk.gov.gchq.hqdm.services.ClassServices; +import uk.gov.gchq.hqdm.services.DynamicObjects; +import uk.gov.gchq.hqdm.services.RelationshipServices; +import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; + +/** + * Object factory for building HQDM Java objects from RDF triples. + */ +public final class HqdmObjectFactory { + + private HqdmObjectFactory() { + } + + /** + * Create a new HQDM object from a HQDM entity type and IRI. + * + * @param {@link Thing} or any of its subclasses. + * @param hqdmType IRI definition of HQDM object type defined in + * {@link uk.gov.gchq.hqdm.rdf.iri.HQDM}. + * @param iri IRI of the object. + * @return The constructed HQDM object. + * @throws HqdmException If the HqdmObject could not be built. + */ + public static T create(final HqdmIri hqdmType, final IRI iri) throws HqdmException { + return (T) mapToThing(hqdmType.getResource(), iri); + } + + /** + * Create a HqdmObject from an IRI and list of predicates. + * + * @param iri IRI of the object. + * @param pairs Object attributes. + * @return The constructed HQDM object. + * @throws HqdmException If the HqdmObject could not be built. + */ + public static Thing create(final String iri, final List> pairs) throws HqdmException { + try { + final List iris = new ArrayList<>(); + for (final Pair pair : pairs.stream() + .filter(pair -> pair.getLeft().equals(RDF_TYPE.toString())) + .filter(pair -> pair.getRight().startsWith(HQDM.HQDM.getNamespace())) + .collect(Collectors.toList())) { + iris.add(new IRI(pair.getRight())); + } + + if (!iris.isEmpty()) { + final Thing result; + + if (iris.size() == 1) { + result = mapToThing(iris.get(0).getResource(), new IRI(iri)); + } else { + result = DynamicObjects.create(iri, Thing.class, irisToClasses(iris)); + } + + for (final Pair pair : pairs) { + if (pair.getRight().startsWith("http")) { + result.addValue(pair.getLeft(), pair.getRight()); + } else { + result.addStringValue(pair.getLeft(), pair.getRight()); + } + } + return result; + } else { + throw new HqdmException("No type information for: " + iri); + } + } catch (final Exception ex) { + throw new HqdmException(ex); + } + } + + /** + * Convert a list of IRI Strings to class names. + * + * @param iris List of {@link IRI}. + * @return Array of Class. + */ + private static java.lang.Class[] irisToClasses(final List iris) { + final List> classes = new ArrayList<>(3); + + // It will be a small list so just iterate it. + for (final IRI iri : iris) { + classes.add(iriToClassMap.getOrDefault(iri, Thing.class)); + } + + return (java.lang.Class[]) classes.toArray(new java.lang.Class[] {}); + } + + // A statically initialised Map of IRIs to HQDM classes. + private static final Map> iriToClassMap = new HashMap<>(250); + + static { + iriToClassMap.put(HQDM.ABSTRACT_OBJECT, AbstractObject.class); + iriToClassMap.put(HQDM.ACCEPTANCE_OF_OFFER, AcceptanceOfOffer.class); + iriToClassMap.put(HQDM.ACCEPTANCE_OF_OFFER_FOR_GOODS, AcceptanceOfOfferForGoods.class); + iriToClassMap.put(HQDM.ACTIVITY, Activity.class); + iriToClassMap.put(HQDM.AGGREGATION, Aggregation.class); + iriToClassMap.put(HQDM.AGREE_CONTRACT, AgreeContract.class); + iriToClassMap.put(HQDM.AGREEMENT_EXECUTION, AgreementExecution.class); + iriToClassMap.put(HQDM.AGREEMENT_PROCESS, AgreementProcess.class); + iriToClassMap.put(HQDM.AMOUNT_OF_MONEY, AmountOfMoney.class); + iriToClassMap.put(HQDM.ASSET, Asset.class); + iriToClassMap.put(HQDM.ASSOCIATION, Association.class); + iriToClassMap.put(HQDM.BEGINNING_OF_OWNERSHIP, BeginningOfOwnership.class); + iriToClassMap.put(HQDM.BIOLOGICAL_OBJECT, BiologicalObject.class); + iriToClassMap.put(HQDM.BIOLOGICAL_SYSTEM, BiologicalSystem.class); + iriToClassMap.put(HQDM.BIOLOGICAL_SYSTEM_COMPONENT, BiologicalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS, uk.gov.gchq.hqdm.model.Class.class); + iriToClassMap.put(HQDM.CLASSIFICATION, Classification.class); + iriToClassMap.put(HQDM.CLASS_OF_ABSTRACT_OBJECT, ClassOfAbstractObject.class); + iriToClassMap.put(HQDM.CLASS_OF_ACTIVITY, ClassOfActivity.class); + iriToClassMap.put(HQDM.CLASS_OF_AGREE_CONTRACT, ClassOfAgreeContract.class); + iriToClassMap.put(HQDM.CLASS_OF_AGREEMENT_EXECUTION, ClassOfAgreementExecution.class); + iriToClassMap.put(HQDM.CLASS_OF_AGREEMENT_PROCESS, ClassOfAgreementProcess.class); + iriToClassMap.put(HQDM.CLASS_OF_AMOUNT_OF_MONEY, ClassOfAmountOfMoney.class); + iriToClassMap.put(HQDM.CLASS_OF_ASSOCIATION, ClassOfAssociation.class); + iriToClassMap.put(HQDM.CLASS_OF_BIOLOGICAL_OBJECT, ClassOfBiologicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_BIOLOGICAL_SYSTEM, ClassOfBiologicalSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_BIOLOGICAL_SYSTEM_COMPONENT, ClassOfBiologicalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_CLASS, ClassOfClass.class); + iriToClassMap.put(HQDM.CLASS_OF_CLASS_OF_SPATIO_TEMPORAL_EXTENT, ClassOfClassOfSpatioTemporalExtent.class); + iriToClassMap.put(HQDM.CLASS_OF_CONTRACT_EXECUTION, ClassOfContractExecution.class); + iriToClassMap.put(HQDM.CLASS_OF_CONTRACT_PROCESS, ClassOfContractProcess.class); + iriToClassMap.put(HQDM.CLASS_OF_EVENT, ClassOfEvent.class); + iriToClassMap.put(HQDM.CLASS_OF_FUNCTIONAL_OBJECT, ClassOfFunctionalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_FUNCTIONAL_SYSTEM, ClassOfFunctionalSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_FUNCTIONAL_SYSTEM_COMPONENT, ClassOfFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_INDIVIDUAL, ClassOfIndividual.class); + iriToClassMap.put(HQDM.CLASS_OF_IN_PLACE_BIOLOGICAL_COMPONENT, ClassOfInPlaceBiologicalComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT, + ClassOfInstalledFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_INSTALLED_OBJECT, ClassOfInstalledObject.class); + iriToClassMap.put(HQDM.CLASS_OF_INTENTIONALLY_CONSTRUCTED_OBJECT, ClassOfIntentionallyConstructedObject.class); + iriToClassMap.put(HQDM.CLASS_OF_OFFER, ClassOfOffer.class); + iriToClassMap.put(HQDM.CLASS_OF_ORDINARY_BIOLOGICAL_OBJECT, ClassOfOrdinaryBiologicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_ORDINARY_FUNCTIONAL_OBJECT, ClassOfOrdinaryFunctionalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_ORDINARY_PHYSICAL_OBJECT, ClassOfOrdinaryPhysicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_ORGANIZATION, ClassOfOrganization.class); + iriToClassMap.put(HQDM.CLASS_OF_ORGANIZATION_COMPONENT, ClassOfOrganizationComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_PARTICIPANT, ClassOfParticipant.class); + iriToClassMap.put(HQDM.CLASS_OF_PARTY, ClassOfParty.class); + iriToClassMap.put(HQDM.CLASS_OF_PERIOD_OF_TIME, ClassOfPeriodOfTime.class); + iriToClassMap.put(HQDM.CLASS_OF_PERSON, ClassOfPerson.class); + iriToClassMap.put(HQDM.CLASS_OF_PERSON_IN_POSITION, ClassOfPersonInPosition.class); + iriToClassMap.put(HQDM.CLASS_OF_PHYSICAL_OBJECT, ClassOfPhysicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_PHYSICAL_PROPERTY, ClassOfPhysicalProperty.class); + iriToClassMap.put(HQDM.CLASS_OF_PHYSICAL_QUANTITY, ClassOfPhysicalQuantity.class); + iriToClassMap.put(HQDM.CLASS_OF_POINT_IN_TIME, ClassOfPointInTime.class); + iriToClassMap.put(HQDM.CLASS_OF_POSITION, ClassOfPosition.class); + iriToClassMap.put(HQDM.CLASS_OF_POSSIBLE_WORLD, ClassOfPossibleWorld.class); + iriToClassMap.put(HQDM.CLASS_OF_REACHING_AGREEMENT, ClassOfReachingAgreement.class); + iriToClassMap.put(HQDM.CLASS_OF_RELATIONSHIP, ClassOfRelationship.class); + iriToClassMap.put(HQDM.CLASS_OF_REPRESENTATION, ClassOfRepresentation.class); + iriToClassMap.put(HQDM.CLASS_OF_SALES_PRODUCT_INSTANCE, ClassOfSalesProductInstance.class); + iriToClassMap.put(HQDM.CLASS_OF_SIGN, ClassOfSign.class); + iriToClassMap.put(HQDM.CLASS_OF_SOCIALLY_CONSTRUCTED_ACTIVITY, ClassOfSociallyConstructedActivity.class); + iriToClassMap.put(HQDM.CLASS_OF_SOCIALLY_CONSTRUCTED_OBJECT, ClassOfSociallyConstructedObject.class); + iriToClassMap.put(HQDM.CLASS_OF_SPATIO_TEMPORAL_EXTENT, ClassOfSpatioTemporalExtent.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE, ClassOfState.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ACTIVITY, ClassOfStateOfActivity.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_AMOUNT_OF_MONEY, ClassOfStateOfAmountOfMoney.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ASSOCIATION, ClassOfStateOfAssociation.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_BIOLOGICAL_OBJECT, ClassOfStateOfBiologicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM, ClassOfStateOfBiologicalSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT, + ClassOfStateOfBiologicalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_OBJECT, ClassOfStateOfFunctionalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM, ClassOfStateOfFunctionalSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT, + ClassOfStateOfFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT, + ClassOfStateOfIntentionallyConstructedObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ORDINARY_BIOLOGICAL_OBJECT, + ClassOfStateOfOrdinaryBiologicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ORDINARY_FUNCTIONAL_OBJECT, + ClassOfStateOfOrdinaryFunctionalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ORDINARY_PHYSICAL_OBJECT, ClassOfStateOfOrdinaryPhysicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ORGANIZATION, ClassOfStateOfOrganization.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_ORGANIZATION_COMPONENT, ClassOfStateOfOrganizationComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_PARTY, ClassOfStateOfParty.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_PERSON, ClassOfStateOfPerson.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_PHYSICAL_OBJECT, ClassOfStateOfPhysicalObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_POSITION, ClassOfStateOfPosition.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SALES_PRODUCT_INSTANCE, ClassOfStateOfSalesProductInstance.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SIGN, ClassOfStateOfSign.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY, + ClassOfStateOfSociallyConstructedActivity.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT, + ClassOfStateOfSociallyConstructedObject.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SYSTEM, ClassOfStateOfSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_STATE_OF_SYSTEM_COMPONENT, ClassOfStateOfSystemComponent.class); + iriToClassMap.put(HQDM.CLASS_OF_SYSTEM, ClassOfSystem.class); + iriToClassMap.put(HQDM.CLASS_OF_SYSTEM_COMPONENT, ClassOfSystemComponent.class); + iriToClassMap.put(HQDM.COMPOSITION, Composition.class); + iriToClassMap.put(HQDM.CONTRACT_EXECUTION, ContractExecution.class); + iriToClassMap.put(HQDM.CONTRACT_PROCESS, ContractProcess.class); + iriToClassMap.put(HQDM.CURRENCY, Currency.class); + iriToClassMap.put(HQDM.DEFINED_RELATIONSHIP, DefinedRelationship.class); + iriToClassMap.put(HQDM.DEFINITION, Definition.class); + iriToClassMap.put(HQDM.DESCRIPTION, Description.class); + iriToClassMap.put(HQDM.EMPLOYEE, Employee.class); + iriToClassMap.put(HQDM.EMPLOYER, Employer.class); + iriToClassMap.put(HQDM.EMPLOYMENT, Employment.class); + iriToClassMap.put(HQDM.ENDING_OF_OWNERSHIP, EndingOfOwnership.class); + iriToClassMap.put(HQDM.ENUMERATED_CLASS, EnumeratedClass.class); + iriToClassMap.put(HQDM.EVENT, Event.class); + iriToClassMap.put(HQDM.EXCHANGE_OF_GOODS_AND_MONEY, ExchangeOfGoodsAndMoney.class); + iriToClassMap.put(HQDM.FUNCTION_, Function_.class); + iriToClassMap.put(HQDM.FUNCTIONAL_OBJECT, FunctionalObject.class); + iriToClassMap.put(HQDM.FUNCTIONAL_SYSTEM, FunctionalSystem.class); + iriToClassMap.put(HQDM.FUNCTIONAL_SYSTEM_COMPONENT, FunctionalSystemComponent.class); + iriToClassMap.put(HQDM.IDENTIFICATION, Identification.class); + iriToClassMap.put(HQDM.IDENTIFICATION_OF_PHYSICAL_QUANTITY, IdentificationOfPhysicalQuantity.class); + iriToClassMap.put(HQDM.INDIVIDUAL, Individual.class); + iriToClassMap.put(HQDM.IN_PLACE_BIOLOGICAL_COMPONENT, InPlaceBiologicalComponent.class); + iriToClassMap.put(HQDM.INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT, InstalledFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.INSTALLED_OBJECT, InstalledObject.class); + iriToClassMap.put(HQDM.INTENTIONALLY_CONSTRUCTED_OBJECT, IntentionallyConstructedObject.class); + iriToClassMap.put(HQDM.KIND_OF_ACTIVITY, KindOfActivity.class); + iriToClassMap.put(HQDM.KIND_OF_ASSOCIATION, KindOfAssociation.class); + iriToClassMap.put(HQDM.KIND_OF_BIOLOGICAL_OBJECT, KindOfBiologicalObject.class); + iriToClassMap.put(HQDM.KIND_OF_BIOLOGICAL_SYSTEM, KindOfBiologicalSystem.class); + iriToClassMap.put(HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT, KindOfBiologicalSystemComponent.class); + iriToClassMap.put(HQDM.KIND_OF_FUNCTIONAL_OBJECT, KindOfFunctionalObject.class); + iriToClassMap.put(HQDM.KIND_OF_FUNCTIONAL_SYSTEM, KindOfFunctionalSystem.class); + iriToClassMap.put(HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT, KindOfFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.KIND_OF_INDIVIDUAL, KindOfIndividual.class); + iriToClassMap.put(HQDM.KIND_OF_INTENTIONALLY_CONSTRUCTED_OBJECT, KindOfIntentionallyConstructedObject.class); + iriToClassMap.put(HQDM.KIND_OF_ORDINARY_BIOLOGICAL_OBJECT, KindOfOrdinaryBiologicalObject.class); + iriToClassMap.put(HQDM.KIND_OF_ORDINARY_FUNCTIONAL_OBJECT, KindOfOrdinaryFunctionalObject.class); + iriToClassMap.put(HQDM.KIND_OF_ORDINARY_PHYSICAL_OBJECT, KindOfOrdinaryPhysicalObject.class); + iriToClassMap.put(HQDM.KIND_OF_ORGANIZATION, KindOfOrganization.class); + iriToClassMap.put(HQDM.KIND_OF_ORGANIZATION_COMPONENT, KindOfOrganizationComponent.class); + iriToClassMap.put(HQDM.KIND_OF_PARTY, KindOfParty.class); + iriToClassMap.put(HQDM.KIND_OF_PERSON, KindOfPerson.class); + iriToClassMap.put(HQDM.KIND_OF_PHYSICAL_OBJECT, KindOfPhysicalObject.class); + iriToClassMap.put(HQDM.KIND_OF_PHYSICAL_PROPERTY, KindOfPhysicalProperty.class); + iriToClassMap.put(HQDM.KIND_OF_PHYSICAL_QUANTITY, KindOfPhysicalQuantity.class); + iriToClassMap.put(HQDM.KIND_OF_POSITION, KindOfPosition.class); + iriToClassMap.put(HQDM.KIND_OF_RELATIONSHIP_WITH_RESTRICTION, KindOfRelationshipWithRestriction.class); + iriToClassMap.put(HQDM.KIND_OF_RELATIONSHIP_WITH_SIGNATURE, KindOfRelationshipWithSignature.class); + iriToClassMap.put(HQDM.KIND_OF_SOCIALLY_CONSTRUCTED_OBJECT, KindOfSociallyConstructedObject.class); + iriToClassMap.put(HQDM.KIND_OF_SYSTEM, KindOfSystem.class); + iriToClassMap.put(HQDM.KIND_OF_SYSTEM_COMPONENT, KindOfSystemComponent.class); + iriToClassMap.put(HQDM.LANGUAGE_COMMUNITY, LanguageCommunity.class); + iriToClassMap.put(HQDM.MONEY_ASSET, MoneyAsset.class); + iriToClassMap.put(HQDM.OFFER, Offer.class); + iriToClassMap.put(HQDM.OFFER_AND_ACCEPTANCE_FOR_GOODS, OfferAndAcceptanceForGoods.class); + iriToClassMap.put(HQDM.OFFER_FOR_GOODS, OfferForGoods.class); + iriToClassMap.put(HQDM.OFFERING, Offering.class); + iriToClassMap.put(HQDM.ORDINARY_BIOLOGICAL_OBJECT, OrdinaryBiologicalObject.class); + iriToClassMap.put(HQDM.ORDINARY_FUNCTIONAL_OBJECT, OrdinaryFunctionalObject.class); + iriToClassMap.put(HQDM.ORDINARY_PHYSICAL_OBJECT, OrdinaryPhysicalObject.class); + iriToClassMap.put(HQDM.ORGANIZATION, Organization.class); + iriToClassMap.put(HQDM.ORGANIZATION_COMPONENT, OrganizationComponent.class); + iriToClassMap.put(HQDM.OWNER, Owner.class); + iriToClassMap.put(HQDM.OWNERSHIP, Ownership.class); + iriToClassMap.put(HQDM.PARTICIPANT, Participant.class); + // iriToClassMap.put(HQDM.PARTICIPANT_IN_ACTIVITY_OR_ASSOCIATION, + // ParticipantInActivityOrAssociation.class); + iriToClassMap.put(HQDM.PARTY, Party.class); + iriToClassMap.put(HQDM.PATTERN, Pattern.class); + iriToClassMap.put(HQDM.PERIOD_OF_TIME, PeriodOfTime.class); + iriToClassMap.put(HQDM.PERSON, Person.class); + iriToClassMap.put(HQDM.PERSON_IN_POSITION, PersonInPosition.class); + iriToClassMap.put(HQDM.PHYSICAL_OBJECT, PhysicalObject.class); + iriToClassMap.put(HQDM.PHYSICAL_PROPERTY, PhysicalProperty.class); + iriToClassMap.put(HQDM.PHYSICAL_PROPERTY_RANGE, PhysicalPropertyRange.class); + iriToClassMap.put(HQDM.PHYSICAL_QUANTITY, PhysicalQuantity.class); + iriToClassMap.put(HQDM.PHYSICAL_QUANTITY_RANGE, PhysicalQuantityRange.class); + iriToClassMap.put(HQDM.PLAN, Plan.class); + iriToClassMap.put(HQDM.POINT_IN_TIME, PointInTime.class); + iriToClassMap.put(HQDM.POSITION, Position.class); + iriToClassMap.put(HQDM.POSSIBLE_WORLD, PossibleWorld.class); + iriToClassMap.put(HQDM.PRICE, Price.class); + iriToClassMap.put(HQDM.PRODUCT_BRAND, ProductBrand.class); + iriToClassMap.put(HQDM.PRODUCT_OFFERING, ProductOffering.class); + iriToClassMap.put(HQDM.REACHING_AGREEMENT, ReachingAgreement.class); + iriToClassMap.put(HQDM.RECOGNIZING_LANGUAGE_COMMUNITY, RecognizingLanguageCommunity.class); + iriToClassMap.put(HQDM.RELATIONSHIP, Relationship.class); + iriToClassMap.put(HQDM.REPRESENTATION_BY_PATTERN, RepresentationByPattern.class); + iriToClassMap.put(HQDM.REPRESENTATION_BY_SIGN, RepresentationBySign.class); + iriToClassMap.put(HQDM.REQUIREMENT, Requirement.class); + iriToClassMap.put(HQDM.REQUIREMENT_SPECIFICATION, RequirementSpecification.class); + iriToClassMap.put(HQDM.ROLE, Role.class); + iriToClassMap.put(HQDM.SALE_OF_GOODS, SaleOfGoods.class); + iriToClassMap.put(HQDM.SALES_PRODUCT, SalesProduct.class); + iriToClassMap.put(HQDM.SALES_PRODUCT_INSTANCE, SalesProductInstance.class); + iriToClassMap.put(HQDM.SALES_PRODUCT_VERSION, SalesProductVersion.class); + iriToClassMap.put(HQDM.SCALE, Scale.class); + iriToClassMap.put(HQDM.SIGN, Sign.class); + iriToClassMap.put(HQDM.SOCIALLY_CONSTRUCTED_ACTIVITY, SociallyConstructedActivity.class); + iriToClassMap.put(HQDM.SOCIALLY_CONSTRUCTED_OBJECT, SociallyConstructedObject.class); + iriToClassMap.put(HQDM.SPATIO_TEMPORAL_EXTENT, SpatioTemporalExtent.class); + iriToClassMap.put(HQDM.SPECIALIZATION, Specialization.class); + iriToClassMap.put(HQDM.STATE, State.class); + iriToClassMap.put(HQDM.STATE_OF_ACTIVITY, StateOfActivity.class); + iriToClassMap.put(HQDM.STATE_OF_AMOUNT_OF_MONEY, StateOfAmountOfMoney.class); + iriToClassMap.put(HQDM.STATE_OF_ASSOCIATION, StateOfAssociation.class); + iriToClassMap.put(HQDM.STATE_OF_BIOLOGICAL_OBJECT, StateOfBiologicalObject.class); + iriToClassMap.put(HQDM.STATE_OF_BIOLOGICAL_SYSTEM, StateOfBiologicalSystem.class); + iriToClassMap.put(HQDM.STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT, StateOfBiologicalSystemComponent.class); + iriToClassMap.put(HQDM.STATE_OF_FUNCTIONAL_OBJECT, StateOfFunctionalObject.class); + iriToClassMap.put(HQDM.STATE_OF_FUNCTIONAL_SYSTEM, StateOfFunctionalSystem.class); + iriToClassMap.put(HQDM.STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT, StateOfFunctionalSystemComponent.class); + iriToClassMap.put(HQDM.STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT, StateOfIntentionallyConstructedObject.class); + iriToClassMap.put(HQDM.STATE_OF_LANGUAGE_COMMUNITY, StateOfLanguageCommunity.class); + iriToClassMap.put(HQDM.STATE_OF_ORDINARY_BIOLOGICAL_OBJECT, StateOfOrdinaryBiologicalObject.class); + iriToClassMap.put(HQDM.STATE_OF_ORDINARY_FUNCTIONAL_OBJECT, StateOfOrdinaryFunctionalObject.class); + iriToClassMap.put(HQDM.STATE_OF_ORDINARY_PHYSICAL_OBJECT, StateOfOrdinaryPhysicalObject.class); + iriToClassMap.put(HQDM.STATE_OF_ORGANIZATION, StateOfOrganization.class); + iriToClassMap.put(HQDM.STATE_OF_ORGANIZATION_COMPONENT, StateOfOrganizationComponent.class); + iriToClassMap.put(HQDM.STATE_OF_PARTY, StateOfParty.class); + iriToClassMap.put(HQDM.STATE_OF_PERSON, StateOfPerson.class); + iriToClassMap.put(HQDM.STATE_OF_PHYSICAL_OBJECT, StateOfPhysicalObject.class); + iriToClassMap.put(HQDM.STATE_OF_POSITION, StateOfPosition.class); + iriToClassMap.put(HQDM.STATE_OF_SALES_PRODUCT_INSTANCE, StateOfSalesProductInstance.class); + iriToClassMap.put(HQDM.STATE_OF_SIGN, StateOfSign.class); + iriToClassMap.put(HQDM.STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY, StateOfSociallyConstructedActivity.class); + iriToClassMap.put(HQDM.STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT, StateOfSociallyConstructedObject.class); + iriToClassMap.put(HQDM.STATE_OF_SYSTEM, StateOfSystem.class); + iriToClassMap.put(HQDM.STATE_OF_SYSTEM_COMPONENT, StateOfSystemComponent.class); + iriToClassMap.put(HQDM.SYSTEM, uk.gov.gchq.hqdm.model.System.class); + iriToClassMap.put(HQDM.SYSTEM_COMPONENT, SystemComponent.class); + iriToClassMap.put(HQDM.TEMPORAL_COMPOSITION, TemporalComposition.class); + iriToClassMap.put(HQDM.THING, Thing.class); + iriToClassMap.put(HQDM.TRANSFEREE, Transferee.class); + iriToClassMap.put(HQDM.TRANSFER_OF_OWNERSHIP, TransferOfOwnership.class); + iriToClassMap.put(HQDM.TRANSFER_OF_OWNERSHIP_OF_MONEY, TransferOfOwnershipOfMoney.class); + iriToClassMap.put(HQDM.TRANSFEROR, Transferor.class); + iriToClassMap.put(HQDM.UNIT_OF_MEASURE, UnitOfMeasure.class); + } + + /** + * Create a {@link Thing} of the specified type. + * + * @param typeName The HQDM type name, e.g. spatio_temporal_extent + * @param iri The {@link IRI} of the object. + * @return A {@link Thing}. + * @throws HqdmException If the typeName is invalid. + */ + private static Thing mapToThing(final String typeName, final IRI iri) { + + switch (typeName) { + case "abstract_object": + return SpatioTemporalExtentServices.createAbstractObject(iri.getIri()); + case "acceptance_of_offer": + return SpatioTemporalExtentServices.createAcceptanceOfOffer(iri.getIri()); + case "acceptance_of_offer_for_goods": + return SpatioTemporalExtentServices.createAcceptanceOfOfferForGoods(iri.getIri()); + case "activity": + return SpatioTemporalExtentServices.createActivity(iri.getIri()); + case "aggregation": + return RelationshipServices.createAggregation(iri.getIri()); + case "agree_contract": + return SpatioTemporalExtentServices.createAgreeContract(iri.getIri()); + case "agreement_execution": + return SpatioTemporalExtentServices.createAgreementExecution(iri.getIri()); + case "agreement_process": + return SpatioTemporalExtentServices.createAgreementProcess(iri.getIri()); + case "amount_of_money": + return SpatioTemporalExtentServices.createAmountOfMoney(iri.getIri()); + case "asset": + return SpatioTemporalExtentServices.createAsset(iri.getIri()); + case "association": + return SpatioTemporalExtentServices.createAssociation(iri.getIri()); + case "beginning_of_ownership": + return SpatioTemporalExtentServices.createBeginningOfOwnership(iri.getIri()); + case "biological_object": + return SpatioTemporalExtentServices.createBiologicalObject(iri.getIri()); + case "biological_system": + return SpatioTemporalExtentServices.createBiologicalSystem(iri.getIri()); + case "biological_system_component": + return SpatioTemporalExtentServices.createBiologicalSystemComponent(iri.getIri()); + case "class": + return ClassServices.createClass(iri.getIri()); + case "classification": + return RelationshipServices.createClassification(iri.getIri()); + case "class_of_abstract_object": + return ClassServices.createClassOfAbstractObject(iri.getIri()); + case "class_of_activity": + return ClassServices.createClassOfActivity(iri.getIri()); + case "class_of_agree_contract": + return ClassServices.createClassOfAgreeContract(iri.getIri()); + case "class_of_agreement_execution": + return ClassServices.createClassOfAgreementExecution(iri.getIri()); + case "class_of_agreement_process": + return ClassServices.createClassOfAgreementProcess(iri.getIri()); + case "class_of_amount_of_money": + return ClassServices.createClassOfAmountOfMoney(iri.getIri()); + case "class_of_association": + return ClassServices.createClassOfAssociation(iri.getIri()); + case "class_of_biological_object": + return ClassServices.createClassOfBiologicalObject(iri.getIri()); + case "class_of_biological_system": + return ClassServices.createClassOfBiologicalSystem(iri.getIri()); + case "class_of_biological_system_component": + return ClassServices.createClassOfBiologicalSystemComponent(iri.getIri()); + case "class_of_class": + return ClassServices.createClassOfClass(iri.getIri()); + case "class_of_class_of_spatio_temporal_extent": + return ClassServices.createClassOfSpatioTemporalExtent(iri.getIri()); + case "class_of_contract_execution": + return ClassServices.createClassOfContractExecution(iri.getIri()); + case "class_of_contract_process": + return ClassServices.createClassOfContractProcess(iri.getIri()); + case "class_of_event": + return ClassServices.createClassOfEvent(iri.getIri()); + case "class_of_functional_object": + return ClassServices.createClassOfFunctionalObject(iri.getIri()); + case "class_of_functional_system": + return ClassServices.createClassOfFunctionalSystem(iri.getIri()); + case "class_of_functional_system_component": + return ClassServices.createClassOfFunctionalSystemComponent(iri.getIri()); + case "class_of_individual": + return ClassServices.createClassOfIndividual(iri.getIri()); + case "class_of_in_place_biological_component": + return ClassServices.createClassOfInPlaceBiologicalComponent(iri.getIri()); + case "class_of_installed_functional_system_component": + return ClassServices.createClassOfInstalledFunctionalSystemComponent(iri.getIri()); + case "class_of_installed_object": + return ClassServices.createClassOfInstalledObject(iri.getIri()); + case "class_of_intentionally_constructed_object": + return ClassServices.createClassOfIntentionallyConstructedObject(iri.getIri()); + case "class_of_offer": + return ClassServices.createClassOfOffer(iri.getIri()); + case "class_of_ordinary_biological_object": + return ClassServices.createClassOfOrdinaryBiologicalObject(iri.getIri()); + case "class_of_ordinary_functional_object": + return ClassServices.createClassOfOrdinaryFunctionalObject(iri.getIri()); + case "class_of_ordinary_physical_object": + return ClassServices.createClassOfOrdinaryPhysicalObject(iri.getIri()); + case "class_of_organization": + return ClassServices.createClassOfOrganization(iri.getIri()); + case "class_of_organization_component": + return ClassServices.createClassOfOrganizationComponent(iri.getIri()); + case "class_of_participant": + return ClassServices.createClassOfParticipant(iri.getIri()); + case "class_of_party": + return ClassServices.createClassOfParty(iri.getIri()); + case "class_of_period_of_time": + return ClassServices.createClassOfPeriodOfTime(iri.getIri()); + case "class_of_person": + return ClassServices.createClassOfPerson(iri.getIri()); + case "class_of_person_in_position": + return ClassServices.createClassOfPersonInPosition(iri.getIri()); + case "class_of_physical_object": + return ClassServices.createClassOfPhysicalObject(iri.getIri()); + case "class_of_physical_property": + return ClassServices.createClassOfPhysicalProperty(iri.getIri()); + case "class_of_physical_quantity": + return ClassServices.createClassOfPhysicalQuantity(iri.getIri()); + case "class_of_point_in_time": + return ClassServices.createClassOfPointInTime(iri.getIri()); + case "class_of_position": + return ClassServices.createClassOfPosition(iri.getIri()); + case "class_of_possible_world": + return ClassServices.createClassOfPossibleWorld(iri.getIri()); + case "class_of_reaching_agreement": + return ClassServices.createClassOfReachingAgreement(iri.getIri()); + case "class_of_relationship": + return ClassServices.createClassOfRelationship(iri.getIri()); + case "class_of_representation": + return ClassServices.createClassOfRepresentation(iri.getIri()); + case "class_of_sales_product_instance": + return ClassServices.createClassOfSalesProductInstance(iri.getIri()); + case "class_of_sign": + return ClassServices.createClassOfSign(iri.getIri()); + case "class_of_socially_constructed_activity": + return ClassServices.createClassOfSociallyConstructedActivity(iri.getIri()); + case "class_of_socially_constructed_object": + return ClassServices.createClassOfSociallyConstructedObject(iri.getIri()); + case "class_of_spatio_temporal_extent": + return ClassServices.createClassOfSpatioTemporalExtent(iri.getIri()); + case "class_of_state": + return ClassServices.createClassOfState(iri.getIri()); + case "class_of_state_of_activity": + return ClassServices.createClassOfStateOfActivity(iri.getIri()); + case "class_of_state_of_amount_of_money": + return ClassServices.createClassOfStateOfAmountOfMoney(iri.getIri()); + case "class_of_state_of_association": + return ClassServices.createClassOfStateOfAssociation(iri.getIri()); + case "class_of_state_of_biological_object": + return ClassServices.createClassOfStateOfBiologicalObject(iri.getIri()); + case "class_of_state_of_biological_system": + return ClassServices.createClassOfStateOfBiologicalSystem(iri.getIri()); + case "class_of_state_of_biological_system_component": + return ClassServices.createClassOfStateOfBiologicalSystemComponent(iri.getIri()); + case "class_of_state_of_functional_object": + return ClassServices.createClassOfStateOfFunctionalObject(iri.getIri()); + case "class_of_state_of_functional_system": + return ClassServices.createClassOfStateOfFunctionalSystem(iri.getIri()); + case "class_of_state_of_functional_system_component": + return ClassServices.createClassOfStateOfFunctionalSystemComponent(iri.getIri()); + case "class_of_state_of_intentionally_constructed_object": + return ClassServices.createClassOfStateOfIntentionallyConstructedObject(iri.getIri()); + case "class_of_state_of_ordinary_biological_object": + return ClassServices.createClassOfStateOfOrdinaryBiologicalObject(iri.getIri()); + case "class_of_state_of_ordinary_functional_object": + return ClassServices.createClassOfStateOfOrdinaryFunctionalObject(iri.getIri()); + case "class_of_state_of_ordinary_physical_object": + return ClassServices.createClassOfStateOfOrdinaryPhysicalObject(iri.getIri()); + case "class_of_state_of_organization": + return ClassServices.createClassOfStateOfOrganization(iri.getIri()); + case "class_of_state_of_organization_component": + return ClassServices.createClassOfStateOfOrganizationComponent(iri.getIri()); + case "class_of_state_of_party": + return ClassServices.createClassOfStateOfParty(iri.getIri()); + case "class_of_state_of_person": + return ClassServices.createClassOfStateOfPerson(iri.getIri()); + case "class_of_state_of_physical_object": + return ClassServices.createClassOfStateOfPhysicalObject(iri.getIri()); + case "class_of_state_of_position": + return ClassServices.createClassOfStateOfPosition(iri.getIri()); + case "class_of_state_of_sales_product_instance": + return ClassServices.createClassOfStateOfSalesProductInstance(iri.getIri()); + case "class_of_state_of_sign": + return ClassServices.createClassOfStateOfSign(iri.getIri()); + case "class_of_state_of_socially_constructed_activity": + return ClassServices.createClassOfStateOfSociallyConstructedActivity(iri.getIri()); + case "class_of_state_of_socially_constructed_object": + return ClassServices.createClassOfStateOfSociallyConstructedObject(iri.getIri()); + case "class_of_state_of_system": + return ClassServices.createClassOfStateOfSystem(iri.getIri()); + case "class_of_state_of_system_component": + return ClassServices.createClassOfStateOfSystemComponent(iri.getIri()); + case "class_of_system": + return ClassServices.createClassOfSystem(iri.getIri()); + case "class_of_system_component": + return ClassServices.createClassOfSystemComponent(iri.getIri()); + case "composition": + return RelationshipServices.createComposition(iri.getIri()); + case "contract_execution": + return SpatioTemporalExtentServices.createContractExecution(iri.getIri()); + case "contract_process": + return SpatioTemporalExtentServices.createContractProcess(iri.getIri()); + case "currency": + return SpatioTemporalExtentServices.createCurrency(iri.getIri()); + case "defined_relationship": + return RelationshipServices.createDefinedRelationship(iri.getIri()); + case "definition": + return SpatioTemporalExtentServices.createDefinition(iri.getIri()); + case "description": + return SpatioTemporalExtentServices.createDescription(iri.getIri()); + case "employee": + return SpatioTemporalExtentServices.createEmployee(iri.getIri()); + case "employer": + return SpatioTemporalExtentServices.createEmployer(iri.getIri()); + case "employment": + return SpatioTemporalExtentServices.createEmployment(iri.getIri()); + case "ending_of_ownership": + return SpatioTemporalExtentServices.createEndingOfOwnership(iri.getIri()); + case "event": + return SpatioTemporalExtentServices.createEvent(iri.getIri()); + case "exchange_of_goods_and_money": + return SpatioTemporalExtentServices.createExchangeOfGoodsAndMoney(iri.getIri()); + case "function_": + return RelationshipServices.createFunction(iri.getIri()); + case "functional_object": + return SpatioTemporalExtentServices.createFunctionalObject(iri.getIri()); + case "functional_system": + return SpatioTemporalExtentServices.createFunctionalSystem(iri.getIri()); + case "functional_system_component": + return SpatioTemporalExtentServices.createFunctionalSystemComponent(iri.getIri()); + case "identification": + return SpatioTemporalExtentServices.createIdentification(iri.getIri()); + case "identification_of_physical_quantity": + return SpatioTemporalExtentServices.createIdentificationOfPhysicalQuantity(iri.getIri()); + case "individual": + return SpatioTemporalExtentServices.createIndividual(iri.getIri()); + case "in_place_biological_component": + return SpatioTemporalExtentServices.createInPlaceBiologicalComponent(iri.getIri()); + case "installed_functional_system_component": + return SpatioTemporalExtentServices.createInstalledFunctionalSystemComponent(iri.getIri()); + case "installed_object": + return SpatioTemporalExtentServices.createInstalledObject(iri.getIri()); + case "intentionally_constructed_object": + return SpatioTemporalExtentServices.createIntentionallyConstructedObject(iri.getIri()); + case "kind_of_activity": + return ClassServices.createKindOfActivity(iri.getIri()); + case "kind_of_association": + return ClassServices.createKindOfAssociation(iri.getIri()); + case "kind_of_biological_object": + return ClassServices.createKindOfBiologicalObject(iri.getIri()); + case "kind_of_biological_system": + return ClassServices.createKindOfBiologicalSystem(iri.getIri()); + case "kind_of_biological_system_component": + return ClassServices.createKindOfBiologicalSystemComponent(iri.getIri()); + case "kind_of_functional_object": + return ClassServices.createKindOfFunctionalObject(iri.getIri()); + case "kind_of_functional_system": + return ClassServices.createKindOfFunctionalSystem(iri.getIri()); + case "kind_of_functional_system_component": + return ClassServices.createKindOfFunctionalSystemComponent(iri.getIri()); + case "kind_of_individual": + return ClassServices.createKindOfIndividual(iri.getIri()); + case "kind_of_intentionally_constructed_object": + return ClassServices.createKindOfIntentionallyConstructedObject(iri.getIri()); + case "kind_of_ordinary_biological_object": + return ClassServices.createKindOfOrdinaryBiologicalObject(iri.getIri()); + case "kind_of_ordinary_functional_object": + return ClassServices.createKindOfOrdinaryFunctionalObject(iri.getIri()); + case "kind_of_ordinary_physical_object": + return ClassServices.createKindOfOrdinaryPhysicalObject(iri.getIri()); + case "kind_of_organization": + return ClassServices.createKindOfOrganization(iri.getIri()); + case "kind_of_organization_component": + return ClassServices.createKindOfOrganizationComponent(iri.getIri()); + case "kind_of_party": + return ClassServices.createKindOfParty(iri.getIri()); + case "kind_of_person": + return ClassServices.createKindOfPerson(iri.getIri()); + case "kind_of_physical_object": + return ClassServices.createKindOfPhysicalObject(iri.getIri()); + case "kind_of_physical_property": + return ClassServices.createKindOfPhysicalProperty(iri.getIri()); + case "kind_of_physical_quantity": + return ClassServices.createKindOfPhysicalQuantity(iri.getIri()); + case "kind_of_position": + return ClassServices.createKindOfPosition(iri.getIri()); + case "kind_of_relationship_with_restriction": + return ClassServices.createKindOfRelationshipWithRestriction(iri.getIri()); + case "kind_of_relationship_with_signature": + return ClassServices.createKindOfRelationshipWithSignature(iri.getIri()); + case "kind_of_socially_constructed_object": + return ClassServices.createKindOfSociallyConstructedObject(iri.getIri()); + case "kind_of_system": + return ClassServices.createKindOfSystem(iri.getIri()); + case "kind_of_system_component": + return ClassServices.createKindOfSystemComponent(iri.getIri()); + case "language_community": + return SpatioTemporalExtentServices.createLanguageCommunity(iri.getIri()); + case "money_asset": + return SpatioTemporalExtentServices.createMoneyAsset(iri.getIri()); + case "offer": + return SpatioTemporalExtentServices.createOffer(iri.getIri()); + case "offer_and_acceptance_for_goods": + return SpatioTemporalExtentServices.createOfferAndAcceptanceForGoods(iri.getIri()); + case "offer_for_goods": + return SpatioTemporalExtentServices.createOfferForGoods(iri.getIri()); + case "offering": + return SpatioTemporalExtentServices.createOffering(iri.getIri()); + case "ordinary_biological_object": + return SpatioTemporalExtentServices.createOrdinaryBiologicalObject(iri.getIri()); + case "ordinary_functional_object": + return SpatioTemporalExtentServices.createOrdinaryFunctionalObject(iri.getIri()); + case "ordinary_physical_object": + return SpatioTemporalExtentServices.createOrdinaryPhysicalObject(iri.getIri()); + case "organization": + return SpatioTemporalExtentServices.createOrganization(iri.getIri()); + case "organization_component": + return SpatioTemporalExtentServices.createOrganizationComponent(iri.getIri()); + case "owner": + return SpatioTemporalExtentServices.createOwner(iri.getIri()); + case "ownership": + return SpatioTemporalExtentServices.createOwnership(iri.getIri()); + case "participant": + return SpatioTemporalExtentServices.createParticipant(iri.getIri()); + case "party": + return SpatioTemporalExtentServices.createParty(iri.getIri()); + case "pattern": + return SpatioTemporalExtentServices.createPattern(iri.getIri()); + case "period_of_time": + return SpatioTemporalExtentServices.createPeriodOfTime(iri.getIri()); + case "person": + return SpatioTemporalExtentServices.createPerson(iri.getIri()); + case "person_in_position": + return SpatioTemporalExtentServices.createPersonInPosition(iri.getIri()); + case "physical_object": + return SpatioTemporalExtentServices.createPhysicalObject(iri.getIri()); + case "physical_property": + return SpatioTemporalExtentServices.createPhysicalProperty(iri.getIri()); + case "physical_property_range": + return SpatioTemporalExtentServices.createPhysicalPropertyRange(iri.getIri()); + case "physical_quantity": + return SpatioTemporalExtentServices.createPhysicalQuantity(iri.getIri()); + case "physical_quantity_range": + return SpatioTemporalExtentServices.createPhysicalQuantityRange(iri.getIri()); + case "plan": + return SpatioTemporalExtentServices.createPlan(iri.getIri()); + case "point_in_time": + return SpatioTemporalExtentServices.createPointInTime(iri.getIri()); + case "position": + return SpatioTemporalExtentServices.createPosition(iri.getIri()); + case "possible_world": + return SpatioTemporalExtentServices.createPossibleWorld(iri.getIri()); + case "price": + return SpatioTemporalExtentServices.createPrice(iri.getIri()); + case "product_brand": + return SpatioTemporalExtentServices.createProductBrand(iri.getIri()); + case "product_offering": + return SpatioTemporalExtentServices.createProductOffering(iri.getIri()); + case "reaching_agreement": + return SpatioTemporalExtentServices.createReachingAgreement(iri.getIri()); + case "recognizing_language_community": + return SpatioTemporalExtentServices.createRecognizingLanguageCommunity(iri.getIri()); + case "relationship": + return RelationshipServices.createRelationship(iri.getIri()); + case "representation_by_pattern": + return SpatioTemporalExtentServices.createRepresentationByPattern(iri.getIri()); + case "representation_by_sign": + return SpatioTemporalExtentServices.createRepresentationBySign(iri.getIri()); + case "requirement": + return SpatioTemporalExtentServices.createRequirement(iri.getIri()); + case "requirement_specification": + return SpatioTemporalExtentServices.createRequirementSpecification(iri.getIri()); + case "role": + return ClassServices.createRole(iri.getIri()); + case "sale_of_goods": + return SpatioTemporalExtentServices.createSaleOfGoods(iri.getIri()); + case "sales_product": + return SpatioTemporalExtentServices.createSalesProduct(iri.getIri()); + case "sales_product_instance": + return SpatioTemporalExtentServices.createSalesProductInstance(iri.getIri()); + case "sales_product_version": + return SpatioTemporalExtentServices.createSalesProductVersion(iri.getIri()); + case "scale": + return RelationshipServices.createScale(iri.getIri()); + case "sign": + return SpatioTemporalExtentServices.createSign(iri.getIri()); + case "socially_constructed_activity": + return SpatioTemporalExtentServices.createSociallyConstructedActivity(iri.getIri()); + case "socially_constructed_object": + return SpatioTemporalExtentServices.createSociallyConstructedObject(iri.getIri()); + case "spatio_temporal_extent": + return SpatioTemporalExtentServices.createSpatioTemporalExtent(iri.getIri()); + case "specialization": + return RelationshipServices.createSpecialization(iri.getIri()); + case "state": + return SpatioTemporalExtentServices.createState(iri.getIri()); + case "state_of_activity": + return SpatioTemporalExtentServices.createStateOfActivity(iri.getIri()); + case "state_of_amount_of_money": + return SpatioTemporalExtentServices.createStateOfAmountOfMoney(iri.getIri()); + case "state_of_association": + return SpatioTemporalExtentServices.createStateOfAssociation(iri.getIri()); + case "state_of_biological_object": + return SpatioTemporalExtentServices.createStateOfBiologicalObject(iri.getIri()); + case "state_of_biological_system": + return SpatioTemporalExtentServices.createStateOfBiologicalSystem(iri.getIri()); + case "state_of_biological_system_component": + return SpatioTemporalExtentServices.createStateOfBiologicalSystemComponent(iri.getIri()); + case "state_of_functional_object": + return SpatioTemporalExtentServices.createStateOfFunctionalObject(iri.getIri()); + case "state_of_functional_system": + return SpatioTemporalExtentServices.createStateOfFunctionalSystem(iri.getIri()); + case "state_of_functional_system_component": + return SpatioTemporalExtentServices.createStateOfFunctionalSystemComponent(iri.getIri()); + case "state_of_intentionally_constructed_object": + return SpatioTemporalExtentServices.createStateOfIntentionallyConstructedObject(iri.getIri()); + case "state_of_language_community": + return SpatioTemporalExtentServices.createStateOfLanguageCommunity(iri.getIri()); + case "state_of_ordinary_biological_object": + return SpatioTemporalExtentServices.createStateOfOrdinaryBiologicalObject(iri.getIri()); + case "state_of_ordinary_functional_object": + return SpatioTemporalExtentServices.createStateOfOrdinaryFunctionalObject(iri.getIri()); + case "state_of_ordinary_physical_object": + return SpatioTemporalExtentServices.createStateOfOrdinaryPhysicalObject(iri.getIri()); + case "state_of_organization": + return SpatioTemporalExtentServices.createStateOfOrganization(iri.getIri()); + case "state_of_organization_component": + return SpatioTemporalExtentServices.createStateOfOrganizationComponent(iri.getIri()); + case "state_of_party": + return SpatioTemporalExtentServices.createStateOfParty(iri.getIri()); + case "state_of_person": + return SpatioTemporalExtentServices.createStateOfPerson(iri.getIri()); + case "state_of_physical_object": + return SpatioTemporalExtentServices.createStateOfPhysicalObject(iri.getIri()); + case "state_of_position": + return SpatioTemporalExtentServices.createStateOfPosition(iri.getIri()); + case "state_of_sales_product_instance": + return SpatioTemporalExtentServices.createStateOfSalesProductInstance(iri.getIri()); + case "state_of_sign": + return SpatioTemporalExtentServices.createStateOfSign(iri.getIri()); + case "state_of_socially_constructed_activity": + return SpatioTemporalExtentServices.createStateOfSociallyConstructedActivity(iri.getIri()); + case "state_of_socially_constructed_object": + return SpatioTemporalExtentServices.createStateOfSociallyConstructedObject(iri.getIri()); + case "state_of_system": + return SpatioTemporalExtentServices.createStateOfSystem(iri.getIri()); + case "state_of_system_component": + return SpatioTemporalExtentServices.createStateOfSystemComponent(iri.getIri()); + case "system": + return SpatioTemporalExtentServices.createSystem(iri.getIri()); + case "system_component": + return SpatioTemporalExtentServices.createSystemComponent(iri.getIri()); + case "temporal_composition": + return RelationshipServices.createTemporalComposition(iri.getIri()); + case "thing": + return SpatioTemporalExtentServices.createThing(iri.getIri()); + case "transferee": + return SpatioTemporalExtentServices.createTransferee(iri.getIri()); + case "transfer_of_ownership": + return SpatioTemporalExtentServices.createTransferOfOwnership(iri.getIri()); + case "transfer_of_ownership_of_money": + return SpatioTemporalExtentServices.createTransferOfOwnershipOfMoney(iri.getIri()); + case "transferor": + return SpatioTemporalExtentServices.createTransferor(iri.getIri()); + case "unit_of_measure": + return RelationshipServices.createUnitOfMeasure(iri.getIri()); + case "enumerated_class": + case "participant_in_activity_or_association": + default: + throw new HqdmException("Unknown type name: " + typeName); + } + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/IriException.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/IriException.java new file mode 100644 index 00000000..71082e43 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/IriException.java @@ -0,0 +1,65 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.exception; + +/** + * Exception thrown to indicate that a string could not be parsed as an IRI reference. + */ +public class IriException extends RuntimeException { + + /** + * Constructs a new IriException with null as its detail message. The cause is not initialized, and + * may subsequently be initialized by a call to {@link #initCause(Throwable)}. + */ + public IriException() { + super(); + } + + /** + * Constructs a new IriException with the specified detail message. The cause is not initialized, + * and may subsequently be initialized by a call to {@link #initCause(Throwable)}. + * + * @param message The detail message. The detail message is saved for later retrieval by the + * {@link #getMessage()} method. + */ + public IriException(final String message) { + super(message); + } + + /** + * Constructs a new IriException with the specified cause and a detail message of (cause==null ? + * null : cause.toString()) (which typically contains the class and detail message of cause). + * + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). (A + * {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public IriException(final Throwable cause) { + super(cause); + } + + /** + * Constructs a new IriException with the specified detail message and cause. + * + * @param message The detail message (which is saved for later retrieval by the + * {@link #getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). + * (A {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public IriException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/package-info.java new file mode 100644 index 00000000..76c3399b --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/exception/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Exceptions arising from HQDM-RDF code. + */ +package uk.gov.gchq.hqdm.rdf.exception; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java new file mode 100755 index 00000000..3bc8eb4c --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java @@ -0,0 +1,2134 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +/** + * IRI definitions for HQDM entities and associations. + */ +public final class HQDM { + + private HQDM() { + } + + /** HQDM namespace. */ + public static final IriBase HQDM = new IriBase("hqdm", "http://www.semanticweb.org/hqdm#"); + + /** A unique identifier for a particular HQDM entity. */ + @Deprecated + public static final HqdmIri ENTITY_ID = new HqdmIri(HQDM, "data_uniqueID"); + + /** A human-interpretable name for a particular HQDM entity. */ + @Deprecated + public static final HqdmIri ENTITY_NAME = new HqdmIri(HQDM, "data_EntityName"); + + // ======================================================================= + // Entities + // ======================================================================= + + /** A {@link uk.gov.gchq.hqdm.model.Thing} that does not exist in space or time. */ + public static final HqdmIri ABSTRACT_OBJECT = new HqdmIri(HQDM, "abstract_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that is the acceptance of an + * {@link uk.gov.gchq.hqdm.model.Offer} as {@link #PART_OF} an + * {@link uk.gov.gchq.hqdm.model.AgreeContract}. + */ + public static final HqdmIri ACCEPTANCE_OF_OFFER = new HqdmIri(HQDM, "acceptance_of_offer"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that consists of one or more + * {@link uk.gov.gchq.hqdm.model.Offer}s of a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney} for a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} of goods where one + * {@link uk.gov.gchq.hqdm.model.Offer} is accepted. + */ + public static final HqdmIri ACCEPTANCE_OF_OFFER_FOR_GOODS = new HqdmIri(HQDM, "acceptance_of_offer_for_goods"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Individual} that consists of its + * {@link uk.gov.gchq.hqdm.model.Participant}s and causes some {@link uk.gov.gchq.hqdm.model.Event}. + */ + public static final HqdmIri ACTIVITY = new HqdmIri(HQDM, "activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Relationship} where the whole is at least the sum of the parts. + */ + public static final HqdmIri AGGREGATION = new HqdmIri(HQDM, "aggregation"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that consists of an + * {@link uk.gov.gchq.hqdm.model.Offer} of some {@link uk.gov.gchq.hqdm.model.Thing} in exchange for + * some consideration, and an {@link uk.gov.gchq.hqdm.model.AcceptanceOfOffer}. + */ + public static final HqdmIri AGREE_CONTRACT = new HqdmIri(HQDM, "agree_contract"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} where two or more parties carry out + * a course of action previously agreed upon. + */ + public static final HqdmIri AGREEMENT_EXECUTION = new HqdmIri(HQDM, "agreement_execution"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that consists of a + * {@link uk.gov.gchq.hqdm.model.ReachingAgreement} and an + * {@link uk.gov.gchq.hqdm.model.AgreementExecution}, where the + * {@link uk.gov.gchq.hqdm.model.AgreementExecution} is the course of action agreed to in the + * {@link uk.gov.gchq.hqdm.model.ReachingAgreement}. + */ + public static final HqdmIri AGREEMENT_PROCESS = new HqdmIri(HQDM, "agreement_process"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney}, that is also a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}, and a + * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that is intended and accepted for use as a means of + * exchange. + */ + public static final HqdmIri AMOUNT_OF_MONEY = new HqdmIri(HQDM, "amount_of_money"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.Participant} that is the {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Ownership} that is owned. + */ + public static final HqdmIri ASSET = new HqdmIri(HQDM, "asset"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Individual} that {@link #CONSISTS_OF} the + * {@link uk.gov.gchq.hqdm.model.Participant}s that are associated, and where the + * {@link uk.gov.gchq.hqdm.model.Participant}s are {@link #PART_OF} the same + * {@link uk.gov.gchq.hqdm.model.PeriodOfTime}. + */ + public static final HqdmIri ASSOCIATION = new HqdmIri(HQDM, "association"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Event} that is the {@link #BEGINNING} of an + * {@link uk.gov.gchq.hqdm.model.Ownership}. + */ + public static final HqdmIri BEGINNING_OF_OWNERSHIP = new HqdmIri(HQDM, "beginning_of_ownership"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that sustains itself and reproduces. + */ + public static final HqdmIri BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "biological_object"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.System} that is also an + * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} and a + * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem}. + */ + public static final HqdmIri BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "biological_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.BiologicalObject}, + * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} and + * {@link uk.gov.gchq.hqdm.model.SystemComponent} that is any + * {@link uk.gov.gchq.hqdm.model.BiologicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.SystemComponent}. + */ + public static final HqdmIri BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "biological_system_component"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AbstractObject} that has members and whose identity is defined + * by its membership. + */ + public static final HqdmIri CLASS = new HqdmIri(HQDM, "class"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Relationship} where a {@link uk.gov.gchq.hqdm.model.Thing} is a + * member of a class{@link uk.gov.gchq.hqdm.model.Class}. + */ + public static final HqdmIri CLASSIFICATION = new HqdmIri(HQDM, "classification"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.AbstractObject} or + * any its subsets. + */ + public static final HqdmIri CLASS_OF_ABSTRACT_OBJECT = new HqdmIri(HQDM, "class_of_abstract_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} and a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfActivity} that is + * {@link uk.gov.gchq.hqdm.model.Activity} or any of its possible subsets. + */ + public static final HqdmIri CLASS_OF_ACTIVITY = new HqdmIri(HQDM, "class_of_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfReachingAgreement} that is + * {@link uk.gov.gchq.hqdm.model.AgreeContract} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_AGREE_CONTRACT = new HqdmIri(HQDM, "class_of_agree_contract"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.hqdm.model.AgreementExecution} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_AGREEMENT_EXECUTION = new HqdmIri(HQDM, "class_of_agreement_execution"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.hqdm.model.AgreementProcess} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_AGREEMENT_PROCESS = new HqdmIri(HQDM, "class_of_agreement_process"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfAmountOfMoney}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.AmountOfMoney} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "class_of_amount_of_money"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfAssociation} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is + * {@link uk.gov.gchq.hqdm.model.Association} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ASSOCIATION = new HqdmIri(HQDM, "class_of_association"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.BiologicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "class_of_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem}, + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject}, and + * {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.BiologicalSystem} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "class_of_biological_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject}, + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, and + * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is + * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_biological_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.Class} or any of its + * subsets. + */ + public static final HqdmIri CLASS_OF_CLASS = new HqdmIri(HQDM, "class_of_class"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfClass} that is + * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_CLASS_OF_SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, + "class_of_class_of_spatio_temporal_extent"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAgreementExecution} that is + * {@link uk.gov.gchq.hqdm.model.ContractExecution} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_CONTRACT_EXECUTION = new HqdmIri(HQDM, "class_of_contract_execution"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAgreementProcess} that is + * {@link uk.gov.gchq.hqdm.model.ContractProcess} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_CONTRACT_PROCESS = new HqdmIri(HQDM, "class_of_contract_process"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.hqdm.model.Event} or any of its possible subsets. + */ + public static final HqdmIri CLASS_OF_EVENT = new HqdmIri(HQDM, "class_of_event"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject}, + * {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject}, and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject} that is + * {@link uk.gov.gchq.hqdm.model.FunctionalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "class_of_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.FunctionalSystem} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "class_of_functional_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent}, and + * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is + * {@link uk.gov.gchq.hqdm.model.FunctionalSystemComponent} and any of its subsets. + */ + public static final HqdmIri CLASS_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is {@link uk.gov.gchq.hqdm.model.Individual} + * or any of its subsets. + */ + public static final HqdmIri CLASS_OF_INDIVIDUAL = new HqdmIri(HQDM, "class_of_individual"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is + * {@link uk.gov.gchq.hqdm.model.InPlaceBiologicalComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, + "class_of_in_place_biological_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is + * {@link uk.gov.gchq.hqdm.model.InstalledFunctionalSystemComponent} and any of its subsets. + */ + public static final HqdmIri CLASS_OF_INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_installed_functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.InstalledObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_INSTALLED_OBJECT = new HqdmIri(HQDM, "class_of_installed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "class_of_intentionally_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.hqdm.model.Offer} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_OFFER = new HqdmIri(HQDM, "class_of_offer"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject}, + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} that is + * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, + "class_of_ordinary_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalObject}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, + "class_of_ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, + "class_of_ordinary_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganization}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is {@link uk.gov.gchq.hqdm.model.Organization} + * or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ORGANIZATION = new HqdmIri(HQDM, "class_of_organization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent}, that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent}, and a + * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.OrganizationComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "class_of_organization_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.Participant} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PARTICIPANT = new HqdmIri(HQDM, "class_of_participant"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is {@link uk.gov.gchq.hqdm.model.Party} or + * any of its subtypes. + */ + public static final HqdmIri CLASS_OF_PARTY = new HqdmIri(HQDM, "class_of_party"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is {@link uk.gov.gchq.hqdm.model.PeriodOfTime} + * or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PERIOD_OF_TIME = new HqdmIri(HQDM, "class_of_period_of_time"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem}, + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPerson} and + * {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is {@link uk.gov.gchq.hqdm.model.Person} or any + * of its subsets. + */ + public static final HqdmIri CLASS_OF_PERSON = new HqdmIri(HQDM, "class_of_person"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPosition} that is + * {@link uk.gov.gchq.hqdm.model.PersonInPosition} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PERSON_IN_POSITION = new HqdmIri(HQDM, "class_of_person_in_position"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} and a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.PhysicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "class_of_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "class_of_physical_property"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty} that is + * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "class_of_physical_quantity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfEvent} that is {@link uk.gov.gchq.hqdm.model.PointInTime} + * or any of its subsets. + */ + public static final HqdmIri CLASS_OF_POINT_IN_TIME = new HqdmIri(HQDM, "class_of_point_in_time"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPosition} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent} that is + * {@link uk.gov.gchq.hqdm.model.Position} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_POSITION = new HqdmIri(HQDM, "class_of_position"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfPeriodOfTime} that is + * {@link uk.gov.gchq.hqdm.model.PossibleWorld} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "class_of_possible_world"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.hqdm.model.ReachingAgreement} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_REACHING_AGREEMENT = new HqdmIri(HQDM, "class_of_reaching_agreement"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.Relationship} or any + * of its subsets. + */ + public static final HqdmIri CLASS_OF_RELATIONSHIP = new HqdmIri(HQDM, "class_of_relationship"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAssociation} that is + * {@link uk.gov.gchq.hqdm.model.RepresentationBySign} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_REPRESENTATION = new HqdmIri(HQDM, "class_of_representation"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSalesProductInstance} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject} that is + * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "class_of_sales_product_instance"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSign} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.Sign} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SIGN = new HqdmIri(HQDM, "class_of_sign"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfActivity} that is + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, + "class_of_socially_constructed_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "class_of_socially_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Class} that is + * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "class_of_spatio_temporal_extent"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.hqdm.model.State} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE = new HqdmIri(HQDM, "class_of_state"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.hqdm.model.StateOfActivity} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ACTIVITY = new HqdmIri(HQDM, "class_of_state_of_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney} or one of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, + "class_of_state_of_amount_of_money"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.hqdm.model.StateOfAssociation} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "class_of_state_of_association"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, + "class_of_state_of_biological_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is + * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_state_of_biological_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystem} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, + "class_of_state_of_functional_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is + * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_state_of_functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_intentionally_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_ordinary_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_ordinary_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfParty} that is + * {@link uk.gov.gchq.hqdm.model.StateOfOrganization} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "class_of_state_of_organization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, + "class_of_state_of_organization_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.StateOfParty} or any of its subtypes. + */ + public static final HqdmIri CLASS_OF_STATE_OF_PARTY = new HqdmIri(HQDM, "class_of_state_of_party"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem} and + * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfParty} that is + * {@link uk.gov.gchq.hqdm.model.StateOfPerson} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_PERSON = new HqdmIri(HQDM, "class_of_state_of_person"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent} that is + * {@link uk.gov.gchq.hqdm.model.StateOfPosition} and any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_POSITION = new HqdmIri(HQDM, "class_of_state_of_position"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSalesProductInstance} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, + "class_of_state_of_sales_product_instance"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSign} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SIGN = new HqdmIri(HQDM, "class_of_state_of_sign"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, + "class_of_state_of_socially_constructed_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} or one of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "class_of_state_of_socially_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSystem} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SYSTEM = new HqdmIri(HQDM, "class_of_state_of_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "class_of_state_of_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.System} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SYSTEM = new HqdmIri(HQDM, "class_of_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.hqdm.model.SystemComponent} or any of its subsets. + */ + public static final HqdmIri CLASS_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "class_of_system_component"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Aggregation} where the {@link #WHOLE} is an arrangement of the + * parts that results in emergent properties. + */ + public static final HqdmIri COMPOSITION = new HqdmIri(HQDM, "composition"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AgreementExecution} that is the provision of some + * {@link uk.gov.gchq.hqdm.model.Thing} in exchange for some consideration. + */ + public static final HqdmIri CONTRACT_EXECUTION = new HqdmIri(HQDM, "contract_execution"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AgreementProcess} that consists of an + * {@link uk.gov.gchq.hqdm.model.AgreeContract} and a + * {@link uk.gov.gchq.hqdm.model.ContractExecution}. + */ + public static final HqdmIri CONTRACT_PROCESS = new HqdmIri(HQDM, "contract_process"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney} that is the subset of + * {@link uk.gov.gchq.hqdm.model.AmountOfMoney} that has as members all the money issued by an + * issuing authority. + */ + public static final HqdmIri CURRENCY = new HqdmIri(HQDM, "currency"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Relationship} that is defined by a + * {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. + */ + public static final HqdmIri DEFINED_RELATIONSHIP = new HqdmIri(HQDM, "defined_relationship"); + + /** + * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that defines a + * {@link uk.gov.gchq.hqdm.model.Class}. + */ + public static final HqdmIri DEFINITION = new HqdmIri(HQDM, "definition"); + + /** + * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that describes some + * {@link uk.gov.gchq.hqdm.model.Thing}. + */ + public static final HqdmIri DESCRIPTION = new HqdmIri(HQDM, "description"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPerson} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Employment}. + */ + public static final HqdmIri EMPLOYEE = new HqdmIri(HQDM, "employee"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Employment}. + */ + public static final HqdmIri EMPLOYER = new HqdmIri(HQDM, "employer"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Association} that consists of an + * {@link uk.gov.gchq.hqdm.model.Employer} and an {@link uk.gov.gchq.hqdm.model.Employee} where the + * {@link uk.gov.gchq.hqdm.model.Employer} pays the {@link uk.gov.gchq.hqdm.model.Employee} to work + * for them. + */ + public static final HqdmIri EMPLOYMENT = new HqdmIri(HQDM, "employment"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Event} that is the {@link #ENDING} of an + * {@link uk.gov.gchq.hqdm.model.Ownership}. + */ + public static final HqdmIri ENDING_OF_OWNERSHIP = new HqdmIri(HQDM, "ending_of_ownership"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Class} where each {@link #MEMBER__OF} the + * {@link uk.gov.gchq.hqdm.model.Class} is known. + */ + public static final HqdmIri ENUMERATED_CLASS = new HqdmIri(HQDM, "enumerated_class"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that has zero temporal thickness and may + * bound some {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. + */ + public static final HqdmIri EVENT = new HqdmIri(HQDM, "event"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AgreementExecution} that consists of a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} of goods and a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney}. + */ + public static final HqdmIri EXCHANGE_OF_GOODS_AND_MONEY = new HqdmIri(HQDM, "exchange_of_goods_and_money"); + + /** + * A one-to-many {@link uk.gov.gchq.hqdm.model.Relationship}. + */ + public static final HqdmIri FUNCTION_ = new HqdmIri(HQDM, "function_"); + + /** + * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that has an {@link #INTENDED_ROLE}. + */ + public static final HqdmIri FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "functional_object"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystem} that is also an + * {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} and a + * {@link uk.gov.gchq.hqdm.model.System}. + */ + public static final HqdmIri FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "functional_system"); + + /** + * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is a replaceable + * {@link #COMPONENT_OF} a {@link uk.gov.gchq.hqdm.model.FunctionalSystem}. + */ + public static final HqdmIri FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that is a surrogate for the + * {@link uk.gov.gchq.hqdm.model.Thing} {@link #REPRESENTED}. + */ + public static final HqdmIri IDENTIFICATION = new HqdmIri(HQDM, "identification"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Identification} that identifies a + * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. An + * {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} consists of a REAL that is a + * representation of the {@link #VALUE_} the physical quantity maps to on the + * {@link uk.gov.gchq.hqdm.model.Scale}. + */ + public static final HqdmIri IDENTIFICATION_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, + "identification_of_physical_quantity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is not a proper + * {@link #TEMPORAL_PART_OF} any other {@link uk.gov.gchq.hqdm.model.Individual} of the same kind. + */ + public static final HqdmIri INDIVIDUAL = new HqdmIri(HQDM, "individual"); + + /** + * An {@link uk.gov.gchq.hqdm.model.InstalledObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} and a + * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent}. + */ + public static final HqdmIri IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, "in_place_biological_component"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.InstalledObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} and a + * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent}. + */ + public static final HqdmIri INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "installed_functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} from when it is installed as a + * {@link uk.gov.gchq.hqdm.model.SystemComponent} to when it is removed. + */ + public static final HqdmIri INSTALLED_OBJECT = new HqdmIri(HQDM, "installed_object"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Individual} and + * {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is intentionally + * constructed. + */ + public static final HqdmIri INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "intentionally_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfActivity} all of whose members are of the same kind. + */ + public static final HqdmIri KIND_OF_ACTIVITY = new HqdmIri(HQDM, "kind_of_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAssociation} where all the members are of the same kind. + */ + public static final HqdmIri KIND_OF_ASSOCIATION = new HqdmIri(HQDM, "kind_of_association"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject} and a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} is of the same kind. + */ + public static final HqdmIri KIND_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "kind_of_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystem} all of whose members have a natural + * {@link uk.gov.gchq.hqdm.model.Role} that they play. + */ + public static final HqdmIri KIND_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "kind_of_biological_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} where all the member components play the + * same {@link uk.gov.gchq.hqdm.model.Role} in some {@link uk.gov.gchq.hqdm.model.BiologicalSystem}. + */ + public static final HqdmIri KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "kind_of_biological_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalObject}, that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject}, and a + * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} where each {@link #MEMBER_OF} + * a {@link uk.gov.gchq.hqdm.model.KindOfFunctionalObject} is of the same kind. + */ + public static final HqdmIri KIND_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "kind_of_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalSystem} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystem} where each + * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalSystem} has members that are of the same kind. + */ + public static final HqdmIri KIND_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "kind_of_functional_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent} is of the same kind. + */ + public static final HqdmIri KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "kind_of_functional_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} where all the members possess attributes in + * common. + */ + public static final HqdmIri KIND_OF_INDIVIDUAL = new HqdmIri(HQDM, "kind_of_individual"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfIndividual} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} is of the same kind. + */ + public static final HqdmIri KIND_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "kind_of_intentionally_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject} a + * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject} and a + * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject} is of the same kind. + */ + public static final HqdmIri KIND_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, + "kind_of_ordinary_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject}, that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject}, and a + * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject} is of the same kind. + */ + public static final HqdmIri KIND_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, + "kind_of_ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} has members that are of the same kind. + */ + public static final HqdmIri KIND_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, + "kind_of_ordinary_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} has members that are of the same kind. + */ + public static final HqdmIri KIND_OF_ORGANIZATION = new HqdmIri(HQDM, "kind_of_organization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} whose members are all of the same kind. + */ + public static final HqdmIri KIND_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "kind_of_organization_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfSystem} where all the members are of the same kind. + */ + public static final HqdmIri KIND_OF_PARTY = new HqdmIri(HQDM, "kind_of_party"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPerson} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfParty} whose members are all of the same kind. + */ + public static final HqdmIri KIND_OF_PERSON = new HqdmIri(HQDM, "kind_of_person"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfIndividual} where each + * {@link uk.gov.gchq.hqdm.model.PhysicalObject} has members that are of the same kind. + */ + public static final HqdmIri KIND_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "kind_of_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty} is of the same kind. + */ + public static final HqdmIri KIND_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "kind_of_physical_property"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalQuantity} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty} such that each {@link #MEMBER_OF} the same + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} is comparable to the others. + */ + public static final HqdmIri KIND_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "kind_of_physical_quantity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfPosition} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfOrganizationComponent} where all the members are of the same + * kind. + */ + public static final HqdmIri KIND_OF_POSITION = new HqdmIri(HQDM, "kind_of_position"); + + /** + * A {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature} where one or more {@link #ROLES} + * have fixed players. + */ + public static final HqdmIri KIND_OF_RELATIONSHIP_WITH_RESTRICTION = new HqdmIri(HQDM, + "kind_of_relationship_with_restriction"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfRelationship} that is a subset of + * {@link uk.gov.gchq.hqdm.model.DefinedRelationship} type where the + * {@link uk.gov.gchq.hqdm.model.Classification}s involved in each + * {@link uk.gov.gchq.hqdm.model.DefinedRelationship} have as {@link #CLASSIFIER}s the + * {@link #ROLES} specified by the {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. + */ + public static final HqdmIri KIND_OF_RELATIONSHIP_WITH_SIGNATURE = new HqdmIri(HQDM, + "kind_of_relationship_with_signature"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} where each + * {@link uk.gov.gchq.hqdm.model.KindOfSociallyConstructedObject} has members that are of the same + * kind. + */ + public static final HqdmIri KIND_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "kind_of_socially_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfSystem} is of the same kind. + */ + public static final HqdmIri KIND_OF_SYSTEM = new HqdmIri(HQDM, "kind_of_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where all the members are of the same kind. + */ + public static final HqdmIri KIND_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "kind_of_system_component"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Organization} that is a group of people who share a common + * understanding of a set of {@link uk.gov.gchq.hqdm.model.Sign}s. + */ + public static final HqdmIri LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "language_community"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Asset} that is a + * {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney}. + */ + public static final HqdmIri MONEY_ASSET = new HqdmIri(HQDM, "money_asset"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that proposes an exchange of some + * {@link uk.gov.gchq.hqdm.model.Thing} for some consideration. + */ + public static final HqdmIri OFFER = new HqdmIri(HQDM, "offer"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that {@link #CONSISTS_OF} exactly one + * {@link uk.gov.gchq.hqdm.model.Offer} of a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney} for exactly one + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} that is accepted. + */ + public static final HqdmIri OFFER_AND_ACCEPTANCE_FOR_GOODS = new HqdmIri(HQDM, "offer_and_acceptance_for_goods"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Offer} of an + * {@link uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney}. + */ + public static final HqdmIri OFFER_FOR_GOODS = new HqdmIri(HQDM, "offer_for_goods"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfOffer} that is for a + * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual}, at a {@link uk.gov.gchq.hqdm.model.Price}, by a + * {@link uk.gov.gchq.hqdm.model.Party}, for a {@link uk.gov.gchq.hqdm.model.PeriodOfTime}. + */ + public static final HqdmIri OFFERING = new HqdmIri(HQDM, "offering"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject}, a + * {@link uk.gov.gchq.hqdm.model.BiologicalObject}, and an + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.BiologicalObject} that does not survive the replacement of all of + * its parts. + */ + public static final HqdmIri ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "ordinary_biological_object"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} and + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.FunctionalObject}. + */ + public static final HqdmIri ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.PhysicalObject} that does not survive changing all its parts at + * once. + */ + public static final HqdmIri ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, "ordinary_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrganization}, that is also a + * {@link uk.gov.gchq.hqdm.model.Party}, and a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is an organized body of people. + */ + public static final HqdmIri ORGANIZATION = new HqdmIri(HQDM, "organization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent}, + * {@link uk.gov.gchq.hqdm.model.SystemComponent}, and + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is a {@link #COMPONENT_OF} an + * {@link uk.gov.gchq.hqdm.model.Organization} that can be completely replaced without losing its + * identity. + */ + public static final HqdmIri ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "organization_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.hqdm.model.Participant} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Ownership}. + */ + public static final HqdmIri OWNER = new HqdmIri(HQDM, "owner"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Association} that {@link #CONSISTS_OF} an + * {@link uk.gov.gchq.hqdm.model.Owner} and an {@link uk.gov.gchq.hqdm.model.Asset} where the + * {@link uk.gov.gchq.hqdm.model.Owner} owns the {@link uk.gov.gchq.hqdm.model.Asset}. + */ + public static final HqdmIri OWNERSHIP = new HqdmIri(HQDM, "ownership"); + + /** + * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Activity} or {@link uk.gov.gchq.hqdm.model.Association}. + */ + public static final HqdmIri PARTICIPANT = new HqdmIri(HQDM, "participant"); + + /** + * A SELECT where a {@link uk.gov.gchq.hqdm.model.Participant} may be a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.hqdm.model.Activity} or an {@link uk.gov.gchq.hqdm.model.Association}. + */ + public static final HqdmIri PARTICIPANT_IN_ACTIVITY_OR_ASSOCIATION = new HqdmIri(HQDM, + "participant_in_activity_or_association"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.hqdm.model.System} that is a {@link uk.gov.gchq.hqdm.model.Person} or an + * {@link uk.gov.gchq.hqdm.model.Organization}. + */ + public static final HqdmIri PARTY = new HqdmIri(HQDM, "party"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSign} where all the {@link uk.gov.gchq.hqdm.model.Sign}s + * are of the same {@link uk.gov.gchq.hqdm.model.Pattern}. + */ + public static final HqdmIri PATTERN = new HqdmIri(HQDM, "pattern"); + + /** + * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link #TEMPORAL_PART_OF} some + * {@link uk.gov.gchq.hqdm.model.PossibleWorld}. + */ + public static final HqdmIri PERIOD_OF_TIME = new HqdmIri(HQDM, "period_of_time"); + + /** + * A {@link uk.gov.gchq.hqdm.model.BiologicalSystem} that is also, a + * {@link uk.gov.gchq.hqdm.model.StateOfPerson}, and a {@link uk.gov.gchq.hqdm.model.Party} that is + * a human being. + */ + public static final HqdmIri PERSON = new HqdmIri(HQDM, "person"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPosition}, that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfPerson}, and an + * {@link uk.gov.gchq.hqdm.model.InstalledObject} that is a {@link uk.gov.gchq.hqdm.model.Person} + * while they are in a {@link uk.gov.gchq.hqdm.model.Position} and also the + * {@link uk.gov.gchq.hqdm.model.Position} while it is filled by the + * {@link uk.gov.gchq.hqdm.model.Person}. + */ + public static final HqdmIri PERSON_IN_POSITION = new HqdmIri(HQDM, "person_in_position"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Individual} that consists of a distribution of matter and/or + * energy. + */ + public static final HqdmIri PHYSICAL_OBJECT = new HqdmIri(HQDM, "physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is some characteristic that is the same for + * each {@link uk.gov.gchq.hqdm.model.State} that possesses it (is a {@link #MEMBER_OF} it). + */ + public static final HqdmIri PHYSICAL_PROPERTY = new HqdmIri(HQDM, "physical_property"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfState} where each member of the set is a member of a + * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} within the range. + */ + public static final HqdmIri PHYSICAL_PROPERTY_RANGE = new HqdmIri(HQDM, "physical_property_range"); + + /** + * A {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} is a + * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} that is a measurable quantity of a + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty}. + */ + public static final HqdmIri PHYSICAL_QUANTITY = new HqdmIri(HQDM, "physical_quantity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange} that ranges over + * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} values. + */ + public static final HqdmIri PHYSICAL_QUANTITY_RANGE = new HqdmIri(HQDM, "physical_quantity_range"); + + /** + * A {@link uk.gov.gchq.hqdm.model.PossibleWorld} that some {@link uk.gov.gchq.hqdm.model.Party} + * would like to bring about. + */ + public static final HqdmIri PLAN = new HqdmIri(HQDM, "plan"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Event} that is all of space at an instant from some viewpoint. + */ + public static final HqdmIri POINT_IN_TIME = new HqdmIri(HQDM, "point_in_time"); + + /** + * An {@link uk.gov.gchq.hqdm.model.OrganizationComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfPosition} that may be held by a + * {@link uk.gov.gchq.hqdm.model.Person}. + */ + public static final HqdmIri POSITION = new HqdmIri(HQDM, "position"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Individual} that is a complete spatio-temporal history of some + * possible world. + */ + public static final HqdmIri POSSIBLE_WORLD = new HqdmIri(HQDM, "possible_world"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney} that is the {@link #CONSIDERATION_BY_CLASS} + * in an {@link uk.gov.gchq.hqdm.model.Offering}. + */ + public static final HqdmIri PRICE = new HqdmIri(HQDM, "price"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is a set of + * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} sold under a brand name. + */ + public static final HqdmIri PRODUCT_BRAND = new HqdmIri(HQDM, "product_brand"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Offering} that is for a + * {@link uk.gov.gchq.hqdm.model.SalesProduct}. + */ + public static final HqdmIri PRODUCT_OFFERING = new HqdmIri(HQDM, "product_offering"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} where two or more parties determine + * a course of action. + */ + public static final HqdmIri REACHING_AGREEMENT = new HqdmIri(HQDM, "reaching_agreement"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfLanguageCommunity} that recognizes what a + * {@link uk.gov.gchq.hqdm.model.Pattern} is intended to represent. + */ + public static final HqdmIri RECOGNIZING_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "recognizing_language_community"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AbstractObject} that is what one + * {@link uk.gov.gchq.hqdm.model.Thing} has to do with one or more others. + */ + public static final HqdmIri RELATIONSHIP = new HqdmIri(HQDM, "relationship"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfRepresentation} where the + * {@link uk.gov.gchq.hqdm.model.Sign} in all the members are members of the + * {@link uk.gov.gchq.hqdm.model.Pattern} specified. + */ + public static final HqdmIri REPRESENTATION_BY_PATTERN = new HqdmIri(HQDM, "representation_by_pattern"); + + /** + * An {@link uk.gov.gchq.hqdm.model.Association} of a {@link uk.gov.gchq.hqdm.model.Sign} and a + * {@link uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity} that recognizes the + * {@link uk.gov.gchq.hqdm.model.Sign} as representing some {@link uk.gov.gchq.hqdm.model.Thing}. + */ + public static final HqdmIri REPRESENTATION_BY_SIGN = new HqdmIri(HQDM, "representation_by_sign"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is {@link #PART_OF_PLAN} at least one + * {@link uk.gov.gchq.hqdm.model.Plan} and is {@link #DEFINED_BY} exactly one + * {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri REQUIREMENT = new HqdmIri(HQDM, "requirement"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is the {@link #INTERSECTION_OF} + * one or more {@link uk.gov.gchq.hqdm.model.ClassOfState}. + */ + public static final HqdmIri REQUIREMENT_SPECIFICATION = new HqdmIri(HQDM, "requirement_specification"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfParticipant} where each member participates in the same + * way in an {@link uk.gov.gchq.hqdm.model.Activity} or {@link uk.gov.gchq.hqdm.model.Association}. + */ + public static final HqdmIri ROLE = new HqdmIri(HQDM, "role"); + + /** + * An {@link uk.gov.gchq.hqdm.model.AgreementProcess} that consists of an + * {@link uk.gov.gchq.hqdm.model.OfferAndAcceptanceForGoods} and an + * {@link uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney}. + */ + public static final HqdmIri SALE_OF_GOODS = new HqdmIri(HQDM, "sale_of_goods"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is a set of + * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} sold under the same product name. + */ + public static final HqdmIri SALES_PRODUCT = new HqdmIri(HQDM, "sales_product"); + + /** + * An {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} that is produced in order to be sold. + */ + public static final HqdmIri SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "sales_product_instance"); + + /** + * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is the customer facing + * specification of a version of a {@link uk.gov.gchq.hqdm.model.SalesProduct}. + */ + public static final HqdmIri SALES_PRODUCT_VERSION = new HqdmIri(HQDM, "sales_product_version"); + + /** + * A scale is a function from {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} to the real + * numbers. + */ + public static final HqdmIri SCALE = new HqdmIri(HQDM, "scale"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfSign}, that is also a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}, and a + * {@link uk.gov.gchq.hqdm.model.Participant} that represents some + * {@link uk.gov.gchq.hqdm.model.Thing} for some community in one or more + * {@link #REPRESENTATION_BY_SIGN}. + */ + public static final HqdmIri SIGN = new HqdmIri(HQDM, "sign"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is also an + * {@link uk.gov.gchq.hqdm.model.Activity}. + */ + public static final HqdmIri SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, "socially_constructed_activity"); + + /** + * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is necessarily constructed + * by agreement or at least acquiescence of many people. + */ + public static final HqdmIri SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, "socially_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Thing} that exists in time and space. + */ + public static final HqdmIri SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "spatio_temporal_extent"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Relationship} where each {@link #MEMBER__OF} the + * {@link #SUBCLASS} is a {@link #MEMBER__OF} the {@link #SUPERCLASS}. + */ + public static final HqdmIri SPECIALIZATION = new HqdmIri(HQDM, "specialization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is an + * {@link uk.gov.gchq.hqdm.model.Individual} or a {@link #TEMPORAL_PART_OF} some + * {@link uk.gov.gchq.hqdm.model.Individual}. + */ + public static final HqdmIri STATE = new HqdmIri(HQDM, "state"); + + /** + * A state that is an {@link uk.gov.gchq.hqdm.model.Activity} or a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.Activity}. + */ + public static final HqdmIri STATE_OF_ACTIVITY = new HqdmIri(HQDM, "state_of_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.AmountOfMoney}. + */ + public static final HqdmIri STATE_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "state_of_amount_of_money"); + + /** + * A {@link uk.gov.gchq.hqdm.model.State} that is an {@link uk.gov.gchq.hqdm.model.Association} or a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.Association}. + */ + public static final HqdmIri STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "state_of_association"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.BiologicalObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.BiologicalObject}. + */ + public static final HqdmIri STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "state_of_biological_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} and + * {@link uk.gov.gchq.hqdm.model.StateOfSystem} that is + * {@link uk.gov.gchq.hqdm.model.BiologicalSystem} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.BiologicalSystem}. + */ + public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "state_of_biological_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} and + * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is a + * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent}. + */ + public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "state_of_biological_system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} and + * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.FunctionalObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.FunctionalObject}. + */ + public static final HqdmIri STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "state_of_functional_object"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfSystem}. + */ + public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "state_of_functional_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is a + * {@link uk.gov.gchq.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.SystemComponent}. + */ + public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "state_of_functional_system_component"); + + /** + * A state that is an {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} or a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject}. + */ + public static final HqdmIri STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "state_of_intentionally_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrganization} that is a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.LanguageCommunity}. + */ + public static final HqdmIri STATE_OF_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "state_of_language_community"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is an + * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} or a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject}. + */ + public static final HqdmIri STATE_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, + "state_of_ordinary_biological_object"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.StateOfFunctionalObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject}. + */ + public static final HqdmIri STATE_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, + "state_of_ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is an + * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} or a {@link #TEMPORAL_PART_OF} one. + */ + public static final HqdmIri STATE_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, + "state_of_ordinary_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is an + * {@link uk.gov.gchq.hqdm.model.Organization} or a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.Organization}. + */ + public static final HqdmIri STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "state_of_organization"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.OrganizationComponent}. + */ + public static final HqdmIri STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "state_of_organization_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfSystem} that is a {@link uk.gov.gchq.hqdm.model.Party} or + * a {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.Party}. + */ + public static final HqdmIri STATE_OF_PARTY = new HqdmIri(HQDM, "state_of_party"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem} and + * {@link uk.gov.gchq.hqdm.model.StateOfParty} that is a {@link uk.gov.gchq.hqdm.model.Person} or a + * {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.Person}. + */ + public static final HqdmIri STATE_OF_PERSON = new HqdmIri(HQDM, "state_of_person"); + + /** + * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link uk.gov.gchq.hqdm.model.PhysicalObject} or + * a {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "state_of_physical_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent} that is a + * {@link uk.gov.gchq.hqdm.model.Position} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.Position}. + */ + public static final HqdmIri STATE_OF_POSITION = new HqdmIri(HQDM, "state_of_position"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} that is a + * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} or a {@link #TEMPORAL_PART_OF} one. + */ + public static final HqdmIri STATE_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "state_of_sales_product_instance"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is a + * {@link uk.gov.gchq.hqdm.model.Sign} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.Sign}. + */ + public static final HqdmIri STATE_OF_SIGN = new HqdmIri(HQDM, "state_of_sign"); + + /** + * Any {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.hqdm.model.StateOfActivity}. + */ + public static final HqdmIri STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, + "state_of_socially_constructed_activity"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}. + */ + public static final HqdmIri STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, + "state_of_socially_constructed_object"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.System} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.System}. + */ + public static final HqdmIri STATE_OF_SYSTEM = new HqdmIri(HQDM, "state_of_system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.hqdm.model.SystemComponent}. + */ + public static final HqdmIri STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "state_of_system_component"); + + /** + * An {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is an organized or connected group + * of {@link uk.gov.gchq.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri SYSTEM = new HqdmIri(HQDM, "system"); + + /** + * A {@link uk.gov.gchq.hqdm.model.PhysicalObject} that is a {@link #COMPONENT_OF} a + * {@link uk.gov.gchq.hqdm.model.System} and that can be completely replaced without losing + * identity. + */ + public static final HqdmIri SYSTEM_COMPONENT = new HqdmIri(HQDM, "system_component"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Composition} where the part is the entire {@link #WHOLE} + * spatially, but part of the {@link #WHOLE} temporally. + */ + public static final HqdmIri TEMPORAL_COMPOSITION = new HqdmIri(HQDM, "temporal_composition"); + + /** + * Anything that exists, real or imagined. + */ + public static final HqdmIri THING = new HqdmIri(HQDM, "thing"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} and {@link uk.gov.gchq.hqdm.model.Participant} + * receiving {@link uk.gov.gchq.hqdm.model.Ownership} in a + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership}. + */ + public static final HqdmIri TRANSFEREE = new HqdmIri(HQDM, "transferee"); + + /** + * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that ends one + * {@link uk.gov.gchq.hqdm.model.Ownership} and begins another for + * {@link uk.gov.gchq.hqdm.model.Asset}s that are a {@link #TEMPORAL_PART_OF} the same + * {@link uk.gov.gchq.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri TRANSFER_OF_OWNERSHIP = new HqdmIri(HQDM, "transfer_of_ownership"); + + /** + * A {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} where the + * {@link uk.gov.gchq.hqdm.model.Asset} is a {@link uk.gov.gchq.hqdm.model.MoneyAsset}. + */ + public static final HqdmIri TRANSFER_OF_OWNERSHIP_OF_MONEY = new HqdmIri(HQDM, "transfer_of_ownership_of_money"); + + /** + * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.hqdm.model.Participant} that is a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.hqdm.model.Owner} that is a {@link #PARTICIPANT_IN} one or more + * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership}. + */ + public static final HqdmIri TRANSFEROR = new HqdmIri(HQDM, "transferor"); + + /** + * A plus one {@link uk.gov.gchq.hqdm.model.Function_} for a {@link uk.gov.gchq.hqdm.model.Scale}. + */ + public static final HqdmIri UNIT_OF_MEASURE = new HqdmIri(HQDM, "unit_of_measure"); + + // ======================================================================= + // Associations + // ======================================================================= + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may be aggregated + * into one or more others. + * + *

+ * Note: This has the same meaning as, but different representation to, the + * {@link uk.gov.gchq.hqdm.model.Aggregation} entity type. + *

+ */ + public static final HqdmIri AGGREGATED_INTO = new HqdmIri(HQDM, "aggregated_into"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} + * has exactly one {@link uk.gov.gchq.hqdm.model.Event} that is its beginning. + */ + public static final HqdmIri BEGINNING = new HqdmIri(HQDM, "beginning"); + + /** + * A relationship type where each {@link uk.gov.gchq.hqdm.model.Activity} is the cause of one or + * more {@link uk.gov.gchq.hqdm.model.Event}. + */ + public static final HqdmIri CAUSES = new HqdmIri(HQDM, "causes"); + + /** + * A {@link #CAUSES} relationship type where a {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} + * {@link #CAUSES} exactly one {@link uk.gov.gchq.hqdm.model.BeginningOfOwnership}. + */ + public static final HqdmIri CAUSES_BEGINNING = new HqdmIri(HQDM, "causes_beginning"); + + /** + * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} + * causes a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.ClassOfEvent}. + */ + public static final HqdmIri CAUSES_BY_CLASS = new HqdmIri(HQDM, "causes_by_class"); + + /** + * A {@link #CAUSES} relationship type where a {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} + * {@link #CAUSES} exactly one {@link uk.gov.gchq.hqdm.model.EndingOfOwnership}. + */ + public static final HqdmIri CAUSES_ENDING = new HqdmIri(HQDM, "causes_ending"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} some {@link #MEMBER_OF} which is offered. + */ + public static final HqdmIri CLASS_OF_OFFERED = new HqdmIri(HQDM, "class_of_offered"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.Classification} has exactly one + * classifier. + */ + public static final HqdmIri CLASSIFIER = new HqdmIri(HQDM, "classifier"); + + /** + * A {@link #PART_OF} relationship type where each {@link uk.gov.gchq.hqdm.model.SystemComponent} is + * {@link #PART_OF} exactly one {@link uk.gov.gchq.hqdm.model.System}. + */ + public static final HqdmIri COMPONENT_OF = new HqdmIri(HQDM, "component_of"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.hqdm.model.Price} at which the {@link uk.gov.gchq.hqdm.model.Offering} is + * made. + */ + public static final HqdmIri CONSIDERATION_BY_CLASS = new HqdmIri(HQDM, "consideration_by_class"); + + /** + * A {@link #CONSISTS_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may + * {@link #CONSISTS_OF} one or more other {@link uk.gov.gchq.hqdm.model.Activity}. + */ + public static final HqdmIri CONSISTS_OF = new HqdmIri(HQDM, "consists_of"); + + /** + * A {@link #CONSISTS_OF} relationship subtype where an entity has another {@link CONSISTS_OF} + * relationship. + */ + public static final HqdmIri CONSISTS_OF_ = new HqdmIri(HQDM, "consists_of_"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may consist of + * one or more others. + * + *

+ * Note: This is the inverse of {@link #PART__OF}. + *

+ */ + public static final HqdmIri CONSISTS__OF = new HqdmIri(HQDM, "consists__of"); + + /** + * A relationship type where a {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.KindOfActivity} or + * {@link uk.gov.gchq.hqdm.model.KindOfAssociation} has a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.Role} as a {@link uk.gov.gchq.hqdm.model.Participant} or part. + */ + public static final HqdmIri CONSISTS_OF_BY_CLASS = new HqdmIri(HQDM, "consists_of_by_class"); + + /** + * An inverse {@link #PART__OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} one + * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} {@link #CONSISTS_OF} another + * {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri CONSISTS__OF_BY_CLASS = new HqdmIri(HQDM, "consists__of_by_class"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity} is a + * {@link #PARTICIPANT_IN} each {@link #MEMBER_OF} one or more + * {@link uk.gov.gchq.hqdm.model.RepresentationByPattern}. + */ + public static final HqdmIri CONSISTS_OF_IN_MEMBERS = new HqdmIri(HQDM, "consists_of_in_members"); + + /** + * A {@link #CONSISTS_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} or + * {@link uk.gov.gchq.hqdm.model.Association} {@link #CONSISTS_OF} at least one (for Activity) or + * two (for Association) of {@link uk.gov.gchq.hqdm.model.Participant}. + */ + public static final HqdmIri CONSISTS_OF_PARTICIPANT = new HqdmIri(HQDM, "consists_of_participant"); + + /** + * A {@link #CONSISTS_OF_PARTICIPANT} relationship subtype where an entity has another + * {@link #CONSISTS_OF_PARTICIPANT} relationship. + */ + public static final HqdmIri CONSISTS_OF_PARTICIPANT_ = new HqdmIri(HQDM, "consists_of_participant_"); + + /** + * A {@link #MEMBER_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.Requirement} is + * {@link #DEFINED_BY} exactly one {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri DEFINED_BY = new HqdmIri(HQDM, "defined_by"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may determine one or more + * {@link uk.gov.gchq.hqdm.model.Thing} to be the case. + */ + public static final HqdmIri DETERMINES = new HqdmIri(HQDM, "determines"); + + /** + * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} + * determines a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.Class}. + */ + public static final HqdmIri DETERMINES_BY_CLASS = new HqdmIri(HQDM, "determines_by_class"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Scale} has exactly one + * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} as its {@link #DOMAIN}. + */ + public static final HqdmIri DOMAIN = new HqdmIri(HQDM, "domain"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} + * has exactly one event that is its ending. + */ + public static final HqdmIri ENDING = new HqdmIri(HQDM, "ending"); + + /** + * A {@link #CONSISTS_OF_BY_CLASS} relationship type where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfSystem} has a {@link #MEMBER_OF} one or more + * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} as a component. + */ + public static final HqdmIri HAS_COMPONENT_BY_CLASS = new HqdmIri(HQDM, "has_component_by_class"); + + /** + * A relationship type where each {@link #MEMBER_OF} the class is a {@link #MEMBER_OF} the + * {@link #SUPERCLASS}. + */ + public static final HqdmIri HAS_SUPERCLASS = new HqdmIri(HQDM, "has_superclass"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.FunctionalObject} has one or more + * intended {@link uk.gov.gchq.hqdm.model.Role}(s). + */ + public static final HqdmIri INTENDED_ROLE = new HqdmIri(HQDM, "intended_role"); + + /** + * A relationship type where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalObject} is intended to play one or more + * {@link uk.gov.gchq.hqdm.model.Role}(s). + */ + public static final HqdmIri INTENDED_ROLE_BY_CLASS = new HqdmIri(HQDM, "intended_role_by_class"); + + /** + * A {@code subtype_of} relationship type where each + * {@link uk.gov.gchq.hqdm.model.RequirementSpecification} is the {@link #INTERSECTION_OF} one or + * more {@link uk.gov.gchq.hqdm.model.ClassOfState}. + * + *

+ * Note: The {@link uk.gov.gchq.hqdm.model.RequirementSpecification} is a subtype of each of the + * related {@link uk.gov.gchq.hqdm.model.ClassOfState}. + *

+ */ + public static final HqdmIri INTERSECTION_OF = new HqdmIri(HQDM, "intersection_of"); + + /** + * A meta-relationship type where the {@link uk.gov.gchq.hqdm.model.Classification} of some thing in + * a {@link uk.gov.gchq.hqdm.model.Role} is involved in a + * {@link uk.gov.gchq.hqdm.model.Relationship}. + */ + public static final HqdmIri INVOLVES = new HqdmIri(HQDM, "involves"); + + /** + * A {@code supertype_of} relationship type where each + * {@link uk.gov.gchq.hqdm.model.PhysicalQuantityRange} must have as {@link #LOWER_BOUND} exactly + * one {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. + */ + public static final HqdmIri LOWER_BOUND = new HqdmIri(HQDM, "lower_bound"); + + /** + * A {@code subclass_of} relationship type where when a {@link uk.gov.gchq.hqdm.model.SalesProduct} + * {@link #MEETS_SPECIFICATION} of a {@link uk.gov.gchq.hqdm.model.RequirementSpecification}, each + * {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.SalesProduct} is a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri MEETS_SPECIFICATION = new HqdmIri(HQDM, "meets_specification"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.Classification} has exactly one + * {@link #MEMBER}. + */ + public static final HqdmIri MEMBER = new HqdmIri(HQDM, "member"); + + /** + * A {@link #MEMBER_OF} relationship type where a + * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} is a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri MEMBER_OF = new HqdmIri(HQDM, "member_of"); + + /** + * A {@link #MEMBER_OF} relationship subtype where an entity has another {@link MEMBER_OF} + * relationship that is less constrained in its scope. + */ + public static final HqdmIri MEMBER_OF_ = new HqdmIri(HQDM, "member_of_"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.Thing} may be a member of one or more + * {@link uk.gov.gchq.hqdm.model.Class}. + * + *

+ * Note: This relationship is the same as the entity type + * {@link uk.gov.gchq.hqdm.model.Classification}. + *

+ */ + public static final HqdmIri MEMBER__OF = new HqdmIri(HQDM, "member__of"); + + /** + * A {@link #MEMBER_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.AmountOfMoney} may + * be a {@link #MEMBER_OF} exactly one {@link uk.gov.gchq.hqdm.model.Currency}. + */ + public static final HqdmIri MEMBER_OF_CURRENCY = new HqdmIri(HQDM, "member_of_currency"); + + /** + * A {@link #MEMBER_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Individual} may be + * a {@link #MEMBER_OF} one or more {@link uk.gov.gchq.hqdm.model.KindOfIndividual}. + */ + public static final HqdmIri MEMBER_OF_KIND = new HqdmIri(HQDM, "member_of_kind"); + + /** + * A {@link #MEMBER_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.BiologicalSystem} + * has a natural role that it plays. + * + *

+ * Example: My circulatory system has the natural role of circulating blood around the body. + *

+ */ + public static final HqdmIri NATURAL_ROLE = new HqdmIri(HQDM, "natural_role"); + + /** + * A relationship type where each {@link #MEMBER_OF} the + * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalSystem} naturally participates in the + * {@link uk.gov.gchq.hqdm.model.Role}. + */ + public static final HqdmIri NATURAL_ROLE_BY_CLASS = new HqdmIri(HQDM, "natural_role_by_class"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.hqdm.model.Party} who makes the {@link uk.gov.gchq.hqdm.model.Offering}. + */ + public static final HqdmIri OFFEROR = new HqdmIri(HQDM, "offeror"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Aggregation} has exactly one + * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} as the {@link #PART}. + */ + public static final HqdmIri PART = new HqdmIri(HQDM, "part"); + + /** + * A {@link #PART_OF} relationship type where one {@link uk.gov.gchq.hqdm.model.Activity} may be a + * {@link #PART_OF} one or more others. + */ + public static final HqdmIri PART_OF = new HqdmIri(HQDM, "part_of"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} may be a {@link #PART_OF} one or more + * {@link uk.gov.gchq.hqdm.model.AgreementExecution}. + */ + public static final HqdmIri PART_OF_ = new HqdmIri(HQDM, "part_of_"); + + /** + * A {@link #PART_OF_BY_CLASS} where a {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.Role} is a + * {@link uk.gov.gchq.hqdm.model.Participant} in a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.ClassOfActivity}. + */ + public static final HqdmIri PART_OF_BY_CLASS = new HqdmIri(HQDM, "part_of_by_class"); + + /** + * A {@link #PART_OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.Role} is a {@link #PART_OF} a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.hqdm.model.Class}. + */ + public static final HqdmIri PART_OF_BY_CLASS_ = new HqdmIri(HQDM, "part_of_by_class_"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.Requirement} must be + * {@link #PART_OF} one or more {@link uk.gov.gchq.hqdm.model.Plan}s. + */ + public static final HqdmIri PART_OF_PLAN = new HqdmIri(HQDM, "part_of_plan"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} + * may be {@link #PART_OF} one or more {@link uk.gov.gchq.hqdm.model.PossibleWorld}. + * + *

+ * Note: The relationship is optional because a {@link uk.gov.gchq.hqdm.model.PossibleWorld} is not + * {@link #PART_OF} any other {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. + *

+ */ + public static final HqdmIri PART_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "part_of_possible_world"); + + /** + * An {@link #AGGREGATED_INTO} relationship type where a + * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may be part of another and the whole has + * emergent properties and is more than just the sum of its parts. + */ + public static final HqdmIri PART__OF = new HqdmIri(HQDM, "part__of"); + + /** + * A relationship type where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} is {@link #PART_OF} a + * {@link #MEMBER_OF} some {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri PART__OF_BY_CLASS = new HqdmIri(HQDM, "part__of_by_class"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.Participant} is a + * {@link #PARTICIPANT_IN} an {@link uk.gov.gchq.hqdm.model.Association} or + * {@link uk.gov.gchq.hqdm.model.Activity}. + */ + public static final HqdmIri PARTICIPANT_IN = new HqdmIri(HQDM, "participant_in"); + + /** + * A relationship that is exactly one {@link uk.gov.gchq.hqdm.model.PeriodOfTime} for which the + * {@link uk.gov.gchq.hqdm.model.Offering} is valid. + */ + public static final HqdmIri PERIOD_OFFERED = new HqdmIri(HQDM, "period_offered"); + + /** + * A {@code supertype_of} relationship type where the members of each + * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} in the + * {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange} are members of the + * {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange}. + */ + public static final HqdmIri RANGES_OVER = new HqdmIri(HQDM, "ranges_over"); + + /** + * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} + * references a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.Class}. + */ + public static final HqdmIri REFERENCES_BY_CLASS = new HqdmIri(HQDM, "references_by_class"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may reference one or more + * {@link uk.gov.gchq.hqdm.model.Thing}. + */ + public static final HqdmIri REFERENCES = new HqdmIri(HQDM, "references"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.RepresentationBySign} + * {@link #REPRESENTS} one or more {@link uk.gov.gchq.hqdm.model.Thing}. + */ + public static final HqdmIri REPRESENTS = new HqdmIri(HQDM, "represents"); + + /** + * A relationship type where the {@link uk.gov.gchq.hqdm.model.Thing} is represented by each + * {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.RepresentationByPattern}. + */ + public static final HqdmIri REPRESENTED = new HqdmIri(HQDM, "represented"); + + /** + * A relationship type where the {@link uk.gov.gchq.hqdm.model.Classification} is of a required role + * player for the members of a {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithRestriction}. + */ + public static final HqdmIri REQUIRED_ROLE_PLAYER = new HqdmIri(HQDM, "required_role_player"); + + /** + * The roles that must be filled by members of a + * {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. + */ + public static final HqdmIri ROLES = new HqdmIri(HQDM, "roles"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Specialization} where the + * {@link uk.gov.gchq.hqdm.model.SalesProductVersion} may be sold as a + * {@link uk.gov.gchq.hqdm.model.SalesProduct}. + */ + public static final HqdmIri SOLD_AS = new HqdmIri(HQDM, "sold_as"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Specialization} where the + * {@link uk.gov.gchq.hqdm.model.SalesProduct} is sold under a + * {@link uk.gov.gchq.hqdm.model.ProductBrand}. + */ + public static final HqdmIri SOLD_UNDER = new HqdmIri(HQDM, "sold_under"); + + /** + * A relationship type where each {@link uk.gov.gchq.hqdm.model.Specialization} has exactly one + * {@link uk.gov.gchq.hqdm.model.Class} as {@link #SUBCLASS}. + */ + public static final HqdmIri SUBCLASS = new HqdmIri(HQDM, "subclass"); + + /** + * A relationship type where a {@link uk.gov.gchq.hqdm.model.SalesProductVersion} may have exactly + * one {@link #SUCCESSOR}. + */ + public static final HqdmIri SUCCESSOR = new HqdmIri(HQDM, "successor"); + + /** + * A relationship type where each {@link uk.gov.gchq.hqdm.model.Specialization} has exactly one + * {@link uk.gov.gchq.hqdm.model.Class} as {@link #SUPERCLASS}. + */ + public static final HqdmIri SUPERCLASS = new HqdmIri(HQDM, "superclass"); + + /** + * A {@link #TEMPORAL_PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.State} may be + * a {@link #TEMPORAL_PART_OF} one or more {@link uk.gov.gchq.hqdm.model.Individual}. + * + *

+ * Note: The relationship is optional because an {@link uk.gov.gchq.hqdm.model.Individual} is not + * necessarily a {@link #TEMPORAL_PART_OF} another {@link uk.gov.gchq.hqdm.model.Individual}, yet is + * a {@link #MEMBER_OF} {@link uk.gov.gchq.hqdm.model.State} as well as + * {@link uk.gov.gchq.hqdm.model.Individual}. This applies to all subtypes of + * {@link #TEMPORAL_PART_OF} that are between a {@code state_of_X} and {@code X}. + *

+ */ + public static final HqdmIri TEMPORAL_PART_OF = new HqdmIri(HQDM, "temporal_part_of"); + + /** + * A {@link #TEMPORAL_PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.PeriodOfTime} + * may be a {@link #TEMPORAL_PART_OF} one or more {@link uk.gov.gchq.hqdm.model.PossibleWorld}. + */ + public static final HqdmIri TEMPORAL_PART_OF_ = new HqdmIri(HQDM, "temporal_part_of_"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} + * may be a temporal part of one or more other {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. + */ + public static final HqdmIri TEMPORAL__PART_OF = new HqdmIri(HQDM, "temporal__part_of"); + + /** + * A {@link uk.gov.gchq.hqdm.model.Scale} may have at most one + * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure}. + * + *

+ * Note 1: A {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} may apply to more than one + * {@link uk.gov.gchq.hqdm.model.Scale}. + *

+ * + *

+ * Note 2: A {@link uk.gov.gchq.hqdm.model.Scale} may not have a + * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure}. To have a + * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} the points on the + * {@link uk.gov.gchq.hqdm.model.Scale} must be evenly placed so that adding one means the same + * {@link uk.gov.gchq.hqdm.model.Thing}. This is not true for some + * {@link uk.gov.gchq.hqdm.model.Scale}s such as Rockwell Hardness where the points on the + * {@link uk.gov.gchq.hqdm.model.Scale} are an arbitrary distance apart. A + * {@link uk.gov.gchq.hqdm.model.Scale} will also not have a + * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} when it is a dimensionless + * {@link uk.gov.gchq.hqdm.model.Scale}. + *

+ */ + public static final HqdmIri UNIT = new HqdmIri(HQDM, "unit"); + + /** + * A {@code supertype_of} relationship type where each + * {@link uk.gov.gchq.hqdm.model.PhysicalQuantityRange} must have as {@link #UPPER_BOUND} exactly + * one {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. + */ + public static final HqdmIri UPPER_BOUND = new HqdmIri(HQDM, "upper_bound"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} uses + * exactly one {@link uk.gov.gchq.hqdm.model.Scale}. + */ + public static final HqdmIri USES = new HqdmIri(HQDM, "uses"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} + * consists of exactly one REAL as its value. + * + *

+ * Note 1: The members of the data type REAL provide an + * {@link uk.gov.gchq.hqdm.model.Identification} of a real number. + *

+ * + *

+ * Note 2: The relationship name has been renamed from consists of by + * {@link uk.gov.gchq.hqdm.model.Class} to value. + *

+ */ + public static final HqdmIri VALUE_ = new HqdmIri(HQDM, "value_"); + + /** + * A relationship type where an {@link uk.gov.gchq.hqdm.model.Aggregation} has exactly one + * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} as the whole. + */ + public static final HqdmIri WHOLE = new HqdmIri(HQDM, "whole"); +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java new file mode 100755 index 00000000..80ced58c --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java @@ -0,0 +1,44 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +import uk.gov.gchq.hqdm.rdf.exception.IriException; + +/** + * An implementation of Internationalized Resource Identifiers for defining HQDM entities and + * relationship types. + */ +public class HqdmIri extends IRI { + + /** + * Constructs a new IRI to define a HQDM resource. + * + * @param base IRI base namespace. + * @param resource HQDM resource name. + */ + public HqdmIri(final IriBase base, final String resource) { + super(base, resource); + } + + /** + * Constructs a new IRI from a string to define a HQDM resource. + * + * @param iri IRI string. + * @throws IriException If the IRI string is malformed. + */ + public HqdmIri(final String iri) throws IriException { + super(iri); + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java new file mode 100755 index 00000000..547345b4 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java @@ -0,0 +1,128 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Objects; + +import uk.gov.gchq.hqdm.rdf.exception.IriException; + +/** + * An implementation of Internationalized Resource Identifiers. + */ +public class IRI { + + private String resource; + + private String iri; + + /** + * Constructs a new IRI from a base namespace and resource name. + * + * @param base IRI base namespace. + * @param resource Resource name. + */ + public IRI(final IriBase base, final String resource) { + fromString(base.getNamespace() + resource); + } + + /** + * Constructs a new IRI from a string. + * + * @param iri IRI string. + * @throws IriException If the IRI string is malformed. + */ + public IRI(final String iri) throws IriException { + fromString(iri); + } + + /** + * The name of the resource. + * + * @return Resource name. + */ + public String getResource() { + return resource; + } + + /** + * The full IRI string of the resource. + * + * @return IRI string. + */ + public String getIri() { + return iri; + } + + /** + * Convert a {@link String} to an IRI. + * + * @param iri {@link String} + * @throws IriException if the {@link String} is not a valid URL. + */ + private void fromString(final String iri) throws IriException { + try { + new URL(iri); + this.iri = iri; + } catch (final MalformedURLException m) { + throw new IriException("Cannot parse IRI: " + iri); + } + + int index = iri.lastIndexOf('#'); + if (index < 0) { + index = iri.lastIndexOf('/'); + } + if (index < 0) { + throw new IriException("Cannot parse IRI: " + iri); + } else { + this.resource = iri.substring(index + 1); + } + + } + + /** + * Returns the full IRI string value. + * + * @return IRI string. + */ + @Override + public String toString() { + return getIri(); + } + + /** + * Compare to another {@code Object}. + * + * @param object Object to compare. + * @return True if + */ + @Override + public boolean equals(final Object object) { + if (this == object) { + return true; + } + if (!(object instanceof IRI)) { + return false; + } + final IRI other = (IRI) object; + return Objects.equals(this.iri, other.iri); + } + + @Override + public int hashCode() { + return iri.hashCode(); + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java new file mode 100755 index 00000000..1a34d8df --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java @@ -0,0 +1,97 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +import java.util.Objects; + +/** + * The base namespace of an {@link IRI}. + */ +public class IriBase { + + private String prefix; + + private String namespace; + + /** + * Constructs a new blank IriBase. + */ + public IriBase() { + } + + /** + * Constructs a new IriBase with a prefix and namespace. + * + * @param prefix Prefix label for the vocabulary. + * @param namespace URL of the namespace. + */ + public IriBase(final String prefix, final String namespace) { + this.prefix = prefix; + this.namespace = namespace; + } + + /** + * Return the prefix label of the namespace. + * + * @return Namespace prefix. + */ + public String getPrefix() { + return prefix; + } + + /** + * Set the prefix label for the namespace. + * + * @param prefix Namespace prefix. + */ + public void setPrefix(final String prefix) { + this.prefix = prefix; + } + + /** + * Return the URL of the namespace. + * + * @return Namespace URL. + */ + public String getNamespace() { + return namespace; + } + + /** + * Set the URL of the namespace. + * + * @param namespace Namespace URL. + */ + public void setNamespace(final String namespace) { + this.namespace = namespace; + } + + @Override + public boolean equals(final Object object) { + if (this == object) { + return true; + } + if (!(object instanceof IriBase)) { + return false; + } + final IriBase iri = (IriBase) object; + return Objects.equals(namespace, iri.namespace); + } + + @Override + public int hashCode() { + return Objects.hash(namespace); + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java new file mode 100755 index 00000000..8ecb42a0 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java @@ -0,0 +1,71 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +/** + * RDF Schema IRI definitions. + */ +public final class RDFS { + + private RDFS() { + } + + /** + * Base namespace of the RDF Concepts Vocabulary (RDF). + * + *

+ * RDF Schema for the RDF vocabulary terms in the RDF Namespace. + *

+ * + * @see https://www.w3.org/TR/rdf-schema/ + */ + public static final IriBase RDF = new IriBase("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); + + /** + * {@code rdf:type} is an instance of {@code rdf:Property} that is used to state that a resource is + * an instance of a class. + */ + public static final IRI RDF_TYPE = new IRI(RDF, "type"); + + /** + * Base namespace of the RDF Schema vocabulary (RDFS). + * + *

+ * RDF Schema provides a data-modelling vocabulary for RDF data. RDF Schema is an extension of the + * basic RDF vocabulary. + *

+ * + * @see https://www.w3.org/TR/rdf-schema/ + */ + public static final IriBase RDFS = new IriBase("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); + + /** + * This is the class of resources that are RDF classes. + */ + public static final IRI RDFS_CLASS = new IRI(RDFS, "class"); + + /** + * The class {@code rdfs:Literal} is the class of literal values such as strings and integers. + * Property values such as textual strings are examples of RDF literals. + */ + public static final IRI RDFS_LITERAL = new IRI(RDFS, "Literal"); + + /** + * The property {@code rdfs:subClassOf} is an instance of {@code rdf:Property} that is used to state + * that all the instances of one class are instances of another. + */ + public static final IRI RDFS_SUB_CLASS_OF = new IRI(RDFS, "subClassOf"); + +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java new file mode 100644 index 00000000..d568aa4e --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes for constructing and using Internationalized Resource Identifiers (IRIs) with HQDM + * objects. + */ +package uk.gov.gchq.hqdm.rdf.iri; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java new file mode 100644 index 00000000..0ff045be --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes for constructing HQDM entities as Java objects. + */ +package uk.gov.gchq.hqdm.rdf; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java new file mode 100644 index 00000000..820283d3 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java @@ -0,0 +1,65 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.util; + +/** + * A utility Pair with Left (L) and Right (R) values. L the type of the Left element. R the type of + * the Right element. + */ +public class Pair { + /** The left element. */ + private L left; + + /** The right element. */ + private R right; + + /** + * All args constructor. + * + * @param left The Left element of type L. + * @param right The Right element of type R. + */ + public Pair(final L left, final R right) { + this.left = left; + this.right = right; + } + + /** + * Getter for the Left element. + * + * @return The left element of type L. + */ + public L getLeft() { + return left; + } + + /** + * Getter for the right element. + * + * @return The right element of type R. + */ + public R getRight() { + return right; + } + + /** + * Convert a Pair to a {@link String}. + * + * @return {@link String}. + */ + public String toString() { + return "{ left=" + left + ", right=" + right + "}"; + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java new file mode 100755 index 00000000..c1e6495d --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java @@ -0,0 +1,70 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.util; + +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.rdf.iri.IRI; + +/** + * Convert Things to Triple strings. + */ +public abstract class Triples { + + private static final Pattern DATE_PATTERN = Pattern.compile("\\d{4}-\\d{2}-\\d{2}"); + private static final Pattern DATE_TIME_PATTERN = Pattern.compile("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.*"); + + /** + * Convert a thing to triples. + * + * @param thing The {@link Thing} to convert. + * @return A string of RDF triples. + */ + public static String toTriples(final Thing thing) { + final String predicatesString = thing.getPredicates().entrySet().stream().map(predicate -> { + final String predicateString = "<" + predicate.getKey().toString() + "> "; + + return predicate.getValue().stream().map(value -> predicateString + toTripleString(value)) + .collect(Collectors.joining(";\n")); + }).collect(Collectors.joining(";\n")); + + return '<' + thing.getId() + "> " + predicatesString + ".\n"; + } + + /** + * Convert an object to a triple string. + * + * @param object The object to convert. + * @return {@link String}. + */ + private static String toTripleString(final Object object) { + final String stringValue = object.toString(); + if (object instanceof IRI) { + return '<' + stringValue + '>'; + } else if (DATE_TIME_PATTERN.matcher(stringValue).matches()) { + return "\"" + object + "\"^^"; + } else if (DATE_PATTERN.matcher(stringValue).matches()) { + return "\"" + object + "\"^^"; + } else if (object instanceof String) { + return "\"\"\"" + object + "\"\"\"^^"; + } else if (object instanceof Integer || object instanceof Long) { + return "\"" + object + "\"^^"; + } else { + return "\"\"\"" + stringValue + "\"\"\""; + } + } +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java new file mode 100644 index 00000000..bec31c22 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Utility classes for hqdm-rdf. + */ +package uk.gov.gchq.hqdm.rdf.util; diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java new file mode 100644 index 00000000..1f6ae385 --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java @@ -0,0 +1,111 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; +import java.util.Set; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.exception.HqdmException; +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.hqdm.rdf.util.Pair; + +/** + * Tests for the {@link HqdmObjectFactory}. + */ +public class HqdmObjectFactoryTest { + + /** + * Test creating a new HQDM Object successfully. + */ + @Test + public void testCreateNewObjectSuccess() { + final var personId = "person1"; + final var personIri = new IRI(HQDM.HQDM, personId); + + // Create a new person with an ENTITY_NAME. + final var person = HqdmObjectFactory.create(HQDM.PERSON, personIri); + person.addValue(HQDM.ENTITY_NAME.getIri(), personId); + + // Assert the ENTITY_NAME and person IRI are as expected. + assertNotNull(person); + assertEquals(Set.of(personId), person.value(HQDM.ENTITY_NAME.getIri())); + assertEquals(personIri.getIri(), person.getId()); + } + + /** + * Test creating a new HQDM Object that fails. + */ + @Test(expected = HqdmException.class) + public void testCreateNewObjectFail() { + final var personId = "person1"; + final var personIri = new IRI(HQDM.HQDM, personId); + + // Create a new person. + HqdmObjectFactory.create(new HqdmIri("http://bad/base#bad"), personIri); + } + + /** + * Test successfully creating an object with a list of predicates. + */ + @Test + public void testCreateObjectWithPredicatesSuccess() { + final var personId = "person1"; + final var personIri = new IRI(HQDM.HQDM, personId); + + final var person = HqdmObjectFactory.create(personIri.getIri(), + List.of(new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri()), + new Pair<>(HQDM.ENTITY_NAME.getIri(), personId), + new Pair<>(HQDM.MEMBER_OF_KIND.getIri(), "PERSON_KIND"))); + + // Assert the values are correct. + assertNotNull(person); + assertEquals(Set.of(personId), person.value(HQDM.ENTITY_NAME.getIri())); + assertEquals(Set.of("PERSON_KIND"), person.value(HQDM.MEMBER_OF_KIND.getIri())); + assertEquals(personIri.getIri(), person.getId()); + } + + /** + * Test successfully creating an object with a list of predicates and multiple HQDM interfaces as + * rdf:type. + */ + @Test + public void testCreateObjectWithMultipleInterfacesSuccess() { + final var personId = "person1"; + final var personIri = new IRI(HQDM.HQDM, personId); + + final var person = HqdmObjectFactory.create(personIri.getIri(), + List.of(new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri()), + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri()), + new Pair<>(HQDM.ENTITY_NAME.getIri(), personId))); + + // Assert the values are correct. + assertNotNull(person); + assertTrue(person instanceof Person); + assertTrue(person instanceof Participant); + assertEquals(Set.of(personId), person.value(HQDM.ENTITY_NAME.getIri())); + assertEquals(personIri.getIri(), person.getId()); + } +} diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java new file mode 100644 index 00000000..a4a92174 --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.iri; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.exception.IriException; + +/** + * Tests for the {@link HqdmObjectFactory}. + */ +public class IriTest { + + /** + * Test creating a new IRI successfully with IRI address. + */ + @Test + public void testCreateIriSuccess() { + final var iri = new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"); + + assertEquals(RDFS.RDF_TYPE.getIri(), iri.getIri()); + assertEquals("type", iri.getResource()); + assertEquals(iri.getIri(), iri.toString()); + } + + /** + * Test creating a new IRI successfully with IriBase and resource . + */ + @Test + public void testCreateIriWithIriBaseSuccess() { + final var iri = new IRI(new IriBase("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"), "type"); + + assertEquals(RDFS.RDF_TYPE.getIri(), iri.getIri()); + assertEquals("type", iri.getResource()); + assertEquals(iri.getIri(), iri.toString()); + } + + /** + * Test creating a new IRI that fails. + */ + @Test(expected = IriException.class) + public void testCreateIriFail() { + new IRI("bad iri"); + } +} diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java new file mode 100644 index 00000000..3253d41e --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.rdf.util; + +import static org.junit.Assert.assertEquals; + +import java.util.List; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.hqdm.rdf.iri.RDFS; + +/** + * Tests for the {@link Triples} class. + */ +public class TriplesTest { + + private static final String EXPECTED1 = """ + \"\"\"PERSON_KIND\"\"\"^^; + \"\"\"person1\"\"\"^^; + \"\"\"http://www.semanticweb.org/hqdm#participant\"\"\"^^; + \"\"\"http://www.semanticweb.org/hqdm#person\"\"\"^^. + """; + + /** + * Test successfully converting an object to triples. + */ + @Test + public void testCreateObjectWithPredicatesSuccess() { + // Create an object for the test. + final var personId = "person1"; + final var personIri = new IRI(HQDM.HQDM, personId); + + final var person = HqdmObjectFactory.create(personIri.getIri(), + List.of(new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PERSON.getIri()), + new Pair<>(RDFS.RDF_TYPE.getIri(), HQDM.PARTICIPANT.getIri()), + new Pair<>(HQDM.ENTITY_NAME.getIri(), personId), + new Pair<>(HQDM.MEMBER_OF_KIND.getIri(), "PERSON_KIND"))); + + // Convert the object to a triples string. + final var triples = Triples.toTriples(person); + + // Assert the values are correct. + assertEquals(EXPECTED1, triples); + } +} diff --git a/hqdm/pom.xml b/hqdm/pom.xml new file mode 100644 index 00000000..d6a98837 --- /dev/null +++ b/hqdm/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 1.1-SNAPSHOT + + + uk.gov.gchq.magma-core + hqdm + 1.1-SNAPSHOT + + hqdm + + + UTF-8 + 15 + + + + + junit + junit + + + + diff --git a/hqdm/src/main/java/module-info.java b/hqdm/src/main/java/module-info.java new file mode 100644 index 00000000..7697da41 --- /dev/null +++ b/hqdm/src/main/java/module-info.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes for constructing HQDM objects in java. + */ +module uk.gov.gchq.hqdm { + exports uk.gov.gchq.hqdm.exception; + exports uk.gov.gchq.hqdm.model; + exports uk.gov.gchq.hqdm.services; +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java new file mode 100644 index 00000000..9db6ebb0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java @@ -0,0 +1,65 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.exception; + +/** + * Superclass of exceptions arising from HQDM code. + */ +public class HqdmException extends RuntimeException { + + /** + * Constructs a new HqdmException with null as its detail message. The cause is not initialized, and + * may subsequently be initialized by a call to {@link #initCause(Throwable)}. + */ + public HqdmException() { + super(); + } + + /** + * Constructs a new HqdmException with the specified detail message. The cause is not initialized, + * and may subsequently be initialized by a call to {@link #initCause(Throwable)}. + * + * @param message The detail message. The detail message is saved for later retrieval by the + * {@link #getMessage()} method. + */ + public HqdmException(final String message) { + super(message); + } + + /** + * Constructs a new HqdmException with the specified cause and a detail message of (cause==null ? + * null : cause.toString()) (which typically contains the class and detail message of cause). + * + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). (A + * {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public HqdmException(final Throwable cause) { + super(cause); + } + + /** + * Constructs a new HqdmException with the specified detail message and cause. + * + * @param message The detail message (which is saved for later retrieval by the + * {@link #getMessage()} method). + * @param cause The cause (which is saved for later retrieval by the {@link #getCause()} method). + * (A {@code null} value is permitted, and indicates that the cause is nonexistent or + * unknown.) + */ + public HqdmException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java new file mode 100644 index 00000000..919ba098 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Exceptions arising from HQDM code. + */ +package uk.gov.gchq.hqdm.exception; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java new file mode 100755 index 00000000..ea7ee1cd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Thing} that does not exist in space or time. + */ +public interface AbstractObject extends Thing { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java new file mode 100755 index 00000000..43794bbe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} that is the acceptance of an {@link Offer} as + * {@code part_of} an {@link AgreeContract}. + */ +public interface AcceptanceOfOffer extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java new file mode 100755 index 00000000..500870c3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ReachingAgreement} that consists of one or more {@link Offer}s of a + * {@link TransferOfOwnershipOfMoney} for a {@link TransferOfOwnership} of goods where one + * {@link Offer} is accepted. + */ +public interface AcceptanceOfOfferForGoods extends AcceptanceOfOffer { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java new file mode 100755 index 00000000..9b97f190 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Individual} that consists of its {@link Participant}s and causes some {@link Event}. + */ +public interface Activity extends Individual, StateOfActivity, ParticipantInActivityOrAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java new file mode 100755 index 00000000..91ba98da --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Relationship} where the whole is at least the sum of the parts. + */ +public interface Aggregation extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java new file mode 100755 index 00000000..ad159058 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ReachingAgreement} that consists of an {@link Offer} of some {@link Thing} in exchange + * for some consideration, and an {@link AcceptanceOfOffer}. + */ +public interface AgreeContract extends ReachingAgreement { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java new file mode 100755 index 00000000..7b495ed9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} where two or more parties carry out a course of action + * previously agreed upon. + */ +public interface AgreementExecution extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java new file mode 100755 index 00000000..ee630647 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} that consists of a {@link ReachingAgreement} and an + * {@link AgreementExecution}, where the {@link AgreementExecution} is the course of action agreed + * to in the {@link ReachingAgreement}. + */ +public interface AgreementProcess extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java new file mode 100755 index 00000000..87610bc0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfAmountOfMoney}, that is also a {@link SociallyConstructedObject}, and a + * {@link PhysicalObject} that is intended and accepted for use as a means of exchange. + */ +public interface AmountOfMoney extends + StateOfAmountOfMoney, + SociallyConstructedObject, + PhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java new file mode 100755 index 00000000..4206d6fd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPhysicalObject} that is also a {@link Participant} that is the + * {@code participant_in} an {@link Ownership} that is owned. + */ +public interface Asset extends Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java new file mode 100755 index 00000000..afd1f932 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Individual} that {@code consists_of} the {@link Participant}s that are associated, and + * where the {@link Participant}s are {@code part_of} the same {@link PeriodOfTime}. + */ +public interface Association extends + Individual, + StateOfAssociation, + ParticipantInActivityOrAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java new file mode 100755 index 00000000..8ab7bec8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Event} that is the {@code beginning} of an {@link Ownership}. + */ +public interface BeginningOfOwnership extends Event { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java new file mode 100755 index 00000000..2cb45c05 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfBiologicalObject} that is also a {@link PhysicalObject} that sustains itself and + * reproduces. + */ +public interface BiologicalObject extends + StateOfBiologicalObject, + PhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java new file mode 100755 index 00000000..f2fe6a7c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link System} that is also an {@link OrdinaryBiologicalObject} and a + * {@link StateOfBiologicalSystem}. + */ +public interface BiologicalSystem extends + OrdinaryBiologicalObject, + StateOfBiologicalSystem, + System { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java new file mode 100755 index 00000000..8da9fee6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link BiologicalObject}, {@link StateOfBiologicalSystemComponent} and {@link SystemComponent} + * that is any {@link BiologicalObject} that is also a {@link SystemComponent}. + */ +public interface BiologicalSystemComponent extends + BiologicalObject, + StateOfBiologicalSystemComponent, + SystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java new file mode 100755 index 00000000..af61c5bf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AbstractObject} that has members and whose identity is defined by its membership. + */ +public interface Class extends AbstractObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java new file mode 100755 index 00000000..fdb96452 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Class} that is {@link AbstractObject} or any its subsets. + */ +public interface ClassOfAbstractObject extends Class { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java new file mode 100755 index 00000000..24168781 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIndividual} and a {@link ClassOfStateOfActivity} that is {@link Activity} or any + * of its possible subsets. + */ +public interface ClassOfActivity extends ClassOfIndividual, ClassOfStateOfActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java new file mode 100755 index 00000000..bddd2c3b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfReachingAgreement} that is {@link AgreeContract} or any of its subsets. + */ +public interface ClassOfAgreeContract extends ClassOfReachingAgreement { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java new file mode 100755 index 00000000..537c3975 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedActivity} that is {@link AgreementExecution} or any of its + * subsets. + */ +public interface ClassOfAgreementExecution extends ClassOfSociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java new file mode 100755 index 00000000..4327214a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedActivity} that is {@link AgreementProcess} or any of its + * subsets. + */ +public interface ClassOfAgreementProcess extends ClassOfSociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java new file mode 100755 index 00000000..6bd0821d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfAmountOfMoney}, that is also a {@link ClassOfSociallyConstructedObject}, + * and a {@link ClassOfPhysicalObject} that is {@link AmountOfMoney} or any of its subsets. + */ +public interface ClassOfAmountOfMoney + extends ClassOfStateOfAmountOfMoney, ClassOfSociallyConstructedObject, ClassOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java new file mode 100755 index 00000000..8c25959b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfAssociation} that is also a {@link ClassOfIndividual} that is + * {@link Association} or any of its subsets. + */ +public interface ClassOfAssociation extends ClassOfIndividual, ClassOfStateOfAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java new file mode 100755 index 00000000..124f63c1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalObject} and {@link ClassOfPhysicalObject} that is + * {@link BiologicalObject} or any of its subsets. + */ +public interface ClassOfBiologicalObject extends ClassOfStateOfBiologicalObject, ClassOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java new file mode 100755 index 00000000..b76639dd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalSystem}, {@link ClassOfOrdinaryBiologicalObject}, and + * {@link ClassOfSystem} that is {@link BiologicalSystem} or any of its subsets. + */ +public interface ClassOfBiologicalSystem + extends ClassOfStateOfBiologicalSystem, ClassOfOrdinaryBiologicalObject, ClassOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java new file mode 100755 index 00000000..f72ad8f8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalObject}, {@link ClassOfStateOfBiologicalSystemComponent}, and + * {@link ClassOfSystemComponent} that is {@link BiologicalSystemComponent} or any of its subsets. + */ +public interface ClassOfBiologicalSystemComponent + extends ClassOfBiologicalObject, ClassOfStateOfBiologicalSystemComponent, ClassOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java new file mode 100755 index 00000000..62cdb1c1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Class} that is {@link Class} or any of its subsets. + * + *

+ * Note: More formally this means that any {@code member_of} the powerset of class is a valid + * {@code member_of} {@link ClassOfClass}. + *

+ */ +public interface ClassOfClass extends ClassOfAbstractObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java new file mode 100755 index 00000000..32244edd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfClass} that is {@link ClassOfSpatioTemporalExtent} or any of its subsets. + */ +public interface ClassOfClassOfSpatioTemporalExtent extends ClassOfClass { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java new file mode 100755 index 00000000..14b9a49f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAgreementExecution} that is {@link ContractExecution} or any of its subsets. + */ +public interface ClassOfContractExecution extends ClassOfAgreementExecution { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java new file mode 100755 index 00000000..a1d4a9e6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAgreementProcess} that is {@link ContractProcess} or any of its subsets. + */ +public interface ClassOfContractProcess extends ClassOfAgreementProcess { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java new file mode 100755 index 00000000..5317c54e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSpatioTemporalExtent} that is {@link Event} or any of its possible subsets. + */ +public interface ClassOfEvent extends ClassOfSpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java new file mode 100755 index 00000000..9b239482 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPhysicalObject}, {@link ClassOfIntentionallyConstructedObject}, and + * {@link ClassOfStateOfFunctionalObject} that is {@link FunctionalObject} or any of its subsets. + */ +public interface ClassOfFunctionalObject + extends ClassOfPhysicalObject, ClassOfIntentionallyConstructedObject, ClassOfStateOfFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java new file mode 100755 index 00000000..ef55e298 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfFunctionalSystem}, that is also a {@link ClassOfOrdinaryFunctionalObject}, + * and a {@link ClassOfSystem} that is {@link FunctionalSystem} or any of its subsets. + */ +public interface ClassOfFunctionalSystem + extends ClassOfStateOfFunctionalSystem, ClassOfOrdinaryFunctionalObject, ClassOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java new file mode 100755 index 00000000..70ea8f6a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfFunctionalSystemComponent}, and {@link ClassOfSystemComponent} that is + * {@link FunctionalSystemComponent} and any of its subsets. + */ +public interface ClassOfFunctionalSystemComponent + extends ClassOfStateOfFunctionalSystemComponent, ClassOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java new file mode 100755 index 00000000..5982e81b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalSystemComponent}, that is also a + * {@link ClassOfStateOfOrdinaryBiologicalObject}, and a {@link ClassOfInstalledObject} that is + * {@link InPlaceBiologicalComponent} or any of its subsets. + */ +public interface ClassOfInPlaceBiologicalComponent extends ClassOfStateOfBiologicalSystemComponent, + ClassOfStateOfOrdinaryBiologicalObject, ClassOfInstalledObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java new file mode 100755 index 00000000..0b3f3fab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link Individual} or any of its subsets. + * + *

+ * Note: Only a class that necessarily applies to an {@link Individual} for the whole of its life + * are valid members. Others are members of {@link ClassOfState} and apply to the {@link State} that + * is the {@link Individual} for the period of time that the {@link Class} applies for. + *

+ */ +public interface ClassOfIndividual extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java new file mode 100755 index 00000000..0d7d4ae6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfFunctionalSystemComponent} that is also a {@link ClassOfInstalledObject} + * that is {@link InstalledFunctionalSystemComponent} and any of its subsets. + */ +public interface ClassOfInstalledFunctionalSystemComponent + extends ClassOfStateOfFunctionalSystemComponent, ClassOfInstalledObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java new file mode 100755 index 00000000..dd4a092f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSystemComponent} that is also a + * {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link InstalledObject} or any of its + * subsets. + */ +public interface ClassOfInstalledObject extends ClassOfStateOfSystemComponent, ClassOfStateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..448182e1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIndividual} that is also a {@link ClassOfStateOfIntentionallyConstructedObject} + * that is {@link IntentionallyConstructedObject} or any of its subsets. + */ +public interface ClassOfIntentionallyConstructedObject + extends ClassOfIndividual, ClassOfStateOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java new file mode 100755 index 00000000..180c5fc4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedActivity} that is {@link Offer} or any of its subsets. + */ +public interface ClassOfOffer extends ClassOfSociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..1c420431 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalObject}, {@link ClassOfOrdinaryPhysicalObject} and + * {@link ClassOfStateOfOrdinaryBiologicalObject} that is {@link OrdinaryBiologicalObject} or any of + * its subsets. + */ +public interface ClassOfOrdinaryBiologicalObject + extends ClassOfBiologicalObject, ClassOfStateOfOrdinaryBiologicalObject, ClassOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..beda39e6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryFunctionalObject}, that is also a {@link ClassOfFunctionalObject}, + * and a {@link ClassOfOrdinaryPhysicalObject} that is {@link OrdinaryFunctionalObject} or any of + * its subsets. + */ +public interface ClassOfOrdinaryFunctionalObject + extends ClassOfStateOfOrdinaryFunctionalObject, ClassOfFunctionalObject, ClassOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..b23794a8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryPhysicalObject} that is also a {@link ClassOfPhysicalObject} that + * is {@link OrdinaryPhysicalObject} or any of its subsets. + */ +public interface ClassOfOrdinaryPhysicalObject extends ClassOfStateOfOrdinaryPhysicalObject, ClassOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java new file mode 100755 index 00000000..492358db --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrganization}, that is also a {@link ClassOfSociallyConstructedObject}, + * and a {@link ClassOfParty} that is {@link Organization} or any of its subsets. + */ +public interface ClassOfOrganization + extends ClassOfStateOfOrganization, ClassOfSociallyConstructedObject, ClassOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java new file mode 100755 index 00000000..a367467c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrganizationComponent}, that is also a {@link ClassOfSystemComponent}, and + * a {@link ClassOfSociallyConstructedObject} that is {@link OrganizationComponent} or any of its + * subsets. + */ +public interface ClassOfOrganizationComponent + extends ClassOfStateOfOrganizationComponent, ClassOfSystemComponent, ClassOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java new file mode 100755 index 00000000..0cbcd345 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPhysicalObject} that is {@link Participant} or any of its subsets. + */ +public interface ClassOfParticipant extends ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java new file mode 100755 index 00000000..3ed12dc6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSystem} that is {@link Party} or any of its subtypes. + */ +public interface ClassOfParty extends ClassOfSystem, ClassOfStateOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java new file mode 100755 index 00000000..76dc170f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link PeriodOfTime} or any of its subsets. + */ +public interface ClassOfPeriodOfTime extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java new file mode 100755 index 00000000..b3255004 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalSystem}, {@link ClassOfStateOfPerson} and {@link ClassOfParty} that is + * {@link Person} or any of its subsets. + */ +public interface ClassOfPerson extends ClassOfBiologicalSystem, ClassOfStateOfPerson, ClassOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java new file mode 100755 index 00000000..dfa72855 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfInstalledObject} that is also a {@link ClassOfStateOfPosition} that is + * {@link PersonInPosition} or any of its subsets. + */ +public interface ClassOfPersonInPosition extends + ClassOfInstalledObject, + ClassOfStateOfPosition { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java new file mode 100755 index 00000000..27c4cdd7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIndividual} and a {@link ClassOfStateOfPhysicalObject} that is + * {@link PhysicalObject} or any of its subsets. + */ +public interface ClassOfPhysicalObject extends ClassOfIndividual, ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java new file mode 100755 index 00000000..9b763ac6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfClassOfSpatioTemporalExtent} that is {@link PhysicalProperty} or any of its + * subsets. + */ +public interface ClassOfPhysicalProperty extends ClassOfClassOfSpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java new file mode 100755 index 00000000..856840c8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPhysicalProperty} that is {@link PhysicalQuantity} or any of its subsets. + */ +public interface ClassOfPhysicalQuantity extends ClassOfPhysicalProperty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java new file mode 100755 index 00000000..8baae101 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfEvent} that is {@link PointInTime} or any of its subsets. + */ +public interface ClassOfPointInTime extends ClassOfEvent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java new file mode 100755 index 00000000..92827e00 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPosition} that is also a {@link ClassOfOrganizationComponent} that is + * {@link Position} or any of its subsets. + */ +public interface ClassOfPosition extends ClassOfStateOfPosition, ClassOfOrganizationComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java new file mode 100755 index 00000000..4588494c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIndividual} that is also a {@link ClassOfPeriodOfTime} that is + * {@link PossibleWorld} or any of its subsets. + */ +public interface ClassOfPossibleWorld extends + ClassOfIndividual, + ClassOfPeriodOfTime { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java new file mode 100755 index 00000000..c58603d6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedActivity} that is {@link ReachingAgreement} or any of its + * subsets. + */ +public interface ClassOfReachingAgreement extends ClassOfSociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java new file mode 100755 index 00000000..5aefa94e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Class} that is {@link Relationship} or any of its subsets. + */ +public interface ClassOfRelationship extends ClassOfAbstractObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java new file mode 100755 index 00000000..528fabde --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAssociation} that is {@link ClassOfRepresentation} or any of + * its subsets. This is omitted, in error, in the original HQDM documentation. + */ +public interface ClassOfRepresentation extends ClassOfAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java new file mode 100755 index 00000000..f471bbc0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSalesProductInstance} that is also a + * {@link ClassOfOrdinaryFunctionalObject} that is {@link SalesProductInstance} or any of its + * subsets. + */ +public interface ClassOfSalesProductInstance + extends ClassOfStateOfSalesProductInstance, ClassOfOrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java new file mode 100755 index 00000000..f02cf5c1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSign} that is also a {@link ClassOfSociallyConstructedObject} that is + * {@link Sign} or any of its subsets. + */ +public interface ClassOfSign extends + ClassOfStateOfSign, + ClassOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java new file mode 100755 index 00000000..9afff60a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedObject} and {@link ClassOfActivity} that is + * {@link SociallyConstructedObject} or any of its subsets. + */ +public interface ClassOfSociallyConstructedActivity extends ClassOfActivity, ClassOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java new file mode 100755 index 00000000..2e42473a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIntentionallyConstructedObject} that is {@link SociallyConstructedObject} or any + * of its subsets. + */ +public interface ClassOfSociallyConstructedObject + extends ClassOfIntentionallyConstructedObject, ClassOfStateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java new file mode 100755 index 00000000..9fc95e80 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Class} that is {@link SpatioTemporalExtent} or any of its subsets. + */ +public interface ClassOfSpatioTemporalExtent extends Class { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java new file mode 100755 index 00000000..bc25605c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSpatioTemporalExtent} that is {@link State} or any of its subsets. + */ +public interface ClassOfState extends ClassOfSpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java new file mode 100755 index 00000000..6047c559 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link StateOfActivity} or any of its subsets. + */ +public interface ClassOfStateOfActivity extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java new file mode 100755 index 00000000..386418e7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSociallyConstructedObject} that is also a + * {@link ClassOfStateOfPhysicalObject} that is {@link StateOfAmountOfMoney} or one of its subsets. + */ +public interface ClassOfStateOfAmountOfMoney extends + ClassOfStateOfSociallyConstructedObject, + ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java new file mode 100755 index 00000000..72dfc5be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link StateOfAssociation} or any of its subsets. + */ +public interface ClassOfStateOfAssociation extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java new file mode 100755 index 00000000..a4b31a6a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfBiologicalObject} or any of its + * subsets. + */ +public interface ClassOfStateOfBiologicalObject extends ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java new file mode 100755 index 00000000..e7c44606 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryBiologicalObject} and {@link ClassOfStateOfSystem} that is + * {@link StateOfBiologicalSystem} or any of its subsets. + */ +public interface ClassOfStateOfBiologicalSystem extends ClassOfStateOfOrdinaryBiologicalObject, ClassOfStateOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java new file mode 100755 index 00000000..c628d9b5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalObject} and {@link ClassOfStateOfSystemComponent} that is + * {@link StateOfBiologicalSystemComponent} or any of its subsets. + */ +public interface ClassOfStateOfBiologicalSystemComponent + extends ClassOfStateOfBiologicalObject, ClassOfStateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java new file mode 100755 index 00000000..a4f518c6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPhysicalObject} and {@link ClassOfStateOfIntentionallyConstructedObject} + * that is {@link StateOfFunctionalObject} or any of its subsets. + */ +public interface ClassOfStateOfFunctionalObject extends + ClassOfStateOfPhysicalObject, + ClassOfStateOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java new file mode 100755 index 00000000..963ff8de --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryFunctionalObject} that is also a {@link ClassOfStateOfSystem} that + * is {@link StateOfFunctionalSystem} or any of its subsets. + */ +public interface ClassOfStateOfFunctionalSystem extends ClassOfStateOfOrdinaryFunctionalObject, ClassOfStateOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java new file mode 100755 index 00000000..b1e4f091 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfFunctionalObject} that is also a + * {@link ClassOfStateOfSystemComponent} that is {@link ClassOfStateOfFunctionalSystemComponent} + * or any of its subsets. + */ +public interface ClassOfStateOfFunctionalSystemComponent extends + ClassOfStateOfFunctionalObject, + ClassOfStateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..e1a04ce6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link StateOfIntentionallyConstructedObject} or any of its + * subsets. + */ +public interface ClassOfStateOfIntentionallyConstructedObject extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..0dfce824 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalObject} that is also a + * {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link StateOfOrdinaryBiologicalObject} or + * any of its subsets. + */ +public interface ClassOfStateOfOrdinaryBiologicalObject + extends ClassOfStateOfBiologicalObject, ClassOfStateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..86886960 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfFunctionalObject} that is also a + * {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link StateOfOrdinaryFunctionalObject} or + * any of its subsets. + */ +public interface ClassOfStateOfOrdinaryFunctionalObject extends + ClassOfStateOfFunctionalObject, + ClassOfStateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..9fd8d338 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfOrdinaryPhysicalObject} or any of + * its subsets. + */ +public interface ClassOfStateOfOrdinaryPhysicalObject extends ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java new file mode 100755 index 00000000..d41b4cf9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSociallyConstructedObject} that is also a {@link ClassOfStateOfParty} that + * is {@link StateOfOrganization} or any of its subsets. + */ +public interface ClassOfStateOfOrganization extends + ClassOfStateOfSociallyConstructedObject, + ClassOfStateOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java new file mode 100755 index 00000000..ec397cfa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSystemComponent} that is also a + * {@link ClassOfStateOfSociallyConstructedObject} that is {@link StateOfOrganizationComponent} or + * any of its subsets. + */ +public interface ClassOfStateOfOrganizationComponent extends + ClassOfStateOfSystemComponent, + ClassOfStateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java new file mode 100755 index 00000000..8c258d1f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSystem} that is {@link StateOfParty} or any of its subtypes. + */ +public interface ClassOfStateOfParty extends ClassOfStateOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java new file mode 100755 index 00000000..440d6676 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfBiologicalSystem} and {@link ClassOfStateOfParty} that is + * {@link StateOfPerson} or any of its subsets. + */ +public interface ClassOfStateOfPerson extends + ClassOfStateOfBiologicalSystem, + ClassOfStateOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java new file mode 100755 index 00000000..75addda2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is {@link StateOfPhysicalObject} or any of its subsets. + */ +public interface ClassOfStateOfPhysicalObject extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java new file mode 100755 index 00000000..80e1248b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrganizationComponent} that is {@link StateOfPosition} and any of its + * subsets. + */ +public interface ClassOfStateOfPosition extends ClassOfStateOfOrganizationComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java new file mode 100755 index 00000000..61c4b351 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryFunctionalObject} that is {@link StateOfSalesProductInstance} or + * any of its subsets. + */ +public interface ClassOfStateOfSalesProductInstance extends ClassOfStateOfOrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java new file mode 100755 index 00000000..a9dcc463 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSociallyConstructedObject} that is {@link StateOfSign} or any of its + * subsets. + */ +public interface ClassOfStateOfSign extends ClassOfStateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java new file mode 100755 index 00000000..2786c096 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSociallyConstructedObject} that is + * {@link StateOfSociallyConstructedObject} or any of its subsets. + */ +public interface ClassOfStateOfSociallyConstructedActivity + extends ClassOfStateOfSociallyConstructedObject, ClassOfStateOfActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java new file mode 100755 index 00000000..0fa95bfe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfIntentionallyConstructedObject} that is + * {@link StateOfSociallyConstructedObject} or one of its subsets. + */ +public interface ClassOfStateOfSociallyConstructedObject extends ClassOfStateOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java new file mode 100755 index 00000000..236f2d0e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link StateOfSystem} or any of its + * subsets. + */ +public interface ClassOfStateOfSystem extends ClassOfStateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java new file mode 100755 index 00000000..52da99c0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfSystemComponent} or any of its + * subsets. + */ +public interface ClassOfStateOfSystemComponent extends ClassOfStateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java new file mode 100755 index 00000000..9962a72a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSystem} that is also a {@link ClassOfOrdinaryPhysicalObject} that is + * {@link System} or any of its subsets. + */ +public interface ClassOfSystem extends + ClassOfStateOfSystem, + ClassOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java new file mode 100755 index 00000000..90eb4a29 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfStateOfSystemComponent} that is also a {@link ClassOfPhysicalObject} that is + * {@link SystemComponent} or any of its subsets. + */ +public interface ClassOfSystemComponent extends ClassOfStateOfSystemComponent, ClassOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java new file mode 100755 index 00000000..cc921790 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Relationship} where a {@link Thing} is a member of a class{@link Class}. + * + *

+ * Note: This entity type is replicated as the {@code member__of} relationship. + *

+ */ +public interface Classification extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java new file mode 100755 index 00000000..b438643a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Aggregation} where the {@code whole} is an arrangement of the parts that results in + * emergent properties. + */ +public interface Composition extends Aggregation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java new file mode 100755 index 00000000..ffa21cab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AgreementExecution} that is the provision of some {@link Thing} in exchange for some + * consideration. + */ +public interface ContractExecution extends AgreementExecution { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java new file mode 100755 index 00000000..520d0ccd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AgreementProcess} that consists of an {@link AgreeContract} and a + * {@link ContractExecution}. + */ +public interface ContractProcess extends AgreementProcess { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java new file mode 100755 index 00000000..4231fe8a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAmountOfMoney} that is the subset of {@link AmountOfMoney} that has as members + * all the money issued by an issuing authority. + */ +public interface Currency extends ClassOfAmountOfMoney { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java new file mode 100755 index 00000000..4b972a9b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Relationship} that is defined by a {@link KindOfRelationshipWithSignature}. + */ +public interface DefinedRelationship extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java new file mode 100755 index 00000000..44de31b8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link RepresentationByPattern} that defines a {@link Class}. + */ +public interface Definition extends RepresentationByPattern { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java new file mode 100755 index 00000000..c1c69fd8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link RepresentationByPattern} that describes some {@link Thing}. + */ +public interface Description extends RepresentationByPattern { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java new file mode 100755 index 00000000..b6704845 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPerson} that is a {@code participant_in} an {@link Employment}. + */ +public interface Employee extends StateOfPerson, Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java new file mode 100755 index 00000000..4c06b5da --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} that is a {@code participant_in} an {@link Employment}. + */ +public interface Employer extends StateOfParty, Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java new file mode 100755 index 00000000..8f1c76d1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Association} that consists of an {@link Employer} and an {@link Employee} where the + * {@link Employer} pays the {@link Employee} to work for them. + */ +public interface Employment extends Association { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java new file mode 100755 index 00000000..49fe17e9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Event} that is the {@code ending} of an {@link Ownership}. + */ +public interface EndingOfOwnership extends Event { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java new file mode 100755 index 00000000..0ea41b30 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Class} where each {@code member__of} the {@link Class} is known. + */ +public interface EnumeratedClass extends Class { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java new file mode 100755 index 00000000..db25bb0a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SpatioTemporalExtent} that has zero temporal thickness and may bound some + * {@link SpatioTemporalExtent}. + */ +public interface Event extends SpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java new file mode 100755 index 00000000..449e38b0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AgreementExecution} that consists of a {@link TransferOfOwnership} of goods and a + * {@link TransferOfOwnershipOfMoney}. + */ +public interface ExchangeOfGoodsAndMoney extends ContractExecution { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java new file mode 100755 index 00000000..9d94d7ca --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A one-to-many {@link Relationship}. + */ +public interface Function_ extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java new file mode 100755 index 00000000..6c3d439e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link IntentionallyConstructedObject} that is also a {@link PhysicalObject} that has an + * {@code intended_role}. + */ +public interface FunctionalObject extends IntentionallyConstructedObject, StateOfFunctionalObject, PhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java new file mode 100755 index 00000000..3b9cd265 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link StateOfFunctionalSystem} that is also an {@link OrdinaryFunctionalObject} and a + * {@link System}. + */ +public interface FunctionalSystem extends System, StateOfFunctionalSystem, OrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java new file mode 100755 index 00000000..6f30b548 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link IntentionallyConstructedObject} that is a replaceable {@code component_of} a + * {@link FunctionalSystem}. + */ +public interface FunctionalSystemComponent extends FunctionalObject, StateOfFunctionalSystemComponent, SystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java new file mode 100755 index 00000000..fb8a7899 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link RepresentationByPattern} that is a surrogate for the {@link Thing} {@code represented}. + */ +public interface Identification extends RepresentationByPattern { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java new file mode 100755 index 00000000..b2eaadb6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Identification} that identifies a {@link PhysicalQuantity}. An + * {@link IdentificationOfPhysicalQuantity} consists of a REAL that is a representation of the + * {@code value_} the physical quantity maps to on the {@link Scale}. + */ +public interface IdentificationOfPhysicalQuantity extends Identification { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java new file mode 100755 index 00000000..efa408af --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link InstalledObject} that is also a {@link StateOfOrdinaryBiologicalObject} and a + * {@link StateOfSystemComponent}. + */ +public interface InPlaceBiologicalComponent + extends StateOfBiologicalSystemComponent, InstalledObject, StateOfOrdinaryBiologicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java new file mode 100755 index 00000000..c5c4398d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SpatioTemporalExtent} that is not a proper {@code temporal_part_of} any other + * {@link Individual} of the same kind. + * + *

+ * Note: In standard mereology a {@link SpatioTemporalExtent} is a part of itself. Parts of an + * {@link Individual} excluding itself are called proper parts. + *

+ */ +public interface Individual extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java new file mode 100755 index 00000000..0f54f8e9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link InstalledObject} that is also a {@link StateOfOrdinaryFunctionalObject} and a + * {@link StateOfFunctionalSystemComponent}. + */ +public interface InstalledFunctionalSystemComponent + extends StateOfFunctionalSystemComponent, InstalledObject, StateOfOrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java new file mode 100755 index 00000000..ebe5c0f3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrdinaryPhysicalObject} that is also a {@link StateOfSystemComponent} that is a + * {@code temporal_part_of} an {@link OrdinaryPhysicalObject} from when it is installed as a + * {@link SystemComponent} to when it is removed. + */ +public interface InstalledObject extends StateOfOrdinaryPhysicalObject, StateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java new file mode 100755 index 00000000..278bef08 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Individual} and {@link StateOfIntentionallyConstructedObject} that is intentionally + * constructed. + * + *

+ * Note: being intentionally constructed means that it is an act of will or agreement that makes it + * what it is. + *

+ */ +public interface IntentionallyConstructedObject extends Individual, StateOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java new file mode 100755 index 00000000..d2ef5ebc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfActivity} all of whose members are of the same kind. + */ +public interface KindOfActivity extends ClassOfActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java new file mode 100755 index 00000000..ba556cc5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAssociation} where all the members are of the same kind. + */ +public interface KindOfAssociation extends ClassOfAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java new file mode 100755 index 00000000..72826ec9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalObject} and a {@link KindOfPhysicalObject} where each {@code member_of} + * a {@link KindOfBiologicalObject} is of the same kind. + */ +public interface KindOfBiologicalObject extends ClassOfBiologicalObject, KindOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java new file mode 100755 index 00000000..6ced24a7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalSystem} that is also a {@link KindOfSystem} all of whose members have a + * natural {@link Role} that they play. + */ +public interface KindOfBiologicalSystem extends ClassOfBiologicalSystem, KindOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java new file mode 100755 index 00000000..c0cb852c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfBiologicalSystemComponent} that is also a {@link KindOfSystemComponent} where all + * the member components play the same {@link Role} in some {@link BiologicalSystem}. + */ +public interface KindOfBiologicalSystemComponent extends ClassOfBiologicalSystemComponent, KindOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java new file mode 100755 index 00000000..c1e4c8fa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfFunctionalObject}, that is also a {@link KindOfPhysicalObject}, and a + * {@link KindOfIntentionallyConstructedObject} where each {@code member_of} a + * {@link KindOfFunctionalObject} is of the same kind. + */ +public interface KindOfFunctionalObject + extends ClassOfFunctionalObject, KindOfPhysicalObject, KindOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java new file mode 100755 index 00000000..10603cc9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfFunctionalSystem} that is also a {@link KindOfSystem} where each + * {@link KindOfFunctionalSystem} has members that are of the same kind. + */ +public interface KindOfFunctionalSystem extends ClassOfFunctionalSystem, KindOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java new file mode 100755 index 00000000..d4391eb1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfFunctionalSystemComponent} that is also a {@link KindOfSystemComponent} where + * each {@code member_of} a {@link KindOfFunctionalSystemComponent} is of the same kind. + */ +public interface KindOfFunctionalSystemComponent extends ClassOfFunctionalSystemComponent, KindOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java new file mode 100755 index 00000000..8b0c6d0f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIndividual} where all the members possess attributes in common. + */ +public interface KindOfIndividual extends ClassOfIndividual { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..562ecd6e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfIntentionallyConstructedObject} that is also a {@link KindOfIndividual} where + * each {@code member_of} a {@link KindOfIntentionallyConstructedObject} is of the same kind. + */ +public interface KindOfIntentionallyConstructedObject extends + ClassOfIntentionallyConstructedObject, + KindOfIndividual { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..bb77bb4c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOrdinaryBiologicalObject} a {@link KindOfOrdinaryPhysicalObject} and a + * {@link KindOfBiologicalObject} where each {@code member_of} a + * {@link KindOfOrdinaryBiologicalObject} is of the same kind. + */ +public interface KindOfOrdinaryBiologicalObject + extends ClassOfOrdinaryBiologicalObject, KindOfBiologicalObject, KindOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..7c0885e9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOrdinaryBiologicalObject}, that is also a {@link KindOfOrdinaryPhysicalObject}, + * and a {@link KindOfBiologicalObject} where each {@code member_of} a + * {@link KindOfOrdinaryBiologicalObject} is of the same kind. + */ +public interface KindOfOrdinaryFunctionalObject + extends ClassOfOrdinaryFunctionalObject, KindOfOrdinaryPhysicalObject, KindOfFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..cccfb712 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOrdinaryPhysicalObject} that is also a {@link KindOfPhysicalObject} where each + * {@link OrdinaryPhysicalObject} has members that are of the same kind. + */ +public interface KindOfOrdinaryPhysicalObject extends ClassOfOrdinaryPhysicalObject, KindOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java new file mode 100755 index 00000000..603cf273 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOrdinaryPhysicalObject} that is also a {@link KindOfPhysicalObject} where each + * {@link OrdinaryPhysicalObject} has members that are of the same kind. + */ +public interface KindOfOrganization extends ClassOfOrganization, KindOfParty, KindOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java new file mode 100755 index 00000000..2c152e97 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOrganizationComponent} that is also a {@link KindOfSystemComponent} whose members + * are all of the same kind. + */ +public interface KindOfOrganizationComponent extends + ClassOfOrganizationComponent, + KindOfSystemComponent, + KindOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java new file mode 100755 index 00000000..d5e41882 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfParty} that is also a {@link KindOfSystem} where all the members are of the same + * kind. + */ +public interface KindOfParty extends ClassOfParty, KindOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java new file mode 100755 index 00000000..19075ddf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPerson} that is also a {@link KindOfParty} whose members are all of the same + * kind. + */ +public interface KindOfPerson extends + KindOfParty, + ClassOfPerson { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java new file mode 100755 index 00000000..f3a8a207 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPhysicalObject} that is also a {@link KindOfIndividual} where each + * {@link PhysicalObject} has members that are of the same kind. + */ +public interface KindOfPhysicalObject extends ClassOfPhysicalObject, KindOfIndividual { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java new file mode 100755 index 00000000..777cc26b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPhysicalProperty} where each {@code member_of} a {@link KindOfPhysicalProperty} + * is of the same kind. + */ +public interface KindOfPhysicalProperty extends ClassOfPhysicalProperty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java new file mode 100755 index 00000000..45354c46 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPhysicalQuantity} that is also a {@link KindOfPhysicalProperty} such that each + * {@code member_of} the same {@link KindOfPhysicalQuantity} is comparable to the others. + */ +public interface KindOfPhysicalQuantity extends + ClassOfPhysicalQuantity, + KindOfPhysicalProperty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java new file mode 100755 index 00000000..b371aee6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfPosition} that is also a {@link KindOfOrganizationComponent} where all the + * members are of the same kind. + */ +public interface KindOfPosition extends ClassOfPosition, KindOfOrganizationComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java new file mode 100755 index 00000000..5a99da52 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link KindOfRelationshipWithSignature} where one or more {@code roles} have fixed players. + */ +public interface KindOfRelationshipWithRestriction extends KindOfRelationshipWithSignature { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java new file mode 100755 index 00000000..24607859 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfRelationship} that is a subset of {@link DefinedRelationship} type where the + * {@link Classification}s involved in each {@link DefinedRelationship} have as {@code classifier}s + * the {@code roles} specified by the {@link KindOfRelationshipWithSignature}. + */ +public interface KindOfRelationshipWithSignature extends ClassOfRelationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java new file mode 100755 index 00000000..b8ebd311 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSociallyConstructedObject} that is also a + * {@link KindOfIntentionallyConstructedObject} where each {@link KindOfSociallyConstructedObject} + * has members that are of the same kind. + */ +public interface KindOfSociallyConstructedObject + extends ClassOfSociallyConstructedObject, KindOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java new file mode 100755 index 00000000..4c344101 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSystem} that is also a {@link KindOfOrdinaryPhysicalObject} where each + * {@code member_of} a {@link KindOfSystem} is of the same kind. + */ +public interface KindOfSystem extends ClassOfSystem, KindOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java new file mode 100755 index 00000000..1f80ec49 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSystemComponent} that is also a {@link KindOfPhysicalObject} where all the + * members are of the same kind. + */ +public interface KindOfSystemComponent extends + ClassOfSystemComponent, + KindOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java new file mode 100755 index 00000000..05b2e458 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java @@ -0,0 +1,28 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Organization} that is a group of people who share a common understanding of a set of + * {@link Sign}s. + * + *

+ * Note: This is not restricted to natural languages, but also controlled languages, taxonomies etc. + *

+ */ +public interface LanguageCommunity extends + StateOfLanguageCommunity, + Organization { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java new file mode 100755 index 00000000..0aa864ad --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Asset} that is a {@link StateOfAmountOfMoney}. + */ +public interface MoneyAsset extends + Asset, + StateOfAmountOfMoney { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java new file mode 100755 index 00000000..da7c7618 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} that proposes an exchange of some {@link Thing} for some + * consideration. + */ +public interface Offer extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java new file mode 100755 index 00000000..ed7fa09a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ReachingAgreement} that {@code consists_of} exactly one {@link Offer} of a + * {@link TransferOfOwnershipOfMoney} for exactly one {@link TransferOfOwnership} that is accepted. + */ +public interface OfferAndAcceptanceForGoods extends AgreeContract { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java new file mode 100755 index 00000000..17757889 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Offer} of an {@link ExchangeOfGoodsAndMoney}. + */ +public interface OfferForGoods extends Offer { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java new file mode 100755 index 00000000..15981162 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfOffer} that is for a {@link ClassOfIndividual}, at a {@link Price}, by a + * {@link Party}, for a {@link PeriodOfTime}. + */ +public interface Offering extends ClassOfOffer { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java new file mode 100755 index 00000000..59ea0466 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrdinaryBiologicalObject}, a {@link BiologicalObject}, and an + * {@link OrdinaryPhysicalObject} that is a {@link BiologicalObject} that does not survive the + * replacement of all of its parts. + */ +public interface OrdinaryBiologicalObject + extends StateOfOrdinaryBiologicalObject, BiologicalObject, OrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java new file mode 100755 index 00000000..9becf158 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java @@ -0,0 +1,25 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link StateOfOrdinaryFunctionalObject} and {@link OrdinaryPhysicalObject} that is a + * {@link FunctionalObject}. + */ +public interface OrdinaryFunctionalObject extends + FunctionalObject, + StateOfOrdinaryFunctionalObject, + OrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java new file mode 100755 index 00000000..a5b9042d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link PhysicalObject} that does not survive changing all its parts at once. + */ +public interface OrdinaryPhysicalObject extends PhysicalObject, StateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java new file mode 100755 index 00000000..e4cfd8c8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrganization}, that is also a {@link Party}, and a + * {@link SociallyConstructedObject} that is an organized body of people. + */ +public interface Organization extends StateOfOrganization, Party, SociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java new file mode 100755 index 00000000..206bb570 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrganizationComponent}, {@link SystemComponent}, and + * {@link SociallyConstructedObject} that is a {@code component_of} an {@link Organization} that can + * be completely replaced without losing its identity. + */ +public interface OrganizationComponent extends + StateOfOrganizationComponent, + SystemComponent, + SociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java new file mode 100755 index 00000000..2d835027 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} that is also a {@link Participant} that is a {@code participant_in} an + * {@link Ownership}. + */ +public interface Owner extends + StateOfParty, + Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java new file mode 100755 index 00000000..5d8bde89 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Association} that {@code consists_of} an {@link Owner} and an {@link Asset} where the + * {@link Owner} owns the {@link Asset}. + */ +public interface Ownership extends Association { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java new file mode 100755 index 00000000..adcd5947 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link State} that is a {@code participant_in} an {@link Activity} or {@link Association}. + */ +public interface Participant extends StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java new file mode 100755 index 00000000..c7ea5bf1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +import uk.gov.gchq.hqdm.pojo.Top; + +/** + * A SELECT where a {@link Participant} may be a {@code participant_in} an {@link Activity} or an + * {@link Association}. + */ +public interface ParticipantInActivityOrAssociation extends Top { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java new file mode 100755 index 00000000..45a327be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} that is also a {@link System} that is a {@link Person} or an + * {@link Organization}. + */ +public interface Party extends StateOfParty, System { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java new file mode 100755 index 00000000..dcd6a938 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSign} where all the {@link Sign}s are of the same {@link Pattern}. + */ +public interface Pattern extends ClassOfSign { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java new file mode 100755 index 00000000..6e543f80 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link State} that is a {@code temporal_part_of} some {@link PossibleWorld}. + */ +public interface PeriodOfTime extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java new file mode 100755 index 00000000..cdbd37ce --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link BiologicalSystem} that is also, a {@link StateOfPerson}, and a {@link Party} that is a + * human being. + */ +public interface Person extends BiologicalSystem, StateOfPerson, Party { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java new file mode 100755 index 00000000..d389dece --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPosition}, that is also a {@link StateOfPerson}, and an {@link InstalledObject} + * that is a {@link Person} while they are in a {@link Position} and also the {@link Position} while + * it is filled by the {@link Person}. + */ +public interface PersonInPosition extends + StateOfPosition, + StateOfPerson, + InstalledObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java new file mode 100755 index 00000000..9aa7f49a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Individual} that consists of a distribution of matter and/or energy. + */ +public interface PhysicalObject extends + Individual, + StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java new file mode 100755 index 00000000..ed2636f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} that is some characteristic that is the same for each {@link State} that + * possesses it (is a {@code member_of} it). + */ +public interface PhysicalProperty extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java new file mode 100755 index 00000000..e110d62b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfState} where each member of the set is a member of a {@link PhysicalProperty} + * within the range. + * + *

+ * Note: The {@link PhysicalPropertyRange} is a supertype of each {@link PhysicalProperty} in the + * range. + *

+ */ +public interface PhysicalPropertyRange extends ClassOfState { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java new file mode 100755 index 00000000..6b3e0eba --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link PhysicalQuantity} is a {@link PhysicalProperty} that is a measurable quantity of a + * {@link KindOfPhysicalProperty}. + */ +public interface PhysicalQuantity extends PhysicalProperty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java new file mode 100755 index 00000000..101529f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link PhysicalPropertyRange} that ranges over {@link PhysicalQuantity} values. + */ +public interface PhysicalQuantityRange extends PhysicalPropertyRange { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java new file mode 100755 index 00000000..35123ac1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link PossibleWorld} that some party would like to bring about. + */ +public interface Plan extends PossibleWorld { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java new file mode 100755 index 00000000..9f448978 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Event} that is all of space at an instant from some viewpoint. + */ +public interface PointInTime extends Event { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java new file mode 100755 index 00000000..9bf35937 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java @@ -0,0 +1,27 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link OrganizationComponent} that is also a {@link StateOfPosition} that may be held by a + * {@link Person}. + * + *

+ * Note: Normally a {@link Position} is held by one {@link Person} at a time, but this does not have + * to be the case. + *

+ */ +public interface Position extends OrganizationComponent, StateOfPosition { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java new file mode 100755 index 00000000..d6e3c179 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Individual} that is a complete spatio-temporal history of some possible world. + */ +public interface PossibleWorld extends Individual, PeriodOfTime { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java new file mode 100755 index 00000000..6bc685cc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfAmountOfMoney} that is the {@code consideration_by_class} in an {@link Offering}. + */ +public interface Price extends ClassOfAmountOfMoney { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java new file mode 100755 index 00000000..59edf129 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSalesProductInstance} that is a set of {@link SalesProductInstance} sold under a + * brand name. + */ +public interface ProductBrand extends ClassOfSalesProductInstance { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java new file mode 100755 index 00000000..f6a50cae --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Offering} that is for a {@link SalesProduct}. + */ +public interface ProductOffering extends Offering { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java new file mode 100755 index 00000000..898159d0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} where two or more parties determine a course of action. + */ +public interface ReachingAgreement extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java new file mode 100755 index 00000000..8c4c82b9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfLanguageCommunity} that recognizes what a {@link Pattern} is intended to + * represent. + */ +public interface RecognizingLanguageCommunity extends + StateOfLanguageCommunity, + Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java new file mode 100755 index 00000000..3abff7fd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AbstractObject} that is what one {@link Thing} has to do with one or more others. + */ +public interface Relationship extends AbstractObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java new file mode 100755 index 00000000..98d4be4f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfRepresentation} where the {@link Sign} in all the members are members of the + * {@link Pattern} specified. + */ +public interface RepresentationByPattern extends ClassOfRepresentation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java new file mode 100755 index 00000000..90c7a657 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link Association} of a {@link Sign} and a {@link RecognizingLanguageCommunity} that + * recognizes the {@link Sign} as representing some {@link Thing}. + */ +public interface RepresentationBySign extends Association { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java new file mode 100755 index 00000000..d000726e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SpatioTemporalExtent} that is {@code part_of_plan} at least one {@link Plan} and is + * {@code defined_by} exactly one {@link RequirementSpecification}. + */ +public interface Requirement extends SpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java new file mode 100755 index 00000000..85c0b675 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSpatioTemporalExtent} that is the {@code intersection_of} one or more + * {@link ClassOfState}. + */ +public interface RequirementSpecification extends ClassOfSpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java new file mode 100755 index 00000000..8e276248 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfParticipant} where each member participates in the same way in an + * {@link Activity} or {@link Association}. + */ +public interface Role extends ClassOfParticipant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java new file mode 100755 index 00000000..52f44398 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link AgreementProcess} that consists of an {@link OfferAndAcceptanceForGoods} and an + * {@link ExchangeOfGoodsAndMoney}. + */ +public interface SaleOfGoods extends ContractProcess { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java new file mode 100755 index 00000000..0d1c0a7f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSalesProductInstance} that is a set of {@link SalesProductInstance} sold under + * the same product name. + */ +public interface SalesProduct extends ClassOfSalesProductInstance { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java new file mode 100755 index 00000000..2d65a2f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link OrdinaryFunctionalObject} that is produced in order to be sold. + */ +public interface SalesProductInstance extends + StateOfSalesProductInstance, + OrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java new file mode 100755 index 00000000..7d8dfb78 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link ClassOfSalesProductInstance} that is the customer facing specification of a version of a + * {@link SalesProduct}. + */ +public interface SalesProductVersion extends ClassOfSalesProductInstance { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java new file mode 100755 index 00000000..965ae27e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A scale is a function from {@link KindOfPhysicalQuantity} to the real numbers. + */ +public interface Scale extends Function_ { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java new file mode 100755 index 00000000..33796845 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfSign}, that is also a {@link SociallyConstructedObject}, and a + * {@link Participant} that represents some {@link Thing} for some community in one or more + * {@code representation_by_sign}. + */ +public interface Sign extends SociallyConstructedObject, StateOfSign, Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java new file mode 100755 index 00000000..0456a2be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link SociallyConstructedObject} that is also an {@link Activity}. + */ +public interface SociallyConstructedActivity extends Activity, SociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java new file mode 100755 index 00000000..d674ee60 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link IntentionallyConstructedObject} that is necessarily constructed by agreement or at + * least acquiescence of many people. + */ +public interface SociallyConstructedObject extends + IntentionallyConstructedObject, + StateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java new file mode 100755 index 00000000..bb73d00d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Thing} that exists in time and space. + */ +public interface SpatioTemporalExtent extends Thing { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java new file mode 100755 index 00000000..0a038735 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Relationship} where each {@code member__of} the {@code subclass} is a {@code member__of} + * the {@code superclass}. + */ +public interface Specialization extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java new file mode 100755 index 00000000..c144608d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SpatioTemporalExtent} that is an {@link Individual} or a {@code temporal_part_of} some + * {@link Individual}. + */ +public interface State extends SpatioTemporalExtent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java new file mode 100755 index 00000000..e955b4da --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A state that is an {@link Activity} or a {@code temporal_part_of} an {@link Activity}. + */ +public interface StateOfActivity extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java new file mode 100755 index 00000000..41e52f2d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedObject} that is also a {@link StateOfPhysicalObject} that is a + * {@code temporal_part_of} an {@link AmountOfMoney}. + */ +public interface StateOfAmountOfMoney extends + StateOfSociallyConstructedObject, + StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java new file mode 100755 index 00000000..9ac2f06b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link State} that is an {@link Association} or a {@code temporal_part_of} an + * {@link Association}. + */ +public interface StateOfAssociation extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java new file mode 100755 index 00000000..f42c248b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPhysicalObject} that is a {@link BiologicalObject} or a {@code temporal_part_of} + * a {@link BiologicalObject}. + */ +public interface StateOfBiologicalObject extends StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java new file mode 100755 index 00000000..8b41f241 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrdinaryBiologicalObject} and {@link StateOfSystem} that is + * {@link BiologicalSystem} or a {@code temporal_part_of} a {@link BiologicalSystem}. + */ +public interface StateOfBiologicalSystem extends + StateOfOrdinaryBiologicalObject, + StateOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java new file mode 100755 index 00000000..2c5154ce --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfBiologicalSystemComponent} and {@link StateOfSystemComponent} that is a + * {@link BiologicalSystemComponent} or a {@code temporal_part_of} a + * {@link BiologicalSystemComponent}. + */ +public interface StateOfBiologicalSystemComponent extends StateOfBiologicalObject, StateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java new file mode 100755 index 00000000..a8f0ab53 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfIntentionallyConstructedObject} and {@link StateOfPhysicalObject} that is a + * {@link FunctionalObject} or a {@code temporal_part_of} a {@link FunctionalObject}. + */ +public interface StateOfFunctionalObject extends + StateOfIntentionallyConstructedObject, + StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java new file mode 100755 index 00000000..fa77b715 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link StateOfOrdinaryFunctionalObject} that is also a {@link StateOfSystem}. + */ +public interface StateOfFunctionalSystem extends + StateOfSystem, + StateOfOrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java new file mode 100755 index 00000000..0890fbd3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfIntentionallyConstructedObject} that is a {@link SystemComponent} or a + * {@code temporal_part_of} a {@link SystemComponent}. + */ +public interface StateOfFunctionalSystemComponent extends + StateOfFunctionalObject, + StateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..3db5dbd9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A state that is an {@link IntentionallyConstructedObject} or a {@code temporal_part_of} an + * {@link IntentionallyConstructedObject}. + */ +public interface StateOfIntentionallyConstructedObject extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java new file mode 100755 index 00000000..56e33821 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrganization} that is a {@code temporal_part_of} a {@link LanguageCommunity}. + */ +public interface StateOfLanguageCommunity extends StateOfOrganization { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..478fe5f7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfBiologicalObject} that is also a {@link StateOfOrdinaryPhysicalObject} that is an + * {@link OrdinaryBiologicalObject} or a {@code temporal_part_of} an + * {@link OrdinaryBiologicalObject}. + */ +public interface StateOfOrdinaryBiologicalObject extends StateOfBiologicalObject, StateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..570b07be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link StateOfFunctionalObject} that is also a {@link StateOfOrdinaryPhysicalObject}. + */ +public interface StateOfOrdinaryFunctionalObject extends + StateOfFunctionalObject, + StateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..330bd592 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPhysicalObject} that is an {@link OrdinaryPhysicalObject} or a + * {@code temporal_part_of} one. + */ +public interface StateOfOrdinaryPhysicalObject extends StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java new file mode 100755 index 00000000..7d1e5029 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} that is also a {@link StateOfSociallyConstructedObject} that is an + * {@link Organization} or a {@code temporal_part_of} an {@link Organization}. + */ +public interface StateOfOrganization extends StateOfParty, StateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java new file mode 100755 index 00000000..dfdf1bed --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfSystemComponent} that is also a {@link StateOfSociallyConstructedObject} that is + * a {@code temporal_part_of} an {@link OrganizationComponent}. + */ +public interface StateOfOrganizationComponent extends + StateOfSystemComponent, + StateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java new file mode 100755 index 00000000..8cc50e08 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfSystem} that is a {@link Party} or a {@code temporal_part_of} a {@link Party}. + */ +public interface StateOfParty extends StateOfSystem { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java new file mode 100755 index 00000000..880374c8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfBiologicalSystem} and {@link StateOfParty} that is a {@link Person} or a + * {@code temporal_part_of} a {@link Person}. + */ +public interface StateOfPerson extends StateOfBiologicalSystem, StateOfParty { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java new file mode 100755 index 00000000..fdda37b5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link State} that is a {@link PhysicalObject} or a {@code temporal_part_of} a + * {@link PhysicalObject}. + */ +public interface StateOfPhysicalObject extends State { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java new file mode 100755 index 00000000..faff0e3c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrganizationComponent} that is a {@link Position} or a {@code temporal_part_of} a + * {@link Position}. + */ +public interface StateOfPosition extends StateOfOrganizationComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java new file mode 100755 index 00000000..86e5905e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrdinaryFunctionalObject} that is a {@link SalesProductInstance} or a + * {@code temporal_part_of} one. + */ +public interface StateOfSalesProductInstance extends StateOfOrdinaryFunctionalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java new file mode 100755 index 00000000..01db5a42 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfSociallyConstructedObject} that is a {@link Sign} or a {@code temporal_part_of} a + * {@link Sign}. + */ +public interface StateOfSign extends StateOfSociallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java new file mode 100755 index 00000000..ea249326 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java @@ -0,0 +1,23 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * Any {@link StateOfSociallyConstructedObject} that is also a {@link StateOfActivity}. + */ +public interface StateOfSociallyConstructedActivity extends + StateOfSociallyConstructedObject, + StateOfActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java new file mode 100755 index 00000000..6dd919b4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfIntentionallyConstructedObject} that is a {@link SociallyConstructedObject} or a + * {@code temporal_part_of} a {@link SociallyConstructedObject}. + */ +public interface StateOfSociallyConstructedObject extends StateOfIntentionallyConstructedObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java new file mode 100755 index 00000000..cb712ae8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfOrdinaryPhysicalObject} that is a {@link System} or a {@code temporal_part_of} a + * {@link System}. + */ +public interface StateOfSystem extends StateOfOrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java new file mode 100755 index 00000000..9542d7b0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfPhysicalObject} that is a {@link SystemComponent} or a {@code temporal_part_of} a + * {@link SystemComponent}. + */ +public interface StateOfSystemComponent extends StateOfPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java new file mode 100755 index 00000000..eef0cdf1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * An {@link OrdinaryPhysicalObject} that is an organized or connected group of + * {@link PhysicalObject}. + */ +public interface System extends StateOfSystem, OrdinaryPhysicalObject { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java new file mode 100755 index 00000000..7f1dc7b4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java @@ -0,0 +1,29 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link PhysicalObject} that is a {@code component_of} a {@link System} and that can be + * completely replaced without losing identity. + * + *

+ * Note: A {@link SystemComponent} is existence dependent on the {@link System} it is a component + * of, unlike any {@link OrdinaryPhysicalObject} that may be installed as the component. + *

+ */ +public interface SystemComponent extends + PhysicalObject, + StateOfSystemComponent { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java new file mode 100755 index 00000000..5efe0e57 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link Composition} where the part is the entire {@code whole} spatially, but part of the + * {@code whole} temporally. + */ +public interface TemporalComposition extends Composition { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java new file mode 100755 index 00000000..62464a22 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +import uk.gov.gchq.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.hqdm.pojo.Top; + +/** + * Anything that exists, real or imagined. + */ +public interface Thing extends Top { + /** + * Create a Thing with an String. + * + * @param id the String. + * @return a Thing instance. + */ + public static Thing createThing(final String id) { + return new ThingImpl(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java new file mode 100755 index 00000000..e00ee4d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link SociallyConstructedActivity} that ends one {@link Ownership} and begins another for + * {@link Asset}s that are a {@code temporal_part_of} the same {@link PhysicalObject}. + */ +public interface TransferOfOwnership extends SociallyConstructedActivity { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java new file mode 100755 index 00000000..61532b95 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link TransferOfOwnership} where the {@link Asset} is a {@link MoneyAsset}. + */ +public interface TransferOfOwnershipOfMoney extends TransferOfOwnership { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java new file mode 100755 index 00000000..322a6299 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} and {@link Participant} receiving {@link Ownership} in a + * {@link TransferOfOwnership}. + */ +public interface Transferee extends StateOfParty, Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java new file mode 100755 index 00000000..d0019818 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java @@ -0,0 +1,22 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A {@link StateOfParty} that is also a {@link Participant} that is a {@code temporal_part_of} an + * {@link Owner} that is a {@code participant_in} one or more {@link TransferOfOwnership}. + */ +public interface Transferor extends StateOfParty, Participant { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java new file mode 100755 index 00000000..9959071f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model; + +/** + * A plus one {@link Function_} for a {@link Scale}. + */ +public interface UnitOfMeasure extends Function_ { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java new file mode 100755 index 00000000..61e16222 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AbstractObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AbstractObject. + */ +public class AbstractObjectImpl extends HqdmObject implements AbstractObject { + /** + * Constructs a new AbstractObject. + * + * @param id String of the AbstractObject. + */ + public AbstractObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java new file mode 100755 index 00000000..03c45334 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AcceptanceOfOfferForGoods; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AcceptanceOfOfferForGoods. + */ +public class AcceptanceOfOfferForGoodsImpl extends HqdmObject implements AcceptanceOfOfferForGoods { + /** + * Constructs a new AcceptanceOfOfferForGoods. + * + * @param id String of the AcceptanceOfOfferForGoods. + */ + public AcceptanceOfOfferForGoodsImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java new file mode 100755 index 00000000..5cffacd2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AcceptanceOfOffer; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AcceptanceOfOffer. + */ +public class AcceptanceOfOfferImpl extends HqdmObject implements AcceptanceOfOffer { + /** + * Constructs a new AcceptanceOfOffer. + * + * @param id String of the AcceptanceOfOffer. + */ + public AcceptanceOfOfferImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java new file mode 100755 index 00000000..9cb12cae --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Activity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Activity. + */ +public class ActivityImpl extends HqdmObject implements Activity { + /** + * Constructs a new Activity. + * + * @param id String of the Activity. + */ + public ActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java new file mode 100755 index 00000000..bd11a9d9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Aggregation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Aggregation. + */ +public class AggregationImpl extends HqdmObject implements Aggregation { + /** + * Constructs a new Aggregation. + * + * @param id String of the Aggregation. + */ + public AggregationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java new file mode 100755 index 00000000..d5af767d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AgreeContract; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AgreeContract. + */ +public class AgreeContractImpl extends HqdmObject implements AgreeContract { + /** + * Constructs a new AgreeContract. + * + * @param id String of the AgreeContract. + */ + public AgreeContractImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java new file mode 100755 index 00000000..e7093f3c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AgreementExecution; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AgreementExecution. + */ +public class AgreementExecutionImpl extends HqdmObject implements AgreementExecution { + /** + * Constructs a new AgreementExecution. + * + * @param id String of the AgreementExecution. + */ + public AgreementExecutionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java new file mode 100755 index 00000000..8c9af72d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AgreementProcess; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AgreementProcess. + */ +public class AgreementProcessImpl extends HqdmObject implements AgreementProcess { + /** + * Constructs a new AgreementProcess. + * + * @param id String of the AgreementProcess. + */ + public AgreementProcessImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java new file mode 100755 index 00000000..4d081375 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.AmountOfMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of AmountOfMoney. + */ +public class AmountOfMoneyImpl extends HqdmObject implements AmountOfMoney { + /** + * Constructs a new AmountOfMoney. + * + * @param id String of the AmountOfMoney. + */ + public AmountOfMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java new file mode 100755 index 00000000..b5feb511 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Asset; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Asset. + */ +public class AssetImpl extends HqdmObject implements Asset { + /** + * Constructs a new Asset. + * + * @param id String of the Asset. + */ + public AssetImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java new file mode 100755 index 00000000..347f8b98 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Association; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Association. + */ +public class AssociationImpl extends HqdmObject implements Association { + /** + * Constructs a new Association. + * + * @param id String of the Association. + */ + public AssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java new file mode 100755 index 00000000..e46cb78f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.BeginningOfOwnership; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of BeginningOfOwnership. + */ +public class BeginningOfOwnershipImpl extends HqdmObject implements BeginningOfOwnership { + /** + * Constructs a BeginningOfOwnership. + * + * @param id String of the BeginningOfOwnership. + */ + public BeginningOfOwnershipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java new file mode 100755 index 00000000..f17f7aea --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.BiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of BiologicalObject. + */ +public class BiologicalObjectImpl extends HqdmObject implements BiologicalObject { + /** + * Constructs a new BiologicalObject. + * + * @param id String of the BiologicalObject. + */ + public BiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java new file mode 100755 index 00000000..643cb000 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.BiologicalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of BiologicalSystemComponent. + */ +public class BiologicalSystemComponentImpl extends HqdmObject implements BiologicalSystemComponent { + /** + * Constructs a new BiologicalSystemComponent. + * + * @param id String of the BiologicalSystemComponent. + */ + public BiologicalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java new file mode 100755 index 00000000..1ababe74 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.BiologicalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of BiologicalSystem. + */ +public class BiologicalSystemImpl extends HqdmObject implements BiologicalSystem { + /** + * Constructs a new BiologicalSystem. + * + * @param id String of the BiologicalSystem. + */ + public BiologicalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java new file mode 100755 index 00000000..60425605 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Class; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Class. + */ +public class ClassImpl extends HqdmObject implements Class { + /** + * Constructs a new Class. + * + * @param id String of the Class. + */ + public ClassImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java new file mode 100755 index 00000000..cedf6123 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAbstractObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAbstractObject. + */ +public class ClassOfAbstractObjectImpl extends HqdmObject implements ClassOfAbstractObject { + /** + * Constructs a new ClassOfAbstractObject. + * + * @param id String of the ClassOfAbstractObject. + */ + public ClassOfAbstractObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java new file mode 100755 index 00000000..2f9b12bd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfActivity. + */ +public class ClassOfActivityImpl extends HqdmObject implements ClassOfActivity { + /** + * Constructs a new ClassOfActivity. + * + * @param id String of the ClassOfActivity. + */ + public ClassOfActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java new file mode 100755 index 00000000..56669b9e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAgreeContract; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAgreeContract. + */ +public class ClassOfAgreeContractImpl extends HqdmObject implements ClassOfAgreeContract { + /** + * Constructs a new ClassOfAgreeContract. + * + * @param id String of the ClassOfAgreeContract. + */ + public ClassOfAgreeContractImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java new file mode 100755 index 00000000..127a301e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAgreementExecution; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAgreementExecution. + */ +public class ClassOfAgreementExecutionImpl extends HqdmObject implements ClassOfAgreementExecution { + /** + * Constructs a new ClassOfAgreementExecution. + * + * @param id String of the ClassOfAgreementExecution. + */ + public ClassOfAgreementExecutionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java new file mode 100755 index 00000000..78827260 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAgreementProcess; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAgreementProcess. + */ +public class ClassOfAgreementProcessImpl extends HqdmObject implements ClassOfAgreementProcess { + /** + * Constructs a new ClassOfAgreementProcess. + * + * @param id String of the ClassOfAgreementProcess. + */ + public ClassOfAgreementProcessImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..0dd84d77 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAmountOfMoney. + */ +public class ClassOfAmountOfMoneyImpl extends HqdmObject implements ClassOfAmountOfMoney { + /** + * Constructs a new ClassOfAmountOfMoney. + * + * @param id String of the ClassOfAmountOfMoney. + */ + public ClassOfAmountOfMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java new file mode 100755 index 00000000..b08f919c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfAssociation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfAssociation. + */ +public class ClassOfAssociationImpl extends HqdmObject implements ClassOfAssociation { + /** + * Constructs a new ClassOfAssociation. + * + * @param id String of the ClassOfAssociation. + */ + public ClassOfAssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java new file mode 100755 index 00000000..4feae35c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfBiologicalObject. + */ +public class ClassOfBiologicalObjectImpl extends HqdmObject implements ClassOfBiologicalObject { + /** + * Constructs a new ClassOfBiologicalObject. + * + * @param id String of the ClassOfBiologicalObject. + */ + public ClassOfBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..aabb3d3b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfBiologicalSystemComponent. + */ +public class ClassOfBiologicalSystemComponentImpl extends HqdmObject implements ClassOfBiologicalSystemComponent { + /** + * Constructs a new ClassOfBiologicalSystemComponent. + * + * @param id String of the ClassOfBiologicalSystemComponent. + */ + public ClassOfBiologicalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java new file mode 100755 index 00000000..2d26dad3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfBiologicalSystem. + */ +public class ClassOfBiologicalSystemImpl extends HqdmObject implements ClassOfBiologicalSystem { + /** + * Constructs a new ClassOfBiologicalSystem. + * + * @param id String of the ClassOfBiologicalSystem. + */ + public ClassOfBiologicalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java new file mode 100755 index 00000000..17f5f5b8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfClass; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfClass. + */ +public class ClassOfClassImpl extends HqdmObject implements ClassOfClass { + /** + * Constructs a new ClassOfClass. + * + * @param id String of the ClassOfClass. + */ + public ClassOfClassImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java new file mode 100755 index 00000000..ae44e145 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfClassOfSpatioTemporalExtent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfClassOfSpatioTemporalExtent. + */ +public class ClassOfClassOfSpatioTemporalExtentImpl extends HqdmObject implements ClassOfClassOfSpatioTemporalExtent { + /** + * Constructs a new ClassOfClassOfSpatioTemporalExtent. + * + * @param id String of the ClassOfClassOfSpatioTemporalExtent. + */ + public ClassOfClassOfSpatioTemporalExtentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java new file mode 100755 index 00000000..9fdd54f4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfContractExecution; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfContractExecution. + */ +public class ClassOfContractExecutionImpl extends HqdmObject implements ClassOfContractExecution { + /** + * Constructs a new ClassOfContractExecution. + * + * @param id String of the ClassOfContractExecution. + */ + public ClassOfContractExecutionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java new file mode 100755 index 00000000..67634124 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfContractProcess; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfContractProcess. + */ +public class ClassOfContractProcessImpl extends HqdmObject implements ClassOfContractProcess { + /** + * Constructs a new ClassOfContractProcess. + * + * @param id String of the ClassOfContractProcess. + */ + public ClassOfContractProcessImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java new file mode 100755 index 00000000..dfe9d0ef --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfEvent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfEvent. + */ +public class ClassOfEventImpl extends HqdmObject implements ClassOfEvent { + /** + * Constructs a new ClassOfEvent. + * + * @param id String of the ClassOfEvent. + */ + public ClassOfEventImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java new file mode 100755 index 00000000..1735b625 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfFunctionalObject. + */ +public class ClassOfFunctionalObjectImpl extends HqdmObject implements ClassOfFunctionalObject { + /** + * Constructs a new ClassOfFunctionalObject. + * + * @param id String of the ClassOfFunctionalObject. + */ + public ClassOfFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..7fc62764 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfFunctionalSystemComponent. + */ +public class ClassOfFunctionalSystemComponentImpl extends HqdmObject implements ClassOfFunctionalSystemComponent { + /** + * Constructs a new ClassOfFunctionalSystemComponent. + * + * @param id String of the ClassOfFunctionalSystemComponent. + */ + public ClassOfFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java new file mode 100755 index 00000000..422789bf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfFunctionalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfFunctionalSystem. + */ +public class ClassOfFunctionalSystemImpl extends HqdmObject implements ClassOfFunctionalSystem { + /** + * Constructs a new ClassOfFunctionalSystem. + * + * @param id String of the ClassOfFunctionalSystem. + */ + public ClassOfFunctionalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java new file mode 100755 index 00000000..301cd5e8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfInPlaceBiologicalComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfInPlaceBiologicalComponent. + */ +public class ClassOfInPlaceBiologicalComponentImpl extends HqdmObject implements ClassOfInPlaceBiologicalComponent { + /** + * Constructs a new ClassOfInPlaceBiologicalComponent. + * + * @param id String of the ClassOfInPlaceBiologicalComponent. + */ + public ClassOfInPlaceBiologicalComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java new file mode 100755 index 00000000..0bcf202a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfIndividual; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfIndividual. + */ +public class ClassOfIndividualImpl extends HqdmObject implements ClassOfIndividual { + /** + * Constructs a new ClassOfIndividual. + * + * @param id String of the ClassOfIndividual. + */ + public ClassOfIndividualImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..9428439b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfInstalledFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfInstalledFunctionalSystemComponent. + */ +public class ClassOfInstalledFunctionalSystemComponentImpl extends HqdmObject + implements ClassOfInstalledFunctionalSystemComponent { + /** + * Constructs a new ClassOfInstalledFunctionalSystemComponent. + * + * @param id String of the ClassOfInstalledFunctionalSystemComponent. + */ + public ClassOfInstalledFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java new file mode 100755 index 00000000..5baddba4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfInstalledObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfInstalledObject. + */ +public class ClassOfInstalledObjectImpl extends HqdmObject implements ClassOfInstalledObject { + /** + * Constructs a new ClassOfInstalledObject. + * + * @param id String of the ClassOfInstalledObject. + */ + public ClassOfInstalledObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..0b1ef189 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfIntentionallyConstructedObject. + */ +public class ClassOfIntentionallyConstructedObjectImpl extends HqdmObject + implements ClassOfIntentionallyConstructedObject { + /** + * Constructs a new ClassOfIntentionallyConstructedObject. + * + * @param id String of the ClassOfIntentionallyConstructedObject. + */ + public ClassOfIntentionallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java new file mode 100755 index 00000000..b43ff9e9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOffer; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOffer. + */ +public class ClassOfOfferImpl extends HqdmObject implements ClassOfOffer { + /** + * Constructs a new ClassOfOffer. + * + * @param id String of the ClassOfOffer. + */ + public ClassOfOfferImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..d9a5d3da --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOrdinaryBiologicalObject. + */ +public class ClassOfOrdinaryBiologicalObjectImpl extends HqdmObject implements ClassOfOrdinaryBiologicalObject { + /** + * Constructs a new ClassOfOrdinaryBiologicalObject. + * + * @param id String of the ClassOfOrdinaryBiologicalObject. + */ + public ClassOfOrdinaryBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..4d86a7a9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOrdinaryFunctionalObject. + */ +public class ClassOfOrdinaryFunctionalObjectImpl extends HqdmObject implements ClassOfOrdinaryFunctionalObject { + /** + * Constructs a new ClassOfOrdinaryFunctionalObject. + * + * @param id String of the ClassOfOrdinaryFunctionalObject. + */ + public ClassOfOrdinaryFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..da47cfd3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOrdinaryPhysicalObject. + */ +public class ClassOfOrdinaryPhysicalObjectImpl extends HqdmObject implements ClassOfOrdinaryPhysicalObject { + /** + * Constructs a new ClassOfOrdinaryPhysicalObject. + * + * @param id String of the ClassOfOrdinaryPhysicalObject. + */ + public ClassOfOrdinaryPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java new file mode 100755 index 00000000..7219e5ed --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOrganizationComponent. + */ +public class ClassOfOrganizationComponentImpl extends HqdmObject implements ClassOfOrganizationComponent { + /** + * Constructs a new ClassOfOrganizationComponent. + * + * @param id String of the ClassOfOrganizationComponent. + */ + public ClassOfOrganizationComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java new file mode 100755 index 00000000..a4d80e6c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfOrganization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfOrganization. + */ +public class ClassOfOrganizationImpl extends HqdmObject implements ClassOfOrganization { + /** + * Constructs a new ClassOfOrganization. + * + * @param id String of the ClassOfOrganization. + */ + public ClassOfOrganizationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java new file mode 100755 index 00000000..5d16a763 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfParticipant; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfParticipant. + */ +public class ClassOfParticipantImpl extends HqdmObject implements ClassOfParticipant { + /** + * Constructs a new ClassOfParticipant. + * + * @param id String of the ClassOfParticipant. + */ + public ClassOfParticipantImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java new file mode 100755 index 00000000..62c27723 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfParty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfParty. + */ +public class ClassOfPartyImpl extends HqdmObject implements ClassOfParty { + /** + * Constructs a new ClassOfParty. + * + * @param id String of the ClassOfParty. + */ + public ClassOfPartyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java new file mode 100755 index 00000000..30aa57d1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPeriodOfTime; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPeriodOfTime. + */ +public class ClassOfPeriodOfTimeImpl extends HqdmObject implements ClassOfPeriodOfTime { + /** + * Constructs a new ClassOfPeriodOfTime. + * + * @param id String of the ClassOfPeriodOfTime. + */ + public ClassOfPeriodOfTimeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java new file mode 100755 index 00000000..683e45c3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPerson; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPerson. + */ +public class ClassOfPersonImpl extends HqdmObject implements ClassOfPerson { + /** + * Constructs a new ClassOfPerson. + * + * @param id String of the ClassOfPerson. + */ + public ClassOfPersonImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java new file mode 100755 index 00000000..7950b8a5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPersonInPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPersonInPosition. + */ +public class ClassOfPersonInPositionImpl extends HqdmObject implements ClassOfPersonInPosition { + /** + * Constructs a new ClassOfPersonInPosition. + * + * @param id String of the ClassOfPersonInPosition. + */ + public ClassOfPersonInPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java new file mode 100755 index 00000000..5b17298a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPhysicalObject. + */ +public class ClassOfPhysicalObjectImpl extends HqdmObject implements ClassOfPhysicalObject { + /** + * Constructs a new ClassOfPhysicalObject. + * + * @param id String of the ClassOfPhysicalObject. + */ + public ClassOfPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java new file mode 100755 index 00000000..28289063 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPhysicalProperty. + */ +public class ClassOfPhysicalPropertyImpl extends HqdmObject implements ClassOfPhysicalProperty { + /** + * Constructs a new ClassOfPhysicalProperty. + * + * @param id String of the ClassOfPhysicalProperty. + */ + public ClassOfPhysicalPropertyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..34db4996 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPhysicalQuantity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPhysicalQuantity. + */ +public class ClassOfPhysicalQuantityImpl extends HqdmObject implements ClassOfPhysicalQuantity { + /** + * Constructs a new ClassOfPhysicalQuantity. + * + * @param id String of the ClassOfPhysicalQuantity. + */ + public ClassOfPhysicalQuantityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java new file mode 100755 index 00000000..d216821a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPointInTime; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPointInTime. + */ +public class ClassOfPointInTimeImpl extends HqdmObject implements ClassOfPointInTime { + /** + * Constructs a new ClassOfPointInTime. + * + * @param id String of the ClassOfPointInTime. + */ + public ClassOfPointInTimeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java new file mode 100755 index 00000000..e02b9dfe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPosition. + */ +public class ClassOfPositionImpl extends HqdmObject implements ClassOfPosition { + /** + * Constructs a new ClassOfPosition. + * + * @param id String of the ClassOfPosition. + */ + public ClassOfPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java new file mode 100755 index 00000000..0721c320 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfPossibleWorld; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfPossibleWorld. + */ +public class ClassOfPossibleWorldImpl extends HqdmObject implements ClassOfPossibleWorld { + /** + * Constructs a new ClassOfPossibleWorld. + * + * @param id String of the ClassOfPossibleWorld. + */ + public ClassOfPossibleWorldImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java new file mode 100755 index 00000000..3bd2a758 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfReachingAgreement; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfReachingAgreement. + */ +public class ClassOfReachingAgreementImpl extends HqdmObject implements ClassOfReachingAgreement { + /** + * Constructs a new ClassOfReachingAgreement. + * + * @param id String of the ClassOfReachingAgreement. + */ + public ClassOfReachingAgreementImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java new file mode 100755 index 00000000..c79c78e9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfRelationship; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfRelationship. + */ +public class ClassOfRelationshipImpl extends HqdmObject implements ClassOfRelationship { + /** + * Constructs a new ClassOfRelationship. + * + * @param id String of the ClassOfRelationship. + */ + public ClassOfRelationshipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java new file mode 100755 index 00000000..b9015cb0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfRepresentation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfRepresentation. + */ +public class ClassOfRepresentationImpl extends HqdmObject implements ClassOfRepresentation { + /** + * Constructs a new ClassOfRepresentation. + * + * @param id String of the ClassOfRepresentation. + */ + public ClassOfRepresentationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..d6573c03 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSalesProductInstance. + */ +public class ClassOfSalesProductInstanceImpl extends HqdmObject implements ClassOfSalesProductInstance { + /** + * Constructs a new ClassOfSalesProductInstance. + * + * @param id String of the ClassOfSalesProductInstance. + */ + public ClassOfSalesProductInstanceImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java new file mode 100755 index 00000000..22d56a21 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSign; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSign. + */ +public class ClassOfSignImpl extends HqdmObject implements ClassOfSign { + /** + * Constructs a new ClassOfSign. + * + * @param id String of the ClassOfSign. + */ + public ClassOfSignImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..8739c5d8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSociallyConstructedActivity. + */ +public class ClassOfSociallyConstructedActivityImpl extends HqdmObject implements ClassOfSociallyConstructedActivity { + /** + * Constructs a new ClassOfSociallyConstructedActivity. + * + * @param id String of the ClassOfSociallyConstructedActivity. + */ + public ClassOfSociallyConstructedActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..fa060e4d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSociallyConstructedObject. + */ +public class ClassOfSociallyConstructedObjectImpl extends HqdmObject implements ClassOfSociallyConstructedObject { + /** + * Constructs a new ClassOfSociallyConstructedObject. + * + * @param id String of the ClassOfSociallyConstructedObject. + */ + public ClassOfSociallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java new file mode 100755 index 00000000..83c53bfa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSpatioTemporalExtent. + */ +public class ClassOfSpatioTemporalExtentImpl extends HqdmObject implements ClassOfSpatioTemporalExtent { + /** + * Constructs a new ClassOfSpatioTemporalExtent. + * + * @param id String of the ClassOfSpatioTemporalExtent. + */ + public ClassOfSpatioTemporalExtentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java new file mode 100755 index 00000000..53dae008 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfState; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfState. + */ +public class ClassOfStateImpl extends HqdmObject implements ClassOfState { + /** + * Constructs a new ClassOfState. + * + * @param id String of the ClassOfState. + */ + public ClassOfStateImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java new file mode 100755 index 00000000..e3cd48aa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfActivity. + */ +public class ClassOfStateOfActivityImpl extends HqdmObject implements ClassOfStateOfActivity { + /** + * Constructs a new ClassOfStateOfActivity. + * + * @param id String of the ClassOfStateOfActivity. + */ + public ClassOfStateOfActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..0514547b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfAmountOfMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfAmountOfMoney. + */ +public class ClassOfStateOfAmountOfMoneyImpl extends HqdmObject implements ClassOfStateOfAmountOfMoney { + /** + * Constructs a new ClassOfStateOfAmountOfMoney. + * + * @param id String of the ClassOfStateOfAmountOfMoney. + */ + public ClassOfStateOfAmountOfMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java new file mode 100755 index 00000000..cceea2cf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfAssociation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfAssociation. + */ +public class ClassOfStateOfAssociationImpl extends HqdmObject implements ClassOfStateOfAssociation { + /** + * Constructs a new ClassOfStateOfAssociation. + * + * @param id String of the ClassOfStateOfAssociation. + */ + public ClassOfStateOfAssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java new file mode 100755 index 00000000..b4fa7a94 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfBiologicalObject. + */ +public class ClassOfStateOfBiologicalObjectImpl extends HqdmObject implements ClassOfStateOfBiologicalObject { + /** + * Constructs a new ClassOfStateOfBiologicalObject. + * + * @param id String of the ClassOfStateOfBiologicalObject. + */ + public ClassOfStateOfBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..dac13a76 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfBiologicalSystemComponent. + */ +public class ClassOfStateOfBiologicalSystemComponentImpl extends HqdmObject + implements ClassOfStateOfBiologicalSystemComponent { + /** + * Constructs a new ClassOfStateOfBiologicalSystemComponent. + * + * @param id String of the ClassOfStateOfBiologicalSystemComponent. + */ + public ClassOfStateOfBiologicalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java new file mode 100755 index 00000000..1e183aab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfBiologicalSystem. + */ +public class ClassOfStateOfBiologicalSystemImpl extends HqdmObject implements ClassOfStateOfBiologicalSystem { + /** + * Constructs a new ClassOfStateOfBiologicalSystem. + * + * @param id String of the ClassOfStateOfBiologicalSystem. + */ + public ClassOfStateOfBiologicalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java new file mode 100755 index 00000000..765c7a7a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfFunctionalObject. + */ +public class ClassOfStateOfFunctionalObjectImpl extends HqdmObject implements ClassOfStateOfFunctionalObject { + /** + * Constructs a new ClassOfStateOfFunctionalObject. + * + * @param id String of the ClassOfStateOfFunctionalObject. + */ + public ClassOfStateOfFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..89c616b6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfFunctionalSystemComponent. + */ +public class ClassOfStateOfFunctionalSystemComponentImpl extends HqdmObject + implements ClassOfStateOfFunctionalSystemComponent { + /** + * Constructs a new ClassOfStateOfFunctionalSystemComponent. + * + * @param id String of the ClassOfStateOfFunctionalSystemComponent. + */ + public ClassOfStateOfFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java new file mode 100755 index 00000000..80e1d64a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfFunctionalSystem. + */ +public class ClassOfStateOfFunctionalSystemImpl extends HqdmObject implements ClassOfStateOfFunctionalSystem { + /** + * Constructs a new ClassOfStateOfFunctionalSystem. + * + * @param id String of the ClassOfStateOfFunctionalSystem. + */ + public ClassOfStateOfFunctionalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..fad46967 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfIntentionallyConstructedObject. + */ +public class ClassOfStateOfIntentionallyConstructedObjectImpl extends HqdmObject + implements ClassOfStateOfIntentionallyConstructedObject { + /** + * Constructs a new ClassOfStateOfIntentionallyConstructedObject. + * + * @param id String of the ClassOfStateOfIntentionallyConstructedObject. + */ + public ClassOfStateOfIntentionallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..b3e067e1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfOrdinaryBiologicalObject. + */ +public class ClassOfStateOfOrdinaryBiologicalObjectImpl extends HqdmObject + implements ClassOfStateOfOrdinaryBiologicalObject { + /** + * Constructs a new ClassOfStateOfOrdinaryBiologicalObject. + * + * @param id String of the ClassOfStateOfOrdinaryBiologicalObject. + */ + public ClassOfStateOfOrdinaryBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..b02d26ab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfOrdinaryFunctionalObject. + */ +public class ClassOfStateOfOrdinaryFunctionalObjectImpl extends HqdmObject + implements ClassOfStateOfOrdinaryFunctionalObject { + /** + * Constructs a new ClassOfStateOfOrdinaryFunctionalObject. + * + * @param id String of the ClassOfStateOfOrdinaryFunctionalObject. + */ + public ClassOfStateOfOrdinaryFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..6c60b741 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfOrdinaryPhysicalObject. + */ +public class ClassOfStateOfOrdinaryPhysicalObjectImpl extends HqdmObject + implements ClassOfStateOfOrdinaryPhysicalObject { + /** + * Constructs a new ClassOfStateOfOrdinaryPhysicalObject. + * + * @param id String of the ClassOfStateOfOrdinaryPhysicalObject. + */ + public ClassOfStateOfOrdinaryPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java new file mode 100755 index 00000000..9a91304c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfOrganizationComponent. + */ +public class ClassOfStateOfOrganizationComponentImpl extends HqdmObject implements ClassOfStateOfOrganizationComponent { + /** + * Constructs a new ClassOfStateOfOrganizationComponent. + * + * @param id String of the ClassOfStateOfOrganizationComponent. + */ + public ClassOfStateOfOrganizationComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java new file mode 100755 index 00000000..45b6dd30 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfOrganization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfOrganization. + */ +public class ClassOfStateOfOrganizationImpl extends HqdmObject implements ClassOfStateOfOrganization { + /** + * Constructs a new ClassOfStateOfOrganization. + * + * @param id String of the ClassOfStateOfOrganization. + */ + public ClassOfStateOfOrganizationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java new file mode 100755 index 00000000..75ee35b4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfParty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfParty. + */ +public class ClassOfStateOfPartyImpl extends HqdmObject implements ClassOfStateOfParty { + /** + * Constructs a new ClassOfStateOfParty. + * + * @param id String of the ClassOfStateOfParty. + */ + public ClassOfStateOfPartyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java new file mode 100755 index 00000000..28c8a1b5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfPerson. + */ +public class ClassOfStateOfPersonImpl extends HqdmObject implements ClassOfStateOfPerson { + /** + * Constructs a new ClassOfStateOfPerson. + * + * @param id String of the ClassOfStateOfPerson. + */ + public ClassOfStateOfPersonImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java new file mode 100755 index 00000000..f90c4b59 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfPhysicalObject. + */ +public class ClassOfStateOfPhysicalObjectImpl extends HqdmObject implements ClassOfStateOfPhysicalObject { + /** + * Constructs a new ClassOfStateOfPhysicalObject. + * + * @param id String of the ClassOfStateOfPhysicalObject. + */ + public ClassOfStateOfPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java new file mode 100755 index 00000000..79ef2dd2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfPosition. + */ +public class ClassOfStateOfPositionImpl extends HqdmObject implements ClassOfStateOfPosition { + /** + * Constructs a new ClassOfStateOfPosition. + * + * @param id String of the ClassOfStateOfPosition. + */ + public ClassOfStateOfPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..edb35d55 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSalesProductInstance; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSalesProductInstance. + */ +public class ClassOfStateOfSalesProductInstanceImpl extends HqdmObject implements ClassOfStateOfSalesProductInstance { + /** + * Constructs a new ClassOfStateOfSalesProductInstance. + * + * @param id String of the ClassOfStateOfSalesProductInstance. + */ + public ClassOfStateOfSalesProductInstanceImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java new file mode 100755 index 00000000..4f80a5db --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSign; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSign. + */ +public class ClassOfStateOfSignImpl extends HqdmObject implements ClassOfStateOfSign { + /** + * Constructs a new ClassOfStateOfSign. + * + * @param id String of the ClassOfStateOfSign. + */ + public ClassOfStateOfSignImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..c164a221 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSociallyConstructedActivity. + */ +public class ClassOfStateOfSociallyConstructedActivityImpl extends HqdmObject + implements ClassOfStateOfSociallyConstructedActivity { + /** + * Constructs a new ClassOfStateOfSociallyConstructedActivity. + * + * @param id String of the ClassOfStateOfSociallyConstructedActivity. + */ + public ClassOfStateOfSociallyConstructedActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..b0438c40 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSociallyConstructedObject. + */ +public class ClassOfStateOfSociallyConstructedObjectImpl extends HqdmObject + implements ClassOfStateOfSociallyConstructedObject { + /** + * Constructs a new ClassOfStateOfSociallyConstructedObject. + * + * @param id String of the ClassOfStateOfSociallyConstructedObject. + */ + public ClassOfStateOfSociallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java new file mode 100755 index 00000000..b0c3f421 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSystemComponent. + */ +public class ClassOfStateOfSystemComponentImpl extends HqdmObject implements ClassOfStateOfSystemComponent { + /** + * Constructs a new ClassOfStateOfSystemComponent. + * + * @param id String of the ClassOfStateOfSystemComponent. + */ + public ClassOfStateOfSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java new file mode 100755 index 00000000..1759155d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfStateOfSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfStateOfSystem. + */ +public class ClassOfStateOfSystemImpl extends HqdmObject implements ClassOfStateOfSystem { + /** + * Constructs a new ClassOfStateOfSystem. + * + * @param id String of the ClassOfStateOfSystem. + */ + public ClassOfStateOfSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java new file mode 100755 index 00000000..e0e468ab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSystemComponent. + */ +public class ClassOfSystemComponentImpl extends HqdmObject implements ClassOfSystemComponent { + /** + * Constructs a new ClassOfSystemComponent. + * + * @param id String of the ClassOfSystemComponent. + */ + public ClassOfSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java new file mode 100755 index 00000000..9b922953 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ClassOfSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ClassOfSystem. + */ +public class ClassOfSystemImpl extends HqdmObject implements ClassOfSystem { + /** + * Constructs a new ClassOfSystem. + * + * @param id String of the ClassOfSystem. + */ + public ClassOfSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java new file mode 100755 index 00000000..02ce2873 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Classification; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Classification. + */ +public class ClassificationImpl extends HqdmObject implements Classification { + /** + * Constructs a new Classification. + * + * @param id String of the Classification. + */ + public ClassificationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java new file mode 100755 index 00000000..90aed7b4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Composition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Composition. + */ +public class CompositionImpl extends HqdmObject implements Composition { + /** + * Constructs a new Composition. + * + * @param id String of the Composition. + */ + public CompositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java new file mode 100755 index 00000000..621c71be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ContractExecution; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ContractExecution. + */ +public class ContractExecutionImpl extends HqdmObject implements ContractExecution { + /** + * Constructs a new ContractExecution. + * + * @param id String of the ContractExecution. + */ + public ContractExecutionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java new file mode 100755 index 00000000..7a3a87fa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ContractProcess; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ContractProcess. + */ +public class ContractProcessImpl extends HqdmObject implements ContractProcess { + /** + * Constructs a new ContractProcess. + * + * @param id String of the ContractProcess. + */ + public ContractProcessImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java new file mode 100755 index 00000000..a6f1ff3f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Currency; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Currency. + */ +public class CurrencyImpl extends HqdmObject implements Currency { + /** + * Constructs a new Currency. + * + * @param id String of the Currency. + */ + public CurrencyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java new file mode 100755 index 00000000..dd055c65 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.DefinedRelationship; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of DefinedRelationship. + */ +public class DefinedRelationshipImpl extends HqdmObject implements DefinedRelationship { + /** + * Constructs a new DefinedRelationship. + * + * @param id String of the DefinedRelationship. + */ + public DefinedRelationshipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java new file mode 100755 index 00000000..7c666c89 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Definition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Definition. + */ +public class DefinitionImpl extends HqdmObject implements Definition { + /** + * Constructs a new Definition. + * + * @param id String of the Definition. + */ + public DefinitionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java new file mode 100755 index 00000000..32a5f69f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Description; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Description. + */ +public class DescriptionImpl extends HqdmObject implements Description { + /** + * Constructs a new Description. + * + * @param id String of the Description. + */ + public DescriptionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java new file mode 100755 index 00000000..3b3dad81 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Employee; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Employee. + */ +public class EmployeeImpl extends HqdmObject implements Employee { + /** + * Constructs a new Employee. + * + * @param id String of the Employee. + */ + public EmployeeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java new file mode 100755 index 00000000..873704af --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Employer; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Employer. + */ +public class EmployerImpl extends HqdmObject implements Employer { + /** + * Constructs a new Employer. + * + * @param id String of the Employer. + */ + public EmployerImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java new file mode 100755 index 00000000..ce30f29e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Employment; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Employment. + */ +public class EmploymentImpl extends HqdmObject implements Employment { + /** + * Constructs a new Employment. + * + * @param id String of the Employment. + */ + public EmploymentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java new file mode 100755 index 00000000..3aafe924 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.EndingOfOwnership; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of EndingOfOwnership. + */ +public class EndingOfOwnershipImpl extends HqdmObject implements EndingOfOwnership { + /** + * Constructs a new EndingOfOwnership. + * + * @param id String of the EndingOfOwnership. + */ + public EndingOfOwnershipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java new file mode 100755 index 00000000..b3aae688 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.EnumeratedClass; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of EnumeratedClass. + */ +public class EnumeratedClassImpl extends HqdmObject implements EnumeratedClass { + /** + * Constructs a new EnumeratedClass. + * + * @param id String of the EnumeratedClass. + */ + public EnumeratedClassImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java new file mode 100755 index 00000000..9cc40c89 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Event; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Event. + */ +public class EventImpl extends HqdmObject implements Event { + /** + * Constructs a new Event. + * + * @param id String of the Event. + */ + public EventImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java new file mode 100755 index 00000000..b337b28b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ExchangeOfGoodsAndMoney. + */ +public class ExchangeOfGoodsAndMoneyImpl extends HqdmObject implements ExchangeOfGoodsAndMoney { + /** + * Constructs a new ExchangeOfGoodsAndMoney. + * + * @param id String of the ExchangeOfGoodsAndMoney. + */ + public ExchangeOfGoodsAndMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java new file mode 100755 index 00000000..8e22bfd9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Function_; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Function. + */ +public class FunctionImpl extends HqdmObject implements Function_ { + /** + * Constructs a new Function_. + * + * @param id String of the Function_. + */ + public FunctionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java new file mode 100755 index 00000000..2ff8601c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.FunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of FunctionalObject. + */ +public class FunctionalObjectImpl extends HqdmObject implements FunctionalObject { + /** + * Constructs a new FunctionalObject. + * + * @param id String of the FunctionalObject. + */ + public FunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java new file mode 100755 index 00000000..d7dbc8ff --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of FunctionalSystemComponent. + */ +public class FunctionalSystemComponentImpl extends HqdmObject implements FunctionalSystemComponent { + /** + * Constructs a new FunctionalSystemComponent. + * + * @param id String of the FunctionalSystemComponent. + */ + public FunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java new file mode 100755 index 00000000..e9c0e697 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.FunctionalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of FunctionalSystem. + */ +public class FunctionalSystemImpl extends HqdmObject implements FunctionalSystem { + /** + * Constructs a new FunctionalSystem. + * + * @param id String of the FunctionalSystem. + */ + public FunctionalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java new file mode 100755 index 00000000..820ac04f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Identification; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Identification. + */ +public class IdentificationImpl extends HqdmObject implements Identification { + /** + * Constructs a new Identification. + * + * @param id String of the Identification. + */ + public IdentificationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..bd771c87 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of IdentificationOfPhysicalQuantity. + */ +public class IdentificationOfPhysicalQuantityImpl extends HqdmObject implements IdentificationOfPhysicalQuantity { + /** + * Constructs a new IdentificationOfPhysicalQuantity. + * + * @param id String of the IdentificationOfPhysicalQuantity. + */ + public IdentificationOfPhysicalQuantityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java new file mode 100755 index 00000000..239870ac --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.InPlaceBiologicalComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of InPlaceBiologicalComponent. + */ +public class InPlaceBiologicalComponentImpl extends HqdmObject implements InPlaceBiologicalComponent { + /** + * Constructs a new InPlaceBiologicalComponent. + * + * @param id String of the InPlaceBiologicalComponent. + */ + public InPlaceBiologicalComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java new file mode 100755 index 00000000..16f2f5bb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Individual; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Individual. + */ +public class IndividualImpl extends HqdmObject implements Individual { + /** + * Constructs a new Individual. + * + * @param id String of the Individual. + */ + public IndividualImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..d6571d77 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of InstalledFunctionalSystemComponent. + */ +public class InstalledFunctionalSystemComponentImpl extends HqdmObject implements InstalledFunctionalSystemComponent { + /** + * Constructs a new InstalledFunctionalSystemComponent. + * + * @param id String of the InstalledFunctionalSystemComponent. + */ + public InstalledFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java new file mode 100755 index 00000000..72bee6b6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.InstalledObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of InstalledObject. + */ +public class InstalledObjectImpl extends HqdmObject implements InstalledObject { + /** + * Constructs a new InstalledObject. + * + * @param id String of the InstalledObject. + */ + public InstalledObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..2cf4820b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.IntentionallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of IntentionallyConstructedObject. + */ +public class IntentionallyConstructedObjectImpl extends HqdmObject implements IntentionallyConstructedObject { + /** + * Constructs a new IntentionallyConstructedObject. + * + * @param id String of the IntentionallyConstructedObject. + */ + public IntentionallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java new file mode 100755 index 00000000..9c4b8fc5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfActivity. + */ +public class KindOfActivityImpl extends HqdmObject implements KindOfActivity { + /** + * Constructs a new KindOfActivity. + * + * @param id String of the KindOfActivity. + */ + public KindOfActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java new file mode 100755 index 00000000..06b1ab17 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfAssociation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfAssociation. + */ +public class KindOfAssociationImpl extends HqdmObject implements KindOfAssociation { + /** + * Constructs a new KindOfAssociation. + * + * @param id String of the KindOfAssociation. + */ + public KindOfAssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java new file mode 100755 index 00000000..8a698998 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfBiologicalObject. + */ +public class KindOfBiologicalObjectImpl extends HqdmObject implements KindOfBiologicalObject { + /** + * Constructs a new KindOfBiologicalObject. + * + * @param id String of the KindOfBiologicalObject. + */ + public KindOfBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..ac4d1256 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfBiologicalSystemComponent. + */ +public class KindOfBiologicalSystemComponentImpl extends HqdmObject implements KindOfBiologicalSystemComponent { + /** + * Constructs a new KindOfBiologicalSystemComponent. + * + * @param id String of the KindOfBiologicalSystemComponent. + */ + public KindOfBiologicalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java new file mode 100755 index 00000000..e5dc84db --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfBiologicalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfBiologicalSystem. + */ +public class KindOfBiologicalSystemImpl extends HqdmObject implements KindOfBiologicalSystem { + /** + * Constructs a new KindOfBiologicalSystem. + * + * @param id String of the KindOfBiologicalSystem. + */ + public KindOfBiologicalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java new file mode 100755 index 00000000..08c65e89 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfFunctionalObject. + */ +public class KindOfFunctionalObjectImpl extends HqdmObject implements KindOfFunctionalObject { + /** + * Constructs a new KindOfFunctionalObject. + * + * @param id String of the KindOfFunctionalObject. + */ + public KindOfFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..124a7d0d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfFunctionalSystemComponent. + */ +public class KindOfFunctionalSystemComponentImpl extends HqdmObject implements KindOfFunctionalSystemComponent { + /** + * Constructs a new KindOfFunctionalSystemComponent. + * + * @param id String of the KindOfFunctionalSystemComponent. + */ + public KindOfFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java new file mode 100755 index 00000000..c02a7793 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfFunctionalSystem. + */ +public class KindOfFunctionalSystemImpl extends HqdmObject implements KindOfFunctionalSystem { + /** + * Constructs a new KindOfFunctionalSystem. + * + * @param id String of the KindOfFunctionalSystem. + */ + public KindOfFunctionalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java new file mode 100755 index 00000000..3cfb5d27 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfIndividual; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfIndividual. + */ +public class KindOfIndividualImpl extends HqdmObject implements KindOfIndividual { + /** + * Constructs a new KindOfIndividual. + * + * @param id String of the KindOfIndividual. + */ + public KindOfIndividualImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..a9541ec3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfIntentionallyConstructedObject. + */ +public class KindOfIntentionallyConstructedObjectImpl extends HqdmObject + implements KindOfIntentionallyConstructedObject { + /** + * Constructs a new KindOfIntentionallyConstructedObject. + * + * @param id String of the KindOfIntentionallyConstructedObject. + */ + public KindOfIntentionallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..2101886f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfOrdinaryBiologicalObject. + */ +public class KindOfOrdinaryBiologicalObjectImpl extends HqdmObject implements KindOfOrdinaryBiologicalObject { + /** + * Constructs a new KindOfOrdinaryBiologicalObject. + * + * @param id String of the KindOfOrdinaryBiologicalObject. + */ + public KindOfOrdinaryBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..34d6980a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfOrdinaryFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfOrdinaryFunctionalObject. + */ +public class KindOfOrdinaryFunctionalObjectImpl extends HqdmObject implements KindOfOrdinaryFunctionalObject { + /** + * Constructs a new KindOfOrdinaryFunctionalObject. + * + * @param id String of the KindOfOrdinaryFunctionalObject. + */ + public KindOfOrdinaryFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..0cb350af --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfOrdinaryPhysicalObject. + */ +public class KindOfOrdinaryPhysicalObjectImpl extends HqdmObject implements KindOfOrdinaryPhysicalObject { + /** + * Constructs a new KindOfOrdinaryPhysicalObject. + * + * @param id String of the KindOfOrdinaryPhysicalObject. + */ + public KindOfOrdinaryPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java new file mode 100755 index 00000000..25fa1873 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfOrganizationComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfOrganizationComponent. + */ +public class KindOfOrganizationComponentImpl extends HqdmObject implements KindOfOrganizationComponent { + /** + * Constructs a new KindOfOrganizationComponent. + * + * @param id String of the KindOfOrganizationComponent. + */ + public KindOfOrganizationComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java new file mode 100755 index 00000000..327af22d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfOrganization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfOrganization. + */ +public class KindOfOrganizationImpl extends HqdmObject implements KindOfOrganization { + /** + * Constructs a new KindOfOrganization. + * + * @param id String of the KindOfOrganization. + */ + public KindOfOrganizationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java new file mode 100755 index 00000000..2f333ff6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfParty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfParty. + */ +public class KindOfPartyImpl extends HqdmObject implements KindOfParty { + /** + * Constructs a new KindOfParty. + * + * @param id String of the KindOfParty. + */ + public KindOfPartyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java new file mode 100755 index 00000000..6276b2fb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfPerson; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfPerson. + */ +public class KindOfPersonImpl extends HqdmObject implements KindOfPerson { + /** + * Constructs a new KindOfPerson. + * + * @param id String of the KindOfPerson. + */ + public KindOfPersonImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java new file mode 100755 index 00000000..6e55dae2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfPhysicalObject. + */ +public class KindOfPhysicalObjectImpl extends HqdmObject implements KindOfPhysicalObject { + /** + * Constructs a new KindOfPhysicalObject. + * + * @param id String of the KindOfPhysicalObject. + */ + public KindOfPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java new file mode 100755 index 00000000..7364bd2b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfPhysicalProperty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfPhysicalProperty. + */ +public class KindOfPhysicalPropertyImpl extends HqdmObject implements KindOfPhysicalProperty { + /** + * Constructs a new KindOfPhysicalProperty. + * + * @param id String of the KindOfPhysicalProperty. + */ + public KindOfPhysicalPropertyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..5eba4f71 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfPhysicalQuantity. + */ +public class KindOfPhysicalQuantityImpl extends HqdmObject implements KindOfPhysicalQuantity { + /** + * Constructs a new KindOfPhysicalQuantity. + * + * @param id String of the KindOfPhysicalQuantity. + */ + public KindOfPhysicalQuantityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java new file mode 100755 index 00000000..be3bc08f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfPosition. + */ +public class KindOfPositionImpl extends HqdmObject implements KindOfPosition { + /** + * Constructs a new KindOfPosition. + * + * @param id String of the KindOfPosition. + */ + public KindOfPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java new file mode 100755 index 00000000..4f36400f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfRelationshipWithRestriction; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfRelationshipWithRestriction. + */ +public class KindOfRelationshipWithRestrictionImpl extends HqdmObject implements KindOfRelationshipWithRestriction { + /** + * Constructs a new KindOfRelationshipWithRestriction. + * + * @param id String of the KindOfRelationshipWithRestriction. + */ + public KindOfRelationshipWithRestrictionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java new file mode 100755 index 00000000..7dffaa7c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfRelationshipWithSignature. + */ +public class KindOfRelationshipWithSignatureImpl extends HqdmObject implements KindOfRelationshipWithSignature { + /** + * Constructs a new KindOfRelationshipWithSignature. + * + * @param id String of the KindOfRelationshipWithSignature. + */ + public KindOfRelationshipWithSignatureImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..8d766e13 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfSociallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfSociallyConstructedObject. + */ +public class KindOfSociallyConstructedObjectImpl extends HqdmObject implements KindOfSociallyConstructedObject { + /** + * Constructs a new KindOfSociallyConstructedObject. + * + * @param id String of the KindOfSociallyConstructedObject. + */ + public KindOfSociallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java new file mode 100755 index 00000000..a83ab795 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfSystemComponent. + */ +public class KindOfSystemComponentImpl extends HqdmObject implements KindOfSystemComponent { + /** + * Constructs a new KindOfSystemComponent. + * + * @param id String of the KindOfSystemComponent. + */ + public KindOfSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java new file mode 100755 index 00000000..fec05a04 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.KindOfSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of KindOfSystem. + */ +public class KindOfSystemImpl extends HqdmObject implements KindOfSystem { + /** + * Constructs a new KindOfSystem. + * + * @param id String of the KindOfSystem. + */ + public KindOfSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java new file mode 100755 index 00000000..b1876b3d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.LanguageCommunity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of LanguageCommunity. + */ +public class LanguageCommunityImpl extends HqdmObject implements LanguageCommunity { + /** + * Constructs a new LanguageCommunity. + * + * @param id String of the LanguageCommunity. + */ + public LanguageCommunityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java new file mode 100755 index 00000000..39574728 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.MoneyAsset; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of MoneyAsset. + */ +public class MoneyAssetImpl extends HqdmObject implements MoneyAsset { + /** + * Constructs a new MoneyAsset. + * + * @param id String of the MoneyAsset. + */ + public MoneyAssetImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java new file mode 100755 index 00000000..b8f5f35b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OfferAndAcceptanceForGoods; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OfferAndAcceptanceForGoods. + */ +public class OfferAndAcceptanceForGoodsImpl extends HqdmObject implements OfferAndAcceptanceForGoods { + /** + * Constructs a new OfferAndAcceptanceForGoods. + * + * @param id String of the OfferAndAcceptanceForGoods. + */ + public OfferAndAcceptanceForGoodsImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java new file mode 100755 index 00000000..20ba704e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OfferForGoods; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OfferForGoods. + */ +public class OfferForGoodsImpl extends HqdmObject implements OfferForGoods { + /** + * Constructs a new OfferForGoods. + * + * @param id String of the OfferForGoods. + */ + public OfferForGoodsImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java new file mode 100755 index 00000000..f1b37c35 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Offer; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Offer. + */ +public class OfferImpl extends HqdmObject implements Offer { + /** + * Constructs a new Offer. + * + * @param id String of the Offer. + */ + public OfferImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java new file mode 100755 index 00000000..2e57a203 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Offering; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Offering. + */ +public class OfferingImpl extends HqdmObject implements Offering { + /** + * Constructs a new Offering. + * + * @param id String of the Offering. + */ + public OfferingImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..7a5dea31 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OrdinaryBiologicalObject. + */ +public class OrdinaryBiologicalObjectImpl extends HqdmObject implements OrdinaryBiologicalObject { + /** + * Constructs a new OrdinaryBiologicalObject. + * + * @param id String of the OrdinaryBiologicalObject. + */ + public OrdinaryBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..387ab126 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OrdinaryFunctionalObject. + */ +public class OrdinaryFunctionalObjectImpl extends HqdmObject implements OrdinaryFunctionalObject { + /** + * Constructs a new OrdinaryFunctionalObject. + * + * @param id String of the OrdinaryFunctionalObject. + */ + public OrdinaryFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..758dd473 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OrdinaryPhysicalObject. + */ +public class OrdinaryPhysicalObjectImpl extends HqdmObject implements OrdinaryPhysicalObject { + /** + * Constructs a new OrdinaryPhysicalObject. + * + * @param id String of the OrdinaryPhysicalObject. + */ + public OrdinaryPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java new file mode 100755 index 00000000..cf2678af --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.OrganizationComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of OrganizationComponent. + */ +public class OrganizationComponentImpl extends HqdmObject implements OrganizationComponent { + /** + * Constructs a new OrganizationComponent. + * + * @param id String of the OrganizationComponent. + */ + public OrganizationComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java new file mode 100755 index 00000000..4f1f861b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Organization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Organization. + */ +public class OrganizationImpl extends HqdmObject implements Organization { + /** + * Constructs a new Organization. + * + * @param id String of the Organization. + */ + public OrganizationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java new file mode 100755 index 00000000..6dfb219d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Owner; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Owner. + */ +public class OwnerImpl extends HqdmObject implements Owner { + /** + * Constructs a new Owner. + * + * @param id String of the Owner. + */ + public OwnerImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java new file mode 100755 index 00000000..64588886 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Ownership; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Ownership. + */ +public class OwnershipImpl extends HqdmObject implements Ownership { + /** + * Constructs a new Ownership. + * + * @param id String of the Ownership. + */ + public OwnershipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java new file mode 100755 index 00000000..8f63c356 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Participant. + */ +public class ParticipantImpl extends HqdmObject implements Participant { + /** + * Constructs a new Participant. + * + * @param id String of the Participant. + */ + public ParticipantImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java new file mode 100755 index 00000000..56033d38 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ParticipantInActivityOrAssociation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ParticipantInActivityOrAssociation. + */ +public class ParticipantInActivityOrAssociationImpl extends HqdmObject implements ParticipantInActivityOrAssociation { + /** + * Constructs a new ParticipantInActivityOrAssociation. + * + * @param id String of the ParticipantInActivityOrAssociation. + */ + public ParticipantInActivityOrAssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java new file mode 100755 index 00000000..31fbd2aa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Party; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Party. + */ +public class PartyImpl extends HqdmObject implements Party { + /** + * Constructs a new Party. + * + * @param id String of the Party. + */ + public PartyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java new file mode 100755 index 00000000..2457238d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Pattern; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Pattern. + */ +public class PatternImpl extends HqdmObject implements Pattern { + /** + * Constructs a new Pattern. + * + * @param id String of the Pattern. + */ + public PatternImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java new file mode 100755 index 00000000..7b9248ea --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PeriodOfTime; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PeriodOfTime. + */ +public class PeriodOfTimeImpl extends HqdmObject implements PeriodOfTime { + /** + * Constructs a new PeriodOfTime. + * + * @param id String of the PeriodOfTime. + */ + public PeriodOfTimeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java new file mode 100755 index 00000000..61e0fa72 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Person. + */ +public class PersonImpl extends HqdmObject implements Person { + /** + * Constructs a new Person. + * + * @param id String of the Person. + */ + public PersonImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java new file mode 100755 index 00000000..600cc6b7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PersonInPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PersonInPosition. + */ +public class PersonInPositionImpl extends HqdmObject implements PersonInPosition { + /** + * Constructs a new PersonInPosition. + * + * @param id String of the PersonInPosition. + */ + public PersonInPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java new file mode 100755 index 00000000..2cf5e5dd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PhysicalObject. + */ +public class PhysicalObjectImpl extends HqdmObject implements PhysicalObject { + /** + * Constructs a new PhysicalObject. + * + * @param id String of the PhysicalObject. + */ + public PhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java new file mode 100755 index 00000000..00f4cc52 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PhysicalProperty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PhysicalProperty. + */ +public class PhysicalPropertyImpl extends HqdmObject implements PhysicalProperty { + /** + * Constructs a new PhysicalProperty. + * + * @param id String of the PhysicalProperty. + */ + public PhysicalPropertyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java new file mode 100755 index 00000000..da23d975 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PhysicalPropertyRange; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PhysicalPropertyRange. + */ +public class PhysicalPropertyRangeImpl extends HqdmObject implements PhysicalPropertyRange { + /** + * Constructs a new PhysicalPropertyRange. + * + * @param id String of the PhysicalPropertyRange. + */ + public PhysicalPropertyRangeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java new file mode 100755 index 00000000..58742d5d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PhysicalQuantity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PhysicalQuantity. + */ +public class PhysicalQuantityImpl extends HqdmObject implements PhysicalQuantity { + /** + * Constructs a new PhysicalQuantity. + * + * @param id String of the PhysicalQuantity. + */ + public PhysicalQuantityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java new file mode 100755 index 00000000..90e85b69 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PhysicalQuantityRange; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PhysicalQuantityRange. + */ +public class PhysicalQuantityRangeImpl extends HqdmObject implements PhysicalQuantityRange { + /** + * Constructs a new PhysicalQuantityRange. + * + * @param id String of the PhysicalQuantityRange. + */ + public PhysicalQuantityRangeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java new file mode 100755 index 00000000..ac84ec06 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Plan; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Plan. + */ +public class PlanImpl extends HqdmObject implements Plan { + /** + * Constructs a new Plan. + * + * @param id String of the Plan. + */ + public PlanImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java new file mode 100755 index 00000000..7043d61c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PointInTime; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PointInTime. + */ +public class PointInTimeImpl extends HqdmObject implements PointInTime { + /** + * Constructs a new PointInTime. + * + * @param id String of the PointInTime. + */ + public PointInTimeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java new file mode 100755 index 00000000..b7b2ed5a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Position; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Position. + */ +public class PositionImpl extends HqdmObject implements Position { + /** + * Constructs a new Position. + * + * @param id String of the Position. + */ + public PositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java new file mode 100755 index 00000000..5db44987 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.PossibleWorld; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of PossibleWorld. + */ +public class PossibleWorldImpl extends HqdmObject implements PossibleWorld { + /** + * Constructs a new PossibleWorld. + * + * @param id String of the PossibleWorld. + */ + public PossibleWorldImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java new file mode 100755 index 00000000..8481e59b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Price; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Price. + */ +public class PriceImpl extends HqdmObject implements Price { + /** + * Constructs a new Price. + * + * @param id String of the Price. + */ + public PriceImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java new file mode 100755 index 00000000..d81119e5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ProductBrand; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ProductBrand. + */ +public class ProductBrandImpl extends HqdmObject implements ProductBrand { + /** + * Constructs a new ProductBrand. + * + * @param id String of the ProductBrand. + */ + public ProductBrandImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java new file mode 100755 index 00000000..7091645f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ProductOffering; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ProductOffering. + */ +public class ProductOfferingImpl extends HqdmObject implements ProductOffering { + /** + * Constructs a new ProductOffering. + * + * @param id String of the ProductOffering. + */ + public ProductOfferingImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java new file mode 100755 index 00000000..1ce0a00e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.ReachingAgreement; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of ReachingAgreement. + */ +public class ReachingAgreementImpl extends HqdmObject implements ReachingAgreement { + /** + * Constructs a new ReachingAgreement. + * + * @param id String of the ReachingAgreement. + */ + public ReachingAgreementImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java new file mode 100755 index 00000000..7ca7bcbb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of RecognizingLanguageCommunity. + */ +public class RecognizingLanguageCommunityImpl extends HqdmObject implements RecognizingLanguageCommunity { + /** + * Constructs a new RecognizingLanguageCommunity. + * + * @param id String of the RecognizingLanguageCommunity. + */ + public RecognizingLanguageCommunityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java new file mode 100755 index 00000000..c5151956 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Relationship; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Relationship. + */ +public class RelationshipImpl extends HqdmObject implements Relationship { + /** + * Constructs a new Relationship. + * + * @param id String of the Relationship. + */ + public RelationshipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java new file mode 100755 index 00000000..efd33b6e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.RepresentationByPattern; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of RepresentationByPattern. + */ +public class RepresentationByPatternImpl extends HqdmObject implements RepresentationByPattern { + /** + * Constructs a new RepresentationByPattern. + * + * @param id String of the RepresentationByPattern. + */ + public RepresentationByPatternImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java new file mode 100755 index 00000000..a3d57e4f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.RepresentationBySign; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of RepresentationBySign. + */ +public class RepresentationBySignImpl extends HqdmObject implements RepresentationBySign { + /** + * Constructs a new RepresentationBySign. + * + * @param id String of the RepresentationBySign. + */ + public RepresentationBySignImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java new file mode 100755 index 00000000..90d26464 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Requirement; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Requirement. + */ +public class RequirementImpl extends HqdmObject implements Requirement { + /** + * Constructs a new Requirement. + * + * @param id String of the Requirement. + */ + public RequirementImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java new file mode 100755 index 00000000..33c4b1ee --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.RequirementSpecification; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of RequirementSpecification. + */ +public class RequirementSpecificationImpl extends HqdmObject implements RequirementSpecification { + /** + * Constructs a new RequirementSpecification. + * + * @param id String of the RequirementSpecification. + */ + public RequirementSpecificationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java new file mode 100755 index 00000000..5329ed5d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Role; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Role. + */ +public class RoleImpl extends HqdmObject implements Role { + /** + * Constructs a new Role. + * + * @param id String of the Role. + */ + public RoleImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java new file mode 100755 index 00000000..6531be81 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SaleOfGoods; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SaleOfGoods. + */ +public class SaleOfGoodsImpl extends HqdmObject implements SaleOfGoods { + /** + * Constructs a new SaleOfGoods. + * + * @param id String of the SaleOfGoods. + */ + public SaleOfGoodsImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java new file mode 100755 index 00000000..7bdbc6e5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SalesProduct; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SalesProduct. + */ +public class SalesProductImpl extends HqdmObject implements SalesProduct { + /** + * Constructs a new SalesProduct. + * + * @param id String of the SalesProduct. + */ + public SalesProductImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java new file mode 100755 index 00000000..1294e678 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SalesProductInstance; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SalesProductInstance. + */ +public class SalesProductInstanceImpl extends HqdmObject implements SalesProductInstance { + /** + * Constructs a new SalesProductInstance. + * + * @param id String of the SalesProductInstance. + */ + public SalesProductInstanceImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java new file mode 100755 index 00000000..428a8ddd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SalesProductVersion; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SalesProductVersion. + */ +public class SalesProductVersionImpl extends HqdmObject implements SalesProductVersion { + /** + * Constructs a new SalesProductVersion. + * + * @param id String of the SalesProductVersion. + */ + public SalesProductVersionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java new file mode 100755 index 00000000..6fa1a941 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Scale; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Scale. + */ +public class ScaleImpl extends HqdmObject implements Scale { + /** + * Constructs a new Scale. + * + * @param id String of the Scale. + */ + public ScaleImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java new file mode 100755 index 00000000..58ae126c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Sign; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Sign. + */ +public class SignImpl extends HqdmObject implements Sign { + /** + * Constructs a new Sign. + * + * @param id String of the Sign. + */ + public SignImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java new file mode 100755 index 00000000..ed983874 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SociallyConstructedActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SociallyConstructedActivity. + */ +public class SociallyConstructedActivityImpl extends HqdmObject implements SociallyConstructedActivity { + /** + * Constructs a new SociallyConstructedActivity. + * + * @param id String of the SociallyConstructedActivity. + */ + public SociallyConstructedActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java new file mode 100755 index 00000000..18e925f9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SociallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SociallyConstructedObject. + */ +public class SociallyConstructedObjectImpl extends HqdmObject implements SociallyConstructedObject { + /** + * Constructs a new SociallyConstructedObject. + * + * @param id String of the SociallyConstructedObject. + */ + public SociallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java new file mode 100755 index 00000000..548ac81b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SpatioTemporalExtent. + */ +public class SpatioTemporalExtentImpl extends HqdmObject implements SpatioTemporalExtent { + /** + * Constructs a new SpatioTemporalExtent. + * + * @param id String of the SpatioTemporalExtent. + */ + public SpatioTemporalExtentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java new file mode 100755 index 00000000..f386e55e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Specialization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Specialization. + */ +public class SpecializationImpl extends HqdmObject implements Specialization { + /** + * Constructs a new Specialization. + * + * @param id String of the Specialization. + */ + public SpecializationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java new file mode 100755 index 00000000..70d42538 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.State; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of State. + */ +public class StateImpl extends HqdmObject implements State { + /** + * Constructs a new State. + * + * @param id String of the State. + */ + public StateImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java new file mode 100755 index 00000000..a13b1654 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfActivity. + */ +public class StateOfActivityImpl extends HqdmObject implements StateOfActivity { + /** + * Constructs a new StateOfActivity. + * + * @param id String of the StateOfActivity. + */ + public StateOfActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..d559d19d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfAmountOfMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfAmountOfMoney. + */ +public class StateOfAmountOfMoneyImpl extends HqdmObject implements StateOfAmountOfMoney { + /** + * Constructs a new StateOfAmountOfMoney. + * + * @param id String of the StateOfAmountOfMoney. + */ + public StateOfAmountOfMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java new file mode 100755 index 00000000..7e4f4269 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfAssociation; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfAssociation. + */ +public class StateOfAssociationImpl extends HqdmObject implements StateOfAssociation { + /** + * Constructs a new StateOfAssociation. + * + * @param id String of the StateOfAssociation. + */ + public StateOfAssociationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java new file mode 100755 index 00000000..1766204e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfBiologicalObject. + */ +public class StateOfBiologicalObjectImpl extends HqdmObject implements StateOfBiologicalObject { + /** + * Constructs a new StateOfBiologicalObject. + * + * @param id String of the StateOfBiologicalObject. + */ + public StateOfBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..e86fcbd8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfBiologicalSystemComponent. + */ +public class StateOfBiologicalSystemComponentImpl extends HqdmObject implements StateOfBiologicalSystemComponent { + /** + * Constructs a new StateOfBiologicalSystemComponent. + * + * @param id String of the StateOfBiologicalSystemComponent. + */ + public StateOfBiologicalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java new file mode 100755 index 00000000..acbea4f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfBiologicalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfBiologicalSystem. + */ +public class StateOfBiologicalSystemImpl extends HqdmObject implements StateOfBiologicalSystem { + /** + * Constructs a new StateOfBiologicalSystem. + * + * @param id String of the StateOfBiologicalSystem. + */ + public StateOfBiologicalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java new file mode 100755 index 00000000..50d1267a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfFunctionalObject. + */ +public class StateOfFunctionalObjectImpl extends HqdmObject implements StateOfFunctionalObject { + /** + * Constructs a new StateOfFunctionalObject. + * + * @param id String of the StateOfFunctionalObject. + */ + public StateOfFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..1a683286 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfFunctionalSystemComponent. + */ +public class StateOfFunctionalSystemComponentImpl extends HqdmObject implements StateOfFunctionalSystemComponent { + /** + * Constructs a new StateOfFunctionalSystemComponent. + * + * @param id String of the StateOfFunctionalSystemComponent. + */ + public StateOfFunctionalSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java new file mode 100755 index 00000000..a73a1459 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfFunctionalSystem. + */ +public class StateOfFunctionalSystemImpl extends HqdmObject implements StateOfFunctionalSystem { + /** + * Constructs a new StateOfFunctionalSystem. + * + * @param id String of the StateOfFunctionalSystem. + */ + public StateOfFunctionalSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..e8773867 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfIntentionallyConstructedObject. + */ +public class StateOfIntentionallyConstructedObjectImpl extends HqdmObject + implements StateOfIntentionallyConstructedObject { + /** + * Constructs a new StateOfIntentionallyConstructedObject. + * + * @param id String of the StateOfIntentionallyConstructedObject. + */ + public StateOfIntentionallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java new file mode 100755 index 00000000..9153f938 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfLanguageCommunity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfLanguageCommunity. + */ +public class StateOfLanguageCommunityImpl extends HqdmObject implements StateOfLanguageCommunity { + /** + * Constructs a new StateOfLanguageCommunity. + * + * @param id String of the StateOfLanguageCommunity. + */ + public StateOfLanguageCommunityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..6624eca7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfOrdinaryBiologicalObject. + */ +public class StateOfOrdinaryBiologicalObjectImpl extends HqdmObject implements StateOfOrdinaryBiologicalObject { + /** + * Constructs a new StateOfOrdinaryBiologicalObject. + * + * @param id String of the StateOfOrdinaryBiologicalObject. + */ + public StateOfOrdinaryBiologicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..d38d1fd8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfOrdinaryFunctionalObject. + */ +public class StateOfOrdinaryFunctionalObjectImpl extends HqdmObject implements StateOfOrdinaryFunctionalObject { + /** + * Constructs a new StateOfOrdinaryFunctionalObject. + * + * @param id String of the StateOfOrdinaryFunctionalObject. + */ + public StateOfOrdinaryFunctionalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..07873a3a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfOrdinaryPhysicalObject. + */ +public class StateOfOrdinaryPhysicalObjectImpl extends HqdmObject implements StateOfOrdinaryPhysicalObject { + /** + * Constructs a new StateOfOrdinaryPhysicalObject. + * + * @param id String of the StateOfOrdinaryPhysicalObject. + */ + public StateOfOrdinaryPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java new file mode 100755 index 00000000..307e6412 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfOrganizationComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfOrganizationComponent. + */ +public class StateOfOrganizationComponentImpl extends HqdmObject implements StateOfOrganizationComponent { + /** + * Constructs a new StateOfOrganizationComponent. + * + * @param id String of the StateOfOrganizationComponent. + */ + public StateOfOrganizationComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java new file mode 100755 index 00000000..86dd798a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfOrganization; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfOrganization. + */ +public class StateOfOrganizationImpl extends HqdmObject implements StateOfOrganization { + /** + * Constructs a new StateOfOrganization. + * + * @param id String of the StateOfOrganization. + */ + public StateOfOrganizationImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java new file mode 100755 index 00000000..7676c060 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfParty; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfParty. + */ +public class StateOfPartyImpl extends HqdmObject implements StateOfParty { + /** + * Constructs a new StateOfParty. + * + * @param id String of the StateOfParty. + */ + public StateOfPartyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java new file mode 100755 index 00000000..62e9e353 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfPerson; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfPerson. + */ +public class StateOfPersonImpl extends HqdmObject implements StateOfPerson { + /** + * Constructs a new StateOfPerson. + * + * @param id String of the StateOfPerson. + */ + public StateOfPersonImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java new file mode 100755 index 00000000..ecd6cc61 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfPhysicalObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfPhysicalObject. + */ +public class StateOfPhysicalObjectImpl extends HqdmObject implements StateOfPhysicalObject { + /** + * Constructs a new StateOfPhysicalObject. + * + * @param id String of the StateOfPhysicalObject. + */ + public StateOfPhysicalObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java new file mode 100755 index 00000000..c0bf880d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfPosition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfPosition. + */ +public class StateOfPositionImpl extends HqdmObject implements StateOfPosition { + /** + * Constructs a new StateOfPosition. + * + * @param id String of the StateOfPosition. + */ + public StateOfPositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..a52a36b8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSalesProductInstance; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSalesProductInstance. + */ +public class StateOfSalesProductInstanceImpl extends HqdmObject implements StateOfSalesProductInstance { + /** + * Constructs a new StateOfSalesProductInstance. + * + * @param id String of the StateOfSalesProductInstance. + */ + public StateOfSalesProductInstanceImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java new file mode 100755 index 00000000..41c84a8f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSign; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSign. + */ +public class StateOfSignImpl extends HqdmObject implements StateOfSign { + /** + * Constructs a new StateOfSign. + * + * @param id String of the StateOfSign. + */ + public StateOfSignImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..576167d9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSociallyConstructedActivity; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSociallyConstructedActivity. + */ +public class StateOfSociallyConstructedActivityImpl extends HqdmObject implements StateOfSociallyConstructedActivity { + /** + * Constructs a new StateOfSociallyConstructedActivity. + * + * @param id String of the StateOfSociallyConstructedActivity. + */ + public StateOfSociallyConstructedActivityImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..1c0fd0fb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSociallyConstructedObject. + */ +public class StateOfSociallyConstructedObjectImpl extends HqdmObject implements StateOfSociallyConstructedObject { + /** + * Constructs a new StateOfSociallyConstructedObject. + * + * @param id String of the StateOfSociallyConstructedObject. + */ + public StateOfSociallyConstructedObjectImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java new file mode 100755 index 00000000..92ec3ea9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSystemComponent. + */ +public class StateOfSystemComponentImpl extends HqdmObject implements StateOfSystemComponent { + /** + * Constructs a new StateOfSystemComponent. + * + * @param id String of the StateOfSystemComponent. + */ + public StateOfSystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java new file mode 100755 index 00000000..c2663d3d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.StateOfSystem; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of StateOfSystem. + */ +public class StateOfSystemImpl extends HqdmObject implements StateOfSystem { + /** + * Constructs a new StateOfSystem. + * + * @param id String of the StateOfSystem. + */ + public StateOfSystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java new file mode 100755 index 00000000..0331399f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.SystemComponent; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of SystemComponent. + */ +public class SystemComponentImpl extends HqdmObject implements SystemComponent { + /** + * Constructs a new SystemComponent. + * + * @param id String of the SystemComponent. + */ + public SystemComponentImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java new file mode 100755 index 00000000..8dbfb1d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.System; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of System. + */ +public class SystemImpl extends HqdmObject implements System { + /** + * Constructs a new System. + * + * @param id String of the System. + */ + public SystemImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java new file mode 100755 index 00000000..4a6a746d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.TemporalComposition; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of TemporalComposition. + */ +public class TemporalCompositionImpl extends HqdmObject implements TemporalComposition { + /** + * Constructs a new TemporalComposition. + * + * @param id String of the TemporalComposition. + */ + public TemporalCompositionImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java new file mode 100755 index 00000000..9c57a871 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Thing. + */ +public class ThingImpl extends HqdmObject implements Thing { + /** + * Constructs a new Thing. + * + * @param id String of the Thing. + */ + public ThingImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java new file mode 100755 index 00000000..0189d94a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.TransferOfOwnership; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of TransferOfOwnership. + */ +public class TransferOfOwnershipImpl extends HqdmObject implements TransferOfOwnership { + /** + * Constructs a new TransferOfOwnership. + * + * @param id String of the TransferOfOwnership. + */ + public TransferOfOwnershipImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java new file mode 100755 index 00000000..16482390 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of TransferOfOwnershipOfMoney. + */ +public class TransferOfOwnershipOfMoneyImpl extends HqdmObject implements TransferOfOwnershipOfMoney { + /** + * Constructs a new TransferOfOwnershipOfMoney. + * + * @param id String of the TransferOfOwnershipOfMoney. + */ + public TransferOfOwnershipOfMoneyImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java new file mode 100755 index 00000000..bf017ddc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Transferee; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Transferee. + */ +public class TransfereeImpl extends HqdmObject implements Transferee { + /** + * Constructs a new Transferee. + * + * @param id String of the Transferee. + */ + public TransfereeImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java new file mode 100755 index 00000000..819ae750 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.Transferor; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of Transferor. + */ +public class TransferorImpl extends HqdmObject implements Transferor { + /** + * Constructs a new Transferor. + * + * @param id String of the Transferor. + */ + public TransferorImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java new file mode 100755 index 00000000..b573ddd3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.model.impl; + +import uk.gov.gchq.hqdm.model.UnitOfMeasure; +import uk.gov.gchq.hqdm.pojo.HqdmObject; + +/** + * An implementation of UnitOfMeasure. + */ +public class UnitOfMeasureImpl extends HqdmObject implements UnitOfMeasure { + /** + * Constructs a new UnitOfMeasure. + * + * @param id String of the UnitOfMeasure. + */ + public UnitOfMeasureImpl(final String id) { + super(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java new file mode 100644 index 00000000..676e530d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Basic implementations for HQDM Java objects defined in {@code uk.gov.gchq.hqdm.model}. + */ +package uk.gov.gchq.hqdm.model.impl; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java new file mode 100644 index 00000000..c176461c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * HQDM object interfaces defining HQDM class inheritance. + */ +package uk.gov.gchq.hqdm.model; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java new file mode 100755 index 00000000..53dcb76a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java @@ -0,0 +1,233 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.pojo; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +import uk.gov.gchq.hqdm.model.Thing; + +/** + * Basic implementation of a HQDM object. + */ +public abstract class HqdmObject implements Thing { + + private String id; + + private final Map> predicates = new HashMap<>(); + + /** + * Constructs a new {@code HqdmObject}. + * + * @param id ID of the HQDM object. + */ + public HqdmObject(final String id) { + this.id = id; + } + + /** + * {@inheritDoc} + */ + public String getId() { + return id; + } + + /** + * {@inheritDoc} + */ + public void setId(final String id) { + this.id = id; + } + + /** + * {@inheritDoc} + */ + public Map> getPredicates() { + return predicates; + } + + /** + * {@inheritDoc} + */ + public void setPredicates(final Map> predicates) { + // Convert some values to Strings if necessary - required when deserializing the + // object. + if (!predicates.isEmpty()) { + this.predicates.clear(); + for (final Map.Entry> entry : predicates.entrySet()) { + final Object value = entry.getValue().iterator().next(); + final String key = entry.getKey(); + if (value instanceof Map) { + final Map valueMap = (Map) value; + this.predicates.remove(key); + this.addValue(key, new String(valueMap.get("id").toString())); + } else { + this.predicates.put(key, entry.getValue()); + } + } + } + } + + /** + * {@inheritDoc} + */ + public Set value(final String predicateId) { + return predicates.get(predicateId); + } + + /** + * {@inheritDoc} + */ + public void addValue(final String predicateId, final String objectId) { + final Set values = predicates.computeIfAbsent(predicateId, k -> new HashSet<>()); + values.add(objectId); + } + + /** + * {@inheritDoc} + */ + public void addStringValue(final String predicateId, final String value) { + final Set values = predicates.computeIfAbsent(predicateId, k -> new HashSet<>()); + values.add(value); + } + + /** + * {@inheritDoc} + */ + public void addRealValue(final String predicateId, final double value) { + final Set values = predicates.computeIfAbsent(predicateId, k -> new HashSet<>()); + values.add(value); + } + + /** + * {@inheritDoc} + */ + public void removeValue(final String predicateId, final String value) { + if (predicates.containsKey(predicateId)) { + final var v = predicates.get(predicateId); + if (v.contains(value)) { + v.remove(value); + } + } + } + + /** + * {@inheritDoc} + */ + public boolean hasValue(final String predicateId) { + return predicates.containsKey(predicateId); + } + + /** + * {@inheritDoc} + */ + public boolean hasThisValue(final String predicateId, final String objectId) { + final Set values = predicates.get(predicateId); + return values != null && values.contains(objectId); + } + + /** + * {@inheritDoc} + */ + public boolean hasThisStringValue(final String predicateId, final String value) { + final Set values = predicates.get(predicateId); + return values != null && values.contains(value); + } + + /** + * {@inheritDoc} + */ + public boolean hasThisStringValueIgnoreCase(final String predicateId, final String value) { + final Set values = predicates.get(predicateId); + if (values != null) { + for (final Object object : values) { + if (value.equalsIgnoreCase(object.toString())) { + return true; + } + } + } + return false; + } + + /** + * {@inheritDoc} + */ + public boolean hasThisStringValueFuzzy(final String predicateId, final String value) { + final Set values = predicates.get(predicateId); + if (values != null) { + for (final Object object : values) { + if (object.toString().toLowerCase().contains(value.toLowerCase())) { + return true; + } + } + } + return false; + } + + /** + * Output HQDM object and predicate values as collection of string values including predicates. + * + * @return Formatted string output of HQDM object. + */ + @Override + public String toString() { + final StringBuilder builder = new StringBuilder(); + predicates.forEach((key, value) -> { + builder.append(" key: "); + builder.append(key.toString()); + builder.append(", values: ["); + value.forEach(vv -> { + builder.append(vv.toString()); + builder.append(" "); + }); + builder.append("]\n"); + }); + return "HQDMObject{" + "getId=" + id + "\n values=\n" + builder.toString() + '}'; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + * @param object The reference object with which to compare. + * @return {@code true} if this object is the same as the obj argument; false otherwise. + */ + @Override + public boolean equals(final Object object) { + if (this == object) { + return true; + } + if (!(object instanceof HqdmObject)) { + return false; + } + if (!super.equals(object)) { + return false; + } + final HqdmObject that = (HqdmObject) object; + return Objects.equals(id, that.id); + } + + /** + * Returns a hash code value for the object. + * + * @return A hash code value for this object. + */ + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java new file mode 100755 index 00000000..ab3142b6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java @@ -0,0 +1,136 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.pojo; + +import java.util.Map; +import java.util.Set; + +/** + * Top-level interface for HQDM objects. + */ +public interface Top { + + /** + * Get the ID of the HQDM object. + * + * @return ID of the HQDM object. + */ + String getId(); + + /** + * Set the ID of the HQDM object. + * + * @param id ID of the HQDM object. + */ + void setId(String id); + + /** + * Get the predications of the HQDM object. + * + * @return Map of HQDM objects and String predicates of the entity. + */ + Map> getPredicates(); + + /** + * Set the predications of the HQDM object. + * + * @param predicates Predicates of the HQDM object. + */ + void setPredicates(Map> predicates); + + /** + * Get predicate value(s) by predicate String. + * + * @param predicateId Predicate ID. + * @return Set of predicate values (Strings or string-literals). + */ + Set value(String predicateId); + + /** + * Add predicate and object String reference to entity. + * + * @param predicateId Predicate ID. + * @param objectId ID of the object. + */ + void addValue(String predicateId, String objectId); + + /** + * Add predicate String and string value to object. + * + * @param predicateId Predicate ID. + * @param value String value. + */ + void addStringValue(String predicateId, String value); + + /** + * Add predicate String and real number value to object. + * + * @param predicateId Predicate ID. + * @param value Real number value. + */ + void addRealValue(String predicateId, double value); + + /** + * Remove a predicate value. + * + * @param predicateId The ID of the predicate. + * @param value The {@link String} value to be removed. + */ + void removeValue(String predicateId, String value); + + /** + * Does the entity have a given predicate. + * + * @param predicateId Predicate ID. + * @return {@code true} if has predicate value. + */ + boolean hasValue(String predicateId); + + /** + * Does the entity have a given predicate and object value. + * + * @param predicateId Predicate ID. + * @param objectId ID of the object. + * @return {@code true} if has this object value. + */ + boolean hasThisValue(String predicateId, String objectId); + + /** + * Does the entity have a given predicate and string value. + * + * @param predicateId Predicate ID. + * @param value String value. + * @return {@code true} if has this string value. + */ + boolean hasThisStringValue(String predicateId, String value); + + /** + * Does the entity have a given predicate and string value (case-insensitive). + * + * @param predicateId Predicate ID. + * @param value Case-insensitive string value. + * @return {@code true} if has this string value. + */ + boolean hasThisStringValueIgnoreCase(String predicateId, String value); + + /** + * Does the entity have a given predicate and string value. + * + * @param predicateId Predicate ID. + * @param value String value. + * @return {@code true} if has fuzzy string value. + */ + boolean hasThisStringValueFuzzy(String predicateId, String value); +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java new file mode 100644 index 00000000..24bdc0db --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Classes for constructing HQDM entities as Java objects. + */ +package uk.gov.gchq.hqdm.pojo; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java new file mode 100644 index 00000000..e149f30a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java @@ -0,0 +1,1070 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.services; + +import uk.gov.gchq.hqdm.model.*; +import uk.gov.gchq.hqdm.model.Class; +import uk.gov.gchq.hqdm.model.impl.*; + +/** + * Service for creating HQDM Classes. + */ +public class ClassServices { + /** + * Create a Class with an String. + * + * @param id ID of the Class. + * @return A Class instance. + */ + public static Class createClass(final String id) { + return new ClassImpl(id); + } + + /** + * Create a ClassOfAbstractObject with an String. + * + * @param id ID of the ClassOfAbstractObject. + * @return A ClassOfAbstractObject instance. + */ + public static ClassOfAbstractObject createClassOfAbstractObject(final String id) { + return new ClassOfAbstractObjectImpl(id); + } + + /** + * Create a ClassOfActivity with an String. + * + * @param id ID of the ClassOfActivity. + * @return A ClassOfActivity instance. + */ + public static ClassOfActivity createClassOfActivity(final String id) { + return new ClassOfActivityImpl(id); + } + + /** + * Create a ClassOfAgreeContract with an String. + * + * @param id ID of the ClassOfAgreeContract. + * @return A ClassOfAgreeContract instance. + */ + public static ClassOfAgreeContract createClassOfAgreeContract(final String id) { + return new ClassOfAgreeContractImpl(id); + } + + /** + * Create a ClassOfAgreementExecution with an String. + * + * @param id ID of the ClassOfAgreementExecution. + * @return A ClassOfAgreementExecution instance. + */ + public static ClassOfAgreementExecution createClassOfAgreementExecution(final String id) { + return new ClassOfAgreementExecutionImpl(id); + } + + /** + * Create a ClassOfAgreementProcess with an String. + * + * @param id ID of the ClassOfAgreementProcess. + * @return A ClassOfAgreementProcess instance. + */ + public static ClassOfAgreementProcess createClassOfAgreementProcess(final String id) { + return new ClassOfAgreementProcessImpl(id); + } + + /** + * Create a ClassOfAmountOfMoney with an String. + * + * @param id ID of the ClassOfAmountOfMoney. + * @return A ClassOfAmountOfMoney instance. + */ + public static ClassOfAmountOfMoney createClassOfAmountOfMoney(final String id) { + return new ClassOfAmountOfMoneyImpl(id); + } + + /** + * Create a ClassOfAssociation with an String. + * + * @param id ID of the ClassOfAssociation. + * @return A ClassOfAssociation instance. + */ + public static ClassOfAssociation createClassOfAssociation(final String id) { + return new ClassOfAssociationImpl(id); + } + + /** + * Create a ClassOfBiologicalObject with an String. + * + * @param id ID of the ClassOfBiologicalObject. + * @return A ClassOfBiologicalObject instance. + */ + public static ClassOfBiologicalObject createClassOfBiologicalObject(final String id) { + return new ClassOfBiologicalObjectImpl(id); + } + + /** + * Create a ClassOfBiologicalSystem with an String. + * + * @param id ID of the ClassOfBiologicalSystem. + * @return A ClassOfBiologicalSystem instance. + */ + public static ClassOfBiologicalSystem createClassOfBiologicalSystem(final String id) { + return new ClassOfBiologicalSystemImpl(id); + } + + /** + * Create a ClassOfBiologicalSystemComponent with an String. + * + * @param id ID of the ClassOfBiologicalSystemComponent. + * @return A ClassOfBiologicalSystemComponent instance. + */ + public static ClassOfBiologicalSystemComponent createClassOfBiologicalSystemComponent(final String id) { + return new ClassOfBiologicalSystemComponentImpl(id); + } + + /** + * Create a ClassOfClass with an String. + * + * @param id ID of the ClassOfClass. + * @return A ClassOfClass instance. + */ + public static ClassOfClass createClassOfClass(final String id) { + return new ClassOfClassImpl(id); + } + + /** + * Create a ClassOfClassOfSpatioTemporalExtent with an String. + * + * @param id ID of the ClassOfClassOfSpatioTemporalExtent. + * @return A ClassOfClassOfSpatioTemporalExtent instance. + */ + public static ClassOfClassOfSpatioTemporalExtent createClassOfClassOfSpatioTemporalExtent(final String id) { + return new ClassOfClassOfSpatioTemporalExtentImpl(id); + } + + /** + * Create a ClassOfContractExecution with an String. + * + * @param id ID of the ClassOfContractExecution. + * @return A ClassOfContractExecution instance. + */ + public static ClassOfContractExecution createClassOfContractExecution(final String id) { + return new ClassOfContractExecutionImpl(id); + } + + /** + * Create a ClassOfContractProcess with an String. + * + * @param id ID of the ClassOfContractProcess. + * @return A ClassOfContractProcess instance. + */ + public static ClassOfContractProcess createClassOfContractProcess(final String id) { + return new ClassOfContractProcessImpl(id); + } + + /** + * Create a ClassOfEvent with an String. + * + * @param id ID of the ClassOfEvent. + * @return A ClassOfEvent instance. + */ + public static ClassOfEvent createClassOfEvent(final String id) { + return new ClassOfEventImpl(id); + } + + /** + * Create a ClassOfFunctionalObject with an String. + * + * @param id ID of the ClassOfFunctionalObject. + * @return A ClassOfFunctionalObject instance. + */ + public static ClassOfFunctionalObject createClassOfFunctionalObject(final String id) { + return new ClassOfFunctionalObjectImpl(id); + } + + /** + * Create a ClassOfFunctionalSystem with an String. + * + * @param id ID of the ClassOfFunctionalSystem. + * @return A ClassOfFunctionalSystem instance. + */ + public static ClassOfFunctionalSystem createClassOfFunctionalSystem(final String id) { + return new ClassOfFunctionalSystemImpl(id); + } + + /** + * Create a ClassOfFunctionalSystemComponent with an String. + * + * @param id ID of the ClassOfFunctionalSystemComponent. + * @return A ClassOfFunctionalSystemComponent instance. + */ + public static ClassOfFunctionalSystemComponent createClassOfFunctionalSystemComponent(final String id) { + return new ClassOfFunctionalSystemComponentImpl(id); + } + + /** + * Create a ClassOfInPlaceBiologicalComponent with an String. + * + * @param id ID of the ClassOfInPlaceBiologicalComponent. + * @return A ClassOfInPlaceBiologicalComponent instance. + */ + public static ClassOfInPlaceBiologicalComponent createClassOfInPlaceBiologicalComponent(final String id) { + return new ClassOfInPlaceBiologicalComponentImpl(id); + } + + /** + * Create a ClassOfIndividual with an String. + * + * @param id ID of the ClassOfIndividual. + * @return A ClassOfIndividual instance. + */ + public static ClassOfIndividual createClassOfIndividual(final String id) { + return new ClassOfIndividualImpl(id); + } + + /** + * Create a ClassOfInstalledFunctionalSystemComponent with an String. + * + * @param id ID of the ClassOfInstalledFunctionalSystemComponent. + * @return A ClassOfInstalledFunctionalSystemComponent instance. + */ + public static ClassOfInstalledFunctionalSystemComponent createClassOfInstalledFunctionalSystemComponent( + final String id) { + return new ClassOfInstalledFunctionalSystemComponentImpl(id); + } + + /** + * Create a ClassOfInstalledObject with an String. + * + * @param id ID of the ClassOfInstalledObject. + * @return A ClassOfInstalledObject instance. + */ + public static ClassOfInstalledObject createClassOfInstalledObject(final String id) { + return new ClassOfInstalledObjectImpl(id); + } + + /** + * Create a ClassOfIntentionallyConstructedObject with an String. + * + * @param id ID of the ClassOfIntentionallyConstructedObject. + * @return A ClassOfIntentionallyConstructedObject instance. + */ + public static ClassOfIntentionallyConstructedObject createClassOfIntentionallyConstructedObject(final String id) { + return new ClassOfIntentionallyConstructedObjectImpl(id); + } + + /** + * Create a ClassOfOffer with an String. + * + * @param id ID of the ClassOfOffer. + * @return A ClassOfOffer instance. + */ + public static ClassOfOffer createClassOfOffer(final String id) { + return new ClassOfOfferImpl(id); + } + + /** + * Create a ClassOfOrdinaryBiologicalObject with an String. + * + * @param id ID of the ClassOfOrdinaryBiologicalObject. + * @return A ClassOfOrdinaryBiologicalObject instance. + */ + public static ClassOfOrdinaryBiologicalObject createClassOfOrdinaryBiologicalObject(final String id) { + return new ClassOfOrdinaryBiologicalObjectImpl(id); + } + + /** + * Create a ClassOfOrdinaryFunctionalObject with an String. + * + * @param id ID of the ClassOfOrdinaryFunctionalObject. + * @return A ClassOfOrdinaryFunctionalObject instance. + */ + public static ClassOfOrdinaryFunctionalObject createClassOfOrdinaryFunctionalObject(final String id) { + return new ClassOfOrdinaryFunctionalObjectImpl(id); + } + + /** + * Create a ClassOfOrdinaryPhysicalObject with an String. + * + * @param id ID of the ClassOfOrdinaryPhysicalObject. + * @return A ClassOfOrdinaryPhysicalObject instance. + */ + public static ClassOfOrdinaryPhysicalObject createClassOfOrdinaryPhysicalObject(final String id) { + return new ClassOfOrdinaryPhysicalObjectImpl(id); + } + + /** + * Create a ClassOfOrganization with an String. + * + * @param id ID of the ClassOfOrganization. + * @return A ClassOfOrganization instance. + */ + public static ClassOfOrganization createClassOfOrganization(final String id) { + return new ClassOfOrganizationImpl(id); + } + + /** + * Create a ClassOfOrganizationComponent with an String. + * + * @param id ID of the ClassOfOrganizationComponent. + * @return A ClassOfOrganizationComponent instance. + */ + public static ClassOfOrganizationComponent createClassOfOrganizationComponent(final String id) { + return new ClassOfOrganizationComponentImpl(id); + } + + /** + * Create a ClassOfParticipant with an String. + * + * @param id ID of the ClassOfParticipant. + * @return A ClassOfParticipant instance. + */ + public static ClassOfParticipant createClassOfParticipant(final String id) { + return new ClassOfParticipantImpl(id); + } + + /** + * Create a ClassOfParty with an String. + * + * @param id ID of the ClassOfParty. + * @return A ClassOfParty instance. + */ + public static ClassOfParty createClassOfParty(final String id) { + return new ClassOfPartyImpl(id); + } + + /** + * Create a ClassOfPeriodOfTime with an String. + * + * @param id ID of the ClassOfPeriodOfTime. + * @return A ClassOfPeriodOfTime instance. + */ + public static ClassOfPeriodOfTime createClassOfPeriodOfTime(final String id) { + return new ClassOfPeriodOfTimeImpl(id); + } + + /** + * Create a ClassOfPerson with an String. + * + * @param id ID of the ClassOfPerson. + * @return A ClassOfPerson instance. + */ + public static ClassOfPerson createClassOfPerson(final String id) { + return new ClassOfPersonImpl(id); + } + + /** + * Create a ClassOfPersonInPosition with an String. + * + * @param id ID of the ClassOfPersonInPosition. + * @return A ClassOfPersonInPosition instance. + */ + public static ClassOfPersonInPosition createClassOfPersonInPosition(final String id) { + return new ClassOfPersonInPositionImpl(id); + } + + /** + * Create a ClassOfPhysicalObject with an String. + * + * @param id ID of the ClassOfPhysicalObject. + * @return A ClassOfPhysicalObject instance. + */ + public static ClassOfPhysicalObject createClassOfPhysicalObject(final String id) { + return new ClassOfPhysicalObjectImpl(id); + } + + /** + * Create a ClassOfPhysicalProperty with an String. + * + * @param id ID of the ClassOfPhysicalProperty. + * @return A ClassOfPhysicalProperty instance. + */ + public static ClassOfPhysicalProperty createClassOfPhysicalProperty(final String id) { + return new ClassOfPhysicalPropertyImpl(id); + } + + /** + * Create a ClassOfPhysicalQuantity with an String. + * + * @param id ID of the ClassOfPhysicalQuantity. + * @return A ClassOfPhysicalQuantity instance. + */ + public static ClassOfPhysicalQuantity createClassOfPhysicalQuantity(final String id) { + return new ClassOfPhysicalQuantityImpl(id); + } + + /** + * Create a ClassOfPointInTime with an String. + * + * @param id ID of the ClassOfPointInTime. + * @return A ClassOfPointInTime instance. + */ + public static ClassOfPointInTime createClassOfPointInTime(final String id) { + return new ClassOfPointInTimeImpl(id); + } + + /** + * Create a ClassOfPosition with an String. + * + * @param id ID of the ClassOfPosition. + * @return A ClassOfPosition instance. + */ + public static ClassOfPosition createClassOfPosition(final String id) { + return new ClassOfPositionImpl(id); + } + + /** + * Create a ClassOfPossibleWorld with an String. + * + * @param id ID of the ClassOfPossibleWorld. + * @return A ClassOfPossibleWorld instance. + */ + public static ClassOfPossibleWorld createClassOfPossibleWorld(final String id) { + return new ClassOfPossibleWorldImpl(id); + } + + /** + * Create a ClassOfReachingAgreement with an String. + * + * @param id ID of the ClassOfReachingAgreement. + * @return A ClassOfReachingAgreement instance. + */ + public static ClassOfReachingAgreement createClassOfReachingAgreement(final String id) { + return new ClassOfReachingAgreementImpl(id); + } + + /** + * Create a ClassOfRelationship with an String. + * + * @param id ID of the ClassOfRelationship. + * @return A ClassOfRelationship instance. + */ + public static ClassOfRelationship createClassOfRelationship(final String id) { + return new ClassOfRelationshipImpl(id); + } + + /** + * Create a ClassOfRepresentation with an String. + * + * @param id ID of the ClassOfRepresentation. + * @return A ClassOfRepresentation instance. + */ + public static ClassOfRepresentation createClassOfRepresentation(final String id) { + return new ClassOfRepresentationImpl(id); + } + + /** + * Create a ClassOfSalesProductInstance with an String. + * + * @param id ID of the ClassOfSalesProductInstance. + * @return A ClassOfSalesProductInstance instance. + */ + public static ClassOfSalesProductInstance createClassOfSalesProductInstance(final String id) { + return new ClassOfSalesProductInstanceImpl(id); + } + + /** + * Create a ClassOfSign with an String. + * + * @param id ID of the ClassOfSign. + * @return A ClassOfSign instance. + */ + public static ClassOfSign createClassOfSign(final String id) { + return new ClassOfSignImpl(id); + } + + /** + * Create a ClassOfSociallyConstructedActivity with an String. + * + * @param id ID of the ClassOfSociallyConstructedActivity. + * @return A ClassOfSociallyConstructedActivity instance. + */ + public static ClassOfSociallyConstructedActivity createClassOfSociallyConstructedActivity(final String id) { + return new ClassOfSociallyConstructedActivityImpl(id); + } + + /** + * Create a ClassOfSociallyConstructedObject with an String. + * + * @param id ID of the ClassOfSociallyConstructedObject. + * @return A ClassOfSociallyConstructedObject instance. + */ + public static ClassOfSociallyConstructedObject createClassOfSociallyConstructedObject(final String id) { + return new ClassOfSociallyConstructedObjectImpl(id); + } + + /** + * Create a ClassOfSpatioTemporalExtent with an String. + * + * @param id ID of the ClassOfSpatioTemporalExtent. + * @return A ClassOfSpatioTemporalExtent instance. + */ + public static ClassOfSpatioTemporalExtent createClassOfSpatioTemporalExtent(final String id) { + return new ClassOfSpatioTemporalExtentImpl(id); + } + + /** + * Create a ClassOfState with an String. + * + * @param id ID of the ClassOfState. + * @return A ClassOfState instance. + */ + public static ClassOfState createClassOfState(final String id) { + return new ClassOfStateImpl(id); + } + + /** + * Create a ClassOfStateOfActivity with an String. + * + * @param id ID of the ClassOfStateOfActivity. + * @return A ClassOfStateOfActivity instance. + */ + public static ClassOfStateOfActivity createClassOfStateOfActivity(final String id) { + return new ClassOfStateOfActivityImpl(id); + } + + /** + * Create a ClassOfStateOfAmountOfMoney with an String. + * + * @param id ID of the ClassOfStateOfAmountOfMoney. + * @return A ClassOfStateOfAmountOfMoney instance. + */ + public static ClassOfStateOfAmountOfMoney createClassOfStateOfAmountOfMoney(final String id) { + return new ClassOfStateOfAmountOfMoneyImpl(id); + } + + /** + * Create a ClassOfStateOfAssociation with an String. + * + * @param id ID of the ClassOfStateOfAssociation. + * @return A ClassOfStateOfAssociation instance. + */ + public static ClassOfStateOfAssociation createClassOfStateOfAssociation(final String id) { + return new ClassOfStateOfAssociationImpl(id); + } + + /** + * Create a ClassOfStateOfBiologicalObject with an String. + * + * @param id ID of the ClassOfStateOfBiologicalObject. + * @return A ClassOfStateOfBiologicalObject instance. + */ + public static ClassOfStateOfBiologicalObject createClassOfStateOfBiologicalObject(final String id) { + return new ClassOfStateOfBiologicalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfBiologicalSystem with an String. + * + * @param id ID of the ClassOfStateOfBiologicalSystem. + * @return A ClassOfStateOfBiologicalSystem instance. + */ + public static ClassOfStateOfBiologicalSystem createClassOfStateOfBiologicalSystem(final String id) { + return new ClassOfStateOfBiologicalSystemImpl(id); + } + + /** + * Create a ClassOfStateOfBiologicalSystemComponent with an String. + * + * @param id ID of the ClassOfStateOfBiologicalSystemComponent. + * @return A ClassOfStateOfBiologicalSystemComponent instance. + */ + public static ClassOfStateOfBiologicalSystemComponent createClassOfStateOfBiologicalSystemComponent( + final String id) { + return new ClassOfStateOfBiologicalSystemComponentImpl(id); + } + + /** + * Create a ClassOfStateOfFunctionalObject with an String. + * + * @param id ID of the ClassOfStateOfFunctionalObject. + * @return A ClassOfStateOfFunctionalObject instance. + */ + public static ClassOfStateOfFunctionalObject createClassOfStateOfFunctionalObject(final String id) { + return new ClassOfStateOfFunctionalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfFunctionalSystem with an String. + * + * @param id ID of the ClassOfStateOfFunctionalSystem. + * @return A ClassOfStateOfFunctionalSystem instance. + */ + public static ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSystem(final String id) { + return new ClassOfStateOfFunctionalSystemImpl(id); + } + + /** + * Create a ClassOfStateOfFunctionalSystemComponent with an String. + * + * @param id ID of the ClassOfStateOfFunctionalSystemComponent. + * @return A ClassOfStateOfFunctionalSystemComponent instance. + */ + public static ClassOfStateOfFunctionalSystemComponent createClassOfStateOfFunctionalSystemComponent( + final String id) { + return new ClassOfStateOfFunctionalSystemComponentImpl(id); + } + + /** + * Create a ClassOfStateOfIntentionallyConstructedObject with an String. + * + * @param id ID of the ClassOfStateOfIntentionallyConstructedObject. + * @return A ClassOfStateOfIntentionallyConstructedObject instance. + */ + public static ClassOfStateOfIntentionallyConstructedObject createClassOfStateOfIntentionallyConstructedObject( + final String id) { + return new ClassOfStateOfIntentionallyConstructedObjectImpl(id); + } + + /** + * Create a ClassOfStateOfOrdinaryBiologicalObject with an String. + * + * @param id ID of the ClassOfStateOfOrdinaryBiologicalObject. + * @return A ClassOfStateOfOrdinaryBiologicalObject instance. + */ + public static ClassOfStateOfOrdinaryBiologicalObject createClassOfStateOfOrdinaryBiologicalObject(final String id) { + return new ClassOfStateOfOrdinaryBiologicalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfOrdinaryFunctionalObject with an String. + * + * @param id ID of the ClassOfStateOfOrdinaryFunctionalObject. + * @return A ClassOfStateOfOrdinaryFunctionalObject instance. + */ + public static ClassOfStateOfOrdinaryFunctionalObject createClassOfStateOfOrdinaryFunctionalObject(final String id) { + return new ClassOfStateOfOrdinaryFunctionalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfOrdinaryPhysicalObject with an String. + * + * @param id ID of the ClassOfStateOfOrdinaryPhysicalObject. + * @return A ClassOfStateOfOrdinaryPhysicalObject instance. + */ + public static ClassOfStateOfOrdinaryPhysicalObject createClassOfStateOfOrdinaryPhysicalObject(final String id) { + return new ClassOfStateOfOrdinaryPhysicalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfOrganization with an String. + * + * @param id ID of the ClassOfStateOfOrganization. + * @return A ClassOfStateOfOrganization instance. + */ + public static ClassOfStateOfOrganization createClassOfStateOfOrganization(final String id) { + return new ClassOfStateOfOrganizationImpl(id); + } + + /** + * Create a ClassOfStateOfOrganizationComponent with an String. + * + * @param id ID of the ClassOfStateOfOrganizationComponent. + * @return A ClassOfStateOfOrganizationComponent instance. + */ + public static ClassOfStateOfOrganizationComponent createClassOfStateOfOrganizationComponent(final String id) { + return new ClassOfStateOfOrganizationComponentImpl(id); + } + + /** + * Create a ClassOfStateOfParty with an String. + * + * @param id ID of the ClassOfStateOfParty. + * @return A ClassOfStateOfParty instance. + */ + public static ClassOfStateOfParty createClassOfStateOfParty(final String id) { + return new ClassOfStateOfPartyImpl(id); + } + + /** + * Create a ClassOfStateOfPerson with an String. + * + * @param id ID of the ClassOfStateOfPerson. + * @return A ClassOfStateOfPerson instance. + */ + public static ClassOfStateOfPerson createClassOfStateOfPerson(final String id) { + return new ClassOfStateOfPersonImpl(id); + } + + /** + * Create a ClassOfStateOfPhysicalObject with an String. + * + * @param id ID of the ClassOfStateOfPhysicalObject. + * @return A ClassOfStateOfPhysicalObject instance. + */ + public static ClassOfStateOfPhysicalObject createClassOfStateOfPhysicalObject(final String id) { + return new ClassOfStateOfPhysicalObjectImpl(id); + } + + /** + * Create a ClassOfStateOfPosition with an String. + * + * @param id ID of the ClassOfStateOfPosition. + * @return A ClassOfStateOfPosition instance. + */ + public static ClassOfStateOfPosition createClassOfStateOfPosition(final String id) { + return new ClassOfStateOfPositionImpl(id); + } + + /** + * Create a ClassOfStateOfSalesProductInstance with an String. + * + * @param id ID of the ClassOfStateOfSalesProductInstance. + * @return A ClassOfStateOfSalesProductInstance instance. + */ + public static ClassOfStateOfSalesProductInstance createClassOfStateOfSalesProductInstance(final String id) { + return new ClassOfStateOfSalesProductInstanceImpl(id); + } + + /** + * Create a ClassOfStateOfSign with an String. + * + * @param id ID of the ClassOfStateOfSign. + * @return A ClassOfStateOfSign instance. + */ + public static ClassOfStateOfSign createClassOfStateOfSign(final String id) { + return new ClassOfStateOfSignImpl(id); + } + + /** + * Create a ClassOfStateOfSociallyConstructedActivity with an String. + * + * @param id ID of the ClassOfStateOfSociallyConstructedActivity. + * @return A ClassOfStateOfSociallyConstructedActivity instance. + */ + public static ClassOfStateOfSociallyConstructedActivity createClassOfStateOfSociallyConstructedActivity( + final String id) { + return new ClassOfStateOfSociallyConstructedActivityImpl(id); + } + + /** + * Create a ClassOfStateOfSociallyConstructedObject with an String. + * + * @param id ID of the ClassOfStateOfSociallyConstructedObject. + * @return A ClassOfStateOfSociallyConstructedObject instance. + */ + public static ClassOfStateOfSociallyConstructedObject createClassOfStateOfSociallyConstructedObject( + final String id) { + return new ClassOfStateOfSociallyConstructedObjectImpl(id); + } + + /** + * Create a ClassOfStateOfSystem with an String. + * + * @param id ID of the ClassOfStateOfSystem. + * @return A ClassOfStateOfSystem instance. + */ + public static ClassOfStateOfSystem createClassOfStateOfSystem(final String id) { + return new ClassOfStateOfSystemImpl(id); + } + + /** + * Create a ClassOfStateOfSystemComponent with an String. + * + * @param id ID of the ClassOfStateOfSystemComponent. + * @return A ClassOfStateOfSystemComponent instance. + */ + public static ClassOfStateOfSystemComponent createClassOfStateOfSystemComponent(final String id) { + return new ClassOfStateOfSystemComponentImpl(id); + } + + /** + * Create a ClassOfSystem with an String. + * + * @param id ID of the ClassOfSystem. + * @return A ClassOfSystem instance. + */ + public static ClassOfSystem createClassOfSystem(final String id) { + return new ClassOfSystemImpl(id); + } + + /** + * Create a ClassOfSystemComponent with an String. + * + * @param id ID of the ClassOfSystemComponent. + * @return A ClassOfSystemComponent instance. + */ + public static ClassOfSystemComponent createClassOfSystemComponent(final String id) { + return new ClassOfSystemComponentImpl(id); + } + + /** + * Create a KindOfActivity with an String. + * + * @param id ID of the KindOfActivity. + * @return A KindOfActivity instance. + */ + public static KindOfActivity createKindOfActivity(final String id) { + return new KindOfActivityImpl(id); + } + + /** + * Create a KindOfAssociation with an String. + * + * @param id ID of the KindOfAssociation. + * @return A KindOfAssociation instance. + */ + public static KindOfAssociation createKindOfAssociation(final String id) { + return new KindOfAssociationImpl(id); + } + + /** + * Create a KindOfBiologicalObject with an String. + * + * @param id ID of the KindOfBiologicalObject. + * @return A KindOfBiologicalObject instance. + */ + public static KindOfBiologicalObject createKindOfBiologicalObject(final String id) { + return new KindOfBiologicalObjectImpl(id); + } + + /** + * Create a KindOfBiologicalSystem with an String. + * + * @param id ID of the KindOfBiologicalSystem. + * @return A KindOfBiologicalSystem instance. + */ + public static KindOfBiologicalSystem createKindOfBiologicalSystem(final String id) { + return new KindOfBiologicalSystemImpl(id); + } + + /** + * Create a KindOfBiologicalSystemComponent with an String. + * + * @param id ID of the KindOfBiologicalSystemComponent. + * @return A KindOfBiologicalSystemComponent instance. + */ + public static KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final String id) { + return new KindOfBiologicalSystemComponentImpl(id); + } + + /** + * Create a KindOfFunctionalObject with an String. + * + * @param id ID of the KindOfFunctionalObject. + * @return A KindOfFunctionalObject instance. + */ + public static KindOfFunctionalObject createKindOfFunctionalObject(final String id) { + return new KindOfFunctionalObjectImpl(id); + } + + /** + * Create a KindOfFunctionalSystem with an String. + * + * @param id ID of the KindOfFunctionalSystem. + * @return A KindOfFunctionalSystem instance. + */ + public static KindOfFunctionalSystem createKindOfFunctionalSystem(final String id) { + return new KindOfFunctionalSystemImpl(id); + } + + /** + * Create a KindOfFunctionalSystemComponent with an String. + * + * @param id ID of the KindOfFunctionalSystemComponent. + * @return A KindOfFunctionalSystemComponent instance. + */ + public static KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final String id) { + return new KindOfFunctionalSystemComponentImpl(id); + } + + /** + * Create a KindOfIndividual with an String. + * + * @param id ID of the KindOfIndividual. + * @return A KindOfIndividual instance. + */ + public static KindOfIndividual createKindOfIndividual(final String id) { + return new KindOfIndividualImpl(id); + } + + /** + * Create a KindOfIntentionallyConstructedObject with an String. + * + * @param id ID of the KindOfIntentionallyConstructedObject. + * @return A KindOfIntentionallyConstructedObject instance. + */ + public static KindOfIntentionallyConstructedObject createKindOfIntentionallyConstructedObject(final String id) { + return new KindOfIntentionallyConstructedObjectImpl(id); + } + + /** + * Create a KindOfOrdinaryBiologicalObject with an String. + * + * @param id ID of the KindOfOrdinaryBiologicalObject. + * @return A KindOfOrdinaryBiologicalObject instance. + */ + public static KindOfOrdinaryBiologicalObject createKindOfOrdinaryBiologicalObject(final String id) { + return new KindOfOrdinaryBiologicalObjectImpl(id); + } + + /** + * Create a KindOfOrdinaryFunctionalObject with an String. + * + * @param id ID of the KindOfOrdinaryFunctionalObject. + * @return A KindOfOrdinaryFunctionalObject instance. + */ + public static KindOfOrdinaryFunctionalObject createKindOfOrdinaryFunctionalObject(final String id) { + return new KindOfOrdinaryFunctionalObjectImpl(id); + } + + /** + * Create a KindOfOrdinaryPhysicalObject with an String. + * + * @param id ID of the KindOfOrdinaryPhysicalObject. + * @return A KindOfOrdinaryPhysicalObject instance. + */ + public static KindOfOrdinaryPhysicalObject createKindOfOrdinaryPhysicalObject(final String id) { + return new KindOfOrdinaryPhysicalObjectImpl(id); + } + + /** + * Create a KindOfOrganization with an String. + * + * @param id ID of the KindOfOrganization. + * @return A KindOfOrganization instance. + */ + public static KindOfOrganization createKindOfOrganization(final String id) { + return new KindOfOrganizationImpl(id); + } + + /** + * Create a KindOfOrganizationComponent with an String. + * + * @param id ID of the KindOfOrganizationComponent. + * @return A KindOfOrganizationComponent instance. + */ + public static KindOfOrganizationComponent createKindOfOrganizationComponent(final String id) { + return new KindOfOrganizationComponentImpl(id); + } + + /** + * Create a KindOfParty with an String. + * + * @param id ID of the KindOfParty. + * @return A KindOfParty instance. + */ + public static KindOfParty createKindOfParty(final String id) { + return new KindOfPartyImpl(id); + } + + /** + * Create a KindOfPerson with an String. + * + * @param id ID of the KindOfPerson. + * @return A KindOfPerson instance. + */ + public static KindOfPerson createKindOfPerson(final String id) { + return new KindOfPersonImpl(id); + } + + /** + * Create a KindOfPhysicalObject with an String. + * + * @param id ID of the KindOfPhysicalObject. + * @return A KindOfPhysicalObject instance. + */ + public static KindOfPhysicalObject createKindOfPhysicalObject(final String id) { + return new KindOfPhysicalObjectImpl(id); + } + + /** + * Create a KindOfPhysicalProperty with an String. + * + * @param id ID of the KindOfPhysicalProperty. + * @return A KindOfPhysicalProperty instance. + */ + public static KindOfPhysicalProperty createKindOfPhysicalProperty(final String id) { + return new KindOfPhysicalPropertyImpl(id); + } + + /** + * Create a KindOfPhysicalQuantity with an String. + * + * @param id ID of the KindOfPhysicalQuantity. + * @return A KindOfPhysicalQuantity instance. + */ + public static KindOfPhysicalQuantity createKindOfPhysicalQuantity(final String id) { + return new KindOfPhysicalQuantityImpl(id); + } + + /** + * Create a KindOfPosition with an String. + * + * @param id ID of the KindOfPosition. + * @return A KindOfPosition instance. + */ + public static KindOfPosition createKindOfPosition(final String id) { + return new KindOfPositionImpl(id); + } + + /** + * Create a KindOfRelationshipWithRestriction with an String. + * + * @param id ID of the KindOfRelationshipWithRestriction. + * @return A KindOfRelationshipWithRestriction instance. + */ + public static KindOfRelationshipWithRestriction createKindOfRelationshipWithRestriction(final String id) { + return new KindOfRelationshipWithRestrictionImpl(id); + } + + /** + * Create a KindOfRelationshipWithSignature with an String. + * + * @param id ID of the KindOfRelationshipWithSignature. + * @return A KindOfRelationshipWithSignature instance. + */ + public static KindOfRelationshipWithSignature createKindOfRelationshipWithSignature(final String id) { + return new KindOfRelationshipWithSignatureImpl(id); + } + + /** + * Create a KindOfSociallyConstructedObject with an String. + * + * @param id ID of the KindOfSociallyConstructedObject. + * @return A KindOfSociallyConstructedObject instance. + */ + public static KindOfSociallyConstructedObject createKindOfSociallyConstructedObject(final String id) { + return new KindOfSociallyConstructedObjectImpl(id); + } + + /** + * Create a KindOfSystem with an String. + * + * @param id ID of the KindOfSystem. + * @return A KindOfSystem instance. + */ + public static KindOfSystem createKindOfSystem(final String id) { + return new KindOfSystemImpl(id); + } + + /** + * Create a KindOfSystemComponent with an String. + * + * @param id ID of the KindOfSystemComponent. + * @return A KindOfSystemComponent instance. + */ + public static KindOfSystemComponent createKindOfSystemComponent(final String id) { + return new KindOfSystemComponentImpl(id); + } + + /** + * Create a Role with an String. + * + * @param id ID of the Role. + * @return A Role instance. + */ + public static Role createRole(final String id) { + return new RoleImpl(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java new file mode 100644 index 00000000..b3b6637f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java @@ -0,0 +1,101 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.services; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.util.HashMap; +import java.util.Map; + +import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.hqdm.pojo.Top; + +/** + * Service for creating dynamic proxies. + */ +public class DynamicObjects { + + /** + * Create a Proxy that implements the set of specified interfaces. + * + * @param The subtypes of {@link Thing} to implement. + * @param The subtype of {@link Thing} to return. + * @param id ID of the {@link Thing} to create. + * @param returnType The type to cast the return value to. + * @param classes The array of classes to implement. + * @return An object of type U. + */ + public static U create(final String id, final java.lang.Class returnType, + final java.lang.Class[] classes) { + + return (U) implementInterfaces((T) new ThingImpl(id), returnType, classes); + } + + /** + * Create a Proxy that implements the set of specified interfaces, for an existing object. + * + * @param The subtypes of {@link Thing} to implement. + * @param The subtype of {@link Thing} to return. + * @param thing The {@link Thing} to delegate the interfaces to. + * @param returnType The type to cast the return value to. + * @param classes The array of classes to implement. + * @return An object of type U. + */ + public static U implementInterfaces(final T thing, + final java.lang.Class returnType, final java.lang.Class[] classes) { + try { + return (U) Proxy.newProxyInstance(ClassServices.class.getClassLoader(), classes, new ThingHandler(thing)); + + } catch (final Exception e) { + return null; + } + } + + /** + * Proxy method calls to {@link Object}. + */ + private static class ThingHandler implements InvocationHandler { + + /** The methods to be proxied. */ + private final Map methods = new HashMap<>(); + + /** The object to be proxied. */ + private Object target; + + /** + * Constructor accepting the thing to be proxied. + * + * @param target The Object to be proxied. + */ + public ThingHandler(final Object target) { + this.target = target; + + // Cache the methods to be proxied. + for (final Method method : Top.class.getDeclaredMethods()) { + this.methods.put(method.getName(), method); + } + } + + /** + * Call the requested method. + */ + @Override + public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { + return methods.get(method.getName()).invoke(target, args); + } + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java new file mode 100644 index 00000000..3520a3ec --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java @@ -0,0 +1,141 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.services; + +import uk.gov.gchq.hqdm.model.Aggregation; +import uk.gov.gchq.hqdm.model.Classification; +import uk.gov.gchq.hqdm.model.Composition; +import uk.gov.gchq.hqdm.model.DefinedRelationship; +import uk.gov.gchq.hqdm.model.Function_; +import uk.gov.gchq.hqdm.model.Relationship; +import uk.gov.gchq.hqdm.model.Scale; +import uk.gov.gchq.hqdm.model.Specialization; +import uk.gov.gchq.hqdm.model.TemporalComposition; +import uk.gov.gchq.hqdm.model.UnitOfMeasure; +import uk.gov.gchq.hqdm.model.impl.AggregationImpl; +import uk.gov.gchq.hqdm.model.impl.ClassificationImpl; +import uk.gov.gchq.hqdm.model.impl.CompositionImpl; +import uk.gov.gchq.hqdm.model.impl.DefinedRelationshipImpl; +import uk.gov.gchq.hqdm.model.impl.FunctionImpl; +import uk.gov.gchq.hqdm.model.impl.RelationshipImpl; +import uk.gov.gchq.hqdm.model.impl.ScaleImpl; +import uk.gov.gchq.hqdm.model.impl.SpecializationImpl; +import uk.gov.gchq.hqdm.model.impl.TemporalCompositionImpl; +import uk.gov.gchq.hqdm.model.impl.UnitOfMeasureImpl; + +/** + * Service for creating HQDM Relationships. + */ +public class RelationshipServices { + /** + * Create a Specialization with an String. + * + * @param id ID of the Specialization. + * @return A Specialization instance. + */ + public static Specialization createSpecialization(final String id) { + return new SpecializationImpl(id); + } + + /** + * Create a Scale with an String. + * + * @param id ID of the Scale. + * @return A Scale instance. + */ + public static Scale createScale(final String id) { + return new ScaleImpl(id); + } + + /** + * Create a UnitOfMeasure with an String. + * + * @param id ID of the UnitOfMeasure. + * @return A UnitOfMeasure instance. + */ + public static UnitOfMeasure createUnitOfMeasure(final String id) { + return new UnitOfMeasureImpl(id); + } + + /** + * Create a Function_ with an String. + * + * @param id ID of the . + * @return A Function_ instance. + */ + public static Function_ createFunction(final String id) { + return new FunctionImpl(id); + } + + /** + * Create a Classification with an String. + * + * @param id ID of the Classification. + * @return A Classification instance. + */ + public static Classification createClassification(final String id) { + return new ClassificationImpl(id); + } + + /** + * Create a TemporalComposition with an String. + * + * @param id ID of the TemporalComposition. + * @return A TemporalComposition instance. + */ + public static TemporalComposition createTemporalComposition(final String id) { + return new TemporalCompositionImpl(id); + } + + /** + * Create a Composition with an String. + * + * @param id ID of the Composition. + * @return A Composition instance. + */ + public static Composition createComposition(final String id) { + return new CompositionImpl(id); + } + + /** + * Create a Aggregation with an String. + * + * @param id ID of the Aggregation. + * @return A Aggregation instance. + */ + public static Aggregation createAggregation(final String id) { + return new AggregationImpl(id); + } + + /** + * Create a Relationship with an String. + * + * @param id ID of the Relationship. + * @return A Relationship instance. + */ + public static Relationship createRelationship(final String id) { + return new RelationshipImpl(id); + } + + /** + * Create a DefinedRelationship with an String. + * + * @param id ID of the DefinedRelationship. + * @return A DefinedRelationship instance. + */ + public static DefinedRelationship createDefinedRelationship(final String id) { + return new DefinedRelationshipImpl(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java new file mode 100644 index 00000000..97ec31c4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java @@ -0,0 +1,1174 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.services; + +import uk.gov.gchq.hqdm.model.*; +import uk.gov.gchq.hqdm.model.impl.*; + +/** + * Services for creating SpatioTemporalExtent objects. + */ +public class SpatioTemporalExtentServices { + + /** + * Create a AbstractObject with an String. + * + * @param id ID of the AbstractObject. + * @return A AbstractObject instance. + */ + public static AbstractObject createAbstractObject(final String id) { + return new AbstractObjectImpl(id); + } + + /** + * Create a AcceptanceOfOffer with an String. + * + * @param id ID of the AcceptanceOfOffer. + * @return A AcceptanceOfOffer instance. + */ + public static AcceptanceOfOffer createAcceptanceOfOffer(final String id) { + return new AcceptanceOfOfferImpl(id); + } + + /** + * Create a AcceptanceOfOfferForGoods with an String. + * + * @param id ID of the AcceptanceOfOfferForGoods. + * @return A AcceptanceOfOfferForGoods instance. + */ + public static AcceptanceOfOfferForGoods createAcceptanceOfOfferForGoods(final String id) { + return new AcceptanceOfOfferForGoodsImpl(id); + } + + /** + * Create a Activity with an String. + * + * @param id ID of the Activity. + * @return A Activity instance. + */ + public static Activity createActivity(final String id) { + return new ActivityImpl(id); + } + + /** + * Create a AgreeContract with an String. + * + * @param id ID of the AgreeContract. + * @return A AgreeContract instance. + */ + public static AgreeContract createAgreeContract(final String id) { + return new AgreeContractImpl(id); + } + + /** + * Create a AgreementExecution with an String. + * + * @param id ID of the AgreementExecution. + * @return A AgreementExecution instance. + */ + public static AgreementExecution createAgreementExecution(final String id) { + return new AgreementExecutionImpl(id); + } + + /** + * Create a AgreementProcess with an String. + * + * @param id ID of the AgreementProcess. + * @return A AgreementProcess instance. + */ + public static AgreementProcess createAgreementProcess(final String id) { + return new AgreementProcessImpl(id); + } + + /** + * Create a AmountOfMoney with an String. + * + * @param id ID of the AmountOfMoney. + * @return A AmountOfMoney instance. + */ + public static AmountOfMoney createAmountOfMoney(final String id) { + return new AmountOfMoneyImpl(id); + } + + /** + * Create a Asset with an String. + * + * @param id ID of the Asset. + * @return A Asset instance. + */ + public static Asset createAsset(final String id) { + return new AssetImpl(id); + } + + /** + * Create a Association with an String. + * + * @param id ID of the Association. + * @return A Association instance. + */ + public static Association createAssociation(final String id) { + return new AssociationImpl(id); + } + + /** + * Create a BeginningOfOwnership with an String. + * + * @param id ID of the BeginningOfOwnership. + * @return A BeginningOfOwnership instance. + */ + public static BeginningOfOwnership createBeginningOfOwnership(final String id) { + return new BeginningOfOwnershipImpl(id); + } + + /** + * Create a BiologicalObject with an String. + * + * @param id ID of the BiologicalObject. + * @return A BiologicalObject instance. + */ + public static BiologicalObject createBiologicalObject(final String id) { + return new BiologicalObjectImpl(id); + } + + /** + * Create a BiologicalSystem with an String. + * + * @param id ID of the BiologicalSystem. + * @return A BiologicalSystem instance. + */ + public static BiologicalSystem createBiologicalSystem(final String id) { + return new BiologicalSystemImpl(id); + } + + /** + * Create a BiologicalSystemComponent with an String. + * + * @param id ID of the BiologicalSystemComponent. + * @return A BiologicalSystemComponent instance. + */ + public static BiologicalSystemComponent createBiologicalSystemComponent(final String id) { + return new BiologicalSystemComponentImpl(id); + } + + /** + * Create a ContractExecution with an String. + * + * @param id ID of the ContractExecution. + * @return A ContractExecution instance. + */ + public static ContractExecution createContractExecution(final String id) { + return new ContractExecutionImpl(id); + } + + /** + * Create a ContractProcess with an String. + * + * @param id ID of the ContractProcess. + * @return A ContractProcess instance. + */ + public static ContractProcess createContractProcess(final String id) { + return new ContractProcessImpl(id); + } + + /** + * Create a Currency with an String. + * + * @param id ID of the Currency. + * @return A Currency instance. + */ + public static Currency createCurrency(final String id) { + return new CurrencyImpl(id); + } + + /** + * Create a Definition with an String. + * + * @param id ID of the Definition. + * @return A Definition instance. + */ + public static Definition createDefinition(final String id) { + return new DefinitionImpl(id); + } + + /** + * Create a Description with an String. + * + * @param id ID of the Description. + * @return A Description instance. + */ + public static Description createDescription(final String id) { + return new DescriptionImpl(id); + } + + /** + * Create a Employee with an String. + * + * @param id ID of the Employee. + * @return A Employee instance. + */ + public static Employee createEmployee(final String id) { + return new EmployeeImpl(id); + } + + /** + * Create a Employer with an String. + * + * @param id ID of the Employer. + * @return A Employer instance. + */ + public static Employer createEmployer(final String id) { + return new EmployerImpl(id); + } + + /** + * Create a Employment with an String. + * + * @param id ID of the Employment. + * @return A Employment instance. + */ + public static Employment createEmployment(final String id) { + return new EmploymentImpl(id); + } + + /** + * Create a EndingOfOwnership with an String. + * + * @param id ID of the EndingOfOwnership. + * @return A EndingOfOwnership instance. + */ + public static EndingOfOwnership createEndingOfOwnership(final String id) { + return new EndingOfOwnershipImpl(id); + } + + /** + * Create a Event with an String. + * + * @param id ID of the Event. + * @return A Event instance. + */ + public static Event createEvent(final String id) { + return new EventImpl(id); + } + + /** + * Create a ExchangeOfGoodsAndMoney with an String. + * + * @param id ID of the ExchangeOfGoodsAndMoney. + * @return A ExchangeOfGoodsAndMoney instance. + */ + public static ExchangeOfGoodsAndMoney createExchangeOfGoodsAndMoney(final String id) { + return new ExchangeOfGoodsAndMoneyImpl(id); + } + + /** + * Create a FunctionalObject with an String. + * + * @param id ID of the FunctionalObject. + * @return A FunctionalObject instance. + */ + public static FunctionalObject createFunctionalObject(final String id) { + return new FunctionalObjectImpl(id); + } + + /** + * Create a FunctionalSystem with an String. + * + * @param id ID of the FunctionalSystem. + * @return A FunctionalSystem instance. + */ + public static FunctionalSystem createFunctionalSystem(final String id) { + return new FunctionalSystemImpl(id); + } + + /** + * Create a FunctionalSystemComponent with an String. + * + * @param id ID of the FunctionalSystemComponent. + * @return A FunctionalSystemComponent instance. + */ + public static FunctionalSystemComponent createFunctionalSystemComponent(final String id) { + return new FunctionalSystemComponentImpl(id); + } + + /** + * Create a Identification with an String. + * + * @param id ID of the Identification. + * @return A Identification instance. + */ + public static Identification createIdentification(final String id) { + return new IdentificationImpl(id); + } + + /** + * Create a IdentificationOfPhysicalQuantity with an String. + * + * @param id ID of the IdentificationOfPhysicalQuantity. + * @return A IdentificationOfPhysicalQuantity instance. + */ + public static IdentificationOfPhysicalQuantity createIdentificationOfPhysicalQuantity(final String id) { + return new IdentificationOfPhysicalQuantityImpl(id); + } + + /** + * Create a InPlaceBiologicalComponent with an String. + * + * @param id ID of the InPlaceBiologicalComponent. + * @return A InPlaceBiologicalComponent instance. + */ + public static InPlaceBiologicalComponent createInPlaceBiologicalComponent(final String id) { + return new InPlaceBiologicalComponentImpl(id); + } + + /** + * Create a Individual with an String. + * + * @param id ID of the Individual. + * @return A Individual instance. + */ + public static Individual createIndividual(final String id) { + return new IndividualImpl(id); + } + + /** + * Create a InstalledFunctionalSystemComponent with an String. + * + * @param id ID of the InstalledFunctionalSystemComponent. + * @return A InstalledFunctionalSystemComponent instance. + */ + public static InstalledFunctionalSystemComponent createInstalledFunctionalSystemComponent(final String id) { + return new InstalledFunctionalSystemComponentImpl(id); + } + + /** + * Create a InstalledObject with an String. + * + * @param id ID of the InstalledObject. + * @return A InstalledObject instance. + */ + public static InstalledObject createInstalledObject(final String id) { + return new InstalledObjectImpl(id); + } + + /** + * Create a IntentionallyConstructedObject with an String. + * + * @param id ID of the IntentionallyConstructedObject. + * @return A IntentionallyConstructedObject instance. + */ + public static IntentionallyConstructedObject createIntentionallyConstructedObject(final String id) { + return new IntentionallyConstructedObjectImpl(id); + } + + /** + * Create a LanguageCommunity with an String. + * + * @param id ID of the LanguageCommunity. + * @return A LanguageCommunity instance. + */ + public static LanguageCommunity createLanguageCommunity(final String id) { + return new LanguageCommunityImpl(id); + } + + /** + * Create a MoneyAsset with an String. + * + * @param id ID of the MoneyAsset. + * @return A MoneyAsset instance. + */ + public static MoneyAsset createMoneyAsset(final String id) { + return new MoneyAssetImpl(id); + } + + /** + * Create a Offer with an String. + * + * @param id ID of the Offer. + * @return A Offer instance. + */ + public static Offer createOffer(final String id) { + return new OfferImpl(id); + } + + /** + * Create a OfferAndAcceptanceForGoods with an String. + * + * @param id ID of the OfferAndAcceptanceForGoods. + * @return A OfferAndAcceptanceForGoods instance. + */ + public static OfferAndAcceptanceForGoods createOfferAndAcceptanceForGoods(final String id) { + return new OfferAndAcceptanceForGoodsImpl(id); + } + + /** + * Create a OfferForGoods with an String. + * + * @param id ID of the OfferForGoods. + * @return A OfferForGoods instance. + */ + public static OfferForGoods createOfferForGoods(final String id) { + return new OfferForGoodsImpl(id); + } + + /** + * Create a Offering with an String. + * + * @param id ID of the Offering. + * @return A Offering instance. + */ + public static Offering createOffering(final String id) { + return new OfferingImpl(id); + } + + /** + * Create a OrdinaryBiologicalObject with an String. + * + * @param id ID of the OrdinaryBiologicalObject. + * @return A OrdinaryBiologicalObject instance. + */ + public static OrdinaryBiologicalObject createOrdinaryBiologicalObject(final String id) { + return new OrdinaryBiologicalObjectImpl(id); + } + + /** + * Create a OrdinaryFunctionalObject with an String. + * + * @param id ID of the OrdinaryFunctionalObject. + * @return A OrdinaryFunctionalObject instance. + */ + public static OrdinaryFunctionalObject createOrdinaryFunctionalObject(final String id) { + return new OrdinaryFunctionalObjectImpl(id); + } + + /** + * Create a OrdinaryPhysicalObject with an String. + * + * @param id ID of the OrdinaryPhysicalObject. + * @return A OrdinaryPhysicalObject instance. + */ + public static OrdinaryPhysicalObject createOrdinaryPhysicalObject(final String id) { + return new OrdinaryPhysicalObjectImpl(id); + } + + /** + * Create a Organization with an String. + * + * @param id ID of the Organization. + * @return A Organization instance. + */ + public static Organization createOrganization(final String id) { + return new OrganizationImpl(id); + } + + /** + * Create a OrganizationComponent with an String. + * + * @param id ID of the OrganizationComponent. + * @return A OrganizationComponent instance. + */ + public static OrganizationComponent createOrganizationComponent(final String id) { + return new OrganizationComponentImpl(id); + } + + /** + * Create a Owner with an String. + * + * @param id ID of the Owner. + * @return A Owner instance. + */ + public static Owner createOwner(final String id) { + return new OwnerImpl(id); + } + + /** + * Create a Ownership with an String. + * + * @param id ID of the Ownership. + * @return A Ownership instance. + */ + public static Ownership createOwnership(final String id) { + return new OwnershipImpl(id); + } + + /** + * Create a Participant with an String. + * + * @param id ID of the Participant. + * @return A Participant instance. + */ + public static Participant createParticipant(final String id) { + return new ParticipantImpl(id); + } + + /** + * Create a ParticipantInActivityOrAssociation with an String. + * + * @param id ID of the ParticipantInActivityOrAssociation. + * @return A ParticipantInActivityOrAssociation instance. + */ + public static ParticipantInActivityOrAssociation createParticipantInActivityOrAssociation(final String id) { + return new ParticipantInActivityOrAssociationImpl(id); + } + + /** + * Create a Party with an String. + * + * @param id ID of the Party. + * @return A Party instance. + */ + public static Party createParty(final String id) { + return new PartyImpl(id); + } + + /** + * Create a Pattern with an String. + * + * @param id ID of the Pattern. + * @return A Pattern instance. + */ + public static Pattern createPattern(final String id) { + return new PatternImpl(id); + } + + /** + * Create a PeriodOfTime with an String. + * + * @param id ID of the PeriodOfTime. + * @return A PeriodOfTime instance. + */ + public static PeriodOfTime createPeriodOfTime(final String id) { + return new PeriodOfTimeImpl(id); + } + + /** + * Create a Person with an String. + * + * @param id ID of the Person. + * @return A Person instance. + */ + public static Person createPerson(final String id) { + return new PersonImpl(id); + } + + /** + * Create a PersonInPosition with an String. + * + * @param id ID of the PersonInPosition. + * @return A PersonInPosition instance. + */ + public static PersonInPosition createPersonInPosition(final String id) { + return new PersonInPositionImpl(id); + } + + /** + * Create a PhysicalObject with an String. + * + * @param id ID of the PhysicalObject. + * @return A PhysicalObject instance. + */ + public static PhysicalObject createPhysicalObject(final String id) { + return new PhysicalObjectImpl(id); + } + + /** + * Create a PhysicalProperty with an String. + * + * @param id ID of the PhysicalProperty. + * @return A PhysicalProperty instance. + */ + public static PhysicalProperty createPhysicalProperty(final String id) { + return new PhysicalPropertyImpl(id); + } + + /** + * Create a PhysicalPropertyRange with an String. + * + * @param id ID of the PhysicalPropertyRange. + * @return A PhysicalPropertyRange instance. + */ + public static PhysicalPropertyRange createPhysicalPropertyRange(final String id) { + return new PhysicalPropertyRangeImpl(id); + } + + /** + * Create a PhysicalQuantity with an String. + * + * @param id ID of the PhysicalQuantity. + * @return A PhysicalQuantity instance. + */ + public static PhysicalQuantity createPhysicalQuantity(final String id) { + return new PhysicalQuantityImpl(id); + } + + /** + * Create a PhysicalQuantityRange with an String. + * + * @param id ID of the PhysicalQuantityRange. + * @return A PhysicalQuantityRange instance. + */ + public static PhysicalQuantityRange createPhysicalQuantityRange(final String id) { + return new PhysicalQuantityRangeImpl(id); + } + + /** + * Create a Plan with an String. + * + * @param id ID of the Plan. + * @return A Plan instance. + */ + public static Plan createPlan(final String id) { + return new PlanImpl(id); + } + + /** + * Create a PointInTime with an String. + * + * @param id ID of the PointInTime. + * @return A PointInTime instance. + */ + public static PointInTime createPointInTime(final String id) { + return new PointInTimeImpl(id); + } + + /** + * Create a Position with an String. + * + * @param id ID of the Position. + * @return A Position instance. + */ + public static Position createPosition(final String id) { + return new PositionImpl(id); + } + + /** + * Create a PossibleWorld with an String. + * + * @param id ID of the PossibleWorld. + * @return A PossibleWorld instance. + */ + public static PossibleWorld createPossibleWorld(final String id) { + return new PossibleWorldImpl(id); + } + + /** + * Create a Price with an String. + * + * @param id ID of the Price. + * @return A Price instance. + */ + public static Price createPrice(final String id) { + return new PriceImpl(id); + } + + /** + * Create a ProductBrand with an String. + * + * @param id ID of the ProductBrand. + * @return A ProductBrand instance. + */ + public static ProductBrand createProductBrand(final String id) { + return new ProductBrandImpl(id); + } + + /** + * Create a ProductOffering with an String. + * + * @param id ID of the ProductOffering. + * @return A ProductOffering instance. + */ + public static ProductOffering createProductOffering(final String id) { + return new ProductOfferingImpl(id); + } + + /** + * Create a ReachingAgreement with an String. + * + * @param id ID of the ReachingAgreement. + * @return A ReachingAgreement instance. + */ + public static ReachingAgreement createReachingAgreement(final String id) { + return new ReachingAgreementImpl(id); + } + + /** + * Create a RecognizingLanguageCommunity with an String. + * + * @param id ID of the RecognizingLanguageCommunity. + * @return A RecognizingLanguageCommunity instance. + */ + public static RecognizingLanguageCommunity createRecognizingLanguageCommunity(final String id) { + return new RecognizingLanguageCommunityImpl(id); + } + + /** + * Create a RepresentationByPattern with an String. + * + * @param id ID of the RepresentationByPattern. + * @return A RepresentationByPattern instance. + */ + public static RepresentationByPattern createRepresentationByPattern(final String id) { + return new RepresentationByPatternImpl(id); + } + + /** + * Create a RepresentationBySign with an String. + * + * @param id ID of the RepresentationBySign. + * @return A RepresentationBySign instance. + */ + public static RepresentationBySign createRepresentationBySign(final String id) { + return new RepresentationBySignImpl(id); + } + + /** + * Create a Requirement with an String. + * + * @param id ID of the Requirement. + * @return A Requirement instance. + */ + public static Requirement createRequirement(final String id) { + return new RequirementImpl(id); + } + + /** + * Create a RequirementSpecification with an String. + * + * @param id ID of the RequirementSpecification. + * @return A RequirementSpecification instance. + */ + public static RequirementSpecification createRequirementSpecification(final String id) { + return new RequirementSpecificationImpl(id); + } + + /** + * Create a SaleOfGoods with an String. + * + * @param id ID of the SaleOfGoods. + * @return A SaleOfGoods instance. + */ + public static SaleOfGoods createSaleOfGoods(final String id) { + return new SaleOfGoodsImpl(id); + } + + /** + * Create a SalesProduct with an String. + * + * @param id ID of the SalesProduct. + * @return A SalesProduct instance. + */ + public static SalesProduct createSalesProduct(final String id) { + return new SalesProductImpl(id); + } + + /** + * Create a SalesProductInstance with an String. + * + * @param id ID of the SalesProductInstance. + * @return A SalesProductInstance instance. + */ + public static SalesProductInstance createSalesProductInstance(final String id) { + return new SalesProductInstanceImpl(id); + } + + /** + * Create a SalesProductVersion with an String. + * + * @param id ID of the SalesProductVersion. + * @return A SalesProductVersion instance. + */ + public static SalesProductVersion createSalesProductVersion(final String id) { + return new SalesProductVersionImpl(id); + } + + /** + * Create a Sign with an String. + * + * @param id ID of the Sign. + * @return A Sign instance. + */ + public static Sign createSign(final String id) { + return new SignImpl(id); + } + + /** + * Create a SociallyConstructedActivity with an String. + * + * @param id ID of the SociallyConstructedActivity. + * @return A SociallyConstructedActivity instance. + */ + public static SociallyConstructedActivity createSociallyConstructedActivity(final String id) { + return new SociallyConstructedActivityImpl(id); + } + + /** + * Create a SociallyConstructedObject with an String. + * + * @param id ID of the SociallyConstructedObject. + * @return A SociallyConstructedObject instance. + */ + public static SociallyConstructedObject createSociallyConstructedObject(final String id) { + return new SociallyConstructedObjectImpl(id); + } + + /** + * Create a SpatioTemporalExtent with an String. + * + * @param id ID of the SpatioTemporalExtent. + * @return A SpatioTemporalExtent instance. + */ + public static SpatioTemporalExtent createSpatioTemporalExtent(final String id) { + return new SpatioTemporalExtentImpl(id); + } + + /** + * Create a State with an String. + * + * @param id ID of the State. + * @return A State instance. + */ + public static State createState(final String id) { + return new StateImpl(id); + } + + /** + * Create a StateOfActivity with an String. + * + * @param id ID of the StateOfActivity. + * @return A StateOfActivity instance. + */ + public static StateOfActivity createStateOfActivity(final String id) { + return new StateOfActivityImpl(id); + } + + /** + * Create a StateOfAmountOfMoney with an String. + * + * @param id ID of the StateOfAmountOfMoney. + * @return A StateOfAmountOfMoney instance. + */ + public static StateOfAmountOfMoney createStateOfAmountOfMoney(final String id) { + return new StateOfAmountOfMoneyImpl(id); + } + + /** + * Create a StateOfAssociation with an String. + * + * @param id ID of the StateOfAssociation. + * @return A StateOfAssociation instance. + */ + public static StateOfAssociation createStateOfAssociation(final String id) { + return new StateOfAssociationImpl(id); + } + + /** + * Create a StateOfBiologicalObject with an String. + * + * @param id ID of the StateOfBiologicalObject. + * @return A StateOfBiologicalObject instance. + */ + public static StateOfBiologicalObject createStateOfBiologicalObject(final String id) { + return new StateOfBiologicalObjectImpl(id); + } + + /** + * Create a StateOfBiologicalSystem with an String. + * + * @param id ID of the StateOfBiologicalSystem. + * @return A StateOfBiologicalSystem instance. + */ + public static StateOfBiologicalSystem createStateOfBiologicalSystem(final String id) { + return new StateOfBiologicalSystemImpl(id); + } + + /** + * Create a StateOfBiologicalSystemComponent with an String. + * + * @param id ID of the StateOfBiologicalSystemComponent. + * @return A StateOfBiologicalSystemComponent instance. + */ + public static StateOfBiologicalSystemComponent createStateOfBiologicalSystemComponent(final String id) { + return new StateOfBiologicalSystemComponentImpl(id); + } + + /** + * Create a StateOfFunctionalObject with an String. + * + * @param id ID of the StateOfFunctionalObject. + * @return A StateOfFunctionalObject instance. + */ + public static StateOfFunctionalObject createStateOfFunctionalObject(final String id) { + return new StateOfFunctionalObjectImpl(id); + } + + /** + * Create a StateOfFunctionalSystem with an String. + * + * @param id ID of the StateOfFunctionalSystem. + * @return A StateOfFunctionalSystem instance. + */ + public static StateOfFunctionalSystem createStateOfFunctionalSystem(final String id) { + return new StateOfFunctionalSystemImpl(id); + } + + /** + * Create a StateOfFunctionalSystemComponent with an String. + * + * @param id ID of the StateOfFunctionalSystemComponent. + * @return A StateOfFunctionalSystemComponent instance. + */ + public static StateOfFunctionalSystemComponent createStateOfFunctionalSystemComponent(final String id) { + return new StateOfFunctionalSystemComponentImpl(id); + } + + /** + * Create a StateOfIntentionallyConstructedObject with an String. + * + * @param id ID of the StateOfIntentionallyConstructedObject. + * @return A StateOfIntentionallyConstructedObject instance. + */ + public static StateOfIntentionallyConstructedObject createStateOfIntentionallyConstructedObject(final String id) { + return new StateOfIntentionallyConstructedObjectImpl(id); + } + + /** + * Create a StateOfLanguageCommunity with an String. + * + * @param id ID of the StateOfLanguageCommunity. + * @return A StateOfLanguageCommunity instance. + */ + public static StateOfLanguageCommunity createStateOfLanguageCommunity(final String id) { + return new StateOfLanguageCommunityImpl(id); + } + + /** + * Create a StateOfOrdinaryBiologicalObject with an String. + * + * @param id ID of the StateOfOrdinaryBiologicalObject. + * @return A StateOfOrdinaryBiologicalObject instance. + */ + public static StateOfOrdinaryBiologicalObject createStateOfOrdinaryBiologicalObject(final String id) { + return new StateOfOrdinaryBiologicalObjectImpl(id); + } + + /** + * Create a StateOfOrdinaryFunctionalObject with an String. + * + * @param id ID of the StateOfOrdinaryFunctionalObject. + * @return A StateOfOrdinaryFunctionalObject instance. + */ + public static StateOfOrdinaryFunctionalObject createStateOfOrdinaryFunctionalObject(final String id) { + return new StateOfOrdinaryFunctionalObjectImpl(id); + } + + /** + * Create a StateOfOrdinaryPhysicalObject with an String. + * + * @param id ID of the StateOfOrdinaryPhysicalObject. + * @return A StateOfOrdinaryPhysicalObject instance. + */ + public static StateOfOrdinaryPhysicalObject createStateOfOrdinaryPhysicalObject(final String id) { + return new StateOfOrdinaryPhysicalObjectImpl(id); + } + + /** + * Create a StateOfOrganization with an String. + * + * @param id ID of the StateOfOrganization. + * @return A StateOfOrganization instance. + */ + public static StateOfOrganization createStateOfOrganization(final String id) { + return new StateOfOrganizationImpl(id); + } + + /** + * Create a StateOfOrganizationComponent with an String. + * + * @param id ID of the StateOfOrganizationComponent. + * @return A StateOfOrganizationComponent instance. + */ + public static StateOfOrganizationComponent createStateOfOrganizationComponent(final String id) { + return new StateOfOrganizationComponentImpl(id); + } + + /** + * Create a StateOfParty with an String. + * + * @param id ID of the StateOfParty. + * @return A StateOfParty instance. + */ + public static StateOfParty createStateOfParty(final String id) { + return new StateOfPartyImpl(id); + } + + /** + * Create a StateOfPerson with an String. + * + * @param id ID of the StateOfPerson. + * @return A StateOfPerson instance. + */ + public static StateOfPerson createStateOfPerson(final String id) { + return new StateOfPersonImpl(id); + } + + /** + * Create a StateOfPhysicalObject with an String. + * + * @param id ID of the StateOfPhysicalObject. + * @return A StateOfPhysicalObject instance. + */ + public static StateOfPhysicalObject createStateOfPhysicalObject(final String id) { + return new StateOfPhysicalObjectImpl(id); + } + + /** + * Create a StateOfPosition with an String. + * + * @param id ID of the StateOfPosition. + * @return A StateOfPosition instance. + */ + public static StateOfPosition createStateOfPosition(final String id) { + return new StateOfPositionImpl(id); + } + + /** + * Create a StateOfSalesProductInstance with an String. + * + * @param id ID of the StateOfSalesProductInstance. + * @return A StateOfSalesProductInstance instance. + */ + public static StateOfSalesProductInstance createStateOfSalesProductInstance(final String id) { + return new StateOfSalesProductInstanceImpl(id); + } + + /** + * Create a StateOfSign with an String. + * + * @param id ID of the StateOfSign. + * @return A StateOfSign instance. + */ + public static StateOfSign createStateOfSign(final String id) { + return new StateOfSignImpl(id); + } + + /** + * Create a StateOfSociallyConstructedActivity with an String. + * + * @param id ID of the StateOfSociallyConstructedActivity. + * @return A StateOfSociallyConstructedActivity instance. + */ + public static StateOfSociallyConstructedActivity createStateOfSociallyConstructedActivity(final String id) { + return new StateOfSociallyConstructedActivityImpl(id); + } + + /** + * Create a StateOfSociallyConstructedObject with an String. + * + * @param id ID of the StateOfSociallyConstructedObject. + * @return A StateOfSociallyConstructedObject instance. + */ + public static StateOfSociallyConstructedObject createStateOfSociallyConstructedObject(final String id) { + return new StateOfSociallyConstructedObjectImpl(id); + } + + /** + * Create a StateOfSystem with an String. + * + * @param id ID of the StateOfSystem. + * @return A StateOfSystem instance. + */ + public static StateOfSystem createStateOfSystem(final String id) { + return new StateOfSystemImpl(id); + } + + /** + * Create a StateOfSystemComponent with an String. + * + * @param id ID of the StateOfSystemComponent. + * @return A StateOfSystemComponent instance. + */ + public static StateOfSystemComponent createStateOfSystemComponent(final String id) { + return new StateOfSystemComponentImpl(id); + } + + /** + * Create a System with an String. + * + * @param id ID of the System. + * @return A System instance. + */ + public static uk.gov.gchq.hqdm.model.System createSystem(final String id) { + return new SystemImpl(id); + } + + /** + * Create a SystemComponent with an String. + * + * @param id ID of the SystemComponent. + * @return A SystemComponent instance. + */ + public static SystemComponent createSystemComponent(final String id) { + return new SystemComponentImpl(id); + } + + /** + * Create a Thing with an String. + * + * @param id ID of the Thing. + * @return A Thing instance. + */ + public static Thing createThing(final String id) { + return new ThingImpl(id); + } + + /** + * Create a TransferOfOwnership with an String. + * + * @param id ID of the TransferOfOwnership. + * @return A TransferOfOwnership instance. + */ + public static TransferOfOwnership createTransferOfOwnership(final String id) { + return new TransferOfOwnershipImpl(id); + } + + /** + * Create a TransferOfOwnershipOfMoney with an String. + * + * @param id ID of the TransferOfOwnershipOfMoney. + * @return A TransferOfOwnershipOfMoney instance. + */ + public static TransferOfOwnershipOfMoney createTransferOfOwnershipOfMoney(final String id) { + return new TransferOfOwnershipOfMoneyImpl(id); + } + + /** + * Create a Transferee with an String. + * + * @param id ID of the Transferee. + * @return A Transferee instance. + */ + public static Transferee createTransferee(final String id) { + return new TransfereeImpl(id); + } + + /** + * Create a Transferor with an String. + * + * @param id ID of the Transferor. + * @return A Transferor instance. + */ + public static Transferor createTransferor(final String id) { + return new TransferorImpl(id); + } +} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java new file mode 100644 index 00000000..9c14589c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java @@ -0,0 +1,18 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Services for creating HQDM objects and relationships. + */ +package uk.gov.gchq.hqdm.services; diff --git a/hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java b/hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java new file mode 100755 index 00000000..3fe137ab --- /dev/null +++ b/hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.pojo; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +import org.junit.Assert; +import org.junit.Test; + +import uk.gov.gchq.hqdm.model.PointInTime; +import uk.gov.gchq.hqdm.model.PossibleWorld; +import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.hqdm.model.impl.PointInTimeImpl; +import uk.gov.gchq.hqdm.model.impl.PossibleWorldImpl; +import uk.gov.gchq.hqdm.model.impl.SpatioTemporalExtentImpl; +import uk.gov.gchq.hqdm.model.impl.ThingImpl; + +/** + * HqdmObject tests. + */ +public class HqdmObjectTest { + + @Test + public void testDateTimeFormattingForTriples() { + final PossibleWorld possibleWorld = new PossibleWorldImpl("World"); + final String beginDateTime = LocalDateTime.now().toString(); + final String endDate = LocalDate.now().toString(); + + final PointInTime beginEvent = new PointInTimeImpl(beginDateTime); + + beginEvent.addValue("HQDM.PART_OF_POSSIBLE_WORLD", possibleWorld.getId()); + + final PointInTime endEvent = new PointInTimeImpl(endDate); + + endEvent.addValue("HQDM.PART_OF_POSSIBLE_WORLD", possibleWorld.getId()); + + final SpatioTemporalExtent object1 = new SpatioTemporalExtentImpl("Object1"); + + object1.addValue("HQDM.BEGINNING", beginEvent.getId()); + object1.addValue("HQDM.ENDING", endEvent.getId()); + object1.addValue("HQDM.PART_OF_POSSIBLE_WORLD", possibleWorld.getId()); + + Assert.assertEquals(beginDateTime, beginEvent.getId()); + Assert.assertEquals(endDate, endEvent.getId()); + } + + @Test + public void testDeleteValueFromThing() { + final var thing = new ThingImpl("test"); + + // Add a predicate and confirm it is present. + thing.addValue("test-predicate", "test-value"); + Assert.assertTrue(thing.hasThisValue("test-predicate", "test-value")); + + // Delete a non-existent predicate and make sure the test predicate is still present. + thing.removeValue("test-predicate-2", "test-value-2"); + Assert.assertTrue(thing.hasThisValue("test-predicate", "test-value")); + + // Delete a non-existent value for the predicate and make sure the test value is still present. + thing.removeValue("test-predicate", "test-value-3"); + Assert.assertTrue(thing.hasThisValue("test-predicate", "test-value")); + + // Remove the test predicate and make sure it is no longer present. + thing.removeValue("test-predicate", "test-value"); + Assert.assertFalse(thing.hasThisValue("test-predicate", "test-value")); + } +} diff --git a/hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java b/hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java new file mode 100755 index 00000000..0b162234 --- /dev/null +++ b/hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package uk.gov.gchq.hqdm.services; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +import uk.gov.gchq.hqdm.model.Participant; +import uk.gov.gchq.hqdm.model.Party; +import uk.gov.gchq.hqdm.model.Person; + +/** + * Test creation of dynamic objects. + */ +public class DynamicObjectsTest { + + /** + * Test that we can create an object with multiple interfaces. + */ + @Test + public void testCreate() { + + // Create the object with three interfaces. + final Person person = DynamicObjects.create("person1", Person.class, + new Class[] { Person.class, Participant.class, Party.class }); + + // Verify that the object implements all three interfaces and has the right id. + assertTrue(person instanceof Person); + assertTrue(person instanceof Participant); + assertTrue(person instanceof Party); + assertEquals("person1", person.getId()); + } + + /** + * Test that we can add an interface to an existing object. + */ + @Test + public void testAddInterface() { + + // Create the object with one interface. + final Person person1 = SpatioTemporalExtentServices.createPerson("person1"); + + // Verify that the object implements just the Person and Party interfaces. + assertTrue(person1 instanceof Person); + assertFalse(person1 instanceof Participant); + assertTrue(person1 instanceof Party); + assertEquals("person1", person1.getId()); + + // Add two more interfaces to the object - this time return it as a Participant. + final Participant person2 = DynamicObjects.implementInterfaces(person1, Participant.class, + new Class[] { Person.class, Participant.class, Party.class }); + + // Verify that the object implements all three interfaces and has the right id. + assertTrue(person2 instanceof Person); + assertTrue(person2 instanceof Participant); + assertTrue(person2 instanceof Party); + assertEquals("person1", person2.getId()); + } +} diff --git a/pom.xml b/pom.xml index fcff31f3..381e2b12 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,8 @@ core examples + hqdm + hqdm-rdf @@ -55,12 +57,12 @@ 1.0-SNAPSHOT - uk.gov.gchq.hqdm - hqdm-core + uk.gov.gchq.magma-core + hqdm 1.1-SNAPSHOT - uk.gov.gchq.hqdm + uk.gov.gchq.magma-core hqdm-rdf 1.0-SNAPSHOT From f07bb651396af731cba9d4a3ec56bfc9c199359d Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 8 Jul 2022 15:03:04 +0000 Subject: [PATCH 85/91] Removed 'createWithJenadatabase' method from MagmaCoreServiceFactory. --- .../magmacore/service/MagmaCoreServiceFactory.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java index 4e057963..d696aa6a 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -43,16 +43,6 @@ public static MagmaCoreService createWithJenaDatabase(final String location) { return new MagmaCoreService(new MagmaCoreJenaDatabase(location)); } - /** - * Create a {@link MagmaCoreService} for an existing {@link MagmaCoreJenaDatabase}. - * - * @param database A {@link MagmaCoreJenaDatabase}. - * @return {@link MagmaCoreService}. - */ - public static MagmaCoreService createWithJenaDatabase(final MagmaCoreJenaDatabase database) { - return new MagmaCoreService(database); - } - /** * Create a {@link MagmaCoreService} for a new {@link MagmaCoreRemoteSparqlDatabase} with a SPARQL * server connection. From 119658a6c2f603160124f4250699d2c974e54f25 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 8 Jul 2022 18:00:17 +0000 Subject: [PATCH 86/91] Reverted spacing in examples.signs.ExampleSigns --- .../examples/signs/ExampleSigns.java | 272 +++++++++--------- 1 file changed, 136 insertions(+), 136 deletions(-) diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java index a89c0f43..b6efb18b 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java @@ -37,140 +37,140 @@ */ public class ExampleSigns { - /** - * A function that populates a database. - * - * @param mcService A {@link MagmaCoreService}. - * @return {@link DbTransformation}. - */ - public static DbTransformation populateExampleData(final MagmaCoreService mcService) { - - // Apply the transformation to the database. There are dependencies between these change sets - // since they both depend on RDL being present, but also the occupancies depend on the - // individuals being present, so each change set needs to be applied before the next one - // can be created. - final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); - - // Apply the DbChangeSet. - rdlChangeSet.apply(mcService); - - // mcService now contains the RDL needed for the next DbChangeSet - final DbChangeSet signsChangeSet = addSigns(mcService); - - // Apply the DbChangeSet. - signsChangeSet.apply(mcService); - // - // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. - return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); - } - - /** - * Create a {@link DbChangeSet} to add the representation by sign. - * - * @param mcService {@link MagmaCoreService}. - * @return {@link DbChangeSet}. - */ - private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of( - "URL Pattern", - "Description By URL", - "English Speakers")); - - // Find the required classes, kinds, and roles. - final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); - final Description descriptionByUrl = (Description) entities.get("Description By URL"); - final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities - .get("English Speakers"); - final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); - - // Create IRIs for the new entities. - final IRI possibleWorld = new IRI(USER_BASE, uid()); - final IRI person = new IRI(USER_BASE, uid()); - final IRI wikipediaSign = new IRI(USER_BASE, uid()); - final IRI britannica = new IRI(USER_BASE, uid()); - final IRI biography = new IRI(USER_BASE, uid()); - final IRI stanford = new IRI(USER_BASE, uid()); - final IRI nationalGeographic = new IRI(USER_BASE, uid()); - final IRI representationBySign = new IRI(USER_BASE, uid()); - final IRI startEvent = new IRI(USER_BASE, uid()); - final IRI endEvent = new IRI(USER_BASE, uid()); - - // Create the set of DbCreateOperations. - final List creates = List.of( - - // Create the possible world that we are working in. - new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), - new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), - - // Create the thing represented. - new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - // Create the signs that represent the thing. - new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(wikipediaSign, HQDM.VALUE_, - "https://en.wikipedia.org/wiki/Socrates"), - new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(britannica, HQDM.VALUE_, - "https://www.britannica.com/biography/Socrates"), - new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(biography, HQDM.VALUE_, - "https://www.biography.com/scholar/socrates"), - new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(stanford, HQDM.VALUE_, - "https://plato.stanford.edu/entries/socrates/"), - new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - - new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(nationalGeographic, HQDM.VALUE_, - "https://www.nationalgeographic.com/culture/article/socrates"), - new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - // Create the representation by signs. - new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, - HQDM.REPRESENTATION_BY_SIGN.getIri()), - new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), - new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), - new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), - - // Add beginning, ending, etc. from `association`. - new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), - - new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), - new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), - new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), - - new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), - new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), - - // Add the participants. - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), - new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, - representationBySign.getIri())); - - // Create a change set and return it. - return new DbChangeSet(List.of(), creates); - } + /** + * A function that populates a database. + * + * @param mcService A {@link MagmaCoreService}. + * @return {@link DbTransformation}. + */ + public static DbTransformation populateExampleData(final MagmaCoreService mcService) { + + // Apply the transformation to the database. There are dependencies between these change sets + // since they both depend on RDL being present, but also the occupancies depend on the + // individuals being present, so each change set needs to be applied before the next one + // can be created. + final DbChangeSet rdlChangeSet = ExampleSignsRdl.createRefDataObjects(); + + // Apply the DbChangeSet. + rdlChangeSet.apply(mcService); + + // mcService now contains the RDL needed for the next DbChangeSet + final DbChangeSet signsChangeSet = addSigns(mcService); + + // Apply the DbChangeSet. + signsChangeSet.apply(mcService); + // + // Combine the DbChangeSets into a DbTransformation and return it as a record of the changes. + return new DbTransformation(List.of(rdlChangeSet, signsChangeSet)); + } + + /** + * Create a {@link DbChangeSet} to add the representation by sign. + * + * @param mcService {@link MagmaCoreService}. + * @return {@link DbChangeSet}. + */ + private static DbChangeSet addSigns(final MagmaCoreService mcService) { + final Map entities = mcService.findByEntityNameInTransaction(List.of( + "URL Pattern", + "Description By URL", + "English Speakers")); + + // Find the required classes, kinds, and roles. + final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); + final Description descriptionByUrl = (Description) entities.get("Description By URL"); + final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities + .get("English Speakers"); + final IRI englishSpeakersIri = new IRI(englishSpeakers.getId()); + + // Create IRIs for the new entities. + final IRI possibleWorld = new IRI(USER_BASE, uid()); + final IRI person = new IRI(USER_BASE, uid()); + final IRI wikipediaSign = new IRI(USER_BASE, uid()); + final IRI britannica = new IRI(USER_BASE, uid()); + final IRI biography = new IRI(USER_BASE, uid()); + final IRI stanford = new IRI(USER_BASE, uid()); + final IRI nationalGeographic = new IRI(USER_BASE, uid()); + final IRI representationBySign = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); + + // Create the set of DbCreateOperations. + final List creates = List.of( + + // Create the possible world that we are working in. + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), + + // Create the thing represented. + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + // Create the signs that represent the thing. + new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(wikipediaSign, HQDM.VALUE_, + "https://en.wikipedia.org/wiki/Socrates"), + new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(britannica, HQDM.VALUE_, + "https://www.britannica.com/biography/Socrates"), + new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(biography, HQDM.VALUE_, + "https://www.biography.com/scholar/socrates"), + new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(stanford, HQDM.VALUE_, + "https://plato.stanford.edu/entries/socrates/"), + new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + + new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), + new DbCreateOperation(nationalGeographic, HQDM.VALUE_, + "https://www.nationalgeographic.com/culture/article/socrates"), + new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Create the representation by signs. + new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, + HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), + new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), + new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, + possibleWorld.getIri()), + + // Add beginning, ending, etc. from `association`. + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), + + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), + new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), + + new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent.getIri()), + new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), + + // Add the participants. + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, + representationBySign.getIri()), + new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, + representationBySign.getIri())); + + // Create a change set and return it. + return new DbChangeSet(List.of(), creates); + } } From b1f6eca865327ff4fb455e015019027e963d9066 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Mon, 11 Jul 2022 10:40:59 +0000 Subject: [PATCH 87/91] Moved HQDM module under uk.gov.gchq.magmacore package prefix. --- .gitignore | 1 + core/src/main/java/module-info.java | 4 +- .../magmacore/database/MagmaCoreDatabase.java | 6 +- .../database/MagmaCoreJenaDatabase.java | 12 +- .../MagmaCoreRemoteSparqlDatabase.java | 19 +- .../magmacore/service/MagmaCoreService.java | 10 +- .../transformation/DbCreateOperation.java | 6 +- .../transformation/DbDeleteOperation.java | 4 +- .../service/MagmaCoreServiceTest.java | 12 +- .../transformation/DbChangeSetTest.java | 18 +- .../transformation/DbOperationTest.java | 10 +- .../transformation/DbTransformationTest.java | 28 +- examples/src/main/java/module-info.java | 4 +- .../examples/data/ExampleAssociations.java | 34 +- .../examples/data/ExampleIndividuals.java | 20 +- .../magmacore/examples/data/ExampleRdl.java | 6 +- .../examples/service/JenaDatabaseDemo.java | 2 +- .../McAssistMultInheritFromDataApp.java | 16 +- .../examples/signs/ExampleSigns.java | 53 +- .../examples/signs/ExampleSignsRdl.java | 6 +- .../magmacore/examples/util/DemoUtils.java | 2 +- hqdm-rdf/pom.xml | 1 - hqdm-rdf/src/main/java/module-info.java | 12 +- .../java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java | 2134 ---------------- .../hqdm/rdf/HqdmObjectFactory.java | 30 +- .../hqdm/rdf/exception/IriException.java | 2 +- .../hqdm/rdf/exception/package-info.java | 2 +- .../gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java | 2208 +++++++++++++++++ .../{ => magmacore}/hqdm/rdf/iri/HqdmIri.java | 4 +- .../{ => magmacore}/hqdm/rdf/iri/IRI.java | 4 +- .../{ => magmacore}/hqdm/rdf/iri/IriBase.java | 2 +- .../{ => magmacore}/hqdm/rdf/iri/RDFS.java | 2 +- .../hqdm/rdf/iri/package-info.java | 2 +- .../magmacore/hqdm/rdf}/package-info.java | 2 +- .../{ => magmacore}/hqdm/rdf/util/Pair.java | 2 +- .../hqdm/rdf/util/Triples.java | 6 +- .../hqdm/rdf/util/package-info.java | 2 +- .../hqdm/rdf/HqdmObjectFactoryTest.java | 19 +- .../{ => magmacore}/hqdm/rdf/iri/IriTest.java | 9 +- .../hqdm/rdf/util/TriplesTest.java | 12 +- hqdm/src/main/java/module-info.java | 8 +- .../hqdm/exception/HqdmException.java | 2 +- .../hqdm/exception/package-info.java | 2 +- .../hqdm/model/AbstractObject.java | 2 +- .../hqdm/model/AcceptanceOfOffer.java | 2 +- .../hqdm/model/AcceptanceOfOfferForGoods.java | 2 +- .../{ => magmacore}/hqdm/model/Activity.java | 2 +- .../hqdm/model/Aggregation.java | 2 +- .../hqdm/model/AgreeContract.java | 2 +- .../hqdm/model/AgreementExecution.java | 2 +- .../hqdm/model/AgreementProcess.java | 2 +- .../hqdm/model/AmountOfMoney.java | 7 +- .../{ => magmacore}/hqdm/model/Asset.java | 2 +- .../hqdm/model/Association.java | 7 +- .../hqdm/model/BeginningOfOwnership.java | 2 +- .../hqdm/model/BiologicalObject.java | 6 +- .../hqdm/model/BiologicalSystem.java | 7 +- .../hqdm/model/BiologicalSystemComponent.java | 7 +- .../{ => magmacore}/hqdm/model/Class.java | 2 +- .../hqdm/model/ClassOfAbstractObject.java | 2 +- .../hqdm/model/ClassOfActivity.java | 2 +- .../hqdm/model/ClassOfAgreeContract.java | 2 +- .../hqdm/model/ClassOfAgreementExecution.java | 2 +- .../hqdm/model/ClassOfAgreementProcess.java | 2 +- .../hqdm/model/ClassOfAmountOfMoney.java | 4 +- .../hqdm/model/ClassOfAssociation.java | 2 +- .../hqdm/model/ClassOfBiologicalObject.java | 2 +- .../hqdm/model/ClassOfBiologicalSystem.java | 4 +- .../ClassOfBiologicalSystemComponent.java | 4 +- .../hqdm/model/ClassOfClass.java | 2 +- .../ClassOfClassOfSpatioTemporalExtent.java | 2 +- .../hqdm/model/ClassOfContractExecution.java | 2 +- .../hqdm/model/ClassOfContractProcess.java | 2 +- .../hqdm/model/ClassOfEvent.java | 2 +- .../hqdm/model/ClassOfFunctionalObject.java | 4 +- .../hqdm/model/ClassOfFunctionalSystem.java | 4 +- .../ClassOfFunctionalSystemComponent.java | 4 +- .../ClassOfInPlaceBiologicalComponent.java | 4 +- .../hqdm/model/ClassOfIndividual.java | 2 +- ...sOfInstalledFunctionalSystemComponent.java | 4 +- .../hqdm/model/ClassOfInstalledObject.java | 2 +- ...ClassOfIntentionallyConstructedObject.java | 4 +- .../hqdm/model/ClassOfOffer.java | 2 +- .../ClassOfOrdinaryBiologicalObject.java | 4 +- .../ClassOfOrdinaryFunctionalObject.java | 4 +- .../model/ClassOfOrdinaryPhysicalObject.java | 2 +- .../hqdm/model/ClassOfOrganization.java | 4 +- .../model/ClassOfOrganizationComponent.java | 4 +- .../hqdm/model/ClassOfParticipant.java | 2 +- .../hqdm/model/ClassOfParty.java | 2 +- .../hqdm/model/ClassOfPeriodOfTime.java | 2 +- .../hqdm/model/ClassOfPerson.java | 2 +- .../hqdm/model/ClassOfPersonInPosition.java | 6 +- .../hqdm/model/ClassOfPhysicalObject.java | 2 +- .../hqdm/model/ClassOfPhysicalProperty.java | 2 +- .../hqdm/model/ClassOfPhysicalQuantity.java | 2 +- .../hqdm/model/ClassOfPointInTime.java | 2 +- .../hqdm/model/ClassOfPosition.java | 2 +- .../hqdm/model/ClassOfPossibleWorld.java | 6 +- .../hqdm/model/ClassOfReachingAgreement.java | 2 +- .../hqdm/model/ClassOfRelationship.java | 2 +- .../hqdm/model/ClassOfRepresentation.java | 6 +- .../model/ClassOfSalesProductInstance.java | 4 +- .../hqdm/model/ClassOfSign.java | 6 +- .../ClassOfSociallyConstructedActivity.java | 2 +- .../ClassOfSociallyConstructedObject.java | 4 +- .../model/ClassOfSpatioTemporalExtent.java | 2 +- .../hqdm/model/ClassOfState.java | 2 +- .../hqdm/model/ClassOfStateOfActivity.java | 2 +- .../model/ClassOfStateOfAmountOfMoney.java | 7 +- .../hqdm/model/ClassOfStateOfAssociation.java | 2 +- .../model/ClassOfStateOfBiologicalObject.java | 2 +- .../model/ClassOfStateOfBiologicalSystem.java | 2 +- ...assOfStateOfBiologicalSystemComponent.java | 4 +- .../model/ClassOfStateOfFunctionalObject.java | 7 +- .../model/ClassOfStateOfFunctionalSystem.java | 2 +- ...assOfStateOfFunctionalSystemComponent.java | 12 +- ...StateOfIntentionallyConstructedObject.java | 2 +- ...lassOfStateOfOrdinaryBiologicalObject.java | 4 +- ...lassOfStateOfOrdinaryFunctionalObject.java | 7 +- .../ClassOfStateOfOrdinaryPhysicalObject.java | 2 +- .../model/ClassOfStateOfOrganization.java | 6 +- .../ClassOfStateOfOrganizationComponent.java | 7 +- .../hqdm/model/ClassOfStateOfParty.java | 2 +- .../hqdm/model/ClassOfStateOfPerson.java | 6 +- .../model/ClassOfStateOfPhysicalObject.java | 2 +- .../hqdm/model/ClassOfStateOfPosition.java | 2 +- .../ClassOfStateOfSalesProductInstance.java | 2 +- .../hqdm/model/ClassOfStateOfSign.java | 2 +- ...sOfStateOfSociallyConstructedActivity.java | 4 +- ...assOfStateOfSociallyConstructedObject.java | 2 +- .../hqdm/model/ClassOfStateOfSystem.java | 2 +- .../model/ClassOfStateOfSystemComponent.java | 2 +- .../hqdm/model/ClassOfSystem.java | 6 +- .../hqdm/model/ClassOfSystemComponent.java | 2 +- .../hqdm/model/Classification.java | 2 +- .../hqdm/model/Composition.java | 2 +- .../hqdm/model/ContractExecution.java | 2 +- .../hqdm/model/ContractProcess.java | 2 +- .../{ => magmacore}/hqdm/model/Currency.java | 2 +- .../hqdm/model/DefinedRelationship.java | 2 +- .../hqdm/model/Definition.java | 2 +- .../hqdm/model/Description.java | 2 +- .../{ => magmacore}/hqdm/model/Employee.java | 2 +- .../{ => magmacore}/hqdm/model/Employer.java | 2 +- .../hqdm/model/Employment.java | 2 +- .../hqdm/model/EndingOfOwnership.java | 2 +- .../hqdm/model/EnumeratedClass.java | 2 +- .../{ => magmacore}/hqdm/model/Event.java | 2 +- .../hqdm/model/ExchangeOfGoodsAndMoney.java | 2 +- .../{ => magmacore}/hqdm/model/Function_.java | 2 +- .../hqdm/model/FunctionalObject.java | 2 +- .../hqdm/model/FunctionalSystem.java | 2 +- .../hqdm/model/FunctionalSystemComponent.java | 2 +- .../hqdm/model/Identification.java | 2 +- .../IdentificationOfPhysicalQuantity.java | 2 +- .../model/InPlaceBiologicalComponent.java | 4 +- .../hqdm/model/Individual.java | 2 +- .../InstalledFunctionalSystemComponent.java | 4 +- .../hqdm/model/InstalledObject.java | 2 +- .../model/IntentionallyConstructedObject.java | 2 +- .../hqdm/model/KindOfActivity.java | 2 +- .../hqdm/model/KindOfAssociation.java | 2 +- .../hqdm/model/KindOfBiologicalObject.java | 2 +- .../hqdm/model/KindOfBiologicalSystem.java | 2 +- .../KindOfBiologicalSystemComponent.java | 2 +- .../hqdm/model/KindOfFunctionalObject.java | 4 +- .../hqdm/model/KindOfFunctionalSystem.java | 2 +- .../KindOfFunctionalSystemComponent.java | 2 +- .../hqdm/model/KindOfIndividual.java | 2 +- .../KindOfIntentionallyConstructedObject.java | 6 +- .../model/KindOfOrdinaryBiologicalObject.java | 4 +- .../model/KindOfOrdinaryFunctionalObject.java | 4 +- .../model/KindOfOrdinaryPhysicalObject.java | 2 +- .../hqdm/model/KindOfOrganization.java | 2 +- .../model/KindOfOrganizationComponent.java | 8 +- .../hqdm/model/KindOfParty.java | 2 +- .../hqdm/model/KindOfPerson.java | 6 +- .../hqdm/model/KindOfPhysicalObject.java | 2 +- .../hqdm/model/KindOfPhysicalProperty.java | 2 +- .../hqdm/model/KindOfPhysicalQuantity.java | 6 +- .../hqdm/model/KindOfPosition.java | 2 +- .../KindOfRelationshipWithRestriction.java | 2 +- .../KindOfRelationshipWithSignature.java | 2 +- .../KindOfSociallyConstructedObject.java | 4 +- .../hqdm/model/KindOfSystem.java | 2 +- .../hqdm/model/KindOfSystemComponent.java | 6 +- .../hqdm/model/LanguageCommunity.java | 6 +- .../hqdm/model/MoneyAsset.java | 6 +- .../{ => magmacore}/hqdm/model/Offer.java | 2 +- .../model/OfferAndAcceptanceForGoods.java | 2 +- .../hqdm/model/OfferForGoods.java | 2 +- .../{ => magmacore}/hqdm/model/Offering.java | 2 +- .../hqdm/model/OrdinaryBiologicalObject.java | 4 +- .../hqdm/model/OrdinaryFunctionalObject.java | 8 +- .../hqdm/model/OrdinaryPhysicalObject.java | 2 +- .../hqdm/model/Organization.java | 2 +- .../hqdm/model/OrganizationComponent.java | 8 +- .../{ => magmacore}/hqdm/model/Owner.java | 6 +- .../{ => magmacore}/hqdm/model/Ownership.java | 2 +- .../hqdm/model/Participant.java | 2 +- .../ParticipantInActivityOrAssociation.java | 4 +- .../{ => magmacore}/hqdm/model/Party.java | 2 +- .../{ => magmacore}/hqdm/model/Pattern.java | 2 +- .../hqdm/model/PeriodOfTime.java | 2 +- .../{ => magmacore}/hqdm/model/Person.java | 2 +- .../hqdm/model/PersonInPosition.java | 7 +- .../hqdm/model/PhysicalObject.java | 6 +- .../hqdm/model/PhysicalProperty.java | 2 +- .../hqdm/model/PhysicalPropertyRange.java | 2 +- .../hqdm/model/PhysicalQuantity.java | 2 +- .../hqdm/model/PhysicalQuantityRange.java | 2 +- .../gchq/{ => magmacore}/hqdm/model/Plan.java | 2 +- .../hqdm/model/PointInTime.java | 2 +- .../{ => magmacore}/hqdm/model/Position.java | 2 +- .../hqdm/model/PossibleWorld.java | 2 +- .../{ => magmacore}/hqdm/model/Price.java | 2 +- .../hqdm/model/ProductBrand.java | 2 +- .../hqdm/model/ProductOffering.java | 2 +- .../hqdm/model/ReachingAgreement.java | 2 +- .../model/RecognizingLanguageCommunity.java | 6 +- .../hqdm/model/Relationship.java | 2 +- .../hqdm/model/RepresentationByPattern.java | 2 +- .../hqdm/model/RepresentationBySign.java | 2 +- .../hqdm/model/Requirement.java | 2 +- .../hqdm/model/RequirementSpecification.java | 2 +- .../gchq/{ => magmacore}/hqdm/model/Role.java | 2 +- .../hqdm/model/SaleOfGoods.java | 2 +- .../hqdm/model/SalesProduct.java | 2 +- .../hqdm/model/SalesProductInstance.java | 6 +- .../hqdm/model/SalesProductVersion.java | 2 +- .../{ => magmacore}/hqdm/model/Scale.java | 2 +- .../gchq/{ => magmacore}/hqdm/model/Sign.java | 2 +- .../model/SociallyConstructedActivity.java | 2 +- .../hqdm/model/SociallyConstructedObject.java | 6 +- .../hqdm/model/SpatioTemporalExtent.java | 2 +- .../hqdm/model/Specialization.java | 2 +- .../{ => magmacore}/hqdm/model/State.java | 2 +- .../hqdm/model/StateOfActivity.java | 2 +- .../hqdm/model/StateOfAmountOfMoney.java | 6 +- .../hqdm/model/StateOfAssociation.java | 2 +- .../hqdm/model/StateOfBiologicalObject.java | 2 +- .../hqdm/model/StateOfBiologicalSystem.java | 6 +- .../StateOfBiologicalSystemComponent.java | 2 +- .../hqdm/model/StateOfFunctionalObject.java | 6 +- .../hqdm/model/StateOfFunctionalSystem.java | 6 +- .../StateOfFunctionalSystemComponent.java | 6 +- ...StateOfIntentionallyConstructedObject.java | 2 +- .../hqdm/model/StateOfLanguageCommunity.java | 2 +- .../StateOfOrdinaryBiologicalObject.java | 2 +- .../StateOfOrdinaryFunctionalObject.java | 6 +- .../model/StateOfOrdinaryPhysicalObject.java | 2 +- .../hqdm/model/StateOfOrganization.java | 2 +- .../model/StateOfOrganizationComponent.java | 6 +- .../hqdm/model/StateOfParty.java | 2 +- .../hqdm/model/StateOfPerson.java | 2 +- .../hqdm/model/StateOfPhysicalObject.java | 2 +- .../hqdm/model/StateOfPosition.java | 2 +- .../model/StateOfSalesProductInstance.java | 2 +- .../hqdm/model/StateOfSign.java | 2 +- .../StateOfSociallyConstructedActivity.java | 6 +- .../StateOfSociallyConstructedObject.java | 2 +- .../hqdm/model/StateOfSystem.java | 2 +- .../hqdm/model/StateOfSystemComponent.java | 2 +- .../{ => magmacore}/hqdm/model/System.java | 2 +- .../hqdm/model/SystemComponent.java | 6 +- .../hqdm/model/TemporalComposition.java | 2 +- .../{ => magmacore}/hqdm/model/Thing.java | 6 +- .../hqdm/model/TransferOfOwnership.java | 2 +- .../model/TransferOfOwnershipOfMoney.java | 2 +- .../hqdm/model/Transferee.java | 2 +- .../hqdm/model/Transferor.java | 2 +- .../hqdm/model/UnitOfMeasure.java | 2 +- .../hqdm/model/impl/AbstractObjectImpl.java | 6 +- .../impl/AcceptanceOfOfferForGoodsImpl.java | 6 +- .../model/impl/AcceptanceOfOfferImpl.java | 6 +- .../hqdm/model/impl/ActivityImpl.java | 6 +- .../hqdm/model/impl/AggregationImpl.java | 6 +- .../hqdm/model/impl/AgreeContractImpl.java | 6 +- .../model/impl/AgreementExecutionImpl.java | 6 +- .../hqdm/model/impl/AgreementProcessImpl.java | 6 +- .../hqdm/model/impl/AmountOfMoneyImpl.java | 6 +- .../hqdm/model/impl/AssetImpl.java | 6 +- .../hqdm/model/impl/AssociationImpl.java | 6 +- .../model/impl/BeginningOfOwnershipImpl.java | 6 +- .../hqdm/model/impl/BiologicalObjectImpl.java | 6 +- .../impl/BiologicalSystemComponentImpl.java | 6 +- .../hqdm/model/impl/BiologicalSystemImpl.java | 6 +- .../hqdm/model/impl/ClassImpl.java | 6 +- .../model/impl/ClassOfAbstractObjectImpl.java | 6 +- .../hqdm/model/impl/ClassOfActivityImpl.java | 6 +- .../model/impl/ClassOfAgreeContractImpl.java | 6 +- .../impl/ClassOfAgreementExecutionImpl.java | 6 +- .../impl/ClassOfAgreementProcessImpl.java | 6 +- .../model/impl/ClassOfAmountOfMoneyImpl.java | 6 +- .../model/impl/ClassOfAssociationImpl.java | 6 +- .../impl/ClassOfBiologicalObjectImpl.java | 6 +- .../ClassOfBiologicalSystemComponentImpl.java | 6 +- .../impl/ClassOfBiologicalSystemImpl.java | 6 +- .../hqdm/model/impl/ClassOfClassImpl.java | 6 +- ...lassOfClassOfSpatioTemporalExtentImpl.java | 6 +- .../impl/ClassOfContractExecutionImpl.java | 6 +- .../impl/ClassOfContractProcessImpl.java | 6 +- .../hqdm/model/impl/ClassOfEventImpl.java | 6 +- .../impl/ClassOfFunctionalObjectImpl.java | 6 +- .../ClassOfFunctionalSystemComponentImpl.java | 6 +- .../impl/ClassOfFunctionalSystemImpl.java | 6 +- ...ClassOfInPlaceBiologicalComponentImpl.java | 6 +- .../model/impl/ClassOfIndividualImpl.java | 6 +- ...nstalledFunctionalSystemComponentImpl.java | 6 +- .../impl/ClassOfInstalledObjectImpl.java | 6 +- ...sOfIntentionallyConstructedObjectImpl.java | 6 +- .../hqdm/model/impl/ClassOfOfferImpl.java | 6 +- .../ClassOfOrdinaryBiologicalObjectImpl.java | 6 +- .../ClassOfOrdinaryFunctionalObjectImpl.java | 6 +- .../ClassOfOrdinaryPhysicalObjectImpl.java | 6 +- .../ClassOfOrganizationComponentImpl.java | 6 +- .../model/impl/ClassOfOrganizationImpl.java | 6 +- .../model/impl/ClassOfParticipantImpl.java | 6 +- .../hqdm/model/impl/ClassOfPartyImpl.java | 6 +- .../model/impl/ClassOfPeriodOfTimeImpl.java | 6 +- .../hqdm/model/impl/ClassOfPersonImpl.java | 6 +- .../impl/ClassOfPersonInPositionImpl.java | 6 +- .../model/impl/ClassOfPhysicalObjectImpl.java | 6 +- .../impl/ClassOfPhysicalPropertyImpl.java | 6 +- .../impl/ClassOfPhysicalQuantityImpl.java | 6 +- .../model/impl/ClassOfPointInTimeImpl.java | 6 +- .../hqdm/model/impl/ClassOfPositionImpl.java | 6 +- .../model/impl/ClassOfPossibleWorldImpl.java | 6 +- .../impl/ClassOfReachingAgreementImpl.java | 6 +- .../model/impl/ClassOfRelationshipImpl.java | 6 +- .../model/impl/ClassOfRepresentationImpl.java | 6 +- .../impl/ClassOfSalesProductInstanceImpl.java | 6 +- .../hqdm/model/impl/ClassOfSignImpl.java | 6 +- ...lassOfSociallyConstructedActivityImpl.java | 6 +- .../ClassOfSociallyConstructedObjectImpl.java | 6 +- .../impl/ClassOfSpatioTemporalExtentImpl.java | 6 +- .../hqdm/model/impl/ClassOfStateImpl.java | 6 +- .../impl/ClassOfStateOfActivityImpl.java | 6 +- .../impl/ClassOfStateOfAmountOfMoneyImpl.java | 6 +- .../impl/ClassOfStateOfAssociationImpl.java | 6 +- .../ClassOfStateOfBiologicalObjectImpl.java | 6 +- ...fStateOfBiologicalSystemComponentImpl.java | 6 +- .../ClassOfStateOfBiologicalSystemImpl.java | 6 +- .../ClassOfStateOfFunctionalObjectImpl.java | 6 +- ...fStateOfFunctionalSystemComponentImpl.java | 6 +- .../ClassOfStateOfFunctionalSystemImpl.java | 6 +- ...eOfIntentionallyConstructedObjectImpl.java | 6 +- ...OfStateOfOrdinaryBiologicalObjectImpl.java | 6 +- ...OfStateOfOrdinaryFunctionalObjectImpl.java | 6 +- ...ssOfStateOfOrdinaryPhysicalObjectImpl.java | 6 +- ...assOfStateOfOrganizationComponentImpl.java | 6 +- .../impl/ClassOfStateOfOrganizationImpl.java | 6 +- .../model/impl/ClassOfStateOfPartyImpl.java | 6 +- .../model/impl/ClassOfStateOfPersonImpl.java | 6 +- .../ClassOfStateOfPhysicalObjectImpl.java | 6 +- .../impl/ClassOfStateOfPositionImpl.java | 6 +- ...lassOfStateOfSalesProductInstanceImpl.java | 6 +- .../model/impl/ClassOfStateOfSignImpl.java | 6 +- ...tateOfSociallyConstructedActivityImpl.java | 6 +- ...fStateOfSociallyConstructedObjectImpl.java | 6 +- .../ClassOfStateOfSystemComponentImpl.java | 6 +- .../model/impl/ClassOfStateOfSystemImpl.java | 6 +- .../impl/ClassOfSystemComponentImpl.java | 6 +- .../hqdm/model/impl/ClassOfSystemImpl.java | 6 +- .../hqdm/model/impl/ClassificationImpl.java | 6 +- .../hqdm/model/impl/CompositionImpl.java | 6 +- .../model/impl/ContractExecutionImpl.java | 6 +- .../hqdm/model/impl/ContractProcessImpl.java | 6 +- .../hqdm/model/impl/CurrencyImpl.java | 6 +- .../model/impl/DefinedRelationshipImpl.java | 6 +- .../hqdm/model/impl/DefinitionImpl.java | 6 +- .../hqdm/model/impl/DescriptionImpl.java | 6 +- .../hqdm/model/impl/EmployeeImpl.java | 6 +- .../hqdm/model/impl/EmployerImpl.java | 6 +- .../hqdm/model/impl/EmploymentImpl.java | 6 +- .../model/impl/EndingOfOwnershipImpl.java | 6 +- .../hqdm/model/impl/EnumeratedClassImpl.java | 6 +- .../hqdm/model/impl/EventImpl.java | 6 +- .../impl/ExchangeOfGoodsAndMoneyImpl.java | 6 +- .../hqdm/model/impl/FunctionImpl.java | 6 +- .../hqdm/model/impl/FunctionalObjectImpl.java | 6 +- .../impl/FunctionalSystemComponentImpl.java | 6 +- .../hqdm/model/impl/FunctionalSystemImpl.java | 6 +- .../hqdm/model/impl/IdentificationImpl.java | 6 +- .../IdentificationOfPhysicalQuantityImpl.java | 6 +- .../impl/InPlaceBiologicalComponentImpl.java | 6 +- .../hqdm/model/impl/IndividualImpl.java | 6 +- ...nstalledFunctionalSystemComponentImpl.java | 6 +- .../hqdm/model/impl/InstalledObjectImpl.java | 6 +- .../IntentionallyConstructedObjectImpl.java | 6 +- .../hqdm/model/impl/KindOfActivityImpl.java | 6 +- .../model/impl/KindOfAssociationImpl.java | 6 +- .../impl/KindOfBiologicalObjectImpl.java | 6 +- .../KindOfBiologicalSystemComponentImpl.java | 6 +- .../impl/KindOfBiologicalSystemImpl.java | 6 +- .../impl/KindOfFunctionalObjectImpl.java | 6 +- .../KindOfFunctionalSystemComponentImpl.java | 6 +- .../impl/KindOfFunctionalSystemImpl.java | 6 +- .../hqdm/model/impl/KindOfIndividualImpl.java | 6 +- ...dOfIntentionallyConstructedObjectImpl.java | 6 +- .../KindOfOrdinaryBiologicalObjectImpl.java | 6 +- .../KindOfOrdinaryFunctionalObjectImpl.java | 6 +- .../KindOfOrdinaryPhysicalObjectImpl.java | 6 +- .../impl/KindOfOrganizationComponentImpl.java | 6 +- .../model/impl/KindOfOrganizationImpl.java | 6 +- .../hqdm/model/impl/KindOfPartyImpl.java | 6 +- .../hqdm/model/impl/KindOfPersonImpl.java | 6 +- .../model/impl/KindOfPhysicalObjectImpl.java | 6 +- .../impl/KindOfPhysicalPropertyImpl.java | 6 +- .../impl/KindOfPhysicalQuantityImpl.java | 6 +- .../hqdm/model/impl/KindOfPositionImpl.java | 6 +- ...KindOfRelationshipWithRestrictionImpl.java | 6 +- .../KindOfRelationshipWithSignatureImpl.java | 6 +- .../KindOfSociallyConstructedObjectImpl.java | 6 +- .../model/impl/KindOfSystemComponentImpl.java | 6 +- .../hqdm/model/impl/KindOfSystemImpl.java | 6 +- .../model/impl/LanguageCommunityImpl.java | 6 +- .../hqdm/model/impl/MoneyAssetImpl.java | 6 +- .../impl/OfferAndAcceptanceForGoodsImpl.java | 6 +- .../hqdm/model/impl/OfferForGoodsImpl.java | 6 +- .../hqdm/model/impl/OfferImpl.java | 6 +- .../hqdm/model/impl/OfferingImpl.java | 6 +- .../impl/OrdinaryBiologicalObjectImpl.java | 6 +- .../impl/OrdinaryFunctionalObjectImpl.java | 6 +- .../impl/OrdinaryPhysicalObjectImpl.java | 6 +- .../model/impl/OrganizationComponentImpl.java | 6 +- .../hqdm/model/impl/OrganizationImpl.java | 6 +- .../hqdm/model/impl/OwnerImpl.java | 6 +- .../hqdm/model/impl/OwnershipImpl.java | 6 +- .../hqdm/model/impl/ParticipantImpl.java | 6 +- ...articipantInActivityOrAssociationImpl.java | 6 +- .../hqdm/model/impl/PartyImpl.java | 6 +- .../hqdm/model/impl/PatternImpl.java | 6 +- .../hqdm/model/impl/PeriodOfTimeImpl.java | 6 +- .../hqdm/model/impl/PersonImpl.java | 6 +- .../hqdm/model/impl/PersonInPositionImpl.java | 6 +- .../hqdm/model/impl/PhysicalObjectImpl.java | 6 +- .../hqdm/model/impl/PhysicalPropertyImpl.java | 6 +- .../model/impl/PhysicalPropertyRangeImpl.java | 6 +- .../hqdm/model/impl/PhysicalQuantityImpl.java | 6 +- .../model/impl/PhysicalQuantityRangeImpl.java | 6 +- .../hqdm/model/impl/PlanImpl.java | 6 +- .../hqdm/model/impl/PointInTimeImpl.java | 6 +- .../hqdm/model/impl/PositionImpl.java | 6 +- .../hqdm/model/impl/PossibleWorldImpl.java | 6 +- .../hqdm/model/impl/PriceImpl.java | 6 +- .../hqdm/model/impl/ProductBrandImpl.java | 6 +- .../hqdm/model/impl/ProductOfferingImpl.java | 6 +- .../model/impl/ReachingAgreementImpl.java | 6 +- .../RecognizingLanguageCommunityImpl.java | 6 +- .../hqdm/model/impl/RelationshipImpl.java | 6 +- .../impl/RepresentationByPatternImpl.java | 6 +- .../model/impl/RepresentationBySignImpl.java | 6 +- .../hqdm/model/impl/RequirementImpl.java | 6 +- .../impl/RequirementSpecificationImpl.java | 6 +- .../hqdm/model/impl/RoleImpl.java | 6 +- .../hqdm/model/impl/SaleOfGoodsImpl.java | 6 +- .../hqdm/model/impl/SalesProductImpl.java | 6 +- .../model/impl/SalesProductInstanceImpl.java | 6 +- .../model/impl/SalesProductVersionImpl.java | 6 +- .../hqdm/model/impl/ScaleImpl.java | 6 +- .../hqdm/model/impl/SignImpl.java | 6 +- .../impl/SociallyConstructedActivityImpl.java | 6 +- .../impl/SociallyConstructedObjectImpl.java | 6 +- .../model/impl/SpatioTemporalExtentImpl.java | 6 +- .../hqdm/model/impl/SpecializationImpl.java | 6 +- .../hqdm/model/impl/StateImpl.java | 6 +- .../hqdm/model/impl/StateOfActivityImpl.java | 6 +- .../model/impl/StateOfAmountOfMoneyImpl.java | 6 +- .../model/impl/StateOfAssociationImpl.java | 6 +- .../impl/StateOfBiologicalObjectImpl.java | 6 +- .../StateOfBiologicalSystemComponentImpl.java | 6 +- .../impl/StateOfBiologicalSystemImpl.java | 6 +- .../impl/StateOfFunctionalObjectImpl.java | 6 +- .../StateOfFunctionalSystemComponentImpl.java | 6 +- .../impl/StateOfFunctionalSystemImpl.java | 6 +- ...eOfIntentionallyConstructedObjectImpl.java | 6 +- .../impl/StateOfLanguageCommunityImpl.java | 6 +- .../StateOfOrdinaryBiologicalObjectImpl.java | 6 +- .../StateOfOrdinaryFunctionalObjectImpl.java | 6 +- .../StateOfOrdinaryPhysicalObjectImpl.java | 6 +- .../StateOfOrganizationComponentImpl.java | 6 +- .../model/impl/StateOfOrganizationImpl.java | 6 +- .../hqdm/model/impl/StateOfPartyImpl.java | 6 +- .../hqdm/model/impl/StateOfPersonImpl.java | 6 +- .../model/impl/StateOfPhysicalObjectImpl.java | 6 +- .../hqdm/model/impl/StateOfPositionImpl.java | 6 +- .../impl/StateOfSalesProductInstanceImpl.java | 6 +- .../hqdm/model/impl/StateOfSignImpl.java | 6 +- ...tateOfSociallyConstructedActivityImpl.java | 6 +- .../StateOfSociallyConstructedObjectImpl.java | 6 +- .../impl/StateOfSystemComponentImpl.java | 6 +- .../hqdm/model/impl/StateOfSystemImpl.java | 6 +- .../hqdm/model/impl/SystemComponentImpl.java | 6 +- .../hqdm/model/impl/SystemImpl.java | 6 +- .../model/impl/TemporalCompositionImpl.java | 6 +- .../hqdm/model/impl/ThingImpl.java | 6 +- .../model/impl/TransferOfOwnershipImpl.java | 6 +- .../impl/TransferOfOwnershipOfMoneyImpl.java | 6 +- .../hqdm/model/impl/TransfereeImpl.java | 6 +- .../hqdm/model/impl/TransferorImpl.java | 6 +- .../hqdm/model/impl/UnitOfMeasureImpl.java | 6 +- .../hqdm/model/impl/package-info.java | 4 +- .../hqdm/model/package-info.java | 2 +- .../{ => magmacore}/hqdm/pojo/HqdmObject.java | 4 +- .../gchq/{ => magmacore}/hqdm/pojo/Top.java | 2 +- .../magmacore/hqdm/pojo}/package-info.java | 2 +- .../hqdm/services/ClassServices.java | 8 +- .../hqdm/services/DynamicObjects.java | 8 +- .../hqdm/services/RelationshipServices.java | 42 +- .../SpatioTemporalExtentServices.java | 8 +- .../hqdm/services/package-info.java | 2 +- .../hqdm/pojo/HqdmObjectTest.java | 16 +- .../hqdm/services/DynamicObjectsTest.java | 8 +- 515 files changed, 3452 insertions(+), 3475 deletions(-) delete mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/HqdmObjectFactory.java (98%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/exception/IriException.java (98%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/exception/package-info.java (92%) create mode 100755 hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/HqdmIri.java (92%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/IRI.java (96%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/IriBase.java (98%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/RDFS.java (98%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/package-info.java (94%) rename {hqdm/src/main/java/uk/gov/gchq/hqdm/pojo => hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf}/package-info.java (94%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/util/Pair.java (97%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/util/Triples.java (95%) rename hqdm-rdf/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/util/package-info.java (93%) rename hqdm-rdf/src/test/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/HqdmObjectFactoryTest.java (88%) rename hqdm-rdf/src/test/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/iri/IriTest.java (84%) rename hqdm-rdf/src/test/java/uk/gov/gchq/{ => magmacore}/hqdm/rdf/util/TriplesTest.java (87%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/exception/HqdmException.java (98%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/exception/package-info.java (93%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AbstractObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AcceptanceOfOffer.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AcceptanceOfOfferForGoods.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Activity.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Aggregation.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AgreeContract.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AgreementExecution.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AgreementProcess.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/AmountOfMoney.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Asset.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Association.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/BeginningOfOwnership.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/BiologicalObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/BiologicalSystem.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/BiologicalSystemComponent.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Class.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAbstractObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfActivity.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAgreeContract.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAgreementExecution.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAgreementProcess.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAmountOfMoney.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfAssociation.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfBiologicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfBiologicalSystem.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfBiologicalSystemComponent.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfClass.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfContractExecution.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfContractProcess.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfEvent.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfFunctionalObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfFunctionalSystem.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfFunctionalSystemComponent.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfInPlaceBiologicalComponent.java (88%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfIndividual.java (96%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java (87%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfInstalledObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfIntentionallyConstructedObject.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOffer.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOrdinaryBiologicalObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOrdinaryFunctionalObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOrdinaryPhysicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOrganization.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfOrganizationComponent.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfParticipant.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfParty.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPeriodOfTime.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPerson.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPersonInPosition.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPhysicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPhysicalProperty.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPhysicalQuantity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPointInTime.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPosition.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfPossibleWorld.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfReachingAgreement.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfRelationship.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfRepresentation.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSalesProductInstance.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSign.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSociallyConstructedActivity.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSociallyConstructedObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSpatioTemporalExtent.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfState.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfActivity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfAmountOfMoney.java (80%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfAssociation.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfBiologicalObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfBiologicalSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java (87%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfFunctionalObject.java (80%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfFunctionalSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java (62%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java (80%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfOrganization.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfOrganizationComponent.java (80%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfParty.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfPerson.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfPhysicalObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfPosition.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSalesProductInstance.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSign.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSociallyConstructedObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSystem.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfStateOfSystemComponent.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSystem.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ClassOfSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Classification.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Composition.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ContractExecution.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ContractProcess.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Currency.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/DefinedRelationship.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Definition.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Description.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Employee.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Employer.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Employment.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/EndingOfOwnership.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/EnumeratedClass.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Event.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ExchangeOfGoodsAndMoney.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Function_.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/FunctionalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/FunctionalSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/FunctionalSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Identification.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/IdentificationOfPhysicalQuantity.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/InPlaceBiologicalComponent.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Individual.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/InstalledFunctionalSystemComponent.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/InstalledObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/IntentionallyConstructedObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfActivity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfAssociation.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfBiologicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfBiologicalSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfBiologicalSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfFunctionalObject.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfFunctionalSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfFunctionalSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfIndividual.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfIntentionallyConstructedObject.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfOrdinaryBiologicalObject.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfOrdinaryFunctionalObject.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfOrdinaryPhysicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfOrganization.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfOrganizationComponent.java (78%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfParty.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfPerson.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfPhysicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfPhysicalProperty.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfPhysicalQuantity.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfPosition.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfRelationshipWithRestriction.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfRelationshipWithSignature.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfSociallyConstructedObject.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfSystem.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/KindOfSystemComponent.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/LanguageCommunity.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/MoneyAsset.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Offer.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OfferAndAcceptanceForGoods.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OfferForGoods.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Offering.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OrdinaryBiologicalObject.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OrdinaryFunctionalObject.java (79%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OrdinaryPhysicalObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Organization.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/OrganizationComponent.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Owner.java (87%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Ownership.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Participant.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ParticipantInActivityOrAssociation.java (90%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Party.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Pattern.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PeriodOfTime.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Person.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PersonInPosition.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PhysicalObject.java (84%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PhysicalProperty.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PhysicalPropertyRange.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PhysicalQuantity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PhysicalQuantityRange.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Plan.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PointInTime.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Position.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/PossibleWorld.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Price.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ProductBrand.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ProductOffering.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/ReachingAgreement.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/RecognizingLanguageCommunity.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Relationship.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/RepresentationByPattern.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/RepresentationBySign.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Requirement.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/RequirementSpecification.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Role.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SaleOfGoods.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SalesProduct.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SalesProductInstance.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SalesProductVersion.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Scale.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Sign.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SociallyConstructedActivity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SociallyConstructedObject.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SpatioTemporalExtent.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Specialization.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/State.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfActivity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfAmountOfMoney.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfAssociation.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfBiologicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfBiologicalSystem.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfBiologicalSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfFunctionalObject.java (83%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfFunctionalSystem.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfFunctionalSystemComponent.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfIntentionallyConstructedObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfLanguageCommunity.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfOrdinaryBiologicalObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfOrdinaryFunctionalObject.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfOrdinaryPhysicalObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfOrganization.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfOrganizationComponent.java (82%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfParty.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfPerson.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfPhysicalObject.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfPosition.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSalesProductInstance.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSign.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSociallyConstructedActivity.java (81%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSociallyConstructedObject.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSystem.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/StateOfSystemComponent.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/System.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/SystemComponent.java (87%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/TemporalComposition.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Thing.java (86%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/TransferOfOwnership.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/TransferOfOwnershipOfMoney.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Transferee.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/Transferor.java (95%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/UnitOfMeasure.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AbstractObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AcceptanceOfOfferImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AggregationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AgreeContractImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AgreementExecutionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AgreementProcessImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AmountOfMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AssetImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/AssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/BeginningOfOwnershipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/BiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/BiologicalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/BiologicalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAbstractObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAgreeContractImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAgreementExecutionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAgreementProcessImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfAssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfBiologicalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfClassImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfContractExecutionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfContractProcessImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfEventImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfFunctionalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfIndividualImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfInstalledObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOfferImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOrganizationComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfOrganizationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfParticipantImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPartyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPersonImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPersonInPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPointInTimeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfPossibleWorldImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfReachingAgreementImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfRelationshipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfRepresentationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSignImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfAssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfPartyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfPersonImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSignImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfStateOfSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassOfSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ClassificationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/CompositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ContractExecutionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ContractProcessImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/CurrencyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/DefinedRelationshipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/DefinitionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/DescriptionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EmployeeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EmployerImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EmploymentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EndingOfOwnershipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EnumeratedClassImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/EventImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/FunctionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/FunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/FunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/FunctionalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/IdentificationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/InPlaceBiologicalComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/IndividualImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/InstalledObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/IntentionallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfAssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfBiologicalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfFunctionalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfIndividualImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfOrganizationComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfOrganizationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPartyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPersonImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPhysicalPropertyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPhysicalQuantityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/KindOfSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/LanguageCommunityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/MoneyAssetImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OfferForGoodsImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OfferImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OfferingImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OrganizationComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OrganizationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OwnerImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/OwnershipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ParticipantImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PartyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PatternImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PeriodOfTimeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PersonImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PersonInPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PhysicalPropertyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PhysicalPropertyRangeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PhysicalQuantityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PhysicalQuantityRangeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PlanImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PointInTimeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PossibleWorldImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/PriceImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ProductBrandImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ProductOfferingImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ReachingAgreementImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RecognizingLanguageCommunityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RelationshipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RepresentationByPatternImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RepresentationBySignImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RequirementImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RequirementSpecificationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/RoleImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SaleOfGoodsImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SalesProductImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SalesProductInstanceImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SalesProductVersionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ScaleImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SignImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SociallyConstructedActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SociallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SpatioTemporalExtentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SpecializationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfAmountOfMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfAssociationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfBiologicalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfFunctionalSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfLanguageCommunityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfOrganizationComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfOrganizationImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfPartyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfPersonImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfPhysicalObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfPositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSalesProductInstanceImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSignImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/StateOfSystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SystemComponentImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/SystemImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/TemporalCompositionImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/ThingImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/TransferOfOwnershipImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/TransfereeImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/TransferorImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/UnitOfMeasureImpl.java (85%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/impl/package-info.java (88%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/model/package-info.java (93%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/pojo/HqdmObject.java (98%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/pojo/Top.java (98%) rename {hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf => hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo}/package-info.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/services/ClassServices.java (99%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/services/DynamicObjects.java (94%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/services/RelationshipServices.java (73%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/services/SpatioTemporalExtentServices.java (99%) rename hqdm/src/main/java/uk/gov/gchq/{ => magmacore}/hqdm/services/package-info.java (93%) rename hqdm/src/test/java/uk/gov/gchq/{ => magmacore}/hqdm/pojo/HqdmObjectTest.java (85%) rename hqdm/src/test/java/uk/gov/gchq/{ => magmacore}/hqdm/services/DynamicObjectsTest.java (92%) diff --git a/.gitignore b/.gitignore index 2718b434..a93a114f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ out *.ttl .DS_Store .factorypath +.devcontainer # Compiled class file diff --git a/core/src/main/java/module-info.java b/core/src/main/java/module-info.java index 517cf0ff..9243f77d 100644 --- a/core/src/main/java/module-info.java +++ b/core/src/main/java/module-info.java @@ -25,8 +25,8 @@ requires org.apache.jena.tdb2; requires com.fasterxml.jackson.annotation; - requires uk.gov.gchq.hqdm; - requires transitive uk.gov.gchq.hqdm.rdf; + requires uk.gov.gchq.magmacore.hqdm; + requires transitive uk.gov.gchq.magmacore.hqdm.rdf; exports uk.gov.gchq.magmacore.service; exports uk.gov.gchq.magmacore.service.transformation; diff --git a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java index 83cbadf9..62968ae2 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -17,9 +17,9 @@ import java.io.PrintStream; import java.util.List; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; /** * Interface defining CRUD operations and generic queries for Magma Core data collections. diff --git a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java index 035d48fb..09e05a87 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java @@ -43,14 +43,14 @@ import org.apache.jena.update.UpdateRequest; import org.apache.jena.util.PrintUtil; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; -import uk.gov.gchq.hqdm.rdf.util.Pair; import uk.gov.gchq.magmacore.database.query.QueryResult; import uk.gov.gchq.magmacore.database.query.QueryResultList; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; /** * Apache Jena triplestore to store HQDM objects as RDF triples either as an in-memory Jena dataset diff --git a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java index 8c50897f..f6177ff7 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -39,13 +39,13 @@ import org.apache.jena.riot.RDFFormat; import org.apache.jena.util.PrintUtil; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.util.Pair; import uk.gov.gchq.magmacore.database.query.QueryResult; import uk.gov.gchq.magmacore.database.query.QueryResultList; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; /** * Connection to a remote SPARQL endpoint. @@ -60,13 +60,8 @@ public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { * @param serviceUrl The URL of the SPARQL update endpoint. */ public MagmaCoreRemoteSparqlDatabase(final String serviceUrl) { - connection = RDFConnectionRemote - .newBuilder() - .destination(serviceUrl) - .queryEndpoint("query") - .updateEndpoint("update") - .triplesFormat(RDFFormat.RDFJSON) - .build(); + connection = RDFConnectionRemote.newBuilder().destination(serviceUrl).queryEndpoint("query") + .updateEndpoint("update").triplesFormat(RDFFormat.RDFJSON).build(); } /** diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 5443d3c0..69324f8c 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -19,10 +19,10 @@ import java.util.Map; import java.util.function.Function; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; /** * Service for interacting with a {@link MagmaCoreDatabase}. @@ -61,7 +61,7 @@ public T findByEntityName(final String entityName) { } /** - * Create a new Thing in the database. + * Create a new {@link Thing} in the database. * * @param thing {@link Thing} to create. */ @@ -89,7 +89,7 @@ public Thing get(final IRI iri) { } /** - * Get a {@link Thing} by its IRI {@link IRI} in a transactional database. + * Get a {@link Thing} by its {@link IRI} in a transactional database. * * @param iri {@link IRI} of the {@link Thing}. * @return {@link Thing} to get. diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java index 4b0b676c..0d184f21 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -16,10 +16,10 @@ import java.util.function.Function; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.service.MagmaCoreService; /** diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java index b311328f..af5893bc 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java @@ -16,9 +16,9 @@ import java.util.function.Function; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.service.MagmaCoreService; /** diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java index 211212a5..a4ffaea2 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -18,13 +18,13 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.model.Individual; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; +import uk.gov.gchq.magmacore.hqdm.model.Individual; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** * Check that {@link MagmaCoreService} works correctly. diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java index 3aef693d..cf91e72d 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.java @@ -22,11 +22,11 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; @@ -46,10 +46,10 @@ public void testApplyAndInvert() { // Create operations to add an object with dummy values. final IRI individualIri = new IRI(TEST_BASE, "individual"); - final DbChangeSet createIndividual = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + final DbChangeSet createIndividual = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); // Apply the operations to the dataset. mcService.runInTransaction(createIndividual); diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java index 9228c812..1d96aa99 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -22,12 +22,12 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.exception.DbTransformationException; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java index 37e14222..73792058 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -22,11 +22,11 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; @@ -48,15 +48,15 @@ public void testApplyAndInvert() { final IRI personIri = new IRI(TEST_BASE, "person"); // Create operations to add an object with dummy values. - final DbChangeSet createIndividual = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), - new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), - new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); - - final DbChangeSet createPerson = new DbChangeSet(List.of(), List.of( - new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), - new DbCreateOperation(personIri, HQDM.MEMBER_OF, "classOfPerson"), - new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + final DbChangeSet createIndividual = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(individualIri, RDFS.RDF_TYPE, HQDM.INDIVIDUAL.getIri()), + new DbCreateOperation(individualIri, HQDM.MEMBER_OF, "classOfIndividual"), + new DbCreateOperation(individualIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); + + final DbChangeSet createPerson = new DbChangeSet(List.of(), + List.of(new DbCreateOperation(personIri, RDFS.RDF_TYPE, HQDM.PERSON.getIri()), + new DbCreateOperation(personIri, HQDM.MEMBER_OF, "classOfPerson"), + new DbCreateOperation(personIri, HQDM.PART_OF_POSSIBLE_WORLD, "possible world"))); final DbTransformation transformation = new DbTransformation(List.of(createIndividual, createPerson)); diff --git a/examples/src/main/java/module-info.java b/examples/src/main/java/module-info.java index a7f79f67..7771049f 100644 --- a/examples/src/main/java/module-info.java +++ b/examples/src/main/java/module-info.java @@ -17,8 +17,8 @@ * server. */ module uk.gov.gchq.magmacore.examples { - requires uk.gov.gchq.hqdm; - requires uk.gov.gchq.hqdm.rdf; + requires uk.gov.gchq.magmacore.hqdm; + requires uk.gov.gchq.magmacore.hqdm.rdf; requires uk.gov.gchq.magmacore; exports uk.gov.gchq.magmacore.examples.service; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java index 8da4a49e..936d75d8 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java @@ -21,18 +21,18 @@ import java.util.List; import java.util.Map; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.model.FunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.magmacore.hqdm.model.Event; +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.model.KindOfAssociation; +import uk.gov.gchq.magmacore.hqdm.model.Person; +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -57,12 +57,10 @@ private static void occupyHouse(final MagmaCoreService mcService, final List entities = mcService.findByEntityNameInTransaction(List.of( - "CLASS_OF_STATE_OF_PERSON", - "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", - "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", - "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); + final Map entities = mcService.findByEntityNameInTransaction( + List.of("CLASS_OF_STATE_OF_PERSON", "STATE_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + "OCCUPIER_LOCATED_IN_PROPERTY_ROLE", "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE", + "OCCUPANT_LOCATED_IN_VOLUME_ENCLOSED_BY_PROPERTY_ASSOCIATION")); // Find the required classes, kinds, and roles. final ClassOfStateOfPerson classOfStateOfPerson = (ClassOfStateOfPerson) entities diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java index d65ecde1..503fc781 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java @@ -20,13 +20,13 @@ import java.util.List; import java.util.Map; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPerson; +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -44,10 +44,8 @@ public class ExampleIndividuals { */ public static DbChangeSet addWholeLifeIndividuals(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of( - "KIND_OF_PERSON", - "NATURAL_MEMBER_OF_SOCIETY_ROLE", - "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", + final Map entities = mcService.findByEntityNameInTransaction(List.of("KIND_OF_PERSON", + "NATURAL_MEMBER_OF_SOCIETY_ROLE", "KIND_OF_FUNCTIONAL_SYSTEM_DOMESTIC_PROPERTY", "ACCEPTED_PLACE_OF_SEMI_PERMANENT_HABITATION_ROLE")); // Find the required classes, kinds, and roles. diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java index 1c0849d9..0dd2addd 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java @@ -19,9 +19,9 @@ import java.util.List; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java index 47524101..b6d61789 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; -import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java index d73a673e..145cb138 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.java @@ -18,14 +18,14 @@ import java.util.List; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.StateOfOrganization; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.hqdm.rdf.util.Pair; -import uk.gov.gchq.hqdm.rdf.util.Triples; +import uk.gov.gchq.magmacore.hqdm.model.Participant; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrganization; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Triples; /** * Demonstrate how to create a new class dynamically. diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java index b6efb18b..92041a22 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java @@ -20,13 +20,13 @@ import java.util.List; import java.util.Map; -import uk.gov.gchq.hqdm.model.Description; -import uk.gov.gchq.hqdm.model.Pattern; -import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.model.Description; +import uk.gov.gchq.magmacore.hqdm.model.Pattern; +import uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; @@ -71,10 +71,8 @@ public static DbTransformation populateExampleData(final MagmaCoreService mcServ * @return {@link DbChangeSet}. */ private static DbChangeSet addSigns(final MagmaCoreService mcService) { - final Map entities = mcService.findByEntityNameInTransaction(List.of( - "URL Pattern", - "Description By URL", - "English Speakers")); + final Map entities = mcService + .findByEntityNameInTransaction(List.of("URL Pattern", "Description By URL", "English Speakers")); // Find the required classes, kinds, and roles. final Pattern urlPattern = (Pattern) entities.get("URL Pattern"); @@ -109,43 +107,35 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { // Create the signs that represent the thing. new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(wikipediaSign, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(wikipediaSign, HQDM.VALUE_, - "https://en.wikipedia.org/wiki/Socrates"), - new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.VALUE_, "https://en.wikipedia.org/wiki/Socrates"), + new DbCreateOperation(wikipediaSign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(britannica, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(britannica, HQDM.VALUE_, - "https://www.britannica.com/biography/Socrates"), + new DbCreateOperation(britannica, HQDM.VALUE_, "https://www.britannica.com/biography/Socrates"), new DbCreateOperation(britannica, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(biography, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(biography, HQDM.VALUE_, - "https://www.biography.com/scholar/socrates"), + new DbCreateOperation(biography, HQDM.VALUE_, "https://www.biography.com/scholar/socrates"), new DbCreateOperation(biography, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(stanford, HQDM.MEMBER_OF_, urlPattern.getId()), - new DbCreateOperation(stanford, HQDM.VALUE_, - "https://plato.stanford.edu/entries/socrates/"), + new DbCreateOperation(stanford, HQDM.VALUE_, "https://plato.stanford.edu/entries/socrates/"), new DbCreateOperation(stanford, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN.getIri()), new DbCreateOperation(nationalGeographic, HQDM.MEMBER_OF_, urlPattern.getId()), new DbCreateOperation(nationalGeographic, HQDM.VALUE_, "https://www.nationalgeographic.com/culture/article/socrates"), - new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), + new DbCreateOperation(nationalGeographic, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Create the representation by signs. - new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, - HQDM.REPRESENTATION_BY_SIGN.getIri()), + new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN.getIri()), new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person.getIri()), - new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, - possibleWorld.getIri()), + new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld.getIri()), // Add beginning, ending, etc. from `association`. new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT.getIri()), @@ -160,15 +150,12 @@ private static DbChangeSet addSigns(final MagmaCoreService mcService) { new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent.getIri()), // Add the participants. - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, - representationBySign.getIri()), + new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, representationBySign.getIri()), + new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, representationBySign.getIri()), new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign.getIri()), new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign.getIri()), new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign.getIri()), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, - representationBySign.getIri())); + new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, representationBySign.getIri())); // Create a change set and return it. return new DbChangeSet(List.of(), creates); diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java index 454ec582..f5914aca 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java @@ -20,9 +20,9 @@ import java.util.List; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbCreateOperation; diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java index cd3f8787..8148ef0f 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.java @@ -16,10 +16,10 @@ import java.util.List; -import uk.gov.gchq.hqdm.rdf.iri.IriBase; import uk.gov.gchq.magmacore.examples.data.ExampleAssociations; import uk.gov.gchq.magmacore.examples.data.ExampleIndividuals; import uk.gov.gchq.magmacore.examples.data.ExampleRdl; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; import uk.gov.gchq.magmacore.service.MagmaCoreService; import uk.gov.gchq.magmacore.service.transformation.DbChangeSet; import uk.gov.gchq.magmacore.service.transformation.DbTransformation; diff --git a/hqdm-rdf/pom.xml b/hqdm-rdf/pom.xml index 2dc30be5..3e887cc1 100644 --- a/hqdm-rdf/pom.xml +++ b/hqdm-rdf/pom.xml @@ -28,5 +28,4 @@ junit - diff --git a/hqdm-rdf/src/main/java/module-info.java b/hqdm-rdf/src/main/java/module-info.java index 6bb1d8a5..4ede3e62 100644 --- a/hqdm-rdf/src/main/java/module-info.java +++ b/hqdm-rdf/src/main/java/module-info.java @@ -15,11 +15,11 @@ /** * Classes for constructing HQDM objects as RDF triples. */ -module uk.gov.gchq.hqdm.rdf { - requires transitive uk.gov.gchq.hqdm; +module uk.gov.gchq.magmacore.hqdm.rdf { + requires transitive uk.gov.gchq.magmacore.hqdm; - exports uk.gov.gchq.hqdm.rdf.exception; - exports uk.gov.gchq.hqdm.rdf.iri; - exports uk.gov.gchq.hqdm.rdf.util; - exports uk.gov.gchq.hqdm.rdf; + exports uk.gov.gchq.magmacore.hqdm.rdf.exception; + exports uk.gov.gchq.magmacore.hqdm.rdf.iri; + exports uk.gov.gchq.magmacore.hqdm.rdf.util; + exports uk.gov.gchq.magmacore.hqdm.rdf; } diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java b/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java deleted file mode 100755 index 3bc8eb4c..00000000 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HQDM.java +++ /dev/null @@ -1,2134 +0,0 @@ -/* - * Copyright 2021 Crown Copyright - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -package uk.gov.gchq.hqdm.rdf.iri; - -/** - * IRI definitions for HQDM entities and associations. - */ -public final class HQDM { - - private HQDM() { - } - - /** HQDM namespace. */ - public static final IriBase HQDM = new IriBase("hqdm", "http://www.semanticweb.org/hqdm#"); - - /** A unique identifier for a particular HQDM entity. */ - @Deprecated - public static final HqdmIri ENTITY_ID = new HqdmIri(HQDM, "data_uniqueID"); - - /** A human-interpretable name for a particular HQDM entity. */ - @Deprecated - public static final HqdmIri ENTITY_NAME = new HqdmIri(HQDM, "data_EntityName"); - - // ======================================================================= - // Entities - // ======================================================================= - - /** A {@link uk.gov.gchq.hqdm.model.Thing} that does not exist in space or time. */ - public static final HqdmIri ABSTRACT_OBJECT = new HqdmIri(HQDM, "abstract_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that is the acceptance of an - * {@link uk.gov.gchq.hqdm.model.Offer} as {@link #PART_OF} an - * {@link uk.gov.gchq.hqdm.model.AgreeContract}. - */ - public static final HqdmIri ACCEPTANCE_OF_OFFER = new HqdmIri(HQDM, "acceptance_of_offer"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that consists of one or more - * {@link uk.gov.gchq.hqdm.model.Offer}s of a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney} for a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} of goods where one - * {@link uk.gov.gchq.hqdm.model.Offer} is accepted. - */ - public static final HqdmIri ACCEPTANCE_OF_OFFER_FOR_GOODS = new HqdmIri(HQDM, "acceptance_of_offer_for_goods"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Individual} that consists of its - * {@link uk.gov.gchq.hqdm.model.Participant}s and causes some {@link uk.gov.gchq.hqdm.model.Event}. - */ - public static final HqdmIri ACTIVITY = new HqdmIri(HQDM, "activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Relationship} where the whole is at least the sum of the parts. - */ - public static final HqdmIri AGGREGATION = new HqdmIri(HQDM, "aggregation"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that consists of an - * {@link uk.gov.gchq.hqdm.model.Offer} of some {@link uk.gov.gchq.hqdm.model.Thing} in exchange for - * some consideration, and an {@link uk.gov.gchq.hqdm.model.AcceptanceOfOffer}. - */ - public static final HqdmIri AGREE_CONTRACT = new HqdmIri(HQDM, "agree_contract"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} where two or more parties carry out - * a course of action previously agreed upon. - */ - public static final HqdmIri AGREEMENT_EXECUTION = new HqdmIri(HQDM, "agreement_execution"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that consists of a - * {@link uk.gov.gchq.hqdm.model.ReachingAgreement} and an - * {@link uk.gov.gchq.hqdm.model.AgreementExecution}, where the - * {@link uk.gov.gchq.hqdm.model.AgreementExecution} is the course of action agreed to in the - * {@link uk.gov.gchq.hqdm.model.ReachingAgreement}. - */ - public static final HqdmIri AGREEMENT_PROCESS = new HqdmIri(HQDM, "agreement_process"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney}, that is also a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}, and a - * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that is intended and accepted for use as a means of - * exchange. - */ - public static final HqdmIri AMOUNT_OF_MONEY = new HqdmIri(HQDM, "amount_of_money"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.Participant} that is the {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Ownership} that is owned. - */ - public static final HqdmIri ASSET = new HqdmIri(HQDM, "asset"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Individual} that {@link #CONSISTS_OF} the - * {@link uk.gov.gchq.hqdm.model.Participant}s that are associated, and where the - * {@link uk.gov.gchq.hqdm.model.Participant}s are {@link #PART_OF} the same - * {@link uk.gov.gchq.hqdm.model.PeriodOfTime}. - */ - public static final HqdmIri ASSOCIATION = new HqdmIri(HQDM, "association"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Event} that is the {@link #BEGINNING} of an - * {@link uk.gov.gchq.hqdm.model.Ownership}. - */ - public static final HqdmIri BEGINNING_OF_OWNERSHIP = new HqdmIri(HQDM, "beginning_of_ownership"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that sustains itself and reproduces. - */ - public static final HqdmIri BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "biological_object"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.System} that is also an - * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} and a - * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem}. - */ - public static final HqdmIri BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "biological_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.BiologicalObject}, - * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} and - * {@link uk.gov.gchq.hqdm.model.SystemComponent} that is any - * {@link uk.gov.gchq.hqdm.model.BiologicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.SystemComponent}. - */ - public static final HqdmIri BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "biological_system_component"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AbstractObject} that has members and whose identity is defined - * by its membership. - */ - public static final HqdmIri CLASS = new HqdmIri(HQDM, "class"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Relationship} where a {@link uk.gov.gchq.hqdm.model.Thing} is a - * member of a class{@link uk.gov.gchq.hqdm.model.Class}. - */ - public static final HqdmIri CLASSIFICATION = new HqdmIri(HQDM, "classification"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.AbstractObject} or - * any its subsets. - */ - public static final HqdmIri CLASS_OF_ABSTRACT_OBJECT = new HqdmIri(HQDM, "class_of_abstract_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} and a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfActivity} that is - * {@link uk.gov.gchq.hqdm.model.Activity} or any of its possible subsets. - */ - public static final HqdmIri CLASS_OF_ACTIVITY = new HqdmIri(HQDM, "class_of_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfReachingAgreement} that is - * {@link uk.gov.gchq.hqdm.model.AgreeContract} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_AGREE_CONTRACT = new HqdmIri(HQDM, "class_of_agree_contract"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is - * {@link uk.gov.gchq.hqdm.model.AgreementExecution} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_AGREEMENT_EXECUTION = new HqdmIri(HQDM, "class_of_agreement_execution"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is - * {@link uk.gov.gchq.hqdm.model.AgreementProcess} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_AGREEMENT_PROCESS = new HqdmIri(HQDM, "class_of_agreement_process"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfAmountOfMoney}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.AmountOfMoney} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "class_of_amount_of_money"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfAssociation} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is - * {@link uk.gov.gchq.hqdm.model.Association} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ASSOCIATION = new HqdmIri(HQDM, "class_of_association"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.BiologicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "class_of_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem}, - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject}, and - * {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.BiologicalSystem} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "class_of_biological_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject}, - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, and - * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is - * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_biological_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.Class} or any of its - * subsets. - */ - public static final HqdmIri CLASS_OF_CLASS = new HqdmIri(HQDM, "class_of_class"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfClass} that is - * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_CLASS_OF_SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, - "class_of_class_of_spatio_temporal_extent"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAgreementExecution} that is - * {@link uk.gov.gchq.hqdm.model.ContractExecution} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_CONTRACT_EXECUTION = new HqdmIri(HQDM, "class_of_contract_execution"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAgreementProcess} that is - * {@link uk.gov.gchq.hqdm.model.ContractProcess} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_CONTRACT_PROCESS = new HqdmIri(HQDM, "class_of_contract_process"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is - * {@link uk.gov.gchq.hqdm.model.Event} or any of its possible subsets. - */ - public static final HqdmIri CLASS_OF_EVENT = new HqdmIri(HQDM, "class_of_event"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject}, - * {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject}, and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject} that is - * {@link uk.gov.gchq.hqdm.model.FunctionalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "class_of_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.FunctionalSystem} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "class_of_functional_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent}, and - * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is - * {@link uk.gov.gchq.hqdm.model.FunctionalSystemComponent} and any of its subsets. - */ - public static final HqdmIri CLASS_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is {@link uk.gov.gchq.hqdm.model.Individual} - * or any of its subsets. - */ - public static final HqdmIri CLASS_OF_INDIVIDUAL = new HqdmIri(HQDM, "class_of_individual"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is - * {@link uk.gov.gchq.hqdm.model.InPlaceBiologicalComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, - "class_of_in_place_biological_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is - * {@link uk.gov.gchq.hqdm.model.InstalledFunctionalSystemComponent} and any of its subsets. - */ - public static final HqdmIri CLASS_OF_INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_installed_functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.InstalledObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_INSTALLED_OBJECT = new HqdmIri(HQDM, "class_of_installed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "class_of_intentionally_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is - * {@link uk.gov.gchq.hqdm.model.Offer} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_OFFER = new HqdmIri(HQDM, "class_of_offer"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject}, - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} that is - * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, - "class_of_ordinary_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalObject}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, - "class_of_ordinary_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "class_of_ordinary_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganization}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is {@link uk.gov.gchq.hqdm.model.Organization} - * or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ORGANIZATION = new HqdmIri(HQDM, "class_of_organization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent}, that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent}, and a - * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.OrganizationComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "class_of_organization_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.Participant} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PARTICIPANT = new HqdmIri(HQDM, "class_of_participant"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is {@link uk.gov.gchq.hqdm.model.Party} or - * any of its subtypes. - */ - public static final HqdmIri CLASS_OF_PARTY = new HqdmIri(HQDM, "class_of_party"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is {@link uk.gov.gchq.hqdm.model.PeriodOfTime} - * or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PERIOD_OF_TIME = new HqdmIri(HQDM, "class_of_period_of_time"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem}, - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPerson} and - * {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is {@link uk.gov.gchq.hqdm.model.Person} or any - * of its subsets. - */ - public static final HqdmIri CLASS_OF_PERSON = new HqdmIri(HQDM, "class_of_person"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfInstalledObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPosition} that is - * {@link uk.gov.gchq.hqdm.model.PersonInPosition} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PERSON_IN_POSITION = new HqdmIri(HQDM, "class_of_person_in_position"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} and a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.PhysicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "class_of_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfClassOfSpatioTemporalExtent} that is - * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "class_of_physical_property"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty} that is - * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "class_of_physical_quantity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfEvent} that is {@link uk.gov.gchq.hqdm.model.PointInTime} - * or any of its subsets. - */ - public static final HqdmIri CLASS_OF_POINT_IN_TIME = new HqdmIri(HQDM, "class_of_point_in_time"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPosition} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent} that is - * {@link uk.gov.gchq.hqdm.model.Position} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_POSITION = new HqdmIri(HQDM, "class_of_position"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfPeriodOfTime} that is - * {@link uk.gov.gchq.hqdm.model.PossibleWorld} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "class_of_possible_world"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity} that is - * {@link uk.gov.gchq.hqdm.model.ReachingAgreement} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_REACHING_AGREEMENT = new HqdmIri(HQDM, "class_of_reaching_agreement"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Class} that is {@link uk.gov.gchq.hqdm.model.Relationship} or any - * of its subsets. - */ - public static final HqdmIri CLASS_OF_RELATIONSHIP = new HqdmIri(HQDM, "class_of_relationship"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAssociation} that is - * {@link uk.gov.gchq.hqdm.model.RepresentationBySign} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_REPRESENTATION = new HqdmIri(HQDM, "class_of_representation"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSalesProductInstance} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject} that is - * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "class_of_sales_product_instance"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSign} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.Sign} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SIGN = new HqdmIri(HQDM, "class_of_sign"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfActivity} that is - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, - "class_of_socially_constructed_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "class_of_socially_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Class} that is - * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "class_of_spatio_temporal_extent"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is - * {@link uk.gov.gchq.hqdm.model.State} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE = new HqdmIri(HQDM, "class_of_state"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is - * {@link uk.gov.gchq.hqdm.model.StateOfActivity} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ACTIVITY = new HqdmIri(HQDM, "class_of_state_of_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney} or one of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, - "class_of_state_of_amount_of_money"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is - * {@link uk.gov.gchq.hqdm.model.StateOfAssociation} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "class_of_state_of_association"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, - "class_of_state_of_biological_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is - * {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_state_of_biological_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystem} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, - "class_of_state_of_functional_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is - * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_state_of_functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is - * {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_intentionally_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_ordinary_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_ordinary_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_ordinary_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfParty} that is - * {@link uk.gov.gchq.hqdm.model.StateOfOrganization} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "class_of_state_of_organization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, - "class_of_state_of_organization_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.StateOfParty} or any of its subtypes. - */ - public static final HqdmIri CLASS_OF_STATE_OF_PARTY = new HqdmIri(HQDM, "class_of_state_of_party"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem} and - * {@link uk.gov.gchq.hqdm.model.ClassOfStateOfParty} that is - * {@link uk.gov.gchq.hqdm.model.StateOfPerson} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_PERSON = new HqdmIri(HQDM, "class_of_state_of_person"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is - * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent} that is - * {@link uk.gov.gchq.hqdm.model.StateOfPosition} and any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_POSITION = new HqdmIri(HQDM, "class_of_state_of_position"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSalesProductInstance} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, - "class_of_state_of_sales_product_instance"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSign} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SIGN = new HqdmIri(HQDM, "class_of_state_of_sign"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, - "class_of_state_of_socially_constructed_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} or one of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_socially_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSystem} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SYSTEM = new HqdmIri(HQDM, "class_of_state_of_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_state_of_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystem} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.System} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SYSTEM = new HqdmIri(HQDM, "class_of_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is - * {@link uk.gov.gchq.hqdm.model.SystemComponent} or any of its subsets. - */ - public static final HqdmIri CLASS_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "class_of_system_component"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Aggregation} where the {@link #WHOLE} is an arrangement of the - * parts that results in emergent properties. - */ - public static final HqdmIri COMPOSITION = new HqdmIri(HQDM, "composition"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AgreementExecution} that is the provision of some - * {@link uk.gov.gchq.hqdm.model.Thing} in exchange for some consideration. - */ - public static final HqdmIri CONTRACT_EXECUTION = new HqdmIri(HQDM, "contract_execution"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AgreementProcess} that consists of an - * {@link uk.gov.gchq.hqdm.model.AgreeContract} and a - * {@link uk.gov.gchq.hqdm.model.ContractExecution}. - */ - public static final HqdmIri CONTRACT_PROCESS = new HqdmIri(HQDM, "contract_process"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney} that is the subset of - * {@link uk.gov.gchq.hqdm.model.AmountOfMoney} that has as members all the money issued by an - * issuing authority. - */ - public static final HqdmIri CURRENCY = new HqdmIri(HQDM, "currency"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Relationship} that is defined by a - * {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. - */ - public static final HqdmIri DEFINED_RELATIONSHIP = new HqdmIri(HQDM, "defined_relationship"); - - /** - * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that defines a - * {@link uk.gov.gchq.hqdm.model.Class}. - */ - public static final HqdmIri DEFINITION = new HqdmIri(HQDM, "definition"); - - /** - * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that describes some - * {@link uk.gov.gchq.hqdm.model.Thing}. - */ - public static final HqdmIri DESCRIPTION = new HqdmIri(HQDM, "description"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPerson} that is a {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Employment}. - */ - public static final HqdmIri EMPLOYEE = new HqdmIri(HQDM, "employee"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is a {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Employment}. - */ - public static final HqdmIri EMPLOYER = new HqdmIri(HQDM, "employer"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Association} that consists of an - * {@link uk.gov.gchq.hqdm.model.Employer} and an {@link uk.gov.gchq.hqdm.model.Employee} where the - * {@link uk.gov.gchq.hqdm.model.Employer} pays the {@link uk.gov.gchq.hqdm.model.Employee} to work - * for them. - */ - public static final HqdmIri EMPLOYMENT = new HqdmIri(HQDM, "employment"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Event} that is the {@link #ENDING} of an - * {@link uk.gov.gchq.hqdm.model.Ownership}. - */ - public static final HqdmIri ENDING_OF_OWNERSHIP = new HqdmIri(HQDM, "ending_of_ownership"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Class} where each {@link #MEMBER__OF} the - * {@link uk.gov.gchq.hqdm.model.Class} is known. - */ - public static final HqdmIri ENUMERATED_CLASS = new HqdmIri(HQDM, "enumerated_class"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that has zero temporal thickness and may - * bound some {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. - */ - public static final HqdmIri EVENT = new HqdmIri(HQDM, "event"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AgreementExecution} that consists of a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} of goods and a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney}. - */ - public static final HqdmIri EXCHANGE_OF_GOODS_AND_MONEY = new HqdmIri(HQDM, "exchange_of_goods_and_money"); - - /** - * A one-to-many {@link uk.gov.gchq.hqdm.model.Relationship}. - */ - public static final HqdmIri FUNCTION_ = new HqdmIri(HQDM, "function_"); - - /** - * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.PhysicalObject} that has an {@link #INTENDED_ROLE}. - */ - public static final HqdmIri FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "functional_object"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystem} that is also an - * {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} and a - * {@link uk.gov.gchq.hqdm.model.System}. - */ - public static final HqdmIri FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "functional_system"); - - /** - * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is a replaceable - * {@link #COMPONENT_OF} a {@link uk.gov.gchq.hqdm.model.FunctionalSystem}. - */ - public static final HqdmIri FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.RepresentationByPattern} that is a surrogate for the - * {@link uk.gov.gchq.hqdm.model.Thing} {@link #REPRESENTED}. - */ - public static final HqdmIri IDENTIFICATION = new HqdmIri(HQDM, "identification"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Identification} that identifies a - * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. An - * {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} consists of a REAL that is a - * representation of the {@link #VALUE_} the physical quantity maps to on the - * {@link uk.gov.gchq.hqdm.model.Scale}. - */ - public static final HqdmIri IDENTIFICATION_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, - "identification_of_physical_quantity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is not a proper - * {@link #TEMPORAL_PART_OF} any other {@link uk.gov.gchq.hqdm.model.Individual} of the same kind. - */ - public static final HqdmIri INDIVIDUAL = new HqdmIri(HQDM, "individual"); - - /** - * An {@link uk.gov.gchq.hqdm.model.InstalledObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} and a - * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent}. - */ - public static final HqdmIri IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, "in_place_biological_component"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.InstalledObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} and a - * {@link uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent}. - */ - public static final HqdmIri INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "installed_functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} from when it is installed as a - * {@link uk.gov.gchq.hqdm.model.SystemComponent} to when it is removed. - */ - public static final HqdmIri INSTALLED_OBJECT = new HqdmIri(HQDM, "installed_object"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Individual} and - * {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is intentionally - * constructed. - */ - public static final HqdmIri INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "intentionally_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfActivity} all of whose members are of the same kind. - */ - public static final HqdmIri KIND_OF_ACTIVITY = new HqdmIri(HQDM, "kind_of_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAssociation} where all the members are of the same kind. - */ - public static final HqdmIri KIND_OF_ASSOCIATION = new HqdmIri(HQDM, "kind_of_association"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalObject} and a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} is of the same kind. - */ - public static final HqdmIri KIND_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "kind_of_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystem} all of whose members have a natural - * {@link uk.gov.gchq.hqdm.model.Role} that they play. - */ - public static final HqdmIri KIND_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "kind_of_biological_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfBiologicalSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} where all the member components play the - * same {@link uk.gov.gchq.hqdm.model.Role} in some {@link uk.gov.gchq.hqdm.model.BiologicalSystem}. - */ - public static final HqdmIri KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "kind_of_biological_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalObject}, that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject}, and a - * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} where each {@link #MEMBER_OF} - * a {@link uk.gov.gchq.hqdm.model.KindOfFunctionalObject} is of the same kind. - */ - public static final HqdmIri KIND_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "kind_of_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalSystem} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystem} where each - * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalSystem} has members that are of the same kind. - */ - public static final HqdmIri KIND_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "kind_of_functional_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfFunctionalSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent} is of the same kind. - */ - public static final HqdmIri KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "kind_of_functional_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} where all the members possess attributes in - * common. - */ - public static final HqdmIri KIND_OF_INDIVIDUAL = new HqdmIri(HQDM, "kind_of_individual"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfIndividual} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} is of the same kind. - */ - public static final HqdmIri KIND_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "kind_of_intentionally_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject} a - * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject} and a - * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject} is of the same kind. - */ - public static final HqdmIri KIND_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, - "kind_of_ordinary_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject}, that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject}, and a - * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject} is of the same kind. - */ - public static final HqdmIri KIND_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, - "kind_of_ordinary_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} has members that are of the same kind. - */ - public static final HqdmIri KIND_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "kind_of_ordinary_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where each - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} has members that are of the same kind. - */ - public static final HqdmIri KIND_OF_ORGANIZATION = new HqdmIri(HQDM, "kind_of_organization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} whose members are all of the same kind. - */ - public static final HqdmIri KIND_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "kind_of_organization_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfParty} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfSystem} where all the members are of the same kind. - */ - public static final HqdmIri KIND_OF_PARTY = new HqdmIri(HQDM, "kind_of_party"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPerson} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfParty} whose members are all of the same kind. - */ - public static final HqdmIri KIND_OF_PERSON = new HqdmIri(HQDM, "kind_of_person"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfIndividual} where each - * {@link uk.gov.gchq.hqdm.model.PhysicalObject} has members that are of the same kind. - */ - public static final HqdmIri KIND_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "kind_of_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty} is of the same kind. - */ - public static final HqdmIri KIND_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "kind_of_physical_property"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPhysicalQuantity} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty} such that each {@link #MEMBER_OF} the same - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} is comparable to the others. - */ - public static final HqdmIri KIND_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "kind_of_physical_quantity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfPosition} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfOrganizationComponent} where all the members are of the same - * kind. - */ - public static final HqdmIri KIND_OF_POSITION = new HqdmIri(HQDM, "kind_of_position"); - - /** - * A {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature} where one or more {@link #ROLES} - * have fixed players. - */ - public static final HqdmIri KIND_OF_RELATIONSHIP_WITH_RESTRICTION = new HqdmIri(HQDM, - "kind_of_relationship_with_restriction"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfRelationship} that is a subset of - * {@link uk.gov.gchq.hqdm.model.DefinedRelationship} type where the - * {@link uk.gov.gchq.hqdm.model.Classification}s involved in each - * {@link uk.gov.gchq.hqdm.model.DefinedRelationship} have as {@link #CLASSIFIER}s the - * {@link #ROLES} specified by the {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. - */ - public static final HqdmIri KIND_OF_RELATIONSHIP_WITH_SIGNATURE = new HqdmIri(HQDM, - "kind_of_relationship_with_signature"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject} where each - * {@link uk.gov.gchq.hqdm.model.KindOfSociallyConstructedObject} has members that are of the same - * kind. - */ - public static final HqdmIri KIND_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "kind_of_socially_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSystem} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject} where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfSystem} is of the same kind. - */ - public static final HqdmIri KIND_OF_SYSTEM = new HqdmIri(HQDM, "kind_of_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalObject} where all the members are of the same kind. - */ - public static final HqdmIri KIND_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "kind_of_system_component"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Organization} that is a group of people who share a common - * understanding of a set of {@link uk.gov.gchq.hqdm.model.Sign}s. - */ - public static final HqdmIri LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "language_community"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Asset} that is a - * {@link uk.gov.gchq.hqdm.model.StateOfAmountOfMoney}. - */ - public static final HqdmIri MONEY_ASSET = new HqdmIri(HQDM, "money_asset"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that proposes an exchange of some - * {@link uk.gov.gchq.hqdm.model.Thing} for some consideration. - */ - public static final HqdmIri OFFER = new HqdmIri(HQDM, "offer"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ReachingAgreement} that {@link #CONSISTS_OF} exactly one - * {@link uk.gov.gchq.hqdm.model.Offer} of a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney} for exactly one - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} that is accepted. - */ - public static final HqdmIri OFFER_AND_ACCEPTANCE_FOR_GOODS = new HqdmIri(HQDM, "offer_and_acceptance_for_goods"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Offer} of an - * {@link uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney}. - */ - public static final HqdmIri OFFER_FOR_GOODS = new HqdmIri(HQDM, "offer_for_goods"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfOffer} that is for a - * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual}, at a {@link uk.gov.gchq.hqdm.model.Price}, by a - * {@link uk.gov.gchq.hqdm.model.Party}, for a {@link uk.gov.gchq.hqdm.model.PeriodOfTime}. - */ - public static final HqdmIri OFFERING = new HqdmIri(HQDM, "offering"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject}, a - * {@link uk.gov.gchq.hqdm.model.BiologicalObject}, and an - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.BiologicalObject} that does not survive the replacement of all of - * its parts. - */ - public static final HqdmIri ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "ordinary_biological_object"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} and - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.FunctionalObject}. - */ - public static final HqdmIri ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "ordinary_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.PhysicalObject} that does not survive changing all its parts at - * once. - */ - public static final HqdmIri ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, "ordinary_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrganization}, that is also a - * {@link uk.gov.gchq.hqdm.model.Party}, and a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is an organized body of people. - */ - public static final HqdmIri ORGANIZATION = new HqdmIri(HQDM, "organization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent}, - * {@link uk.gov.gchq.hqdm.model.SystemComponent}, and - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is a {@link #COMPONENT_OF} an - * {@link uk.gov.gchq.hqdm.model.Organization} that can be completely replaced without losing its - * identity. - */ - public static final HqdmIri ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "organization_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a - * {@link uk.gov.gchq.hqdm.model.Participant} that is a {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Ownership}. - */ - public static final HqdmIri OWNER = new HqdmIri(HQDM, "owner"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Association} that {@link #CONSISTS_OF} an - * {@link uk.gov.gchq.hqdm.model.Owner} and an {@link uk.gov.gchq.hqdm.model.Asset} where the - * {@link uk.gov.gchq.hqdm.model.Owner} owns the {@link uk.gov.gchq.hqdm.model.Asset}. - */ - public static final HqdmIri OWNERSHIP = new HqdmIri(HQDM, "ownership"); - - /** - * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Activity} or {@link uk.gov.gchq.hqdm.model.Association}. - */ - public static final HqdmIri PARTICIPANT = new HqdmIri(HQDM, "participant"); - - /** - * A SELECT where a {@link uk.gov.gchq.hqdm.model.Participant} may be a {@link #PARTICIPANT_IN} an - * {@link uk.gov.gchq.hqdm.model.Activity} or an {@link uk.gov.gchq.hqdm.model.Association}. - */ - public static final HqdmIri PARTICIPANT_IN_ACTIVITY_OR_ASSOCIATION = new HqdmIri(HQDM, - "participant_in_activity_or_association"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a - * {@link uk.gov.gchq.hqdm.model.System} that is a {@link uk.gov.gchq.hqdm.model.Person} or an - * {@link uk.gov.gchq.hqdm.model.Organization}. - */ - public static final HqdmIri PARTY = new HqdmIri(HQDM, "party"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSign} where all the {@link uk.gov.gchq.hqdm.model.Sign}s - * are of the same {@link uk.gov.gchq.hqdm.model.Pattern}. - */ - public static final HqdmIri PATTERN = new HqdmIri(HQDM, "pattern"); - - /** - * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link #TEMPORAL_PART_OF} some - * {@link uk.gov.gchq.hqdm.model.PossibleWorld}. - */ - public static final HqdmIri PERIOD_OF_TIME = new HqdmIri(HQDM, "period_of_time"); - - /** - * A {@link uk.gov.gchq.hqdm.model.BiologicalSystem} that is also, a - * {@link uk.gov.gchq.hqdm.model.StateOfPerson}, and a {@link uk.gov.gchq.hqdm.model.Party} that is - * a human being. - */ - public static final HqdmIri PERSON = new HqdmIri(HQDM, "person"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPosition}, that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfPerson}, and an - * {@link uk.gov.gchq.hqdm.model.InstalledObject} that is a {@link uk.gov.gchq.hqdm.model.Person} - * while they are in a {@link uk.gov.gchq.hqdm.model.Position} and also the - * {@link uk.gov.gchq.hqdm.model.Position} while it is filled by the - * {@link uk.gov.gchq.hqdm.model.Person}. - */ - public static final HqdmIri PERSON_IN_POSITION = new HqdmIri(HQDM, "person_in_position"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Individual} that consists of a distribution of matter and/or - * energy. - */ - public static final HqdmIri PHYSICAL_OBJECT = new HqdmIri(HQDM, "physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} that is some characteristic that is the same for - * each {@link uk.gov.gchq.hqdm.model.State} that possesses it (is a {@link #MEMBER_OF} it). - */ - public static final HqdmIri PHYSICAL_PROPERTY = new HqdmIri(HQDM, "physical_property"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfState} where each member of the set is a member of a - * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} within the range. - */ - public static final HqdmIri PHYSICAL_PROPERTY_RANGE = new HqdmIri(HQDM, "physical_property_range"); - - /** - * A {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} is a - * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} that is a measurable quantity of a - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalProperty}. - */ - public static final HqdmIri PHYSICAL_QUANTITY = new HqdmIri(HQDM, "physical_quantity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange} that ranges over - * {@link uk.gov.gchq.hqdm.model.PhysicalQuantity} values. - */ - public static final HqdmIri PHYSICAL_QUANTITY_RANGE = new HqdmIri(HQDM, "physical_quantity_range"); - - /** - * A {@link uk.gov.gchq.hqdm.model.PossibleWorld} that some {@link uk.gov.gchq.hqdm.model.Party} - * would like to bring about. - */ - public static final HqdmIri PLAN = new HqdmIri(HQDM, "plan"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Event} that is all of space at an instant from some viewpoint. - */ - public static final HqdmIri POINT_IN_TIME = new HqdmIri(HQDM, "point_in_time"); - - /** - * An {@link uk.gov.gchq.hqdm.model.OrganizationComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfPosition} that may be held by a - * {@link uk.gov.gchq.hqdm.model.Person}. - */ - public static final HqdmIri POSITION = new HqdmIri(HQDM, "position"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Individual} that is a complete spatio-temporal history of some - * possible world. - */ - public static final HqdmIri POSSIBLE_WORLD = new HqdmIri(HQDM, "possible_world"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney} that is the {@link #CONSIDERATION_BY_CLASS} - * in an {@link uk.gov.gchq.hqdm.model.Offering}. - */ - public static final HqdmIri PRICE = new HqdmIri(HQDM, "price"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is a set of - * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} sold under a brand name. - */ - public static final HqdmIri PRODUCT_BRAND = new HqdmIri(HQDM, "product_brand"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Offering} that is for a - * {@link uk.gov.gchq.hqdm.model.SalesProduct}. - */ - public static final HqdmIri PRODUCT_OFFERING = new HqdmIri(HQDM, "product_offering"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} where two or more parties determine - * a course of action. - */ - public static final HqdmIri REACHING_AGREEMENT = new HqdmIri(HQDM, "reaching_agreement"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfLanguageCommunity} that recognizes what a - * {@link uk.gov.gchq.hqdm.model.Pattern} is intended to represent. - */ - public static final HqdmIri RECOGNIZING_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "recognizing_language_community"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AbstractObject} that is what one - * {@link uk.gov.gchq.hqdm.model.Thing} has to do with one or more others. - */ - public static final HqdmIri RELATIONSHIP = new HqdmIri(HQDM, "relationship"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfRepresentation} where the - * {@link uk.gov.gchq.hqdm.model.Sign} in all the members are members of the - * {@link uk.gov.gchq.hqdm.model.Pattern} specified. - */ - public static final HqdmIri REPRESENTATION_BY_PATTERN = new HqdmIri(HQDM, "representation_by_pattern"); - - /** - * An {@link uk.gov.gchq.hqdm.model.Association} of a {@link uk.gov.gchq.hqdm.model.Sign} and a - * {@link uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity} that recognizes the - * {@link uk.gov.gchq.hqdm.model.Sign} as representing some {@link uk.gov.gchq.hqdm.model.Thing}. - */ - public static final HqdmIri REPRESENTATION_BY_SIGN = new HqdmIri(HQDM, "representation_by_sign"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is {@link #PART_OF_PLAN} at least one - * {@link uk.gov.gchq.hqdm.model.Plan} and is {@link #DEFINED_BY} exactly one - * {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. - */ - public static final HqdmIri REQUIREMENT = new HqdmIri(HQDM, "requirement"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} that is the {@link #INTERSECTION_OF} - * one or more {@link uk.gov.gchq.hqdm.model.ClassOfState}. - */ - public static final HqdmIri REQUIREMENT_SPECIFICATION = new HqdmIri(HQDM, "requirement_specification"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfParticipant} where each member participates in the same - * way in an {@link uk.gov.gchq.hqdm.model.Activity} or {@link uk.gov.gchq.hqdm.model.Association}. - */ - public static final HqdmIri ROLE = new HqdmIri(HQDM, "role"); - - /** - * An {@link uk.gov.gchq.hqdm.model.AgreementProcess} that consists of an - * {@link uk.gov.gchq.hqdm.model.OfferAndAcceptanceForGoods} and an - * {@link uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney}. - */ - public static final HqdmIri SALE_OF_GOODS = new HqdmIri(HQDM, "sale_of_goods"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is a set of - * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} sold under the same product name. - */ - public static final HqdmIri SALES_PRODUCT = new HqdmIri(HQDM, "sales_product"); - - /** - * An {@link uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject} that is produced in order to be sold. - */ - public static final HqdmIri SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "sales_product_instance"); - - /** - * A {@link uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance} that is the customer facing - * specification of a version of a {@link uk.gov.gchq.hqdm.model.SalesProduct}. - */ - public static final HqdmIri SALES_PRODUCT_VERSION = new HqdmIri(HQDM, "sales_product_version"); - - /** - * A scale is a function from {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} to the real - * numbers. - */ - public static final HqdmIri SCALE = new HqdmIri(HQDM, "scale"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfSign}, that is also a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}, and a - * {@link uk.gov.gchq.hqdm.model.Participant} that represents some - * {@link uk.gov.gchq.hqdm.model.Thing} for some community in one or more - * {@link #REPRESENTATION_BY_SIGN}. - */ - public static final HqdmIri SIGN = new HqdmIri(HQDM, "sign"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is also an - * {@link uk.gov.gchq.hqdm.model.Activity}. - */ - public static final HqdmIri SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, "socially_constructed_activity"); - - /** - * An {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} that is necessarily constructed - * by agreement or at least acquiescence of many people. - */ - public static final HqdmIri SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, "socially_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Thing} that exists in time and space. - */ - public static final HqdmIri SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "spatio_temporal_extent"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Relationship} where each {@link #MEMBER__OF} the - * {@link #SUBCLASS} is a {@link #MEMBER__OF} the {@link #SUPERCLASS}. - */ - public static final HqdmIri SPECIALIZATION = new HqdmIri(HQDM, "specialization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} that is an - * {@link uk.gov.gchq.hqdm.model.Individual} or a {@link #TEMPORAL_PART_OF} some - * {@link uk.gov.gchq.hqdm.model.Individual}. - */ - public static final HqdmIri STATE = new HqdmIri(HQDM, "state"); - - /** - * A state that is an {@link uk.gov.gchq.hqdm.model.Activity} or a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.Activity}. - */ - public static final HqdmIri STATE_OF_ACTIVITY = new HqdmIri(HQDM, "state_of_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.AmountOfMoney}. - */ - public static final HqdmIri STATE_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "state_of_amount_of_money"); - - /** - * A {@link uk.gov.gchq.hqdm.model.State} that is an {@link uk.gov.gchq.hqdm.model.Association} or a - * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.Association}. - */ - public static final HqdmIri STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "state_of_association"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.BiologicalObject} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.BiologicalObject}. - */ - public static final HqdmIri STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "state_of_biological_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject} and - * {@link uk.gov.gchq.hqdm.model.StateOfSystem} that is - * {@link uk.gov.gchq.hqdm.model.BiologicalSystem} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.BiologicalSystem}. - */ - public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "state_of_biological_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent} and - * {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is a - * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.BiologicalSystemComponent}. - */ - public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "state_of_biological_system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} and - * {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.FunctionalObject} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.FunctionalObject}. - */ - public static final HqdmIri STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "state_of_functional_object"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfSystem}. - */ - public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "state_of_functional_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is a - * {@link uk.gov.gchq.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.SystemComponent}. - */ - public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "state_of_functional_system_component"); - - /** - * A state that is an {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject} or a - * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.IntentionallyConstructedObject}. - */ - public static final HqdmIri STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "state_of_intentionally_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrganization} that is a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.LanguageCommunity}. - */ - public static final HqdmIri STATE_OF_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "state_of_language_community"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is an - * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject} or a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject}. - */ - public static final HqdmIri STATE_OF_ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, - "state_of_ordinary_biological_object"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.StateOfFunctionalObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject}. - */ - public static final HqdmIri STATE_OF_ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, - "state_of_ordinary_functional_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is an - * {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} or a {@link #TEMPORAL_PART_OF} one. - */ - public static final HqdmIri STATE_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "state_of_ordinary_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is an - * {@link uk.gov.gchq.hqdm.model.Organization} or a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.Organization}. - */ - public static final HqdmIri STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "state_of_organization"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfSystemComponent} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is a - * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.hqdm.model.OrganizationComponent}. - */ - public static final HqdmIri STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "state_of_organization_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfSystem} that is a {@link uk.gov.gchq.hqdm.model.Party} or - * a {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.Party}. - */ - public static final HqdmIri STATE_OF_PARTY = new HqdmIri(HQDM, "state_of_party"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfBiologicalSystem} and - * {@link uk.gov.gchq.hqdm.model.StateOfParty} that is a {@link uk.gov.gchq.hqdm.model.Person} or a - * {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.Person}. - */ - public static final HqdmIri STATE_OF_PERSON = new HqdmIri(HQDM, "state_of_person"); - - /** - * A {@link uk.gov.gchq.hqdm.model.State} that is a {@link uk.gov.gchq.hqdm.model.PhysicalObject} or - * a {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.hqdm.model.PhysicalObject}. - */ - public static final HqdmIri STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "state_of_physical_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrganizationComponent} that is a - * {@link uk.gov.gchq.hqdm.model.Position} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.Position}. - */ - public static final HqdmIri STATE_OF_POSITION = new HqdmIri(HQDM, "state_of_position"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject} that is a - * {@link uk.gov.gchq.hqdm.model.SalesProductInstance} or a {@link #TEMPORAL_PART_OF} one. - */ - public static final HqdmIri STATE_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "state_of_sales_product_instance"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is a - * {@link uk.gov.gchq.hqdm.model.Sign} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.Sign}. - */ - public static final HqdmIri STATE_OF_SIGN = new HqdmIri(HQDM, "state_of_sign"); - - /** - * Any {@link uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject} that is also a - * {@link uk.gov.gchq.hqdm.model.StateOfActivity}. - */ - public static final HqdmIri STATE_OF_SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, - "state_of_socially_constructed_activity"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject} that is a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject}. - */ - public static final HqdmIri STATE_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "state_of_socially_constructed_object"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.System} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.System}. - */ - public static final HqdmIri STATE_OF_SYSTEM = new HqdmIri(HQDM, "state_of_system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfPhysicalObject} that is a - * {@link uk.gov.gchq.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a - * {@link uk.gov.gchq.hqdm.model.SystemComponent}. - */ - public static final HqdmIri STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "state_of_system_component"); - - /** - * An {@link uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject} that is an organized or connected group - * of {@link uk.gov.gchq.hqdm.model.PhysicalObject}. - */ - public static final HqdmIri SYSTEM = new HqdmIri(HQDM, "system"); - - /** - * A {@link uk.gov.gchq.hqdm.model.PhysicalObject} that is a {@link #COMPONENT_OF} a - * {@link uk.gov.gchq.hqdm.model.System} and that can be completely replaced without losing - * identity. - */ - public static final HqdmIri SYSTEM_COMPONENT = new HqdmIri(HQDM, "system_component"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Composition} where the part is the entire {@link #WHOLE} - * spatially, but part of the {@link #WHOLE} temporally. - */ - public static final HqdmIri TEMPORAL_COMPOSITION = new HqdmIri(HQDM, "temporal_composition"); - - /** - * Anything that exists, real or imagined. - */ - public static final HqdmIri THING = new HqdmIri(HQDM, "thing"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} and {@link uk.gov.gchq.hqdm.model.Participant} - * receiving {@link uk.gov.gchq.hqdm.model.Ownership} in a - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership}. - */ - public static final HqdmIri TRANSFEREE = new HqdmIri(HQDM, "transferee"); - - /** - * A {@link uk.gov.gchq.hqdm.model.SociallyConstructedActivity} that ends one - * {@link uk.gov.gchq.hqdm.model.Ownership} and begins another for - * {@link uk.gov.gchq.hqdm.model.Asset}s that are a {@link #TEMPORAL_PART_OF} the same - * {@link uk.gov.gchq.hqdm.model.PhysicalObject}. - */ - public static final HqdmIri TRANSFER_OF_OWNERSHIP = new HqdmIri(HQDM, "transfer_of_ownership"); - - /** - * A {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} where the - * {@link uk.gov.gchq.hqdm.model.Asset} is a {@link uk.gov.gchq.hqdm.model.MoneyAsset}. - */ - public static final HqdmIri TRANSFER_OF_OWNERSHIP_OF_MONEY = new HqdmIri(HQDM, "transfer_of_ownership_of_money"); - - /** - * A {@link uk.gov.gchq.hqdm.model.StateOfParty} that is also a - * {@link uk.gov.gchq.hqdm.model.Participant} that is a {@link #TEMPORAL_PART_OF} an - * {@link uk.gov.gchq.hqdm.model.Owner} that is a {@link #PARTICIPANT_IN} one or more - * {@link uk.gov.gchq.hqdm.model.TransferOfOwnership}. - */ - public static final HqdmIri TRANSFEROR = new HqdmIri(HQDM, "transferor"); - - /** - * A plus one {@link uk.gov.gchq.hqdm.model.Function_} for a {@link uk.gov.gchq.hqdm.model.Scale}. - */ - public static final HqdmIri UNIT_OF_MEASURE = new HqdmIri(HQDM, "unit_of_measure"); - - // ======================================================================= - // Associations - // ======================================================================= - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may be aggregated - * into one or more others. - * - *

- * Note: This has the same meaning as, but different representation to, the - * {@link uk.gov.gchq.hqdm.model.Aggregation} entity type. - *

- */ - public static final HqdmIri AGGREGATED_INTO = new HqdmIri(HQDM, "aggregated_into"); - - /** - * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} - * has exactly one {@link uk.gov.gchq.hqdm.model.Event} that is its beginning. - */ - public static final HqdmIri BEGINNING = new HqdmIri(HQDM, "beginning"); - - /** - * A relationship type where each {@link uk.gov.gchq.hqdm.model.Activity} is the cause of one or - * more {@link uk.gov.gchq.hqdm.model.Event}. - */ - public static final HqdmIri CAUSES = new HqdmIri(HQDM, "causes"); - - /** - * A {@link #CAUSES} relationship type where a {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} - * {@link #CAUSES} exactly one {@link uk.gov.gchq.hqdm.model.BeginningOfOwnership}. - */ - public static final HqdmIri CAUSES_BEGINNING = new HqdmIri(HQDM, "causes_beginning"); - - /** - * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} - * causes a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.ClassOfEvent}. - */ - public static final HqdmIri CAUSES_BY_CLASS = new HqdmIri(HQDM, "causes_by_class"); - - /** - * A {@link #CAUSES} relationship type where a {@link uk.gov.gchq.hqdm.model.TransferOfOwnership} - * {@link #CAUSES} exactly one {@link uk.gov.gchq.hqdm.model.EndingOfOwnership}. - */ - public static final HqdmIri CAUSES_ENDING = new HqdmIri(HQDM, "causes_ending"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one - * {@link uk.gov.gchq.hqdm.model.ClassOfIndividual} some {@link #MEMBER_OF} which is offered. - */ - public static final HqdmIri CLASS_OF_OFFERED = new HqdmIri(HQDM, "class_of_offered"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.Classification} has exactly one - * classifier. - */ - public static final HqdmIri CLASSIFIER = new HqdmIri(HQDM, "classifier"); - - /** - * A {@link #PART_OF} relationship type where each {@link uk.gov.gchq.hqdm.model.SystemComponent} is - * {@link #PART_OF} exactly one {@link uk.gov.gchq.hqdm.model.System}. - */ - public static final HqdmIri COMPONENT_OF = new HqdmIri(HQDM, "component_of"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one - * {@link uk.gov.gchq.hqdm.model.Price} at which the {@link uk.gov.gchq.hqdm.model.Offering} is - * made. - */ - public static final HqdmIri CONSIDERATION_BY_CLASS = new HqdmIri(HQDM, "consideration_by_class"); - - /** - * A {@link #CONSISTS_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may - * {@link #CONSISTS_OF} one or more other {@link uk.gov.gchq.hqdm.model.Activity}. - */ - public static final HqdmIri CONSISTS_OF = new HqdmIri(HQDM, "consists_of"); - - /** - * A {@link #CONSISTS_OF} relationship subtype where an entity has another {@link CONSISTS_OF} - * relationship. - */ - public static final HqdmIri CONSISTS_OF_ = new HqdmIri(HQDM, "consists_of_"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may consist of - * one or more others. - * - *

- * Note: This is the inverse of {@link #PART__OF}. - *

- */ - public static final HqdmIri CONSISTS__OF = new HqdmIri(HQDM, "consists__of"); - - /** - * A relationship type where a {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.KindOfActivity} or - * {@link uk.gov.gchq.hqdm.model.KindOfAssociation} has a {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.Role} as a {@link uk.gov.gchq.hqdm.model.Participant} or part. - */ - public static final HqdmIri CONSISTS_OF_BY_CLASS = new HqdmIri(HQDM, "consists_of_by_class"); - - /** - * An inverse {@link #PART__OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} one - * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} {@link #CONSISTS_OF} another - * {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. - */ - public static final HqdmIri CONSISTS__OF_BY_CLASS = new HqdmIri(HQDM, "consists__of_by_class"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity} is a - * {@link #PARTICIPANT_IN} each {@link #MEMBER_OF} one or more - * {@link uk.gov.gchq.hqdm.model.RepresentationByPattern}. - */ - public static final HqdmIri CONSISTS_OF_IN_MEMBERS = new HqdmIri(HQDM, "consists_of_in_members"); - - /** - * A {@link #CONSISTS_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} or - * {@link uk.gov.gchq.hqdm.model.Association} {@link #CONSISTS_OF} at least one (for Activity) or - * two (for Association) of {@link uk.gov.gchq.hqdm.model.Participant}. - */ - public static final HqdmIri CONSISTS_OF_PARTICIPANT = new HqdmIri(HQDM, "consists_of_participant"); - - /** - * A {@link #CONSISTS_OF_PARTICIPANT} relationship subtype where an entity has another - * {@link #CONSISTS_OF_PARTICIPANT} relationship. - */ - public static final HqdmIri CONSISTS_OF_PARTICIPANT_ = new HqdmIri(HQDM, "consists_of_participant_"); - - /** - * A {@link #MEMBER_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.Requirement} is - * {@link #DEFINED_BY} exactly one {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. - */ - public static final HqdmIri DEFINED_BY = new HqdmIri(HQDM, "defined_by"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may determine one or more - * {@link uk.gov.gchq.hqdm.model.Thing} to be the case. - */ - public static final HqdmIri DETERMINES = new HqdmIri(HQDM, "determines"); - - /** - * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} - * determines a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.Class}. - */ - public static final HqdmIri DETERMINES_BY_CLASS = new HqdmIri(HQDM, "determines_by_class"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Scale} has exactly one - * {@link uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity} as its {@link #DOMAIN}. - */ - public static final HqdmIri DOMAIN = new HqdmIri(HQDM, "domain"); - - /** - * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} - * has exactly one event that is its ending. - */ - public static final HqdmIri ENDING = new HqdmIri(HQDM, "ending"); - - /** - * A {@link #CONSISTS_OF_BY_CLASS} relationship type where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfSystem} has a {@link #MEMBER_OF} one or more - * {@link uk.gov.gchq.hqdm.model.KindOfSystemComponent} as a component. - */ - public static final HqdmIri HAS_COMPONENT_BY_CLASS = new HqdmIri(HQDM, "has_component_by_class"); - - /** - * A relationship type where each {@link #MEMBER_OF} the class is a {@link #MEMBER_OF} the - * {@link #SUPERCLASS}. - */ - public static final HqdmIri HAS_SUPERCLASS = new HqdmIri(HQDM, "has_superclass"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.FunctionalObject} has one or more - * intended {@link uk.gov.gchq.hqdm.model.Role}(s). - */ - public static final HqdmIri INTENDED_ROLE = new HqdmIri(HQDM, "intended_role"); - - /** - * A relationship type where each {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.KindOfFunctionalObject} is intended to play one or more - * {@link uk.gov.gchq.hqdm.model.Role}(s). - */ - public static final HqdmIri INTENDED_ROLE_BY_CLASS = new HqdmIri(HQDM, "intended_role_by_class"); - - /** - * A {@code subtype_of} relationship type where each - * {@link uk.gov.gchq.hqdm.model.RequirementSpecification} is the {@link #INTERSECTION_OF} one or - * more {@link uk.gov.gchq.hqdm.model.ClassOfState}. - * - *

- * Note: The {@link uk.gov.gchq.hqdm.model.RequirementSpecification} is a subtype of each of the - * related {@link uk.gov.gchq.hqdm.model.ClassOfState}. - *

- */ - public static final HqdmIri INTERSECTION_OF = new HqdmIri(HQDM, "intersection_of"); - - /** - * A meta-relationship type where the {@link uk.gov.gchq.hqdm.model.Classification} of some thing in - * a {@link uk.gov.gchq.hqdm.model.Role} is involved in a - * {@link uk.gov.gchq.hqdm.model.Relationship}. - */ - public static final HqdmIri INVOLVES = new HqdmIri(HQDM, "involves"); - - /** - * A {@code supertype_of} relationship type where each - * {@link uk.gov.gchq.hqdm.model.PhysicalQuantityRange} must have as {@link #LOWER_BOUND} exactly - * one {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. - */ - public static final HqdmIri LOWER_BOUND = new HqdmIri(HQDM, "lower_bound"); - - /** - * A {@code subclass_of} relationship type where when a {@link uk.gov.gchq.hqdm.model.SalesProduct} - * {@link #MEETS_SPECIFICATION} of a {@link uk.gov.gchq.hqdm.model.RequirementSpecification}, each - * {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.SalesProduct} is a {@link #MEMBER_OF} the - * {@link uk.gov.gchq.hqdm.model.RequirementSpecification}. - */ - public static final HqdmIri MEETS_SPECIFICATION = new HqdmIri(HQDM, "meets_specification"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.Classification} has exactly one - * {@link #MEMBER}. - */ - public static final HqdmIri MEMBER = new HqdmIri(HQDM, "member"); - - /** - * A {@link #MEMBER_OF} relationship type where a - * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} is a {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. - */ - public static final HqdmIri MEMBER_OF = new HqdmIri(HQDM, "member_of"); - - /** - * A {@link #MEMBER_OF} relationship subtype where an entity has another {@link MEMBER_OF} - * relationship that is less constrained in its scope. - */ - public static final HqdmIri MEMBER_OF_ = new HqdmIri(HQDM, "member_of_"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.Thing} may be a member of one or more - * {@link uk.gov.gchq.hqdm.model.Class}. - * - *

- * Note: This relationship is the same as the entity type - * {@link uk.gov.gchq.hqdm.model.Classification}. - *

- */ - public static final HqdmIri MEMBER__OF = new HqdmIri(HQDM, "member__of"); - - /** - * A {@link #MEMBER_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.AmountOfMoney} may - * be a {@link #MEMBER_OF} exactly one {@link uk.gov.gchq.hqdm.model.Currency}. - */ - public static final HqdmIri MEMBER_OF_CURRENCY = new HqdmIri(HQDM, "member_of_currency"); - - /** - * A {@link #MEMBER_OF} relationship type where an {@link uk.gov.gchq.hqdm.model.Individual} may be - * a {@link #MEMBER_OF} one or more {@link uk.gov.gchq.hqdm.model.KindOfIndividual}. - */ - public static final HqdmIri MEMBER_OF_KIND = new HqdmIri(HQDM, "member_of_kind"); - - /** - * A {@link #MEMBER_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.BiologicalSystem} - * has a natural role that it plays. - * - *

- * Example: My circulatory system has the natural role of circulating blood around the body. - *

- */ - public static final HqdmIri NATURAL_ROLE = new HqdmIri(HQDM, "natural_role"); - - /** - * A relationship type where each {@link #MEMBER_OF} the - * {@link uk.gov.gchq.hqdm.model.KindOfBiologicalSystem} naturally participates in the - * {@link uk.gov.gchq.hqdm.model.Role}. - */ - public static final HqdmIri NATURAL_ROLE_BY_CLASS = new HqdmIri(HQDM, "natural_role_by_class"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Offering} has exactly one - * {@link uk.gov.gchq.hqdm.model.Party} who makes the {@link uk.gov.gchq.hqdm.model.Offering}. - */ - public static final HqdmIri OFFEROR = new HqdmIri(HQDM, "offeror"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Aggregation} has exactly one - * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} as the {@link #PART}. - */ - public static final HqdmIri PART = new HqdmIri(HQDM, "part"); - - /** - * A {@link #PART_OF} relationship type where one {@link uk.gov.gchq.hqdm.model.Activity} may be a - * {@link #PART_OF} one or more others. - */ - public static final HqdmIri PART_OF = new HqdmIri(HQDM, "part_of"); - - /** - * A {@link #PART_OF} relationship type where a - * {@link uk.gov.gchq.hqdm.model.SociallyConstructedObject} may be a {@link #PART_OF} one or more - * {@link uk.gov.gchq.hqdm.model.AgreementExecution}. - */ - public static final HqdmIri PART_OF_ = new HqdmIri(HQDM, "part_of_"); - - /** - * A {@link #PART_OF_BY_CLASS} where a {@link #MEMBER_OF} a {@link uk.gov.gchq.hqdm.model.Role} is a - * {@link uk.gov.gchq.hqdm.model.Participant} in a {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.ClassOfActivity}. - */ - public static final HqdmIri PART_OF_BY_CLASS = new HqdmIri(HQDM, "part_of_by_class"); - - /** - * A {@link #PART_OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.Role} is a {@link #PART_OF} a {@link #MEMBER_OF} the - * {@link uk.gov.gchq.hqdm.model.Class}. - */ - public static final HqdmIri PART_OF_BY_CLASS_ = new HqdmIri(HQDM, "part_of_by_class_"); - - /** - * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.Requirement} must be - * {@link #PART_OF} one or more {@link uk.gov.gchq.hqdm.model.Plan}s. - */ - public static final HqdmIri PART_OF_PLAN = new HqdmIri(HQDM, "part_of_plan"); - - /** - * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} - * may be {@link #PART_OF} one or more {@link uk.gov.gchq.hqdm.model.PossibleWorld}. - * - *

- * Note: The relationship is optional because a {@link uk.gov.gchq.hqdm.model.PossibleWorld} is not - * {@link #PART_OF} any other {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. - *

- */ - public static final HqdmIri PART_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "part_of_possible_world"); - - /** - * An {@link #AGGREGATED_INTO} relationship type where a - * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} may be part of another and the whole has - * emergent properties and is more than just the sum of its parts. - */ - public static final HqdmIri PART__OF = new HqdmIri(HQDM, "part__of"); - - /** - * A relationship type where a {@link #MEMBER_OF} a - * {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent} is {@link #PART_OF} a - * {@link #MEMBER_OF} some {@link uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent}. - */ - public static final HqdmIri PART__OF_BY_CLASS = new HqdmIri(HQDM, "part__of_by_class"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.Participant} is a - * {@link #PARTICIPANT_IN} an {@link uk.gov.gchq.hqdm.model.Association} or - * {@link uk.gov.gchq.hqdm.model.Activity}. - */ - public static final HqdmIri PARTICIPANT_IN = new HqdmIri(HQDM, "participant_in"); - - /** - * A relationship that is exactly one {@link uk.gov.gchq.hqdm.model.PeriodOfTime} for which the - * {@link uk.gov.gchq.hqdm.model.Offering} is valid. - */ - public static final HqdmIri PERIOD_OFFERED = new HqdmIri(HQDM, "period_offered"); - - /** - * A {@code supertype_of} relationship type where the members of each - * {@link uk.gov.gchq.hqdm.model.PhysicalProperty} in the - * {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange} are members of the - * {@link uk.gov.gchq.hqdm.model.PhysicalPropertyRange}. - */ - public static final HqdmIri RANGES_OVER = new HqdmIri(HQDM, "ranges_over"); - - /** - * A relationship type where a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.KindOfActivity} - * references a {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.Class}. - */ - public static final HqdmIri REFERENCES_BY_CLASS = new HqdmIri(HQDM, "references_by_class"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Activity} may reference one or more - * {@link uk.gov.gchq.hqdm.model.Thing}. - */ - public static final HqdmIri REFERENCES = new HqdmIri(HQDM, "references"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.RepresentationBySign} - * {@link #REPRESENTS} one or more {@link uk.gov.gchq.hqdm.model.Thing}. - */ - public static final HqdmIri REPRESENTS = new HqdmIri(HQDM, "represents"); - - /** - * A relationship type where the {@link uk.gov.gchq.hqdm.model.Thing} is represented by each - * {@link #MEMBER_OF} the {@link uk.gov.gchq.hqdm.model.RepresentationByPattern}. - */ - public static final HqdmIri REPRESENTED = new HqdmIri(HQDM, "represented"); - - /** - * A relationship type where the {@link uk.gov.gchq.hqdm.model.Classification} is of a required role - * player for the members of a {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithRestriction}. - */ - public static final HqdmIri REQUIRED_ROLE_PLAYER = new HqdmIri(HQDM, "required_role_player"); - - /** - * The roles that must be filled by members of a - * {@link uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature}. - */ - public static final HqdmIri ROLES = new HqdmIri(HQDM, "roles"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Specialization} where the - * {@link uk.gov.gchq.hqdm.model.SalesProductVersion} may be sold as a - * {@link uk.gov.gchq.hqdm.model.SalesProduct}. - */ - public static final HqdmIri SOLD_AS = new HqdmIri(HQDM, "sold_as"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Specialization} where the - * {@link uk.gov.gchq.hqdm.model.SalesProduct} is sold under a - * {@link uk.gov.gchq.hqdm.model.ProductBrand}. - */ - public static final HqdmIri SOLD_UNDER = new HqdmIri(HQDM, "sold_under"); - - /** - * A relationship type where each {@link uk.gov.gchq.hqdm.model.Specialization} has exactly one - * {@link uk.gov.gchq.hqdm.model.Class} as {@link #SUBCLASS}. - */ - public static final HqdmIri SUBCLASS = new HqdmIri(HQDM, "subclass"); - - /** - * A relationship type where a {@link uk.gov.gchq.hqdm.model.SalesProductVersion} may have exactly - * one {@link #SUCCESSOR}. - */ - public static final HqdmIri SUCCESSOR = new HqdmIri(HQDM, "successor"); - - /** - * A relationship type where each {@link uk.gov.gchq.hqdm.model.Specialization} has exactly one - * {@link uk.gov.gchq.hqdm.model.Class} as {@link #SUPERCLASS}. - */ - public static final HqdmIri SUPERCLASS = new HqdmIri(HQDM, "superclass"); - - /** - * A {@link #TEMPORAL_PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.State} may be - * a {@link #TEMPORAL_PART_OF} one or more {@link uk.gov.gchq.hqdm.model.Individual}. - * - *

- * Note: The relationship is optional because an {@link uk.gov.gchq.hqdm.model.Individual} is not - * necessarily a {@link #TEMPORAL_PART_OF} another {@link uk.gov.gchq.hqdm.model.Individual}, yet is - * a {@link #MEMBER_OF} {@link uk.gov.gchq.hqdm.model.State} as well as - * {@link uk.gov.gchq.hqdm.model.Individual}. This applies to all subtypes of - * {@link #TEMPORAL_PART_OF} that are between a {@code state_of_X} and {@code X}. - *

- */ - public static final HqdmIri TEMPORAL_PART_OF = new HqdmIri(HQDM, "temporal_part_of"); - - /** - * A {@link #TEMPORAL_PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.PeriodOfTime} - * may be a {@link #TEMPORAL_PART_OF} one or more {@link uk.gov.gchq.hqdm.model.PossibleWorld}. - */ - public static final HqdmIri TEMPORAL_PART_OF_ = new HqdmIri(HQDM, "temporal_part_of_"); - - /** - * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} - * may be a temporal part of one or more other {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent}. - */ - public static final HqdmIri TEMPORAL__PART_OF = new HqdmIri(HQDM, "temporal__part_of"); - - /** - * A {@link uk.gov.gchq.hqdm.model.Scale} may have at most one - * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure}. - * - *

- * Note 1: A {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} may apply to more than one - * {@link uk.gov.gchq.hqdm.model.Scale}. - *

- * - *

- * Note 2: A {@link uk.gov.gchq.hqdm.model.Scale} may not have a - * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure}. To have a - * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} the points on the - * {@link uk.gov.gchq.hqdm.model.Scale} must be evenly placed so that adding one means the same - * {@link uk.gov.gchq.hqdm.model.Thing}. This is not true for some - * {@link uk.gov.gchq.hqdm.model.Scale}s such as Rockwell Hardness where the points on the - * {@link uk.gov.gchq.hqdm.model.Scale} are an arbitrary distance apart. A - * {@link uk.gov.gchq.hqdm.model.Scale} will also not have a - * {@link uk.gov.gchq.hqdm.model.UnitOfMeasure} when it is a dimensionless - * {@link uk.gov.gchq.hqdm.model.Scale}. - *

- */ - public static final HqdmIri UNIT = new HqdmIri(HQDM, "unit"); - - /** - * A {@code supertype_of} relationship type where each - * {@link uk.gov.gchq.hqdm.model.PhysicalQuantityRange} must have as {@link #UPPER_BOUND} exactly - * one {@link uk.gov.gchq.hqdm.model.PhysicalQuantity}. - */ - public static final HqdmIri UPPER_BOUND = new HqdmIri(HQDM, "upper_bound"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} uses - * exactly one {@link uk.gov.gchq.hqdm.model.Scale}. - */ - public static final HqdmIri USES = new HqdmIri(HQDM, "uses"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity} - * consists of exactly one REAL as its value. - * - *

- * Note 1: The members of the data type REAL provide an - * {@link uk.gov.gchq.hqdm.model.Identification} of a real number. - *

- * - *

- * Note 2: The relationship name has been renamed from consists of by - * {@link uk.gov.gchq.hqdm.model.Class} to value. - *

- */ - public static final HqdmIri VALUE_ = new HqdmIri(HQDM, "value_"); - - /** - * A relationship type where an {@link uk.gov.gchq.hqdm.model.Aggregation} has exactly one - * {@link uk.gov.gchq.hqdm.model.SpatioTemporalExtent} as the whole. - */ - public static final HqdmIri WHOLE = new HqdmIri(HQDM, "whole"); -} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java similarity index 98% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java index 823bf329..01d229c5 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactory.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf; +package uk.gov.gchq.magmacore.hqdm.rdf; -import static uk.gov.gchq.hqdm.rdf.iri.RDFS.RDF_TYPE; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS.RDF_TYPE; import java.util.ArrayList; import java.util.HashMap; @@ -22,16 +22,16 @@ import java.util.Map; import java.util.stream.Collectors; -import uk.gov.gchq.hqdm.exception.HqdmException; -import uk.gov.gchq.hqdm.model.*; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.util.Pair; -import uk.gov.gchq.hqdm.services.ClassServices; -import uk.gov.gchq.hqdm.services.DynamicObjects; -import uk.gov.gchq.hqdm.services.RelationshipServices; -import uk.gov.gchq.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; +import uk.gov.gchq.magmacore.hqdm.model.*; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; +import uk.gov.gchq.magmacore.hqdm.services.ClassServices; +import uk.gov.gchq.magmacore.hqdm.services.DynamicObjects; +import uk.gov.gchq.magmacore.hqdm.services.RelationshipServices; +import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** * Object factory for building HQDM Java objects from RDF triples. @@ -46,7 +46,7 @@ private HqdmObjectFactory() { * * @param {@link Thing} or any of its subclasses. * @param hqdmType IRI definition of HQDM object type defined in - * {@link uk.gov.gchq.hqdm.rdf.iri.HQDM}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM}. * @param iri IRI of the object. * @return The constructed HQDM object. * @throws HqdmException If the HqdmObject could not be built. @@ -134,7 +134,7 @@ private static java.lang.Class[] irisToClasses(final List java.lang.Class[] irisToClasses(final List + * Note: This has the same meaning as, but different representation to, the + * {@link uk.gov.gchq.magmacore.hqdm.model.Aggregation} entity type. + *

+ */ + public static final HqdmIri AGGREGATED_INTO = new HqdmIri(HQDM, "aggregated_into"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.Event} that is its beginning. + */ + public static final HqdmIri BEGINNING = new HqdmIri(HQDM, "beginning"); + + /** + * A relationship type where each {@link uk.gov.gchq.magmacore.hqdm.model.Activity} is the cause of + * one or more {@link uk.gov.gchq.magmacore.hqdm.model.Event}. + */ + public static final HqdmIri CAUSES = new HqdmIri(HQDM, "causes"); + + /** + * A {@link #CAUSES} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} {@link #CAUSES} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.BeginningOfOwnership}. + */ + public static final HqdmIri CAUSES_BEGINNING = new HqdmIri(HQDM, "causes_beginning"); + + /** + * A relationship type where a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfActivity} causes a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfEvent}. + */ + public static final HqdmIri CAUSES_BY_CLASS = new HqdmIri(HQDM, "causes_by_class"); + + /** + * A {@link #CAUSES} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} {@link #CAUSES} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.EndingOfOwnership}. + */ + public static final HqdmIri CAUSES_ENDING = new HqdmIri(HQDM, "causes_ending"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual} some {@link #MEMBER_OF} which is + * offered. + */ + public static final HqdmIri CLASS_OF_OFFERED = new HqdmIri(HQDM, "class_of_offered"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Classification} has exactly + * one classifier. + */ + public static final HqdmIri CLASSIFIER = new HqdmIri(HQDM, "classifier"); + + /** + * A {@link #PART_OF} relationship type where each + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent} is {@link #PART_OF} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.System}. + */ + public static final HqdmIri COMPONENT_OF = new HqdmIri(HQDM, "component_of"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.Price} at which the + * {@link uk.gov.gchq.magmacore.hqdm.model.Offering} is made. + */ + public static final HqdmIri CONSIDERATION_BY_CLASS = new HqdmIri(HQDM, "consideration_by_class"); + + /** + * A {@link #CONSISTS_OF} relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity} may {@link #CONSISTS_OF} one or more other + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity}. + */ + public static final HqdmIri CONSISTS_OF = new HqdmIri(HQDM, "consists_of"); + + /** + * A {@link #CONSISTS_OF} relationship subtype where an entity has another {@link CONSISTS_OF} + * relationship. + */ + public static final HqdmIri CONSISTS_OF_ = new HqdmIri(HQDM, "consists_of_"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} may + * consist of one or more others. + * + *

+ * Note: This is the inverse of {@link #PART__OF}. + *

+ */ + public static final HqdmIri CONSISTS__OF = new HqdmIri(HQDM, "consists__of"); + + /** + * A relationship type where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfActivity} or + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfAssociation} has a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Role} as a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} or part. + */ + public static final HqdmIri CONSISTS_OF_BY_CLASS = new HqdmIri(HQDM, "consists_of_by_class"); + + /** + * An inverse {@link #PART__OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} one + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent} {@link #CONSISTS_OF} another + * {@link #MEMBER_OF} a {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri CONSISTS__OF_BY_CLASS = new HqdmIri(HQDM, "consists__of_by_class"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity} + * is a {@link #PARTICIPANT_IN} each {@link #MEMBER_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern}. + */ + public static final HqdmIri CONSISTS_OF_IN_MEMBERS = new HqdmIri(HQDM, "consists_of_in_members"); + + /** + * A {@link #CONSISTS_OF} relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity} or + * {@link uk.gov.gchq.magmacore.hqdm.model.Association} {@link #CONSISTS_OF} at least one (for + * Activity) or two (for Association) of {@link uk.gov.gchq.magmacore.hqdm.model.Participant}. + */ + public static final HqdmIri CONSISTS_OF_PARTICIPANT = new HqdmIri(HQDM, "consists_of_participant"); + + /** + * A {@link #CONSISTS_OF_PARTICIPANT} relationship subtype where an entity has another + * {@link #CONSISTS_OF_PARTICIPANT} relationship. + */ + public static final HqdmIri CONSISTS_OF_PARTICIPANT_ = new HqdmIri(HQDM, "consists_of_participant_"); + + /** + * A {@link #MEMBER_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.Requirement} is {@link #DEFINED_BY} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri DEFINED_BY = new HqdmIri(HQDM, "defined_by"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} may determine one + * or more {@link uk.gov.gchq.magmacore.hqdm.model.Thing} to be the case. + */ + public static final HqdmIri DETERMINES = new HqdmIri(HQDM, "determines"); + + /** + * A relationship type where a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfActivity} determines a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.Class}. + */ + public static final HqdmIri DETERMINES_BY_CLASS = new HqdmIri(HQDM, "determines_by_class"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Scale} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalQuantity} as its {@link #DOMAIN}. + */ + public static final HqdmIri DOMAIN = new HqdmIri(HQDM, "domain"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} has exactly one event that is its + * ending. + */ + public static final HqdmIri ENDING = new HqdmIri(HQDM, "ending"); + + /** + * A {@link #CONSISTS_OF_BY_CLASS} relationship type where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystem} has a {@link #MEMBER_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystemComponent} as a component. + */ + public static final HqdmIri HAS_COMPONENT_BY_CLASS = new HqdmIri(HQDM, "has_component_by_class"); + + /** + * A relationship type where each {@link #MEMBER_OF} the class is a {@link #MEMBER_OF} the + * {@link #SUPERCLASS}. + */ + public static final HqdmIri HAS_SUPERCLASS = new HqdmIri(HQDM, "has_superclass"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.FunctionalObject} has one or + * more intended {@link uk.gov.gchq.magmacore.hqdm.model.Role}(s). + */ + public static final HqdmIri INTENDED_ROLE = new HqdmIri(HQDM, "intended_role"); + + /** + * A relationship type where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalObject} is intended to play one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.Role}(s). + */ + public static final HqdmIri INTENDED_ROLE_BY_CLASS = new HqdmIri(HQDM, "intended_role_by_class"); + + /** + * A {@code subtype_of} relationship type where each + * {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification} is the {@link #INTERSECTION_OF} + * one or more {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfState}. + * + *

+ * Note: The {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification} is a subtype of each + * of the related {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfState}. + *

+ */ + public static final HqdmIri INTERSECTION_OF = new HqdmIri(HQDM, "intersection_of"); + + /** + * A meta-relationship type where the {@link uk.gov.gchq.magmacore.hqdm.model.Classification} of + * some thing in a {@link uk.gov.gchq.magmacore.hqdm.model.Role} is involved in a + * {@link uk.gov.gchq.magmacore.hqdm.model.Relationship}. + */ + public static final HqdmIri INVOLVES = new HqdmIri(HQDM, "involves"); + + /** + * A {@code supertype_of} relationship type where each + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantityRange} must have as {@link #LOWER_BOUND} + * exactly one {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity}. + */ + public static final HqdmIri LOWER_BOUND = new HqdmIri(HQDM, "lower_bound"); + + /** + * A {@code subclass_of} relationship type where when a + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProduct} {@link #MEETS_SPECIFICATION} of a + * {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification}, each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProduct} is a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri MEETS_SPECIFICATION = new HqdmIri(HQDM, "meets_specification"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Classification} has exactly + * one {@link #MEMBER}. + */ + public static final HqdmIri MEMBER = new HqdmIri(HQDM, "member"); + + /** + * A {@link #MEMBER_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} is a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri MEMBER_OF = new HqdmIri(HQDM, "member_of"); + + /** + * A {@link #MEMBER_OF} relationship subtype where an entity has another {@link MEMBER_OF} + * relationship that is less constrained in its scope. + */ + public static final HqdmIri MEMBER_OF_ = new HqdmIri(HQDM, "member_of_"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Thing} may be a member of one + * or more {@link uk.gov.gchq.magmacore.hqdm.model.Class}. + * + *

+ * Note: This relationship is the same as the entity type + * {@link uk.gov.gchq.magmacore.hqdm.model.Classification}. + *

+ */ + public static final HqdmIri MEMBER__OF = new HqdmIri(HQDM, "member__of"); + + /** + * A {@link #MEMBER_OF} relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.AmountOfMoney} may be a {@link #MEMBER_OF} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.Currency}. + */ + public static final HqdmIri MEMBER_OF_CURRENCY = new HqdmIri(HQDM, "member_of_currency"); + + /** + * A {@link #MEMBER_OF} relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual} may be a {@link #MEMBER_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfIndividual}. + */ + public static final HqdmIri MEMBER_OF_KIND = new HqdmIri(HQDM, "member_of_kind"); + + /** + * A {@link #MEMBER_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem} has a natural role that it plays. + * + *

+ * Example: My circulatory system has the natural role of circulating blood around the body. + *

+ */ + public static final HqdmIri NATURAL_ROLE = new HqdmIri(HQDM, "natural_role"); + + /** + * A relationship type where each {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalSystem} naturally participates in the + * {@link uk.gov.gchq.magmacore.hqdm.model.Role}. + */ + public static final HqdmIri NATURAL_ROLE_BY_CLASS = new HqdmIri(HQDM, "natural_role_by_class"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Offering} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.Party} who makes the + * {@link uk.gov.gchq.magmacore.hqdm.model.Offering}. + */ + public static final HqdmIri OFFEROR = new HqdmIri(HQDM, "offeror"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Aggregation} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} as the {@link #PART}. + */ + public static final HqdmIri PART = new HqdmIri(HQDM, "part"); + + /** + * A {@link #PART_OF} relationship type where one {@link uk.gov.gchq.magmacore.hqdm.model.Activity} + * may be a {@link #PART_OF} one or more others. + */ + public static final HqdmIri PART_OF = new HqdmIri(HQDM, "part_of"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a {@link #PART_OF} one + * or more {@link uk.gov.gchq.magmacore.hqdm.model.AgreementExecution}. + */ + public static final HqdmIri PART_OF_ = new HqdmIri(HQDM, "part_of_"); + + /** + * A {@link #PART_OF_BY_CLASS} where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Role} is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} in a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfActivity}. + */ + public static final HqdmIri PART_OF_BY_CLASS = new HqdmIri(HQDM, "part_of_by_class"); + + /** + * A {@link #PART_OF_BY_CLASS} relationship type where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Role} is a {@link #PART_OF} a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.Class}. + */ + public static final HqdmIri PART_OF_BY_CLASS_ = new HqdmIri(HQDM, "part_of_by_class_"); + + /** + * A {@link #PART_OF} relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Requirement} + * must be {@link #PART_OF} one or more {@link uk.gov.gchq.magmacore.hqdm.model.Plan}s. + */ + public static final HqdmIri PART_OF_PLAN = new HqdmIri(HQDM, "part_of_plan"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} may be {@link #PART_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.PossibleWorld}. + * + *

+ * Note: The relationship is optional because a + * {@link uk.gov.gchq.magmacore.hqdm.model.PossibleWorld} is not {@link #PART_OF} any other + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent}. + *

+ */ + public static final HqdmIri PART_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "part_of_possible_world"); + + /** + * An {@link #AGGREGATED_INTO} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} may be part of another and the + * whole has emergent properties and is more than just the sum of its parts. + */ + public static final HqdmIri PART__OF = new HqdmIri(HQDM, "part__of"); + + /** + * A relationship type where a {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent} is {@link #PART_OF} a + * {@link #MEMBER_OF} some {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent}. + */ + public static final HqdmIri PART__OF_BY_CLASS = new HqdmIri(HQDM, "part__of_by_class"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Participant} is a + * {@link #PARTICIPANT_IN} an {@link uk.gov.gchq.magmacore.hqdm.model.Association} or + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity}. + */ + public static final HqdmIri PARTICIPANT_IN = new HqdmIri(HQDM, "participant_in"); + + /** + * A relationship that is exactly one {@link uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime} for + * which the {@link uk.gov.gchq.magmacore.hqdm.model.Offering} is valid. + */ + public static final HqdmIri PERIOD_OFFERED = new HqdmIri(HQDM, "period_offered"); + + /** + * A {@code supertype_of} relationship type where the members of each + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty} in the + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalPropertyRange} are members of the + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalPropertyRange}. + */ + public static final HqdmIri RANGES_OVER = new HqdmIri(HQDM, "ranges_over"); + + /** + * A relationship type where a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfActivity} references a {@link #MEMBER_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.Class}. + */ + public static final HqdmIri REFERENCES_BY_CLASS = new HqdmIri(HQDM, "references_by_class"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} may reference one + * or more {@link uk.gov.gchq.magmacore.hqdm.model.Thing}. + */ + public static final HqdmIri REFERENCES = new HqdmIri(HQDM, "references"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationBySign} + * {@link #REPRESENTS} one or more {@link uk.gov.gchq.magmacore.hqdm.model.Thing}. + */ + public static final HqdmIri REPRESENTS = new HqdmIri(HQDM, "represents"); + + /** + * A relationship type where the {@link uk.gov.gchq.magmacore.hqdm.model.Thing} is represented by + * each {@link #MEMBER_OF} the {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern}. + */ + public static final HqdmIri REPRESENTED = new HqdmIri(HQDM, "represented"); + + /** + * A relationship type where the {@link uk.gov.gchq.magmacore.hqdm.model.Classification} is of a + * required role player for the members of a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithRestriction}. + */ + public static final HqdmIri REQUIRED_ROLE_PLAYER = new HqdmIri(HQDM, "required_role_player"); + + /** + * The roles that must be filled by members of a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithSignature}. + */ + public static final HqdmIri ROLES = new HqdmIri(HQDM, "roles"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Specialization} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProductVersion} may be sold as a + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProduct}. + */ + public static final HqdmIri SOLD_AS = new HqdmIri(HQDM, "sold_as"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Specialization} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProduct} is sold under a + * {@link uk.gov.gchq.magmacore.hqdm.model.ProductBrand}. + */ + public static final HqdmIri SOLD_UNDER = new HqdmIri(HQDM, "sold_under"); + + /** + * A relationship type where each {@link uk.gov.gchq.magmacore.hqdm.model.Specialization} has + * exactly one {@link uk.gov.gchq.magmacore.hqdm.model.Class} as {@link #SUBCLASS}. + */ + public static final HqdmIri SUBCLASS = new HqdmIri(HQDM, "subclass"); + + /** + * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.SalesProductVersion} may have + * exactly one {@link #SUCCESSOR}. + */ + public static final HqdmIri SUCCESSOR = new HqdmIri(HQDM, "successor"); + + /** + * A relationship type where each {@link uk.gov.gchq.magmacore.hqdm.model.Specialization} has + * exactly one {@link uk.gov.gchq.magmacore.hqdm.model.Class} as {@link #SUPERCLASS}. + */ + public static final HqdmIri SUPERCLASS = new HqdmIri(HQDM, "superclass"); + + /** + * A {@link #TEMPORAL_PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a {@link #TEMPORAL_PART_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual}. + * + *

+ * Note: The relationship is optional because an {@link uk.gov.gchq.magmacore.hqdm.model.Individual} + * is not necessarily a {@link #TEMPORAL_PART_OF} another + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual}, yet is a {@link #MEMBER_OF} + * {@link uk.gov.gchq.magmacore.hqdm.model.State} as well as + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual}. This applies to all subtypes of + * {@link #TEMPORAL_PART_OF} that are between a {@code state_of_X} and {@code X}. + *

+ */ + public static final HqdmIri TEMPORAL_PART_OF = new HqdmIri(HQDM, "temporal_part_of"); + + /** + * A {@link #TEMPORAL_PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime} may be a {@link #TEMPORAL_PART_OF} one or + * more {@link uk.gov.gchq.magmacore.hqdm.model.PossibleWorld}. + */ + public static final HqdmIri TEMPORAL_PART_OF_ = new HqdmIri(HQDM, "temporal_part_of_"); + + /** + * A {@link #PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} may be a temporal part of one or + * more other {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent}. + */ + public static final HqdmIri TEMPORAL__PART_OF = new HqdmIri(HQDM, "temporal__part_of"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Scale} may have at most one + * {@link uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure}. + * + *

+ * Note 1: A {@link uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure} may apply to more than one + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale}. + *

+ * + *

+ * Note 2: A {@link uk.gov.gchq.magmacore.hqdm.model.Scale} may not have a + * {@link uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure}. To have a + * {@link uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure} the points on the + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale} must be evenly placed so that adding one means the + * same {@link uk.gov.gchq.magmacore.hqdm.model.Thing}. This is not true for some + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale}s such as Rockwell Hardness where the points on the + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale} are an arbitrary distance apart. A + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale} will also not have a + * {@link uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure} when it is a dimensionless + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale}. + *

+ */ + public static final HqdmIri UNIT = new HqdmIri(HQDM, "unit"); + + /** + * A {@code supertype_of} relationship type where each + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantityRange} must have as {@link #UPPER_BOUND} + * exactly one {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity}. + */ + public static final HqdmIri UPPER_BOUND = new HqdmIri(HQDM, "upper_bound"); + + /** + * A relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.IdentificationOfPhysicalQuantity} uses exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.Scale}. + */ + public static final HqdmIri USES = new HqdmIri(HQDM, "uses"); + + /** + * A relationship type where an + * {@link uk.gov.gchq.magmacore.hqdm.model.IdentificationOfPhysicalQuantity} consists of exactly one + * REAL as its value. + * + *

+ * Note 1: The members of the data type REAL provide an + * {@link uk.gov.gchq.magmacore.hqdm.model.Identification} of a real number. + *

+ * + *

+ * Note 2: The relationship name has been renamed from consists of by + * {@link uk.gov.gchq.magmacore.hqdm.model.Class} to value. + *

+ */ + public static final HqdmIri VALUE_ = new HqdmIri(HQDM, "value_"); + + /** + * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Aggregation} has exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} as the whole. + */ + public static final HqdmIri WHOLE = new HqdmIri(HQDM, "whole"); +} diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HqdmIri.java similarity index 92% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HqdmIri.java index 80ced58c..21251e17 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/HqdmIri.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HqdmIri.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; -import uk.gov.gchq.hqdm.rdf.exception.IriException; +import uk.gov.gchq.magmacore.hqdm.rdf.exception.IriException; /** * An implementation of Internationalized Resource Identifiers for defining HQDM entities and diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IRI.java similarity index 96% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IRI.java index 547345b4..0cb02756 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IRI.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IRI.java @@ -12,13 +12,13 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; import java.net.MalformedURLException; import java.net.URL; import java.util.Objects; -import uk.gov.gchq.hqdm.rdf.exception.IriException; +import uk.gov.gchq.magmacore.hqdm.rdf.exception.IriException; /** * An implementation of Internationalized Resource Identifiers. diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriBase.java similarity index 98% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriBase.java index 1a34d8df..2a0efb7a 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/IriBase.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriBase.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; import java.util.Objects; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/RDFS.java similarity index 98% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/RDFS.java index 8ecb42a0..b58524a9 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/RDFS.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/RDFS.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; /** * RDF Schema IRI definitions. diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/package-info.java similarity index 94% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/package-info.java index d568aa4e..82c164af 100644 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/iri/package-info.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/package-info.java @@ -16,4 +16,4 @@ * Classes for constructing and using Internationalized Resource Identifiers (IRIs) with HQDM * objects. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/package-info.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/package-info.java index 24bdc0db..92979283 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/package-info.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/package-info.java @@ -15,4 +15,4 @@ /** * Classes for constructing HQDM entities as Java objects. */ -package uk.gov.gchq.hqdm.pojo; +package uk.gov.gchq.magmacore.hqdm.rdf; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Pair.java similarity index 97% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Pair.java index 820283d3..34c98dba 100644 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Pair.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Pair.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.util; +package uk.gov.gchq.magmacore.hqdm.rdf.util; /** * A utility Pair with Left (L) and Right (R) values. L the type of the Left element. R the type of diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Triples.java similarity index 95% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Triples.java index c1e6495d..9e16e445 100755 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/Triples.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Triples.java @@ -12,13 +12,13 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.util; +package uk.gov.gchq.magmacore.hqdm.rdf.util; import java.util.regex.Pattern; import java.util.stream.Collectors; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; /** * Convert Things to Triple strings. diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/package-info.java similarity index 93% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java rename to hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/package-info.java index bec31c22..38229bfa 100644 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/util/package-info.java +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/package-info.java @@ -15,4 +15,4 @@ /** * Utility classes for hqdm-rdf. */ -package uk.gov.gchq.hqdm.rdf.util; +package uk.gov.gchq.magmacore.hqdm.rdf.util; diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java similarity index 88% rename from hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java rename to hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java index 1f6ae385..a38cbd00 100644 --- a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/HqdmObjectFactoryTest.java +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf; +package uk.gov.gchq.magmacore.hqdm.rdf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -23,14 +23,15 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.exception.HqdmException; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.HqdmIri; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; -import uk.gov.gchq.hqdm.rdf.util.Pair; +import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; +import uk.gov.gchq.magmacore.hqdm.model.Participant; +import uk.gov.gchq.magmacore.hqdm.model.Person; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; /** * Tests for the {@link HqdmObjectFactory}. diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriTest.java similarity index 84% rename from hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java rename to hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriTest.java index a4a92174..2abaa2b5 100644 --- a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/iri/IriTest.java +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriTest.java @@ -12,14 +12,17 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.iri; +package uk.gov.gchq.magmacore.hqdm.rdf.iri; import static org.junit.Assert.assertEquals; import org.junit.Test; -import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.exception.IriException; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.exception.IriException; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; /** * Tests for the {@link HqdmObjectFactory}. diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/util/TriplesTest.java similarity index 87% rename from hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java rename to hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/util/TriplesTest.java index 3253d41e..c009b899 100644 --- a/hqdm-rdf/src/test/java/uk/gov/gchq/hqdm/rdf/util/TriplesTest.java +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/util/TriplesTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.rdf.util; +package uk.gov.gchq.magmacore.hqdm.rdf.util; import static org.junit.Assert.assertEquals; @@ -20,10 +20,12 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.rdf.HqdmObjectFactory; -import uk.gov.gchq.hqdm.rdf.iri.HQDM; -import uk.gov.gchq.hqdm.rdf.iri.IRI; -import uk.gov.gchq.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.HqdmObjectFactory; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Pair; +import uk.gov.gchq.magmacore.hqdm.rdf.util.Triples; /** * Tests for the {@link Triples} class. diff --git a/hqdm/src/main/java/module-info.java b/hqdm/src/main/java/module-info.java index 7697da41..bd6f9a47 100644 --- a/hqdm/src/main/java/module-info.java +++ b/hqdm/src/main/java/module-info.java @@ -15,8 +15,8 @@ /** * Classes for constructing HQDM objects in java. */ -module uk.gov.gchq.hqdm { - exports uk.gov.gchq.hqdm.exception; - exports uk.gov.gchq.hqdm.model; - exports uk.gov.gchq.hqdm.services; +module uk.gov.gchq.magmacore.hqdm { + exports uk.gov.gchq.magmacore.hqdm.exception; + exports uk.gov.gchq.magmacore.hqdm.model; + exports uk.gov.gchq.magmacore.hqdm.services; } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/HqdmException.java similarity index 98% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/HqdmException.java index 9db6ebb0..e3b5dc08 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/HqdmException.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/HqdmException.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.exception; +package uk.gov.gchq.magmacore.hqdm.exception; /** * Superclass of exceptions arising from HQDM code. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/package-info.java similarity index 93% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/package-info.java index 919ba098..eb1d8dc6 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/exception/package-info.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/package-info.java @@ -15,4 +15,4 @@ /** * Exceptions arising from HQDM code. */ -package uk.gov.gchq.hqdm.exception; +package uk.gov.gchq.magmacore.hqdm.exception; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AbstractObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AbstractObject.java index ea7ee1cd..6c712ac1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AbstractObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AbstractObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Thing} that does not exist in space or time. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOffer.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOffer.java index 43794bbe..1aa09b44 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOffer.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOffer.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} that is the acceptance of an {@link Offer} as diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOfferForGoods.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOfferForGoods.java index 500870c3..e74ebfbb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AcceptanceOfOfferForGoods.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOfferForGoods.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ReachingAgreement} that consists of one or more {@link Offer}s of a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Activity.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Activity.java index 9b97f190..46e15bf4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Activity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Activity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Individual} that consists of its {@link Participant}s and causes some {@link Event}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Aggregation.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Aggregation.java index 91ba98da..94c37f0b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Aggregation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Aggregation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Relationship} where the whole is at least the sum of the parts. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreeContract.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreeContract.java index ad159058..52b3b840 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreeContract.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreeContract.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ReachingAgreement} that consists of an {@link Offer} of some {@link Thing} in exchange diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementExecution.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementExecution.java index 7b495ed9..22e84ed8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementExecution.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementExecution.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} where two or more parties carry out a course of action diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementProcess.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementProcess.java index ee630647..9c8371b8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AgreementProcess.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementProcess.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} that consists of a {@link ReachingAgreement} and an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AmountOfMoney.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AmountOfMoney.java index 87610bc0..355daa54 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/AmountOfMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AmountOfMoney.java @@ -12,14 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfAmountOfMoney}, that is also a {@link SociallyConstructedObject}, and a * {@link PhysicalObject} that is intended and accepted for use as a means of exchange. */ -public interface AmountOfMoney extends - StateOfAmountOfMoney, - SociallyConstructedObject, - PhysicalObject { +public interface AmountOfMoney extends StateOfAmountOfMoney, SociallyConstructedObject, PhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Asset.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Asset.java index 4206d6fd..ff7176b3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Asset.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Asset.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPhysicalObject} that is also a {@link Participant} that is the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Association.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Association.java index afd1f932..ab87d785 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Association.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Association.java @@ -12,14 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Individual} that {@code consists_of} the {@link Participant}s that are associated, and * where the {@link Participant}s are {@code part_of} the same {@link PeriodOfTime}. */ -public interface Association extends - Individual, - StateOfAssociation, - ParticipantInActivityOrAssociation { +public interface Association extends Individual, StateOfAssociation, ParticipantInActivityOrAssociation { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BeginningOfOwnership.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BeginningOfOwnership.java index 8ab7bec8..7752faf2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BeginningOfOwnership.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BeginningOfOwnership.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Event} that is the {@code beginning} of an {@link Ownership}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalObject.java index 2cb45c05..bb5beef4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalObject.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfBiologicalObject} that is also a {@link PhysicalObject} that sustains itself and * reproduces. */ -public interface BiologicalObject extends - StateOfBiologicalObject, - PhysicalObject { +public interface BiologicalObject extends StateOfBiologicalObject, PhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystem.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystem.java index f2fe6a7c..e1b207f2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystem.java @@ -12,14 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link System} that is also an {@link OrdinaryBiologicalObject} and a * {@link StateOfBiologicalSystem}. */ -public interface BiologicalSystem extends - OrdinaryBiologicalObject, - StateOfBiologicalSystem, - System { +public interface BiologicalSystem extends OrdinaryBiologicalObject, StateOfBiologicalSystem, System { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystemComponent.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystemComponent.java index 8da9fee6..3003961c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/BiologicalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystemComponent.java @@ -12,14 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link BiologicalObject}, {@link StateOfBiologicalSystemComponent} and {@link SystemComponent} * that is any {@link BiologicalObject} that is also a {@link SystemComponent}. */ -public interface BiologicalSystemComponent extends - BiologicalObject, - StateOfBiologicalSystemComponent, - SystemComponent { +public interface BiologicalSystemComponent extends BiologicalObject, StateOfBiologicalSystemComponent, SystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Class.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Class.java index af61c5bf..d2c07290 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Class.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Class.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AbstractObject} that has members and whose identity is defined by its membership. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAbstractObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAbstractObject.java index fdb96452..ddd60194 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAbstractObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAbstractObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Class} that is {@link AbstractObject} or any its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfActivity.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfActivity.java index 24168781..20b74c5e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIndividual} and a {@link ClassOfStateOfActivity} that is {@link Activity} or any diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreeContract.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreeContract.java index bddd2c3b..166017b3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreeContract.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreeContract.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfReachingAgreement} that is {@link AgreeContract} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementExecution.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementExecution.java index 537c3975..e61ac76f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementExecution.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementExecution.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedActivity} that is {@link AgreementExecution} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementProcess.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementProcess.java index 4327214a..da95264a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAgreementProcess.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementProcess.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedActivity} that is {@link AgreementProcess} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAmountOfMoney.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAmountOfMoney.java index 6bd0821d..aad8f3d4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAmountOfMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAmountOfMoney.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfAmountOfMoney}, that is also a {@link ClassOfSociallyConstructedObject}, * and a {@link ClassOfPhysicalObject} that is {@link AmountOfMoney} or any of its subsets. */ public interface ClassOfAmountOfMoney - extends ClassOfStateOfAmountOfMoney, ClassOfSociallyConstructedObject, ClassOfPhysicalObject { + extends ClassOfStateOfAmountOfMoney, ClassOfSociallyConstructedObject, ClassOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAssociation.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAssociation.java index 8c25959b..dccaa858 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfAssociation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAssociation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfAssociation} that is also a {@link ClassOfIndividual} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalObject.java index 124f63c1..39ab7883 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalObject} and {@link ClassOfPhysicalObject} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystem.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystem.java index b76639dd..3fc449dc 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystem.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalSystem}, {@link ClassOfOrdinaryBiologicalObject}, and * {@link ClassOfSystem} that is {@link BiologicalSystem} or any of its subsets. */ public interface ClassOfBiologicalSystem - extends ClassOfStateOfBiologicalSystem, ClassOfOrdinaryBiologicalObject, ClassOfSystem { + extends ClassOfStateOfBiologicalSystem, ClassOfOrdinaryBiologicalObject, ClassOfSystem { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystemComponent.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystemComponent.java index f72ad8f8..f28b478a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfBiologicalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystemComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalObject}, {@link ClassOfStateOfBiologicalSystemComponent}, and * {@link ClassOfSystemComponent} that is {@link BiologicalSystemComponent} or any of its subsets. */ public interface ClassOfBiologicalSystemComponent - extends ClassOfBiologicalObject, ClassOfStateOfBiologicalSystemComponent, ClassOfSystemComponent { + extends ClassOfBiologicalObject, ClassOfStateOfBiologicalSystemComponent, ClassOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClass.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClass.java index 62cdb1c1..25c04057 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClass.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClass.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Class} that is {@link Class} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java index 32244edd..a70f4188 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfClass} that is {@link ClassOfSpatioTemporalExtent} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractExecution.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractExecution.java index 14b9a49f..9af60f6c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractExecution.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractExecution.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfAgreementExecution} that is {@link ContractExecution} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractProcess.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractProcess.java index a1d4a9e6..e16cea42 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfContractProcess.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractProcess.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfAgreementProcess} that is {@link ContractProcess} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfEvent.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfEvent.java index 5317c54e..c1c39301 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfEvent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfEvent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSpatioTemporalExtent} that is {@link Event} or any of its possible subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalObject.java index 9b239482..90631587 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalObject.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPhysicalObject}, {@link ClassOfIntentionallyConstructedObject}, and * {@link ClassOfStateOfFunctionalObject} that is {@link FunctionalObject} or any of its subsets. */ public interface ClassOfFunctionalObject - extends ClassOfPhysicalObject, ClassOfIntentionallyConstructedObject, ClassOfStateOfFunctionalObject { + extends ClassOfPhysicalObject, ClassOfIntentionallyConstructedObject, ClassOfStateOfFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystem.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystem.java index ef55e298..905b9004 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystem.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfFunctionalSystem}, that is also a {@link ClassOfOrdinaryFunctionalObject}, * and a {@link ClassOfSystem} that is {@link FunctionalSystem} or any of its subsets. */ public interface ClassOfFunctionalSystem - extends ClassOfStateOfFunctionalSystem, ClassOfOrdinaryFunctionalObject, ClassOfSystem { + extends ClassOfStateOfFunctionalSystem, ClassOfOrdinaryFunctionalObject, ClassOfSystem { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystemComponent.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystemComponent.java index 70ea8f6a..16a65025 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystemComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfFunctionalSystemComponent}, and {@link ClassOfSystemComponent} that is * {@link FunctionalSystemComponent} and any of its subsets. */ public interface ClassOfFunctionalSystemComponent - extends ClassOfStateOfFunctionalSystemComponent, ClassOfSystemComponent { + extends ClassOfStateOfFunctionalSystemComponent, ClassOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInPlaceBiologicalComponent.java similarity index 88% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInPlaceBiologicalComponent.java index 5982e81b..fc8cf493 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInPlaceBiologicalComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInPlaceBiologicalComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalSystemComponent}, that is also a @@ -20,5 +20,5 @@ * {@link InPlaceBiologicalComponent} or any of its subsets. */ public interface ClassOfInPlaceBiologicalComponent extends ClassOfStateOfBiologicalSystemComponent, - ClassOfStateOfOrdinaryBiologicalObject, ClassOfInstalledObject { + ClassOfStateOfOrdinaryBiologicalObject, ClassOfInstalledObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIndividual.java similarity index 96% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIndividual.java index 0b3f3fab..c2f18246 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIndividual.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIndividual.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link Individual} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java similarity index 87% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java index 0d7d4ae6..7800d085 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfFunctionalSystemComponent} that is also a {@link ClassOfInstalledObject} * that is {@link InstalledFunctionalSystemComponent} and any of its subsets. */ public interface ClassOfInstalledFunctionalSystemComponent - extends ClassOfStateOfFunctionalSystemComponent, ClassOfInstalledObject { + extends ClassOfStateOfFunctionalSystemComponent, ClassOfInstalledObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledObject.java index dd4a092f..86ddb1e7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfInstalledObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSystemComponent} that is also a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIntentionallyConstructedObject.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIntentionallyConstructedObject.java index 448182e1..f911c472 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfIntentionallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIntentionallyConstructedObject.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIndividual} that is also a {@link ClassOfStateOfIntentionallyConstructedObject} * that is {@link IntentionallyConstructedObject} or any of its subsets. */ public interface ClassOfIntentionallyConstructedObject - extends ClassOfIndividual, ClassOfStateOfIntentionallyConstructedObject { + extends ClassOfIndividual, ClassOfStateOfIntentionallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOffer.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOffer.java index 180c5fc4..10af9ea5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOffer.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOffer.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedActivity} that is {@link Offer} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryBiologicalObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryBiologicalObject.java index 1c420431..38e394c8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalObject}, {@link ClassOfOrdinaryPhysicalObject} and @@ -20,5 +20,5 @@ * its subsets. */ public interface ClassOfOrdinaryBiologicalObject - extends ClassOfBiologicalObject, ClassOfStateOfOrdinaryBiologicalObject, ClassOfOrdinaryPhysicalObject { + extends ClassOfBiologicalObject, ClassOfStateOfOrdinaryBiologicalObject, ClassOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryFunctionalObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryFunctionalObject.java index beda39e6..57fdf6a5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryFunctionalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryFunctionalObject}, that is also a {@link ClassOfFunctionalObject}, @@ -20,5 +20,5 @@ * its subsets. */ public interface ClassOfOrdinaryFunctionalObject - extends ClassOfStateOfOrdinaryFunctionalObject, ClassOfFunctionalObject, ClassOfOrdinaryPhysicalObject { + extends ClassOfStateOfOrdinaryFunctionalObject, ClassOfFunctionalObject, ClassOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryPhysicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryPhysicalObject.java index b23794a8..0551ed71 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrdinaryPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryPhysicalObject} that is also a {@link ClassOfPhysicalObject} that diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganization.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganization.java index 492358db..854ce3d9 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganization.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrganization}, that is also a {@link ClassOfSociallyConstructedObject}, * and a {@link ClassOfParty} that is {@link Organization} or any of its subsets. */ public interface ClassOfOrganization - extends ClassOfStateOfOrganization, ClassOfSociallyConstructedObject, ClassOfParty { + extends ClassOfStateOfOrganization, ClassOfSociallyConstructedObject, ClassOfParty { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganizationComponent.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganizationComponent.java index a367467c..e9561f27 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfOrganizationComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganizationComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrganizationComponent}, that is also a {@link ClassOfSystemComponent}, and @@ -20,5 +20,5 @@ * subsets. */ public interface ClassOfOrganizationComponent - extends ClassOfStateOfOrganizationComponent, ClassOfSystemComponent, ClassOfSociallyConstructedObject { + extends ClassOfStateOfOrganizationComponent, ClassOfSystemComponent, ClassOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParticipant.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParticipant.java index 0cbcd345..c4cc4f03 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParticipant.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParticipant.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPhysicalObject} that is {@link Participant} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParty.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParty.java index 3ed12dc6..38ad9319 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfParty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSystem} that is {@link Party} or any of its subtypes. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPeriodOfTime.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPeriodOfTime.java index 76dc170f..a1dbd984 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPeriodOfTime.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPeriodOfTime.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link PeriodOfTime} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPerson.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPerson.java index b3255004..1deee0f9 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPerson.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPerson.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalSystem}, {@link ClassOfStateOfPerson} and {@link ClassOfParty} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPersonInPosition.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPersonInPosition.java index dfa72855..8b3ad676 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPersonInPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPersonInPosition.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfInstalledObject} that is also a {@link ClassOfStateOfPosition} that is * {@link PersonInPosition} or any of its subsets. */ -public interface ClassOfPersonInPosition extends - ClassOfInstalledObject, - ClassOfStateOfPosition { +public interface ClassOfPersonInPosition extends ClassOfInstalledObject, ClassOfStateOfPosition { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java index 27c4cdd7..fdde388a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIndividual} and a {@link ClassOfStateOfPhysicalObject} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalProperty.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalProperty.java index 9b763ac6..8e0b1913 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalProperty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalProperty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfClassOfSpatioTemporalExtent} that is {@link PhysicalProperty} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalQuantity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalQuantity.java index 856840c8..797d53a2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPhysicalQuantity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalQuantity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPhysicalProperty} that is {@link PhysicalQuantity} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPointInTime.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPointInTime.java index 8baae101..c8215441 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPointInTime.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPointInTime.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfEvent} that is {@link PointInTime} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPosition.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPosition.java index 92827e00..8ba9388a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPosition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPosition} that is also a {@link ClassOfOrganizationComponent} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPossibleWorld.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPossibleWorld.java index 4588494c..e414a8ff 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfPossibleWorld.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPossibleWorld.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIndividual} that is also a {@link ClassOfPeriodOfTime} that is * {@link PossibleWorld} or any of its subsets. */ -public interface ClassOfPossibleWorld extends - ClassOfIndividual, - ClassOfPeriodOfTime { +public interface ClassOfPossibleWorld extends ClassOfIndividual, ClassOfPeriodOfTime { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfReachingAgreement.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfReachingAgreement.java index c58603d6..03b545e4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfReachingAgreement.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfReachingAgreement.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedActivity} that is {@link ReachingAgreement} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRelationship.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRelationship.java index 5aefa94e..bfbff48e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRelationship.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRelationship.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Class} that is {@link Relationship} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRepresentation.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRepresentation.java index 528fabde..30cc6e19 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfRepresentation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRepresentation.java @@ -12,11 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** - * A {@link ClassOfAssociation} that is {@link ClassOfRepresentation} or any of - * its subsets. This is omitted, in error, in the original HQDM documentation. + * A {@link ClassOfAssociation} that is {@link ClassOfRepresentation} or any of its subsets. This is + * omitted, in error, in the original HQDM documentation. */ public interface ClassOfRepresentation extends ClassOfAssociation { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSalesProductInstance.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSalesProductInstance.java index f471bbc0..378483f3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSalesProductInstance.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSalesProductInstance.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSalesProductInstance} that is also a @@ -20,5 +20,5 @@ * subsets. */ public interface ClassOfSalesProductInstance - extends ClassOfStateOfSalesProductInstance, ClassOfOrdinaryFunctionalObject { + extends ClassOfStateOfSalesProductInstance, ClassOfOrdinaryFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSign.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSign.java index f02cf5c1..534999d4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSign.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSign.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSign} that is also a {@link ClassOfSociallyConstructedObject} that is * {@link Sign} or any of its subsets. */ -public interface ClassOfSign extends - ClassOfStateOfSign, - ClassOfSociallyConstructedObject { +public interface ClassOfSign extends ClassOfStateOfSign, ClassOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedActivity.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedActivity.java index 9afff60a..8d728481 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedObject} and {@link ClassOfActivity} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedObject.java index 2e42473a..54f4b00b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSociallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedObject.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIntentionallyConstructedObject} that is {@link SociallyConstructedObject} or any * of its subsets. */ public interface ClassOfSociallyConstructedObject - extends ClassOfIntentionallyConstructedObject, ClassOfStateOfSociallyConstructedObject { + extends ClassOfIntentionallyConstructedObject, ClassOfStateOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSpatioTemporalExtent.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSpatioTemporalExtent.java index 9fc95e80..1835a088 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSpatioTemporalExtent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSpatioTemporalExtent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Class} that is {@link SpatioTemporalExtent} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfState.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfState.java index bc25605c..ccb165ec 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfState.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfState.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSpatioTemporalExtent} that is {@link State} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfActivity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfActivity.java index 6047c559..be7c8532 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link StateOfActivity} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.java similarity index 80% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.java index 386418e7..71546716 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAmountOfMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.java @@ -12,13 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSociallyConstructedObject} that is also a * {@link ClassOfStateOfPhysicalObject} that is {@link StateOfAmountOfMoney} or one of its subsets. */ -public interface ClassOfStateOfAmountOfMoney extends - ClassOfStateOfSociallyConstructedObject, - ClassOfStateOfPhysicalObject { +public interface ClassOfStateOfAmountOfMoney + extends ClassOfStateOfSociallyConstructedObject, ClassOfStateOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAssociation.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAssociation.java index 72dfc5be..4f7372fa 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfAssociation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAssociation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link StateOfAssociation} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalObject.java index a4b31a6a..1b60626c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfBiologicalObject} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystem.java index e7c44606..82da29fa 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryBiologicalObject} and {@link ClassOfStateOfSystem} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java similarity index 87% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java index c628d9b5..b8b4855b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalObject} and {@link ClassOfStateOfSystemComponent} that is * {@link StateOfBiologicalSystemComponent} or any of its subsets. */ public interface ClassOfStateOfBiologicalSystemComponent - extends ClassOfStateOfBiologicalObject, ClassOfStateOfSystemComponent { + extends ClassOfStateOfBiologicalObject, ClassOfStateOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.java similarity index 80% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.java index a4f518c6..5fa864cf 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.java @@ -12,13 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPhysicalObject} and {@link ClassOfStateOfIntentionallyConstructedObject} * that is {@link StateOfFunctionalObject} or any of its subsets. */ -public interface ClassOfStateOfFunctionalObject extends - ClassOfStateOfPhysicalObject, - ClassOfStateOfIntentionallyConstructedObject { +public interface ClassOfStateOfFunctionalObject + extends ClassOfStateOfPhysicalObject, ClassOfStateOfIntentionallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystem.java index 963ff8de..b53a6a8a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryFunctionalObject} that is also a {@link ClassOfStateOfSystem} that diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java similarity index 62% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java index b1e4f091..44d8f1ef 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java @@ -12,14 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** - * A {@link ClassOfStateOfFunctionalObject} that is also a - * {@link ClassOfStateOfSystemComponent} that is {@link ClassOfStateOfFunctionalSystemComponent} - * or any of its subsets. + * A {@link ClassOfStateOfFunctionalObject} that is also a {@link ClassOfStateOfSystemComponent} + * that is {@link ClassOfStateOfFunctionalSystemComponent} or any of its subsets. */ -public interface ClassOfStateOfFunctionalSystemComponent extends - ClassOfStateOfFunctionalObject, - ClassOfStateOfSystemComponent { +public interface ClassOfStateOfFunctionalSystemComponent + extends ClassOfStateOfFunctionalObject, ClassOfStateOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java index e1a04ce6..5df0224b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link StateOfIntentionallyConstructedObject} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java index 0dfce824..40bcf528 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalObject} that is also a @@ -20,5 +20,5 @@ * any of its subsets. */ public interface ClassOfStateOfOrdinaryBiologicalObject - extends ClassOfStateOfBiologicalObject, ClassOfStateOfOrdinaryPhysicalObject { + extends ClassOfStateOfBiologicalObject, ClassOfStateOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java similarity index 80% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java index 86886960..8f742700 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java @@ -12,14 +12,13 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfFunctionalObject} that is also a * {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link StateOfOrdinaryFunctionalObject} or * any of its subsets. */ -public interface ClassOfStateOfOrdinaryFunctionalObject extends - ClassOfStateOfFunctionalObject, - ClassOfStateOfOrdinaryPhysicalObject { +public interface ClassOfStateOfOrdinaryFunctionalObject + extends ClassOfStateOfFunctionalObject, ClassOfStateOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java index 9fd8d338..77d60b68 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfOrdinaryPhysicalObject} or any of diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganization.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganization.java index d41b4cf9..5a1ef6c1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganization.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSociallyConstructedObject} that is also a {@link ClassOfStateOfParty} that * is {@link StateOfOrganization} or any of its subsets. */ -public interface ClassOfStateOfOrganization extends - ClassOfStateOfSociallyConstructedObject, - ClassOfStateOfParty { +public interface ClassOfStateOfOrganization extends ClassOfStateOfSociallyConstructedObject, ClassOfStateOfParty { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.java similarity index 80% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.java index ec397cfa..69d86759 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfOrganizationComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.java @@ -12,14 +12,13 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSystemComponent} that is also a * {@link ClassOfStateOfSociallyConstructedObject} that is {@link StateOfOrganizationComponent} or * any of its subsets. */ -public interface ClassOfStateOfOrganizationComponent extends - ClassOfStateOfSystemComponent, - ClassOfStateOfSociallyConstructedObject { +public interface ClassOfStateOfOrganizationComponent + extends ClassOfStateOfSystemComponent, ClassOfStateOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfParty.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfParty.java index 8c258d1f..59f3ee75 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfParty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfParty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSystem} that is {@link StateOfParty} or any of its subtypes. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPerson.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPerson.java index 440d6676..377a32d2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPerson.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPerson.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfBiologicalSystem} and {@link ClassOfStateOfParty} that is * {@link StateOfPerson} or any of its subsets. */ -public interface ClassOfStateOfPerson extends - ClassOfStateOfBiologicalSystem, - ClassOfStateOfParty { +public interface ClassOfStateOfPerson extends ClassOfStateOfBiologicalSystem, ClassOfStateOfParty { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPhysicalObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPhysicalObject.java index 75addda2..c952b735 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is {@link StateOfPhysicalObject} or any of its subsets. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPosition.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPosition.java index 80e1248b..8db6253b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPosition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrganizationComponent} that is {@link StateOfPosition} and any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSalesProductInstance.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSalesProductInstance.java index 61c4b351..1add7f07 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSalesProductInstance.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSalesProductInstance.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryFunctionalObject} that is {@link StateOfSalesProductInstance} or diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSign.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSign.java index a9dcc463..21476bcd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSign.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSign.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSociallyConstructedObject} that is {@link StateOfSign} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java index 2786c096..d73579e4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSociallyConstructedObject} that is * {@link StateOfSociallyConstructedObject} or any of its subsets. */ public interface ClassOfStateOfSociallyConstructedActivity - extends ClassOfStateOfSociallyConstructedObject, ClassOfStateOfActivity { + extends ClassOfStateOfSociallyConstructedObject, ClassOfStateOfActivity { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedObject.java index 0fa95bfe..eb730934 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSociallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfIntentionallyConstructedObject} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystem.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystem.java index 236f2d0e..fd80066d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfOrdinaryPhysicalObject} that is {@link StateOfSystem} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystemComponent.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystemComponent.java index 52da99c0..610e3d64 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfStateOfSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfPhysicalObject} that is {@link StateOfSystemComponent} or any of its diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystem.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystem.java index 9962a72a..5912d53c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystem.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSystem} that is also a {@link ClassOfOrdinaryPhysicalObject} that is * {@link System} or any of its subsets. */ -public interface ClassOfSystem extends - ClassOfStateOfSystem, - ClassOfOrdinaryPhysicalObject { +public interface ClassOfSystem extends ClassOfStateOfSystem, ClassOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystemComponent.java index 90eb4a29..9ae62d8a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ClassOfSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfStateOfSystemComponent} that is also a {@link ClassOfPhysicalObject} that is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Classification.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Classification.java index cc921790..3e5f4a00 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Classification.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Classification.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Relationship} where a {@link Thing} is a member of a class{@link Class}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Composition.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Composition.java index b438643a..4605f251 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Composition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Composition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Aggregation} where the {@code whole} is an arrangement of the parts that results in diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractExecution.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractExecution.java index ffa21cab..cbd18fc6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractExecution.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractExecution.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AgreementExecution} that is the provision of some {@link Thing} in exchange for some diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractProcess.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractProcess.java index 520d0ccd..c9006329 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ContractProcess.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractProcess.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AgreementProcess} that consists of an {@link AgreeContract} and a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Currency.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Currency.java index 4231fe8a..0f32a556 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Currency.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Currency.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfAmountOfMoney} that is the subset of {@link AmountOfMoney} that has as members diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/DefinedRelationship.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/DefinedRelationship.java index 4b972a9b..0317e816 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/DefinedRelationship.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/DefinedRelationship.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Relationship} that is defined by a {@link KindOfRelationshipWithSignature}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Definition.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Definition.java index 44de31b8..a23ea88b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Definition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Definition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link RepresentationByPattern} that defines a {@link Class}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Description.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Description.java index c1c69fd8..ac800731 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Description.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Description.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link RepresentationByPattern} that describes some {@link Thing}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employee.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employee.java index b6704845..f0183043 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employee.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employee.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPerson} that is a {@code participant_in} an {@link Employment}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employer.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employer.java index 4c06b5da..3544bf5b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employer.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employer.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} that is a {@code participant_in} an {@link Employment}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employment.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employment.java index 8f1c76d1..c65a76c6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Employment.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employment.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Association} that consists of an {@link Employer} and an {@link Employee} where the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EndingOfOwnership.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EndingOfOwnership.java index 49fe17e9..091d9a86 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EndingOfOwnership.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EndingOfOwnership.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Event} that is the {@code ending} of an {@link Ownership}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EnumeratedClass.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EnumeratedClass.java index 0ea41b30..ec818a8a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/EnumeratedClass.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EnumeratedClass.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Class} where each {@code member__of} the {@link Class} is known. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Event.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Event.java index db25bb0a..a88e244f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Event.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Event.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SpatioTemporalExtent} that has zero temporal thickness and may bound some diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ExchangeOfGoodsAndMoney.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ExchangeOfGoodsAndMoney.java index 449e38b0..af7b0e17 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ExchangeOfGoodsAndMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ExchangeOfGoodsAndMoney.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AgreementExecution} that consists of a {@link TransferOfOwnership} of goods and a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Function_.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Function_.java index 9d94d7ca..e5139526 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Function_.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Function_.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A one-to-many {@link Relationship}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalObject.java index 6c3d439e..993dc501 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link IntentionallyConstructedObject} that is also a {@link PhysicalObject} that has an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystem.java index 3b9cd265..117011b1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link StateOfFunctionalSystem} that is also an {@link OrdinaryFunctionalObject} and a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystemComponent.java index 6f30b548..12d8e368 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/FunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link IntentionallyConstructedObject} that is a replaceable {@code component_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Identification.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Identification.java index fb8a7899..ef908a65 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Identification.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Identification.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link RepresentationByPattern} that is a surrogate for the {@link Thing} {@code represented}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IdentificationOfPhysicalQuantity.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IdentificationOfPhysicalQuantity.java index b2eaadb6..399942b5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IdentificationOfPhysicalQuantity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IdentificationOfPhysicalQuantity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Identification} that identifies a {@link PhysicalQuantity}. An diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InPlaceBiologicalComponent.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InPlaceBiologicalComponent.java index efa408af..368584ff 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InPlaceBiologicalComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InPlaceBiologicalComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link InstalledObject} that is also a {@link StateOfOrdinaryBiologicalObject} and a * {@link StateOfSystemComponent}. */ public interface InPlaceBiologicalComponent - extends StateOfBiologicalSystemComponent, InstalledObject, StateOfOrdinaryBiologicalObject { + extends StateOfBiologicalSystemComponent, InstalledObject, StateOfOrdinaryBiologicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Individual.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Individual.java index c5c4398d..837547d1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Individual.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Individual.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SpatioTemporalExtent} that is not a proper {@code temporal_part_of} any other diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledFunctionalSystemComponent.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledFunctionalSystemComponent.java index 0f54f8e9..2384560b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledFunctionalSystemComponent.java @@ -12,12 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link InstalledObject} that is also a {@link StateOfOrdinaryFunctionalObject} and a * {@link StateOfFunctionalSystemComponent}. */ public interface InstalledFunctionalSystemComponent - extends StateOfFunctionalSystemComponent, InstalledObject, StateOfOrdinaryFunctionalObject { + extends StateOfFunctionalSystemComponent, InstalledObject, StateOfOrdinaryFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledObject.java index ebe5c0f3..9b87b27e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/InstalledObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrdinaryPhysicalObject} that is also a {@link StateOfSystemComponent} that is a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IntentionallyConstructedObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IntentionallyConstructedObject.java index 278bef08..e533d1a2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/IntentionallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IntentionallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Individual} and {@link StateOfIntentionallyConstructedObject} that is intentionally diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfActivity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfActivity.java index d2ef5ebc..f038b26c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfActivity} all of whose members are of the same kind. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfAssociation.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfAssociation.java index ba556cc5..303e1496 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfAssociation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfAssociation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfAssociation} where all the members are of the same kind. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalObject.java index 72826ec9..d81ce173 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalObject} and a {@link KindOfPhysicalObject} where each {@code member_of} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystem.java index 6ced24a7..c576f1cb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalSystem} that is also a {@link KindOfSystem} all of whose members have a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystemComponent.java index c0cb852c..c1e8a47f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfBiologicalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfBiologicalSystemComponent} that is also a {@link KindOfSystemComponent} where all diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalObject.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalObject.java index c1e4c8fa..1875b83f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfFunctionalObject}, that is also a {@link KindOfPhysicalObject}, and a @@ -20,5 +20,5 @@ * {@link KindOfFunctionalObject} is of the same kind. */ public interface KindOfFunctionalObject - extends ClassOfFunctionalObject, KindOfPhysicalObject, KindOfIntentionallyConstructedObject { + extends ClassOfFunctionalObject, KindOfPhysicalObject, KindOfIntentionallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystem.java index 10603cc9..9cd81da1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfFunctionalSystem} that is also a {@link KindOfSystem} where each diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystemComponent.java index d4391eb1..8bf1c507 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfFunctionalSystemComponent} that is also a {@link KindOfSystemComponent} where diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIndividual.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIndividual.java index 8b0c6d0f..3b26450f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIndividual.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIndividual.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIndividual} where all the members possess attributes in common. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.java index 562ecd6e..63ca2db8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfIntentionallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfIntentionallyConstructedObject} that is also a {@link KindOfIndividual} where * each {@code member_of} a {@link KindOfIntentionallyConstructedObject} is of the same kind. */ -public interface KindOfIntentionallyConstructedObject extends - ClassOfIntentionallyConstructedObject, - KindOfIndividual { +public interface KindOfIntentionallyConstructedObject extends ClassOfIntentionallyConstructedObject, KindOfIndividual { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryBiologicalObject.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryBiologicalObject.java index bb77bb4c..62a6b5c0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOrdinaryBiologicalObject} a {@link KindOfOrdinaryPhysicalObject} and a @@ -20,5 +20,5 @@ * {@link KindOfOrdinaryBiologicalObject} is of the same kind. */ public interface KindOfOrdinaryBiologicalObject - extends ClassOfOrdinaryBiologicalObject, KindOfBiologicalObject, KindOfOrdinaryPhysicalObject { + extends ClassOfOrdinaryBiologicalObject, KindOfBiologicalObject, KindOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryFunctionalObject.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryFunctionalObject.java index 7c0885e9..8de2a5ca 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryFunctionalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOrdinaryBiologicalObject}, that is also a {@link KindOfOrdinaryPhysicalObject}, @@ -20,5 +20,5 @@ * {@link KindOfOrdinaryBiologicalObject} is of the same kind. */ public interface KindOfOrdinaryFunctionalObject - extends ClassOfOrdinaryFunctionalObject, KindOfOrdinaryPhysicalObject, KindOfFunctionalObject { + extends ClassOfOrdinaryFunctionalObject, KindOfOrdinaryPhysicalObject, KindOfFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryPhysicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryPhysicalObject.java index cccfb712..e57b86d4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrdinaryPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOrdinaryPhysicalObject} that is also a {@link KindOfPhysicalObject} where each diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganization.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganization.java index 603cf273..4e23a7e3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganization.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOrdinaryPhysicalObject} that is also a {@link KindOfPhysicalObject} where each diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganizationComponent.java similarity index 78% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganizationComponent.java index 2c152e97..4ec8aa9b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfOrganizationComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganizationComponent.java @@ -12,14 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOrganizationComponent} that is also a {@link KindOfSystemComponent} whose members * are all of the same kind. */ -public interface KindOfOrganizationComponent extends - ClassOfOrganizationComponent, - KindOfSystemComponent, - KindOfSociallyConstructedObject { +public interface KindOfOrganizationComponent + extends ClassOfOrganizationComponent, KindOfSystemComponent, KindOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfParty.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfParty.java index d5e41882..0b016bbe 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfParty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfParty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfParty} that is also a {@link KindOfSystem} where all the members are of the same diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPerson.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPerson.java index 19075ddf..de6239ac 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPerson.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPerson.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPerson} that is also a {@link KindOfParty} whose members are all of the same * kind. */ -public interface KindOfPerson extends - KindOfParty, - ClassOfPerson { +public interface KindOfPerson extends KindOfParty, ClassOfPerson { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalObject.java index f3a8a207..7f0c4b05 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPhysicalObject} that is also a {@link KindOfIndividual} where each diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalProperty.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalProperty.java index 777cc26b..bd733f47 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalProperty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalProperty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPhysicalProperty} where each {@code member_of} a {@link KindOfPhysicalProperty} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalQuantity.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalQuantity.java index 45354c46..d936bf48 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPhysicalQuantity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalQuantity.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPhysicalQuantity} that is also a {@link KindOfPhysicalProperty} such that each * {@code member_of} the same {@link KindOfPhysicalQuantity} is comparable to the others. */ -public interface KindOfPhysicalQuantity extends - ClassOfPhysicalQuantity, - KindOfPhysicalProperty { +public interface KindOfPhysicalQuantity extends ClassOfPhysicalQuantity, KindOfPhysicalProperty { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPosition.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPosition.java index b371aee6..eab4c2c7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPosition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfPosition} that is also a {@link KindOfOrganizationComponent} where all the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithRestriction.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithRestriction.java index 5a99da52..c85eb6b1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithRestriction.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithRestriction.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link KindOfRelationshipWithSignature} where one or more {@code roles} have fixed players. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithSignature.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithSignature.java index 24607859..d5887504 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfRelationshipWithSignature.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithSignature.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfRelationship} that is a subset of {@link DefinedRelationship} type where the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSociallyConstructedObject.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSociallyConstructedObject.java index b8ebd311..90485eac 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSociallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSociallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSociallyConstructedObject} that is also a @@ -20,5 +20,5 @@ * has members that are of the same kind. */ public interface KindOfSociallyConstructedObject - extends ClassOfSociallyConstructedObject, KindOfIntentionallyConstructedObject { + extends ClassOfSociallyConstructedObject, KindOfIntentionallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystem.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystem.java index 4c344101..aa1ad792 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSystem} that is also a {@link KindOfOrdinaryPhysicalObject} where each diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystemComponent.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystemComponent.java index 1f80ec49..42688f0d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/KindOfSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystemComponent.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSystemComponent} that is also a {@link KindOfPhysicalObject} where all the * members are of the same kind. */ -public interface KindOfSystemComponent extends - ClassOfSystemComponent, - KindOfPhysicalObject { +public interface KindOfSystemComponent extends ClassOfSystemComponent, KindOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.java index 05b2e458..5c9c92f5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/LanguageCommunity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Organization} that is a group of people who share a common understanding of a set of @@ -22,7 +22,5 @@ * Note: This is not restricted to natural languages, but also controlled languages, taxonomies etc. *

*/ -public interface LanguageCommunity extends - StateOfLanguageCommunity, - Organization { +public interface LanguageCommunity extends StateOfLanguageCommunity, Organization { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/MoneyAsset.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/MoneyAsset.java index 0aa864ad..2cc092f6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/MoneyAsset.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/MoneyAsset.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Asset} that is a {@link StateOfAmountOfMoney}. */ -public interface MoneyAsset extends - Asset, - StateOfAmountOfMoney { +public interface MoneyAsset extends Asset, StateOfAmountOfMoney { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offer.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offer.java index da7c7618..ee11a9ec 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offer.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offer.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} that proposes an exchange of some {@link Thing} for some diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferAndAcceptanceForGoods.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferAndAcceptanceForGoods.java index ed7fa09a..89594979 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferAndAcceptanceForGoods.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferAndAcceptanceForGoods.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ReachingAgreement} that {@code consists_of} exactly one {@link Offer} of a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferForGoods.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferForGoods.java index 17757889..3128bda7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OfferForGoods.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferForGoods.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Offer} of an {@link ExchangeOfGoodsAndMoney}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offering.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offering.java index 15981162..a79da34b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Offering.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offering.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfOffer} that is for a {@link ClassOfIndividual}, at a {@link Price}, by a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryBiologicalObject.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryBiologicalObject.java index 59ea0466..d9e8ef34 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrdinaryBiologicalObject}, a {@link BiologicalObject}, and an @@ -20,5 +20,5 @@ * replacement of all of its parts. */ public interface OrdinaryBiologicalObject - extends StateOfOrdinaryBiologicalObject, BiologicalObject, OrdinaryPhysicalObject { + extends StateOfOrdinaryBiologicalObject, BiologicalObject, OrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryFunctionalObject.java similarity index 79% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryFunctionalObject.java index 9becf158..bcf49fa3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryFunctionalObject.java @@ -12,14 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link StateOfOrdinaryFunctionalObject} and {@link OrdinaryPhysicalObject} that is a * {@link FunctionalObject}. */ -public interface OrdinaryFunctionalObject extends - FunctionalObject, - StateOfOrdinaryFunctionalObject, - OrdinaryPhysicalObject { +public interface OrdinaryFunctionalObject + extends FunctionalObject, StateOfOrdinaryFunctionalObject, OrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryPhysicalObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryPhysicalObject.java index a5b9042d..7370f08f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrdinaryPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link PhysicalObject} that does not survive changing all its parts at once. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Organization.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Organization.java index e4cfd8c8..4a342d61 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Organization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Organization.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrganization}, that is also a {@link Party}, and a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrganizationComponent.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrganizationComponent.java index 206bb570..5da48f5f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/OrganizationComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrganizationComponent.java @@ -12,15 +12,13 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrganizationComponent}, {@link SystemComponent}, and * {@link SociallyConstructedObject} that is a {@code component_of} an {@link Organization} that can * be completely replaced without losing its identity. */ -public interface OrganizationComponent extends - StateOfOrganizationComponent, - SystemComponent, - SociallyConstructedObject { +public interface OrganizationComponent + extends StateOfOrganizationComponent, SystemComponent, SociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.java similarity index 87% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.java index 2d835027..4d2c6535 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Owner.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} that is also a {@link Participant} that is a {@code participant_in} an * {@link Ownership}. */ -public interface Owner extends - StateOfParty, - Participant { +public interface Owner extends StateOfParty, Participant { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Ownership.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Ownership.java index 5d8bde89..20ff5163 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Ownership.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Ownership.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Association} that {@code consists_of} an {@link Owner} and an {@link Asset} where the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Participant.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Participant.java index adcd5947..bdcf8cb7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Participant.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Participant.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link State} that is a {@code participant_in} an {@link Activity} or {@link Association}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ParticipantInActivityOrAssociation.java similarity index 90% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ParticipantInActivityOrAssociation.java index c7ea5bf1..3f267e9f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ParticipantInActivityOrAssociation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ParticipantInActivityOrAssociation.java @@ -12,9 +12,9 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; -import uk.gov.gchq.hqdm.pojo.Top; +import uk.gov.gchq.magmacore.hqdm.pojo.Top; /** * A SELECT where a {@link Participant} may be a {@code participant_in} an {@link Activity} or an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Party.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Party.java index 45a327be..2471a6b8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Party.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Party.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} that is also a {@link System} that is a {@link Person} or an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Pattern.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Pattern.java index dcd6a938..a2d8b371 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Pattern.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Pattern.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSign} where all the {@link Sign}s are of the same {@link Pattern}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PeriodOfTime.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PeriodOfTime.java index 6e543f80..a8a5f3f1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PeriodOfTime.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PeriodOfTime.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link State} that is a {@code temporal_part_of} some {@link PossibleWorld}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Person.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Person.java index cdbd37ce..5f334201 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Person.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Person.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link BiologicalSystem} that is also, a {@link StateOfPerson}, and a {@link Party} that is a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PersonInPosition.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PersonInPosition.java index d389dece..7ebfceb8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PersonInPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PersonInPosition.java @@ -12,15 +12,12 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPosition}, that is also a {@link StateOfPerson}, and an {@link InstalledObject} * that is a {@link Person} while they are in a {@link Position} and also the {@link Position} while * it is filled by the {@link Person}. */ -public interface PersonInPosition extends - StateOfPosition, - StateOfPerson, - InstalledObject { +public interface PersonInPosition extends StateOfPosition, StateOfPerson, InstalledObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.java similarity index 84% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.java index 9aa7f49a..df7865da 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Individual} that consists of a distribution of matter and/or energy. */ -public interface PhysicalObject extends - Individual, - StateOfPhysicalObject { +public interface PhysicalObject extends Individual, StateOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalProperty.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalProperty.java index ed2636f2..0f185d43 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalProperty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalProperty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} that is some characteristic that is the same for each {@link State} that diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalPropertyRange.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalPropertyRange.java index e110d62b..cc251da2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalPropertyRange.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalPropertyRange.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfState} where each member of the set is a member of a {@link PhysicalProperty} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantity.java index 6b3e0eba..5159b8f3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link PhysicalQuantity} is a {@link PhysicalProperty} that is a measurable quantity of a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantityRange.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantityRange.java index 101529f2..f63109ef 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PhysicalQuantityRange.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantityRange.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link PhysicalPropertyRange} that ranges over {@link PhysicalQuantity} values. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Plan.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Plan.java index 35123ac1..6677f95b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Plan.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Plan.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link PossibleWorld} that some party would like to bring about. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PointInTime.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PointInTime.java index 9f448978..2bcb6aac 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PointInTime.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PointInTime.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Event} that is all of space at an instant from some viewpoint. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Position.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Position.java index 9bf35937..b00ad7b0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Position.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Position.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link OrganizationComponent} that is also a {@link StateOfPosition} that may be held by a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PossibleWorld.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PossibleWorld.java index d6e3c179..d0a42a4b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/PossibleWorld.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PossibleWorld.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Individual} that is a complete spatio-temporal history of some possible world. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Price.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Price.java index 6bc685cc..6bcf735e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Price.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Price.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfAmountOfMoney} that is the {@code consideration_by_class} in an {@link Offering}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductBrand.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductBrand.java index 59edf129..fdaae65d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductBrand.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductBrand.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSalesProductInstance} that is a set of {@link SalesProductInstance} sold under a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductOffering.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductOffering.java index f6a50cae..602c3d33 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ProductOffering.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductOffering.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Offering} that is for a {@link SalesProduct}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ReachingAgreement.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ReachingAgreement.java index 898159d0..855f7123 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/ReachingAgreement.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ReachingAgreement.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} where two or more parties determine a course of action. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RecognizingLanguageCommunity.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RecognizingLanguageCommunity.java index 8c4c82b9..097dcd9b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RecognizingLanguageCommunity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RecognizingLanguageCommunity.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfLanguageCommunity} that recognizes what a {@link Pattern} is intended to * represent. */ -public interface RecognizingLanguageCommunity extends - StateOfLanguageCommunity, - Participant { +public interface RecognizingLanguageCommunity extends StateOfLanguageCommunity, Participant { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Relationship.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Relationship.java index 3abff7fd..068c0d7b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Relationship.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Relationship.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AbstractObject} that is what one {@link Thing} has to do with one or more others. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationByPattern.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationByPattern.java index 98d4be4f..7c50128e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationByPattern.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationByPattern.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfRepresentation} where the {@link Sign} in all the members are members of the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationBySign.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationBySign.java index 90c7a657..4b61da96 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RepresentationBySign.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationBySign.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link Association} of a {@link Sign} and a {@link RecognizingLanguageCommunity} that diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Requirement.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Requirement.java index d000726e..16457fcf 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Requirement.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Requirement.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SpatioTemporalExtent} that is {@code part_of_plan} at least one {@link Plan} and is diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RequirementSpecification.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RequirementSpecification.java index 85c0b675..b00c7881 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/RequirementSpecification.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RequirementSpecification.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSpatioTemporalExtent} that is the {@code intersection_of} one or more diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Role.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Role.java index 8e276248..35f96c63 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Role.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Role.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfParticipant} where each member participates in the same way in an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SaleOfGoods.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SaleOfGoods.java index 52f44398..cd3e0519 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SaleOfGoods.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SaleOfGoods.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link AgreementProcess} that consists of an {@link OfferAndAcceptanceForGoods} and an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProduct.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProduct.java index 0d1c0a7f..a2056de1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProduct.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProduct.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSalesProductInstance} that is a set of {@link SalesProductInstance} sold under diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductInstance.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductInstance.java index 2d65a2f2..57259a78 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductInstance.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductInstance.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link OrdinaryFunctionalObject} that is produced in order to be sold. */ -public interface SalesProductInstance extends - StateOfSalesProductInstance, - OrdinaryFunctionalObject { +public interface SalesProductInstance extends StateOfSalesProductInstance, OrdinaryFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductVersion.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductVersion.java index 7d8dfb78..1329f7be 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SalesProductVersion.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductVersion.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link ClassOfSalesProductInstance} that is the customer facing specification of a version of a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Scale.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Scale.java index 965ae27e..3a318dfe 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Scale.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Scale.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A scale is a function from {@link KindOfPhysicalQuantity} to the real numbers. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Sign.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Sign.java index 33796845..d133aede 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Sign.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Sign.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfSign}, that is also a {@link SociallyConstructedObject}, and a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedActivity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedActivity.java index 0456a2be..715d8f52 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link SociallyConstructedObject} that is also an {@link Activity}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedObject.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedObject.java index d674ee60..8a0123ad 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SociallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedObject.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link IntentionallyConstructedObject} that is necessarily constructed by agreement or at * least acquiescence of many people. */ -public interface SociallyConstructedObject extends - IntentionallyConstructedObject, - StateOfSociallyConstructedObject { +public interface SociallyConstructedObject extends IntentionallyConstructedObject, StateOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SpatioTemporalExtent.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SpatioTemporalExtent.java index bb73d00d..cd6daeaa 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SpatioTemporalExtent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SpatioTemporalExtent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Thing} that exists in time and space. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Specialization.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Specialization.java index 0a038735..8a9257a8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Specialization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Specialization.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Relationship} where each {@code member__of} the {@code subclass} is a {@code member__of} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/State.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/State.java index c144608d..fc20fef4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/State.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/State.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SpatioTemporalExtent} that is an {@link Individual} or a {@code temporal_part_of} some diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfActivity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfActivity.java index e955b4da..67f8a42a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfActivity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A state that is an {@link Activity} or a {@code temporal_part_of} an {@link Activity}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAmountOfMoney.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAmountOfMoney.java index 41e52f2d..0bdf03a1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAmountOfMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAmountOfMoney.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedObject} that is also a {@link StateOfPhysicalObject} that is a * {@code temporal_part_of} an {@link AmountOfMoney}. */ -public interface StateOfAmountOfMoney extends - StateOfSociallyConstructedObject, - StateOfPhysicalObject { +public interface StateOfAmountOfMoney extends StateOfSociallyConstructedObject, StateOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAssociation.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAssociation.java index 9ac2f06b..d7dfbaed 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfAssociation.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAssociation.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link State} that is an {@link Association} or a {@code temporal_part_of} an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalObject.java index f42c248b..47e40fb3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPhysicalObject} that is a {@link BiologicalObject} or a {@code temporal_part_of} diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystem.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystem.java index 8b41f241..2c1f64cb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystem.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrdinaryBiologicalObject} and {@link StateOfSystem} that is * {@link BiologicalSystem} or a {@code temporal_part_of} a {@link BiologicalSystem}. */ -public interface StateOfBiologicalSystem extends - StateOfOrdinaryBiologicalObject, - StateOfSystem { +public interface StateOfBiologicalSystem extends StateOfOrdinaryBiologicalObject, StateOfSystem { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystemComponent.java index 2c5154ce..99bd8e3c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfBiologicalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfBiologicalSystemComponent} and {@link StateOfSystemComponent} that is a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalObject.java similarity index 83% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalObject.java index a8f0ab53..3a15d4d9 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalObject.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfIntentionallyConstructedObject} and {@link StateOfPhysicalObject} that is a * {@link FunctionalObject} or a {@code temporal_part_of} a {@link FunctionalObject}. */ -public interface StateOfFunctionalObject extends - StateOfIntentionallyConstructedObject, - StateOfPhysicalObject { +public interface StateOfFunctionalObject extends StateOfIntentionallyConstructedObject, StateOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.java index fa77b715..96411ff3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link StateOfOrdinaryFunctionalObject} that is also a {@link StateOfSystem}. */ -public interface StateOfFunctionalSystem extends - StateOfSystem, - StateOfOrdinaryFunctionalObject { +public interface StateOfFunctionalSystem extends StateOfSystem, StateOfOrdinaryFunctionalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystemComponent.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystemComponent.java index 0890fbd3..33b3fc16 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfFunctionalSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystemComponent.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfIntentionallyConstructedObject} that is a {@link SystemComponent} or a * {@code temporal_part_of} a {@link SystemComponent}. */ -public interface StateOfFunctionalSystemComponent extends - StateOfFunctionalObject, - StateOfSystemComponent { +public interface StateOfFunctionalSystemComponent extends StateOfFunctionalObject, StateOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfIntentionallyConstructedObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfIntentionallyConstructedObject.java index 3db5dbd9..63e0eb4e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfIntentionallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfIntentionallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A state that is an {@link IntentionallyConstructedObject} or a {@code temporal_part_of} an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfLanguageCommunity.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfLanguageCommunity.java index 56e33821..6835eadf 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfLanguageCommunity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfLanguageCommunity.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrganization} that is a {@code temporal_part_of} a {@link LanguageCommunity}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryBiologicalObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryBiologicalObject.java index 478fe5f7..1528bd9f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryBiologicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryBiologicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfBiologicalObject} that is also a {@link StateOfOrdinaryPhysicalObject} that is an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.java index 570b07be..85a3bbaa 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryFunctionalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link StateOfFunctionalObject} that is also a {@link StateOfOrdinaryPhysicalObject}. */ -public interface StateOfOrdinaryFunctionalObject extends - StateOfFunctionalObject, - StateOfOrdinaryPhysicalObject { +public interface StateOfOrdinaryFunctionalObject extends StateOfFunctionalObject, StateOfOrdinaryPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryPhysicalObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryPhysicalObject.java index 330bd592..26fa43e6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrdinaryPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPhysicalObject} that is an {@link OrdinaryPhysicalObject} or a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganization.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganization.java index 7d1e5029..3a43e5a8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganization.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganization.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} that is also a {@link StateOfSociallyConstructedObject} that is an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganizationComponent.java similarity index 82% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganizationComponent.java index dfdf1bed..fcb5f38b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfOrganizationComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganizationComponent.java @@ -12,13 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfSystemComponent} that is also a {@link StateOfSociallyConstructedObject} that is * a {@code temporal_part_of} an {@link OrganizationComponent}. */ -public interface StateOfOrganizationComponent extends - StateOfSystemComponent, - StateOfSociallyConstructedObject { +public interface StateOfOrganizationComponent extends StateOfSystemComponent, StateOfSociallyConstructedObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfParty.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfParty.java index 8cc50e08..53188ac4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfParty.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfParty.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfSystem} that is a {@link Party} or a {@code temporal_part_of} a {@link Party}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPerson.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPerson.java index 880374c8..728ebc20 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPerson.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPerson.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfBiologicalSystem} and {@link StateOfParty} that is a {@link Person} or a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPhysicalObject.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPhysicalObject.java index fdda37b5..c91382e2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPhysicalObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPhysicalObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link State} that is a {@link PhysicalObject} or a {@code temporal_part_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPosition.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPosition.java index faff0e3c..2ccdc896 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfPosition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPosition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrganizationComponent} that is a {@link Position} or a {@code temporal_part_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSalesProductInstance.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSalesProductInstance.java index 86e5905e..81c110c5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSalesProductInstance.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSalesProductInstance.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrdinaryFunctionalObject} that is a {@link SalesProductInstance} or a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSign.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSign.java index 01db5a42..35c68f27 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSign.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSign.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfSociallyConstructedObject} that is a {@link Sign} or a {@code temporal_part_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedActivity.java similarity index 81% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedActivity.java index ea249326..b40375fe 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedActivity.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedActivity.java @@ -12,12 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * Any {@link StateOfSociallyConstructedObject} that is also a {@link StateOfActivity}. */ -public interface StateOfSociallyConstructedActivity extends - StateOfSociallyConstructedObject, - StateOfActivity { +public interface StateOfSociallyConstructedActivity extends StateOfSociallyConstructedObject, StateOfActivity { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedObject.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedObject.java index 6dd919b4..9ca7356c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSociallyConstructedObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfIntentionallyConstructedObject} that is a {@link SociallyConstructedObject} or a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystem.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystem.java index cb712ae8..97252185 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystem.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystem.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfOrdinaryPhysicalObject} that is a {@link System} or a {@code temporal_part_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystemComponent.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystemComponent.java index 9542d7b0..73605327 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/StateOfSystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfPhysicalObject} that is a {@link SystemComponent} or a {@code temporal_part_of} a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/System.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/System.java index eef0cdf1..78ad7d3a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/System.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/System.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * An {@link OrdinaryPhysicalObject} that is an organized or connected group of diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SystemComponent.java similarity index 87% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SystemComponent.java index 7f1dc7b4..d87eaa0c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/SystemComponent.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SystemComponent.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link PhysicalObject} that is a {@code component_of} a {@link System} and that can be @@ -23,7 +23,5 @@ * of, unlike any {@link OrdinaryPhysicalObject} that may be installed as the component. *

*/ -public interface SystemComponent extends - PhysicalObject, - StateOfSystemComponent { +public interface SystemComponent extends PhysicalObject, StateOfSystemComponent { } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TemporalComposition.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TemporalComposition.java index 5efe0e57..0a7f55c8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TemporalComposition.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TemporalComposition.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link Composition} where the part is the entire {@code whole} spatially, but part of the diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Thing.java similarity index 86% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Thing.java index 62464a22..98e515bc 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Thing.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Thing.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; -import uk.gov.gchq.hqdm.model.impl.ThingImpl; -import uk.gov.gchq.hqdm.pojo.Top; +import uk.gov.gchq.magmacore.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.magmacore.hqdm.pojo.Top; /** * Anything that exists, real or imagined. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnership.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnership.java index e00ee4d4..c64e9ae2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnership.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnership.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link SociallyConstructedActivity} that ends one {@link Ownership} and begins another for diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnershipOfMoney.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnershipOfMoney.java index 61532b95..c1fd3d61 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/TransferOfOwnershipOfMoney.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnershipOfMoney.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link TransferOfOwnership} where the {@link Asset} is a {@link MoneyAsset}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferee.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferee.java index 322a6299..839b1ce5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferee.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferee.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} and {@link Participant} receiving {@link Ownership} in a diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferor.java similarity index 95% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferor.java index d0019818..d656ff1f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/Transferor.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferor.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A {@link StateOfParty} that is also a {@link Participant} that is a {@code temporal_part_of} an diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/UnitOfMeasure.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/UnitOfMeasure.java index 9959071f..5204704d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/UnitOfMeasure.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/UnitOfMeasure.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; /** * A plus one {@link Function_} for a {@link Scale}. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AbstractObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AbstractObjectImpl.java index 61e16222..f379dff9 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AbstractObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AbstractObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AbstractObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AbstractObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AbstractObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java index 03c45334..5e36a15e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AcceptanceOfOfferForGoods; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOfferForGoods; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AcceptanceOfOfferForGoods. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferImpl.java index 5cffacd2..c5ce6bae 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AcceptanceOfOfferImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AcceptanceOfOffer; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOffer; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AcceptanceOfOffer. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ActivityImpl.java index 9cb12cae..6b984729 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Activity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Activity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Activity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AggregationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AggregationImpl.java index bd11a9d9..a75ebdcf 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AggregationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AggregationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Aggregation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Aggregation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Aggregation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreeContractImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreeContractImpl.java index d5af767d..8a7e2a63 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreeContractImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreeContractImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AgreeContract; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AgreeContract; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AgreeContract. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementExecutionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementExecutionImpl.java index e7093f3c..6f4e4f46 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementExecutionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementExecutionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AgreementExecution; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AgreementExecution. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementProcessImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementProcessImpl.java index 8c9af72d..6c9823c0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AgreementProcessImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementProcessImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AgreementProcess; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AgreementProcess; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AgreementProcess. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AmountOfMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AmountOfMoneyImpl.java index 4d081375..f9cab043 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AmountOfMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AmountOfMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.AmountOfMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.AmountOfMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of AmountOfMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssetImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssetImpl.java index b5feb511..aadcbe4b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssetImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssetImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Asset; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Asset; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Asset. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssociationImpl.java index 347f8b98..cb1fc211 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/AssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Association; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Association; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Association. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BeginningOfOwnershipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BeginningOfOwnershipImpl.java index e46cb78f..a5e7463e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BeginningOfOwnershipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BeginningOfOwnershipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.BeginningOfOwnership; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.BeginningOfOwnership; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of BeginningOfOwnership. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalObjectImpl.java index f17f7aea..9268ee35 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.BiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.BiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of BiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemComponentImpl.java index 643cb000..333ec0fd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.BiologicalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of BiologicalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemImpl.java index 1ababe74..70925e69 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/BiologicalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.BiologicalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of BiologicalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassImpl.java index 60425605..4eaef20a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Class; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Class; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Class. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAbstractObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAbstractObjectImpl.java index cedf6123..75aee8d9 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAbstractObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAbstractObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAbstractObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAbstractObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAbstractObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfActivityImpl.java index 2f9b12bd..c9b95dfd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreeContractImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreeContractImpl.java index 56669b9e..553b70ad 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreeContractImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreeContractImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAgreeContract; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreeContract; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAgreeContract. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementExecutionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementExecutionImpl.java index 127a301e..c4664c3b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementExecutionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementExecutionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAgreementExecution; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreementExecution; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAgreementExecution. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementProcessImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementProcessImpl.java index 78827260..50794d35 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAgreementProcessImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementProcessImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAgreementProcess; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreementProcess; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAgreementProcess. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java index 0dd84d77..225b449a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAmountOfMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAmountOfMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAmountOfMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAssociationImpl.java index b08f919c..cd963cf1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfAssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfAssociation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAssociation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfAssociation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalObjectImpl.java index 4feae35c..d28df578 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java index aabb3d3b..d9757a01 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfBiologicalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfBiologicalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemImpl.java index 2d26dad3..80b507c4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfBiologicalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfBiologicalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfBiologicalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassImpl.java index 17f5f5b8..1f89f81e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfClass; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfClass; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfClass. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java index ae44e145..69bd2660 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfClassOfSpatioTemporalExtent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfClassOfSpatioTemporalExtent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfClassOfSpatioTemporalExtent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractExecutionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractExecutionImpl.java index 9fdd54f4..9ed54741 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractExecutionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractExecutionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfContractExecution; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfContractExecution; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfContractExecution. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractProcessImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractProcessImpl.java index 67634124..84891c8b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfContractProcessImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractProcessImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfContractProcess; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfContractProcess; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfContractProcess. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfEventImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfEventImpl.java index dfe9d0ef..76f18d73 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfEventImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfEventImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfEvent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfEvent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfEvent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalObjectImpl.java index 1735b625..92cd03d7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java index 7fc62764..694f4362 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemImpl.java index 422789bf..b86d1713 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfFunctionalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfFunctionalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfFunctionalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java index 301cd5e8..b273f76e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfInPlaceBiologicalComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInPlaceBiologicalComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfInPlaceBiologicalComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIndividualImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIndividualImpl.java index 0bcf202a..6a597939 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIndividualImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIndividualImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfIndividual; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfIndividual. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java index 9428439b..e0f58efa 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfInstalledFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfInstalledFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledObjectImpl.java index 5baddba4..20f63f2c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfInstalledObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfInstalledObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfInstalledObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java index 0b1ef189..30ed477a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfIntentionallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfIntentionallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOfferImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOfferImpl.java index b43ff9e9..3bdb5ca0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOfferImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOfferImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOffer; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOffer; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOffer. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java index d9a5d3da..81483efe 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOrdinaryBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOrdinaryBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java index 4d86a7a9..13bb253a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOrdinaryFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOrdinaryFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java index da47cfd3..e46f5a5d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOrdinaryPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOrdinaryPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationComponentImpl.java index 7219e5ed..5272f8a6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOrganizationComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOrganizationComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationImpl.java index a4d80e6c..4af34251 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfOrganizationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfOrganization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrganization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfOrganization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfParticipantImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfParticipantImpl.java index 5d16a763..0322ded2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfParticipantImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfParticipantImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfParticipant; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfParticipant; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfParticipant. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPartyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPartyImpl.java index 62c27723..3db693c6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPartyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPartyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfParty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfParty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfParty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java index 30aa57d1..e18dea94 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPeriodOfTime; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPeriodOfTime; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPeriodOfTime. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonImpl.java index 683e45c3..edf6fbfb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPerson; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPerson; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPerson. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonInPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonInPositionImpl.java index 7950b8a5..c1cf94d4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPersonInPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonInPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPersonInPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPersonInPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPersonInPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalObjectImpl.java index 5b17298a..33f42e6e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java index 28289063..a9566f21 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPhysicalProperty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalProperty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPhysicalProperty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java index 34db4996..7d085083 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPhysicalQuantity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalQuantity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPhysicalQuantity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPointInTimeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPointInTimeImpl.java index d216821a..838e0417 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPointInTimeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPointInTimeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPointInTime; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPointInTime; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPointInTime. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPositionImpl.java index e02b9dfe..259163a8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPossibleWorldImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPossibleWorldImpl.java index 0721c320..2da68eb7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfPossibleWorldImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPossibleWorldImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfPossibleWorld; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPossibleWorld; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfPossibleWorld. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfReachingAgreementImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfReachingAgreementImpl.java index 3bd2a758..e346137e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfReachingAgreementImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfReachingAgreementImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfReachingAgreement; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfReachingAgreement; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfReachingAgreement. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRelationshipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRelationshipImpl.java index c79c78e9..a4efb92d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRelationshipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRelationshipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfRelationship; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfRelationship; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfRelationship. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRepresentationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRepresentationImpl.java index b9015cb0..a574c75c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfRepresentationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRepresentationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfRepresentation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfRepresentation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfRepresentation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java index d6573c03..6e58cfeb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSalesProductInstance; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSalesProductInstance; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSalesProductInstance. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSignImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSignImpl.java index 22d56a21..1a1e6387 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSignImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSignImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSign; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSign; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSign. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java index 8739c5d8..c4fcc46a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSociallyConstructedActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java index fa060e4d..30819571 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSociallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSociallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java index 83c53bfa..56405e92 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSpatioTemporalExtent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSpatioTemporalExtent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateImpl.java index 53dae008..1ab639a2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfState; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfState; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfState. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfActivityImpl.java index e3cd48aa..920b8121 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java index 0514547b..805d5b41 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfAmountOfMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfAmountOfMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfAmountOfMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAssociationImpl.java index cceea2cf..fe5f12d0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfAssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfAssociation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfAssociation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfAssociation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java index b4fa7a94..80795509 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java index dac13a76..700bba66 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfBiologicalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java index 1e183aab..dece7223 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfBiologicalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfBiologicalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java index 765c7a7a..74c343cd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java index 89c616b6..d2fc22a2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java index 80e1d64a..7193e069 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfFunctionalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfFunctionalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java index fad46967..2e106f93 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfIntentionallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfIntentionallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java index b3e067e1..5ab555f3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfOrdinaryBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java index b02d26ab..81420d3a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfOrdinaryFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java index 6c60b741..054a878b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfOrdinaryPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java index 9a91304c..a8a2af7b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfOrganizationComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfOrganizationComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java index 45b6dd30..ebd77854 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfOrganization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfOrganization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPartyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPartyImpl.java index 75ee35b4..7a52fb01 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPartyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPartyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfParty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfParty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfParty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPersonImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPersonImpl.java index 28c8a1b5..1ef8f880 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPersonImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPersonImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPerson; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfPerson. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java index f90c4b59..4f922bc6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPositionImpl.java index 79ef2dd2..17565ac1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java index edb35d55..c35ba72e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSalesProductInstance; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSalesProductInstance; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSalesProductInstance. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSignImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSignImpl.java index 4f80a5db..0111be9a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSignImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSignImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSign; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSign; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSign. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java index c164a221..321f5812 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSociallyConstructedActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java index b0438c40..bfd9f06d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSociallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSociallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java index b0c3f421..295cc720 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemImpl.java index 1759155d..f37d3fe2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfStateOfSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfStateOfSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfStateOfSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemComponentImpl.java index e0e468ab..64e70ed7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemImpl.java index 9b922953..df430b2e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassOfSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ClassOfSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ClassOfSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassificationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassificationImpl.java index 02ce2873..1fcbe6d8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ClassificationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassificationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Classification; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Classification; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Classification. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CompositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CompositionImpl.java index 90aed7b4..ef98f62c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CompositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CompositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Composition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Composition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Composition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractExecutionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractExecutionImpl.java index 621c71be..58364130 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractExecutionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractExecutionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ContractExecution; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ContractExecution; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ContractExecution. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractProcessImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractProcessImpl.java index 7a3a87fa..f4af9f26 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ContractProcessImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractProcessImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ContractProcess; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ContractProcess; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ContractProcess. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CurrencyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CurrencyImpl.java index a6f1ff3f..30009650 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/CurrencyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CurrencyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Currency; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Currency; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Currency. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinedRelationshipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinedRelationshipImpl.java index dd055c65..c42a2bd0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinedRelationshipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinedRelationshipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.DefinedRelationship; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of DefinedRelationship. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinitionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinitionImpl.java index 7c666c89..aa0884bf 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DefinitionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinitionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Definition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Definition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Definition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DescriptionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DescriptionImpl.java index 32a5f69f..40cc6749 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/DescriptionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DescriptionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Description; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Description; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Description. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployeeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployeeImpl.java index 3b3dad81..78149b7e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployeeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployeeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Employee; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Employee; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Employee. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployerImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployerImpl.java index 873704af..8bf9e6a3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmployerImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployerImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Employer; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Employer; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Employer. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmploymentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmploymentImpl.java index ce30f29e..3b6eefac 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EmploymentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmploymentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Employment; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Employment; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Employment. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EndingOfOwnershipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EndingOfOwnershipImpl.java index 3aafe924..632fca5a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EndingOfOwnershipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EndingOfOwnershipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.EndingOfOwnership; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.EndingOfOwnership; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of EndingOfOwnership. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EnumeratedClassImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EnumeratedClassImpl.java index b3aae688..befcaece 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EnumeratedClassImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EnumeratedClassImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.EnumeratedClass; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.EnumeratedClass; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of EnumeratedClass. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EventImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EventImpl.java index 9cc40c89..2fdc6889 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/EventImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EventImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Event; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Event; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Event. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java index b337b28b..038cb708 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ExchangeOfGoodsAndMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ExchangeOfGoodsAndMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ExchangeOfGoodsAndMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionImpl.java index 8e22bfd9..d870c8c2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Function_; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Function_; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Function. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalObjectImpl.java index 2ff8601c..20bbf569 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.FunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.FunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of FunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemComponentImpl.java index d7dbc8ff..133ca40d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.FunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of FunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemImpl.java index e9c0e697..65c779f5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/FunctionalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.FunctionalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of FunctionalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationImpl.java index 820ac04f..27c045ea 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Identification; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Identification; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Identification. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java index bd771c87..0a342fc4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.IdentificationOfPhysicalQuantity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.IdentificationOfPhysicalQuantity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of IdentificationOfPhysicalQuantity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InPlaceBiologicalComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InPlaceBiologicalComponentImpl.java index 239870ac..83a895e8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InPlaceBiologicalComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InPlaceBiologicalComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.InPlaceBiologicalComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.InPlaceBiologicalComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of InPlaceBiologicalComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IndividualImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IndividualImpl.java index 16f2f5bb..08ae91f1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IndividualImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IndividualImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Individual; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Individual; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Individual. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java index d6571d77..f914df7f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.InstalledFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of InstalledFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledObjectImpl.java index 72bee6b6..57e101b2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/InstalledObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.InstalledObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.InstalledObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of InstalledObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IntentionallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IntentionallyConstructedObjectImpl.java index 2cf4820b..7819462f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/IntentionallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IntentionallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.IntentionallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.IntentionallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of IntentionallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfActivityImpl.java index 9c4b8fc5..f6a6eb7e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfAssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfAssociationImpl.java index 06b1ab17..8a19d546 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfAssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfAssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfAssociation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfAssociation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfAssociation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalObjectImpl.java index 8a698998..88800d7f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java index ac4d1256..93faf05a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfBiologicalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfBiologicalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemImpl.java index e5dc84db..230309f2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfBiologicalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfBiologicalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfBiologicalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalObjectImpl.java index 08c65e89..5eca25cb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java index 124a7d0d..57713add 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemImpl.java index c02a7793..a2e4ac27 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfFunctionalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfFunctionalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfFunctionalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIndividualImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIndividualImpl.java index 3cfb5d27..1b385202 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIndividualImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIndividualImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfIndividual; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfIndividual; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfIndividual. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java index a9541ec3..ba10304e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfIntentionallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfIntentionallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java index 2101886f..70ad859b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfOrdinaryBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfOrdinaryBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java index 34d6980a..93614fe0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfOrdinaryFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfOrdinaryFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java index 0cb350af..2539f9fc 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfOrdinaryPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfOrdinaryPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationComponentImpl.java index 25fa1873..d14cf7c2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfOrganizationComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfOrganizationComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationImpl.java index 327af22d..d7a4a3fb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfOrganizationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfOrganization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfOrganization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPartyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPartyImpl.java index 2f333ff6..cec2c078 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPartyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPartyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfParty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfParty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfParty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPersonImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPersonImpl.java index 6276b2fb..bc243675 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPersonImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPersonImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfPerson; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPerson; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfPerson. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalObjectImpl.java index 6e55dae2..adbb9984 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalPropertyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalPropertyImpl.java index 7364bd2b..0a1e2664 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalPropertyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalPropertyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfPhysicalProperty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalProperty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfPhysicalProperty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalQuantityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalQuantityImpl.java index 5eba4f71..d19b104f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPhysicalQuantityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalQuantityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfPhysicalQuantity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalQuantity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfPhysicalQuantity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPositionImpl.java index be3bc08f..5ac64bdd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java index 4f36400f..0c1a75f6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfRelationshipWithRestriction; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithRestriction; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfRelationshipWithRestriction. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java index 7dffaa7c..174cc1d7 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfRelationshipWithSignature; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithSignature; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfRelationshipWithSignature. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java index 8d766e13..4b27fbc0 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfSociallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfSociallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemComponentImpl.java index a83ab795..a7d9ae4f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemImpl.java index fec05a04..f378bea4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/KindOfSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.KindOfSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.KindOfSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of KindOfSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/LanguageCommunityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/LanguageCommunityImpl.java index b1876b3d..60315214 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/LanguageCommunityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/LanguageCommunityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.LanguageCommunity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.LanguageCommunity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of LanguageCommunity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/MoneyAssetImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/MoneyAssetImpl.java index 39574728..ae306e0e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/MoneyAssetImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/MoneyAssetImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.MoneyAsset; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.MoneyAsset; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of MoneyAsset. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java index b8f5f35b..21522130 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OfferAndAcceptanceForGoods; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OfferAndAcceptanceForGoods; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OfferAndAcceptanceForGoods. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferForGoodsImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferForGoodsImpl.java index 20ba704e..d54dfb68 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferForGoodsImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferForGoodsImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OfferForGoods; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OfferForGoods; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OfferForGoods. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferImpl.java index f1b37c35..8eacf80d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Offer; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Offer; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Offer. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferingImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferingImpl.java index 2e57a203..bc3ea4b4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OfferingImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferingImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Offering; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Offering; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Offering. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java index 7a5dea31..b92bbd14 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OrdinaryBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OrdinaryBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java index 387ab126..8cc39c55 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OrdinaryFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OrdinaryFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java index 758dd473..58a63002 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OrdinaryPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OrdinaryPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationComponentImpl.java index cf2678af..672eb388 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.OrganizationComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.OrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of OrganizationComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationImpl.java index 4f1f861b..f07f35b1 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OrganizationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Organization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Organization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Organization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnerImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnerImpl.java index 6dfb219d..4654bdef 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnerImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnerImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Owner; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Owner; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Owner. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnershipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnershipImpl.java index 64588886..bdbfdf3e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/OwnershipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnershipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Ownership; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Ownership; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Ownership. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantImpl.java index 8f63c356..765d7b6e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Participant; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Participant. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java index 56033d38..8c9f7f5b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ParticipantInActivityOrAssociation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ParticipantInActivityOrAssociation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ParticipantInActivityOrAssociation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PartyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PartyImpl.java index 31fbd2aa..4c45612d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PartyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PartyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Party; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Party; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Party. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PatternImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PatternImpl.java index 2457238d..3661a20e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PatternImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PatternImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Pattern; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Pattern; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Pattern. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PeriodOfTimeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PeriodOfTimeImpl.java index 7b9248ea..67491e87 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PeriodOfTimeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PeriodOfTimeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PeriodOfTime; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PeriodOfTime. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonImpl.java index 61e0fa72..487f0ce3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Person; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Person; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Person. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonInPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonInPositionImpl.java index 600cc6b7..243f1aa2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PersonInPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonInPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PersonInPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PersonInPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PersonInPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalObjectImpl.java index 2cf5e5dd..d16f7f15 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyImpl.java index 00f4cc52..c86f36e2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PhysicalProperty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PhysicalProperty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyRangeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyRangeImpl.java index da23d975..d79c1ccc 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalPropertyRangeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyRangeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PhysicalPropertyRange; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PhysicalPropertyRange; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PhysicalPropertyRange. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityImpl.java index 58742d5d..c344602c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PhysicalQuantity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PhysicalQuantity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityRangeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityRangeImpl.java index 90e85b69..8b6dc2ff 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PhysicalQuantityRangeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityRangeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PhysicalQuantityRange; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantityRange; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PhysicalQuantityRange. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PlanImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PlanImpl.java index ac84ec06..50e9deb2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PlanImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PlanImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Plan; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Plan; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Plan. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PointInTimeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PointInTimeImpl.java index 7043d61c..71490dc2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PointInTimeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PointInTimeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PointInTime; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PointInTime; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PointInTime. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PositionImpl.java index b7b2ed5a..641720c3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Position; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Position; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Position. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PossibleWorldImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PossibleWorldImpl.java index 5db44987..fc5ebc6d 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PossibleWorldImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PossibleWorldImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of PossibleWorld. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PriceImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PriceImpl.java index 8481e59b..c7ab38df 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/PriceImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PriceImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Price; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Price; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Price. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductBrandImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductBrandImpl.java index d81119e5..c01356ad 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductBrandImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductBrandImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ProductBrand; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ProductBrand; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ProductBrand. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductOfferingImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductOfferingImpl.java index 7091645f..2f23b0b2 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ProductOfferingImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductOfferingImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ProductOffering; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ProductOffering; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ProductOffering. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ReachingAgreementImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ReachingAgreementImpl.java index 1ce0a00e..19eacf74 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ReachingAgreementImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ReachingAgreementImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.ReachingAgreement; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of ReachingAgreement. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RecognizingLanguageCommunityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RecognizingLanguageCommunityImpl.java index 7ca7bcbb..265f6344 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RecognizingLanguageCommunityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RecognizingLanguageCommunityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.RecognizingLanguageCommunity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of RecognizingLanguageCommunity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RelationshipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RelationshipImpl.java index c5151956..5a7bf06e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RelationshipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RelationshipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Relationship; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Relationship; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Relationship. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationByPatternImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationByPatternImpl.java index efd33b6e..a1c53785 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationByPatternImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationByPatternImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.RepresentationByPattern; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of RepresentationByPattern. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationBySignImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationBySignImpl.java index a3d57e4f..734e36a8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RepresentationBySignImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationBySignImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.RepresentationBySign; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.RepresentationBySign; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of RepresentationBySign. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementImpl.java index 90d26464..e6a88301 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Requirement; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Requirement; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Requirement. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementSpecificationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementSpecificationImpl.java index 33c4b1ee..58e8c418 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RequirementSpecificationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementSpecificationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.RequirementSpecification; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of RequirementSpecification. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RoleImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RoleImpl.java index 5329ed5d..365ea6d4 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/RoleImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RoleImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Role; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Role. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SaleOfGoodsImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SaleOfGoodsImpl.java index 6531be81..081bca54 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SaleOfGoodsImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SaleOfGoodsImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SaleOfGoods; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SaleOfGoods; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SaleOfGoods. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductImpl.java index 7bdbc6e5..42025854 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SalesProduct; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SalesProduct; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SalesProduct. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductInstanceImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductInstanceImpl.java index 1294e678..3f7b96cc 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductInstanceImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductInstanceImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SalesProductInstance; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SalesProductInstance; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SalesProductInstance. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductVersionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductVersionImpl.java index 428a8ddd..85151900 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SalesProductVersionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductVersionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SalesProductVersion; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SalesProductVersion; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SalesProductVersion. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ScaleImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ScaleImpl.java index 6fa1a941..afac7c12 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ScaleImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ScaleImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Scale; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Scale; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Scale. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SignImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SignImpl.java index 58ae126c..fbf3d958 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SignImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SignImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Sign; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Sign; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Sign. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedActivityImpl.java index ed983874..b1efaf27 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SociallyConstructedActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SociallyConstructedActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedObjectImpl.java index 18e925f9..514cc759 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SociallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SociallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SociallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpatioTemporalExtentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpatioTemporalExtentImpl.java index 548ac81b..9c774d2b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpatioTemporalExtentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpatioTemporalExtentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SpatioTemporalExtent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpecializationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpecializationImpl.java index f386e55e..ab5bce61 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SpecializationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpecializationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Specialization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Specialization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Specialization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateImpl.java index 70d42538..ab69bfff 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.State; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.State; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of State. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfActivityImpl.java index a13b1654..a3463075 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAmountOfMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAmountOfMoneyImpl.java index d559d19d..8581962f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAmountOfMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAmountOfMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfAmountOfMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfAmountOfMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfAmountOfMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAssociationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAssociationImpl.java index 7e4f4269..079e76ce 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfAssociationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAssociationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfAssociation; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfAssociation; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfAssociation. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalObjectImpl.java index 1766204e..8fde03a5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java index e86fcbd8..15fab1dd 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfBiologicalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfBiologicalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemImpl.java index acbea4f2..5220d79a 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfBiologicalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfBiologicalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfBiologicalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalObjectImpl.java index 50d1267a..0b17a3ab 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java index 1a683286..eaebd461 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfFunctionalSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemImpl.java index a73a1459..4aceaf76 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfFunctionalSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfFunctionalSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfFunctionalSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java index e8773867..5d0ab4ea 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfIntentionallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfIntentionallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfLanguageCommunityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfLanguageCommunityImpl.java index 9153f938..9b2e26ab 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfLanguageCommunityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfLanguageCommunityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfLanguageCommunity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfLanguageCommunity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfLanguageCommunity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java index 6624eca7..1bfeb5b3 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfOrdinaryBiologicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfOrdinaryBiologicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java index d38d1fd8..07772d57 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfOrdinaryFunctionalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfOrdinaryFunctionalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java index 07873a3a..e611ab10 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfOrdinaryPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfOrdinaryPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationComponentImpl.java index 307e6412..f0ad6493 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfOrganizationComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfOrganizationComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationImpl.java index 86dd798a..4244c316 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfOrganizationImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfOrganization; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrganization; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfOrganization. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPartyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPartyImpl.java index 7676c060..825a2787 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPartyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPartyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfParty; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfParty; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfParty. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPersonImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPersonImpl.java index 62e9e353..4ba88e47 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPersonImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPersonImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfPerson; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfPerson; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfPerson. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPhysicalObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPhysicalObjectImpl.java index ecd6cc61..a1de655f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPhysicalObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPhysicalObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfPhysicalObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfPhysicalObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPositionImpl.java index c0bf880d..407bc14c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfPositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfPosition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfPosition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfPosition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSalesProductInstanceImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSalesProductInstanceImpl.java index a52a36b8..e21766d8 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSalesProductInstanceImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSalesProductInstanceImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSalesProductInstance; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSalesProductInstance; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSalesProductInstance. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSignImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSignImpl.java index 41c84a8f..5ec70682 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSignImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSignImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSign; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSign; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSign. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java index 576167d9..c7f2928c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSociallyConstructedActivity; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSociallyConstructedActivity. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java index 1c0fd0fb..c10f0d90 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSociallyConstructedObject; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSociallyConstructedObject. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemComponentImpl.java index 92ec3ea9..7b5a78d6 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemImpl.java index c2663d3d..41856a3c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/StateOfSystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.StateOfSystem; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.StateOfSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of StateOfSystem. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemComponentImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemComponentImpl.java index 0331399f..65a86b38 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemComponentImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemComponentImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.SystemComponent; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.SystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of SystemComponent. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemImpl.java index 8dbfb1d4..6e3f59bb 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/SystemImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.System; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.System; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of System. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TemporalCompositionImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TemporalCompositionImpl.java index 4a6a746d..aae6d66c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TemporalCompositionImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TemporalCompositionImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.TemporalComposition; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.TemporalComposition; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of TemporalComposition. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ThingImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ThingImpl.java index 9c57a871..20e243b5 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/ThingImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ThingImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Thing. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipImpl.java index 0189d94a..af987304 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.TransferOfOwnership; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of TransferOfOwnership. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java index 16482390..ac3bf8ae 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.TransferOfOwnershipOfMoney; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnershipOfMoney; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of TransferOfOwnershipOfMoney. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransfereeImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransfereeImpl.java index bf017ddc..d68c897b 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransfereeImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransfereeImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Transferee; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Transferee; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Transferee. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferorImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferorImpl.java index 819ae750..211ba226 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/TransferorImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferorImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.Transferor; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.Transferor; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of Transferor. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/UnitOfMeasureImpl.java similarity index 85% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/UnitOfMeasureImpl.java index b573ddd3..4b51e25f 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/UnitOfMeasureImpl.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/UnitOfMeasureImpl.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.hqdm.model.UnitOfMeasure; -import uk.gov.gchq.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; /** * An implementation of UnitOfMeasure. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/package-info.java similarity index 88% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/package-info.java index 676e530d..d920063d 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/impl/package-info.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/package-info.java @@ -13,6 +13,6 @@ */ /** - * Basic implementations for HQDM Java objects defined in {@code uk.gov.gchq.hqdm.model}. + * Basic implementations for HQDM Java objects defined in {@code uk.gov.gchq.magmacore.hqdm.model}. */ -package uk.gov.gchq.hqdm.model.impl; +package uk.gov.gchq.magmacore.hqdm.model.impl; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/package-info.java similarity index 93% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/package-info.java index c176461c..45dd4035 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/model/package-info.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/package-info.java @@ -15,4 +15,4 @@ /** * HQDM object interfaces defining HQDM class inheritance. */ -package uk.gov.gchq.hqdm.model; +package uk.gov.gchq.magmacore.hqdm.model; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObject.java similarity index 98% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObject.java index 53dcb76a..405bd879 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/HqdmObject.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObject.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.pojo; +package uk.gov.gchq.magmacore.hqdm.pojo; import java.util.HashMap; import java.util.HashSet; @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Set; -import uk.gov.gchq.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.model.Thing; /** * Basic implementation of a HQDM object. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/Top.java similarity index 98% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/Top.java index ab3142b6..8576743e 100755 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/pojo/Top.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/Top.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.pojo; +package uk.gov.gchq.magmacore.hqdm.pojo; import java.util.Map; import java.util.Set; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/package-info.java similarity index 94% rename from hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/package-info.java index 0ff045be..e4cfd4d7 100644 --- a/hqdm-rdf/src/main/java/uk/gov/gchq/hqdm/rdf/package-info.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/package-info.java @@ -15,4 +15,4 @@ /** * Classes for constructing HQDM entities as Java objects. */ -package uk.gov.gchq.hqdm.rdf; +package uk.gov.gchq.magmacore.hqdm.pojo; diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/ClassServices.java similarity index 99% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/ClassServices.java index e149f30a..64db0988 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/ClassServices.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/ClassServices.java @@ -12,11 +12,11 @@ * the License. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; -import uk.gov.gchq.hqdm.model.*; -import uk.gov.gchq.hqdm.model.Class; -import uk.gov.gchq.hqdm.model.impl.*; +import uk.gov.gchq.magmacore.hqdm.model.*; +import uk.gov.gchq.magmacore.hqdm.model.Class; +import uk.gov.gchq.magmacore.hqdm.model.impl.*; /** * Service for creating HQDM Classes. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjects.java similarity index 94% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjects.java index b3b6637f..d8685a90 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/DynamicObjects.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjects.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; @@ -20,9 +20,9 @@ import java.util.HashMap; import java.util.Map; -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.hqdm.model.impl.ThingImpl; -import uk.gov.gchq.hqdm.pojo.Top; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.magmacore.hqdm.pojo.Top; /** * Service for creating dynamic proxies. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/RelationshipServices.java similarity index 73% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/RelationshipServices.java index 3520a3ec..b5bcf465 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/RelationshipServices.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/RelationshipServices.java @@ -12,28 +12,28 @@ * the License. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; -import uk.gov.gchq.hqdm.model.Aggregation; -import uk.gov.gchq.hqdm.model.Classification; -import uk.gov.gchq.hqdm.model.Composition; -import uk.gov.gchq.hqdm.model.DefinedRelationship; -import uk.gov.gchq.hqdm.model.Function_; -import uk.gov.gchq.hqdm.model.Relationship; -import uk.gov.gchq.hqdm.model.Scale; -import uk.gov.gchq.hqdm.model.Specialization; -import uk.gov.gchq.hqdm.model.TemporalComposition; -import uk.gov.gchq.hqdm.model.UnitOfMeasure; -import uk.gov.gchq.hqdm.model.impl.AggregationImpl; -import uk.gov.gchq.hqdm.model.impl.ClassificationImpl; -import uk.gov.gchq.hqdm.model.impl.CompositionImpl; -import uk.gov.gchq.hqdm.model.impl.DefinedRelationshipImpl; -import uk.gov.gchq.hqdm.model.impl.FunctionImpl; -import uk.gov.gchq.hqdm.model.impl.RelationshipImpl; -import uk.gov.gchq.hqdm.model.impl.ScaleImpl; -import uk.gov.gchq.hqdm.model.impl.SpecializationImpl; -import uk.gov.gchq.hqdm.model.impl.TemporalCompositionImpl; -import uk.gov.gchq.hqdm.model.impl.UnitOfMeasureImpl; +import uk.gov.gchq.magmacore.hqdm.model.Aggregation; +import uk.gov.gchq.magmacore.hqdm.model.Classification; +import uk.gov.gchq.magmacore.hqdm.model.Composition; +import uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship; +import uk.gov.gchq.magmacore.hqdm.model.Function_; +import uk.gov.gchq.magmacore.hqdm.model.Relationship; +import uk.gov.gchq.magmacore.hqdm.model.Scale; +import uk.gov.gchq.magmacore.hqdm.model.Specialization; +import uk.gov.gchq.magmacore.hqdm.model.TemporalComposition; +import uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure; +import uk.gov.gchq.magmacore.hqdm.model.impl.AggregationImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.ClassificationImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.CompositionImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.DefinedRelationshipImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.FunctionImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.RelationshipImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.ScaleImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.SpecializationImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.TemporalCompositionImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.UnitOfMeasureImpl; /** * Service for creating HQDM Relationships. diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/SpatioTemporalExtentServices.java similarity index 99% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/SpatioTemporalExtentServices.java index 97ec31c4..3e74a926 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/SpatioTemporalExtentServices.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/SpatioTemporalExtentServices.java @@ -12,10 +12,10 @@ * the License. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; -import uk.gov.gchq.hqdm.model.*; -import uk.gov.gchq.hqdm.model.impl.*; +import uk.gov.gchq.magmacore.hqdm.model.*; +import uk.gov.gchq.magmacore.hqdm.model.impl.*; /** * Services for creating SpatioTemporalExtent objects. @@ -1108,7 +1108,7 @@ public static StateOfSystemComponent createStateOfSystemComponent(final String i * @param id ID of the System. * @return A System instance. */ - public static uk.gov.gchq.hqdm.model.System createSystem(final String id) { + public static uk.gov.gchq.magmacore.hqdm.model.System createSystem(final String id) { return new SystemImpl(id); } diff --git a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/package-info.java similarity index 93% rename from hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/package-info.java index 9c14589c..37e3bf19 100644 --- a/hqdm/src/main/java/uk/gov/gchq/hqdm/services/package-info.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/package-info.java @@ -15,4 +15,4 @@ /** * Services for creating HQDM objects and relationships. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; diff --git a/hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObjectTest.java similarity index 85% rename from hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java rename to hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObjectTest.java index 3fe137ab..783db4e8 100755 --- a/hqdm/src/test/java/uk/gov/gchq/hqdm/pojo/HqdmObjectTest.java +++ b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObjectTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.pojo; +package uk.gov.gchq.magmacore.hqdm.pojo; import java.time.LocalDate; import java.time.LocalDateTime; @@ -20,13 +20,13 @@ import org.junit.Assert; import org.junit.Test; -import uk.gov.gchq.hqdm.model.PointInTime; -import uk.gov.gchq.hqdm.model.PossibleWorld; -import uk.gov.gchq.hqdm.model.SpatioTemporalExtent; -import uk.gov.gchq.hqdm.model.impl.PointInTimeImpl; -import uk.gov.gchq.hqdm.model.impl.PossibleWorldImpl; -import uk.gov.gchq.hqdm.model.impl.SpatioTemporalExtentImpl; -import uk.gov.gchq.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.magmacore.hqdm.model.PointInTime; +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.magmacore.hqdm.model.impl.PointInTimeImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.PossibleWorldImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.SpatioTemporalExtentImpl; +import uk.gov.gchq.magmacore.hqdm.model.impl.ThingImpl; /** * HqdmObject tests. diff --git a/hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjectsTest.java similarity index 92% rename from hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java rename to hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjectsTest.java index 0b162234..e661e22d 100755 --- a/hqdm/src/test/java/uk/gov/gchq/hqdm/services/DynamicObjectsTest.java +++ b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjectsTest.java @@ -12,7 +12,7 @@ * the License. */ -package uk.gov.gchq.hqdm.services; +package uk.gov.gchq.magmacore.hqdm.services; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -20,9 +20,9 @@ import org.junit.Test; -import uk.gov.gchq.hqdm.model.Participant; -import uk.gov.gchq.hqdm.model.Party; -import uk.gov.gchq.hqdm.model.Person; +import uk.gov.gchq.magmacore.hqdm.model.Participant; +import uk.gov.gchq.magmacore.hqdm.model.Party; +import uk.gov.gchq.magmacore.hqdm.model.Person; /** * Test creation of dynamic objects. From 70743f8cfd3e9986dac9ad8ec5cb4d9db0ec133a Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Mon, 11 Jul 2022 10:51:39 +0000 Subject: [PATCH 88/91] Added HQDM section to README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 79f6bcea..0c46ac2d 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,13 @@ This code release is a contribution to support the adoption of data models that \* Dr. West was not involved in the creation of this project. GCHQ are grateful for his open contributions to the field of ontology and data quality management. + +## The High Quality Data Model for Data Integration in Java + +HQDM contains the replication of an openly available data model based on key ontological foundations to enable the consistent integration of data. The HQDM Java package comprises a set of Java classes and respective interfaces, 230 in total, to replicate the entity-relationship model published by Dr Matthew West as the [High Quality Data Model Framework](http://www.informationjunction.co.uk/hqdm_framework/). This class model can be used to create extensions of the entity types, based on the founding ontological commitments and logical restrictions (such as cardinalities), and instances of those types all in Java application code. This, in theory at least, provides a framework for the consistent representation of almost anything that is, or could be, real\*. All the data model patterns published in the HQDM framework are supported by the HQDM package. The object properties are constructed around a top-level Java HQDM Object class with some root attributes to enable class-instances to be managed in a database. The choice of database can be left to the user but the structure of the attributes is optimised for the use of [Linked Data IRIs](https://www.w3.org/TR/rdf11-concepts/#section-IRIs) and [RDF triples](https://www.w3.org/TR/rdf11-concepts/#section-triples) to represent HQDM object relationships and other object properties as predicates. All of the HQDM objects can be created and searched using the HQDMObject methods and collections can be handled using the Object Factory. To complement this there is an OWL version of the HQDM data model that is a close match for the original EXPRESS model and the HQDM Java package. + +\* This is a gross simplification, but it characterises the goal of the model and in use it has proved to be very capable. The UK's National Digital Twin programme is developing a model that aims to address this goal with even more rigour, called the Foundation Data Model (FDM). Data created using HQDM is likely to be mappable to the FDM with low mapping (due to similar ontological commitments). + ## Getting Started An introduction to Magma Core is provided in the [Magma Core Wiki](https://github.com/gchq/MagmaCore/wiki). From eea742ebce19fce8e67454b04bf6131a51fb0849 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 Date: Fri, 15 Jul 2022 14:00:41 +0000 Subject: [PATCH 89/91] Upgrade to Java 17 --- hqdm-rdf/pom.xml | 2 +- hqdm/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hqdm-rdf/pom.xml b/hqdm-rdf/pom.xml index 3e887cc1..d4923eef 100644 --- a/hqdm-rdf/pom.xml +++ b/hqdm-rdf/pom.xml @@ -15,7 +15,7 @@ UTF-8 - 15 + 17 diff --git a/hqdm/pom.xml b/hqdm/pom.xml index d6a98837..83a832eb 100644 --- a/hqdm/pom.xml +++ b/hqdm/pom.xml @@ -15,7 +15,7 @@ UTF-8 - 15 + 17 diff --git a/pom.xml b/pom.xml index 381e2b12..8c3cc93d 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ UTF-8 - 15 + 17 From 40eff913d1354dbb66c673001dbbe2a239a47523 Mon Sep 17 00:00:00 2001 From: Benjamin 59015 <70384549+GCHQDeveloper42@users.noreply.github.com> Date: Fri, 15 Jul 2022 14:44:29 +0000 Subject: [PATCH 90/91] Updated README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c46ac2d..928a9daf 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ An introduction to Magma Core is provided in the [Magma Core Wiki](https://githu ### Prerequisites -- [Java 15](https://openjdk.java.net/projects/jdk/15/) - Core language +- [Java 17](https://openjdk.java.net/projects/jdk/17/) - Core language - [Maven](https://maven.apache.org/) - Dependency management ### Inclusion in other projects From 3105380a83ebad907a98ca1276b0639ff5bd4f4c Mon Sep 17 00:00:00 2001 From: Benjamin 59015 <70384549+GCHQDeveloper42@users.noreply.github.com> Date: Fri, 23 Sep 2022 13:15:58 +0000 Subject: [PATCH 91/91] Updated Magma Core version to 2.0.0. Updated maven dependencies. --- core/pom.xml | 4 +-- examples/pom.xml | 4 +-- .../magmacore/examples/data/ExampleRdl.java | 2 +- hqdm-rdf/pom.xml | 4 +-- hqdm/pom.xml | 4 +-- pom.xml | 36 +++++++++---------- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index e8200b1e..2891bdbf 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -4,12 +4,12 @@ uk.gov.gchq.magma-core magma-core - 1.1-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core core - 1.0-SNAPSHOT + 2.0.0 core diff --git a/examples/pom.xml b/examples/pom.xml index 5ea47717..40cb0bcd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,12 +4,12 @@ uk.gov.gchq.magma-core magma-core - 1.1-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core demo - 1.0-SNAPSHOT + 2.0.0 examples diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java index 0dd2addd..77ff1ef4 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java @@ -53,7 +53,7 @@ public static DbChangeSet createRefDataObjects() { final IRI naturalMemberOfSocietyRole = new IRI(REF_BASE, uid()); final IRI domesticPropertyRole = new IRI(REF_BASE, uid()); final IRI domesticOccupantInPropertyRole = new IRI(REF_BASE, uid()); - final IRI occupierOfPropertyRole = new IRI(REF_BASE, "occupierOfPropertyRole "); + final IRI occupierOfPropertyRole = new IRI(REF_BASE, "occupierOfPropertyRole"); final IRI occupantInPropertyKindOfAssociation = new IRI(REF_BASE, uid()); // Add DbCreateOperations to create the objects and their properties. diff --git a/hqdm-rdf/pom.xml b/hqdm-rdf/pom.xml index d4923eef..eef760e3 100644 --- a/hqdm-rdf/pom.xml +++ b/hqdm-rdf/pom.xml @@ -4,12 +4,12 @@ uk.gov.gchq.magma-core magma-core - 1.1-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core hqdm-rdf - 1.0-SNAPSHOT + 2.0.0 hqdm-rdf diff --git a/hqdm/pom.xml b/hqdm/pom.xml index 83a832eb..06d54521 100644 --- a/hqdm/pom.xml +++ b/hqdm/pom.xml @@ -4,12 +4,12 @@ uk.gov.gchq.magma-core magma-core - 1.1-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core hqdm - 1.1-SNAPSHOT + 2.0.0 hqdm diff --git a/pom.xml b/pom.xml index 8c3cc93d..31b3024b 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ uk.gov.gchq.magma-core magma-core - 1.1-SNAPSHOT + 2.0.0 pom Magma Core @@ -54,22 +54,22 @@ uk.gov.gchq.magma-core core - 1.0-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core hqdm - 1.1-SNAPSHOT + 2.0.0 uk.gov.gchq.magma-core hqdm-rdf - 1.0-SNAPSHOT + 2.0.0 junit junit - 4.13.1 + 4.13.2 test @@ -81,12 +81,12 @@ org.apache.jena apache-jena-libs pom - 4.3.2 + 4.5.0 org.slf4j slf4j-jdk14 - 1.7.12 + 2.0.2
@@ -101,7 +101,7 @@ com.puppycrawl.tools checkstyle - 8.42 + 10.3.3 @@ -128,46 +128,46 @@ maven-clean-plugin - 3.1.0 + 3.2.0 maven-resources-plugin - 3.2.0 + 3.3.0 maven-compiler-plugin - 3.8.1 + 3.10.1 maven-surefire-plugin - 3.0.0-M6 + 3.0.0-M7 maven-jar-plugin - 3.2.0 + 3.3.0 maven-install-plugin - 3.0.0-M1 + 3.0.1 maven-deploy-plugin - 3.0.0-M1 + 3.0.0 maven-site-plugin - 3.9.1 + 3.12.1 maven-project-info-reports-plugin - 3.1.1 + 3.4.1 org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.4.1