diff --git a/.gitignore b/.gitignore index 7f2e6b99..a93a114f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,11 +6,13 @@ target/ bin/ tdb/ +out *.code-workspace *.iml *.ttl .DS_Store .factorypath +.devcontainer # Compiled class file @@ -36,3 +38,8 @@ 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/.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/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/HQDM b/HQDM deleted file mode 160000 index 0f0b7cc3..00000000 --- a/HQDM +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0f0b7cc3d345f648884394d7864cba9b403ab6d3 diff --git a/README.md b/README.md index 4acdb607..928a9daf 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,35 @@ 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 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 +- [Java 17](https://openjdk.java.net/projects/jdk/17/) - Core language - [Maven](https://maven.apache.org/) - Dependency management -## Setup +### 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 + +``` -- 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` - - 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` +_Magma Core is not currently hosted on Maven Central, so a local install of this repository will be required._ ## Contributing diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index d0e6ac98..0c9061e4 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -2,6 +2,21 @@ - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + diff --git a/core/pom.xml b/core/pom.xml new file mode 100644 index 00000000..2891bdbf --- /dev/null +++ b/core/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 2.0.0 + + + uk.gov.gchq.magma-core + core + 2.0.0 + + core + + + UTF-8 + 17 + + + + + uk.gov.gchq.magma-core + hqdm + + + uk.gov.gchq.magma-core + hqdm-rdf + + + junit + junit + + + org.apache.jena + apache-jena-libs + pom + + + org.slf4j + slf4j-jdk14 + + + diff --git a/core/src/main/java/module-info.java b/core/src/main/java/module-info.java new file mode 100644 index 00000000..9243f77d --- /dev/null +++ b/core/src/main/java/module-info.java @@ -0,0 +1,35 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * 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 org.apache.jena.arq; + requires org.apache.jena.base; + requires org.apache.jena.core; + requires org.apache.jena.dboe.base; + requires org.apache.jena.rdfconnection; + requires org.apache.jena.tdb2; + requires com.fasterxml.jackson.annotation; + + 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; + 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 69% 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 index 99da38c8..62968ae2 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreDatabase.java @@ -17,15 +17,37 @@ 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.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. */ 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. * @@ -59,8 +81,8 @@ 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. - * @return The object(s). + * @param objectIri IRI of the object to match. + * @return The {@link Thing}(s) found. */ List findByPredicateIri(IRI predicateIri, IRI objectIri); @@ -68,17 +90,16 @@ 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); /** - * 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. - * @return The object(s). + * @param value Case-sensitive string to match. + * @return The {@link Thing}(s) found. */ List findByPredicateIriAndStringValue(IRI predicateIri, String value); @@ -86,8 +107,8 @@ 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. - * @return The object(s). + * @param value Case-insensitive string to match. + * @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/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java similarity index 74% 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 bf1f6d1e..09e05a87 100644 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreJenaDatabase.java +++ b/core/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; @@ -44,13 +43,14 @@ 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.pojo.HqdmObjectFactory; -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; +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 @@ -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,16 +98,16 @@ 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()); } /** - * 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,25 +115,31 @@ public void begin() { } /** - * Commit a transaction - finish the transaction and make any changes permanent (if a "write" - * transaction). + * {@inheritDoc} */ + @Override 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). + * {@inheritDoc} */ + @Override public void abort() { - dataset.abort(); - dataset.end(); + 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); @@ -144,8 +150,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()) { @@ -160,14 +165,10 @@ public Thing get(final IRI iri) { */ @Override public void create(final Thing object) { - final Resource resource = - dataset.getDefaultModel().createResource(object.getIri().toString()); - - 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()))); } /** @@ -184,7 +185,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 {<%s> ?p ?o} WHERE {<%s> ?p ?o}", object.getId(), object.getId())); } /** @@ -192,9 +193,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); } @@ -204,9 +204,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); } @@ -215,10 +214,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); } @@ -227,13 +225,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); } @@ -270,8 +265,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(); @@ -309,8 +303,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()); } @@ -333,7 +326,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) { @@ -341,5 +334,4 @@ public final void dump(final PrintStream out, final Lang language) { RDFDataMgr.write(out, dataset.getDefaultModel(), language); abort(); } - } 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 new file mode 100644 index 00000000..f6177ff7 --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreRemoteSparqlDatabase.java @@ -0,0 +1,309 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.query.Dataset; +import org.apache.jena.query.QueryExecution; +import org.apache.jena.query.QuerySolution; +import org.apache.jena.query.ResultSet; +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.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. + */ +public class MagmaCoreRemoteSparqlDatabase implements MagmaCoreDatabase { + + private final RDFConnection connection; + + /** + * Constructs a MagmaCoreRemoteSparqlDatabase connection to a SPARQL server. + * + * @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(); + } + + /** + * 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. + */ + public MagmaCoreRemoteSparqlDatabase(final String serviceUrl, final Dataset dataset) { + this(serviceUrl); + + 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} + */ + @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.getId()); + + 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 {<%s> ?p ?o} WHERE {<%s> ?p ?o}", object.getId(), object.getId())); + } + + /** + * {@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/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 93% 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 e063de49..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; @@ -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/core/src/main/java/uk/gov/gchq/magmacore/database/query/QueryResultList.java similarity index 91% 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 325df9d9..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; @@ -26,9 +26,9 @@ 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 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/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/core/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java b/core/src/main/java/uk/gov/gchq/magmacore/exception/DbTransformationException.java new file mode 100644 index 00000000..0e3a0f24 --- /dev/null +++ b/core/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); + } +} 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 74% 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 index a893f999..34433187 100644 --- a/src/main/java/uk/gov/gchq/magmacore/exception/MagmaCoreException.java +++ b/core/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/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/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java new file mode 100644 index 00000000..69324f8c --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -0,0 +1,148 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +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}. + */ +public class MagmaCoreService { + + private final MagmaCoreDatabase database; + + /** + * Constructs a MagmaCoreService for a {@link MagmaCoreDatabase}. + * + * @param database {@link MagmaCoreDatabase} to build the service for. + */ + MagmaCoreService(final MagmaCoreDatabase database) { + this.database = database; + } + + /** + * Find an object by its {@link HQDM#ENTITY_NAME}. + * + * @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) { + 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: " + entityName); + } else { + throw new RuntimeException("Multiple entities found with name: " + entityName); + } + } + + /** + * Create a new {@link Thing} in the database. + * + * @param thing {@link Thing} to create. + */ + public void create(final Thing thing) { + database.create(thing); + } + + /** + * Update an existing {@link Thing} in the database. + * + * @param thing {@link Thing} to update. + */ + public void update(final Thing thing) { + database.update(thing); + } + + /** + * Get a {@link Thing} by its IRI. + * + * @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} by its {@link IRI} in a transactional database. + * + * @param iri {@link IRI} of the {@link Thing}. + * @return {@link Thing} to get. + */ + public Thing getInTransaction(final IRI iri) { + try { + database.begin(); + final Thing result = database.get(iri); + database.commit(); + return result; + } catch (final Exception e) { + database.abort(); + throw e; + } + } + + /** + * Run a {@link Function} in a transaction. + * + * @param func {@link Function} to run. + */ + public void runInTransaction(final Function func) { + try { + database.begin(); + func.apply(this); + database.commit(); + } catch (final Exception e) { + database.abort(); + throw e; + } + } + + /** + * Find entities by their names. + * + * @param entityNames {@link List} of entity names. + * @return {@link Map} of {@link String} to {@link Thing}. + */ + public Map findByEntityNameInTransaction(final List entityNames) { + try { + database.begin(); + final HashMap result = new HashMap(); + + for (final String name : entityNames) { + result.put(name, findByEntityName(name)); + } + + database.commit(); + + return result; + } catch (final Exception e) { + database.abort(); + throw e; + } + } +} 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 new file mode 100644 index 00000000..d696aa6a --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFactory.java @@ -0,0 +1,56 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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; +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 a {@link MagmaCoreService} for a new {@link MagmaCoreJenaDatabase}. + * + * @return {@link MagmaCoreService}. + */ + public static MagmaCoreService createWithJenaDatabase() { + return new MagmaCoreService(new MagmaCoreJenaDatabase()); + } + + /** + * Create a {@link MagmaCoreService} for a new {@link MagmaCoreJenaDatabase} with a remote Jena + * server. + * + * @param location URL of the database. + * @return {@link MagmaCoreService}. + */ + public static MagmaCoreService createWithJenaDatabase(final String location) { + return new MagmaCoreService(new MagmaCoreJenaDatabase(location)); + } + + /** + * Create a {@link MagmaCoreService} for a new {@link MagmaCoreRemoteSparqlDatabase} with a SPARQL + * server connection. + * + * @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/demo/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/service/package-info.java similarity index 80% rename from src/main/java/uk/gov/gchq/magmacore/demo/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/package-info.java index 50b70a24..b3db716d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/demo/package-info.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/package-info.java @@ -13,7 +13,6 @@ */ /** - * Classes demonstrating implementation and use of Magma Core databases, SPARQL queries and Fuseki - * server. + * Services for interacting with Magma Core Databases. */ -package uk.gov.gchq.magmacore.demo; +package uk.gov.gchq.magmacore.service; diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java new file mode 100644 index 00000000..b669bbc5 --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSet.java @@ -0,0 +1,84 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.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; + +/** + * An invertible set of delete and create operations. + */ +public class DbChangeSet implements Function { + private List deletes; + private List creates; + + /** + * 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}. + */ + public DbChangeSet(final List deletes, final List creates) { + this.deletes = deletes; + this.creates = creates; + } + + /** + * Apply the change set to a {@link MagmaCoreService}. + */ + @Override + public MagmaCoreService apply(final MagmaCoreService mcService) { + 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) + .orElse(Function.identity()); + + mcService.runInTransaction(deleteFunction.andThen(createFunction)); + return mcService; + } + + /** + * Invert a {@link DbChangeSet}. + * + * @param changeSet A {@link DbChangeSet} to invert. + * @return The inverted {@link DbChangeSet}. + */ + 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/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 new file mode 100644 index 00000000..0d184f21 --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbCreateOperation.java @@ -0,0 +1,142 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.transformation; + +import java.util.function.Function; + +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; + +/** + * 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; + + /** + * Constructs a DbCreateOperation to create a predicate. + * + * @param subject Subject {@link IRI}. + * @param predicate Predicate {@link IRI}. + * @param object {@link String} value. + */ + public DbCreateOperation(final IRI subject, final IRI predicate, final String object) { + this.subject = subject; + this.predicate = predicate; + this.object = object; + } + + /** + * Apply the operation to a {@link MagmaCoreService}. + */ + @Override + public MagmaCoreService apply(final MagmaCoreService mcService) { + final Thing thing = mcService.get(subject); + + if (thing == null) { + final Thing newThing = SpatioTemporalExtentServices.createThing(subject.getIri()); + newThing.addStringValue(predicate.getIri(), object); + mcService.create(newThing); + } else { + if (!thing.hasThisValue(predicate.getIri(), object)) { + thing.addValue(predicate.getIri(), object); + mcService.update(thing); + } else { + throw new DbTransformationException( + String.format("Triple already exists: %s, %s, %s", subject, predicate, object)); + } + } + + return mcService; + } + + /** + * Invert an operation. + * + * @param createOperation {@link DbCreateOperation} + * @return The inverted {@link DbDeleteOperation}. + */ + public static DbDeleteOperation invert(final DbCreateOperation createOperation) { + return new DbDeleteOperation(createOperation.subject, createOperation.predicate, createOperation.object); + } + + /** + * Calculate the hashcode for this object. + * + * @return hash code of this object. + */ + @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 The {@link Object} to compare. + * @return {@code true} if the objects are equal, 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/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 new file mode 100644 index 00000000..af5893bc --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbDeleteOperation.java @@ -0,0 +1,127 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.transformation; + +import java.util.function.Function; + +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; + +/** + * An invertible operation to delete a predicate. + */ +public class DbDeleteOperation implements Function { + private IRI subject; + private IRI predicate; + private String object; + + /** + * Constructs a DbDeleteOperation to delete a predicate. + * + * @param subject Subject {@link IRI}. + * @param predicate Predicate {@link IRI}. + * @param object {@link String} value. + */ + 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 MagmaCoreService}. + */ + public MagmaCoreService apply(final MagmaCoreService mcService) { + final Thing thing = mcService.get(subject); + + if (thing != null && thing.hasThisValue(predicate.getIri(), object)) { + thing.removeValue(predicate.getIri(), object); + mcService.update(thing); + return mcService; + } + + throw new DbTransformationException( + String.format("Triple not found for delete: %s, %s, %s", subject, predicate, object)); + } + + /** + * Invert a {@link DbDeleteOperation}. + * + * @param deleteOperation The {@link DbDeleteOperation} to invert. + * @return The inverted {@link DbCreateOperation}. + */ + public static DbCreateOperation invert(final DbDeleteOperation deleteOperation) { + return new DbCreateOperation(deleteOperation.subject, deleteOperation.predicate, deleteOperation.object); + } + + /** + * Calculate the hashcode for this object. + * + * @return hash code of this object. + */ + @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 The {@link Object} to compare. + * @return {@code true} if the objects are equal, 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/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java new file mode 100644 index 00000000..06e7c7a3 --- /dev/null +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/DbTransformation.java @@ -0,0 +1,84 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.transformation; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import uk.gov.gchq.magmacore.service.MagmaCoreService; + +/** + * An invertible ordered sequence of change sets. + */ +public class DbTransformation implements Function { + private List transformations; + + /** + * Constructs a DbTransformation with no operations. + */ + public DbTransformation() { + this(new LinkedList<>()); + } + + /** + * Constructs a DbTransformation with a list of transformations. + * + * @param transformations A {@link List} of {@link DbChangeSet}. + */ + public DbTransformation(final List transformations) { + this.transformations = transformations; + } + + /** + * Apply the transformation to a {@link MagmaCoreService}. + */ + @Override + public MagmaCoreService apply(final MagmaCoreService mcService) { + final Function transformation = transformations + .stream() + .map(t -> (Function) t).reduce(Function::andThen) + .orElse(Function.identity()); + + return transformation.apply(mcService); + } + + /** + * Invert this {@link DbTransformation}. + * + * @return The inverted {@link DbTransformation}. + */ + public DbTransformation invert() { + final List list = transformations + .stream() + .map(DbChangeSet::invert) + .collect(Collectors.toList()); + + Collections.reverse(list); + + return new DbTransformation(list); + } + + /** + * Add a DbChangeSet to this transformation. + * + * @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/package-info.java b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java similarity index 77% rename from src/main/java/uk/gov/gchq/magmacore/package-info.java rename to core/src/main/java/uk/gov/gchq/magmacore/service/transformation/package-info.java index 6d44109a..b021870d 100644 --- a/src/main/java/uk/gov/gchq/magmacore/package-info.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/transformation/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. + * Transformations that can be applied to a {@link uk.gov.gchq.magmacore.service.MagmaCoreService}. */ -package uk.gov.gchq.magmacore; +package uk.gov.gchq.magmacore.service.transformation; diff --git a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java b/core/src/main/java/uk/gov/gchq/magmacore/util/UID.java similarity index 64% rename from src/main/java/uk/gov/gchq/magmacore/MagmaCore.java rename to core/src/main/java/uk/gov/gchq/magmacore/util/UID.java index 44de6c4a..abe09bda 100644 --- a/src/main/java/uk/gov/gchq/magmacore/MagmaCore.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/util/UID.java @@ -12,23 +12,24 @@ * the License. */ -package uk.gov.gchq.magmacore; +package uk.gov.gchq.magmacore.util; -import uk.gov.gchq.magmacore.demo.FusekiService; +import java.util.UUID; /** - * Application entry point. + * Wrapper for UUID to generate a random UUID. */ -public final class MagmaCore { +public final class UID { - private MagmaCore() {} + private UID() { + } /** - * Executes FusekiService or selected database example. + * Create a new random UUID to assign to an object. * - * @param args Application arguments. + * @return A Randomly generated UUID. */ - public static void main(final String[] args) { - new FusekiService().run(); + public static String uid() { + return UUID.randomUUID().toString(); } } 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 93% 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 index 7a575772..15395bb2 100644 --- 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 @@ -13,6 +13,6 @@ */ /** - * Collection of Magma Core utility classes. + * Utilities for Magma Core. */ package uk.gov.gchq.magmacore.util; 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 new file mode 100644 index 00000000..a4ffaea2 --- /dev/null +++ b/core/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.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. + */ +public class MagmaCoreServiceTest { + + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test"); + + /** + * Test that triples can be deleted. + */ + @Test + public void test() { + final MagmaCoreJenaDatabase database = new MagmaCoreJenaDatabase(); + + final IRI individualIri = new IRI(TEST_BASE, "individual"); + final Individual individual = SpatioTemporalExtentServices.createIndividual(individualIri.getIri()); + + individual.addValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual"); + + database.begin(); + database.create(individual); + database.commit(); + + individual.removeValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual"); + + database.begin(); + database.update(individual); + database.commit(); + + database.begin(); + final Thing individualFromDb = database.get(individualIri); + database.commit(); + + assertNull(individualFromDb); + } +} 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 new file mode 100644 index 00000000..cf91e72d --- /dev/null +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbChangeSetTest.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.magmacore.service.transformation; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.junit.Test; + +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; + +/** + * Check that {@link DbChangeSet} works correctly. + */ +public class DbChangeSetTest { + + 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 MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + // 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"))); + + // Apply the operations to the dataset. + mcService.runInTransaction(createIndividual); + + // Find the individual and assert values are present. + final Thing individual = mcService.getInTransaction(individualIri); + + 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 and apply them in reverse order. + mcService.runInTransaction(DbChangeSet.invert(createIndividual)); + + assertNull(mcService.getInTransaction(individualIri)); + } +} 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 new file mode 100644 index 00000000..1d96aa99 --- /dev/null +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbOperationTest.java @@ -0,0 +1,180 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.transformation; + +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.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; + +/** + * Check that {@link DbCreateOperation} and {@link DbDeleteOperation} work correctly. + */ +public class DbOperationTest { + + 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 + * undo the {@link DbCreateOperation}. + */ + @Test + public void testCreateAndDelete() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + // Create an operation to add an object with dummy values. + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, RDFS.RDF_TYPE, + HQDM.INDIVIDUAL.getIri()); + final DbCreateOperation createIndividualMemberOf = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + + // Apply the operations. + mcService.runInTransaction(createIndividual); + mcService.runInTransaction(createIndividualMemberOf); + + // Find the individual and assert it's presence. + final Thing individual = mcService.getInTransaction(individualIri); + + 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(createIndividualMemberOf)); + + final Thing individualFromDb = mcService.getInTransaction(individualIri); + assertFalse(individualFromDb.hasThisValue(HQDM.MEMBER_OF.getIri(), "classOfIndividual")); + } + + /** + * 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 MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + // 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 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 individual = mcService.getInTransaction(individualIri); + + 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(createIndividualPartOfPossibleWorld)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividualMemberOf)); + mcService.runInTransaction(DbCreateOperation.invert(createIndividual)); + + final Thing individualFromDb = mcService.getInTransaction(individualIri); + assertNull(individualFromDb); + } + + /** + * Test that we get an exception when trying to create something that already exists. + */ + @Test(expected = DbTransformationException.class) + public void testCreateWhenAlreadyPresent() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + // Create an operation to add an object with dummy values. + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, RDFS.RDF_TYPE, + HQDM.INDIVIDUAL.getIri()); + + // Apply the operation twice, the second should throw an exception. + mcService.runInTransaction(createIndividual); + mcService.runInTransaction(createIndividual); + } + + /** + * Test that we get an exception when trying to delete something that does not exist. + */ + @Test(expected = DbTransformationException.class) + public void testDeleteWhenNotPresent() { + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + // Create an operation to add an object with dummy values. + final DbDeleteOperation deleteIndividual = new DbDeleteOperation(individualIri, HQDM.INDIVIDUAL, + "value not present"); + + // Apply the operation, it should throw an exception. + mcService.runInTransaction(deleteIndividual); + } + + /** + * Test the equals method for {@link DbCreateOperation}. + */ + @Test + public void testDbCreateEquals() { + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + final DbCreateOperation createIndividual = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + final DbCreateOperation deleteIndividual = new DbCreateOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + + assertTrue(createIndividual.equals(deleteIndividual)); + assertEquals(createIndividual.hashCode(), deleteIndividual.hashCode()); + } + + /** + * Test the equals method for {@link DbDeleteOperation}. + */ + @Test + public void testDbDeleteEquals() { + final IRI individualIri = new IRI(TEST_BASE, "individual"); + + final DbDeleteOperation deleteIndividual = new DbDeleteOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + final DbDeleteOperation deleteAbsentIndividual = new DbDeleteOperation(individualIri, HQDM.MEMBER_OF, + "classOfIndividual"); + + assertTrue(deleteIndividual.equals(deleteAbsentIndividual)); + assertEquals(deleteIndividual.hashCode(), deleteAbsentIndividual.hashCode()); + } +} 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 new file mode 100644 index 00000000..73792058 --- /dev/null +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/transformation/DbTransformationTest.java @@ -0,0 +1,87 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.transformation; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.junit.Test; + +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; + +/** + * Check that {@link DbTransformation} works correctly. + */ +public class DbTransformationTest { + + 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_BASE, "individual"); + 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 DbTransformation transformation = new DbTransformation(List.of(createIndividual, createPerson)); + + // Apply the operations. + mcService.runInTransaction(transformation); + + // Find the individual we just created and assert values are present. + final Thing individual = mcService.getInTransaction(individualIri); + + 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 person = mcService.getInTransaction(personIri); + + 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()); + + assertNull(mcService.getInTransaction(individualIri)); + assertNull(mcService.getInTransaction(personIri)); + } +} diff --git a/examples/pom.xml b/examples/pom.xml new file mode 100644 index 00000000..40cb0bcd --- /dev/null +++ b/examples/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 2.0.0 + + + uk.gov.gchq.magma-core + demo + 2.0.0 + + examples + + + UTF-8 + 17 + + + + + uk.gov.gchq.magma-core + core + + + uk.gov.gchq.magma-core + hqdm + + + uk.gov.gchq.magma-core + 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..7771049f --- /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.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 new file mode 100644 index 00000000..936d75d8 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleAssociations.java @@ -0,0 +1,175 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.data; + +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.USER_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +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; + +/** + * Example associations. + */ +public class ExampleAssociations { + + /** + * Create a person-occupies-house association. + * + * @param mcService {@link MagmaCoreService}. + * @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, + final IRI ending) { + + 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 + .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"); + + // Create DbCreateOperations to create the objects and their properties. + final IRI personState = new IRI(USER_BASE, uid()); + final IRI houseState = new IRI(USER_BASE, uid()); + final IRI personParticipant = new IRI(USER_BASE, uid()); + final IRI houseParticipant = new IRI(USER_BASE, uid()); + final IRI houseOccupiedAssociation = new IRI(USER_BASE, uid()); + + // 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 mcService {@link MagmaCoreDatabase} + * @return {@link MagmaCoreDatabase} + */ + public static DbChangeSet addHouseOccupancies(final MagmaCoreService mcService) { + + final Map entities = mcService + .findByEntityNameInTransaction(List.of("Example1_World", "PersonB1_Bob", "HouseB")); + + // Use an existing PossibleWorld + final PossibleWorld possibleWorld = (PossibleWorld) entities.get("Example1_World"); + + // The person occupies the house twice at different times. + 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 IRI event1 = new IRI(USER_BASE, "event1"); + final IRI event2 = new IRI(USER_BASE, "event2"); + final IRI event3 = new IRI(USER_BASE, "event3"); + final IRI event4 = new IRI(USER_BASE, "event4"); + + // Create DbCreateOperations to create the objects and their properties. + 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(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(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(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, 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/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 new file mode 100644 index 00000000..503fc781 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleIndividuals.java @@ -0,0 +1,95 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.data; + +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.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; + +/** + * Example individuals. + */ +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) { + + 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. + 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"); + + // Create IRIs for the objects we want to create. + 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( + new DbCreateOperation(possibleWorld, RDFS.RDF_TYPE, HQDM.POSSIBLE_WORLD.getIri()), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example1_World"), + + 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(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, 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, endEvent.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/data/ExampleRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java new file mode 100644 index 00000000..77ff1ef4 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/ExampleRdl.java @@ -0,0 +1,181 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.data; + +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.REF_BASE; +import static uk.gov.gchq.magmacore.util.UID.uid; + +import java.util.List; + +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; + +/** + * Example reference data. + */ +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 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( + 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(List.of(), creates); + } +} diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/package-info.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/package-info.java new file mode 100644 index 00000000..c445d81c --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/data/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. + */ + +/** + * Example data sets for demonstrating building and using HQDM models with Magma Core. + */ +package uk.gov.gchq.magmacore.examples.data; 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 new file mode 100644 index 00000000..b6d61789 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/JenaDatabaseDemo.java @@ -0,0 +1,62 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.service; + +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; + +import java.util.List; +import java.util.Map; + +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Example use-case scenario for using Magma Core with an in-memory Jena database. + * + *

+ * 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 + * resulting object(s) of this query are output to the command-line as RDF triples. + *

+ * + */ +public final class JenaDatabaseDemo { + + /** + * Run the in-memory Jena database example. + * + * @param args Application arguments. + */ + public static void main(final String[] args) { + + // Instantiate new in-memory Jena database. + final MagmaCoreService mcService = MagmaCoreServiceFactory.createWithJenaDatabase(); + + // Add example data objects to dataset. + populateExampleData(mcService); + + // Query database to check its populated. + final Map queryResults = mcService.findByEntityNameInTransaction(List.of("PersonB1_Bob")); + + // Output results of query to console. + System.out.println(queryResults); + + System.out.println("\n--- Jena Example End ---"); + } +} 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 new file mode 100644 index 00000000..145cb138 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/McAssistMultInheritFromDataApp.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.magmacore.examples.service; + +import static uk.gov.gchq.magmacore.util.UID.uid; + +import java.util.List; + +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. + */ +public class McAssistMultInheritFromDataApp { + + /** + * Example program for creating classes dynamically. + * + * @param args An array of Strings. + */ + 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())); + + // Create a new object using the type specification. + final Thing 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("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)); + } +} diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java new file mode 100644 index 00000000..3698e3a5 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/RemoteSparqlDatabaseDemo.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.service; + +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; + +import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Example use-case scenario for using Magma Core with a remote SPARQL database connection. + */ +public final class RemoteSparqlDatabaseDemo { + + /** + * Constructs a RemoteSparqlDatabaseDemo with a remote SPARQL server connection. + * + * @param args Application arguments. + */ + public static void main(final String[] args) { + final MagmaCoreService mcService = MagmaCoreServiceFactory + .attachRemoteSparqlEndpoint("http://localhost:3330/tdb"); + populateExampleData(mcService); + } +} diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/package-info.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/service/package-info.java new file mode 100644 index 00000000..888eb063 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/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 creating and interacting with Magma Core databases. + */ +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..92041a22 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java @@ -0,0 +1,163 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.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; +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/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 new file mode 100644 index 00000000..f5914aca --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java @@ -0,0 +1,66 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.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; + +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; + +/** + * Example signs reference data. + */ +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 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( + 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"), + + // 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. + return new DbChangeSet(List.of(), creates); + } +} 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 new file mode 100644 index 00000000..8148ef0f --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/util/DemoUtils.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.magmacore.examples.util; + +import java.util.List; + +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; + +/** + * Utilities for Magma Core demos. + */ +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. + * + * @param mcService {@link MagmaCoreService} to populate. + * @return {@link DbTransformation} performed. + */ + 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 = ExampleRdl.createRefDataObjects(); + + // Apply the DbChangeSet. + rdlChangeSet.apply(mcService); + + // mcService now contains the RDL needed for the next DbChangeSet. + final DbChangeSet individualsChangeSet = ExampleIndividuals.addWholeLifeIndividuals(mcService); + + // Apply the DbChangeSet. + individualsChangeSet.apply(mcService); + + // mcService now contains the individuals needed for creating the next DbChangeSet. + final DbChangeSet occupanciesChangeSet = ExampleAssociations.addHouseOccupancies(mcService); + + // Apply the DbChangeSet. + 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)); + } +} 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/examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java new file mode 100644 index 00000000..aa7abf04 --- /dev/null +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/data/ExampleDataTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.data; + +import static org.junit.Assert.assertNotNull; +import static uk.gov.gchq.magmacore.examples.util.DemoUtils.populateExampleData; + +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. + */ +public class ExampleDataTest { + + /** + * Test the {@link ExampleDataObjects} code. + */ + @Test + public void testWithJenaDatabase() { + final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbTransformation transformation = populateExampleData(service); + + assertNotNull(transformation); + } +} diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java new file mode 100644 index 00000000..19f0d74b --- /dev/null +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 org.junit.Assert.assertNotNull; + +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. + */ +public class ExampleSignsTest { + + /** + * Test the {@link ExampleSigns} code. + */ + @Test + public void testSignsExample() { + final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); + final DbTransformation transformation = ExampleSigns.populateExampleData(service); + + assertNotNull(transformation); + } +} diff --git a/hqdm-rdf/pom.xml b/hqdm-rdf/pom.xml new file mode 100644 index 00000000..eef760e3 --- /dev/null +++ b/hqdm-rdf/pom.xml @@ -0,0 +1,31 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 2.0.0 + + + uk.gov.gchq.magma-core + hqdm-rdf + 2.0.0 + + hqdm-rdf + + + UTF-8 + 17 + + + + + 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..4ede3e62 --- /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.magmacore.hqdm.rdf { + requires transitive uk.gov.gchq.magmacore.hqdm; + + 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/magmacore/hqdm/rdf/HqdmObjectFactory.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java new file mode 100755 index 00000000..01d229c5 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf; + +import static uk.gov.gchq.magmacore.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.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. + */ +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.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. + */ + 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.magmacore.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.magmacore.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/magmacore/hqdm/rdf/exception/IriException.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/exception/IriException.java new file mode 100644 index 00000000..5af36b6f --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/rdf/exception/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/exception/package-info.java new file mode 100644 index 00000000..278d98d1 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.exception; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java new file mode 100755 index 00000000..9b55bb3b --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java @@ -0,0 +1,2208 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.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.magmacore.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.magmacore.hqdm.model.SociallyConstructedActivity} that is the acceptance of + * an {@link uk.gov.gchq.magmacore.hqdm.model.Offer} as {@link #PART_OF} an + * {@link uk.gov.gchq.magmacore.hqdm.model.AgreeContract}. + */ + public static final HqdmIri ACCEPTANCE_OF_OFFER = new HqdmIri(HQDM, "acceptance_of_offer"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} that consists of one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.Offer}s of a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnershipOfMoney} for a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} of goods where one + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Individual} that consists of its + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant}s and causes some + * {@link uk.gov.gchq.magmacore.hqdm.model.Event}. + */ + public static final HqdmIri ACTIVITY = new HqdmIri(HQDM, "activity"); + + /** + * A {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ReachingAgreement} that consists of an + * {@link uk.gov.gchq.magmacore.hqdm.model.Offer} of some + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing} in exchange for some consideration, and an + * {@link uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOffer}. + */ + public static final HqdmIri AGREE_CONTRACT = new HqdmIri(HQDM, "agree_contract"); + + /** + * A {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.SociallyConstructedActivity} that consists of a + * {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} and an + * {@link uk.gov.gchq.magmacore.hqdm.model.AgreementExecution}, where the + * {@link uk.gov.gchq.magmacore.hqdm.model.AgreementExecution} is the course of action agreed to in + * the {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement}. + */ + public static final HqdmIri AGREEMENT_PROCESS = new HqdmIri(HQDM, "agreement_process"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfAmountOfMoney}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject}, and a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} that is the {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership} that is owned. + */ + public static final HqdmIri ASSET = new HqdmIri(HQDM, "asset"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Individual} that {@link #CONSISTS_OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant}s that are associated, and where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant}s are {@link #PART_OF} the same + * {@link uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime}. + */ + public static final HqdmIri ASSOCIATION = new HqdmIri(HQDM, "association"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Event} that is the {@link #BEGINNING} of an + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership}. + */ + public static final HqdmIri BEGINNING_OF_OWNERSHIP = new HqdmIri(HQDM, "beginning_of_ownership"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject} that sustains itself and reproduces. + */ + public static final HqdmIri BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "biological_object"); + + /** + * Any {@link uk.gov.gchq.magmacore.hqdm.model.System} that is also an + * {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryBiologicalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystem}. + */ + public static final HqdmIri BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "biological_system"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject}, + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystemComponent} and + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent} that is any + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent}. + */ + public static final HqdmIri BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "biological_system_component"); + + /** + * An {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Relationship} where a + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing} is a member of a + * class{@link uk.gov.gchq.magmacore.hqdm.model.Class}. + */ + public static final HqdmIri CLASSIFICATION = new HqdmIri(HQDM, "classification"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Class} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfIndividual} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfReachingAgreement} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfAmountOfMoney}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfAssociation} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalSystem}, + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject}, and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalObject}, + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSystemComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Class} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfClass} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfAgreementExecution} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfAgreementProcess} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPhysicalObject}, + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject}, and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfFunctionalSystem}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryFunctionalObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent}, and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSystemComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, that is also + * a {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfIndividual} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalObject}, + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrganization}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfParty} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrganizationComponent}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSystemComponent}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalSystem}, + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPerson} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfParty} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfInstalledObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPosition} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfIndividual} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPhysicalProperty} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfEvent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPosition} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrganizationComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfIndividual} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPeriodOfTime} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Class} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfAssociation} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSalesProductInstance} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryFunctionalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSign} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfActivity} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Class} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSpatioTemporalExtent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfFunctionalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfParty} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSystem} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfBiologicalSystem} and + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfParty} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrganizationComponent} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfIntentionallyConstructedObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSystem} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject} that is + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.hqdm.model.AgreementExecution} that is the provision of some + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing} in exchange for some consideration. + */ + public static final HqdmIri CONTRACT_EXECUTION = new HqdmIri(HQDM, "contract_execution"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.AgreementProcess} that consists of an + * {@link uk.gov.gchq.magmacore.hqdm.model.AgreeContract} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.ContractExecution}. + */ + public static final HqdmIri CONTRACT_PROCESS = new HqdmIri(HQDM, "contract_process"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfAmountOfMoney} that is the subset of + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Relationship} that is defined by a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithSignature}. + */ + public static final HqdmIri DEFINED_RELATIONSHIP = new HqdmIri(HQDM, "defined_relationship"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} that defines a + * {@link uk.gov.gchq.magmacore.hqdm.model.Class}. + */ + public static final HqdmIri DEFINITION = new HqdmIri(HQDM, "definition"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} that describes some + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing}. + */ + public static final HqdmIri DESCRIPTION = new HqdmIri(HQDM, "description"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPerson} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Employment}. + */ + public static final HqdmIri EMPLOYEE = new HqdmIri(HQDM, "employee"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Employment}. + */ + public static final HqdmIri EMPLOYER = new HqdmIri(HQDM, "employer"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} that consists of an + * {@link uk.gov.gchq.magmacore.hqdm.model.Employer} and an + * {@link uk.gov.gchq.magmacore.hqdm.model.Employee} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Employer} pays the + * {@link uk.gov.gchq.magmacore.hqdm.model.Employee} to work for them. + */ + public static final HqdmIri EMPLOYMENT = new HqdmIri(HQDM, "employment"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Event} that is the {@link #ENDING} of an + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership}. + */ + public static final HqdmIri ENDING_OF_OWNERSHIP = new HqdmIri(HQDM, "ending_of_ownership"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.Class} where each {@link #MEMBER__OF} the + * {@link uk.gov.gchq.magmacore.hqdm.model.Class} is known. + */ + public static final HqdmIri ENUMERATED_CLASS = new HqdmIri(HQDM, "enumerated_class"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} that has zero temporal thickness + * and may bound some {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent}. + */ + public static final HqdmIri EVENT = new HqdmIri(HQDM, "event"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.AgreementExecution} that consists of a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} of goods and a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Relationship}. + */ + public static final HqdmIri FUNCTION_ = new HqdmIri(HQDM, "function_"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.IntentionallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfFunctionalSystem} that is also an + * {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.System}. + */ + public static final HqdmIri FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "functional_system"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.IntentionallyConstructedObject} that is a replaceable + * {@link #COMPONENT_OF} a {@link uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem}. + */ + public static final HqdmIri FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "functional_system_component"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} that is a surrogate for the + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing} {@link #REPRESENTED}. + */ + public static final HqdmIri IDENTIFICATION = new HqdmIri(HQDM, "identification"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Identification} that identifies a + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity}. An + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Scale}. + */ + public static final HqdmIri IDENTIFICATION_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, + "identification_of_physical_quantity"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} that is not a proper + * {@link #TEMPORAL_PART_OF} any other {@link uk.gov.gchq.magmacore.hqdm.model.Individual} of the + * same kind. + */ + public static final HqdmIri INDIVIDUAL = new HqdmIri(HQDM, "individual"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.InstalledObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent}. + */ + public static final HqdmIri IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, "in_place_biological_component"); + + /** + * Any {@link uk.gov.gchq.magmacore.hqdm.model.InstalledObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent}. + */ + public static final HqdmIri INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, + "installed_functional_system_component"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent} that is a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject} from + * when it is installed as a {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent} to when it is + * removed. + */ + public static final HqdmIri INSTALLED_OBJECT = new HqdmIri(HQDM, "installed_object"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Individual} and + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalSystem} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystem} all of whose members have a natural + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfBiologicalSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystemComponent} where all the member components + * play the same {@link uk.gov.gchq.magmacore.hqdm.model.Role} in some + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfFunctionalObject}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfIntentionallyConstructedObject} where each + * {@link #MEMBER_OF} a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfFunctionalSystem} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystem} where each + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfFunctionalSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystemComponent} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfIndividual} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject} a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryPhysicalObject} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryPhysicalObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalObject} where each {@link #MEMBER_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject} where each + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject} where each + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfOrganizationComponent} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfParty} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPerson} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPhysicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfIndividual} where each + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPhysicalProperty} where each {@link #MEMBER_OF} + * a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPhysicalQuantity} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalProperty} such that each {@link #MEMBER_OF} + * the same {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfPosition} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.hqdm.model.ClassOfRelationship} that is a subset of + * {@link uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship} type where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Classification}s involved in each + * {@link uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship} have as {@link #CLASSIFIER}s the + * {@link #ROLES} specified by the + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfIntentionallyConstructedObject} where each + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSystem} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryPhysicalObject} where each + * {@link #MEMBER_OF} a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Organization} that is a group of people who share a + * common understanding of a set of {@link uk.gov.gchq.magmacore.hqdm.model.Sign}s. + */ + public static final HqdmIri LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "language_community"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Asset} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfAmountOfMoney}. + */ + public static final HqdmIri MONEY_ASSET = new HqdmIri(HQDM, "money_asset"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} that proposes an exchange + * of some {@link uk.gov.gchq.magmacore.hqdm.model.Thing} for some consideration. + */ + public static final HqdmIri OFFER = new HqdmIri(HQDM, "offer"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} that {@link #CONSISTS_OF} exactly + * one {@link uk.gov.gchq.magmacore.hqdm.model.Offer} of a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnershipOfMoney} for exactly one + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.Offer} of an + * {@link uk.gov.gchq.magmacore.hqdm.model.ExchangeOfGoodsAndMoney}. + */ + public static final HqdmIri OFFER_FOR_GOODS = new HqdmIri(HQDM, "offer_for_goods"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOffer} that is for a + * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual}, at a + * {@link uk.gov.gchq.magmacore.hqdm.model.Price}, by a + * {@link uk.gov.gchq.magmacore.hqdm.model.Party}, for a + * {@link uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime}. + */ + public static final HqdmIri OFFERING = new HqdmIri(HQDM, "offering"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject}, a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject}, and an + * {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.FunctionalObject}. + */ + public static final HqdmIri ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "ordinary_functional_object"); + + /** + * A {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfOrganization}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.Party}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} that is an organized body of + * people. + */ + public static final HqdmIri ORGANIZATION = new HqdmIri(HQDM, "organization"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrganizationComponent}, + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent}, and + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} that is a + * {@link #COMPONENT_OF} an {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership}. + */ + public static final HqdmIri OWNER = new HqdmIri(HQDM, "owner"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} that {@link #CONSISTS_OF} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Owner} and an + * {@link uk.gov.gchq.magmacore.hqdm.model.Asset} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Owner} owns the + * {@link uk.gov.gchq.magmacore.hqdm.model.Asset}. + */ + public static final HqdmIri OWNERSHIP = new HqdmIri(HQDM, "ownership"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.State} that is a {@link #PARTICIPANT_IN} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity} or + * {@link uk.gov.gchq.magmacore.hqdm.model.Association}. + */ + public static final HqdmIri PARTICIPANT = new HqdmIri(HQDM, "participant"); + + /** + * A SELECT where a {@link uk.gov.gchq.magmacore.hqdm.model.Participant} may be a + * {@link #PARTICIPANT_IN} an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} or an + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.System} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Person} or an + * {@link uk.gov.gchq.magmacore.hqdm.model.Organization}. + */ + public static final HqdmIri PARTY = new HqdmIri(HQDM, "party"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSign} where all the + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign}s are of the same + * {@link uk.gov.gchq.magmacore.hqdm.model.Pattern}. + */ + public static final HqdmIri PATTERN = new HqdmIri(HQDM, "pattern"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.State} that is a {@link #TEMPORAL_PART_OF} some + * {@link uk.gov.gchq.magmacore.hqdm.model.PossibleWorld}. + */ + public static final HqdmIri PERIOD_OF_TIME = new HqdmIri(HQDM, "period_of_time"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem} that is also, a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPerson}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.Party} that is a human being. + */ + public static final HqdmIri PERSON = new HqdmIri(HQDM, "person"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPosition}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPerson}, and an + * {@link uk.gov.gchq.magmacore.hqdm.model.InstalledObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Person} while they are in a + * {@link uk.gov.gchq.magmacore.hqdm.model.Position} and also the + * {@link uk.gov.gchq.magmacore.hqdm.model.Position} while it is filled by the + * {@link uk.gov.gchq.magmacore.hqdm.model.Person}. + */ + public static final HqdmIri PERSON_IN_POSITION = new HqdmIri(HQDM, "person_in_position"); + + /** + * An {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} that is some characteristic that is the + * same for each {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfState} where each member of the set is a member + * of a {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty} within the range. + */ + public static final HqdmIri PHYSICAL_PROPERTY_RANGE = new HqdmIri(HQDM, "physical_property_range"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity} is a + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty} that is a measurable quantity of a + * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalProperty}. + */ + public static final HqdmIri PHYSICAL_QUANTITY = new HqdmIri(HQDM, "physical_quantity"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalPropertyRange} that ranges over + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity} values. + */ + public static final HqdmIri PHYSICAL_QUANTITY_RANGE = new HqdmIri(HQDM, "physical_quantity_range"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.PossibleWorld} that some + * {@link uk.gov.gchq.magmacore.hqdm.model.Party} would like to bring about. + */ + public static final HqdmIri PLAN = new HqdmIri(HQDM, "plan"); + + /** + * An {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.OrganizationComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPosition} that may be held by a + * {@link uk.gov.gchq.magmacore.hqdm.model.Person}. + */ + public static final HqdmIri POSITION = new HqdmIri(HQDM, "position"); + + /** + * An {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfAmountOfMoney} that is the + * {@link #CONSIDERATION_BY_CLASS} in an {@link uk.gov.gchq.magmacore.hqdm.model.Offering}. + */ + public static final HqdmIri PRICE = new HqdmIri(HQDM, "price"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSalesProductInstance} that is a set of + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProductInstance} sold under a brand name. + */ + public static final HqdmIri PRODUCT_BRAND = new HqdmIri(HQDM, "product_brand"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Offering} that is for a + * {@link uk.gov.gchq.magmacore.hqdm.model.SalesProduct}. + */ + public static final HqdmIri PRODUCT_OFFERING = new HqdmIri(HQDM, "product_offering"); + + /** + * A {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfLanguageCommunity} that recognizes what a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.AbstractObject} that is what one + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.ClassOfRepresentation} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} in all the members are members of the + * {@link uk.gov.gchq.magmacore.hqdm.model.Pattern} specified. + */ + public static final HqdmIri REPRESENTATION_BY_PATTERN = new HqdmIri(HQDM, "representation_by_pattern"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} of a + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} and a + * {@link uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity} that recognizes the + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} as representing some + * {@link uk.gov.gchq.magmacore.hqdm.model.Thing}. + */ + public static final HqdmIri REPRESENTATION_BY_SIGN = new HqdmIri(HQDM, "representation_by_sign"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent} that is {@link #PART_OF_PLAN} at + * least one {@link uk.gov.gchq.magmacore.hqdm.model.Plan} and is {@link #DEFINED_BY} exactly one + * {@link uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification}. + */ + public static final HqdmIri REQUIREMENT = new HqdmIri(HQDM, "requirement"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent} that is the + * {@link #INTERSECTION_OF} one or more {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfState}. + */ + public static final HqdmIri REQUIREMENT_SPECIFICATION = new HqdmIri(HQDM, "requirement_specification"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfParticipant} where each member participates in + * the same way in an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} or + * {@link uk.gov.gchq.magmacore.hqdm.model.Association}. + */ + public static final HqdmIri ROLE = new HqdmIri(HQDM, "role"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.AgreementProcess} that consists of an + * {@link uk.gov.gchq.magmacore.hqdm.model.OfferAndAcceptanceForGoods} and an + * {@link uk.gov.gchq.magmacore.hqdm.model.ExchangeOfGoodsAndMoney}. + */ + public static final HqdmIri SALE_OF_GOODS = new HqdmIri(HQDM, "sale_of_goods"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSalesProductInstance} that is a set of + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.hqdm.model.ClassOfSalesProductInstance} that is the customer + * facing specification of a version of a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.KindOfPhysicalQuantity} to the + * real numbers. + */ + public static final HqdmIri SCALE = new HqdmIri(HQDM, "scale"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSign}, that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject}, and a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} that represents some + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.SociallyConstructedObject} that is also an + * {@link uk.gov.gchq.magmacore.hqdm.model.Activity}. + */ + public static final HqdmIri SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, "socially_constructed_activity"); + + /** + * An {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.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.magmacore.hqdm.model.SpatioTemporalExtent} that is an + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual} or a {@link #TEMPORAL_PART_OF} some + * {@link uk.gov.gchq.magmacore.hqdm.model.Individual}. + */ + public static final HqdmIri STATE = new HqdmIri(HQDM, "state"); + + /** + * A state that is an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} or a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.magmacore.hqdm.model.Activity}. + */ + public static final HqdmIri STATE_OF_ACTIVITY = new HqdmIri(HQDM, "state_of_activity"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject} that is a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.State} that is an + * {@link uk.gov.gchq.magmacore.hqdm.model.Association} or a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Association}. + */ + public static final HqdmIri STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "state_of_association"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject}. + */ + public static final HqdmIri STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "state_of_biological_object"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystem} that is + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem}. + */ + public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "state_of_biological_system"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystemComponent} and + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalSystemComponent} or a {@link #TEMPORAL_PART_OF} + * a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} and + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.FunctionalObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.FunctionalObject}. + */ + public static final HqdmIri STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "state_of_functional_object"); + + /** + * Any {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystem}. + */ + public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "state_of_functional_system"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.IntentionallyConstructedObject} or a + * {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfOrganization} that is a + * {@link #TEMPORAL_PART_OF} a {@link uk.gov.gchq.magmacore.hqdm.model.LanguageCommunity}. + */ + public static final HqdmIri STATE_OF_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "state_of_language_community"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalObject} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject} that is an + * {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryBiologicalObject} or a {@link #TEMPORAL_PART_OF} + * an {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfFunctionalObject} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfPhysicalObject} that is an + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedObject} that is an + * {@link uk.gov.gchq.magmacore.hqdm.model.Organization} or a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Organization}. + */ + public static final HqdmIri STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "state_of_organization"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedObject} that is a + * {@link #TEMPORAL_PART_OF} an {@link uk.gov.gchq.magmacore.hqdm.model.OrganizationComponent}. + */ + public static final HqdmIri STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "state_of_organization_component"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSystem} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Party} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Party}. + */ + public static final HqdmIri STATE_OF_PARTY = new HqdmIri(HQDM, "state_of_party"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystem} and + * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Person} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Person}. + */ + public static final HqdmIri STATE_OF_PERSON = new HqdmIri(HQDM, "state_of_person"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.State} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "state_of_physical_object"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrganizationComponent} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Position} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Position}. + */ + public static final HqdmIri STATE_OF_POSITION = new HqdmIri(HQDM, "state_of_position"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject} that is a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfSociallyConstructedObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.Sign}. + */ + public static final HqdmIri STATE_OF_SIGN = new HqdmIri(HQDM, "state_of_sign"); + + /** + * Any {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedObject} that is also a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} or a {@link #TEMPORAL_PART_OF} + * a {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.System} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.System}. + */ + public static final HqdmIri STATE_OF_SYSTEM = new HqdmIri(HQDM, "state_of_system"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject} that is a + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent} or a {@link #TEMPORAL_PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.model.SystemComponent}. + */ + public static final HqdmIri STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "state_of_system_component"); + + /** + * An {@link uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject} that is an organized or + * connected group of {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri SYSTEM = new HqdmIri(HQDM, "system"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject} that is a {@link #COMPONENT_OF} a + * {@link uk.gov.gchq.magmacore.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.magmacore.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.magmacore.hqdm.model.StateOfParty} and + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} receiving + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership} in a + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership}. + */ + public static final HqdmIri TRANSFEREE = new HqdmIri(HQDM, "transferee"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} that ends one + * {@link uk.gov.gchq.magmacore.hqdm.model.Ownership} and begins another for + * {@link uk.gov.gchq.magmacore.hqdm.model.Asset}s that are a {@link #TEMPORAL_PART_OF} the same + * {@link uk.gov.gchq.magmacore.hqdm.model.PhysicalObject}. + */ + public static final HqdmIri TRANSFER_OF_OWNERSHIP = new HqdmIri(HQDM, "transfer_of_ownership"); + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} where the + * {@link uk.gov.gchq.magmacore.hqdm.model.Asset} is a + * {@link uk.gov.gchq.magmacore.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.magmacore.hqdm.model.StateOfParty} that is also a + * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} that is a {@link #TEMPORAL_PART_OF} an + * {@link uk.gov.gchq.magmacore.hqdm.model.Owner} that is a {@link #PARTICIPANT_IN} one or more + * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership}. + */ + public static final HqdmIri TRANSFEROR = new HqdmIri(HQDM, "transferor"); + + /** + * A plus one {@link uk.gov.gchq.magmacore.hqdm.model.Function_} for a + * {@link uk.gov.gchq.magmacore.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.magmacore.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.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/magmacore/hqdm/rdf/iri/HqdmIri.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HqdmIri.java new file mode 100755 index 00000000..21251e17 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.iri; + +import uk.gov.gchq.magmacore.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/magmacore/hqdm/rdf/iri/IRI.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IRI.java new file mode 100755 index 00000000..0cb02756 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.iri; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Objects; + +import uk.gov.gchq.magmacore.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/magmacore/hqdm/rdf/iri/IriBase.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriBase.java new file mode 100755 index 00000000..2a0efb7a --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/rdf/iri/RDFS.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/RDFS.java new file mode 100755 index 00000000..b58524a9 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/rdf/iri/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/package-info.java new file mode 100644 index 00000000..82c164af --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.iri; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/package-info.java new file mode 100644 index 00000000..92979283 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf; diff --git a/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Pair.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Pair.java new file mode 100644 index 00000000..34c98dba --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.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 + * 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/magmacore/hqdm/rdf/util/Triples.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/Triples.java new file mode 100755 index 00000000..9e16e445 --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.util; + +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/rdf/util/package-info.java b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/util/package-info.java new file mode 100644 index 00000000..38229bfa --- /dev/null +++ b/hqdm-rdf/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.rdf.util; diff --git a/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java new file mode 100644 index 00000000..a38cbd00 --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactoryTest.java @@ -0,0 +1,112 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.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.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}. + */ +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/magmacore/hqdm/rdf/iri/IriTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriTest.java new file mode 100644 index 00000000..2abaa2b5 --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/IriTest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.hqdm.rdf.iri; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +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}. + */ +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/magmacore/hqdm/rdf/util/TriplesTest.java b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/util/TriplesTest.java new file mode 100644 index 00000000..c009b899 --- /dev/null +++ b/hqdm-rdf/src/test/java/uk/gov/gchq/magmacore/hqdm/rdf/util/TriplesTest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2021 Crown Copyright + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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.hqdm.rdf.util; + +import static org.junit.Assert.assertEquals; + +import java.util.List; + +import org.junit.Test; + +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. + */ +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..06d54521 --- /dev/null +++ b/hqdm/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + uk.gov.gchq.magma-core + magma-core + 2.0.0 + + + uk.gov.gchq.magma-core + hqdm + 2.0.0 + + hqdm + + + UTF-8 + 17 + + + + + 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..bd6f9a47 --- /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.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/magmacore/hqdm/exception/HqdmException.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/HqdmException.java new file mode 100644 index 00000000..e3b5dc08 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/exception/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/exception/package-info.java new file mode 100644 index 00000000..eb1d8dc6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.exception; diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AbstractObject.java new file mode 100755 index 00000000..6c712ac1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AcceptanceOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOffer.java new file mode 100755 index 00000000..1aa09b44 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AcceptanceOfOfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AcceptanceOfOfferForGoods.java new file mode 100755 index 00000000..e74ebfbb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Activity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Activity.java new file mode 100755 index 00000000..46e15bf4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Aggregation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Aggregation.java new file mode 100755 index 00000000..94c37f0b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreeContract.java new file mode 100755 index 00000000..52b3b840 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementExecution.java new file mode 100755 index 00000000..22e84ed8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AgreementProcess.java new file mode 100755 index 00000000..9c8371b8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/AmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AmountOfMoney.java new file mode 100755 index 00000000..355daa54 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/AmountOfMoney.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Asset.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Asset.java new file mode 100755 index 00000000..ff7176b3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Association.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Association.java new file mode 100755 index 00000000..ab87d785 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Association.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BeginningOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BeginningOfOwnership.java new file mode 100755 index 00000000..7752faf2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/BiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalObject.java new file mode 100755 index 00000000..bb5beef4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalObject.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.magmacore.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/magmacore/hqdm/model/BiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystem.java new file mode 100755 index 00000000..e1b207f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystem.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.magmacore.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/magmacore/hqdm/model/BiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystemComponent.java new file mode 100755 index 00000000..3003961c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/BiologicalSystemComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Class.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Class.java new file mode 100755 index 00000000..d2c07290 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfAbstractObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAbstractObject.java new file mode 100755 index 00000000..ddd60194 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfActivity.java new file mode 100755 index 00000000..20b74c5e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfAgreeContract.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreeContract.java new file mode 100755 index 00000000..166017b3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfAgreementExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementExecution.java new file mode 100755 index 00000000..e61ac76f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfAgreementProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAgreementProcess.java new file mode 100755 index 00000000..da95264a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAmountOfMoney.java new file mode 100755 index 00000000..aad8f3d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfAssociation.java new file mode 100755 index 00000000..dccaa858 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalObject.java new file mode 100755 index 00000000..39ab7883 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystem.java new file mode 100755 index 00000000..3fc449dc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfBiologicalSystemComponent.java new file mode 100755 index 00000000..f28b478a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClass.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClass.java new file mode 100755 index 00000000..25c04057 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfClassOfSpatioTemporalExtent.java new file mode 100755 index 00000000..a70f4188 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractExecution.java new file mode 100755 index 00000000..9af60f6c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfContractProcess.java new file mode 100755 index 00000000..e16cea42 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfEvent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfEvent.java new file mode 100755 index 00000000..c1c39301 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalObject.java new file mode 100755 index 00000000..90631587 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystem.java new file mode 100755 index 00000000..905b9004 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfFunctionalSystemComponent.java new file mode 100755 index 00000000..16a65025 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfInPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInPlaceBiologicalComponent.java new file mode 100755 index 00000000..fc8cf493 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIndividual.java new file mode 100755 index 00000000..c2f18246 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledFunctionalSystemComponent.java new file mode 100755 index 00000000..7800d085 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfInstalledObject.java new file mode 100755 index 00000000..86ddb1e7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..f911c472 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOffer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOffer.java new file mode 100755 index 00000000..10af9ea5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..38e394c8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..57fdf6a5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..0551ed71 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganization.java new file mode 100755 index 00000000..854ce3d9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfOrganizationComponent.java new file mode 100755 index 00000000..e9561f27 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfParticipant.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParticipant.java new file mode 100755 index 00000000..c4cc4f03 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfParty.java new file mode 100755 index 00000000..38ad9319 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPeriodOfTime.java new file mode 100755 index 00000000..a1dbd984 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPerson.java new file mode 100755 index 00000000..1deee0f9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPersonInPosition.java new file mode 100755 index 00000000..8b3ad676 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPersonInPosition.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.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 { +} diff --git a/src/test/java/uk/gov/gchq/magmacore/AppTest.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java old mode 100644 new mode 100755 similarity index 68% rename from src/test/java/uk/gov/gchq/magmacore/AppTest.java rename to hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java index 72e21d56..fdde388a --- a/src/test/java/uk/gov/gchq/magmacore/AppTest.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalObject.java @@ -12,21 +12,11 @@ * the License. */ -package uk.gov.gchq.magmacore; - -import static org.junit.Assert.assertTrue; - -import org.junit.Test; +package uk.gov.gchq.magmacore.hqdm.model; /** - * Unit test for simple App. + * A {@link ClassOfIndividual} and a {@link ClassOfStateOfPhysicalObject} that is + * {@link PhysicalObject} or any of its subsets. */ -public class AppTest { - /** - * Rigorous Test. - */ - @Test - public void shouldAnswerWithTrue() { - assertTrue(true); - } +public interface ClassOfPhysicalObject extends ClassOfIndividual, ClassOfStateOfPhysicalObject { } diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalProperty.java new file mode 100755 index 00000000..8e0b1913 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPhysicalQuantity.java new file mode 100755 index 00000000..797d53a2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPointInTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPointInTime.java new file mode 100755 index 00000000..c8215441 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPosition.java new file mode 100755 index 00000000..8ba9388a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfPossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPossibleWorld.java new file mode 100755 index 00000000..e414a8ff --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfPossibleWorld.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfReachingAgreement.java new file mode 100755 index 00000000..03b545e4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfRelationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRelationship.java new file mode 100755 index 00000000..bfbff48e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfRepresentation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfRepresentation.java new file mode 100755 index 00000000..30cc6e19 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.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. + */ +public interface ClassOfRepresentation extends ClassOfAssociation { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSalesProductInstance.java new file mode 100755 index 00000000..378483f3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSign.java new file mode 100755 index 00000000..534999d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSign.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedActivity.java new file mode 100755 index 00000000..8d728481 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSociallyConstructedObject.java new file mode 100755 index 00000000..54f4b00b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfSpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSpatioTemporalExtent.java new file mode 100755 index 00000000..1835a088 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfState.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfState.java new file mode 100755 index 00000000..ccb165ec --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfActivity.java new file mode 100755 index 00000000..be7c8532 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.java new file mode 100755 index 00000000..71546716 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAmountOfMoney.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfAssociation.java new file mode 100755 index 00000000..4f7372fa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalObject.java new file mode 100755 index 00000000..1b60626c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystem.java new file mode 100755 index 00000000..82da29fa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfBiologicalSystemComponent.java new file mode 100755 index 00000000..b8b4855b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.java new file mode 100755 index 00000000..5fa864cf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalObject.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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystem.java new file mode 100755 index 00000000..b53a6a8a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.java new file mode 100755 index 00000000..44d8f1ef --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfFunctionalSystemComponent.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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..5df0224b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..40bcf528 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..8f742700 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryFunctionalObject.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..77d60b68 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganization.java new file mode 100755 index 00000000..5a1ef6c1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganization.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.java new file mode 100755 index 00000000..69d86759 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfOrganizationComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfParty.java new file mode 100755 index 00000000..59f3ee75 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPerson.java new file mode 100755 index 00000000..377a32d2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPerson.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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPhysicalObject.java new file mode 100755 index 00000000..c952b735 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfPosition.java new file mode 100755 index 00000000..8db6253b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSalesProductInstance.java new file mode 100755 index 00000000..1add7f07 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSign.java new file mode 100755 index 00000000..21476bcd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedActivity.java new file mode 100755 index 00000000..d73579e4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSociallyConstructedObject.java new file mode 100755 index 00000000..eb730934 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystem.java new file mode 100755 index 00000000..fd80066d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfStateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfStateOfSystemComponent.java new file mode 100755 index 00000000..610e3d64 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ClassOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystem.java new file mode 100755 index 00000000..5912d53c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystem.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ClassOfSystemComponent.java new file mode 100755 index 00000000..9ae62d8a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Classification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Classification.java new file mode 100755 index 00000000..3e5f4a00 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Composition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Composition.java new file mode 100755 index 00000000..4605f251 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ContractExecution.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractExecution.java new file mode 100755 index 00000000..cbd18fc6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ContractProcess.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ContractProcess.java new file mode 100755 index 00000000..c9006329 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Currency.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Currency.java new file mode 100755 index 00000000..0f32a556 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/DefinedRelationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/DefinedRelationship.java new file mode 100755 index 00000000..0317e816 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Definition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Definition.java new file mode 100755 index 00000000..a23ea88b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Description.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Description.java new file mode 100755 index 00000000..ac800731 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Employee.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employee.java new file mode 100755 index 00000000..f0183043 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Employer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employer.java new file mode 100755 index 00000000..3544bf5b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Employment.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Employment.java new file mode 100755 index 00000000..c65a76c6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/EndingOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EndingOfOwnership.java new file mode 100755 index 00000000..091d9a86 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/EnumeratedClass.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/EnumeratedClass.java new file mode 100755 index 00000000..ec818a8a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Event.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Event.java new file mode 100755 index 00000000..a88e244f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ExchangeOfGoodsAndMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ExchangeOfGoodsAndMoney.java new file mode 100755 index 00000000..af7b0e17 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Function_.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Function_.java new file mode 100755 index 00000000..e5139526 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model; + +/** + * A one-to-many {@link Relationship}. + */ +public interface Function_ extends Relationship { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalObject.java new file mode 100755 index 00000000..993dc501 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/FunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystem.java new file mode 100755 index 00000000..117011b1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/FunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/FunctionalSystemComponent.java new file mode 100755 index 00000000..12d8e368 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Identification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Identification.java new file mode 100755 index 00000000..ef908a65 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/IdentificationOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IdentificationOfPhysicalQuantity.java new file mode 100755 index 00000000..399942b5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/InPlaceBiologicalComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InPlaceBiologicalComponent.java new file mode 100755 index 00000000..368584ff --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Individual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Individual.java new file mode 100755 index 00000000..837547d1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/InstalledFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledFunctionalSystemComponent.java new file mode 100755 index 00000000..2384560b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/InstalledObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/InstalledObject.java new file mode 100755 index 00000000..9b87b27e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/IntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/IntentionallyConstructedObject.java new file mode 100755 index 00000000..e533d1a2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfActivity.java new file mode 100755 index 00000000..f038b26c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfAssociation.java new file mode 100755 index 00000000..303e1496 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalObject.java new file mode 100755 index 00000000..d81ce173 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystem.java new file mode 100755 index 00000000..c576f1cb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfBiologicalSystemComponent.java new file mode 100755 index 00000000..c1e8a47f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalObject.java new file mode 100755 index 00000000..1875b83f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystem.java new file mode 100755 index 00000000..9cd81da1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfFunctionalSystemComponent.java new file mode 100755 index 00000000..8bf1c507 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfIndividual.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIndividual.java new file mode 100755 index 00000000..3b26450f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..63ca2db8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfIntentionallyConstructedObject.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..62a6b5c0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..8de2a5ca --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..e57b86d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganization.java new file mode 100755 index 00000000..4e23a7e3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganizationComponent.java new file mode 100755 index 00000000..4ec8aa9b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfOrganizationComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfParty.java new file mode 100755 index 00000000..0b016bbe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPerson.java new file mode 100755 index 00000000..de6239ac --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPerson.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalObject.java new file mode 100755 index 00000000..7f0c4b05 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfPhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalProperty.java new file mode 100755 index 00000000..bd733f47 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfPhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalQuantity.java new file mode 100755 index 00000000..d936bf48 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPhysicalQuantity.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfPosition.java new file mode 100755 index 00000000..eab4c2c7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfRelationshipWithRestriction.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithRestriction.java new file mode 100755 index 00000000..c85eb6b1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfRelationshipWithSignature.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfRelationshipWithSignature.java new file mode 100755 index 00000000..d5887504 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSociallyConstructedObject.java new file mode 100755 index 00000000..90485eac --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystem.java new file mode 100755 index 00000000..aa1ad792 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/KindOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystemComponent.java new file mode 100755 index 00000000..42688f0d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/KindOfSystemComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.java new file mode 100755 index 00000000..5c9c92f5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/LanguageCommunity.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.magmacore.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/magmacore/hqdm/model/MoneyAsset.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/MoneyAsset.java new file mode 100755 index 00000000..2cc092f6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/MoneyAsset.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.magmacore.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/magmacore/hqdm/model/Offer.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offer.java new file mode 100755 index 00000000..ee11a9ec --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/OfferAndAcceptanceForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferAndAcceptanceForGoods.java new file mode 100755 index 00000000..89594979 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/OfferForGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OfferForGoods.java new file mode 100755 index 00000000..3128bda7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model; + +/** + * An {@link Offer} of an {@link ExchangeOfGoodsAndMoney}. + */ +public interface OfferForGoods extends Offer { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offering.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Offering.java new file mode 100755 index 00000000..a79da34b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/OrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryBiologicalObject.java new file mode 100755 index 00000000..d9e8ef34 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/OrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryFunctionalObject.java new file mode 100755 index 00000000..bcf49fa3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryFunctionalObject.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.magmacore.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/magmacore/hqdm/model/OrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrdinaryPhysicalObject.java new file mode 100755 index 00000000..7370f08f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Organization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Organization.java new file mode 100755 index 00000000..4a342d61 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/OrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrganizationComponent.java new file mode 100755 index 00000000..5da48f5f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/OrganizationComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.java new file mode 100755 index 00000000..4d2c6535 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Owner.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Ownership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Ownership.java new file mode 100755 index 00000000..20ff5163 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Participant.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Participant.java new file mode 100755 index 00000000..bdcf8cb7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ParticipantInActivityOrAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ParticipantInActivityOrAssociation.java new file mode 100755 index 00000000..3f267e9f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model; + +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 + * {@link Association}. + */ +public interface ParticipantInActivityOrAssociation extends Top { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Party.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Party.java new file mode 100755 index 00000000..2471a6b8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Pattern.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Pattern.java new file mode 100755 index 00000000..a2d8b371 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PeriodOfTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PeriodOfTime.java new file mode 100755 index 00000000..a8a5f3f1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Person.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Person.java new file mode 100755 index 00000000..5f334201 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PersonInPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PersonInPosition.java new file mode 100755 index 00000000..7ebfceb8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PersonInPosition.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.java new file mode 100755 index 00000000..df7865da --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalObject.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.magmacore.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/magmacore/hqdm/model/PhysicalProperty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalProperty.java new file mode 100755 index 00000000..0f185d43 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PhysicalPropertyRange.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalPropertyRange.java new file mode 100755 index 00000000..cc251da2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PhysicalQuantity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantity.java new file mode 100755 index 00000000..5159b8f3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PhysicalQuantityRange.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PhysicalQuantityRange.java new file mode 100755 index 00000000..f63109ef --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Plan.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Plan.java new file mode 100755 index 00000000..6677f95b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PointInTime.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PointInTime.java new file mode 100755 index 00000000..2bcb6aac --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Position.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Position.java new file mode 100755 index 00000000..b00ad7b0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/PossibleWorld.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/PossibleWorld.java new file mode 100755 index 00000000..d0a42a4b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Price.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Price.java new file mode 100755 index 00000000..6bcf735e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ProductBrand.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductBrand.java new file mode 100755 index 00000000..fdaae65d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ProductOffering.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ProductOffering.java new file mode 100755 index 00000000..602c3d33 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/ReachingAgreement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/ReachingAgreement.java new file mode 100755 index 00000000..855f7123 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/RecognizingLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RecognizingLanguageCommunity.java new file mode 100755 index 00000000..097dcd9b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RecognizingLanguageCommunity.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.magmacore.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/magmacore/hqdm/model/Relationship.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Relationship.java new file mode 100755 index 00000000..068c0d7b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/RepresentationByPattern.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationByPattern.java new file mode 100755 index 00000000..7c50128e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/RepresentationBySign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RepresentationBySign.java new file mode 100755 index 00000000..4b61da96 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Requirement.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Requirement.java new file mode 100755 index 00000000..16457fcf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/RequirementSpecification.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/RequirementSpecification.java new file mode 100755 index 00000000..b00c7881 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Role.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Role.java new file mode 100755 index 00000000..35f96c63 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SaleOfGoods.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SaleOfGoods.java new file mode 100755 index 00000000..cd3e0519 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SalesProduct.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProduct.java new file mode 100755 index 00000000..a2056de1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductInstance.java new file mode 100755 index 00000000..57259a78 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductInstance.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.magmacore.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/magmacore/hqdm/model/SalesProductVersion.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SalesProductVersion.java new file mode 100755 index 00000000..1329f7be --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Scale.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Scale.java new file mode 100755 index 00000000..3a318dfe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Sign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Sign.java new file mode 100755 index 00000000..d133aede --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedActivity.java new file mode 100755 index 00000000..715d8f52 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedObject.java new file mode 100755 index 00000000..8a0123ad --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SociallyConstructedObject.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SpatioTemporalExtent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SpatioTemporalExtent.java new file mode 100755 index 00000000..cd6daeaa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Specialization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Specialization.java new file mode 100755 index 00000000..8a9257a8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/State.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/State.java new file mode 100755 index 00000000..fc20fef4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfActivity.java new file mode 100755 index 00000000..67f8a42a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfAmountOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAmountOfMoney.java new file mode 100755 index 00000000..0bdf03a1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAmountOfMoney.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAssociation.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfAssociation.java new file mode 100755 index 00000000..d7dfbaed --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalObject.java new file mode 100755 index 00000000..47e40fb3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfBiologicalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystem.java new file mode 100755 index 00000000..2c1f64cb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystem.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfBiologicalSystemComponent.java new file mode 100755 index 00000000..99bd8e3c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalObject.java new file mode 100755 index 00000000..3a15d4d9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalObject.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.java new file mode 100755 index 00000000..96411ff3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystem.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.magmacore.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/magmacore/hqdm/model/StateOfFunctionalSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystemComponent.java new file mode 100755 index 00000000..33b3fc16 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfFunctionalSystemComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfIntentionallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfIntentionallyConstructedObject.java new file mode 100755 index 00000000..63e0eb4e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfLanguageCommunity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfLanguageCommunity.java new file mode 100755 index 00000000..6835eadf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfOrdinaryBiologicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryBiologicalObject.java new file mode 100755 index 00000000..1528bd9f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.java new file mode 100755 index 00000000..85a3bbaa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryFunctionalObject.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.magmacore.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/magmacore/hqdm/model/StateOfOrdinaryPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrdinaryPhysicalObject.java new file mode 100755 index 00000000..26fa43e6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfOrganization.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganization.java new file mode 100755 index 00000000..3a43e5a8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfOrganizationComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganizationComponent.java new file mode 100755 index 00000000..fcb5f38b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfOrganizationComponent.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.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 { +} diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfParty.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfParty.java new file mode 100755 index 00000000..53188ac4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfPerson.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPerson.java new file mode 100755 index 00000000..728ebc20 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfPhysicalObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPhysicalObject.java new file mode 100755 index 00000000..c91382e2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfPosition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfPosition.java new file mode 100755 index 00000000..2ccdc896 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfSalesProductInstance.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSalesProductInstance.java new file mode 100755 index 00000000..81c110c5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfSign.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSign.java new file mode 100755 index 00000000..35c68f27 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfSociallyConstructedActivity.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedActivity.java new file mode 100755 index 00000000..b40375fe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedActivity.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.magmacore.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/magmacore/hqdm/model/StateOfSociallyConstructedObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSociallyConstructedObject.java new file mode 100755 index 00000000..9ca7356c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfSystem.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystem.java new file mode 100755 index 00000000..97252185 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/StateOfSystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/StateOfSystemComponent.java new file mode 100755 index 00000000..73605327 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/System.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/System.java new file mode 100755 index 00000000..78ad7d3a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/SystemComponent.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SystemComponent.java new file mode 100755 index 00000000..d87eaa0c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/SystemComponent.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.magmacore.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/magmacore/hqdm/model/TemporalComposition.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TemporalComposition.java new file mode 100755 index 00000000..0a7f55c8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Thing.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Thing.java new file mode 100755 index 00000000..98e515bc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model; + +import uk.gov.gchq.magmacore.hqdm.model.impl.ThingImpl; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/TransferOfOwnership.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnership.java new file mode 100755 index 00000000..c64e9ae2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/TransferOfOwnershipOfMoney.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/TransferOfOwnershipOfMoney.java new file mode 100755 index 00000000..c1fd3d61 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Transferee.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferee.java new file mode 100755 index 00000000..839b1ce5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/Transferor.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/Transferor.java new file mode 100755 index 00000000..d656ff1f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/UnitOfMeasure.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/UnitOfMeasure.java new file mode 100755 index 00000000..5204704d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/model/impl/AbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AbstractObjectImpl.java new file mode 100755 index 00000000..f379dff9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AbstractObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferForGoodsImpl.java new file mode 100755 index 00000000..5e36a15e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOfferForGoods; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AcceptanceOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AcceptanceOfOfferImpl.java new file mode 100755 index 00000000..c5ce6bae --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOffer; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ActivityImpl.java new file mode 100755 index 00000000..6b984729 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Activity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AggregationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AggregationImpl.java new file mode 100755 index 00000000..a75ebdcf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Aggregation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreeContractImpl.java new file mode 100755 index 00000000..8a7e2a63 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AgreeContract; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementExecutionImpl.java new file mode 100755 index 00000000..6f4e4f46 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AgreementProcessImpl.java new file mode 100755 index 00000000..6c9823c0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AgreementProcess; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AmountOfMoneyImpl.java new file mode 100755 index 00000000..f9cab043 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.AmountOfMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssetImpl.java new file mode 100755 index 00000000..aadcbe4b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Asset; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/AssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/AssociationImpl.java new file mode 100755 index 00000000..cb1fc211 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Association; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/BeginningOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BeginningOfOwnershipImpl.java new file mode 100755 index 00000000..a5e7463e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.BeginningOfOwnership; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/BiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalObjectImpl.java new file mode 100755 index 00000000..9268ee35 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.BiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/BiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemComponentImpl.java new file mode 100755 index 00000000..333ec0fd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/BiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/BiologicalSystemImpl.java new file mode 100755 index 00000000..70925e69 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassImpl.java new file mode 100755 index 00000000..4eaef20a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Class; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAbstractObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAbstractObjectImpl.java new file mode 100755 index 00000000..75aee8d9 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAbstractObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfActivityImpl.java new file mode 100755 index 00000000..c9b95dfd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAgreeContractImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreeContractImpl.java new file mode 100755 index 00000000..553b70ad --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreeContract; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAgreementExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementExecutionImpl.java new file mode 100755 index 00000000..c4664c3b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreementExecution; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAgreementProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAgreementProcessImpl.java new file mode 100755 index 00000000..50794d35 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAgreementProcess; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..225b449a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAmountOfMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfAssociationImpl.java new file mode 100755 index 00000000..cd963cf1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfAssociation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalObjectImpl.java new file mode 100755 index 00000000..d28df578 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..d9757a01 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfBiologicalSystemImpl.java new file mode 100755 index 00000000..80b507c4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassImpl.java new file mode 100755 index 00000000..1f89f81e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfClass; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfClassOfSpatioTemporalExtentImpl.java new file mode 100755 index 00000000..69bd2660 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfClassOfSpatioTemporalExtent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractExecutionImpl.java new file mode 100755 index 00000000..9ed54741 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfContractExecution; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfContractProcessImpl.java new file mode 100755 index 00000000..84891c8b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfContractProcess; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfEventImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfEventImpl.java new file mode 100755 index 00000000..76f18d73 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfEvent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalObjectImpl.java new file mode 100755 index 00000000..92cd03d7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..694f4362 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfFunctionalSystemImpl.java new file mode 100755 index 00000000..b86d1713 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInPlaceBiologicalComponentImpl.java new file mode 100755 index 00000000..b273f76e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInPlaceBiologicalComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIndividualImpl.java new file mode 100755 index 00000000..6a597939 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..e0f58efa --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfInstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfInstalledObjectImpl.java new file mode 100755 index 00000000..20f63f2c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfInstalledObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..30ed477a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOfferImpl.java new file mode 100755 index 00000000..3bdb5ca0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOffer; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..81483efe --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..13bb253a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..e46f5a5d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationComponentImpl.java new file mode 100755 index 00000000..5272f8a6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrganizationComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfOrganizationImpl.java new file mode 100755 index 00000000..4af34251 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfOrganization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfParticipantImpl.java new file mode 100755 index 00000000..0322ded2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfParticipant; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPartyImpl.java new file mode 100755 index 00000000..3db693c6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfParty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPeriodOfTimeImpl.java new file mode 100755 index 00000000..e18dea94 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPeriodOfTime; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonImpl.java new file mode 100755 index 00000000..edf6fbfb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPerson; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPersonInPositionImpl.java new file mode 100755 index 00000000..c1cf94d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPersonInPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalObjectImpl.java new file mode 100755 index 00000000..33f42e6e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalPropertyImpl.java new file mode 100755 index 00000000..a9566f21 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalProperty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..7d085083 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalQuantity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPointInTimeImpl.java new file mode 100755 index 00000000..838e0417 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPointInTime; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPositionImpl.java new file mode 100755 index 00000000..259163a8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfPossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfPossibleWorldImpl.java new file mode 100755 index 00000000..2da68eb7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfPossibleWorld; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfReachingAgreementImpl.java new file mode 100755 index 00000000..e346137e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfReachingAgreement; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRelationshipImpl.java new file mode 100755 index 00000000..a4efb92d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfRelationship; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfRepresentationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfRepresentationImpl.java new file mode 100755 index 00000000..a574c75c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfRepresentation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..6e58cfeb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSalesProductInstance; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSignImpl.java new file mode 100755 index 00000000..1a1e6387 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSign; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..c4fcc46a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..30819571 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSpatioTemporalExtentImpl.java new file mode 100755 index 00000000..56405e92 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSpatioTemporalExtent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateImpl.java new file mode 100755 index 00000000..1ab639a2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfState; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfActivityImpl.java new file mode 100755 index 00000000..920b8121 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..805d5b41 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfAmountOfMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfAssociationImpl.java new file mode 100755 index 00000000..fe5f12d0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfAssociation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalObjectImpl.java new file mode 100755 index 00000000..80795509 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..700bba66 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfBiologicalSystemImpl.java new file mode 100755 index 00000000..dece7223 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalObjectImpl.java new file mode 100755 index 00000000..74c343cd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..d2fc22a2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfFunctionalSystemImpl.java new file mode 100755 index 00000000..7193e069 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..2e106f93 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..5ab555f3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..81420d3a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..054a878b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationComponentImpl.java new file mode 100755 index 00000000..a8a2af7b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganizationComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfOrganizationImpl.java new file mode 100755 index 00000000..ebd77854 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPartyImpl.java new file mode 100755 index 00000000..7a52fb01 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfParty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPersonImpl.java new file mode 100755 index 00000000..1ef8f880 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPerson; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPhysicalObjectImpl.java new file mode 100755 index 00000000..4f922bc6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfPositionImpl.java new file mode 100755 index 00000000..17565ac1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..c35ba72e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSalesProductInstance; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSignImpl.java new file mode 100755 index 00000000..0111be9a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSign; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..321f5812 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..bfd9f06d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemComponentImpl.java new file mode 100755 index 00000000..295cc720 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfStateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfStateOfSystemImpl.java new file mode 100755 index 00000000..f37d3fe2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemComponentImpl.java new file mode 100755 index 00000000..64e70ed7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassOfSystemImpl.java new file mode 100755 index 00000000..df430b2e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ClassificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ClassificationImpl.java new file mode 100755 index 00000000..1fcbe6d8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Classification; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/CompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CompositionImpl.java new file mode 100755 index 00000000..ef98f62c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Composition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ContractExecutionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractExecutionImpl.java new file mode 100755 index 00000000..58364130 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ContractExecution; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ContractProcessImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ContractProcessImpl.java new file mode 100755 index 00000000..f4af9f26 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ContractProcess; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/CurrencyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/CurrencyImpl.java new file mode 100755 index 00000000..30009650 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Currency; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/DefinedRelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinedRelationshipImpl.java new file mode 100755 index 00000000..c42a2bd0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/DefinitionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DefinitionImpl.java new file mode 100755 index 00000000..aa0884bf --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Definition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/DescriptionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/DescriptionImpl.java new file mode 100755 index 00000000..40cc6749 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Description; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EmployeeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployeeImpl.java new file mode 100755 index 00000000..78149b7e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Employee; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EmployerImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmployerImpl.java new file mode 100755 index 00000000..8bf9e6a3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Employer; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EmploymentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EmploymentImpl.java new file mode 100755 index 00000000..3b6eefac --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Employment; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EndingOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EndingOfOwnershipImpl.java new file mode 100755 index 00000000..632fca5a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.EndingOfOwnership; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EnumeratedClassImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EnumeratedClassImpl.java new file mode 100755 index 00000000..befcaece --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.EnumeratedClass; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/EventImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/EventImpl.java new file mode 100755 index 00000000..2fdc6889 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Event; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ExchangeOfGoodsAndMoneyImpl.java new file mode 100755 index 00000000..038cb708 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ExchangeOfGoodsAndMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/FunctionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionImpl.java new file mode 100755 index 00000000..d870c8c2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Function_; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/FunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalObjectImpl.java new file mode 100755 index 00000000..20bbf569 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/FunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemComponentImpl.java new file mode 100755 index 00000000..133ca40d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/FunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/FunctionalSystemImpl.java new file mode 100755 index 00000000..65c779f5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/IdentificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationImpl.java new file mode 100755 index 00000000..27c045ea --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Identification; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IdentificationOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..0a342fc4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.IdentificationOfPhysicalQuantity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/InPlaceBiologicalComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InPlaceBiologicalComponentImpl.java new file mode 100755 index 00000000..83a895e8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.InPlaceBiologicalComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/IndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IndividualImpl.java new file mode 100755 index 00000000..08ae91f1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Individual; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..f914df7f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/InstalledObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/InstalledObjectImpl.java new file mode 100755 index 00000000..57e101b2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/IntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/IntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..7819462f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.IntentionallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfActivityImpl.java new file mode 100755 index 00000000..f6a6eb7e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfAssociationImpl.java new file mode 100755 index 00000000..8a19d546 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfAssociation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalObjectImpl.java new file mode 100755 index 00000000..88800d7f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..93faf05a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfBiologicalSystemImpl.java new file mode 100755 index 00000000..230309f2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfBiologicalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalObjectImpl.java new file mode 100755 index 00000000..5eca25cb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..57713add --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfFunctionalSystemImpl.java new file mode 100755 index 00000000..a2e4ac27 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfFunctionalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfIndividualImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIndividualImpl.java new file mode 100755 index 00000000..1b385202 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfIndividual; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..ba10304e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..70ad859b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..93614fe0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..2539f9fc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationComponentImpl.java new file mode 100755 index 00000000..d14cf7c2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganizationComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfOrganizationImpl.java new file mode 100755 index 00000000..d7a4a3fb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPartyImpl.java new file mode 100755 index 00000000..cec2c078 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfParty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPersonImpl.java new file mode 100755 index 00000000..bc243675 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfPerson; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalObjectImpl.java new file mode 100755 index 00000000..adbb9984 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalPropertyImpl.java new file mode 100755 index 00000000..0a1e2664 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalProperty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPhysicalQuantityImpl.java new file mode 100755 index 00000000..d19b104f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalQuantity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfPositionImpl.java new file mode 100755 index 00000000..5ac64bdd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithRestrictionImpl.java new file mode 100755 index 00000000..0c1a75f6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithRestriction; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfRelationshipWithSignatureImpl.java new file mode 100755 index 00000000..174cc1d7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithSignature; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..4b27fbc0 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemComponentImpl.java new file mode 100755 index 00000000..a7d9ae4f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/KindOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/KindOfSystemImpl.java new file mode 100755 index 00000000..f378bea4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.KindOfSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/LanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/LanguageCommunityImpl.java new file mode 100755 index 00000000..60315214 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.LanguageCommunity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/MoneyAssetImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/MoneyAssetImpl.java new file mode 100755 index 00000000..ae306e0e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.MoneyAsset; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferAndAcceptanceForGoodsImpl.java new file mode 100755 index 00000000..21522130 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OfferAndAcceptanceForGoods; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OfferForGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferForGoodsImpl.java new file mode 100755 index 00000000..d54dfb68 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OfferForGoods; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OfferImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferImpl.java new file mode 100755 index 00000000..8eacf80d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Offer; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OfferingImpl.java new file mode 100755 index 00000000..bc3ea4b4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Offering; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..b92bbd14 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..8cc39c55 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..58a63002 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationComponentImpl.java new file mode 100755 index 00000000..672eb388 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.OrganizationComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OrganizationImpl.java new file mode 100755 index 00000000..f07f35b1 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Organization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OwnerImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnerImpl.java new file mode 100755 index 00000000..4654bdef --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Owner; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/OwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/OwnershipImpl.java new file mode 100755 index 00000000..bdbfdf3e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Ownership; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ParticipantImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantImpl.java new file mode 100755 index 00000000..765d7b6e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Participant; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ParticipantInActivityOrAssociationImpl.java new file mode 100755 index 00000000..8c9f7f5b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ParticipantInActivityOrAssociation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PartyImpl.java new file mode 100755 index 00000000..4c45612d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Party; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PatternImpl.java new file mode 100755 index 00000000..3661a20e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Pattern; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PeriodOfTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PeriodOfTimeImpl.java new file mode 100755 index 00000000..67491e87 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PeriodOfTime; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonImpl.java new file mode 100755 index 00000000..487f0ce3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Person; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PersonInPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PersonInPositionImpl.java new file mode 100755 index 00000000..243f1aa2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PersonInPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalObjectImpl.java new file mode 100755 index 00000000..d16f7f15 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PhysicalPropertyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyImpl.java new file mode 100755 index 00000000..c86f36e2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PhysicalPropertyRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalPropertyRangeImpl.java new file mode 100755 index 00000000..d79c1ccc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PhysicalPropertyRange; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PhysicalQuantityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityImpl.java new file mode 100755 index 00000000..c344602c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PhysicalQuantityRangeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PhysicalQuantityRangeImpl.java new file mode 100755 index 00000000..8b6dc2ff --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantityRange; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PlanImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PlanImpl.java new file mode 100755 index 00000000..50e9deb2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Plan; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PointInTimeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PointInTimeImpl.java new file mode 100755 index 00000000..71490dc2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PointInTime; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PositionImpl.java new file mode 100755 index 00000000..641720c3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Position; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PossibleWorldImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PossibleWorldImpl.java new file mode 100755 index 00000000..fc5ebc6d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/PriceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/PriceImpl.java new file mode 100755 index 00000000..c7ab38df --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Price; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ProductBrandImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductBrandImpl.java new file mode 100755 index 00000000..c01356ad --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ProductBrand; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ProductOfferingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ProductOfferingImpl.java new file mode 100755 index 00000000..2f23b0b2 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ProductOffering; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ReachingAgreementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ReachingAgreementImpl.java new file mode 100755 index 00000000..19eacf74 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RecognizingLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RecognizingLanguageCommunityImpl.java new file mode 100755 index 00000000..265f6344 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RelationshipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RelationshipImpl.java new file mode 100755 index 00000000..5a7bf06e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Relationship; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RepresentationByPatternImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationByPatternImpl.java new file mode 100755 index 00000000..a1c53785 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RepresentationBySignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RepresentationBySignImpl.java new file mode 100755 index 00000000..734e36a8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.RepresentationBySign; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RequirementImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementImpl.java new file mode 100755 index 00000000..e6a88301 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Requirement; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RequirementSpecificationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RequirementSpecificationImpl.java new file mode 100755 index 00000000..58e8c418 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/RoleImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/RoleImpl.java new file mode 100755 index 00000000..365ea6d4 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SaleOfGoodsImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SaleOfGoodsImpl.java new file mode 100755 index 00000000..081bca54 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SaleOfGoods; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SalesProductImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductImpl.java new file mode 100755 index 00000000..42025854 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SalesProduct; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductInstanceImpl.java new file mode 100755 index 00000000..3f7b96cc --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SalesProductInstance; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SalesProductVersionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SalesProductVersionImpl.java new file mode 100755 index 00000000..85151900 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SalesProductVersion; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ScaleImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ScaleImpl.java new file mode 100755 index 00000000..afac7c12 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Scale; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SignImpl.java new file mode 100755 index 00000000..fbf3d958 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Sign; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedActivityImpl.java new file mode 100755 index 00000000..b1efaf27 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SociallyConstructedObjectImpl.java new file mode 100755 index 00000000..514cc759 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SpatioTemporalExtentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpatioTemporalExtentImpl.java new file mode 100755 index 00000000..9c774d2b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SpecializationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SpecializationImpl.java new file mode 100755 index 00000000..ab5bce61 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Specialization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateImpl.java new file mode 100755 index 00000000..ab69bfff --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.State; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfActivityImpl.java new file mode 100755 index 00000000..a3463075 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfAmountOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAmountOfMoneyImpl.java new file mode 100755 index 00000000..8581962f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfAmountOfMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfAssociationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfAssociationImpl.java new file mode 100755 index 00000000..079e76ce --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfAssociation; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalObjectImpl.java new file mode 100755 index 00000000..8fde03a5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemComponentImpl.java new file mode 100755 index 00000000..15fab1dd --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfBiologicalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfBiologicalSystemImpl.java new file mode 100755 index 00000000..5220d79a --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalObjectImpl.java new file mode 100755 index 00000000..0b17a3ab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemComponentImpl.java new file mode 100755 index 00000000..eaebd461 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfFunctionalSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfFunctionalSystemImpl.java new file mode 100755 index 00000000..4aceaf76 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfIntentionallyConstructedObjectImpl.java new file mode 100755 index 00000000..5d0ab4ea --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfLanguageCommunityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfLanguageCommunityImpl.java new file mode 100755 index 00000000..9b2e26ab --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfLanguageCommunity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryBiologicalObjectImpl.java new file mode 100755 index 00000000..1bfeb5b3 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryFunctionalObjectImpl.java new file mode 100755 index 00000000..07772d57 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrdinaryPhysicalObjectImpl.java new file mode 100755 index 00000000..e611ab10 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfOrganizationComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationComponentImpl.java new file mode 100755 index 00000000..f0ad6493 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrganizationComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfOrganizationImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfOrganizationImpl.java new file mode 100755 index 00000000..4244c316 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrganization; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfPartyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPartyImpl.java new file mode 100755 index 00000000..825a2787 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfParty; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfPersonImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPersonImpl.java new file mode 100755 index 00000000..4ba88e47 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfPerson; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfPhysicalObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPhysicalObjectImpl.java new file mode 100755 index 00000000..a1de655f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfPositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfPositionImpl.java new file mode 100755 index 00000000..407bc14c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfPosition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSalesProductInstanceImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSalesProductInstanceImpl.java new file mode 100755 index 00000000..e21766d8 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSalesProductInstance; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSignImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSignImpl.java new file mode 100755 index 00000000..5ec70682 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSign; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedActivityImpl.java new file mode 100755 index 00000000..c7f2928c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedActivity; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSociallyConstructedObjectImpl.java new file mode 100755 index 00000000..c10f0d90 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSociallyConstructedObject; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemComponentImpl.java new file mode 100755 index 00000000..7b5a78d6 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/StateOfSystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/StateOfSystemImpl.java new file mode 100755 index 00000000..41856a3c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.StateOfSystem; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SystemComponentImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemComponentImpl.java new file mode 100755 index 00000000..65a86b38 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.SystemComponent; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/SystemImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/SystemImpl.java new file mode 100755 index 00000000..6e3f59bb --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.System; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/TemporalCompositionImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TemporalCompositionImpl.java new file mode 100755 index 00000000..aae6d66c --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.TemporalComposition; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/ThingImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/ThingImpl.java new file mode 100755 index 00000000..20e243b5 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/TransferOfOwnershipImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipImpl.java new file mode 100755 index 00000000..af987304 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferOfOwnershipOfMoneyImpl.java new file mode 100755 index 00000000..ac3bf8ae --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnershipOfMoney; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/TransfereeImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransfereeImpl.java new file mode 100755 index 00000000..d68c897b --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Transferee; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/TransferorImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/TransferorImpl.java new file mode 100755 index 00000000..211ba226 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.Transferor; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/UnitOfMeasureImpl.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/UnitOfMeasureImpl.java new file mode 100755 index 00000000..4b51e25f --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model.impl; + +import uk.gov.gchq.magmacore.hqdm.model.UnitOfMeasure; +import uk.gov.gchq.magmacore.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/magmacore/hqdm/model/impl/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/impl/package-info.java new file mode 100644 index 00000000..d920063d --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model}. + */ +package uk.gov.gchq.magmacore.hqdm.model.impl; diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/model/package-info.java new file mode 100644 index 00000000..45dd4035 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.model; diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObject.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObject.java new file mode 100755 index 00000000..405bd879 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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.magmacore.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/magmacore/hqdm/pojo/Top.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/Top.java new file mode 100755 index 00000000..8576743e --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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/magmacore/hqdm/pojo/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/pojo/package-info.java new file mode 100644 index 00000000..e4cfd4d7 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.pojo; diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/ClassServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/ClassServices.java new file mode 100644 index 00000000..64db0988 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.services; + +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. + */ +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/magmacore/hqdm/services/DynamicObjects.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjects.java new file mode 100644 index 00000000..d8685a90 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.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.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. + */ +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/magmacore/hqdm/services/RelationshipServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/RelationshipServices.java new file mode 100644 index 00000000..b5bcf465 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.services; + +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. + */ +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/magmacore/hqdm/services/SpatioTemporalExtentServices.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/SpatioTemporalExtentServices.java new file mode 100644 index 00000000..3e74a926 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.services; + +import uk.gov.gchq.magmacore.hqdm.model.*; +import uk.gov.gchq.magmacore.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.magmacore.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/magmacore/hqdm/services/package-info.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/services/package-info.java new file mode 100644 index 00000000..37e3bf19 --- /dev/null +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.services; diff --git a/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObjectTest.java b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/pojo/HqdmObjectTest.java new file mode 100755 index 00000000..783db4e8 --- /dev/null +++ b/hqdm/src/test/java/uk/gov/gchq/magmacore/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.magmacore.hqdm.pojo; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +import org.junit.Assert; +import org.junit.Test; + +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. + */ +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/magmacore/hqdm/services/DynamicObjectsTest.java b/hqdm/src/test/java/uk/gov/gchq/magmacore/hqdm/services/DynamicObjectsTest.java new file mode 100755 index 00000000..e661e22d --- /dev/null +++ b/hqdm/src/test/java/uk/gov/gchq/magmacore/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.magmacore.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.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. + */ +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/java-formatter.xml b/java-formatter.xml new file mode 100644 index 00000000..b87bf946 --- /dev/null +++ b/java-formatter.xml @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 853ed1f3..31b3024b 100644 --- a/pom.xml +++ b/pom.xml @@ -13,13 +13,14 @@ ~ limitations under the License. --> - + 4.0.0 uk.gov.gchq.magma-core magma-core - 1.0 - jar + 2.0.0 + pom Magma Core @@ -38,53 +39,57 @@ UTF-8 - 15 + 17 - - - junit - junit - 4.13.1 - test - - - commons-cli - commons-cli - 1.4 - - - org.apache.jena - apache-jena-libs - pom - 4.0.0 - - - org.apache.jena - jena-fuseki-main - 4.0.0 - - - 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.14.0 - - - uk.gov.gchq.hqdm - hqdm - 1.0 - - + + core + examples + hqdm + hqdm-rdf + + + + + + uk.gov.gchq.magma-core + core + 2.0.0 + + + uk.gov.gchq.magma-core + hqdm + 2.0.0 + + + uk.gov.gchq.magma-core + hqdm-rdf + 2.0.0 + + + junit + junit + 4.13.2 + test + + + commons-cli + commons-cli + 1.5.0 + + + org.apache.jena + apache-jena-libs + pom + 4.5.0 + + + org.slf4j + slf4j-jdk14 + 2.0.2 + + + @@ -96,7 +101,7 @@ com.puppycrawl.tools checkstyle - 8.42 + 10.3.3 @@ -123,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-M1 + 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 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 3b5706b2..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/database/MagmaCoreObjectDatabase.java +++ /dev/null @@ -1,140 +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.iri.HqdmIri; -import uk.gov.gchq.hqdm.iri.IRI; -import uk.gov.gchq.hqdm.model.Thing; - -/** - * 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 = object.getIri(); - if (!objects.keySet().contains(iri)) { - objects.put(iri, object); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void update(final Thing object) { - final IRI iri = object.getIri(); - if (objects.keySet().contains(iri)) { - objects.put(iri, object); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void delete(final Thing object) { - final IRI iri = object.getIri(); - 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, objectIri)) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriOnly(final HqdmIri predicateIri) { - return objects.values().stream() - .filter(object -> object.hasValue(predicateIri)) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriAndStringValue(final IRI predicateIri, - final String value) { - return objects.values().stream() - .filter(object -> object.hasThisStringValue(predicateIri, value)) - .collect(Collectors.toList()); - } - - /** - * {@inheritDoc} - */ - @Override - public List findByPredicateIriAndStringCaseInsensitive(final IRI predicateIri, - final String value) { - return objects.values().stream() - .filter(object -> object.hasThisStringValueIgnoreCase(predicateIri, 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(object.toTriples())); - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java b/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java deleted file mode 100644 index 0cb8cc41..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ExampleDataObjects.java +++ /dev/null @@ -1,378 +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.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.event; -import static uk.gov.gchq.magmacore.util.DataObjectUtils.uid; - -import java.util.ArrayList; -import java.util.List; - -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 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; -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.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; - -/** - * 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.getIri().toString()); - object.getPredicates() - .forEach((iri, predicates) -> predicates.forEach(predicate -> resource - .addProperty(model.createProperty(iri.toString()), - predicate.toString()))); - }); - return DatasetFactory.create(model); - } - - /** - * Generates a set of example data objects using HQDM. - * - * @return A list of HQDM objects. - */ - public static List createDataObjects() { - final List objects = new ArrayList<>(); - - // 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 = - new uk.gov.gchq.hqdm.model.impl.ClassImpl.Builder( - new IRI(REF_BASE, uid())).build(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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())); - kindOfFunctionalSystemBuilding.addStringValue(ENTITY_NAME, - "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 = - new KindOfFunctionalSystemComponentImpl.Builder( - new IRI(REF_BASE, uid())).build(); - 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(); - 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(); - 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(); - 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(); - 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(); - // 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, - "DOMESTIC_PROPERTY_THAT_IS_OCCUPIED_ROLE"); - objects.add(domesticOccupantInPropertyRole); - - final Role occupierOfPropertyRole = new RoleImpl.Builder(new IRI(REF_BASE, uid())) - .has_Superclass(classOfStateOfPerson).build(); - - // 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, - "OCCUPIER_LOCATED_IN_PROPERTY_ROLE"); - objects.add(occupierOfPropertyRole); - - // 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(); - occupantInPropertyKindOfAssociation.addStringValue(ENTITY_NAME, - "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 PossibleWorld possibleWorld = new PossibleWorldImpl(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(); - personB1.addStringValue(ENTITY_NAME, "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 = 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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(); - // 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(); - // Abbreviated to allow a string to be displayed against this class of 'relationship'. - houseOccupantPresentState2.addStringValue(ENTITY_NAME, "HouseOccupantPresent2"); - objects.add(houseOccupantPresentState2); - - return objects; - } -} diff --git a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java b/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java deleted file mode 100644 index 238175b2..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/FusekiService.java +++ /dev/null @@ -1,70 +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 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; - -/** - * 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 - * 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 FusekiService { - - /** - * Run the example Fuseki server. - */ - public void run() { - // 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()) { - // Build example data objects Dataset. - final Dataset objects = ExampleDataObjects.buildDataset(); - - // Add example objects to default model in persistent dataset. - tdb.getDataset().getDefaultModel().add(objects.getDefaultModel()); - tdb.commit(); - } else { - tdb.abort(); - } - // Build and start Fuseki server. - final FusekiServer server = FusekiServer - .create() - .port(3330) - .add("/tdb", tdb.getDataset(), true).build(); - FusekiLogging.setLogging(); - server.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 deleted file mode 100644 index feedea07..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/JenaDatabaseDemo.java +++ /dev/null @@ -1,83 +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.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; - -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreJenaDatabase; - -/** - * Example use-case scenario for {@link MagmaCoreJenaDatabase}. - * - *

- * This example demo creates an in-memory {@link MagmaCoreJenaDatabase} populated with the - * {@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)} - * method. The resulting object(s) of this query are output to the command-line as RDF triples. - *

- * - */ -public final class JenaDatabaseDemo { - - /** - * Run the in-memory Jena database example. - */ - public void run() { - // Instantiate new in-memory Jena database. - final MagmaCoreJenaDatabase jenaDatabase = new MagmaCoreJenaDatabase(); - jenaDatabase.register(HQDM); - jenaDatabase.register(RDFS); - 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(object -> jenaDatabase.create(object)); - jenaDatabase.commit(); - - // Query database to check its populated. - jenaDatabase.begin(); - final List queryResults = - jenaDatabase.findByPredicateIriAndStringValue(ENTITY_NAME, "PersonB1_Bob"); - jenaDatabase.abort(); - - // Output results of query to console. - queryResults.forEach(object -> System.out.println(object.toString())); - - 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 deleted file mode 100644 index ba090a29..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/demo/ObjectDatabaseDemo.java +++ /dev/null @@ -1,60 +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.hqdm.iri.HQDM.ENTITY_NAME; - -import java.util.List; - -import uk.gov.gchq.hqdm.model.Thing; -import uk.gov.gchq.magmacore.database.MagmaCoreObjectDatabase; - -/** - * 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 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); - - // Query database to check it's populated. - final List queryResults = - objectDatabase.findByPredicateIriAndStringValue(ENTITY_NAME, "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/util/DataObjectUtils.java b/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java deleted file mode 100644 index 729d9266..00000000 --- a/src/main/java/uk/gov/gchq/magmacore/util/DataObjectUtils.java +++ /dev/null @@ -1,78 +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.util; - -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. - */ -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() {} - - /** - * Create a new random UUID to assign to an object. - * - * @return A Random UUID. - */ - 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(); - } - - /** - * 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; - } -}