diff --git a/.gitignore b/.gitignore index 81695d52..6e78c3e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.png .idea .vscode .project diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 38b4d6a7..5d3ef2d2 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -2,19 +2,20 @@ - - + + - - + + - - - + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/checkstyles.xml b/checkstyles.xml index 42ef640b..b951029e 100644 --- a/checkstyles.xml +++ b/checkstyles.xml @@ -39,7 +39,7 @@ - + @@ -224,7 +224,7 @@ - + diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java index 580fedb3..12f4bf14 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/MagmaCoreService.java @@ -211,7 +211,6 @@ public List findBySignValue( * * @param community The {@link RecognizingLanguageCommunity} that recognizes * the sign value. - * @param pattern The {@link Pattern} the sign conforms to. * @param value {@link String} the partial sign value to look for. * @param pointInTime {@link PointInTime} the point in time we are interested * in. @@ -221,7 +220,6 @@ public List findBySignValue( */ public List findByPartialSignValue( final RecognizingLanguageCommunity community, - final Pattern pattern, final String value, final PointInTime pointInTime) throws MagmaCoreException { @@ -235,8 +233,7 @@ public List findByPartialSignValue( final QueryResultList queryResultList = database .executeQuery(String.format(MagmaCoreServiceQueries.FIND_BY_PARTIAL_SIGN_VALUE_CASE_INSENSITIVE_QUERY, value, - community.getId(), - pattern.getId())); + community.getId())); // Filter by the pointInTime final QueryResultList queryResults = filterByPointInTime(when, queryResultList); @@ -300,9 +297,11 @@ public List findByTypeKindAndSignPattern( final Instant when = Instant.parse(pointInTimeValue); + final String queryString = String.format(MagmaCoreServiceQueries.FIND_OBJECTS_BY_TYPE_AND_SIGN_PATTERN, + type, kind, pattern, type, kind, pattern); + final QueryResultList queryResultList = database - .executeQuery(String.format(MagmaCoreServiceQueries.FIND_OBJECTS_BY_TYPE_AND_SIGN_PATTERN, - type, kind, pattern, type, kind, pattern)); + .executeQuery(queryString); // Filter by the pointInTime final QueryResultList queryResults = filterByPointInTime(when, queryResultList); @@ -669,6 +668,7 @@ private static SignPatternDto toSignPatternDto(final QueryResult qr) { * @return {@link Thing} that was found. * @throws RuntimeException If no or multiple results were found. */ + @SuppressWarnings("unchecked") public T findByEntityName(final String entityName) { final List searchResult = findByPredicateIriAndValue(HQDM.ENTITY_NAME, entityName); @@ -688,6 +688,7 @@ public T findByEntityName(final String entityName) { * @param predicate the predicate {@link IRI} * @return a List of {@link Thing} that were found. */ + @SuppressWarnings("unchecked") public List findByPredicateIriOnly(final IRI predicate) { return (List) database.findByPredicateIriOnly(predicate); } @@ -700,6 +701,7 @@ public List findByPredicateIriOnly(final IRI predicate) { * @param value The value of the predicate. * @return a List of {@link Thing} that were found. */ + @SuppressWarnings("unchecked") public List findByPredicateIriAndValue(final IRI predicate, final Object value) { return (List) database.findByPredicateIriAndValue(predicate, value); } diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/sparql/MagmaCoreServiceQueries.java b/core/src/main/java/uk/gov/gchq/magmacore/service/sparql/MagmaCoreServiceQueries.java index 4a0e387d..ca00655a 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/sparql/MagmaCoreServiceQueries.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/sparql/MagmaCoreServiceQueries.java @@ -33,32 +33,23 @@ public class MagmaCoreServiceQueries { *

*/ public static final String FIND_BY_SIGN_VALUE_QUERY = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT ?s ?p ?o ?start ?finish WHERE { - BIND("%s" as ?signvalue) + BIND("%s" as ?patternValue) BIND(<%s> as ?rlc) - BIND(<%s> as ?pattern) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?s. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND(<%s> as ?patternIri) + ?patternIri skos:definition ?patternValue; + a hqdm:Pattern. + ?repByPattern hqdm:consistsOfByClass ?patternIri; + hqdm:represented ?s; + hqdm:consistsOfInMembers ?rlc. + ?s ?p ?o. } """; @@ -76,7 +67,8 @@ public class MagmaCoreServiceQueries { *

*/ public static final String FIND_BY_PARTIAL_SIGN_VALUE_CASE_INSENSITIVE_QUERY = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: @@ -84,25 +76,15 @@ public class MagmaCoreServiceQueries { WHERE { BIND("%s" as ?text) BIND(<%s> as ?rlc) - BIND(<%s> as ?pattern) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signvalue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?s. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + ?patternIri skos:definition ?patternValue; + a hqdm:Pattern. + ?repByPattern hqdm:consistsOfByClass ?patternIri; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?s. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + + ?s ?p ?o. } """; @@ -115,7 +97,8 @@ public class MagmaCoreServiceQueries { *

*/ public static final String FIND_PARTICIPANT_DETAILS_QUERY = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: PREFIX xsd: @@ -128,20 +111,20 @@ public class MagmaCoreServiceQueries { BIND( <%s> as ?ind2) BIND( <%s> as ?kind) - ?s hqdm:temporal_part_of ?ind1; - hqdm:participant_in ?assoc1; + ?s hqdm:temporalPartOf ?ind1; + hqdm:participantIn ?assoc1; ?p ?o. - ?i2stat hqdm:temporal_part_of ?ind2; - hqdm:participant_in ?assoc1; + ?i2stat hqdm:temporalPartOf ?ind2; + hqdm:participantIn ?assoc1; ?i2statp ?i2stato. - ?assoc1 hqdm:member_of_kind ?kind. + ?assoc1 hqdm:memberOfKind ?kind. OPTIONAL { ?assoc1 hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start + ?begin skos:prefLabel ?start } OPTIONAL { ?assoc1 hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish + ?end skos:prefLabel ?finish } } } @@ -153,20 +136,20 @@ public class MagmaCoreServiceQueries { BIND( <%s> as ?ind2) BIND( <%s> as ?kind) - ?i2stat hqdm:temporal_part_of ?ind1; - hqdm:participant_in ?assoc1; + ?i2stat hqdm:temporalPartOf ?ind1; + hqdm:participantIn ?assoc1; ?i2statp ?i2stato. - ?s hqdm:temporal_part_of ?ind2; - hqdm:participant_in ?assoc1; + ?s hqdm:temporalPartOf ?ind2; + hqdm:participantIn ?assoc1; ?p ?o. - ?assoc1 hqdm:member_of_kind ?kind. + ?assoc1 hqdm:memberOfKind ?kind. OPTIONAL { ?assoc1 hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start + ?begin skos:prefLabel ?start } OPTIONAL { ?assoc1 hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. + ?end skos:prefLabel ?finish. } } } @@ -186,11 +169,12 @@ public class MagmaCoreServiceQueries { * *

*

- * The result includes `hqdm:value_` predicates for the signValues. + * The result includes `skos:definition` predicates for the signValues. *

*/ public static final String FIND_OBJECTS_BY_TYPE_CLASS_AND_SIGN_PATTERN = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: select distinct * @@ -198,61 +182,39 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?type) - BIND(<%s> as ?kind) - BIND(<%s> as ?pattern) - - ?s a ?type; - hqdm:member_of ?kind; - ?p ?o. - ?st hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?st. - ?signst hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish - } + BIND(<%s> as ?typeIri) + BIND(<%s> as ?kindIri) + BIND(<%s> as ?patternIri) + ?s a ?typeIri; + hqdm:memberOf ?kindIri; + ?p ?o. + ?st hqdm:temporalPartOf ?s. + ?repByPattern hqdm:represented ?st; + a hqdm:RepresentationByPattern; + hqdm:consistsOfByClass ?patternIri. + ?patternIri a hqdm:Pattern; + skos:definition ?patternValue. } } UNION { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?type) - BIND(<%s> as ?kind) - BIND(<%s> as ?pattern) + BIND(<%s> as ?typeIri) + BIND(<%s> as ?kindIri) + BIND(<%s> as ?patternIri) - ?s a ?type; - hqdm:member_of ?kind; + ?s a ?typeIri; + hqdm:memberOf ?kindIri; ?pr ?ob. - ?st hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?st. - ?signst hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?o; - ?p ?o; - hqdm:member_of_ ?pattern. - - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish - } - + ?st hqdm:temporalPartOf ?s. + ?repByPattern hqdm:represented ?st; + a hqdm:RepresentationByPattern; + hqdm:consistsOfByClass ?patternIri. + ?patternIri a hqdm:Pattern; + skos:definition ?o; + ?p ?o. } } } @@ -271,11 +233,12 @@ public class MagmaCoreServiceQueries { * *

*

- * The result includes `hqdm:value_` predicates for the signValues. + * The result includes `skos:definition` predicates for the signValues. *

*/ public static final String FIND_OBJECTS_BY_TYPE_AND_SIGN_PATTERN = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: select distinct * @@ -283,30 +246,17 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?type) - BIND(<%s> as ?kind) - BIND(<%s> as ?pattern) - - ?s a ?type; - hqdm:member_of_kind ?kind; - ?p ?o. - ?st hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?st. - ?signst hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish - } + BIND(<%s> as ?typeIri) + BIND(<%s> as ?kindIri) + BIND(<%s> as ?patternIri) + ?s a ?typeIri; + hqdm:memberOfKind ?kindIri; + ?p ?o. + ?st hqdm:temporalPartOf ?s. + ?repByPattern a hqdm:RepresentationByPattern; + hqdm:represented ?st; + hqdm:consistsOfByClass ?patternIri. } } UNION @@ -318,26 +268,14 @@ public class MagmaCoreServiceQueries { BIND(<%s> as ?pattern) ?s a ?type; - hqdm:member_of_kind ?kind; + hqdm:memberOfKind ?kind; ?pr ?ob. - ?st hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?st. - ?signst hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?o; - ?p ?o; - hqdm:member_of_ ?pattern. - - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish - } - + ?st hqdm:temporalPartOf ?s. + ?repByPattern a hqdm:RepresentationByPattern; + hqdm:represented ?st; + hqdm:consistsOfByClass ?pattern. + ?pattern skos:definition ?o; + ?p ?o. } } } @@ -352,7 +290,8 @@ public class MagmaCoreServiceQueries { *

*/ public static final String FIND_BY_KIND_OF_ASSOCIATION = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: select ?s ?p ?o where @@ -360,11 +299,11 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o WHERE { - BIND(<%s> as ?kind_of_association) - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:member_of_kind ?role; - hqdm:temporal_part_of ?s. + BIND(<%s> as ?kindOfAssociation) + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:memberOfKind ?role; + hqdm:temporalPartOf ?s. ?s ?p ?o. } } @@ -372,12 +311,12 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o WHERE { - BIND(<%s> as ?kind_of_association) - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:member_of_kind ?role; - hqdm:temporal_part_of ?s. - ?role hqdm:data_EntityName ?o; + BIND(<%s> as ?kindOfAssociation) + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:memberOfKind ?role; + hqdm:temporalPartOf ?s. + ?role skos:prefLabel ?o; ?p ?o. } } @@ -385,17 +324,16 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o WHERE { - BIND(<%s> as ?kind_of_association) - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:temporal_part_of ?s. - ?state_of_individual hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?state_of_individual. - ?repBySign a hqdm:representation_by_sign. - ?state_of_sign hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?o; + BIND(<%s> as ?kindOfAssociation) + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:temporalPartOf ?s. + ?stateOfIndividual hqdm:temporalPartOf ?s. + ?repByPattern hqdm:represented ?stateOfIndividual; + a hqdm:RepresentationByPattern; + hqdm:consistsOfByClass ?patternIri. + + ?patternIri skos:definition ?o; ?p ?o. } @@ -408,7 +346,8 @@ public class MagmaCoreServiceQueries { * Find things associated to a given thing by an association of a given kind. */ public static final String FIND_ASSOCIATED = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: select ?s ?p ?o ?start ?finish @@ -417,21 +356,21 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?kind_of_association) - ?from hqdm:temporal_part_of <%s>; - hqdm:participant_in ?association. - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:temporal_part_of ?s. + BIND(<%s> as ?kindOfAssociation) + ?from hqdm:temporalPartOf <%s>; + hqdm:participantIn ?association. + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:temporalPartOf ?s. ?s ?p ?o. FILTER(?s != <%s>) OPTIONAL { ?association hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. + ?begin skos:prefLabel ?start. } OPTIONAL { ?association hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. + ?end skos:prefLabel ?finish. } } } @@ -439,23 +378,23 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?kind_of_association) - ?from hqdm:temporal_part_of <%s>; - hqdm:participant_in ?association. - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:temporal_part_of ?s; - hqdm:member_of_kind ?role. + BIND(<%s> as ?kindOfAssociation) + ?from hqdm:temporalPartOf <%s>; + hqdm:participantIn ?association. + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:temporalPartOf ?s; + hqdm:memberOfKind ?role. FILTER(?s != <%s>) OPTIONAL { ?association hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. + ?begin skos:prefLabel ?start. } OPTIONAL { ?association hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. + ?end skos:prefLabel ?finish. } - ?role hqdm:data_EntityName ?o; + ?role skos:prefLabel ?o; ?p ?o. } } @@ -463,28 +402,26 @@ public class MagmaCoreServiceQueries { { select distinct ?s ?p ?o ?start ?finish WHERE { - BIND(<%s> as ?kind_of_association) - ?from hqdm:temporal_part_of <%s>; - hqdm:participant_in ?association. - ?association hqdm:member_of_kind ?kind_of_association. - ?participant hqdm:participant_in ?association; - hqdm:temporal_part_of ?s. + BIND(<%s> as ?kindOfAssociation) + ?from hqdm:temporalPartOf <%s>; + hqdm:participantIn ?association. + ?association hqdm:memberOfKind ?kindOfAssociation. + ?participant hqdm:participantIn ?association; + hqdm:temporalPartOf ?s. FILTER(?s != <%s>) - ?state_of_individual hqdm:temporal_part_of ?s. - ?repBySign hqdm:represents ?state_of_individual. - ?repBySign a hqdm:representation_by_sign. - ?state_of_sign hqdm:participant_in ?repBySign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. + ?stateOfIndividual hqdm:temporalPartOf ?s. + ?repByPattern hqdm:represented ?stateOfIndividual. + ?repByPattern a hqdm:RepresentationByPattern. + ?repByPattern hqdm:consistsOfByClass ?patternIri. OPTIONAL { ?association hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. + ?begin skos:prefLabel ?start. } OPTIONAL { ?association hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. + ?end skos:prefLabel ?finish. } - ?sign hqdm:value_ ?o; + ?patternIri skos:definition ?o; ?p ?o. } } @@ -497,7 +434,8 @@ public class MagmaCoreServiceQueries { * Search for items whose sign contains some text and are members of a specific class. */ public static final String FIND_MEMBERS_OF_CLASS_BY_PARTIAL_SIGN_CASE_SENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -508,78 +446,51 @@ public class MagmaCoreServiceQueries { BIND("%s" as ?text) BIND(<%s> as ?class) # IRI of the class - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signvalue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { BIND("%s" as ?text) BIND(<%s> as ?class) # IRI of the class - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. + ?pattern skos:definition ?o. FILTER(CONTAINS(str(?o), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { BIND("%s" as ?text) BIND(<%s> as ?class) - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signValue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } @@ -591,7 +502,8 @@ public class MagmaCoreServiceQueries { * Search for items whose sign contains some text and are members of a specific class. */ public static final String FIND_MEMBERS_OF_CLASS_BY_PARTIAL_SIGN_CASE_INSENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -602,78 +514,51 @@ public class MagmaCoreServiceQueries { BIND("%s" as ?text) BIND(<%s> as ?class) # IRI of the class - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signvalue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { BIND("%s" as ?text) BIND(<%s> as ?class) # IRI of the class - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. + ?pattern skos:definition ?o. FILTER(CONTAINS(lcase(str(?o)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { BIND("%s" as ?text) BIND(<%s> as ?class) - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signValue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } @@ -685,7 +570,8 @@ public class MagmaCoreServiceQueries { * A partial search by sign for entities referenced by an Activity. */ public static final String FIND_MEMBERS_OF_CLASS_BY_ACTIVITY_AND_PARTIAL_SIGN_CASE_SENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -693,87 +579,60 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signvalue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. + ?s ?p ?o. } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?o), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?o. + FILTER(CONTAINS(str(?o), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signValue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } } @@ -784,7 +643,8 @@ public class MagmaCoreServiceQueries { * A partial search by sign for entities referenced by an Activity. */ public static final String FIND_MEMBERS_OF_CLASS_BY_ACTIVITY_AND_PARTIAL_SIGN_CASE_INSENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -792,87 +652,60 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signvalue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. + ?s ?p ?o. } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?o)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?o. + FILTER(CONTAINS(lcase(str(?o)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signValue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?topicId hqdm:references ?s. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?topicId hqdm:references ?s. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } } @@ -883,7 +716,8 @@ public class MagmaCoreServiceQueries { * A partial search by sign for entities composed into a whole entity. */ public static final String FIND_MEMBERS_OF_CLASS_BY_COMPOSITION_AND_PARTIAL_SIGN_CASE_SENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -891,90 +725,65 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signvalue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + + ?comp hqdm:part ?s; + hqdm:whole ?topicId. + ?s ?p ?o. } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?o), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?o. + FILTER(CONTAINS(str(?o), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + + ?comp hqdm:part ?s; + hqdm:whole ?topicId. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(str(?signValue), ?text)) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(str(?patternValue), ?text)) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?comp hqdm:part ?s; + hqdm:whole ?topicId. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } } @@ -985,7 +794,8 @@ public class MagmaCoreServiceQueries { * A partial search by sign for entities composed into a whole entity. */ public static final String FIND_MEMBERS_OF_CLASS_BY_COMPOSITION_AND_PARTIAL_SIGN_CASE_INSENSITIVE = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT distinct ?s ?p ?o ?start ?finish @@ -993,90 +803,65 @@ public class MagmaCoreServiceQueries { { SELECT ?s ?p ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signvalue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signvalue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - ?s ?p ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + + ?comp hqdm:part ?s; + hqdm:whole ?topicId. + ?s ?p ?o. } } UNION { - SELECT ?s (hqdm:value_ as ?p) ?o ?start ?finish + SELECT ?s (skos:definition as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?o; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?o)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?o. + FILTER(CONTAINS(lcase(str(?o)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + + ?comp hqdm:part ?s; + hqdm:whole ?topicId. } } UNION { - SELECT ?s (hqdm:data_EntityName as ?p) ?o ?start ?finish + SELECT ?s (skos:prefLabel as ?p) ?o ?start ?finish WHERE { - BIND("%s" as ?text) - BIND(<%s> as ?class) - BIND(<%s> as ?topicId) - - ?sign hqdm:value_ ?signValue; - hqdm:member_of_ ?pattern. - FILTER(CONTAINS(lcase(str(?signValue)), lcase(?text))) - ?sos hqdm:temporal_part_of ?sign; - hqdm:participant_in ?repBySign. - ?rlc hqdm:participant_in ?repBySign. - ?repBySign hqdm:represents ?state. - ?state hqdm:temporal_part_of ?s. - ?s hqdm:member_of ?class. - ?comp hqdm:part ?s; - hqdm:whole ?topicId. - ?s hqdm:member_of_kind ?kind. - ?kind hqdm:data_EntityName ?o. - OPTIONAL { - ?repBySign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?repBySign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } + BIND("%s" as ?text) + BIND(<%s> as ?class) + BIND(<%s> as ?topicId) + + ?pattern skos:definition ?patternValue. + FILTER(CONTAINS(lcase(str(?patternValue)), lcase(?text))) + ?repByPattern hqdm:consistsOfByClass ?pattern; + a hqdm:RepresentationByPattern; + hqdm:consistsOfInMembers ?rlc; + hqdm:represented ?state. + ?state hqdm:temporalPartOf ?s. + ?s hqdm:memberOf ?class. + ?comp hqdm:part ?s; + hqdm:whole ?topicId. + ?s hqdm:memberOfKind ?kind. + ?kind skos:prefLabel ?o. } } } @@ -1087,35 +872,22 @@ public class MagmaCoreServiceQueries { * Find the signs for an entity and the pattern and representation by pattern ENTITY_NAMES. */ public static final String FIND_SIGNS_FOR_ENTITY = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: - SELECT distinct ?sign_value ?pattern_name ?rep_by_pattern_name ?start ?finish + SELECT distinct ?signValue ?patternName ?repByPatternName ?start ?finish WHERE { { SELECT * WHERE { BIND(<%s> as ?s) - ?state_of_s hqdm:temporal_part_of ?s. - ?rep_by_sign hqdm:represents ?state_of_s; - hqdm:member_of_ ?rep_by_pattern. - ?rep_by_pattern hqdm:data_EntityName ?rep_by_pattern_name. - ?state_of_sign hqdm:participant_in ?rep_by_sign; - a hqdm:state_of_sign; - hqdm:temporal_part_of ?sign. - ?sign hqdm:value_ ?sign_value; - hqdm:member_of_ ?pattern. - ?pattern hqdm:data_EntityName ?pattern_name. - OPTIONAL { - ?rep_by_sign hqdm:beginning ?begin. - ?begin hqdm:data_EntityName ?start. - } - OPTIONAL { - ?rep_by_sign hqdm:ending ?end. - ?end hqdm:data_EntityName ?finish. - } - + ?stateOfS hqdm:temporalPartOf ?s. + ?repByPattern hqdm:represented ?stateOfS; + hqdm:consistsOfByClass ?pattenrIri; + skos:prefLabel ?repByPatternName. + ?patternIri skos:definition ?signValue. } } } @@ -1125,7 +897,8 @@ public class MagmaCoreServiceQueries { * Find by field value and class query. */ public static final String FIND_BY_FIELD_VALUE_AND_CLASS = """ - PREFIX hqdm: + PREFIX hqdm: + PREFIX skos: PREFIX rdf: SELECT ?s ?p ?o diff --git a/core/src/main/java/uk/gov/gchq/magmacore/service/verify/DataIntegrityReport.java b/core/src/main/java/uk/gov/gchq/magmacore/service/verify/DataIntegrityReport.java index 135f3c91..61158672 100644 --- a/core/src/main/java/uk/gov/gchq/magmacore/service/verify/DataIntegrityReport.java +++ b/core/src/main/java/uk/gov/gchq/magmacore/service/verify/DataIntegrityReport.java @@ -12,125 +12,125 @@ public class DataIntegrityReport { private static final String CHECK_MISSING_DATA_ENTITY_NAME = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_entity_name "Should have a data_EntityName.". + ?s hqdm:errorMissingEntityName "Should have a dataentityName.". ?s a ?type. } where { ?s a ?type; ?p ?o. OPTIONAL { - ?s hqdm:data_EntityName ?name. + ?s hqdm:dataentityName ?name. } FILTER(!bound(?name)) FILTER(?type in ( hqdm:class, hqdm:classification, - hqdm:class_of_abstract_object, - hqdm:class_of_activity, - hqdm:class_of_agree_contract, - hqdm:class_of_agreement_execution, - hqdm:class_of_agreement_process, - hqdm:class_of_amount_of_money, - hqdm:class_of_association, - hqdm:class_of_biological_object, - hqdm:class_of_biological_system, - hqdm:class_of_biological_system_component, - hqdm:class_of_class, - hqdm:class_of_class_of_spatio_temporal_extent, - hqdm:class_of_contract_execution, - hqdm:class_of_contract_process, - hqdm:class_of_event, - hqdm:class_of_functional_object, - hqdm:class_of_functional_system, - hqdm:class_of_functional_system_component, - hqdm:class_of_individual, - hqdm:class_of_in_place_biological_component, - hqdm:class_of_installed_functional_system_component, - hqdm:class_of_installed_object, - hqdm:class_of_intentionally_constructed_object, - hqdm:class_of_offer, - hqdm:class_of_ordinary_biological_object, - hqdm:class_of_ordinary_functional_object, - hqdm:class_of_ordinary_physical_object, - hqdm:class_of_organization, - hqdm:class_of_organization_component, - hqdm:class_of_participant, - hqdm:class_of_party, - hqdm:class_of_period_of_time, - hqdm:class_of_person, - hqdm:class_of_person_in_position, - hqdm:class_of_physical_object, - hqdm:class_of_physical_property, - hqdm:class_of_physical_quantity, - hqdm:class_of_point_in_time, - hqdm:class_of_position, - hqdm:class_of_possible_world, - hqdm:class_of_reaching_agreement, - hqdm:class_of_relationship, - hqdm:class_of_representation, - hqdm:class_of_sales_product_instance, - hqdm:class_of_sign, - hqdm:class_of_socially_constructed_activity, - hqdm:class_of_socially_constructed_object, - hqdm:class_of_spatio_temporal_extent, - hqdm:class_of_state, - hqdm:class_of_state_of_activity, - hqdm:class_of_state_of_amount_of_money, - hqdm:class_of_state_of_association, - hqdm:class_of_state_of_biological_object, - hqdm:class_of_state_of_biological_system, - hqdm:class_of_state_of_biological_system_component, - hqdm:class_of_state_of_functional_object, - hqdm:class_of_state_of_functional_system, - hqdm:class_of_state_of_functional_system_component, - hqdm:class_of_state_of_intentionally_constructed_object, - hqdm:class_of_state_of_ordinary_biological_object, - hqdm:class_of_state_of_ordinary_functional_object, - hqdm:class_of_state_of_ordinary_physical_object, - hqdm:class_of_state_of_organization, - hqdm:class_of_state_of_organization_component, - hqdm:class_of_state_of_party, - hqdm:class_of_state_of_person, - hqdm:class_of_state_of_physical_object, - hqdm:class_of_state_of_position, - hqdm:class_of_state_of_sales_product_instance, - hqdm:class_of_state_of_sign, - hqdm:class_of_state_of_socially_constructed_activity, - hqdm:class_of_state_of_socially_constructed_object, - hqdm:class_of_state_of_system, - hqdm:class_of_state_of_system_component, - hqdm:class_of_system, - hqdm:class_of_system_component, - hqdm:kind_of_activity, - hqdm:kind_of_association, - hqdm:kind_of_biological_object, - hqdm:kind_of_biological_system, - hqdm:kind_of_biological_system_component, - hqdm:kind_of_functional_object, - hqdm:kind_of_functional_system, - hqdm:kind_of_functional_system_component, - hqdm:kind_of_individual, - hqdm:kind_of_intentionally_constructed_object, - hqdm:kind_of_ordinary_biological_object, - hqdm:kind_of_ordinary_functional_object, - hqdm:kind_of_ordinary_physical_object, - hqdm:kind_of_organization, - hqdm:kind_of_organization_component, - hqdm:kind_of_party, - hqdm:kind_of_person, - hqdm:kind_of_physical_object, - hqdm:kind_of_physical_property, - hqdm:kind_of_physical_quantity, - hqdm:kind_of_position, - hqdm:kind_of_relationship_with_restriction, - hqdm:kind_of_relationship_with_signature, - hqdm:kind_of_socially_constructed_object, - hqdm:kind_of_system, - hqdm:kind_of_system_component, + hqdm:classOfAbstractObject, + hqdm:classOfActivity, + hqdm:classOfAgreeContract, + hqdm:classOfAgreementExecution, + hqdm:classOfAgreementProcess, + hqdm:classOfAmountOfMoney, + hqdm:classOfAssociation, + hqdm:classOfBiologicalObject, + hqdm:classOfBiologicalSystem, + hqdm:classOfBiologicalSystemComponent, + hqdm:classOfClass, + hqdm:classOfClassOfSpatioTemporalExtent, + hqdm:classOfContractExecution, + hqdm:classOfContractProcess, + hqdm:classOfEvent, + hqdm:classOfFunctionalObject, + hqdm:classOfFunctionalSystem, + hqdm:classOfFunctionalSystemComponent, + hqdm:classOfIndividual, + hqdm:classOfInPlaceBiologicalComponent, + hqdm:classOfInstalledFunctionalSystemComponent, + hqdm:classOfInstalledObject, + hqdm:classOfIntentionallyConstructedObject, + hqdm:classOfOffer, + hqdm:classOfOrdinaryBiologicalObject, + hqdm:classOfOrdinaryFunctionalObject, + hqdm:classOfOrdinaryPhysicalObject, + hqdm:classOfOrganization, + hqdm:classOfOrganizationComponent, + hqdm:classOfParticipant, + hqdm:classOfParty, + hqdm:classOfPeriodOfTime, + hqdm:classOfPerson, + hqdm:classOfpersonInPosition, + hqdm:classOfPhysicalObject, + hqdm:classOfPhysicalProperty, + hqdm:classOfPhysicalQuantity, + hqdm:classOfPointInTime, + hqdm:classOfPosition, + hqdm:classOfPossibleWorld, + hqdm:classOfReachingAgreement, + hqdm:classOfRelationship, + hqdm:classOfRepresentation, + hqdm:classOfSalesProductInstance, + hqdm:classOfSign, + hqdm:classOfSociallyConstructedActivity, + hqdm:classOfSociallyConstructedObject, + hqdm:classOfSpatioTemporalExtent, + hqdm:classOfState, + hqdm:classOfStateOfActivity, + hqdm:classOfStateOfAmountOfMoney, + hqdm:classOfStateOfAssociation, + hqdm:classOfStateOfBiologicalObject, + hqdm:classOfStateOfBiologicalSystem, + hqdm:classOfStateOfBiologicalSystemComponent, + hqdm:classOfStateOfFunctionalObject, + hqdm:classOfStateOfFunctionalSystem, + hqdm:classOfStateOfFunctionalSystemComponent, + hqdm:classOfStateOfIntentionallyConstructedObject, + hqdm:classOfStateOfOrdinaryBiologicalObject, + hqdm:classOfStateOfOrdinaryFunctionalObject, + hqdm:classOfStateOfOrdinaryPhysicalObject, + hqdm:classOfStateOfOrganization, + hqdm:classOfStateOfOrganizationComponent, + hqdm:classOfStateOfParty, + hqdm:classOfStateOfPerson, + hqdm:classOfStateOfPhysicalObject, + hqdm:classOfStateOfPosition, + hqdm:classOfStateOfSalesProductInstance, + hqdm:classOfStateOfSign, + hqdm:classOfStateOfSociallyConstructedActivity, + hqdm:classOfStateOfSociallyConstructedObject, + hqdm:classOfStateOfSystem, + hqdm:classOfStateOfSystemComponent, + hqdm:classOfSystem, + hqdm:classOfSystemComponent, + hqdm:kindOfActivity, + hqdm:kindOfAssociation, + hqdm:kindOfBiologicalObject, + hqdm:kindOfBiologicalSystem, + hqdm:kindOfBiologicalSystemComponent, + hqdm:kindOfFunctionalObject, + hqdm:kindOfFunctionalSystem, + hqdm:kindOfFunctionalSystemComponent, + hqdm:kindOfIndividual, + hqdm:kindOfIntentionallyConstructedObject, + hqdm:kindOfOrdinaryBiologicalObject, + hqdm:kindOfOrdinaryFunctionalObject, + hqdm:kindOfOrdinaryPhysicalObject, + hqdm:kindOfOrganization, + hqdm:kindOfOrganizationComponent, + hqdm:kindOfParty, + hqdm:kindOfPerson, + hqdm:kindOfPhysicalObject, + hqdm:kindOfPhysicalProperty, + hqdm:kindOfPhysicalQuantity, + hqdm:kindOfPosition, + hqdm:kindOfRelationshipWithRestriction, + hqdm:kindOfRelationshipWithSignature, + hqdm:kindOfSociallyConstructedObject, + hqdm:kindOfSystem, + hqdm:kindOfSystemComponent, hqdm:role, hqdm:pattern, hqdm:description, @@ -141,20 +141,20 @@ public class DataIntegrityReport { """; private static final String CHECK_MISSING_PARTICIPANT_ROLES = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_participant_with_no_role "Should be a member_of_kind of a role.". + ?s hqdm:errorParticipantWithNoRole "Should be a memberOfKind of a role.". ?s a ?type. } where { - ?s hqdm:participant_in ?association; + ?s hqdm:participantIn ?association; a ?type. ?association a hqdm:association. OPTIONAL { - ?s hqdm:member_of_kind ?kind. + ?s hqdm:memberOfKind ?kind. ?kind a hqdm:role. } @@ -163,199 +163,199 @@ public class DataIntegrityReport { """; private static final String CHECK_POSSIBLE_WORLD_MEMBERSHIP = """ - PREFIX hqdm: + PREFIX hqdm: PREFIX rdfs: construct { - ?s hqdm:error_possible_world "Should be part of a possible world.". + ?s hqdm:errorPossibleWorld "Should be part of a possible world.". ?s a ?type. } where { ?s a ?type; ?p ?o. OPTIONAL { - ?s hqdm:part_of_possible_world ?pw. + ?s hqdm:partOfPossibleWorld ?pw. } FILTER(!bound(?pw)) FILTER(?type in ( - hqdm:acceptance_of_offer, - hqdm:acceptance_of_offer_for_goods, + hqdm:acceptanceOfOffer, + hqdm:acceptanceOfOfferForGoods, hqdm:activity, hqdm:aggregation, - hqdm:agree_contract, - hqdm:agreement_execution, - hqdm:agreement_process, - hqdm:amount_of_money, + hqdm:agreeContract, + hqdm:agreementExecution, + hqdm:agreementProcess, + hqdm:amountOfMoney, hqdm:asset, hqdm:association, - hqdm:beginning_of_ownership, - hqdm:biological_object, - hqdm:biological_system, - hqdm:biological_system_component, + hqdm:beginningOfOwnership, + hqdm:biologicalObject, + hqdm:biologicalSystem, + hqdm:biologicalSystemComponent, hqdm:composition, - hqdm:contract_execution, - hqdm:contract_process, + hqdm:contractExecution, + hqdm:contractProcess, hqdm:currency, hqdm:employee, hqdm:employer, hqdm:employment, - hqdm:ending_of_ownership, + hqdm:endingOfOwnership, hqdm:event, - hqdm:exchange_of_goods_and_money, - hqdm:function_, - hqdm:functional_object, - hqdm:functional_system, - hqdm:functional_system_component, - hqdm:identification_of_physical_quantity, + hqdm:exchangeOfGoodsAndMoney, + hqdm:function, + hqdm:functionalObject, + hqdm:functionalSystem, + hqdm:functionalSystemComponent, + hqdm:identificationOfPhysicalQuantity, hqdm:individual, - hqdm:in_place_biological_component, - hqdm:installed_functional_system_component, - hqdm:installed_object, - hqdm:intentionally_constructed_object, - hqdm:language_community, - hqdm:money_asset, + hqdm:inPlaceBiologicalComponent, + hqdm:installedFunctionalSystemComponent, + hqdm:installedObject, + hqdm:intentionallyConstructedObject, + hqdm:languageCommunity, + hqdm:moneyAsset, hqdm:offer, - hqdm:offer_and_acceptance_for_goods, - hqdm:offer_for_goods, + hqdm:offerAndAcceptanceForGoods, + hqdm:offerForGoods, hqdm:offering, - hqdm:ordinary_biological_object, - hqdm:ordinary_functional_object, - hqdm:ordinary_physical_object, + hqdm:ordinaryBiologicalObject, + hqdm:ordinaryFunctionalObject, + hqdm:ordinaryPhysicalObject, hqdm:organization, - hqdm:organization_component, + hqdm:organizationComponent, hqdm:owner, hqdm:ownership, hqdm:participant, - hqdm:participant_in_activity_or_association, + hqdm:participantInActivityOrAssociation, hqdm:party, - hqdm:period_of_time, + hqdm:periodOfTime, hqdm:person, - hqdm:person_in_position, - hqdm:physical_object, - hqdm:physical_property, - hqdm:physical_property_range, - hqdm:physical_quantity, - hqdm:physical_quantity_range, + hqdm:personInPosition, + hqdm:physicalObject, + hqdm:physicalProperty, + hqdm:physicalPropertyRange, + hqdm:physicalQuantity, + hqdm:physicalQuantityRange, hqdm:plan, - hqdm:point_in_time, + hqdm:pointInTime, hqdm:position, - hqdm:possible_world, + hqdm:possibleWorld, hqdm:price, - hqdm:product_brand, - hqdm:product_offering, - hqdm:reaching_agreement, - hqdm:recognizing_language_community, + hqdm:productBrand, + hqdm:productOffering, + hqdm:reachingAgreement, + hqdm:recognizingLanguageCommunity, hqdm:relationship, - hqdm:representation_by_sign, + hqdm:representationBySign, hqdm:requirement, - hqdm:requirement_specification, - hqdm:sale_of_goods, - hqdm:sales_product, - hqdm:sales_product_instance, - hqdm:sales_product_version, + hqdm:requirementSpecification, + hqdm:saleOfGoods, + hqdm:salesProduct, + hqdm:salesProductInstance, + hqdm:salesProductVersion, hqdm:scale, hqdm:sign, - hqdm:socially_constructed_activity, - hqdm:socially_constructed_object, - hqdm:spatio_temporal_extent, + hqdm:sociallyConstructedActivity, + hqdm:sociallyConstructedObject, + hqdm:spatioTemporalExtent, hqdm:state, - hqdm:state_of_activity, - hqdm:state_of_amount_of_money, - hqdm:state_of_association, - hqdm:state_of_biological_object, - hqdm:state_of_biological_system, - hqdm:state_of_biological_system_component, - hqdm:state_of_functional_object, - hqdm:state_of_functional_system, - hqdm:state_of_functional_system_component, - hqdm:state_of_intentionally_constructed_object, - hqdm:state_of_language_community, - hqdm:state_of_ordinary_biological_object, - hqdm:state_of_ordinary_functional_object, - hqdm:state_of_ordinary_physical_object, - hqdm:state_of_organization, - hqdm:state_of_organization_component, - hqdm:state_of_party, - hqdm:state_of_person, - hqdm:state_of_physical_object, - hqdm:state_of_position, - hqdm:state_of_sales_product_instance, - hqdm:state_of_sign, - hqdm:state_of_socially_constructed_activity, - hqdm:state_of_socially_constructed_object, - hqdm:state_of_system, - hqdm:state_of_system_component, + hqdm:stateOfActivity, + hqdm:stateOfAmountOfMoney, + hqdm:stateOfAssociation, + hqdm:stateOfBiologicalObject, + hqdm:stateOfBiologicalSystem, + hqdm:stateOfBiologicalSystemComponent, + hqdm:stateOfFunctionalObject, + hqdm:stateOfFunctionalSystem, + hqdm:stateOfFunctionalSystemComponent, + hqdm:stateOfIntentionallyConstructedObject, + hqdm:stateOfLanguageCommunity, + hqdm:stateOfOrdinaryBiologicalObject, + hqdm:stateOfOrdinaryFunctionalObject, + hqdm:stateOfOrdinaryPhysicalObject, + hqdm:stateOfOrganization, + hqdm:stateOfOrganizationComponent, + hqdm:stateOfParty, + hqdm:stateOfPerson, + hqdm:stateOfPhysicalObject, + hqdm:stateOfPosition, + hqdm:stateOfSalesProductInstance, + hqdm:stateOfSign, + hqdm:stateOfSociallyConstructedActivity, + hqdm:stateOfSociallyConstructedObject, + hqdm:stateOfSystem, + hqdm:stateOfSystemComponent, hqdm:system, - hqdm:system_component, - hqdm:temporal_composition, + hqdm:systemComponent, + hqdm:temporalComposition, hqdm:transferee, - hqdm:transfer_of_ownership, - hqdm:transfer_of_ownership_of_money, + hqdm:transferOfOwnership, + hqdm:transferOfOwnershipOfMoney, hqdm:transferor, - hqdm:unit_of_measure + hqdm:unitOfMeasure )) } """; private static final String CHECK_STATE_TEMPORAL_PART_OF = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_temporal_part_of "Should be a temporal_part_of some individual.". + ?s hqdm:errorMissingTemporalPartOf "Should be a temporalPartOf some individual.". ?s a ?type. } where { ?s a ?type; ?p ?o. OPTIONAL { - ?s hqdm:temporal_part_of ?individual. + ?s hqdm:temporalPartOf ?individual. } FILTER(!bound(?individual)) FILTER(?type in ( - hqdm:state_of_activity, - hqdm:state_of_amount_of_money, - hqdm:state_of_association, - hqdm:state_of_biological_object, - hqdm:state_of_biological_system, - hqdm:state_of_biological_system_component, - hqdm:state_of_functional_object, - hqdm:state_of_functional_system, - hqdm:state_of_functional_system_component, - hqdm:state_of_intentionally_constructed_object, - hqdm:state_of_language_community, - hqdm:state_of_ordinary_biological_object, - hqdm:state_of_ordinary_functional_object, - hqdm:state_of_ordinary_physical_object, - hqdm:state_of_organization, - hqdm:state_of_organization_component, - hqdm:state_of_party, - hqdm:state_of_person, - hqdm:state_of_physical_object, - hqdm:state_of_position, - hqdm:state_of_sales_product_instance, - hqdm:state_of_sign, - hqdm:state_of_socially_constructed_activity, - hqdm:state_of_socially_constructed_object, - hqdm:state_of_system, - hqdm:state_of_system_component + hqdm:stateOfActivity, + hqdm:stateOfAmountOfMoney, + hqdm:stateOfAssociation, + hqdm:stateOfBiologicalObject, + hqdm:stateOfBiologicalSystem, + hqdm:stateOfBiologicalSystemComponent, + hqdm:stateOfFunctionalObject, + hqdm:stateOfFunctionalSystem, + hqdm:stateOfFunctionalSystemComponent, + hqdm:stateOfIntentionallyConstructedObject, + hqdm:stateOfLanguageCommunity, + hqdm:stateOfOrdinaryBiologicalObject, + hqdm:stateOfOrdinaryFunctionalObject, + hqdm:stateOfOrdinaryPhysicalObject, + hqdm:stateOfOrganization, + hqdm:stateOfOrganizationComponent, + hqdm:stateOfParty, + hqdm:stateOfPerson, + hqdm:stateOfPhysicalObject, + hqdm:stateOfPosition, + hqdm:stateOfSalesProductInstance, + hqdm:stateOfSign, + hqdm:stateOfSociallyConstructedActivity, + hqdm:stateOfSociallyConstructedObject, + hqdm:stateOfSystem, + hqdm:stateOfSystemComponent )) } """; private static final String CHECK_SIGN_VALUE_ = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_value_ "Should have a value_ for a sign.". + ?s hqdm:errorMissingValue "Should have a value for a sign.". ?s a hqdm:sign. } where { ?s a hqdm:sign; ?p ?o. OPTIONAL { - ?s hqdm:value_ ?v. + ?s skos:definition ?v. } FILTER(!bound(?v)) @@ -363,17 +363,17 @@ public class DataIntegrityReport { """; private static final String CHECK_SIGN_MEMBER_OF_PATTERN = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_member_of_ "Should be a member_of_ of some pattern.". + ?s hqdm:errorMissingMemberOf "Should be a memberOf of some pattern.". ?s a hqdm:sign. } where { ?s a hqdm:sign; ?p ?o. OPTIONAL { - ?s hqdm:member_of_ ?pattern. + ?s hqdm:memberOf ?pattern. } FILTER(!bound(?pattern)) @@ -381,17 +381,17 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_PATTERN_CONSISTS_OF_BY_CLASS = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_consists_of_by_class - "Should be a target of a consists_of_by_class from Rep By Pattern.". + ?s hqdm:errorMissingConsistsOfByClass + "Should be a target of a consistsOfByClass from Rep By Pattern.". ?s a hqdm:pattern. } where { ?s a hqdm:pattern. OPTIONAL { - ?repByPattern hqdm:consists_of_by_class ?s. + ?repByPattern hqdm:consistsOfByClass ?s. } FILTER(!bound(?repByPattern)) @@ -399,16 +399,16 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_CONSISTS_OF_COMMUNITY = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_consists_of_ "Should have a consists_of_ from Rep By Sign.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingConsistsOf "Should have a consistsOf from Rep By Sign.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { - ?s hqdm:consists_of_ ?community. + ?s hqdm:consistsOf ?community. } FILTER(!bound(?community)) @@ -416,38 +416,38 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_CONSISTS_OF_SIGN = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_consists_of "Should have a consists_of from Rep By Sign.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingConsistsOf "Should have a consistsOf from Rep By Sign.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { - ?s hqdm:consists_of ?state_of_sign. + ?s hqdm:consistsOf ?stateOfSign. } - FILTER(!bound(?state_of_sign)) + FILTER(!bound(?stateOfSign)) } """; private static final String CHECK_REP_BY_PATTERN_CONSISTS_OF_IN_MEMBERS = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_consists_of_in_members "Should have a consists_of_in_members from Rep By Pattern.". + ?s hqdm:errorMissingConsistsOfInMembers "Should have a consistsOfInMembers from Rep By Pattern.". ?s a ?type. } where { ?s a ?type. OPTIONAL { - ?s hqdm:consists_of_in_members ?community. + ?s hqdm:consistsOfInMembers ?community. } FILTER(!bound(?community)) FILTER(?type in ( - hqdm:representation_by_pattern, + hqdm:representationByPattern, hqdm:identification, hqdm:definition, hqdm:description @@ -456,14 +456,14 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_REPRESENTS = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_represents "Should have a represents from Rep By Sign.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingRepresents "Should have a represents from Rep By Sign.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { ?s hqdm:represents ?thing. } @@ -473,16 +473,16 @@ public class DataIntegrityReport { """; private static final String CHECK_STATE_OF_SIGN_PARTICIPANT_IN = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_sign_participant_in "Should have a participant_in to Rep By Sign.". - ?s a hqdm:state_of_sign. + ?s hqdm:errorMissingSignParticipantIn "Should have a participantIn to Rep By Sign.". + ?s a hqdm:stateOfSign. } where { - ?s a hqdm:state_of_sign. + ?s a hqdm:stateOfSign. OPTIONAL { - ?s hqdm:participant_in ?repBySign. + ?s hqdm:participantIn ?repBySign. } FILTER(!bound(?repBySign)) @@ -490,16 +490,16 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_MEMBER_OF = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_member_of_ "Should have a member_of_ to Rep By Pattern.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingMemberOf "Should have a memberOf to Rep By Pattern.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { - ?s hqdm:member_of_ ?repByPattern. + ?s hqdm:memberOf ?repByPattern. } FILTER(!bound(?repByPattern)) @@ -507,17 +507,17 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_HAS_SIGN_PARTICIPANT = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_sign "Should have a state_of_sign as a participant_in this Rep By Sign.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingSign "Should have a stateOfSign as a participantIn this Rep By Sign.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { - ?sign hqdm:participant_in ?s; - a hqdm:state_of_sign. + ?sign hqdm:participantIn ?s; + a hqdm:stateOfSign. } FILTER(!bound(?sign)) @@ -525,18 +525,18 @@ public class DataIntegrityReport { """; private static final String CHECK_REP_BY_SIGN_HAS_COMMUNITY_PARTICIPANT = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_community - "Should have a recognizing_language_community as a participant_in this Rep By Sign.". - ?s a hqdm:representation_by_sign. + ?s hqdm:errorMissingCommunity + "Should have a recognizingLanguageCommunity as a participantIn this Rep By Sign.". + ?s a hqdm:representationBySign. } where { - ?s a hqdm:representation_by_sign. + ?s a hqdm:representationBySign. OPTIONAL { - ?community hqdm:participant_in ?s; - a hqdm:recognizing_language_community. + ?community hqdm:participantIn ?s; + a hqdm:recognizingLanguageCommunity. } FILTER(!bound(?community)) @@ -544,38 +544,38 @@ public class DataIntegrityReport { """; private static final String CHECK_ROLE_PART_OF_BY_CLASS_ = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_part_of_by_class_ "Should have a part_of_by_class_ to a kind_of_association.". + ?s hqdm:errorMissingPartOfByClass "Should have a partOfByClass to a kindOfAssociation.". ?s a hqdm:role. } where { ?s a hqdm:role. OPTIONAL { - ?s hqdm:part_of_by_class_ ?kind_of_association. - ?kind_of_association a hqdm:kind_of_association. + ?s hqdm:partOfByClass ?kindOfAssociation. + ?kindOfAssociation a hqdm:kindOfAssociation. } - FILTER(!bound(?kind_of_association)) + FILTER(!bound(?kindOfAssociation)) } """; private static final String CHECK_ASSOCIATION_MEMBER_OF_KIND = """ - PREFIX hqdm: + PREFIX hqdm: construct { - ?s hqdm:error_missing_kind_of_association "Should have a member_of_kind to a kind_of_association.". + ?s hqdm:errorMissingKindOfAssociation "Should have a memberOfKind to a kindOfAssociation.". ?s a hqdm:association. } where { ?s a hqdm:association. OPTIONAL { - ?s hqdm:member_of_kind ?kind_of_association. - ?kind_of_association a hqdm:kind_of_association. + ?s hqdm:memberOfKind ?kindOfAssociation. + ?kindOfAssociation a hqdm:kindOfAssociation. } - FILTER(!bound(?kind_of_association)) + FILTER(!bound(?kindOfAssociation)) } """; diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/AssociationPatternTestData.java b/core/src/test/java/uk/gov/gchq/magmacore/service/AssociationPatternTestData.java index 03eb46dd..71de045b 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/AssociationPatternTestData.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/AssociationPatternTestData.java @@ -26,12 +26,9 @@ import uk.gov.gchq.magmacore.hqdm.model.PointInTime; import uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity; import uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern; -import uk.gov.gchq.magmacore.hqdm.model.RepresentationBySign; import uk.gov.gchq.magmacore.hqdm.model.Role; -import uk.gov.gchq.magmacore.hqdm.model.Sign; import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystem; import uk.gov.gchq.magmacore.hqdm.model.StateOfPerson; -import uk.gov.gchq.magmacore.hqdm.model.StateOfSign; 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; @@ -69,7 +66,8 @@ public class AssociationPatternTestData { /** * Create some Associations for the test. * - * @param db A {@link MagmaCoreDatabase}. + * @param db + * A {@link MagmaCoreDatabase}. */ static void createAssociationPattern(final MagmaCoreDatabase db) { // Create PossibleWorlds IRI. @@ -91,25 +89,25 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { userRole = ClassServices.createRole(userRoleIri); userRole.addValue(RDFS.RDF_TYPE, HQDM.ROLE); userRole.addStringValue(HQDM.ENTITY_NAME, "userRole"); - userRole.addValue(HQDM.PART_OF_BY_CLASS_, userAssociationKindIri); + userRole.addValue(HQDM.PART_OF_BY_CLASS, userAssociationKindIri); systemRoleIri = new IRI(TEST_BASE, "systemRole"); systemRole = ClassServices.createRole(systemRoleIri); systemRole.addValue(RDFS.RDF_TYPE, HQDM.ROLE); systemRole.addStringValue(HQDM.ENTITY_NAME, "systemRole"); - systemRole.addValue(HQDM.PART_OF_BY_CLASS_, userAssociationKindIri); + systemRole.addValue(HQDM.PART_OF_BY_CLASS, userAssociationKindIri); final IRI managerRoleIri = new IRI(TEST_BASE, "managerRole"); final Role managerRole = ClassServices.createRole(managerRoleIri); managerRole.addValue(RDFS.RDF_TYPE, HQDM.ROLE); managerRole.addStringValue(HQDM.ENTITY_NAME, "managerRole"); - managerRole.addValue(HQDM.PART_OF_BY_CLASS_, managerKindIri); + managerRole.addValue(HQDM.PART_OF_BY_CLASS, managerKindIri); final IRI workerRoleIri = new IRI(TEST_BASE, "workerRole"); final Role workerRole = ClassServices.createRole(workerRoleIri); workerRole.addValue(RDFS.RDF_TYPE, HQDM.ROLE); workerRole.addStringValue(HQDM.ENTITY_NAME, "workerRole"); - workerRole.addValue(HQDM.PART_OF_BY_CLASS_, managerKindIri); + workerRole.addValue(HQDM.PART_OF_BY_CLASS, managerKindIri); // Create People final IRI person1Iri = new IRI(TEST_BASE, "person1"); @@ -159,13 +157,13 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { final IRI person2WorkerForPerson3Iri = new IRI(TEST_BASE, "person2WorkerForPerson3"); final Association person1UserOfSystem1 = SpatioTemporalExtentServices - .createAssociation(person1UserOfSystem1Iri); + .createAssociation(person1UserOfSystem1Iri); final Association person2UserOfSystem2 = SpatioTemporalExtentServices - .createAssociation(person2UserOfSystem2Iri); + .createAssociation(person2UserOfSystem2Iri); final Association person1WorkerForPerson2 = SpatioTemporalExtentServices - .createAssociation(person1WorkerForPerson2Iri); + .createAssociation(person1WorkerForPerson2Iri); final Association person2WorkerForPerson3 = SpatioTemporalExtentServices - .createAssociation(person2WorkerForPerson3Iri); + .createAssociation(person2WorkerForPerson3Iri); person1UserOfSystem1.addValue(RDFS.RDF_TYPE, HQDM.ASSOCIATION); person1UserOfSystem1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); @@ -201,7 +199,7 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { person1State1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); system1State1 = SpatioTemporalExtentServices - .createStateOfFunctionalSystem(new IRI(TEST_BASE, "system1State1")); + .createStateOfFunctionalSystem(new IRI(TEST_BASE, "system1State1")); system1State1.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM); system1State1.addValue(RDFS.RDF_TYPE, HQDM.PARTICIPANT); system1State1.addValue(HQDM.TEMPORAL_PART_OF, system1Iri); @@ -219,7 +217,7 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { person2State1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); system2State1 = SpatioTemporalExtentServices - .createStateOfFunctionalSystem(new IRI(TEST_BASE, "system2State1")); + .createStateOfFunctionalSystem(new IRI(TEST_BASE, "system2State1")); system2State1.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_FUNCTIONAL_SYSTEM); system2State1.addValue(RDFS.RDF_TYPE, HQDM.PARTICIPANT); system2State1.addValue(HQDM.TEMPORAL_PART_OF, system2Iri); @@ -259,76 +257,42 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { person3State1.addValue(HQDM.PARTICIPANT_IN, person2WorkerForPerson3Iri); person3State1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - // Add signs to name the people, re-using person states for brevity. - final IRI patternIri = new IRI(TEST_BASE, UID.uid()); - final Pattern pattern = ClassServices.createPattern(patternIri); - pattern.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); - pattern.addStringValue(HQDM.ENTITY_NAME, "pattern"); - - final IRI repByPatternIri = new IRI(TEST_BASE, UID.uid()); - final RepresentationByPattern repByPattern = ClassServices - .createRepresentationByPattern(repByPatternIri); - repByPattern.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_PATTERN); - repByPattern.addValue(HQDM.CONSISTS_OF_BY_CLASS, patternIri); + // Create a community to recognize the patterns final IRI communityIri = new IRI(TEST_BASE, UID.uid()); final RecognizingLanguageCommunity community = SpatioTemporalExtentServices - .createRecognizingLanguageCommunity(communityIri); + .createRecognizingLanguageCommunity(communityIri); community.addValue(RDFS.RDF_TYPE, HQDM.RECOGNIZING_LANGUAGE_COMMUNITY); community.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - repByPattern.addValue(HQDM.CONSISTS_OF_IN_MEMBERS, communityIri); - - // Represent person1State1 using sign1 - final IRI sign1Iri = new IRI(TEST_BASE, UID.uid()); - final Sign sign1 = SpatioTemporalExtentServices.createSign(sign1Iri); - sign1.addValue(RDFS.RDF_TYPE, HQDM.SIGN); - sign1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - sign1.addValue(HQDM.MEMBER_OF_, patternIri); - sign1.addStringValue(HQDM.VALUE_, "sign1Value"); - - final IRI stateOfSign1Iri = new IRI(TEST_BASE, UID.uid()); - final StateOfSign stateOfSign1 = SpatioTemporalExtentServices.createStateOfSign(stateOfSign1Iri); - stateOfSign1.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN); - stateOfSign1.addValue(HQDM.TEMPORAL_PART_OF, sign1Iri); - stateOfSign1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - - final IRI repBySign1Iri = new IRI(TEST_BASE, UID.uid()); - final RepresentationBySign repBySign1 = SpatioTemporalExtentServices - .createRepresentationBySign(repBySign1Iri); - repBySign1.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN); - repBySign1.addValue(HQDM.REPRESENTS, person1State1Iri); - repBySign1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - repBySign1.addValue(HQDM.CONSISTS_OF, stateOfSign1Iri); - repBySign1.addValue(HQDM.MEMBER_OF_, repByPatternIri); - repBySign1.addValue(HQDM.CONSISTS_OF_, communityIri); - stateOfSign1.addValue(HQDM.PARTICIPANT_IN, repBySign1Iri); - community.addValue(HQDM.PARTICIPANT_IN, repBySign1Iri); - - // Represent person2State1 using sign2 - final IRI sign2Iri = new IRI(TEST_BASE, UID.uid()); - final Sign sign2 = SpatioTemporalExtentServices.createSign(sign2Iri); - sign2.addValue(RDFS.RDF_TYPE, HQDM.SIGN); - sign2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - sign2.addValue(HQDM.MEMBER_OF_, patternIri); - sign2.addStringValue(HQDM.VALUE_, "sign2Value"); - - final IRI stateOfSign2Iri = new IRI(TEST_BASE, UID.uid()); - final StateOfSign stateOfSign2 = SpatioTemporalExtentServices.createStateOfSign(stateOfSign2Iri); - stateOfSign2.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN); - stateOfSign2.addValue(HQDM.TEMPORAL_PART_OF, sign2Iri); - stateOfSign2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - - final IRI repBySign2Iri = new IRI(TEST_BASE, UID.uid()); - final RepresentationBySign repBySign2 = SpatioTemporalExtentServices - .createRepresentationBySign(repBySign2Iri); - repBySign2.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN); - repBySign2.addValue(HQDM.REPRESENTS, person2State1Iri); - repBySign2.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); - repBySign2.addValue(HQDM.CONSISTS_OF, stateOfSign2Iri); - repBySign2.addValue(HQDM.MEMBER_OF_, repByPatternIri); - repBySign2.addValue(HQDM.CONSISTS_OF_, communityIri); - stateOfSign2.addValue(HQDM.PARTICIPANT_IN, repBySign2Iri); - community.addValue(HQDM.PARTICIPANT_IN, repBySign2Iri); + + // Represent person1State1 using pattern1 + + final IRI pattern1Iri = new IRI(TEST_BASE, UID.uid()); + final Pattern pattern1 = ClassServices.createPattern(pattern1Iri); + pattern1.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); + pattern1.addStringValue(HQDM.SKOS_DEFINITION, "sign1Value"); + + final IRI repByPattern1Iri = new IRI(TEST_BASE, UID.uid()); + final RepresentationByPattern repByPattern1 = ClassServices + .createRepresentationByPattern(repByPattern1Iri); + repByPattern1.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_PATTERN); + repByPattern1.addValue(HQDM.REPRESENTED, person1State1Iri); + repByPattern1.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern1Iri); + repByPattern1.addValue(HQDM.CONSISTS_OF_IN_MEMBERS, communityIri); + + // Represent person2State1 using pattern2 + final IRI pattern2Iri = new IRI(TEST_BASE, UID.uid()); + final Pattern pattern2 = ClassServices.createPattern(pattern2Iri); + pattern2.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); + pattern2.addStringValue(HQDM.SKOS_DEFINITION, "sign2Value"); + + final IRI repByPattern2Iri = new IRI(TEST_BASE, UID.uid()); + final RepresentationByPattern repByPattern2 = ClassServices + .createRepresentationByPattern(repByPattern2Iri); + repByPattern2.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_PATTERN); + repByPattern2.addValue(HQDM.REPRESENTED, person2State1Iri); + repByPattern2.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern2Iri); + repByPattern2.addValue(HQDM.CONSISTS_OF_IN_MEMBERS, communityIri); // Persist all objects db.beginWrite(); @@ -359,16 +323,13 @@ static void createAssociationPattern(final MagmaCoreDatabase db) { db.create(system1State1); db.create(system2State1); - db.create(sign1); - db.create(stateOfSign1); - db.create(pattern); db.create(community); - db.create(repByPattern); - db.create(repBySign1); - db.create(sign2); - db.create(stateOfSign2); - db.create(repBySign2); + db.create(pattern1); + db.create(pattern2); + + db.create(repByPattern1); + db.create(repByPattern2); db.commit(); } diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByKindOfAssociationTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByKindOfAssociationTest.java index 34e56555..a81b9457 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByKindOfAssociationTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByKindOfAssociationTest.java @@ -66,7 +66,7 @@ public void testFindSuccess() { // This query augments its object with HQDM.VALUE predicates for the current Sign values for the // object. - final Set values = person.values(HQDM.VALUE_); + final Set values = person.values(HQDM.SKOS_DEFINITION); assertNotNull(values); assertEquals(1, values.size()); diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByTypeKindAndSignPatternTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByTypeKindAndSignPatternTest.java index bb2d47af..a76cc50b 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByTypeKindAndSignPatternTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceFindByTypeKindAndSignPatternTest.java @@ -56,7 +56,7 @@ public void testFindSuccess() { // This query augments its object with HQDM.VALUE predicates for the current Sign values for the // object. - final Set values = person.values(HQDM.VALUE_); + final Set values = person.values(HQDM.SKOS_DEFINITION); assertNotNull(values); assertEquals(1, values.size()); assertEquals("person1", values.iterator().next().toString()); diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java index 8c412737..907372a3 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/MagmaCoreServiceTest.java @@ -159,9 +159,9 @@ public void testFindByPartialSignSuccess() throws MagmaCoreException { // Find the required Things by sign in a transaction. db.beginWrite(); final List found1 = service.findByPartialSignValue(SignPatternTestData.community1, - SignPatternTestData.pattern1, "son1", now); + "son1", now); final List found2 = service.findByPartialSignValue(SignPatternTestData.community2, - SignPatternTestData.pattern2, "ERSON", now); + "ERSON", now); db.commit(); // Assert the results are correct. diff --git a/core/src/test/java/uk/gov/gchq/magmacore/service/SignPatternTestData.java b/core/src/test/java/uk/gov/gchq/magmacore/service/SignPatternTestData.java index 0143ec6d..6c405219 100644 --- a/core/src/test/java/uk/gov/gchq/magmacore/service/SignPatternTestData.java +++ b/core/src/test/java/uk/gov/gchq/magmacore/service/SignPatternTestData.java @@ -14,19 +14,13 @@ package uk.gov.gchq.magmacore.service; -import java.time.LocalDateTime; -import java.time.ZoneOffset; - import uk.gov.gchq.magmacore.database.MagmaCoreDatabase; import uk.gov.gchq.magmacore.hqdm.model.Pattern; import uk.gov.gchq.magmacore.hqdm.model.Person; -import uk.gov.gchq.magmacore.hqdm.model.PointInTime; import uk.gov.gchq.magmacore.hqdm.model.RecognizingLanguageCommunity; import uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern; import uk.gov.gchq.magmacore.hqdm.model.RepresentationBySign; -import uk.gov.gchq.magmacore.hqdm.model.Sign; import uk.gov.gchq.magmacore.hqdm.model.StateOfPerson; -import uk.gov.gchq.magmacore.hqdm.model.StateOfSign; 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; @@ -44,6 +38,7 @@ public class SignPatternTestData { static RecognizingLanguageCommunity community2; static Pattern pattern1; static Pattern pattern2; + static Pattern pattern3; static Person person1; static Person person2; static Person person3; @@ -81,10 +76,17 @@ static void createSignPattern(final MagmaCoreDatabase db) { final IRI pattern1Iri = new IRI(TEST_BASE, "pattern1"); pattern1 = ClassServices.createPattern(pattern1Iri); pattern1.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); + pattern1.addStringValue(HQDM.SKOS_DEFINITION, "person1"); final IRI pattern2Iri = new IRI(TEST_BASE, "pattern2"); pattern2 = ClassServices.createPattern(pattern2Iri); pattern2.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); + pattern2.addStringValue(HQDM.SKOS_DEFINITION, "person2"); + + final IRI pattern3Iri = new IRI(TEST_BASE, "pattern3"); + pattern3 = ClassServices.createPattern(pattern3Iri); + pattern3.addValue(RDFS.RDF_TYPE, HQDM.PATTERN); + pattern3.addStringValue(HQDM.SKOS_DEFINITION, "person3"); // Create RepresentationByPatterns final RepresentationByPattern repByPattern1 = ClassServices @@ -106,7 +108,7 @@ static void createSignPattern(final MagmaCoreDatabase db) { repByPattern1.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern1.getId()); repByPattern2.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern2.getId()); - repByPattern3.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern2.getId()); + repByPattern3.addValue(HQDM.CONSISTS_OF_BY_CLASS, pattern3.getId()); // Create KindOfPerson kindOfPersonIri = new IRI(TEST_BASE, "kindOfPerson1"); @@ -146,82 +148,9 @@ static void createSignPattern(final MagmaCoreDatabase db) { stateOfPerson3.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_PERSON); stateOfPerson3.addValue(HQDM.TEMPORAL_PART_OF, person3.getId()); - // Create signs - final Sign sign1 = SpatioTemporalExtentServices.createSign(new IRI(TEST_BASE, "sign1")); - sign1.addValue(RDFS.RDF_TYPE, HQDM.SIGN); - sign1.addValue(HQDM.MEMBER_OF_, pattern1Iri); - sign1.addStringValue(HQDM.VALUE_, "person1"); - - final Sign sign2 = SpatioTemporalExtentServices.createSign(new IRI(TEST_BASE, "sign2")); - sign2.addValue(RDFS.RDF_TYPE, HQDM.SIGN); - sign2.addValue(HQDM.MEMBER_OF_, pattern2Iri); - sign2.addStringValue(HQDM.VALUE_, "person2"); - - final Sign sign3 = SpatioTemporalExtentServices.createSign(new IRI(TEST_BASE, "sign3")); - sign3.addValue(RDFS.RDF_TYPE, HQDM.SIGN); - sign3.addValue(HQDM.MEMBER_OF_, pattern2Iri); - sign3.addStringValue(HQDM.VALUE_, "person3"); - - // Create states for the Signs - final StateOfSign stateOfSign1 = SpatioTemporalExtentServices - .createStateOfSign(new IRI(TEST_BASE, "stateOfSign1")); - stateOfSign1.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN); - stateOfSign1.addValue(HQDM.TEMPORAL_PART_OF, sign1.getId()); - - final StateOfSign stateOfSign2 = SpatioTemporalExtentServices - .createStateOfSign(new IRI(TEST_BASE, "stateOfSign2")); - stateOfSign2.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN); - stateOfSign2.addValue(HQDM.TEMPORAL_PART_OF, sign2.getId()); - - final StateOfSign stateOfSign3 = SpatioTemporalExtentServices - .createStateOfSign(new IRI(TEST_BASE, "stateOfSign3")); - stateOfSign3.addValue(RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN); - stateOfSign3.addValue(HQDM.TEMPORAL_PART_OF, sign3.getId()); - - // Create Events for the BEGINNING and ENDING of the RepresentationBySigns - final PointInTime begin = SpatioTemporalExtentServices.createPointInTime(new IRI(TEST_BASE, "begin")); - final PointInTime end = SpatioTemporalExtentServices.createPointInTime(new IRI(TEST_BASE, "end")); - - begin.addValue(RDFS.RDF_TYPE, HQDM.POINT_IN_TIME); - end.addValue(RDFS.RDF_TYPE, HQDM.POINT_IN_TIME); - - begin.addStringValue(HQDM.ENTITY_NAME, LocalDateTime.now().minusDays(1L).toInstant(ZoneOffset.UTC).toString()); - end.addStringValue(HQDM.ENTITY_NAME, LocalDateTime.now().plusDays(1L).toInstant(ZoneOffset.UTC).toString()); - - final IRI objectId = begin.getId(); - final IRI objectId2 = end.getId(); - - // Create RepresentationBySigns - final RepresentationBySign repBySign1 = SpatioTemporalExtentServices - .createRepresentationBySign(new IRI(TEST_BASE, "repBySign1")); - repBySign1.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN); - repBySign1.addValue(HQDM.REPRESENTS, stateOfPerson1.getId()); - repBySign1.addValue(HQDM.MEMBER_OF_, repByPattern1.getId()); - repBySign1.addValue(HQDM.BEGINNING, objectId); - repBySign1.addValue(HQDM.ENDING, objectId2); - community1.addValue(HQDM.PARTICIPANT_IN, repBySign1.getId()); - stateOfSign1.addValue(HQDM.PARTICIPANT_IN, repBySign1.getId()); - - final RepresentationBySign repBySign2 = SpatioTemporalExtentServices - .createRepresentationBySign(new IRI(TEST_BASE, "repBySign2")); - repBySign2.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN); - repBySign2.addValue(HQDM.REPRESENTS, stateOfPerson2.getId()); - repBySign2.addValue(HQDM.MEMBER_OF_, repByPattern2.getId()); - repBySign2.addValue(HQDM.BEGINNING, objectId); - repBySign2.addValue(HQDM.ENDING, objectId2); - community2.addValue(HQDM.PARTICIPANT_IN, repBySign2.getId()); - stateOfSign2.addValue(HQDM.PARTICIPANT_IN, repBySign2.getId()); - - final RepresentationBySign repBySign3 = SpatioTemporalExtentServices - .createRepresentationBySign(new IRI(TEST_BASE, "repBySign3")); - repBySign3.addValue(RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN); - repBySign3.addValue(HQDM.REPRESENTS, stateOfPerson3.getId()); - repBySign3.addValue(HQDM.MEMBER_OF_, repByPattern2.getId()); - repBySign3.addValue(HQDM.BEGINNING, objectId); - repBySign3.addValue(HQDM.ENDING, objectId2); - community2.addValue(HQDM.PARTICIPANT_IN, repBySign3.getId()); - stateOfSign3.addValue(HQDM.PARTICIPANT_IN, repBySign3.getId()); - + repByPattern1.addValue(HQDM.REPRESENTED, stateOfPerson1.getId()); + repByPattern2.addValue(HQDM.REPRESENTED, stateOfPerson2.getId()); + repByPattern3.addValue(HQDM.REPRESENTED, stateOfPerson3.getId()); // Persist all objects db.beginWrite(); @@ -229,6 +158,7 @@ static void createSignPattern(final MagmaCoreDatabase db) { db.create(community2); db.create(pattern1); db.create(pattern2); + db.create(pattern3); db.create(repByPattern1); db.create(repByPattern2); db.create(repByPattern3); @@ -238,17 +168,6 @@ static void createSignPattern(final MagmaCoreDatabase db) { db.create(stateOfPerson1); db.create(stateOfPerson2); db.create(stateOfPerson3); - db.create(sign1); - db.create(sign2); - db.create(sign3); - db.create(stateOfSign1); - db.create(stateOfSign2); - db.create(stateOfSign3); - db.create(begin); - db.create(end); - db.create(repBySign1); - db.create(repBySign2); - db.create(repBySign3); db.commit(); } diff --git a/examples/pom.xml b/examples/pom.xml index 5a6bba49..4ab02797 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 uk.gov.gchq.magma-core @@ -23,10 +25,18 @@ uk.gov.gchq.magma-core core + + uk.gov.gchq.magma-core + hqdm-canonical + uk.gov.gchq.magma-core model-extension-example - + + + uk.gov.gchq.magma-core + model-extension-f35 + junit junit diff --git a/examples/src/main/java/module-info.java b/examples/src/main/java/module-info.java index 0e304e74..c6baa8be 100644 --- a/examples/src/main/java/module-info.java +++ b/examples/src/main/java/module-info.java @@ -20,7 +20,7 @@ requires uk.gov.gchq.magmacore.hqdm; requires uk.gov.gchq.magmacore; requires uk.gov.gchq.magmacore.examples.extensions; + requires uk.gov.gchq.magmacore.examples.extensions.f35; + requires uk.gov.gchq.magmacore.hqdm.canonical; exports uk.gov.gchq.magmacore.examples.service; - - uses uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider; } diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/F35ModelExtensionTest.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/F35ModelExtensionTest.java new file mode 100644 index 00000000..bcc8046d --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/F35ModelExtensionTest.java @@ -0,0 +1,325 @@ +package uk.gov.gchq.magmacore.examples.extensions; + +import java.util.List; + +import uk.gov.gchq.magmacore.examples.extensions.f35.ext.F35ExtensionService; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Engine; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Turbine; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Airframe; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35AirframeComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EjectionSeatComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135EngineInF135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135EngineInF35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135TurbineInF135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135TurbineInF35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135VLSInF135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135VLSInF35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF35AirframeInF35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledUS16EEjectionSeatInF35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.US16EEjectionSeat; +import uk.gov.gchq.magmacore.hqdm.model.Event; +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; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Test the model extension provided by the model-extension-f35 module. + * + *

+ * Run this using mvn exec:java + * -Dexec.mainClass=uk.gov.gchq.magmacore.examples.extensions.F35ModelExtensionTest + *

+ */ +public class F35ModelExtensionTest { + + // Declare an IRI base for the data to be created. + private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test#"); + + private static final F35ExtensionService f35 = new F35ExtensionService(); + + /** + * Main entry point. + * + * @param args + * a String array + */ + public static void main(final String[] args) { + // Create a MagmaCoreService with an in-memory Apache Jena database. + final var mcs = MagmaCoreServiceFactory.createWithJenaDatabase(); + mcs.loadTtl(f35.getDomainTtl()); + + // Persist the entity in the database. + mcs.runInWriteTransaction(svc -> { + final var entities = run(); + entities.stream().forEach(e -> { + svc.create(e); + }); + return svc; + }); + + mcs.exportTtl(System.out); + } + + /** + * Build an F35. + * + * @return A List of FunctionalObject. + */ + private static List run() { + // Create a PossibleWorld. + final var possibleWorldIri = iri(); + final var possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(possibleWorldIri); + + // ------------------------------------------------------------------------------------------------ + // Create the OrdinaryFunctionalObjects that will be installed in an aircraft + // ------------------------------------------------------------------------------------------------ + + // Manufacture a VLS + final var vlsIri = iri(); + final F135VerticalLiftSystem vls = f35.createEntity(Constants.F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME, vlsIri); + vls.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // Manufacture a Turbine + final var turbineIri = iri(); + final F135Turbine turbine = f35.createEntity(Constants.F135_TURBINE_TYPE_NAME, turbineIri); + turbine.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // Manufacture an Engine + final var engineIri = iri(); + final F135Engine engine = f35.createEntity(Constants.F135_ENGINE_TYPE_NAME, engineIri); + engine.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // Manufacture an Ejection Seat + final var ejectionSeatIri = iri(); + final US16EEjectionSeat ejectionSeat = f35.createEntity(Constants.US16E_EJECTION_SEAT_TYPE_NAME, ejectionSeatIri); + ejectionSeat.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // Manufacture an Airframe + final var airframeIri = iri(); + final F35Airframe airframe = f35.createEntity(Constants.F35_AIRFRAME_TYPE_NAME, airframeIri); + airframe.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // ------------------------------------------------------------------------------------------------ + // Create the engine Functional System. + // ------------------------------------------------------------------------------------------------ + + // Manufacture an Engine System + final var engineSystem1Iri = iri(); + final var engineComponentIri = iri(); + final var turbineComponentIri = iri(); + final var vlsComponentIri = iri(); + + final F135EngineComponent engineComponent = f35.createEntity(Constants.F135_ENGINE_COMPONENT_TYPE_NAME, engineComponentIri); + final F135TurbineComponent turbineComponent = f35.createEntity(Constants.F135_TURBINE_COMPONENT_TYPE_NAME, turbineComponentIri); + final F135VerticalLiftSystemComponent vlsComponent = f35.createEntity(Constants.F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME, vlsComponentIri); + + final F135EngineSystem engineSystem1 = f35.createEntity(Constants.F135_ENGINE_SYSTEM_TYPE_NAME, engineSystem1Iri); + engineSystem1.setEngine(engineComponent); + engineSystem1.setTurbine(turbineComponent); + engineSystem1.setVerticalLiftSystem(vlsComponent); + + engineSystem1.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + engineComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + turbineComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + vlsComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + // ------------------------------------------------------------------------------------------------ + // Create the Aircraft Functional System + // ------------------------------------------------------------------------------------------------ + + // Manufacture an Aircraft + final var f35AircraftSystemIri = iri(); + final var f35AirframeComponentIri = iri(); + final var f35EngineComponentIri = iri(); + final var f35EjectionSeatComponentIri = iri(); + final var f35VerticalLiftSystemComponentIri = iri(); + final var f35TurbineComponentIri = iri(); + + final F35Aircraft aircraft2101 = f35.createEntity(Constants.F35_AIRCRAFT_TYPE_NAME, f35AircraftSystemIri); + final F35AirframeComponent f35AirframeComponent = f35.createEntity(Constants.F35_AIRFRAME_COMPONENT_TYPE_NAME, f35AirframeComponentIri); + final F35EngineComponent f35EngineComponent = f35.createEntity(Constants.F35_ENGINE_COMPONENT_TYPE_NAME, f35EngineComponentIri); + final F35EjectionSeatComponent f35EjectionSeatComponent = f35.createEntity(Constants.F35_EJECTION_SEAT_COMPONENT_TYPE_NAME, + f35EjectionSeatComponentIri); + final F35VerticalLiftSystemComponent f35VerticalLiftSystemComponent = f35.createEntity(Constants.F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME, + f35VerticalLiftSystemComponentIri); + final F35TurbineComponent f35TurbineComponent = f35.createEntity(Constants.F35_TURBINE_COMPONENT_TYPE_NAME, f35TurbineComponentIri); + + aircraft2101.setEngine(f35EngineComponent); + aircraft2101.setTurbine(f35TurbineComponent); + aircraft2101.setAirframe(f35AirframeComponent); + aircraft2101.setEjectionSeat(f35EjectionSeatComponent); + aircraft2101.setVerticalLiftSystem(f35VerticalLiftSystemComponent); + + aircraft2101.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + f35AirframeComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + f35EngineComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + f35EjectionSeatComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + f35VerticalLiftSystemComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + f35TurbineComponent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + + // ------------------------------------------------------------------------------------------------ + // Install the parts of the engine system. + // ------------------------------------------------------------------------------------------------ + + // Install the engine in the engine system + final var engineInstalledEngineSystemIri = iri(); + final InstalledF135EngineInF135EngineSystem engineInstalledInEngineSystem = + f35.createEntity(Constants.INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME, engineInstalledEngineSystemIri); + + final var engineInstalledEngineSystemBeginningIri = iri(); + final Event engineInstalledEngineSystemBeginningEvent = SpatioTemporalExtentServices.createEvent(engineInstalledEngineSystemBeginningIri); + engineInstalledEngineSystemBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + engineInstalledInEngineSystem.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + engineInstalledInEngineSystem.addValue(HQDM.BEGINNING, engineInstalledEngineSystemBeginningIri); + engineInstalledInEngineSystem.addValue(HQDM.TEMPORAL_PART_OF, engineIri); + engineInstalledInEngineSystem.addValue(HQDM.TEMPORAL_PART_OF, engineComponentIri); + + // Install the turbine in the engine system. + final var turbineInstalledInEngineSystemIri = iri(); + final InstalledF135TurbineInF135EngineSystem turbineInF135EngineSystem = + f35.createEntity(Constants.INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME, turbineInstalledInEngineSystemIri); + + final var turbineInstalledInEngineSystemBeginningIri = iri(); + final Event turbineInstalledInEngineSystemEvent = SpatioTemporalExtentServices.createEvent(turbineInstalledInEngineSystemBeginningIri); + turbineInstalledInEngineSystemEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + turbineInF135EngineSystem.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + turbineInF135EngineSystem.addValue(HQDM.BEGINNING, turbineInstalledInEngineSystemBeginningIri); + turbineInF135EngineSystem.addValue(HQDM.TEMPORAL_PART_OF, turbineIri); + turbineInF135EngineSystem.addValue(HQDM.TEMPORAL_PART_OF, turbineComponentIri); + + // Install the vls in the engine system. + final var vlsInstalledInEngineSystemIri = iri(); + final InstalledF135VLSInF135EngineSystem vlsInstalledInEngineSystem = + f35.createEntity(Constants.INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME, vlsInstalledInEngineSystemIri); + + final var vlsInstalledInEngineSystemBeginningIri = iri(); + final Event vlsInstalledInEngineSystemEvent = SpatioTemporalExtentServices.createEvent(vlsInstalledInEngineSystemBeginningIri); + vlsInstalledInEngineSystemEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + vlsInstalledInEngineSystem.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + vlsInstalledInEngineSystem.addValue(HQDM.BEGINNING, vlsInstalledInEngineSystemBeginningIri); + vlsInstalledInEngineSystem.addValue(HQDM.TEMPORAL_PART_OF, vlsIri); + vlsInstalledInEngineSystem.addValue(HQDM.TEMPORAL_PART_OF, vlsComponentIri); + + // ------------------------------------------------------------------------------------------------ + // Install the parts of the Aircraft System. + // ------------------------------------------------------------------------------------------------ + + // Install the airframe in the aircraft + final var airframeInstalledInF35AircraftIri = iri(); + final InstalledF35AirframeInF35Aircraft airframeInstalledInF35Aircraft = + f35.createEntity(Constants.INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME, airframeInstalledInF35AircraftIri); + + final var airframeInstalledInF35AircraftBeginningIri = iri(); + final var airframeInstalledInF35AircraftBeginningEvent = SpatioTemporalExtentServices.createEvent(airframeInstalledInF35AircraftBeginningIri); + airframeInstalledInF35AircraftBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + airframeInstalledInF35Aircraft.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + airframeInstalledInF35Aircraft.addValue(HQDM.BEGINNING, airframeInstalledInF35AircraftBeginningIri); + airframeInstalledInF35Aircraft.addValue(HQDM.TEMPORAL_PART_OF, airframeIri); + airframeInstalledInF35Aircraft.addValue(HQDM.TEMPORAL_PART_OF, f35AirframeComponentIri); + + // Install the engine in the aircraft. + final var engineInAircraftIri = iri(); + final InstalledF135EngineInF35Aircraft engineInAircraft = f35.createEntity(Constants.INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME, engineInAircraftIri); + + final var engineInAircraftBeginningIri = iri(); + final var engineInAircraftBeginningEvent = SpatioTemporalExtentServices.createEvent(engineInAircraftBeginningIri); + engineInAircraftBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + engineInAircraft.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + engineInAircraft.addValue(HQDM.BEGINNING, engineInAircraftBeginningIri); + engineInAircraft.addValue(HQDM.TEMPORAL_PART_OF, engineIri); + engineInAircraft.addValue(HQDM.TEMPORAL_PART_OF, f35EngineComponentIri); + + // Install the ejection seat in the aircraft. + final var ejectionSeatInAircraftIri = iri(); + final InstalledUS16EEjectionSeatInF35Aircraft ejectionSeatInAircraft = + f35.createEntity(Constants.INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME, ejectionSeatInAircraftIri); + + final var ejectionSeatInAircraftBeginningIri = iri(); + final var ejectionSeatInAircraftBeginningEvent = SpatioTemporalExtentServices.createEvent(ejectionSeatInAircraftBeginningIri); + ejectionSeatInAircraftBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + ejectionSeatInAircraft.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + ejectionSeatInAircraft.addValue(HQDM.BEGINNING, ejectionSeatInAircraftBeginningIri); + ejectionSeatInAircraft.addValue(HQDM.TEMPORAL_PART_OF, ejectionSeatIri); + ejectionSeatInAircraft.addValue(HQDM.TEMPORAL_PART_OF, f35EjectionSeatComponentIri); + + // Install the VLS in the aircraft. + final var vlsInAircraftIri = iri(); + final InstalledF135VLSInF35Aircraft vlsInAircraft = f35.createEntity(Constants.INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME, vlsInAircraftIri); + + final var vlsInAircraftBeginningIri = iri(); + final var vlsInAircraftBeginningEvent = SpatioTemporalExtentServices.createEvent(vlsInAircraftBeginningIri); + vlsInAircraftBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + vlsInAircraft.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + vlsInAircraft.addValue(HQDM.BEGINNING, vlsInAircraftBeginningIri); + vlsInAircraft.addValue(HQDM.TEMPORAL_PART_OF, vlsIri); + vlsInAircraft.addValue(HQDM.TEMPORAL_PART_OF, f35VerticalLiftSystemComponentIri); + + // Install the turbine in the aircraft. + final var turbineInAircraftIri = iri(); + final InstalledF135TurbineInF35Aircraft turbineInAircraft = f35.createEntity(Constants.INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME, turbineInAircraftIri); + + final var turbineInAircraftBeginningIri = iri(); + final var turbineInAircraftBeginningEvent = SpatioTemporalExtentServices.createEvent(turbineInAircraftBeginningIri); + turbineInAircraftBeginningEvent.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + turbineInAircraft.addValue(HQDM.PART_OF_POSSIBLE_WORLD, possibleWorldIri); + turbineInAircraft.addValue(HQDM.BEGINNING, turbineInAircraftBeginningIri); + turbineInAircraft.addValue(HQDM.TEMPORAL_PART_OF, turbineIri); + turbineInAircraft.addValue(HQDM.TEMPORAL_PART_OF, f35TurbineComponentIri); + // ------------------------------------------------------------------------------------------------ + // return all the entities. + // ------------------------------------------------------------------------------------------------ + + return List.of( + possibleWorld, + vls, + turbine, + engine, + ejectionSeat, + airframe, + engineComponent, + turbineComponent, + vlsComponent, + engineSystem1, + aircraft2101, + f35AirframeComponent, + f35EngineComponent, + f35EjectionSeatComponent, + f35VerticalLiftSystemComponent, + f35TurbineComponent, + engineInstalledInEngineSystem, + engineInstalledEngineSystemBeginningEvent, + turbineInF135EngineSystem, + turbineInstalledInEngineSystemEvent, + vlsInstalledInEngineSystem, + vlsInstalledInEngineSystemEvent, + airframeInstalledInF35Aircraft, + airframeInstalledInF35AircraftBeginningEvent, + engineInAircraft, + engineInAircraftBeginningEvent, + ejectionSeatInAircraft, + ejectionSeatInAircraftBeginningEvent, + vlsInAircraft, + vlsInAircraftBeginningEvent, + turbineInAircraft, + turbineInAircraftBeginningEvent + ); + } + + private static long id = 0; + + private static IRI iri() { + return new IRI(TEST_BASE, Long.toString(id++)); + } +} diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ModelExtensionTest.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ModelExtensionTest.java index 980829d3..117fa4a4 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ModelExtensionTest.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ModelExtensionTest.java @@ -2,9 +2,9 @@ import java.util.UUID; +import uk.gov.gchq.magmacore.examples.extensions.ext.HqdmExtensionService; import uk.gov.gchq.magmacore.examples.extensions.model.Constants; import uk.gov.gchq.magmacore.examples.extensions.model.UkLimitedCompany; -import uk.gov.gchq.magmacore.examples.extensions.model.UkLimitedCompanyImpl; 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; @@ -25,6 +25,8 @@ public class ModelExtensionTest { // Declare an IRI base for the data to be created. private static final IriBase TEST_BASE = new IriBase("test", "http://example.com/test#"); + private static final HqdmExtensionService EXT = new HqdmExtensionService(); + /** * Main entry point. * @@ -33,6 +35,7 @@ public class ModelExtensionTest { public static void main(final String[] args) { // Create a MagmaCoreService with an in-memory Apache Jena database. final var mcs = MagmaCoreServiceFactory.createWithJenaDatabase(); + mcs.loadTtl(EXT.getDomainTtl()); // The entity will be a part of a dummy possible_world, we just use the IRI // rather than creating the possible_world for this example. @@ -40,7 +43,7 @@ public static void main(final String[] args) { // Create an IRI for the entity we want to create, then create the entity. final var entityIri = new IRI(TEST_BASE, UUID.randomUUID().toString()); - final Thing entity = new UkLimitedCompanyImpl(entityIri); + final Thing entity = EXT.createEntity(Constants.UK_LIMITED_COMPANY_TYPE_NAME, entityIri); // Set the RDF_TYPE and add the entity as a `part_of_possible_world`. entity.addValue(RDFS.RDF_TYPE, Constants.UK_LIMITED_COMPANY_IRI); diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/README.md b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/README.md new file mode 100644 index 00000000..4bc1c692 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/extensions/README.md @@ -0,0 +1,87 @@ +# F35 Model Extension Test + +This project demonstrates how to use the **F-35 Model Extension** within the [MagmaCore HQDM](https://github.com/gchq/MagmaCore) framework to build a semantically rich model of an F-35 aircraft, its subsystems, and installed components. + +## Overview + +`F35ModelExtensionTest.java` is a runnable Java class that: + +1. Creates an **in-memory RDF model** using Apache Jena. +2. Loads the **F-35 domain model** from the `F35ExtensionService`. +3. Programmatically constructs: + - A `PossibleWorld` context. + - An F-35 aircraft and its subsystems. + - All major components (engine, turbine, vertical lift system, airframe, ejection seat). +4. Models installation events for each component. +5. Saves and exports the model in **Turtle (TTL)** format. + +The code follows HQDM (High Quality Data Model) principles, where every object is created with clear temporal and spatial context. + +## Key Concepts + +- **Possible World** + A conceptual container for all entities created in this test. + +- **Functional Objects** + Tangible systems and components, e.g. `F135Engine`, `F135Turbine`, `F35Airframe`. + +- **Functional Systems** + Logical groupings of components, e.g. `F135EngineSystem` and the full `F35Aircraft`. + +- **Installation Events** + HQDM events linking a physical component to a system at a specific time. + +## Structure + +The build process is divided into steps: + +1. **Initialisation** + - Sets a test IRI base. + - Creates a MagmaCoreService with in-memory Jena. + - Loads the F-35 domain ontology. + +2. **Component Creation** + - Instantiates each F-35 component using `F35ExtensionService.createEntity`. + - Links each component to the `PossibleWorld`. + +3. **System Assembly** + - Groups components into higher-level systems (engine system, aircraft system). + - Uses setter methods (e.g. `setEngine()`) to define relationships. + +4. **Installation Modelling** + - Creates `Installed...` entities. + - Adds temporal properties (beginning events). + - Links installed components to both their physical object and system component. + +5. **Persistence & Export** + - Saves all created entities to the RDF model. + - Outputs the complete model in TTL to stdout. + +## Running the Example + +From the project root: + +```bash +mvn compile exec:java \ + -Dexec.mainClass=uk.gov.gchq.magmacore.examples.extensions.F35ModelExtensionTest +```` + +The output will be an RDF Turtle representation of the F-35 model. + +## Dependencies + +* **Java 17+** (recommended) +* **Apache Maven** +* **Apache Jena** +* **MagmaCore HQDM** + Including the F-35 extension module. + +## How It Fits Into the Bigger Picture + +This example is intended as: + +* A **template** for building domain-specific HQDM models. +* A **reference** for working with MagmaCore extensions. +* A **validation tool** for the F-35 ontology. + +It shows how to translate complex real-world assemblies (like aircraft) into a structured semantic model that supports temporal reasoning and system configuration tracking. diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/functional/FunctionalProgrammingExample.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/functional/FunctionalProgrammingExample.java index eb3b17af..985cd3a9 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/functional/FunctionalProgrammingExample.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/functional/FunctionalProgrammingExample.java @@ -207,7 +207,7 @@ private static class Context { */ ctx.startOfResearch = SpatioTemporalExtentServices .createPointInTime(randomIri()); - ctx.startOfResearch.addStringValue(HQDM.VALUE_, now); + ctx.startOfResearch.addStringValue(HQDM.SKOS_DEFINITION, now); /* * Create the Activity. diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExamplePatterns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExamplePatterns.java new file mode 100644 index 00000000..3212f6f5 --- /dev/null +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExamplePatterns.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.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.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. + *

+ * This actually uses patterns to represent a person. + *

+ */ +public class ExamplePatterns { + + /** + * 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. + mcService.runInWriteTransaction(rdlChangeSet); + + // mcService now contains the RDL needed for the next DbChangeSet + final DbChangeSet signsChangeSet = addPatterns(mcService); + + // Apply the DbChangeSet. + mcService.runInWriteTransaction(signsChangeSet); + + // 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 addPatterns(final MagmaCoreService mcService) { + final Map entities = mcService + .findByEntityNameInTransaction(List.of("English Speakers")); + + // Find the required classes, kinds, and roles. + final RecognizingLanguageCommunity englishSpeakers = (RecognizingLanguageCommunity) entities + .get("English Speakers"); + final IRI englishSpeakersIri = 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 wikipediaPattern = new IRI(USER_BASE, uid()); + final IRI britannicaPattern = new IRI(USER_BASE, uid()); + final IRI biographyPattern = new IRI(USER_BASE, uid()); + final IRI stanfordPattern = new IRI(USER_BASE, uid()); + final IRI nationalGeographicPattern = new IRI(USER_BASE, uid()); + final IRI startEvent = new IRI(USER_BASE, uid()); + final IRI endEvent = new IRI(USER_BASE, uid()); + + final IRI representationByWikipediaPattern = new IRI(USER_BASE, uid()); + final IRI representationByBritannicaPattern = new IRI(USER_BASE, uid()); + final IRI representationByBiographyPattern = new IRI(USER_BASE, uid()); + final IRI representationByStanfordPattern = new IRI(USER_BASE, uid()); + final IRI representationByNationalGeographicPattern = 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), + new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), + + // Create the thing represented. + new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON), + new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), + new DbCreateOperation(person, HQDM.BEGINNING, startEvent), + new DbCreateOperation(person, HQDM.ENDING, endEvent), + + // Create the signs that represent the thing. + new DbCreateOperation(wikipediaPattern, RDFS.RDF_TYPE, HQDM.PATTERN), + new DbCreateOperation(wikipediaPattern, HQDM.SKOS_DEFINITION, "https://en.wikipedia.org/wiki/Socrates"), + + new DbCreateOperation(britannicaPattern, RDFS.RDF_TYPE, HQDM.PATTERN), + new DbCreateOperation(britannicaPattern, HQDM.SKOS_DEFINITION, "https://www.britannica.com/biography/Socrates"), + + new DbCreateOperation(biographyPattern, RDFS.RDF_TYPE, HQDM.PATTERN), + new DbCreateOperation(biographyPattern, HQDM.SKOS_DEFINITION, "https://www.biography.com/scholar/socrates"), + + new DbCreateOperation(stanfordPattern, RDFS.RDF_TYPE, HQDM.PATTERN), + new DbCreateOperation(stanfordPattern, HQDM.SKOS_DEFINITION, "https://plato.stanford.edu/entries/socrates/"), + + new DbCreateOperation(nationalGeographicPattern, RDFS.RDF_TYPE, HQDM.PATTERN), + new DbCreateOperation(nationalGeographicPattern, HQDM.SKOS_DEFINITION, + "https://www.nationalgeographic.com/culture/article/socrates"), + + // Create the representation by patterns. + new DbCreateOperation(representationByWikipediaPattern, RDFS.RDF_TYPE, HQDM.IDENTIFICATION), + new DbCreateOperation(representationByWikipediaPattern, HQDM.CONSISTS_OF_IN_MEMBERS, + englishSpeakersIri), + new DbCreateOperation(representationByWikipediaPattern, HQDM.CONSISTS_OF_BY_CLASS, wikipediaPattern), + new DbCreateOperation(representationByWikipediaPattern, HQDM.REPRESENTED, person), + + new DbCreateOperation(representationByBritannicaPattern, RDFS.RDF_TYPE, HQDM.IDENTIFICATION), + new DbCreateOperation(representationByBritannicaPattern, HQDM.CONSISTS_OF_IN_MEMBERS, + englishSpeakersIri), + new DbCreateOperation(representationByBritannicaPattern, HQDM.CONSISTS_OF_BY_CLASS, britannicaPattern), + new DbCreateOperation(representationByBritannicaPattern, HQDM.REPRESENTED, person), + + new DbCreateOperation(representationByBiographyPattern, RDFS.RDF_TYPE, HQDM.IDENTIFICATION), + new DbCreateOperation(representationByBiographyPattern, HQDM.CONSISTS_OF_IN_MEMBERS, + englishSpeakersIri), + new DbCreateOperation(representationByBiographyPattern, HQDM.CONSISTS_OF_BY_CLASS, biographyPattern), + new DbCreateOperation(representationByBiographyPattern, HQDM.REPRESENTED, person), + + new DbCreateOperation(representationByStanfordPattern, RDFS.RDF_TYPE, HQDM.IDENTIFICATION), + new DbCreateOperation(representationByStanfordPattern, HQDM.CONSISTS_OF_IN_MEMBERS, + englishSpeakersIri), + new DbCreateOperation(representationByStanfordPattern, HQDM.CONSISTS_OF_BY_CLASS, stanfordPattern), + new DbCreateOperation(representationByStanfordPattern, HQDM.REPRESENTED, person), + + new DbCreateOperation(representationByNationalGeographicPattern, RDFS.RDF_TYPE, HQDM.IDENTIFICATION), + new DbCreateOperation(representationByNationalGeographicPattern, HQDM.CONSISTS_OF_IN_MEMBERS, + englishSpeakersIri), + new DbCreateOperation(representationByNationalGeographicPattern, HQDM.CONSISTS_OF_BY_CLASS, + nationalGeographicPattern), + new DbCreateOperation(representationByNationalGeographicPattern, HQDM.REPRESENTED, person), + + // Add beginning, ending, etc. from `association`. + new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT), + new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), + new DbCreateOperation(startEvent, HQDM.SKOS_DEFINITION, "2020-01-01T00:00:00"), + + new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT), + new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), + new DbCreateOperation(endEvent, HQDM.SKOS_DEFINITION, "2022-12-01T00:00:00") + ); + + // 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/ExampleSigns.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java deleted file mode 100644 index fd083247..00000000 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSigns.java +++ /dev/null @@ -1,163 +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.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. - mcService.runInWriteTransaction(rdlChangeSet); - - // mcService now contains the RDL needed for the next DbChangeSet - final DbChangeSet signsChangeSet = addSigns(mcService); - - // Apply the DbChangeSet. - mcService.runInWriteTransaction(signsChangeSet); - - // 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 = 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), - new DbCreateOperation(possibleWorld, HQDM.ENTITY_NAME, "Example Signs World"), - - // Create the thing represented. - new DbCreateOperation(person, RDFS.RDF_TYPE, HQDM.PERSON), - new DbCreateOperation(person, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), - - // Create the signs that represent the thing. - new DbCreateOperation(wikipediaSign, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN), - 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), - - new DbCreateOperation(britannica, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN), - 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), - - new DbCreateOperation(biography, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN), - 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), - - new DbCreateOperation(stanford, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN), - 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), - - new DbCreateOperation(nationalGeographic, RDFS.RDF_TYPE, HQDM.STATE_OF_SIGN), - 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), - - // Create the representation by signs. - new DbCreateOperation(representationBySign, RDFS.RDF_TYPE, HQDM.REPRESENTATION_BY_SIGN), - new DbCreateOperation(representationBySign, HQDM.MEMBER_OF_, descriptionByUrl.getId()), - new DbCreateOperation(representationBySign, HQDM.REPRESENTS, person), - new DbCreateOperation(representationBySign, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), - - // Add beginning, ending, etc. from `association`. - new DbCreateOperation(startEvent, RDFS.RDF_TYPE, HQDM.EVENT), - new DbCreateOperation(startEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), - new DbCreateOperation(startEvent, HQDM.ENTITY_NAME, "2020-01-01T00:00:00"), - - new DbCreateOperation(endEvent, RDFS.RDF_TYPE, HQDM.EVENT), - new DbCreateOperation(endEvent, HQDM.PART_OF_POSSIBLE_WORLD, possibleWorld), - new DbCreateOperation(endEvent, HQDM.ENTITY_NAME, "2022-12-01T00:00:00"), - - new DbCreateOperation(representationBySign, HQDM.BEGINNING, startEvent), - new DbCreateOperation(representationBySign, HQDM.ENDING, endEvent), - - // Add the participants. - new DbCreateOperation(englishSpeakersIri, HQDM.PARTICIPANT_IN, representationBySign), - new DbCreateOperation(wikipediaSign, HQDM.PARTICIPANT_IN, representationBySign), - new DbCreateOperation(britannica, HQDM.PARTICIPANT_IN, representationBySign), - new DbCreateOperation(biography, HQDM.PARTICIPANT_IN, representationBySign), - new DbCreateOperation(stanford, HQDM.PARTICIPANT_IN, representationBySign), - new DbCreateOperation(nationalGeographic, HQDM.PARTICIPANT_IN, representationBySign)); - - // Create a change set and return it. - return new DbChangeSet(List.of(), creates); - } -} diff --git a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java index e50a211a..c1b1f85c 100644 --- a/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java +++ b/examples/src/main/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsRdl.java @@ -46,7 +46,7 @@ public static DbChangeSet createRefDataObjects() { // Add DbCreateOperations to create the objects and their properties. final List creates = List.of( new DbCreateOperation(urlPattern, RDFS.RDF_TYPE, HQDM.PATTERN), - new DbCreateOperation(urlPattern, HQDM.ENTITY_NAME, "URL Pattern"), + new DbCreateOperation(urlPattern, HQDM.SKOS_DEFINITION, "URL Pattern"), new DbCreateOperation(description, RDFS.RDF_TYPE, HQDM.DESCRIPTION), new DbCreateOperation(description, HQDM.ENTITY_NAME, "Description By URL"), diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/extensions/ParentChildAssociationFunctionTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/extensions/ParentChildAssociationFunctionTest.java index b93d9fcd..024ae609 100644 --- a/examples/src/test/java/uk/gov/gchq/magmacore/examples/extensions/ParentChildAssociationFunctionTest.java +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/extensions/ParentChildAssociationFunctionTest.java @@ -40,11 +40,11 @@ public void testSuccessCase() { // Create a beginning event for the association and its participants. final PointInTime beginning = SpatioTemporalExtentServices.createPointInTime(randomIri()); - beginning.addStringValue(HQDM.VALUE_, "1967-04-04T10:15:30.00Z"); + beginning.addStringValue(HQDM.SKOS_DEFINITION, "1967-04-04T10:15:30.00Z"); // Create an ending event for the association and its participants. final PointInTime ending = SpatioTemporalExtentServices.createPointInTime(randomIri()); - ending.addStringValue(HQDM.VALUE_, "2040-12-03T10:15:30.00Z"); + ending.addStringValue(HQDM.SKOS_DEFINITION, "2040-12-03T10:15:30.00Z"); // The entities will all be added to this PossibleWorld. final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(randomIri()); @@ -65,7 +65,7 @@ public void testSuccessCase() { ending)); // Export the TTL for inspection. - svc.exportTtl(System.out); + // svc.exportTtl(System.out); } diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/kinds/CreateOrganizationSubTypeUsingKinds.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/kinds/CreateOrganizationSubTypeUsingKinds.java new file mode 100644 index 00000000..dd8907ee --- /dev/null +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/kinds/CreateOrganizationSubTypeUsingKinds.java @@ -0,0 +1,87 @@ +package uk.gov.gchq.magmacore.examples.kinds; + +import static org.junit.Assert.assertTrue; + +import java.util.UUID; + +import org.junit.Test; + +import uk.gov.gchq.magmacore.hqdm.model.Individual; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganization; +import uk.gov.gchq.magmacore.hqdm.model.KindOfOrganizationComponent; +import uk.gov.gchq.magmacore.hqdm.model.Organization; +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IriBase; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.IndividualBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.KindOfOrganizationBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.KindOfOrganizationComponentBuilder; +import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.magmacore.service.MagmaCoreService; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * Create a KindOfOrganization and make a Thing a member_of_kind of it, then persist the Thing and + * make sure it is read back as an Organization. + * + *

+ * This demonstrates the implementation of instances of 'kinds' as new entity types. + *

+ */ +public class CreateOrganizationSubTypeUsingKinds { + /* + * A Base URL for the tests. + */ + private static IriBase TEST_BASE = new IriBase("test", "http://example.com/test#"); + + /** + * Unit test. + */ + @Test + public void test() { + // ACME Ltd will be a part of this possibleWorld. + final PossibleWorld possibleWorld = SpatioTemporalExtentServices.createPossibleWorld(randomIri()); + + // We need a kind of organization component for the kind of organization. + final KindOfOrganizationComponent componentKind = new KindOfOrganizationComponentBuilder(randomIri()) + .build(); + + // Create a new kind of organization to represent companies. + // This will also make the new kind into a sub-type of organization. + final KindOfOrganization companies = new KindOfOrganizationBuilder(randomIri()) + .has_Component_By_Class_M(componentKind) + .build(); + + // Create an Individual and make it a member_of_kind of the companies kind. + // This will also mean that the individual is of type organization, via its kind. + final Individual acmeLtd = new IndividualBuilder(randomIri()) + .member_Of_Kind(companies) + .part_Of_Possible_World_M(possibleWorld) + .build(); + + // Persist everything. + final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); + service.beginWrite(); + service.create(companies); + service.create(acmeLtd); + service.commit(); + + // Read back the organization. + service.beginRead(); + final Thing acmeFromDatabase = service.get(acmeLtd.getId()); + service.commit(); + + // Confirm that the entity created as an individual is now actually an organization as well. + assertTrue(acmeFromDatabase instanceof Organization); + } + + /** + * Utility method. + * + * @return IRI + */ + private static IRI randomIri() { + return new IRI(TEST_BASE, UUID.randomUUID().toString()); + } +} diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/InvalidEntityectException.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/InvalidEntityectException.java new file mode 100644 index 00000000..d942baaa --- /dev/null +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/InvalidEntityectException.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.plans; + +/** + * An entity does not match HQDM or is otherwise incorrectly specified. + */ +public class InvalidEntityectException extends RuntimeException { + + public InvalidEntityectException(final String s) { + super(s); + } + +} + diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/PlanAndRequirementsExample.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/PlanAndRequirementsExample.java new file mode 100644 index 00000000..ad28a46a --- /dev/null +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/plans/PlanAndRequirementsExample.java @@ -0,0 +1,309 @@ +package uk.gov.gchq.magmacore.examples.plans; + +import java.security.InvalidParameterException; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.Arrays; +import java.util.HashMap; + +import org.junit.Test; + +import uk.gov.gchq.magmacore.hqdm.model.ClassOfState; +import uk.gov.gchq.magmacore.hqdm.model.Event; +import uk.gov.gchq.magmacore.hqdm.model.Plan; +import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; +import uk.gov.gchq.magmacore.hqdm.model.Requirement; +import uk.gov.gchq.magmacore.hqdm.model.RequirementSpecification; +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.rdfbuilders.ClassOfStateBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.ClassOfStateOfFunctionalObjectBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.ClassOfStateOfFunctionalSystemBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.PlanBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.PointInTimeBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.RequirementBuilder; +import uk.gov.gchq.magmacore.hqdm.rdfbuilders.RequirementSpecificationBuilder; +import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; +import uk.gov.gchq.magmacore.service.MagmaCoreServiceFactory; + +/** + * An example of plans and requirements. + */ +public class PlanAndRequirementsExample { + + private static final String PREFIXES = """ + @prefix tst: . + @prefix date: . + @prefix h: . + @prefix rdf: . + @prefix rdfs: . + @prefix skos: . + """; + + private static final IriBase BASE = new IriBase("tst", "https://example.com/test#"); + private static final IriBase DATE_BASE = new IriBase("date", "https://example.com/date#"); + private static final Instant START = Instant.now(); + private static long nextIri = 0L; + + private static String nextIri() { + return Long.toString(nextIri++); + } + + @Test + public void testPlans() { + final var objects = new HashMap(); + + // + // Create the plan in the real world. + // + final var realWorld = getTheRealWorld(); + objects.put(realWorld.getId(), realWorld); + + final var planStartEvent = getCarServicePlanStartEvent(realWorld); + objects.put(planStartEvent.getId(), planStartEvent); + + final var planEndEvent = getCarServicePlanEndEvent(realWorld); + objects.put(planEndEvent.getId(), planEndEvent); + + final var carServicePlan = getCarServicePlan(realWorld, planStartEvent, planEndEvent); + objects.put(carServicePlan.getId(), carServicePlan); + + // + // Create the serviced car requirement. + // + final var servicedCarClassOfState = getServicedCarClassOfState(); + Arrays.stream(servicedCarClassOfState).forEach(cos -> { + objects.put(cos.getId(), cos); + }); + + final var servicedCarRequirementSpecification = getServicedCarRequirementSpecification(servicedCarClassOfState); + objects.put(servicedCarRequirementSpecification.getId(), servicedCarRequirementSpecification); + + final var servicedCarRequirementStartEvent = getServicedCarRequirementStartEvent(realWorld); + objects.put(servicedCarRequirementStartEvent.getId(), servicedCarRequirementStartEvent); + + final var servicedCarRequirementEndEvent = getServicedCarRequirementEndEvent(realWorld); + objects.put(servicedCarRequirementEndEvent.getId(), servicedCarRequirementEndEvent); + + final var servicedCarRequirement = getServicedCarRequirement(realWorld, carServicePlan, servicedCarRequirementSpecification, + servicedCarRequirementStartEvent, servicedCarRequirementEndEvent); + objects.put(servicedCarRequirement.getId(), servicedCarRequirement); + + // + // Create the car service activity requirement. + // + final var serviceActivityClassOfState = getCarServiceActivityClassOfState(); + Arrays.stream(serviceActivityClassOfState).forEach(cos -> { + objects.put(cos.getId(), cos); + }); + + final var serviceActivityRequirementsSpec = getServiceActivityRequirementsSpec(serviceActivityClassOfState); + objects.put(serviceActivityRequirementsSpec.getId(), serviceActivityRequirementsSpec); + + final var serviceActivityStartEvent = getServiceActivityStartEvent(realWorld); + objects.put(serviceActivityStartEvent.getId(), serviceActivityStartEvent); + + final var serviceActivityEndEvent = getServiceActivityEndEvent(realWorld); + objects.put(serviceActivityEndEvent.getId(), serviceActivityEndEvent); + + final var serviceActivityRequirement = getServiceActivityRequirement(realWorld, carServicePlan, serviceActivityRequirementsSpec, + serviceActivityStartEvent, serviceActivityEndEvent, servicedCarRequirementStartEvent); + objects.put(serviceActivityRequirement.getId(), serviceActivityRequirement); + // + // Create evertying in the database. + // + final var mcs = MagmaCoreServiceFactory.createWithJenaDatabase(); + mcs.runInWriteTransaction(svc -> { + objects.values().stream().forEach(svc::create); + return svc; + }); + + System.out.println(); + System.out.println(PREFIXES); + mcs.exportTtl(System.out); + System.out.println(); + } + + private Requirement getServiceActivityRequirement(final PossibleWorld realWorld, final Plan plan, final RequirementSpecification serviceActivityRequirementsSpec, + final Event beginning, final Event ending, final Event servicedCarStartEvent) { + + final var iri = new IRI(BASE, nextIri()); + final var req = new RequirementBuilder(iri) + .part_Of_Plan_M(plan) + .part_Of_Possible_World_M(realWorld) + .defined_By_M(serviceActivityRequirementsSpec) + .beginning(beginning) + .ending(ending) + .build(); + req.addStringValue(HQDM.SKOS_DEFINITION, "Car 50k mile service activity"); + req.addValue(HQDM.CAUSES, servicedCarStartEvent.getId()); + + return req; + } + + private Event getServiceActivityEndEvent(final PossibleWorld realWorld) { + final var date = START.plus(300, ChronoUnit.DAYS).plus(4, ChronoUnit.HOURS); + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private Event getServiceActivityStartEvent(final PossibleWorld realWorld) { + final var date = START.plus(300, ChronoUnit.DAYS); + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private RequirementSpecification getServiceActivityRequirementsSpec(final ClassOfState[] classOfState) { + if (classOfState.length == 0) { + throw new InvalidParameterException("Need at least one classOfState"); + } + final var iri = new IRI(BASE, nextIri()); + final var spec = new RequirementSpecificationBuilder(iri) + .intersection_Of_M(classOfState[0]) + .build(); + spec.addStringValue(HQDM.SKOS_DEFINITION, "50k mile car service activity specification"); + if (classOfState.length > 1) { + for (int i = 1; i < classOfState.length; i++) { + spec.addValue(HQDM.INTERSECTION_OF, classOfState[i].getId()); + } + } + return spec; + } + + private ClassOfState[] getCarServiceActivityClassOfState() { + final var iri = new IRI(BASE, nextIri()); + final var classOfState = new ClassOfStateBuilder(iri).build(); + classOfState.addStringValue(HQDM.SKOS_DEFINITION, "Car 50K mile service activity class of state"); + return new ClassOfState[] { + classOfState + }; + } + + private Event getServicedCarRequirementEndEvent(final PossibleWorld realWorld) { + final var date = START.plus(365, ChronoUnit.DAYS); + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private Event getServicedCarRequirementStartEvent(final PossibleWorld realWorld) { + final var date = START.plus(300, ChronoUnit.DAYS).plus(4, ChronoUnit.HOURS); + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private ClassOfState[] getServicedCarClassOfState() { + final var carStateIri = new IRI(BASE, nextIri()); + final var serviceStateIri = new IRI(BASE, nextIri()); + final var workingStateIri = new IRI(BASE, nextIri()); + final var carState = new ClassOfStateOfFunctionalSystemBuilder(carStateIri).build(); + final var serviceState = new ClassOfStateOfFunctionalObjectBuilder(serviceStateIri).build(); + final var workingState = new ClassOfStateBuilder(workingStateIri).build(); + carState.addStringValue(HQDM.SKOS_DEFINITION, "State Of Car"); + serviceState.addStringValue(HQDM.SKOS_DEFINITION, "Car with 50k mile service"); + workingState.addStringValue(HQDM.SKOS_DEFINITION, "Functioning Car"); + return new ClassOfState[] { + carState, + serviceState, + workingState + }; + } + + private Requirement getServicedCarRequirement( + final PossibleWorld realWorld, + final Plan plan, + final RequirementSpecification servicedCarRequirementSpecification, + final Event beginning, + final Event ending) { + + final var iri = new IRI(BASE, nextIri()); + final var req = new RequirementBuilder(iri) + .part_Of_Plan_M(plan) + .part_Of_Possible_World_M(realWorld) + .defined_By_M(servicedCarRequirementSpecification) + .beginning(beginning) + .ending(ending) + .build(); + req.addStringValue(HQDM.SKOS_DEFINITION, "Car with 50k mile service"); + + return req; + } + + private RequirementSpecification getServicedCarRequirementSpecification(final ClassOfState... classOfState) { + if (classOfState.length == 0) { + throw new InvalidParameterException("Need at least one classOfState"); + } + final var iri = new IRI(BASE, nextIri()); + final var spec = new RequirementSpecificationBuilder(iri) + .intersection_Of_M(classOfState[0]) + .build(); + spec.addStringValue(HQDM.SKOS_DEFINITION, "Car with 50k mile service"); + if (classOfState.length > 1) { + for (int i = 1; i < classOfState.length; i++) { + spec.addValue(HQDM.INTERSECTION_OF, classOfState[i].getId()); + } + } + return spec; + } + + private Plan getCarServicePlan(final PossibleWorld realWorld, final Event planStartEvent, final Event planEndEvent) { + + final var planIri = new IRI(BASE, nextIri()); + final var plan = new PlanBuilder(planIri) + .part_Of_Possible_World_M(realWorld) + .beginning(planStartEvent) + .ending(planEndEvent) + .build(); + + plan.addStringValue(HQDM.SKOS_DEFINITION, "Car Servicing Plan"); + return plan; + } + + private Event getCarServicePlanEndEvent(final PossibleWorld realWorld) { + final var date = START.plus(365, ChronoUnit.DAYS); + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private Event getCarServicePlanStartEvent(final PossibleWorld realWorld) { + final var date = START; + final var eventIri = new IRI(DATE_BASE, instantToString(date)); + final var event = new PointInTimeBuilder(eventIri) + .part_Of_Possible_World_M(realWorld) + .build(); + event.addStringValue(HQDM.SKOS_DEFINITION, date.toString()); + return event; + } + + private PossibleWorld getTheRealWorld() { + final var possibleWorldIri = new IRI(BASE, nextIri()); + final var realWorld = SpatioTemporalExtentServices.createPossibleWorld(possibleWorldIri); + realWorld.addStringValue(HQDM.SKOS_DEFINITION, "The Real World"); + return realWorld; + } + + private static String instantToString(final Instant when) { + return Long.toString(when.getEpochSecond()) + Long.toString(when.getNano()); + } +} 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/ExamplePatternsTest.java similarity index 90% rename from examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java rename to examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExamplePatternsTest.java index 19f0d74b..9fecc089 100644 --- a/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExampleSignsTest.java +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/signs/ExamplePatternsTest.java @@ -25,7 +25,7 @@ /** * Exercise the {@link ExampleSigns} code during the build. */ -public class ExampleSignsTest { +public class ExamplePatternsTest { /** * Test the {@link ExampleSigns} code. @@ -33,7 +33,7 @@ public class ExampleSignsTest { @Test public void testSignsExample() { final MagmaCoreService service = MagmaCoreServiceFactory.createWithJenaDatabase(); - final DbTransformation transformation = ExampleSigns.populateExampleData(service); + final DbTransformation transformation = ExamplePatterns.populateExampleData(service); assertNotNull(transformation); } diff --git a/examples/src/test/java/uk/gov/gchq/magmacore/examples/verify/DataIntegrityChecksTest.java b/examples/src/test/java/uk/gov/gchq/magmacore/examples/verify/DataIntegrityChecksTest.java index 599f8e13..2a01dfe7 100644 --- a/examples/src/test/java/uk/gov/gchq/magmacore/examples/verify/DataIntegrityChecksTest.java +++ b/examples/src/test/java/uk/gov/gchq/magmacore/examples/verify/DataIntegrityChecksTest.java @@ -67,7 +67,7 @@ public static void beforeClass() throws IOException, URISyntaxException { service = MagmaCoreServiceFactory.createWithJenaDatabase(); // Load the HQDM data model. - service.loadTtl(DataIntegrityChecksTest.class.getResourceAsStream("/hqdm-0.0.1-alpha.ttl")); + service.loadTtl(DataIntegrityChecksTest.class.getResourceAsStream("/hqdm.ttl")); // Populate some data to prove that the rules are applied. service.runInWriteTransaction(svc -> { @@ -162,6 +162,9 @@ public void test() throws IOException, URISyntaxException { .toList(); missing.forEach(System.err::println); + if (!missing.isEmpty()) { + service.exportTtl(System.err); + } assertTrue("Not all rules fired - see log for details", missing.isEmpty()); // Make sure that the actual number of errors found matches the expected number. diff --git a/examples/src/test/resources/hqdm-0.0.1-alpha.ttl b/examples/src/test/resources/hqdm-0.0.1-alpha.ttl deleted file mode 100644 index 8c6dc97a..00000000 --- a/examples/src/test/resources/hqdm-0.0.1-alpha.ttl +++ /dev/null @@ -1,1100 +0,0 @@ - -@prefix hqdm: . -@prefix rdfs: . -@prefix rdf: . -@prefix xsd: . - -hqdm:abstract_object rdf:type rdfs:Class . -hqdm:abstract_object rdfs:subClassOf hqdm:thing . -hqdm:acceptance_of_offer rdf:type rdfs:Class . -hqdm:acceptance_of_offer rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:acceptance_of_offer_for_goods rdf:type rdfs:Class . -hqdm:acceptance_of_offer_for_goods rdfs:subClassOf hqdm:acceptance_of_offer . -hqdm:acceptance_of_offer_for_goods_part_of rdfs:domain hqdm:acceptance_of_offer_for_goods . -hqdm:acceptance_of_offer_for_goods_part_of rdfs:range hqdm:offer_and_acceptance_for_goods . -hqdm:acceptance_of_offer_for_goods_references rdfs:domain hqdm:acceptance_of_offer_for_goods . -hqdm:acceptance_of_offer_for_goods_references rdfs:range hqdm:offer_for_goods . -hqdm:acceptance_of_offer_part_of rdfs:domain hqdm:acceptance_of_offer . -hqdm:acceptance_of_offer_part_of rdfs:range hqdm:agree_contract . -hqdm:acceptance_of_offer_references rdfs:domain hqdm:acceptance_of_offer . -hqdm:acceptance_of_offer_references rdfs:range hqdm:offer . -hqdm:activity rdf:type rdfs:Class . -hqdm:activity rdfs:subClassOf hqdm:individual . -hqdm:activity rdfs:subClassOf hqdm:state_of_activity . -hqdm:activity_causes rdfs:domain hqdm:activity . -hqdm:activity_causes rdfs:range hqdm:event . -hqdm:activity_consists_of rdfs:domain hqdm:activity . -hqdm:activity_consists_of rdfs:range hqdm:activity . -hqdm:activity_consists_of_participant rdfs:domain hqdm:activity . -hqdm:activity_consists_of_participant rdfs:range hqdm:participant . -hqdm:activity_determines rdfs:domain hqdm:activity . -hqdm:activity_determines rdfs:range hqdm:thing . -hqdm:activity_member_of rdfs:domain hqdm:activity . -hqdm:activity_member_of rdfs:range hqdm:class_of_activity . -hqdm:activity_member_of_kind rdfs:domain hqdm:activity . -hqdm:activity_member_of_kind rdfs:range hqdm:kind_of_activity . -hqdm:activity_part_of rdfs:domain hqdm:activity . -hqdm:activity_part_of rdfs:range hqdm:activity . -hqdm:activity_references rdfs:domain hqdm:activity . -hqdm:activity_references rdfs:range hqdm:thing . -hqdm:aggregation rdf:type rdfs:Class . -hqdm:aggregation rdfs:subClassOf hqdm:relationship . -hqdm:aggregation_part rdfs:domain hqdm:aggregation . -hqdm:aggregation_part rdfs:range hqdm:spatio_temporal_extent . -hqdm:aggregation_whole rdfs:domain hqdm:aggregation . -hqdm:aggregation_whole rdfs:range hqdm:spatio_temporal_extent . -hqdm:agree_contract rdf:type rdfs:Class . -hqdm:agree_contract rdfs:subClassOf hqdm:reaching_agreement . -hqdm:agree_contract_agree_contract_part_of rdfs:domain hqdm:agree_contract . -hqdm:agree_contract_agree_contract_part_of rdfs:range hqdm:contract_process . -hqdm:agree_contract_consists_of rdfs:domain hqdm:agree_contract . -hqdm:agree_contract_consists_of rdfs:range hqdm:part_of . -hqdm:agree_contract_member_of rdfs:domain hqdm:agree_contract . -hqdm:agree_contract_member_of rdfs:range hqdm:class_of_agree_contract . -hqdm:agreement_execution rdf:type rdfs:Class . -hqdm:agreement_execution rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:agreement_execution_member_of rdfs:domain hqdm:agreement_execution . -hqdm:agreement_execution_member_of rdfs:range hqdm:class_of_agreement_execution . -hqdm:agreement_execution_part_of rdfs:domain hqdm:agreement_execution . -hqdm:agreement_execution_part_of rdfs:range hqdm:agreement_process . -hqdm:agreement_process rdf:type rdfs:Class . -hqdm:agreement_process rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:agreement_process_consists_of rdfs:domain hqdm:agreement_process . -hqdm:agreement_process_consists_of rdfs:range hqdm:part_of . -hqdm:agreement_process_consists_of_ rdfs:domain hqdm:agreement_process . -hqdm:agreement_process_consists_of_ rdfs:range hqdm:agreement_execution . -hqdm:agreement_process_member_of rdfs:domain hqdm:agreement_process . -hqdm:agreement_process_member_of rdfs:range hqdm:class_of_agreement_process . -hqdm:amount_of_money rdf:type rdfs:Class . -hqdm:amount_of_money rdfs:subClassOf hqdm:physical_object . -hqdm:amount_of_money rdfs:subClassOf hqdm:socially_constructed_object . -hqdm:amount_of_money rdfs:subClassOf hqdm:state_of_amount_of_money . -hqdm:amount_of_money_member_of rdfs:domain hqdm:amount_of_money . -hqdm:amount_of_money_member_of rdfs:range hqdm:class_of_amount_of_money . -hqdm:amount_of_money_member_of_currency rdfs:domain hqdm:amount_of_money . -hqdm:amount_of_money_member_of_currency rdfs:range hqdm:currency . -hqdm:asset rdf:type rdfs:Class . -hqdm:asset rdfs:subClassOf hqdm:participant . -hqdm:asset_participant_in rdfs:domain hqdm:asset . -hqdm:asset_participant_in rdfs:range hqdm:ownership . -hqdm:association rdf:type rdfs:Class . -hqdm:association rdfs:subClassOf hqdm:individual . -hqdm:association rdfs:subClassOf hqdm:state_of_association . -hqdm:association_consists_of_participant rdfs:domain hqdm:association . -hqdm:association_consists_of_participant rdfs:range hqdm:participant . -hqdm:association_member_of rdfs:domain hqdm:association . -hqdm:association_member_of rdfs:range hqdm:class_of_association . -hqdm:association_member_of_kind rdfs:domain hqdm:association . -hqdm:association_member_of_kind rdfs:range hqdm:kind_of_association . -hqdm:beginning_of_ownership rdf:type rdfs:Class . -hqdm:beginning_of_ownership rdfs:subClassOf hqdm:event . -hqdm:biological_object rdf:type rdfs:Class . -hqdm:biological_object rdfs:subClassOf hqdm:physical_object . -hqdm:biological_object rdfs:subClassOf hqdm:state_of_biological_object . -hqdm:biological_object_member_of rdfs:domain hqdm:biological_object . -hqdm:biological_object_member_of rdfs:range hqdm:class_of_biological_object . -hqdm:biological_object_member_of_kind rdfs:domain hqdm:biological_object . -hqdm:biological_object_member_of_kind rdfs:range hqdm:kind_of_biological_object . -hqdm:biological_system rdf:type rdfs:Class . -hqdm:biological_system rdfs:subClassOf hqdm:ordinary_biological_object . -hqdm:biological_system rdfs:subClassOf hqdm:state_of_biological_system . -hqdm:biological_system rdfs:subClassOf hqdm:system . -hqdm:biological_system_component rdf:type rdfs:Class . -hqdm:biological_system_component rdfs:subClassOf hqdm:state_of_biological_system_component . -hqdm:biological_system_component rdfs:subClassOf hqdm:system_component . -hqdm:biological_system_component_component_of rdfs:domain hqdm:biological_system_component . -hqdm:biological_system_component_component_of rdfs:range hqdm:biological_system . -hqdm:biological_system_component_member_of rdfs:domain hqdm:biological_system_component . -hqdm:biological_system_component_member_of rdfs:range hqdm:class_of_biological_system_component . -hqdm:biological_system_member_of rdfs:domain hqdm:biological_system . -hqdm:biological_system_member_of rdfs:range hqdm:class_of_biological_system . -hqdm:biological_system_member_of_kind rdfs:domain hqdm:biological_system . -hqdm:biological_system_member_of_kind rdfs:range hqdm:kind_of_biological_system . -hqdm:biological_system_natural_role rdfs:domain hqdm:biological_system . -hqdm:biological_system_natural_role rdfs:range hqdm:role . -hqdm:class rdf:type rdfs:Class . -hqdm:class rdfs:subClassOf hqdm:abstract_object . -hqdm:class_has_superclass rdfs:domain hqdm:class . -hqdm:class_has_superclass rdfs:range hqdm:class . -hqdm:class_member_of rdfs:domain hqdm:class . -hqdm:class_member_of rdfs:range hqdm:class_of_class . -hqdm:class_of_abstract_object rdf:type rdfs:Class . -hqdm:class_of_abstract_object rdfs:subClassOf hqdm:class . -hqdm:class_of_abstract_objectenumerated_class rdf:type rdfs:Class . -hqdm:class_of_activity rdf:type rdfs:Class . -hqdm:class_of_activity rdfs:subClassOf hqdm:class_of_individual . -hqdm:class_of_activity rdfs:subClassOf hqdm:class_of_state_of_activity . -hqdm:class_of_agree_contract rdf:type rdfs:Class . -hqdm:class_of_agree_contract rdfs:subClassOf hqdm:class_of_reaching_agreement . -hqdm:class_of_agree_contract_part_of_by_class rdfs:domain hqdm:class_of_agree_contract . -hqdm:class_of_agree_contract_part_of_by_class rdfs:range hqdm:class_of_contract_process . -hqdm:class_of_agreement_execution rdf:type rdfs:Class . -hqdm:class_of_agreement_execution rdfs:subClassOf hqdm:class_of_socially_constructed_activity . -hqdm:class_of_agreement_execution_part_of_by_class rdfs:domain hqdm:class_of_agreement_execution . -hqdm:class_of_agreement_execution_part_of_by_class rdfs:range hqdm:class_of_agreement_process . -hqdm:class_of_agreement_process rdf:type rdfs:Class . -hqdm:class_of_agreement_process rdfs:subClassOf hqdm:class_of_socially_constructed_activity . -hqdm:class_of_amount_of_money rdf:type rdfs:Class . -hqdm:class_of_amount_of_money rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:class_of_amount_of_money rdfs:subClassOf hqdm:class_of_socially_constructed_object . -hqdm:class_of_amount_of_money rdfs:subClassOf hqdm:class_of_state_of_amount_of_money . -hqdm:class_of_association rdf:type rdfs:Class . -hqdm:class_of_association rdfs:subClassOf hqdm:class_of_individual . -hqdm:class_of_association rdfs:subClassOf hqdm:class_of_state_of_association . -hqdm:class_of_biological_object rdf:type rdfs:Class . -hqdm:class_of_biological_object rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:class_of_biological_object rdfs:subClassOf hqdm:class_of_state_of_biological_object . -hqdm:class_of_biological_system rdf:type rdfs:Class . -hqdm:class_of_biological_system rdfs:subClassOf hqdm:class_of_ordinary_biological_object . -hqdm:class_of_biological_system rdfs:subClassOf hqdm:class_of_state_of_biological_system . -hqdm:class_of_biological_system rdfs:subClassOf hqdm:class_of_system . -hqdm:class_of_biological_system_component rdf:type rdfs:Class . -hqdm:class_of_biological_system_component rdfs:subClassOf hqdm:class_of_biological_object . -hqdm:class_of_biological_system_component rdfs:subClassOf hqdm:class_of_state_of_biological_system_component . -hqdm:class_of_biological_system_component rdfs:subClassOf hqdm:class_of_system_component . -hqdm:class_of_class rdf:type rdfs:Class . -hqdm:class_of_class rdfs:subClassOf hqdm:class_of_abstract_object . -hqdm:class_of_class_of_spatio_temporal_extent rdf:type rdfs:Class . -hqdm:class_of_class_of_spatio_temporal_extent rdfs:subClassOf hqdm:class_of_class . -hqdm:class_of_contract_execution rdf:type rdfs:Class . -hqdm:class_of_contract_execution rdfs:subClassOf hqdm:class_of_agreement_execution . -hqdm:class_of_contract_execution_part_of_by_class rdfs:domain hqdm:class_of_contract_execution . -hqdm:class_of_contract_execution_part_of_by_class rdfs:range hqdm:class_of_contract_process . -hqdm:class_of_contract_process rdfs:subClassOf hqdm:class_of_agreement_process . -hqdm:class_of_event rdf:type rdfs:Class . -hqdm:class_of_event rdfs:subClassOf hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_functional_object rdf:type rdfs:Class . -hqdm:class_of_functional_object rdfs:subClassOf hqdm:class_of_intentionally_constructed_object . -hqdm:class_of_functional_object rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:class_of_functional_object rdfs:subClassOf hqdm:class_of_state_of_functional_object . -hqdm:class_of_functional_system rdf:type rdfs:Class . -hqdm:class_of_functional_system rdfs:subClassOf hqdm:class_of_ordinary_functional_object . -hqdm:class_of_functional_system rdfs:subClassOf hqdm:class_of_state_of_functional_system . -hqdm:class_of_functional_system rdfs:subClassOf hqdm:class_of_system . -hqdm:class_of_functional_system_component rdf:type rdfs:Class . -hqdm:class_of_functional_system_component rdfs:subClassOf hqdm:class_of_state_of_functional_system_component . -hqdm:class_of_functional_system_component rdfs:subClassOf hqdm:class_of_system_component . -hqdm:class_of_in_place_biological_component rdf:type rdfs:Class . -hqdm:class_of_in_place_biological_component rdfs:subClassOf hqdm:class_of_installed_object . -hqdm:class_of_in_place_biological_component rdfs:subClassOf hqdm:class_of_state_of_biological_system_component . -hqdm:class_of_in_place_biological_component rdfs:subClassOf hqdm:class_of_state_of_ordinary_biological_object . -hqdm:class_of_individual rdf:type rdfs:Class . -hqdm:class_of_individual rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_installed_functional_system_component rdf:type rdfs:Class . -hqdm:class_of_installed_functional_system_component rdfs:subClassOf hqdm:class_of_installed_object . -hqdm:class_of_installed_functional_system_component rdfs:subClassOf hqdm:class_of_state_of_functional_system_component . -hqdm:class_of_installed_object rdf:type rdfs:Class . -hqdm:class_of_installed_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_physical_object . -hqdm:class_of_installed_object rdfs:subClassOf hqdm:class_of_state_of_system_component . -hqdm:class_of_intentionally_constructed_object rdf:type rdfs:Class . -hqdm:class_of_intentionally_constructed_object rdfs:subClassOf hqdm:class_of_individual . -hqdm:class_of_intentionally_constructed_object rdfs:subClassOf hqdm:class_of_state_of_intentionally_constructed_object . -hqdm:class_of_offer rdf:type rdfs:Class . -hqdm:class_of_offer rdfs:subClassOf hqdm:class_of_socially_constructed_activity . -hqdm:class_of_ordinary_biological_object rdf:type rdfs:Class . -hqdm:class_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_biological_object . -hqdm:class_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_ordinary_physical_object . -hqdm:class_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_biological_object . -hqdm:class_of_ordinary_functional_object rdf:type rdfs:Class . -hqdm:class_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_functional_object . -hqdm:class_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_ordinary_physical_object . -hqdm:class_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_functional_object . -hqdm:class_of_ordinary_physical_object rdf:type rdfs:Class . -hqdm:class_of_ordinary_physical_object rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:class_of_ordinary_physical_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_physical_object . -hqdm:class_of_organization rdfs:subClassOf hqdm:class_of_party . -hqdm:class_of_organization rdfs:subClassOf hqdm:class_of_socially_constructed_object . -hqdm:class_of_organization rdfs:subClassOf hqdm:class_of_state_of_organization . -hqdm:class_of_organization_component rdf:type rdfs:Class . -hqdm:class_of_organization_component rdfs:subClassOf hqdm:class_of_socially_constructed_object . -hqdm:class_of_organization_component rdfs:subClassOf hqdm:class_of_state_of_organization_component . -hqdm:class_of_organization_component rdfs:subClassOf hqdm:class_of_system_component . -hqdm:class_of_participant rdf:type rdfs:Class . -hqdm:class_of_participant rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_party rdf:type rdfs:Class . -hqdm:class_of_party rdfs:subClassOf hqdm:class_of_state_of_party . -hqdm:class_of_party rdfs:subClassOf hqdm:class_of_system . -hqdm:class_of_period_of_time rdf:type rdfs:Class . -hqdm:class_of_period_of_time rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_person rdf:type rdfs:Class . -hqdm:class_of_person rdfs:subClassOf hqdm:class_of_biological_system . -hqdm:class_of_person rdfs:subClassOf hqdm:class_of_party . -hqdm:class_of_person rdfs:subClassOf hqdm:class_of_state_of_person . -hqdm:class_of_person_in_position rdf:type rdfs:Class . -hqdm:class_of_person_in_position rdfs:subClassOf hqdm:class_of_installed_object . -hqdm:class_of_person_in_position rdfs:subClassOf hqdm:class_of_state_of_position . -hqdm:class_of_physical_object rdf:type rdfs:Class . -hqdm:class_of_physical_object rdfs:subClassOf hqdm:class_of_individual . -hqdm:class_of_physical_object rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_physical_property rdf:type rdfs:Class . -hqdm:class_of_physical_property rdfs:subClassOf hqdm:class_of_class_of_spatio_temporal_extent . -hqdm:class_of_physical_quantity rdf:type rdfs:Class . -hqdm:class_of_physical_quantity rdfs:subClassOf hqdm:class_of_physical_property . -hqdm:class_of_point_in_time rdfs:subClassOf hqdm:class_of_event . -hqdm:class_of_position rdf:type rdfs:Class . -hqdm:class_of_position rdfs:subClassOf hqdm:class_of_organization_component . -hqdm:class_of_position rdfs:subClassOf hqdm:class_of_state_of_position . -hqdm:class_of_possible_world rdfs:subClassOf hqdm:class_of_individual . -hqdm:class_of_possible_world rdfs:subClassOf hqdm:class_of_period_of_time . -hqdm:class_of_reaching_agreement rdf:type rdfs:Class . -hqdm:class_of_reaching_agreement rdfs:subClassOf hqdm:class_of_socially_constructed_activity . -hqdm:class_of_reaching_agreement_part_of_by_class rdfs:domain hqdm:class_of_reaching_agreement . -hqdm:class_of_reaching_agreement_part_of_by_class rdfs:range hqdm:class_of_agreement_process . -hqdm:class_of_relationship rdf:type rdfs:Class . -hqdm:class_of_relationship rdfs:subClassOf hqdm:class_of_abstract_object . -hqdm:class_of_representation rdf:type rdfs:Class . -hqdm:class_of_representation rdfs:subClassOf hqdm:class_of_association . -hqdm:class_of_sales_product_instance rdf:type rdfs:Class . -hqdm:class_of_sales_product_instance rdfs:subClassOf hqdm:class_of_ordinary_functional_object . -hqdm:class_of_sales_product_instance rdfs:subClassOf hqdm:class_of_state_of_sales_product_instance . -hqdm:class_of_sign rdfs:subClassOf hqdm:class_of_socially_constructed_object . -hqdm:class_of_sign rdfs:subClassOf hqdm:class_of_state_of_sign . -hqdm:class_of_socially_constructed_activity rdf:type rdfs:Class . -hqdm:class_of_socially_constructed_activity rdfs:subClassOf hqdm:class_of_activity . -hqdm:class_of_socially_constructed_activity rdfs:subClassOf hqdm:class_of_socially_constructed_object . -hqdm:class_of_socially_constructed_activity_part_of_by_class rdfs:domain hqdm:class_of_socially_constructed_activity . -hqdm:class_of_socially_constructed_activity_part_of_by_class rdfs:range hqdm:class_of_reaching_agreement . -hqdm:class_of_socially_constructed_activity_part_of_by_class_ rdfs:domain hqdm:class_of_socially_constructed_activity . -hqdm:class_of_socially_constructed_activity_part_of_by_class_ rdfs:range hqdm:class_of_agreement_execution . -hqdm:class_of_socially_constructed_object rdf:type rdfs:Class . -hqdm:class_of_socially_constructed_object rdfs:subClassOf hqdm:class_of_intentionally_constructed_object . -hqdm:class_of_socially_constructed_object rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_spatio_temporal_extent rdf:type rdfs:Class . -hqdm:class_of_spatio_temporal_extent rdfs:subClassOf hqdm:class . -hqdm:class_of_spatio_temporal_extent_consists__of_by_class rdfs:domain hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_spatio_temporal_extent_consists__of_by_class rdfs:range hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_spatio_temporal_extent_member_of_ rdfs:domain hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_spatio_temporal_extent_member_of_ rdfs:range hqdm:class_of_class_of_spatio_temporal_extent . -hqdm:class_of_spatio_temporal_extent_part__of_by_class rdfs:domain hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_spatio_temporal_extent_part__of_by_class rdfs:range hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_state rdf:type rdfs:Class . -hqdm:class_of_state rdfs:subClassOf hqdm:class_of_spatio_temporal_extent . -hqdm:class_of_state_of_activity rdf:type rdfs:Class . -hqdm:class_of_state_of_activity rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_state_of_amount_of_money rdf:type rdfs:Class . -hqdm:class_of_state_of_amount_of_money rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_state_of_amount_of_money rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_state_of_association rdf:type rdfs:Class . -hqdm:class_of_state_of_association rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_state_of_biological_object rdf:type rdfs:Class . -hqdm:class_of_state_of_biological_object rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_state_of_biological_system rdf:type rdfs:Class . -hqdm:class_of_state_of_biological_system rdfs:subClassOf hqdm:class_of_state_of_ordinary_biological_object . -hqdm:class_of_state_of_biological_system rdfs:subClassOf hqdm:class_of_state_of_system . -hqdm:class_of_state_of_biological_system_component rdf:type rdfs:Class . -hqdm:class_of_state_of_biological_system_component rdfs:subClassOf hqdm:class_of_state_of_biological_object . -hqdm:class_of_state_of_biological_system_component rdfs:subClassOf hqdm:class_of_state_of_system_component . -hqdm:class_of_state_of_functional_object rdf:type rdfs:Class . -hqdm:class_of_state_of_functional_object rdfs:subClassOf hqdm:class_of_state_of_intentionally_constructed_object . -hqdm:class_of_state_of_functional_object rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_state_of_functional_system rdf:type rdfs:Class . -hqdm:class_of_state_of_functional_system rdfs:subClassOf hqdm:class_of_state_of_ordinary_functional_object . -hqdm:class_of_state_of_functional_system rdfs:subClassOf hqdm:class_of_state_of_system . -hqdm:class_of_state_of_functional_system_component rdf:type rdfs:Class . -hqdm:class_of_state_of_functional_system_component rdfs:subClassOf hqdm:class_of_state_of_ordinary_functional_object . -hqdm:class_of_state_of_functional_system_component rdfs:subClassOf hqdm:class_of_state_of_system_component . -hqdm:class_of_state_of_intentionally_constructed_object rdf:type rdfs:Class . -hqdm:class_of_state_of_intentionally_constructed_object rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_state_of_ordinary_biological_object rdf:type rdfs:Class . -hqdm:class_of_state_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_state_of_biological_object . -hqdm:class_of_state_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_physical_object . -hqdm:class_of_state_of_ordinary_functional_object rdf:type rdfs:Class . -hqdm:class_of_state_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_state_of_functional_object . -hqdm:class_of_state_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_state_of_ordinary_physical_object . -hqdm:class_of_state_of_ordinary_physical_object rdf:type rdfs:Class . -hqdm:class_of_state_of_ordinary_physical_object rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_state_of_organization rdf:type rdfs:Class . -hqdm:class_of_state_of_organization rdfs:subClassOf hqdm:class_of_state_of_party . -hqdm:class_of_state_of_organization rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_state_of_organization_component rdf:type rdfs:Class . -hqdm:class_of_state_of_organization_component rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_state_of_organization_component rdfs:subClassOf hqdm:class_of_state_of_system_component . -hqdm:class_of_state_of_party rdf:type rdfs:Class . -hqdm:class_of_state_of_party rdfs:subClassOf hqdm:class_of_state_of_system . -hqdm:class_of_state_of_person rdf:type rdfs:Class . -hqdm:class_of_state_of_person rdfs:subClassOf hqdm:class_of_state_of_biological_system . -hqdm:class_of_state_of_person rdfs:subClassOf hqdm:class_of_state_of_party . -hqdm:class_of_state_of_physical_object rdf:type rdfs:Class . -hqdm:class_of_state_of_physical_object rdfs:subClassOf hqdm:class_of_state . -hqdm:class_of_state_of_position rdf:type rdfs:Class . -hqdm:class_of_state_of_position rdfs:subClassOf hqdm:class_of_state_of_organization_component . -hqdm:class_of_state_of_sales_product_instance rdf:type rdfs:Class . -hqdm:class_of_state_of_sales_product_instance rdfs:subClassOf hqdm:class_of_state_of_ordinary_functional_object . -hqdm:class_of_state_of_sign rdf:type rdfs:Class . -hqdm:class_of_state_of_sign rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_state_of_socially_constructed_activity rdf:type rdfs:Class . -hqdm:class_of_state_of_socially_constructed_activity rdfs:subClassOf hqdm:class_of_state_of_activity . -hqdm:class_of_state_of_socially_constructed_activity rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:class_of_state_of_socially_constructed_object rdf:type rdfs:Class . -hqdm:class_of_state_of_socially_constructed_object rdfs:subClassOf hqdm:class_of_state_of_intentionally_constructed_object . -hqdm:class_of_state_of_system rdf:type rdfs:Class . -hqdm:class_of_state_of_system rdfs:subClassOf hqdm:class_of_state_of_ordinary_physical_object . -hqdm:class_of_state_of_system_component rdf:type rdfs:Class . -hqdm:class_of_state_of_system_component rdfs:subClassOf hqdm:class_of_state_of_physical_object . -hqdm:class_of_system rdf:type rdfs:Class . -hqdm:class_of_system rdfs:subClassOf hqdm:class_of_ordinary_physical_object . -hqdm:class_of_system rdfs:subClassOf hqdm:class_of_state_of_system . -hqdm:class_of_system_component rdf:type rdfs:Class . -hqdm:class_of_system_component rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:class_of_system_component rdfs:subClassOf hqdm:class_of_state_of_system_component . -hqdm:classification rdf:type rdfs:Class . -hqdm:classification rdfs:subClassOf hqdm:relationship . -hqdm:classification_classifier rdfs:domain hqdm:classification . -hqdm:classification_classifier rdfs:range hqdm:class . -hqdm:classification_member rdfs:domain hqdm:classification . -hqdm:classification_member rdfs:range hqdm:thing . -hqdm:composition rdf:type rdfs:Class . -hqdm:composition rdfs:subClassOf hqdm:aggregation . -hqdm:contract_execution rdf:type rdfs:Class . -hqdm:contract_execution rdfs:subClassOf hqdm:agreement_execution . -hqdm:contract_execution_member_of rdfs:domain hqdm:contract_execution . -hqdm:contract_execution_member_of rdfs:range hqdm:class_of_contract_execution . -hqdm:contract_execution_part_of rdfs:domain hqdm:contract_execution . -hqdm:contract_execution_part_of rdfs:range hqdm:contract_process . -hqdm:contract_process rdf:type rdfs:Class . -hqdm:contract_process rdfs:subClassOf hqdm:agreement_process . -hqdm:contract_process_consists_of rdfs:domain hqdm:contract_process . -hqdm:contract_process_consists_of rdfs:range hqdm:part_of . -hqdm:contract_process_consists_of_ rdfs:domain hqdm:contract_process . -hqdm:contract_process_consists_of_ rdfs:range hqdm:part_of . -hqdm:contract_process_member_of rdfs:domain hqdm:contract_process . -hqdm:contract_process_member_of rdfs:range hqdm:class_of_contract_process . -hqdm:currency rdfs:subClassOf hqdm:class_of_amount_of_money . -hqdm:defined_relationship rdf:type rdfs:Class . -hqdm:defined_relationship rdfs:subClassOf hqdm:relationship . -hqdm:defined_relationship_involves rdfs:domain hqdm:defined_relationship . -hqdm:defined_relationship_involves rdfs:range hqdm:classification . -hqdm:defined_relationship_member_of_kind rdfs:domain hqdm:defined_relationship . -hqdm:defined_relationship_member_of_kind rdfs:range hqdm:kind_of_relationship_with_signature . -hqdm:definition rdfs:subClassOf hqdm:representation_by_pattern . -hqdm:definition_represented rdfs:domain hqdm:definition . -hqdm:definition_represented rdfs:range hqdm:class . -hqdm:description rdf:type rdfs:Class . -hqdm:description rdfs:subClassOf hqdm:representation_by_pattern . -hqdm:employee rdf:type rdfs:Class . -hqdm:employee rdfs:subClassOf hqdm:participant . -hqdm:employee rdfs:subClassOf hqdm:state_of_person . -hqdm:employee_participant_in rdfs:domain hqdm:employee . -hqdm:employee_participant_in rdfs:range hqdm:employment . -hqdm:employer rdf:type rdfs:Class . -hqdm:employer rdfs:subClassOf hqdm:participant . -hqdm:employer rdfs:subClassOf hqdm:state_of_party . -hqdm:employer_participant_in rdfs:domain hqdm:employer . -hqdm:employer_participant_in rdfs:range hqdm:employment . -hqdm:employment rdf:type rdfs:Class . -hqdm:employment rdfs:subClassOf hqdm:association . -hqdm:employment_consists_of_participant rdfs:domain hqdm:employment . -hqdm:employment_consists_of_participant rdfs:range hqdm:participant_in . -hqdm:employment_consists_of_participant_ rdfs:domain hqdm:employment . -hqdm:employment_consists_of_participant_ rdfs:range hqdm:employee . -hqdm:ending_of_ownership rdf:type rdfs:Class . -hqdm:ending_of_ownership rdfs:subClassOf hqdm:event . -hqdm:enumerated_class rdfs:subClassOf hqdm:class . -hqdm:event rdf:type rdfs:Class . -hqdm:event rdfs:subClassOf hqdm:spatio_temporal_extent . -hqdm:event_member_of rdfs:domain hqdm:event . -hqdm:event_member_of rdfs:range hqdm:class_of_event . -hqdm:exchange_of_goods_and_money rdf:type rdfs:Class . -hqdm:exchange_of_goods_and_money rdfs:subClassOf hqdm:contract_execution . -hqdm:exchange_of_goods_and_money_consists_of rdfs:domain hqdm:exchange_of_goods_and_money . -hqdm:exchange_of_goods_and_money_consists_of rdfs:range hqdm:part_of . -hqdm:exchange_of_goods_and_money_consists_of_ rdfs:domain hqdm:exchange_of_goods_and_money . -hqdm:exchange_of_goods_and_money_consists_of_ rdfs:range hqdm:transfer_of_ownership_of_money . -hqdm:exchange_of_goods_and_money_part_of rdfs:domain hqdm:exchange_of_goods_and_money . -hqdm:exchange_of_goods_and_money_part_of rdfs:range hqdm:sale_of_goods . -hqdm:function_ rdf:type rdfs:Class . -hqdm:function_ rdfs:subClassOf hqdm:relationship . -hqdm:functional_object rdf:type rdfs:Class . -hqdm:functional_object rdfs:subClassOf hqdm:intentionally_constructed_object . -hqdm:functional_object rdfs:subClassOf hqdm:physical_object . -hqdm:functional_object rdfs:subClassOf hqdm:state_of_functional_object . -hqdm:functional_object_intended_role rdfs:domain hqdm:functional_object . -hqdm:functional_object_intended_role rdfs:range hqdm:role . -hqdm:functional_object_member_of rdfs:domain hqdm:functional_object . -hqdm:functional_object_member_of rdfs:range hqdm:class_of_functional_object . -hqdm:functional_object_member_of_kind rdfs:domain hqdm:functional_object . -hqdm:functional_object_member_of_kind rdfs:range hqdm:kind_of_functional_object . -hqdm:functional_system rdf:type rdfs:Class . -hqdm:functional_system rdfs:subClassOf hqdm:ordinary_functional_object . -hqdm:functional_system rdfs:subClassOf hqdm:state_of_functional_system . -hqdm:functional_system rdfs:subClassOf hqdm:system . -hqdm:functional_system_component rdf:type rdfs:Class . -hqdm:functional_system_component rdfs:subClassOf hqdm:functional_object . -hqdm:functional_system_component rdfs:subClassOf hqdm:state_of_functional_system_component . -hqdm:functional_system_component rdfs:subClassOf hqdm:system_component . -hqdm:functional_system_component_component_of rdfs:domain hqdm:functional_system_component . -hqdm:functional_system_component_component_of rdfs:range hqdm:functional_system . -hqdm:functional_system_component_member_of rdfs:domain hqdm:functional_system_component . -hqdm:functional_system_component_member_of rdfs:range hqdm:class_of_functional_system_component . -hqdm:functional_system_component_member_of_kind rdfs:domain hqdm:functional_system_component . -hqdm:functional_system_component_member_of_kind rdfs:range hqdm:kind_of_functional_system_component . -hqdm:functional_system_member_of rdfs:domain hqdm:functional_system . -hqdm:functional_system_member_of rdfs:range hqdm:class_of_functional_system . -hqdm:functional_system_member_of_kind rdfs:domain hqdm:functional_system . -hqdm:functional_system_member_of_kind rdfs:range hqdm:kind_of_functional_system . -hqdm:identification rdf:type rdfs:Class . -hqdm:identification rdfs:subClassOf hqdm:representation_by_pattern . -hqdm:identification_of_physical_quantity rdfs:subClassOf hqdm:identification . -hqdm:identification_of_physical_quantity_consists_of_by_class rdfs:domain hqdm:identification_of_physical_quantity . -hqdm:identification_of_physical_quantity_consists_of_by_class rdfs:range xsd:double . -hqdm:identification_of_physical_quantity_represented rdfs:domain hqdm:identification_of_physical_quantity . -hqdm:identification_of_physical_quantity_represented rdfs:range hqdm:physical_quantity . -hqdm:identification_of_physical_quantity_uses rdfs:domain hqdm:identification_of_physical_quantity . -hqdm:identification_of_physical_quantity_uses rdfs:range hqdm:scale . -hqdm:in_place_biological_component rdf:type rdfs:Class . -hqdm:in_place_biological_component rdfs:subClassOf hqdm:installed_object . -hqdm:in_place_biological_component rdfs:subClassOf hqdm:state_of_biological_system_component . -hqdm:in_place_biological_component rdfs:subClassOf hqdm:state_of_ordinary_biological_object . -hqdm:in_place_biological_component_member_of rdfs:domain hqdm:in_place_biological_component . -hqdm:in_place_biological_component_member_of rdfs:range hqdm:class_of_in_place_biological_component . -hqdm:individual rdf:type rdfs:Class . -hqdm:individual rdfs:subClassOf hqdm:state . -hqdm:individual_member_of rdfs:domain hqdm:individual . -hqdm:individual_member_of rdfs:range hqdm:class_of_individual . -hqdm:individual_member_of_kind rdfs:domain hqdm:individual . -hqdm:individual_member_of_kind rdfs:range hqdm:kind_of_individual . -hqdm:installed_functional_system_component rdf:type rdfs:Class . -hqdm:installed_functional_system_component rdfs:subClassOf hqdm:installed_object . -hqdm:installed_functional_system_component rdfs:subClassOf hqdm:state_of_functional_system_component . -hqdm:installed_functional_system_component rdfs:subClassOf hqdm:state_of_ordinary_functional_object . -hqdm:installed_functional_system_component_member_of rdfs:domain hqdm:installed_functional_system_component . -hqdm:installed_functional_system_component_member_of rdfs:range hqdm:class_of_installed_functional_system_component . -hqdm:installed_object rdf:type rdfs:Class . -hqdm:installed_object rdfs:subClassOf hqdm:state_of_ordinary_physical_object . -hqdm:installed_object rdfs:subClassOf hqdm:state_of_system_component . -hqdm:installed_object_member_of rdfs:domain hqdm:installed_object . -hqdm:installed_object_member_of rdfs:range hqdm:class_of_installed_object . -hqdm:intentionally_constructed_object rdf:type rdfs:Class . -hqdm:intentionally_constructed_object rdfs:subClassOf hqdm:individual . -hqdm:intentionally_constructed_object rdfs:subClassOf hqdm:state_of_intentionally_constructed_object . -hqdm:intentionally_constructed_object_member_of rdfs:domain hqdm:intentionally_constructed_object . -hqdm:intentionally_constructed_object_member_of rdfs:range hqdm:class_of_intentionally_constructed_object . -hqdm:intentionally_constructed_object_member_of_kind rdfs:domain hqdm:intentionally_constructed_object . -hqdm:intentionally_constructed_object_member_of_kind rdfs:range hqdm:kind_of_intentionally_constructed_object . -hqdm:kind_of_activity rdfs:subClassOf hqdm:class_of_activity . -hqdm:kind_of_activity_causes_by_class rdfs:domain hqdm:kind_of_activity . -hqdm:kind_of_activity_causes_by_class rdfs:range hqdm:class_of_event . -hqdm:kind_of_activity_consists_of_by_class rdfs:domain hqdm:kind_of_activity . -hqdm:kind_of_activity_consists_of_by_class rdfs:range hqdm:role . -hqdm:kind_of_activity_determines_by_class rdfs:domain hqdm:kind_of_activity . -hqdm:kind_of_activity_determines_by_class rdfs:range hqdm:class . -hqdm:kind_of_activity_references_by_class rdfs:domain hqdm:kind_of_activity . -hqdm:kind_of_activity_references_by_class rdfs:range hqdm:class . -hqdm:kind_of_association rdfs:subClassOf hqdm:class_of_association . -hqdm:kind_of_association_consists_of_by_class rdfs:domain hqdm:kind_of_association . -hqdm:kind_of_association_consists_of_by_class rdfs:range hqdm:role . -hqdm:kind_of_biological_object rdf:type rdfs:Class . -hqdm:kind_of_biological_object rdfs:subClassOf hqdm:class_of_biological_object . -hqdm:kind_of_biological_object rdfs:subClassOf hqdm:kind_of_physical_object . -hqdm:kind_of_biological_system rdf:type rdfs:Class . -hqdm:kind_of_biological_system rdfs:subClassOf hqdm:class_of_biological_system . -hqdm:kind_of_biological_system rdfs:subClassOf hqdm:kind_of_system . -hqdm:kind_of_biological_system_component rdfs:subClassOf hqdm:class_of_biological_system_component . -hqdm:kind_of_biological_system_component rdfs:subClassOf hqdm:kind_of_system_component . -hqdm:kind_of_biological_system_has_component_by_class rdfs:domain hqdm:kind_of_biological_system . -hqdm:kind_of_biological_system_has_component_by_class rdfs:range hqdm:kind_of_biological_system_component . -hqdm:kind_of_biological_system_natural_role_by_class rdfs:domain hqdm:kind_of_biological_system . -hqdm:kind_of_biological_system_natural_role_by_class rdfs:range hqdm:role . -hqdm:kind_of_functional_object rdf:type rdfs:Class . -hqdm:kind_of_functional_object rdfs:subClassOf hqdm:class_of_functional_object . -hqdm:kind_of_functional_object rdfs:subClassOf hqdm:kind_of_intentionally_constructed_object . -hqdm:kind_of_functional_object rdfs:subClassOf hqdm:kind_of_physical_object . -hqdm:kind_of_functional_object_intended_role_by_class rdfs:domain hqdm:kind_of_functional_object . -hqdm:kind_of_functional_object_intended_role_by_class rdfs:range hqdm:role . -hqdm:kind_of_functional_system rdf:type rdfs:Class . -hqdm:kind_of_functional_system rdfs:subClassOf hqdm:class_of_functional_system . -hqdm:kind_of_functional_system rdfs:subClassOf hqdm:kind_of_system . -hqdm:kind_of_functional_system_component rdfs:subClassOf hqdm:class_of_functional_system_component . -hqdm:kind_of_functional_system_component rdfs:subClassOf hqdm:kind_of_system_component . -hqdm:kind_of_functional_system_has_component_by_class rdfs:domain hqdm:kind_of_functional_system . -hqdm:kind_of_functional_system_has_component_by_class rdfs:range hqdm:kind_of_functional_system_component . -hqdm:kind_of_individual rdf:type rdfs:Class . -hqdm:kind_of_individual rdfs:subClassOf hqdm:class_of_individual . -hqdm:kind_of_intentionally_constructed_object rdf:type rdfs:Class . -hqdm:kind_of_intentionally_constructed_object rdfs:subClassOf hqdm:class_of_intentionally_constructed_object . -hqdm:kind_of_intentionally_constructed_object rdfs:subClassOf hqdm:kind_of_individual . -hqdm:kind_of_ordinary_biological_object rdfs:subClassOf hqdm:class_of_ordinary_biological_object . -hqdm:kind_of_ordinary_biological_object rdfs:subClassOf hqdm:kind_of_biological_object . -hqdm:kind_of_ordinary_biological_object rdfs:subClassOf hqdm:kind_of_ordinary_physical_object . -hqdm:kind_of_ordinary_functional_object rdf:type rdfs:Class . -hqdm:kind_of_ordinary_functional_object rdfs:subClassOf hqdm:class_of_ordinary_functional_object . -hqdm:kind_of_ordinary_functional_object rdfs:subClassOf hqdm:kind_of_functional_object . -hqdm:kind_of_ordinary_functional_object rdfs:subClassOf hqdm:kind_of_ordinary_physical_object . -hqdm:kind_of_ordinary_physical_object rdf:type rdfs:Class . -hqdm:kind_of_ordinary_physical_object rdfs:subClassOf hqdm:class_of_ordinary_physical_object . -hqdm:kind_of_ordinary_physical_object rdfs:subClassOf hqdm:kind_of_physical_object . -hqdm:kind_of_organization rdfs:subClassOf hqdm:class_of_organization . -hqdm:kind_of_organization rdfs:subClassOf hqdm:kind_of_party . -hqdm:kind_of_organization rdfs:subClassOf hqdm:kind_of_socially_constructed_object . -hqdm:kind_of_organization_component rdf:type rdfs:Class . -hqdm:kind_of_organization_component rdfs:subClassOf hqdm:class_of_organization_component . -hqdm:kind_of_organization_component rdfs:subClassOf hqdm:kind_of_socially_constructed_object . -hqdm:kind_of_organization_component rdfs:subClassOf hqdm:kind_of_system_component . -hqdm:kind_of_organization_component_by_class rdfs:domain hqdm:kind_of_organization . -hqdm:kind_of_organization_component_by_class rdfs:range hqdm:kind_of_organization_component . -hqdm:kind_of_party rdf:type rdfs:Class . -hqdm:kind_of_party rdfs:subClassOf hqdm:class_of_party . -hqdm:kind_of_party rdfs:subClassOf hqdm:kind_of_system . -hqdm:kind_of_person rdf:type rdfs:Class . -hqdm:kind_of_person rdfs:subClassOf hqdm:class_of_person . -hqdm:kind_of_person rdfs:subClassOf hqdm:kind_of_party . -hqdm:kind_of_physical_object rdf:type rdfs:Class . -hqdm:kind_of_physical_object rdfs:subClassOf hqdm:class_of_physical_object . -hqdm:kind_of_physical_object rdfs:subClassOf hqdm:kind_of_individual . -hqdm:kind_of_physical_property rdf:type rdfs:Class . -hqdm:kind_of_physical_property rdfs:subClassOf hqdm:class_of_physical_property . -hqdm:kind_of_physical_quantity rdf:type rdfs:Class . -hqdm:kind_of_physical_quantity rdfs:subClassOf hqdm:class_of_physical_quantity . -hqdm:kind_of_physical_quantity rdfs:subClassOf hqdm:kind_of_physical_property . -hqdm:kind_of_position rdf:type rdfs:Class . -hqdm:kind_of_position rdfs:subClassOf hqdm:class_of_position . -hqdm:kind_of_position rdfs:subClassOf hqdm:kind_of_organization_component . -hqdm:kind_of_relationship_with_restriction rdf:type rdfs:Class . -hqdm:kind_of_relationship_with_restriction rdfs:subClassOf hqdm:kind_of_relationship_with_signature . -hqdm:kind_of_relationship_with_restriction_required_role_player rdfs:domain hqdm:kind_of_relationship_with_restriction . -hqdm:kind_of_relationship_with_restriction_required_role_player rdfs:range hqdm:classification . -hqdm:kind_of_relationship_with_signature rdf:type rdfs:Class . -hqdm:kind_of_relationship_with_signature rdfs:subClassOf hqdm:class_of_relationship . -hqdm:kind_of_relationship_with_signature_roles rdfs:domain hqdm:kind_of_relationship_with_signature . -hqdm:kind_of_relationship_with_signature_roles rdfs:range hqdm:class . -hqdm:kind_of_socially_constructed_object rdf:type rdfs:Class . -hqdm:kind_of_socially_constructed_object rdfs:subClassOf hqdm:class_of_state_of_socially_constructed_object . -hqdm:kind_of_socially_constructed_object rdfs:subClassOf hqdm:kind_of_intentionally_constructed_object . -hqdm:kind_of_system rdf:type rdfs:Class . -hqdm:kind_of_system rdfs:subClassOf hqdm:class_of_system . -hqdm:kind_of_system rdfs:subClassOf hqdm:kind_of_ordinary_physical_object . -hqdm:kind_of_system_component rdf:type rdfs:Class . -hqdm:kind_of_system_component rdfs:subClassOf hqdm:class_of_system_component . -hqdm:kind_of_system_component rdfs:subClassOf hqdm:kind_of_physical_object . -hqdm:kind_of_system_has_component_by_class rdfs:domain hqdm:kind_of_system . -hqdm:kind_of_system_has_component_by_class rdfs:range hqdm:kind_of_system_component . -hqdm:language_community rdf:type rdfs:Class . -hqdm:language_community rdfs:subClassOf hqdm:organization . -hqdm:language_community rdfs:subClassOf hqdm:state_of_language_community . -hqdm:money_asset rdf:type rdfs:Class . -hqdm:money_asset rdfs:subClassOf hqdm:asset . -hqdm:money_asset rdfs:subClassOf hqdm:state_of_amount_of_money . -hqdm:offer rdf:type rdfs:Class . -hqdm:offer rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:offer_and_acceptance_for_goods rdf:type rdfs:Class . -hqdm:offer_and_acceptance_for_goods rdfs:subClassOf hqdm:agree_contract . -hqdm:offer_and_acceptance_for_goods_consists_of rdfs:domain hqdm:offer_and_acceptance_for_goods . -hqdm:offer_and_acceptance_for_goods_consists_of rdfs:range hqdm:part_of . -hqdm:offer_and_acceptance_for_goods_consists_of_ rdfs:domain hqdm:offer_and_acceptance_for_goods . -hqdm:offer_and_acceptance_for_goods_consists_of_ rdfs:range hqdm:part_of . -hqdm:offer_and_acceptance_for_goods_part_of rdfs:domain hqdm:offer_and_acceptance_for_goods . -hqdm:offer_and_acceptance_for_goods_part_of rdfs:range hqdm:sale_of_goods . -hqdm:offer_for_goods rdf:type rdfs:Class . -hqdm:offer_for_goods rdfs:subClassOf hqdm:offer . -hqdm:offer_for_goods_part_of rdfs:domain hqdm:offer_for_goods . -hqdm:offer_for_goods_part_of rdfs:range hqdm:offer_and_acceptance_for_goods . -hqdm:offer_for_goods_references rdfs:domain hqdm:offer_for_goods . -hqdm:offer_for_goods_references rdfs:range hqdm:exchange_of_goods_and_money . -hqdm:offer_member_of rdfs:domain hqdm:offer . -hqdm:offer_member_of rdfs:range hqdm:class_of_offer . -hqdm:offer_part_of rdfs:domain hqdm:offer . -hqdm:offer_part_of rdfs:range hqdm:agree_contract . -hqdm:offering rdf:type rdfs:Class . -hqdm:offering rdfs:subClassOf hqdm:class_of_offer . -hqdm:offering_class_of_offered rdfs:domain hqdm:offering . -hqdm:offering_class_of_offered rdfs:range hqdm:class_of_individual . -hqdm:offering_consideration_by_class rdfs:domain hqdm:offering . -hqdm:offering_consideration_by_class rdfs:range hqdm:price . -hqdm:offering_offeror rdfs:domain hqdm:offering . -hqdm:offering_offeror rdfs:range hqdm:party . -hqdm:offering_period_offered rdfs:domain hqdm:offering . -hqdm:offering_period_offered rdfs:range hqdm:period_of_time . -hqdm:ordinary_biological_object rdf:type rdfs:Class . -hqdm:ordinary_biological_object rdfs:subClassOf hqdm:biological_object . -hqdm:ordinary_biological_object rdfs:subClassOf hqdm:ordinary_physical_object . -hqdm:ordinary_biological_object rdfs:subClassOf hqdm:state_of_ordinary_biological_object . -hqdm:ordinary_biological_object_member_of rdfs:domain hqdm:ordinary_biological_object . -hqdm:ordinary_biological_object_member_of rdfs:range hqdm:class_of_ordinary_biological_object . -hqdm:ordinary_biological_object_member_of_kind rdfs:domain hqdm:ordinary_biological_object . -hqdm:ordinary_biological_object_member_of_kind rdfs:range hqdm:kind_of_ordinary_biological_object . -hqdm:ordinary_functional_object rdf:type rdfs:Class . -hqdm:ordinary_functional_object rdfs:subClassOf hqdm:functional_object . -hqdm:ordinary_functional_object rdfs:subClassOf hqdm:ordinary_physical_object . -hqdm:ordinary_functional_object rdfs:subClassOf hqdm:state_of_ordinary_functional_object . -hqdm:ordinary_functional_object_member_of rdfs:domain hqdm:ordinary_functional_object . -hqdm:ordinary_functional_object_member_of rdfs:range hqdm:class_of_ordinary_functional_object . -hqdm:ordinary_functional_object_member_of_kind rdfs:domain hqdm:ordinary_functional_object . -hqdm:ordinary_functional_object_member_of_kind rdfs:range hqdm:kind_of_ordinary_functional_object . -hqdm:ordinary_physical_object rdf:type rdfs:Class . -hqdm:ordinary_physical_object rdfs:subClassOf hqdm:physical_object . -hqdm:ordinary_physical_object rdfs:subClassOf hqdm:state_of_ordinary_physical_object . -hqdm:ordinary_physical_object_member_of rdfs:domain hqdm:ordinary_physical_object . -hqdm:ordinary_physical_object_member_of rdfs:range hqdm:class_of_ordinary_physical_object . -hqdm:ordinary_physical_object_member_of_kind rdfs:domain hqdm:ordinary_physical_object . -hqdm:ordinary_physical_object_member_of_kind rdfs:range hqdm:kind_of_ordinary_physical_object . -hqdm:organization rdf:type rdfs:Class . -hqdm:organization rdfs:subClassOf hqdm:party . -hqdm:organization rdfs:subClassOf hqdm:socially_constructed_object . -hqdm:organization rdfs:subClassOf hqdm:state_of_organization . -hqdm:organization_component rdf:type rdfs:Class . -hqdm:organization_component rdfs:subClassOf hqdm:socially_constructed_object . -hqdm:organization_component rdfs:subClassOf hqdm:state_of_organization_component . -hqdm:organization_component rdfs:subClassOf hqdm:system_component . -hqdm:organization_component_component_of rdfs:domain hqdm:organization_component . -hqdm:organization_component_component_of rdfs:range hqdm:organization . -hqdm:organization_component_member_of rdfs:domain hqdm:organization_component . -hqdm:organization_component_member_of rdfs:domain hqdm:class_of_organization_component . -hqdm:organization_component_member_of_kind rdfs:domain hqdm:organization_component . -hqdm:organization_component_member_of_kind rdfs:range hqdm:kind_of_organization_component . -hqdm:organization_member_of rdfs:domain hqdm:organization . -hqdm:organization_member_of rdfs:range hqdm:class_of_organization . -hqdm:organization_member_of_kind rdfs:domain hqdm:organization . -hqdm:organization_member_of_kind rdfs:range hqdm:kind_of_organization . -hqdm:owner rdf:type rdfs:Class . -hqdm:owner rdfs:subClassOf hqdm:participant . -hqdm:owner rdfs:subClassOf hqdm:state_of_party . -hqdm:owner_participant_in rdfs:domain hqdm:owner . -hqdm:owner_participant_in rdfs:range hqdm:ownership . -hqdm:ownership rdf:type rdfs:Class . -hqdm:ownership rdfs:subClassOf hqdm:association . -hqdm:ownership_consists_of_participant rdfs:domain hqdm:ownership . -hqdm:ownership_consists_of_participant rdfs:range hqdm:owner . -hqdm:ownership_consists_of_participant_ rdfs:domain hqdm:ownership . -hqdm:ownership_consists_of_participant_ rdfs:range hqdm:asset . -hqdm:ownership_ending rdfs:domain hqdm:ownership . -hqdm:ownership_ending rdfs:range hqdm:ending_of_ownership . -hqdm:ownership_beginning rdfs:domain hqdm:ownership . -hqdm:ownership_beginning rdfs:range hqdm:beginning_of_ownership . -hqdm:participant rdf:type rdfs:Class . -hqdm:participant rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:participant_member_of rdfs:domain hqdm:participant . -hqdm:participant_member_of rdfs:range hqdm:class_of_participant . -hqdm:participant_member_of_kind rdfs:domain hqdm:participant . -hqdm:participant_member_of_kind rdfs:range hqdm:role . -hqdm:participant_participant_in rdfs:domain hqdm:participant . -hqdm:participant_participant_in rdfs:range hqdm:participant_in_activity_or_association . -hqdm:participant_in_activity_or_association rdf:type rdfs:Class . -hqdm:participant_in_activity_or_association rdfs:subClassOf hqdm:activity . -hqdm:participant_in_activity_or_association rdfs:subClassOf hqdm:association . -hqdm:party rdf:type rdfs:Class . -hqdm:party rdfs:subClassOf hqdm:state_of_party . -hqdm:party rdfs:subClassOf hqdm:system . -hqdm:party_member_of rdfs:domain hqdm:party . -hqdm:party_member_of rdfs:range hqdm:class_of_party . -hqdm:party_member_of_kind rdfs:domain hqdm:party . -hqdm:party_member_of_kind rdfs:range hqdm:kind_of_party . -hqdm:pattern rdfs:subClassOf hqdm:class_of_sign . -hqdm:period_of_time rdf:type rdfs:Class . -hqdm:period_of_time rdfs:subClassOf hqdm:state . -hqdm:period_of_time_member_of rdfs:domain hqdm:period_of_time . -hqdm:period_of_time_member_of rdfs:range hqdm:class_of_period_of_time . -hqdm:period_of_time_temporal_part_of_ rdfs:domain hqdm:period_of_time . -hqdm:period_of_time_temporal_part_of_ rdfs:range hqdm:possible_world . -hqdm:person rdf:type rdfs:Class . -hqdm:person rdfs:subClassOf hqdm:biological_system . -hqdm:person rdfs:subClassOf hqdm:party . -hqdm:person rdfs:subClassOf hqdm:state_of_person . -hqdm:person_in_position rdf:type rdfs:Class . -hqdm:person_in_position rdfs:subClassOf hqdm:installed_object . -hqdm:person_in_position rdfs:subClassOf hqdm:state_of_person . -hqdm:person_in_position rdfs:subClassOf hqdm:state_of_position . -hqdm:person_in_position_member_of rdfs:domain hqdm:person_in_position . -hqdm:person_in_position_member_of rdfs:range hqdm:class_of_person_in_position . -hqdm:person_member_of rdfs:domain hqdm:person . -hqdm:person_member_of rdfs:range hqdm:class_of_person . -hqdm:person_member_of_kind rdfs:domain hqdm:person . -hqdm:person_member_of_kind rdfs:range hqdm:kind_of_person . -hqdm:physical_object rdf:type rdfs:Class . -hqdm:physical_object rdfs:subClassOf hqdm:individual . -hqdm:physical_object rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:physical_object_member_of rdfs:domain hqdm:physical_object . -hqdm:physical_object_member_of rdfs:range hqdm:class_of_physical_object . -hqdm:physical_object_member_of_kind rdfs:domain hqdm:physical_object . -hqdm:physical_object_member_of_kind rdfs:range hqdm:kind_of_physical_object . -hqdm:physical_property rdf:type rdfs:Class . -hqdm:physical_property rdfs:subClassOf hqdm:class_of_state . -hqdm:physical_property_member_of rdfs:domain hqdm:physical_property . -hqdm:physical_property_member_of rdfs:range hqdm:class_of_physical_property . -hqdm:physical_property_member_of_kind rdfs:domain hqdm:physical_property . -hqdm:physical_property_member_of_kind rdfs:range hqdm:kind_of_physical_property . -hqdm:physical_property_range rdf:type rdfs:Class . -hqdm:physical_property_range rdfs:subClassOf hqdm:class_of_state . -hqdm:physical_property_range_ranges_over rdfs:domain hqdm:physical_property_range . -hqdm:physical_property_range_ranges_over rdfs:range hqdm:physical_property . -hqdm:physical_quantity rdf:type rdfs:Class . -hqdm:physical_quantity rdfs:subClassOf hqdm:physical_property . -hqdm:physical_quantity_member_of rdfs:domain hqdm:physical_quantity . -hqdm:physical_quantity_member_of rdfs:range hqdm:class_of_physical_quantity . -hqdm:physical_quantity_member_of_kind rdfs:domain hqdm:physical_quantity . -hqdm:physical_quantity_member_of_kind rdfs:range hqdm:kind_of_physical_quantity . -hqdm:physical_quantity_range rdf:type rdfs:Class . -hqdm:physical_quantity_range rdfs:subClassOf hqdm:physical_property_range . -hqdm:physical_quantity_range_lower_bound rdfs:domain hqdm:physical_quantity_range . -hqdm:physical_quantity_range_lower_bound rdfs:range hqdm:physical_quantity . -hqdm:physical_quantity_range_upper_bound rdfs:domain hqdm:physical_quantity_range . -hqdm:physical_quantity_range_upper_bound rdfs:range hqdm:physical_quantity . -hqdm:plan rdf:type rdfs:Class . -hqdm:plan rdfs:subClassOf hqdm:possible_world . -hqdm:point_in_time rdf:type rdfs:Class . -hqdm:point_in_time rdfs:subClassOf hqdm:event . -hqdm:point_in_time_member_of rdfs:domain hqdm:point_in_time . -hqdm:point_in_time_member_of rdfs:range hqdm:class_of_point_in_time . -hqdm:position rdf:type rdfs:Class . -hqdm:position rdfs:subClassOf hqdm:organization_component . -hqdm:position rdfs:subClassOf hqdm:state_of_position . -hqdm:position_member_of rdfs:domain hqdm:position . -hqdm:position_member_of rdfs:range hqdm:class_of_position . -hqdm:position_member_of_kind rdfs:domain hqdm:position . -hqdm:position_member_of_kind rdfs:range hqdm:kind_of_position . -hqdm:possible_world rdf:type rdfs:Class . -hqdm:possible_world rdfs:subClassOf hqdm:individual . -hqdm:possible_world rdfs:subClassOf hqdm:period_of_time . -hqdm:possible_world_member_of rdfs:domain hqdm:possible_world . -hqdm:possible_world_member_of rdfs:range hqdm:class_of_possible_world . -hqdm:price rdf:type rdfs:Class . -hqdm:price rdfs:subClassOf hqdm:class_of_amount_of_money . -hqdm:product_brand rdf:type rdfs:Class . -hqdm:product_brand rdfs:subClassOf hqdm:class_of_sales_product_instance . -hqdm:product_offering rdf:type rdfs:Class . -hqdm:product_offering rdfs:subClassOf hqdm:offering . -hqdm:product_offering_class_of_offered rdfs:domain hqdm:product_offering . -hqdm:product_offering_class_of_offered rdfs:range hqdm:sales_product . -hqdm:reaching_agreement rdf:type rdfs:Class . -hqdm:reaching_agreement rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:reaching_agreement_member_of rdfs:domain hqdm:reaching_agreement . -hqdm:reaching_agreement_member_of rdfs:range hqdm:class_of_reaching_agreement . -hqdm:reaching_agreement_part_of rdfs:domain hqdm:reaching_agreement . -hqdm:reaching_agreement_part_of rdfs:range hqdm:agreement_process . -hqdm:recognizing_language_community rdf:type rdfs:Class . -hqdm:recognizing_language_community rdfs:subClassOf hqdm:participant . -hqdm:recognizing_language_community rdfs:subClassOf hqdm:state_of_language_community . -hqdm:recognizing_language_community_participant_in rdfs:domain hqdm:recognizing_language_community . -hqdm:recognizing_language_community_participant_in rdfs:range hqdm:representation_by_sign . -hqdm:relationship rdf:type rdfs:Class . -hqdm:relationship rdfs:subClassOf hqdm:abstract_object . -hqdm:relationship_member_of rdfs:domain hqdm:relationship . -hqdm:relationship_member_of rdfs:range hqdm:class_of_relationship . -hqdm:representation_by_pattern rdf:type rdfs:Class . -hqdm:representation_by_pattern rdfs:subClassOf hqdm:class_of_representation . -hqdm:representation_by_pattern_consists_of_by_class rdfs:domain hqdm:representation_by_pattern . -hqdm:representation_by_pattern_consists_of_by_class rdfs:range hqdm:pattern . -hqdm:representation_by_pattern_consists_of_in_members rdfs:domain hqdm:representation_by_pattern . -hqdm:representation_by_pattern_consists_of_in_members rdfs:range hqdm:recognizing_language_community . -hqdm:representation_by_pattern_represented rdfs:domain hqdm:representation_by_pattern . -hqdm:representation_by_pattern_represented rdfs:range hqdm:thing . -hqdm:representation_by_sign rdf:type rdfs:Class . -hqdm:representation_by_sign rdfs:subClassOf hqdm:association . -hqdm:representation_by_sign_consists_of rdfs:domain hqdm:representation_by_sign . -hqdm:representation_by_sign_consists_of rdfs:range hqdm:participant_in . -hqdm:representation_by_sign_consists_of_ rdfs:domain hqdm:representation_by_sign . -hqdm:representation_by_sign_consists_of_ rdfs:range hqdm:recognizing_language_community . -hqdm:representation_by_sign_member_of rdfs:domain hqdm:representation_by_sign . -hqdm:representation_by_sign_member_of rdfs:range hqdm:class_of_representation . -hqdm:representation_by_sign_member_of_ rdfs:domain hqdm:representation_by_sign . -hqdm:representation_by_sign_member_of_ rdfs:range hqdm:representation_by_pattern . -hqdm:representation_by_sign_represents rdfs:domain hqdm:representation_by_sign . -hqdm:representation_by_sign_represents rdfs:range hqdm:thing . -hqdm:requirement rdf:type rdfs:Class . -hqdm:requirement rdfs:subClassOf hqdm:spatio_temporal_extent . -hqdm:requirement_defined_by rdfs:domain hqdm:requirement . -hqdm:requirement_defined_by rdfs:range hqdm:requirement_specification . -hqdm:requirement_part_of_plan rdfs:domain hqdm:requirement . -hqdm:requirement_part_of_plan rdfs:range hqdm:plan . -hqdm:requirement_specification rdf:type rdfs:Class . -hqdm:requirement_specification rdfs:subClassOf hqdm:class_of_spatio_temporal_extent . -hqdm:requirement_specification_intersection_of rdfs:domain hqdm:requirement_specification . -hqdm:requirement_specification_intersection_of rdfs:range hqdm:class_of_state . -hqdm:role rdf:type rdfs:Class . -hqdm:role rdfs:subClassOf hqdm:class_of_participant . -hqdm:role_part_of_by_class rdfs:domain hqdm:role . -hqdm:role_part_of_by_class rdfs:range hqdm:kind_of_activity . -hqdm:role_part_of_by_class_ rdfs:domain hqdm:role . -hqdm:role_part_of_by_class_ rdfs:range hqdm:kind_of_association . -hqdm:sale_of_goods rdf:type rdfs:Class . -hqdm:sale_of_goods rdfs:subClassOf hqdm:contract_process . -hqdm:sale_of_goods_consists_of rdfs:domain hqdm:sale_of_goods . -hqdm:sale_of_goods_consists_of rdfs:range hqdm:part_of . -hqdm:sale_of_goods_consists_of_ rdfs:domain hqdm:sale_of_goods . -hqdm:sale_of_goods_consists_of_ rdfs:range hqdm:part_of . -hqdm:sales_product rdf:type rdfs:Class . -hqdm:sales_product rdfs:subClassOf hqdm:class_of_sales_product_instance . -hqdm:sales_product_instance rdf:type rdfs:Class . -hqdm:sales_product_instance rdfs:subClassOf hqdm:ordinary_functional_object . -hqdm:sales_product_instance rdfs:subClassOf hqdm:state_of_sales_product_instance . -hqdm:sales_product_instance_member_of rdfs:domain hqdm:sales_product_instance . -hqdm:sales_product_instance_member_of rdfs:range hqdm:class_of_sales_product_instance . -hqdm:sales_product_meets_specification rdfs:domain hqdm:sales_product . -hqdm:sales_product_meets_specification rdfs:range hqdm:requirement_specification . -hqdm:sales_product_sold_under rdfs:domain hqdm:sales_product . -hqdm:sales_product_sold_under rdfs:range hqdm:product_brand . -hqdm:sales_product_version rdfs:subClassOf hqdm:class_of_sales_product_instance . -hqdm:sales_product_version_sold_as rdfs:domain hqdm:sales_product_version . -hqdm:sales_product_version_sold_as rdfs:range hqdm:sales_product . -hqdm:sales_product_version_successor rdfs:domain hqdm:sales_product_version . -hqdm:sales_product_version_successor rdfs:range hqdm:sales_product_version . -hqdm:scale rdfs:subClassOf hqdm:function_ . -hqdm:scale_domain rdfs:domain hqdm:scale . -hqdm:scale_domain rdfs:range hqdm:kind_of_physical_quantity . -hqdm:scale_unit rdfs:domain hqdm:scale . -hqdm:scale_unit rdfs:range hqdm:unit_of_measure . -hqdm:sign rdfs:subClassOf hqdm:participant . -hqdm:sign rdfs:subClassOf hqdm:socially_constructed_object . -hqdm:sign rdfs:subClassOf hqdm:state_of_sign . -hqdm:sign_member_of rdfs:domain hqdm:sign . -hqdm:sign_member_of rdfs:range hqdm:class_of_sign . -hqdm:sign_member_of_ rdfs:domain hqdm:sign . -hqdm:sign_member_of_ rdfs:range hqdm:pattern . -hqdm:sign_participant_in rdfs:domain hqdm:sign . -hqdm:sign_participant_in rdfs:range hqdm:representation_by_sign . -hqdm:socially_constructed_activity rdf:type rdfs:Class . -hqdm:socially_constructed_activity rdfs:subClassOf hqdm:activity . -hqdm:socially_constructed_activity rdfs:subClassOf hqdm:socially_constructed_object . -hqdm:socially_constructed_activity_member_of rdfs:domain hqdm:socially_constructed_activity . -hqdm:socially_constructed_activity_member_of rdfs:range hqdm:class_of_socially_constructed_activity . -hqdm:socially_constructed_activity_part_of rdfs:domain hqdm:socially_constructed_activity . -hqdm:socially_constructed_activity_part_of rdfs:range hqdm:reaching_agreement . -hqdm:socially_constructed_activity_part_of_ rdfs:domain hqdm:socially_constructed_activity . -hqdm:socially_constructed_activity_part_of_ rdfs:range hqdm:agreement_execution . -hqdm:socially_constructed_object rdf:type rdfs:Class . -hqdm:socially_constructed_object rdfs:subClassOf hqdm:intentionally_constructed_object . -hqdm:socially_constructed_object rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:socially_constructed_object_member_of rdfs:domain hqdm:socially_constructed_object . -hqdm:socially_constructed_object_member_of rdfs:range hqdm:class_of_socially_constructed_object . -hqdm:socially_constructed_object_member_of_kind rdfs:domain hqdm:socially_constructed_object . -hqdm:socially_constructed_object_member_of_kind rdfs:range hqdm:kind_of_socially_constructed_object . -hqdm:spatio_temporal_extent rdf:type rdfs:Class . -hqdm:spatio_temporal_extent rdfs:subClassOf hqdm:thing . -hqdm:spatio_temporal_extent_aggregated_into rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_aggregated_into rdfs:range hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_beginning rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_beginning rdfs:range hqdm:event . -hqdm:spatio_temporal_extent_consists__of rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_consists__of rdfs:range hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_ending rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_ending rdfs:range hqdm:event . -hqdm:spatio_temporal_extent_member_of rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_member_of rdfs:range hqdm:class_of_spatio_temporal_extent . -hqdm:spatio_temporal_extent_part__of rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_part__of rdfs:range hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_part_of_possible_world rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_part_of_possible_world rdfs:range hqdm:possible_world . -hqdm:spatio_temporal_extent_temporal__part_of rdfs:domain hqdm:spatio_temporal_extent . -hqdm:spatio_temporal_extent_temporal__part_of rdfs:range hqdm:spatio_temporal_extent . -hqdm:specialization rdf:type rdfs:Class . -hqdm:specialization rdfs:subClassOf hqdm:relationship . -hqdm:specialization_subclass rdfs:domain hqdm:specialization . -hqdm:specialization_subclass rdfs:range hqdm:class . -hqdm:specialization_superclass rdfs:domain hqdm:specialization . -hqdm:specialization_superclass rdfs:range hqdm:class . -hqdm:state rdf:type rdfs:Class . -hqdm:state rdfs:subClassOf hqdm:spatio_temporal_extent . -hqdm:state_member_of rdfs:domain hqdm:state . -hqdm:state_member_of rdfs:range hqdm:class_of_state . -hqdm:state_of_activity rdf:type rdfs:Class . -hqdm:state_of_activity rdfs:subClassOf hqdm:state . -hqdm:state_of_activity_member_of rdfs:domain hqdm:state_of_activity . -hqdm:state_of_activity_member_of rdfs:range hqdm:class_of_state_of_activity . -hqdm:state_of_activity_temporal_part_of rdfs:domain hqdm:state_of_activity . -hqdm:state_of_activity_temporal_part_of rdfs:range hqdm:activity . -hqdm:state_of_amount_of_money rdf:type rdfs:Class . -hqdm:state_of_amount_of_money rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:state_of_amount_of_money rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:state_of_amount_of_money_member_of rdfs:domain hqdm:state_of_amount_of_money . -hqdm:state_of_amount_of_money_member_of rdfs:range hqdm:class_of_state_of_amount_of_money . -hqdm:state_of_amount_of_money_temporal_part_of rdfs:domain hqdm:state_of_amount_of_money . -hqdm:state_of_amount_of_money_temporal_part_of rdfs:range hqdm:amount_of_money . -hqdm:state_of_association rdf:type rdfs:Class . -hqdm:state_of_association rdfs:subClassOf hqdm:state . -hqdm:state_of_association_member_of rdfs:domain hqdm:state_of_association . -hqdm:state_of_association_member_of rdfs:range hqdm:class_of_state_of_association . -hqdm:state_of_association_temporal_part_of rdfs:domain hqdm:state_of_association . -hqdm:state_of_association_temporal_part_of rdfs:range hqdm:association . -hqdm:state_of_biological_object rdf:type rdfs:Class . -hqdm:state_of_biological_object rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:state_of_biological_object_member_of rdfs:domain hqdm:state_of_biological_object . -hqdm:state_of_biological_object_member_of rdfs:range hqdm:class_of_state_of_biological_object . -hqdm:state_of_biological_object_temporal_part_of rdfs:domain hqdm:state_of_biological_object . -hqdm:state_of_biological_object_temporal_part_of rdfs:range hqdm:biological_object . -hqdm:state_of_biological_system rdf:type rdfs:Class . -hqdm:state_of_biological_system rdfs:subClassOf hqdm:state_of_ordinary_biological_object . -hqdm:state_of_biological_system rdfs:subClassOf hqdm:state_of_system . -hqdm:state_of_biological_system_component rdf:type rdfs:Class . -hqdm:state_of_biological_system_component rdfs:subClassOf hqdm:state_of_biological_object . -hqdm:state_of_biological_system_component rdfs:subClassOf hqdm:state_of_system_component . -hqdm:state_of_biological_system_component_member_of rdfs:domain hqdm:state_of_biological_system_component . -hqdm:state_of_biological_system_component_member_of rdfs:range hqdm:class_of_state_of_biological_system_component . -hqdm:state_of_biological_system_component_temporal_part_of rdfs:domain hqdm:state_of_biological_system_component . -hqdm:state_of_biological_system_component_temporal_part_of rdfs:range hqdm:biological_system_component . -hqdm:state_of_biological_system_member_of rdfs:domain hqdm:state_of_biological_system . -hqdm:state_of_biological_system_member_of rdfs:range hqdm:class_of_state_of_biological_system . -hqdm:state_of_biological_system_temporal_part_of rdfs:domain hqdm:state_of_biological_system . -hqdm:state_of_biological_system_temporal_part_of rdfs:range hqdm:biological_system . -hqdm:state_of_functional_object rdf:type rdfs:Class . -hqdm:state_of_functional_object rdfs:subClassOf hqdm:state_of_intentionally_constructed_object . -hqdm:state_of_functional_object rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:state_of_functional_object_member_of rdfs:domain hqdm:state_of_functional_object . -hqdm:state_of_functional_object_member_of rdfs:range hqdm:class_of_state_of_functional_object . -hqdm:state_of_functional_object_temporal_part_of rdfs:domain hqdm:state_of_functional_object . -hqdm:state_of_functional_object_temporal_part_of rdfs:range hqdm:functional_object . -hqdm:state_of_functional_system rdf:type rdfs:Class . -hqdm:state_of_functional_system rdfs:subClassOf hqdm:state_of_ordinary_functional_object . -hqdm:state_of_functional_system rdfs:subClassOf hqdm:state_of_system . -hqdm:state_of_functional_system_component rdf:type rdfs:Class . -hqdm:state_of_functional_system_component rdfs:subClassOf hqdm:state_of_functional_object . -hqdm:state_of_functional_system_component rdfs:subClassOf hqdm:state_of_system_component . -hqdm:state_of_functional_system_component_member_of rdfs:domain hqdm:state_of_functional_system_component . -hqdm:state_of_functional_system_component_member_of rdfs:range hqdm:class_of_state_of_functional_system_component . -hqdm:state_of_functional_system_component_temporal_part_of rdfs:domain hqdm:state_of_functional_system_component . -hqdm:state_of_functional_system_component_temporal_part_of rdfs:range hqdm:functional_system_component . -hqdm:state_of_functional_system_member_of rdfs:domain hqdm:state_of_functional_system . -hqdm:state_of_functional_system_member_of rdfs:range hqdm:class_of_state_of_functional_system . -hqdm:state_of_functional_system_temporal_part_of rdfs:domain hqdm:state_of_functional_system . -hqdm:state_of_functional_system_temporal_part_of rdfs:range hqdm:functional_system . -hqdm:state_of_intentionally_constructed_object rdf:type rdfs:Class . -hqdm:state_of_intentionally_constructed_object rdfs:subClassOf hqdm:state . -hqdm:state_of_intentionally_constructed_object_member_of rdfs:domain hqdm:state_of_intentionally_constructed_object . -hqdm:state_of_intentionally_constructed_object_member_of rdfs:range hqdm:class_of_state_of_intentionally_constructed_object . -hqdm:state_of_intentionally_constructed_object_temporal_part_of rdfs:domain hqdm:state_of_intentionally_constructed_object . -hqdm:state_of_intentionally_constructed_object_temporal_part_of rdfs:range hqdm:intentionally_constructed_object . -hqdm:state_of_language_community rdf:type rdfs:Class . -hqdm:state_of_language_community rdfs:subClassOf hqdm:state_of_organization . -hqdm:state_of_language_community_temporal_part_of rdfs:domain hqdm:state_of_language_community . -hqdm:state_of_language_community_temporal_part_of rdfs:range hqdm:language_community . -hqdm:state_of_ordinary_biological_object rdf:type rdfs:Class . -hqdm:state_of_ordinary_biological_object rdfs:subClassOf hqdm:state_of_biological_object . -hqdm:state_of_ordinary_biological_object rdfs:subClassOf hqdm:state_of_ordinary_physical_object . -hqdm:state_of_ordinary_biological_object_member_of rdfs:domain hqdm:state_of_ordinary_biological_object . -hqdm:state_of_ordinary_biological_object_member_of rdfs:range hqdm:class_of_state_of_ordinary_biological_object . -hqdm:state_of_ordinary_biological_object_temporal_part_of rdfs:domain hqdm:state_of_ordinary_biological_object . -hqdm:state_of_ordinary_biological_object_temporal_part_of rdfs:range hqdm:ordinary_biological_object . -hqdm:state_of_ordinary_functional_object rdf:type rdfs:Class . -hqdm:state_of_ordinary_functional_object rdfs:subClassOf hqdm:state_of_functional_object . -hqdm:state_of_ordinary_functional_object rdfs:subClassOf hqdm:state_of_ordinary_physical_object . -hqdm:state_of_ordinary_functional_object_member_of rdfs:domain hqdm:state_of_ordinary_functional_object . -hqdm:state_of_ordinary_functional_object_member_of rdfs:range hqdm:class_of_state_of_ordinary_functional_object . -hqdm:state_of_ordinary_functional_object_temporal_part_of rdfs:domain hqdm:state_of_ordinary_functional_object . -hqdm:state_of_ordinary_functional_object_temporal_part_of rdfs:range hqdm:ordinary_functional_object . -hqdm:state_of_ordinary_physical_object rdf:type rdfs:Class . -hqdm:state_of_ordinary_physical_object rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:state_of_ordinary_physical_object_member_of rdfs:domain hqdm:state_of_ordinary_physical_object . -hqdm:state_of_ordinary_physical_object_member_of rdfs:range hqdm:class_of_state_of_ordinary_physical_object . -hqdm:state_of_ordinary_physical_object_temporal_part_of rdfs:domain hqdm:state_of_ordinary_physical_object . -hqdm:state_of_ordinary_physical_object_temporal_part_of rdfs:range hqdm:ordinary_physical_object . -hqdm:state_of_organization rdf:type rdfs:Class . -hqdm:state_of_organization rdfs:subClassOf hqdm:state_of_party . -hqdm:state_of_organization rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:state_of_organization_component rdf:type rdfs:Class . -hqdm:state_of_organization_component rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:state_of_organization_component rdfs:subClassOf hqdm:state_of_system_component . -hqdm:state_of_organization_component_member_of rdfs:domain hqdm:state_of_organization_component . -hqdm:state_of_organization_component_member_of rdfs:range hqdm:class_of_state_of_organization_component . -hqdm:state_of_organization_component_temporal_part_of rdfs:domain hqdm:state_of_organization_component . -hqdm:state_of_organization_component_temporal_part_of rdfs:range hqdm:organization_component . -hqdm:state_of_organization_member_of rdfs:domain hqdm:state_of_organization . -hqdm:state_of_organization_member_of rdfs:range hqdm:class_of_state_of_organization . -hqdm:state_of_organization_temporal_part_of rdfs:domain hqdm:state_of_organization . -hqdm:state_of_organization_temporal_part_of rdfs:range hqdm:organization . -hqdm:state_of_party rdf:type rdfs:Class . -hqdm:state_of_party rdfs:subClassOf hqdm:state_of_system . -hqdm:state_of_party_member_of rdfs:domain hqdm:state_of_party . -hqdm:state_of_party_member_of rdfs:range hqdm:class_of_state_of_party . -hqdm:state_of_party_temporal_part_of rdfs:domain hqdm:state_of_party . -hqdm:state_of_party_temporal_part_of rdfs:range hqdm:party . -hqdm:state_of_person rdf:type rdfs:Class . -hqdm:state_of_person rdfs:subClassOf hqdm:state_of_biological_system . -hqdm:state_of_person rdfs:subClassOf hqdm:state_of_party . -hqdm:state_of_person_member_of rdfs:domain hqdm:state_of_person . -hqdm:state_of_person_member_of rdfs:range hqdm:class_of_state_of_person . -hqdm:state_of_person_temporal_part_of rdfs:domain hqdm:state_of_person . -hqdm:state_of_person_temporal_part_of rdfs:range hqdm:person . -hqdm:state_of_physical_object rdf:type rdfs:Class . -hqdm:state_of_physical_object rdfs:subClassOf hqdm:state . -hqdm:state_of_physical_object_member_of rdfs:domain hqdm:state_of_physical_object . -hqdm:state_of_physical_object_member_of rdfs:range hqdm:class_of_state_of_physical_object . -hqdm:state_of_physical_object_temporal_part_of rdfs:domain hqdm:state_of_physical_object . -hqdm:state_of_physical_object_temporal_part_of rdfs:range hqdm:physical_object . -hqdm:state_of_position rdf:type rdfs:Class . -hqdm:state_of_position rdfs:subClassOf hqdm:state_of_organization_component . -hqdm:state_of_position_member_of rdfs:domain hqdm:state_of_position . -hqdm:state_of_position_member_of rdfs:range hqdm:class_of_state_of_position . -hqdm:state_of_position_temporal_part_of rdfs:domain hqdm:state_of_position . -hqdm:state_of_position_temporal_part_of rdfs:range hqdm:position . -hqdm:state_of_sales_product_instance rdf:type rdfs:Class . -hqdm:state_of_sales_product_instance rdfs:subClassOf hqdm:state_of_ordinary_functional_object . -hqdm:state_of_sales_product_instance_member_of rdfs:domain hqdm:state_of_sales_product_instance . -hqdm:state_of_sales_product_instance_member_of rdfs:range hqdm:class_of_state_of_sales_product_instance . -hqdm:state_of_sales_product_instance_temporal_part_of rdfs:domain hqdm:state_of_sales_product_instance . -hqdm:state_of_sales_product_instance_temporal_part_of rdfs:range hqdm:sales_product_instance . -hqdm:state_of_sign rdf:type rdfs:Class . -hqdm:state_of_sign rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:state_of_sign_member_of rdfs:domain hqdm:state_of_sign . -hqdm:state_of_sign_member_of rdfs:range hqdm:class_of_state_of_sign . -hqdm:state_of_sign_temporal_part_of rdfs:domain hqdm:state_of_sign . -hqdm:state_of_sign_temporal_part_of rdfs:range hqdm:sign . -hqdm:state_of_socially_constructed_activity rdf:type rdfs:Class . -hqdm:state_of_socially_constructed_activity rdfs:subClassOf hqdm:state_of_activity . -hqdm:state_of_socially_constructed_activity rdfs:subClassOf hqdm:state_of_socially_constructed_object . -hqdm:state_of_socially_constructed_object rdf:type rdfs:Class . -hqdm:state_of_socially_constructed_object rdfs:subClassOf hqdm:state_of_intentionally_constructed_object . -hqdm:state_of_socially_constructed_object_member_of rdfs:domain hqdm:state_of_socially_constructed_object . -hqdm:state_of_socially_constructed_object_member_of rdfs:range hqdm:class_of_state_of_socially_constructed_object . -hqdm:state_of_socially_constructed_object_temporal_part_of rdfs:domain hqdm:state_of_socially_constructed_object . -hqdm:state_of_socially_constructed_object_temporal_part_of rdfs:range hqdm:socially_constructed_object . -hqdm:state_of_system rdf:type rdfs:Class . -hqdm:state_of_system rdfs:subClassOf hqdm:state_of_ordinary_physical_object . -hqdm:state_of_system_component rdf:type rdfs:Class . -hqdm:state_of_system_component rdfs:subClassOf hqdm:state_of_physical_object . -hqdm:state_of_system_component_member_of rdfs:domain hqdm:state_of_system_component . -hqdm:state_of_system_component_member_of rdfs:range hqdm:class_of_state_of_system_component . -hqdm:state_of_system_component_temporal_part_of rdfs:domain hqdm:state_of_system_component . -hqdm:state_of_system_component_temporal_part_of rdfs:range hqdm:system_component . -hqdm:state_of_system_member_of rdfs:domain hqdm:state_of_system . -hqdm:state_of_system_member_of rdfs:range hqdm:class_of_state_of_system . -hqdm:state_of_system_temporal_part_of rdfs:domain hqdm:state_of_system . -hqdm:state_of_system_temporal_part_of rdfs:range hqdm:system . -hqdm:state_temporal_part_of rdfs:domain hqdm:state . -hqdm:state_temporal_part_of rdfs:range hqdm:individual . -hqdm:system rdf:type rdfs:Class . -hqdm:system rdfs:subClassOf hqdm:ordinary_physical_object . -hqdm:system rdfs:subClassOf hqdm:state_of_system . -hqdm:system_component rdf:type rdfs:Class . -hqdm:system_component rdfs:subClassOf hqdm:physical_object . -hqdm:system_component rdfs:subClassOf hqdm:state_of_system_component . -hqdm:system_component_component_of rdfs:domain hqdm:system_component . -hqdm:system_component_component_of rdfs:range hqdm:system . -hqdm:system_component_member_of rdfs:domain hqdm:system_component . -hqdm:system_component_member_of rdfs:range hqdm:class_of_system_component . -hqdm:system_member_of rdfs:domain hqdm:system . -hqdm:system_member_of rdfs:range hqdm:class_of_system . -hqdm:system_member_of_kind rdfs:domain hqdm:system . -hqdm:system_member_of_kind rdfs:range hqdm:kind_of_system . -hqdm:temporal_composition rdfs:subClassOf hqdm:composition . -hqdm:thing rdf:type rdfs:Class . -hqdm:thing_member__of rdfs:domain hqdm:thing . -hqdm:thing_member__of rdfs:range hqdm:class . -hqdm:transfer_of_ownership rdf:type rdfs:Class . -hqdm:transfer_of_ownership rdfs:subClassOf hqdm:socially_constructed_activity . -hqdm:transfer_of_ownership_causes_beginning rdfs:domain hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_causes_beginning rdfs:range hqdm:beginning_of_ownership . -hqdm:transfer_of_ownership_causes_ending rdfs:domain hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_causes_ending rdfs:range hqdm:ending_of_ownership . -hqdm:transfer_of_ownership_consists_of_participant rdfs:domain hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_consists_of_participant rdfs:range hqdm:participant_in . -hqdm:transfer_of_ownership_of_money rdf:type rdfs:Class . -hqdm:transfer_of_ownership_of_money rdfs:subClassOf hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_of_money_part_of rdfs:domain hqdm:transfer_of_ownership_of_money . -hqdm:transfer_of_ownership_of_money_part_of rdfs:range hqdm:exchange_of_goods_and_money . -hqdm:transfer_of_ownership_of_money_references rdfs:domain hqdm:transfer_of_ownership_of_money . -hqdm:transfer_of_ownership_of_money_references rdfs:range hqdm:money_asset . -hqdm:transfer_of_ownership_references rdfs:domain hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_references rdfs:range hqdm:asset . -hqdm:transfer_of_ownership_transfer_of_ownership_part_of rdfs:domain hqdm:transfer_of_ownership . -hqdm:transfer_of_ownership_transfer_of_ownership_part_of rdfs:range hqdm:exchange_of_goods_and_money . -hqdm:transferee rdfs:subClassOf hqdm:participant . -hqdm:transferee rdfs:subClassOf hqdm:state_of_party . -hqdm:transferee_participant_in rdfs:domain hqdm:transferee . -hqdm:transferee_participant_in rdfs:range hqdm:transfer_of_ownership . -hqdm:transferor rdf:type rdfs:Class . -hqdm:transferor rdfs:subClassOf hqdm:participant . -hqdm:transferor rdfs:subClassOf hqdm:state_of_party . -hqdm:transferor_participant_in rdfs:domain hqdm:transferor . -hqdm:transferor_participant_in rdfs:range hqdm:transfer_of_ownership . -hqdm:transferor_temporal_part_of rdfs:domain hqdm:transferor . -hqdm:transferor_temporal_part_of rdfs:range hqdm:owner . -hqdm:unit_of_measure rdf:type rdfs:Class . -hqdm:unit_of_measure rdfs:subClassOf hqdm:function_ . diff --git a/examples/src/test/resources/hqdm.ttl b/examples/src/test/resources/hqdm.ttl new file mode 100644 index 00000000..9aad1a75 --- /dev/null +++ b/examples/src/test/resources/hqdm.ttl @@ -0,0 +1,1958 @@ +@prefix dcterms: . +@prefix foaf: . +@prefix hqdm: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sdo: . +@prefix skos: . +@prefix vann: . +@prefix xsd: . + + a owl:Ontology ; + owl:versionIRI ; + dcterms:modified "2025-03-30"^^xsd:date ; + dcterms:creator "Dr Matthew West"@en ; + dcterms:contributor "jamrce, ClimbingAl, twalmsley, Fabalab, amrc-benmorrow"@en ; + rdfs:label "High-Quality Data Models (HQDM) Ontology"@en ; + owl:versionInfo "1.0.0"@en ; + rdfs:comment "The High-Quality Data Models (HQDM) Framework captured as a formal foundational ontology to ensure data consistency, interoperability, and quality across diverse domains."@en ; + vann:preferredNamespaceUri ; + vann:preferredNamespacePrefix "hqdm"@en ; + dcterms:license ; + dcterms:created "2010-12-30"^^xsd:date ; + skos:historyNote "The High Quality Data Models (HQDM) Framework is a 4-Dimensionalist top level ontology with extensional identity criteria that aims to support large scale data integration. As such it aims to ensure there is consistency among data created using the framework. It is based on work developing and using ISO 15926 and lessons learnt from BORO, which influenced ISO 19526."@en ; + sdo:codeRepository ; + sdo:dateModified "2025-03-30"^^xsd:date ; + sdo:license . + +################################################################# +# Object Properties +################################################################# + +#### Top Properties #### + +hqdm:universalRelationSet a rdf:Property ; + skos:prefLabel "universal relation set"@en ; + skos:definition "The Binary Relation Set that is super Binary Relation Set for all HQDM Relationship Types."@en ; + rdfs:domain hqdm:Thing ; + rdfs:range hqdm:Thing . + +hqdm:universalPartRelationSet a rdfs:Class ; + skos:prefLabel "universal part relation set"@en ; + skos:definition "The Binary Relation Set that is super Binary Relation Set for all HQDM Whole-Part Relationship Types."@en ; + rdfs:subClassOf rdf:Property . + +hqdm:aggregatedInto a rdf:Property ; + skos:prefLabel "aggregated into"@en ; + skos:definition "A relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) may be aggregated into one or more others."@en ; + hqdm:memberOf hqdm:universalPartRelationSet ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:SpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:universalRelationSet ; + skos:scopeNote "Within the HQDM EXPRESS model, this has the same meaning to the `Aggregation` entity type that is now depreciated."@en . + +hqdm:partOf a rdf:Property ; + skos:prefLabel "part of"@en ; + skos:definition "An `aggregated into` relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) may be [part of](#partOf) another and the [whole](#whole) has emergent properties and is more than just the sum of its parts."@en ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:SpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:aggregatedInto ; + skos:scopeNote "This is the inverse of [consists of](#consistsOf)."@en ; + skos:scopeNote "Within the HQDM EXPRESS model, this has the same meaning to the `Composition` entity type that is now depreciated."@en . + +hqdm:temporalPartOf a rdf:Property ; + skos:prefLabel "temporal part of"@en ; + skos:definition "A `part of` relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) may be a temporal part of one or more other [Spatio-Temporal Extent](#SpatioTemporalExtent)."@en ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:SpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:partOf ; + skos:scopeNote "Within the HQDM EXPRESS model, this has the same meaning as `Temporal Composition` entity type that is now depreciated."@en ; + skos:scopeNote "When used between a state_of_X and X, this relationship is optional because an [Individual](#Individual) is not necessarily a `temporal part of` another [Individual](#Individual)"@en . + +hqdm:universalOrderRelationSet a rdfs:Class ; + skos:prefLabel "universal order relation set"@en ; + skos:definition "The Binary Relation Set that is super Binary Relation Set for all HQDM Relationship Types to do with Order (before-after, left-right, etc)."@en ; # part of the sequencing of elements + rdfs:subClassOf rdf:Property . + +hqdm:beginning a rdf:Property ; + skos:prefLabel "beginning"@en ; + skos:definition "A `part of` relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) has exactly one [Event](#Event) that is its beginning."@en ; + hqdm:memberOf hqdm:universalOrderRelationSet ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:Event ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:ending a rdf:Property ; + skos:prefLabel "ending"@en ; + skos:definition "A `part of` relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) has exactly one [Event](#Event) that is its ending."@en ; + hqdm:memberOf hqdm:universalOrderRelationSet ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:Event ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:hasSupertype a rdf:Property ; + skos:prefLabel "has supertype"@en ; + skos:definition "A Relationship where one [Thing](#Thing) is the more general category of [Thing](#Thing))."@en ; + rdfs:domain hqdm:Thing ; + rdfs:range hqdm:Thing ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:hasSuperclass a rdf:Property ; + skos:prefLabel "has superclass"@en ; + skos:definition "A Relationship where each [member of](#memberOf) the [Class](#Class) is a [member of](#memberOf) the superclass. [has superclass](#hasSuperclass) is a specialization of [has supertype](#hasSupertype)"@en ; + rdfs:domain hqdm:Class ; + rdfs:range hqdm:Class ; + rdfs:subPropertyOf hqdm:hasSupertype ; + rdfs:seeAlso rdfs:subClassOf . + +rdfs:subPropertyOf rdfs:subPropertyOf hqdm:hasSupertype . + +hqdm:universalSetRelationSet a rdfs:Class ; + skos:prefLabel "universal set relation set"@en ; + skos:definition "The Binary Relation Set that is super Binary Relation Set for all HQDM Set Relationship Types (Sets in HQDM are [Class](#Class) and all of its subclasses)."@en ; + rdfs:subClassOf rdf:Property . + +hqdm:memberOf a rdf:Property ; + skos:prefLabel "member of"@en ; + skos:definition "A relationship type where a [Thing](#Thing) may be a [member of](#memberOf) one or more [Class](#Class)."@en ; + hqdm:memberOf hqdm:universalSetRelationSet ; + rdfs:domain hqdm:Thing ; + rdfs:range hqdm:Class ; + rdfs:subPropertyOf hqdm:universalRelationSet ; + skos:scopeNote "This relationship is the same as the entity type [Classification](#Classification)."@en . + +hqdm:memberOfKind a rdf:Property ; + skos:prefLabel "member of kind"@en ; + skos:definition "A [member of](#memberOf) relationship type where an [Individual] may be a [member of](#memberOf) one or more [Kind Of Individual](#KindOfIndividual)."@en ; + rdfs:domain hqdm:Individual ; + rdfs:range hqdm:KindOfIndividual ; + rdfs:subPropertyOf hqdm:memberOf . + +hqdm:universalEmergentRelationSet a rdfs:Class ; + skos:prefLabel "universal emergent relation set"@en ; + skos:definition "The Binary Relation Set that is super Binary Relation Set for all HQDM Emergent Relationship Types. Emergent relationships are those that are not fundamental to material existence. An example is [represents](#represents)."@en ; + rdfs:subClassOf rdf:Property . + +#### Core Properties #### + +hqdm:causes a rdf:Property ; + skos:prefLabel "causes"@en ; + skos:definition "A relationship type where each [Activity](#Activity) is the cause of one or more [Event](#Event)."@en ; + hqdm:memberOf hqdm:universalOrderRelationSet ; + rdfs:domain hqdm:Activity ; + rdfs:range hqdm:Event ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:causesBeginning a rdf:Property ; + skos:prefLabel "causes beginning"@en ; + skos:definition "A causes relationship type where a [Transfer Of Ownership](#TransferOfOwnership) causes exactly one [Beginning Of Ownership](#BeginningOfOwnership)."@en ; + rdfs:domain hqdm:TransferOfOwnership ; + rdfs:range hqdm:BeginningOfOwnership ; + rdfs:subPropertyOf hqdm:causes . + +hqdm:causesByClass a rdf:Property ; + skos:prefLabel "causes by class"@en ; + skos:definition "A relationship type where a [member of](#memberOf) the [Kind Of Activity](#KindOfActivity) causes a [member of](#memberOf) the [Class Of Event](#ClassOfEvent)."@en ; + hqdm:memberOf hqdm:universalOrderRelationSet ; + rdfs:domain hqdm:KindOfActivity ; + rdfs:range hqdm:ClassOfEvent ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:causesEnding a rdf:Property ; + skos:prefLabel "causes ending"@en ; + skos:definition "A causes relationship type where a [Transfer Of Ownership](#TransferOfOwnership) causes exactly one [EndingOfOwnership](#EndingOfOwnership)."@en ; + rdfs:domain hqdm:TransferOfOwnership ; + rdfs:range hqdm:EndingOfOwnership ; + rdfs:subPropertyOf hqdm:causes . + +hqdm:consistsOf a rdf:Property ; + skos:prefLabel "consists of"@en ; + skos:definition "An `aggregated into` relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) includes a [part of](#partOf) another, with the [whole](#whole) having emergent properties that is more than just the sum of its parts."@en ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:SpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:aggregatedInto ; + skos:scopeNote "This is the inverse of [part of](#partOf)."@en . + +hqdm:classOfOffered a rdf:Property ; + skos:prefLabel "class of offered"@en ; + skos:definition "A relationship type where an [Offering](#Offering) has exactly one [ClassOfIndividual](#ClassOfIndividual) some `member of` which is offered."@en ; + rdfs:domain hqdm:Offering ; + rdfs:range hqdm:ClassOfIndividual ; + rdfs:subPropertyOf hqdm:referencesByClass . + +hqdm:componentByClass a rdf:Property ; + skos:prefLabel "component by class"@en ; + skos:definition "A [consists of by class](#consistsOfByClass) relationship type where each [member of](#memberOf) a [Kind Of System](#KindOfSystem) has a [member of](#memberOf) one or more [Kind Of System Component](#KindOfSystemComponent) as a component."@en ; + rdfs:domain hqdm:KindOfOrganization ; + rdfs:range hqdm:KindOfOrganizationComponent ; + rdfs:subPropertyOf hqdm:hasComponentByClass . + +hqdm:componentOf a rdf:Property ; + skos:prefLabel "component of"@en ; + skos:definition "A [part of](#partOf) relationship type where each [System Component](#SystemComponent) is [part of](#partOf) exactly one [System](#System)."@en ; + rdfs:domain hqdm:SystemComponent ; + rdfs:range hqdm:System ; + rdfs:subPropertyOf hqdm:partOf . + +hqdm:considerationByClass a rdf:Property ; + skos:prefLabel "consideration by class"@en ; + skos:definition "A relationship type where an [Offering](#Offering) has exactly one [Price](#Price) at which the [Offering](#Offering) is made."@en ; + rdfs:domain hqdm:Offering ; + rdfs:range hqdm:Price ; + rdfs:subPropertyOf hqdm:referencesByClass . + +hqdm:consistsOfInMembers a rdf:Property ; + skos:prefLabel "consists of in members"@en ; + skos:definition "A relationship type where a [Recognizing Language Community](#RecognizingLanguageCommunity) is a [participant in](#participantIn) each [member of](#memberOf) one or more [Representation By Pattern](#RepresentationByPattern)."@en ; + rdfs:domain hqdm:RepresentationByPattern ; + rdfs:range hqdm:RecognizingLanguageCommunity ; + rdfs:subPropertyOf hqdm:referencesByClass . + +hqdm:consistsOfParticipant a rdf:Property ; + skos:prefLabel "consists of participant"@en ; + skos:definition "A `consists of` relationship type where each association consists of two or more participants."@en ; + rdfs:domain hqdm:Activity, + hqdm:Association ; + rdfs:range hqdm:Participant ; + rdfs:subPropertyOf hqdm:consistsOf . + +hqdm:definedBy a rdf:Property ; + skos:prefLabel "defined by"@en ; + skos:definition "A [member of](#memberOf) relationship type where a [Requirement](#Requirement) is definedBy exactly one [Requirement Specification](#RequirementSpecification)."@en ; + rdfs:domain hqdm:Requirement ; + rdfs:range hqdm:RequirementSpecification ; + rdfs:subPropertyOf hqdm:memberOf . + +hqdm:determines a rdf:Property ; + skos:prefLabel "determines"@en ; + skos:definition "A relationship type where an [Activity](#Activity) may determine one or more [Thing](#Thing) to be the case."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:Activity ; + rdfs:range hqdm:Thing ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:determinesByClass a rdf:Property ; + skos:prefLabel "determines by class"@en ; + skos:definition "A relationship type where a [member of](#memberOf) the [Kind Of Activity](#KindOfActivity) determines a [member of](#memberOf) the [Class](#Class)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:KindOfActivity ; + rdfs:range hqdm:Class ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:domain a rdf:Property ; + skos:prefLabel "domain"@en ; + skos:definition "A [Scale](#Scale) has exactly one [Kind Of Physical Quantity](#KindOfPhysicalQuantity) as its domain."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:Scale ; + rdfs:range hqdm:KindOfPhysicalQuantity ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:hasComponentByClass a rdf:Property ; + skos:prefLabel "has component by class"@en ; + skos:definition "A [consists of by class](#consistsOfByClass) relationship type where each [member of](#memberOf) a [Kind Of System](#KindOfSystem) has a [member of](#memberOf) one or more [Kind Of System Component](#KindOfSystemComponent) as a component."@en ; + rdfs:domain hqdm:KindOfSystem ; + rdfs:range hqdm:KindOfSystemComponent ; + rdfs:subPropertyOf hqdm:consistsOfByClass . + +hqdm:intendedRole a rdf:Property ; + skos:prefLabel "intended role"@en ; + skos:definition "A relationship type where a [FunctionalObject](#FunctionalObject) has one or more intended [Role](#Role)(s)."@en ; + rdfs:domain hqdm:FunctionalObject ; + rdfs:range hqdm:Role ; + rdfs:subPropertyOf hqdm:memberOfKind . + +hqdm:intendedRoleByClass a rdf:Property ; + skos:prefLabel "intended role by class"@en ; + skos:definition "A relationship type where each [member of](#memberOf) a [Kind Of Functional Object](#KindOfFunctionalObject) is intended to play one or more [Role](#Role)(s)."@en ; + hqdm:memberOf hqdm:universalSetRelationSet ; + rdfs:domain hqdm:KindOfFunctionalObject ; + rdfs:range hqdm:Role ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:intersectionOf a rdf:Property ; + skos:prefLabel "intersection of"@en ; + skos:definition "A [has superclass](#hasSuperclass) relationship type where each [Requirement Specification](#RequirementSpecification) is the `intersection of` one or more [Class Of State](#ClassOfState)."@en ; + rdfs:domain hqdm:RequirementSpecification ; + rdfs:range hqdm:ClassOfState ; + rdfs:subPropertyOf hqdm:hasSuperclass ; + skos:scopeNote "The [Requirement Specification](#RequirementSpecification) is a subtype of each of the related [Class Of State](#ClassOfState)."@en . + +hqdm:lowerBound a rdf:Property ; + skos:prefLabel "lower bound"@en ; + skos:definition "A `supertype of` relationship type where each [PhysicalQuantityRange](#PhysicalQuantityRange) must have as Lower Bound exactly one [PhysicalQuantity](#PhysicalQuantity)."@en ; + rdfs:domain hqdm:PhysicalQuantity ; + rdfs:range hqdm:PhysicalQuantityRange ; + rdfs:subPropertyOf hqdm:rangesOver . + +hqdm:meetsSpecification a rdf:Property ; + skos:prefLabel "meets specification"@en ; + skos:definition "A `subclass of` relationship type where when a [Sales Product](#SalesProduct) `meets specification` of a [Requirement Specification](#RequirementSpecification), each [member of](#memberOf) a [Sales Product](#salesProduct) is a [member of](#memberOf) the [Requirement Specification](#RequirementSpecification)."@en ; + rdfs:domain hqdm:SalesProduct ; + rdfs:range hqdm:RequirementSpecification ; + rdfs:subPropertyOf hqdm:hasSuperclass . + +hqdm:memberOfCurrency a rdf:Property ; + skos:prefLabel "member of currency"@en ; + skos:definition "A [member of](#memberOf) relationship type where an [Amount Of Money](#AmountOfMoney) may be a [member of](#memberOf) exactly one [Currency](#Currency)."@en ; + rdfs:domain hqdm:AmountOfMoney ; + rdfs:range hqdm:Currency ; + rdfs:subPropertyOf hqdm:memberOf . + +hqdm:naturalRole a rdf:Property ; + skos:prefLabel "natural role"@en ; + skos:definition "A [member of](#memberOf) relationship type where a [BiologicalSystem](#BiologicalSystem) has a natural role that it plays."@en ; + rdfs:domain hqdm:BiologicalSystem ; + rdfs:range hqdm:Role ; + rdfs:subPropertyOf hqdm:memberOfKind ; + skos:example "My circulatory system has the natural role of circulating blood around the body."@en . + +hqdm:naturalRoleByClass a rdf:Property ; + skos:prefLabel "natural role by class"@en ; + skos:definition "A relationship type where each [member of](#memberOf) the [KindOfBiologicalSystem](#KindOfBiologicalSystem) naturally participates in the [Role](#Role)."@en ; + hqdm:memberOf hqdm:universalSetRelationSet ; + rdfs:domain hqdm:KindOfBiologicalSystem ; + rdfs:range hqdm:Role ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:offeror a rdf:Property ; + skos:prefLabel "offeror"@en ; + skos:definition "A relationship type where an [Offering](#Offering) has exactly one [Party](#Party) who makes the [Offering](#Offering)."@en ; + rdfs:domain hqdm:Offering ; + rdfs:range hqdm:Party ; + rdfs:subPropertyOf hqdm:referencesByClass . + +hqdm:partOfByClass a rdf:Property ; + skos:prefLabel "part of by class"@en ; + skos:definition "A relationship type where a [member of](#memberOf) a [Class Of Spatio-Temporal Extent](#ClassOfSpatioTemporalExtent) is [part of](#partOf) a [member of](#memberOf) some [Class Of Spatio-Temporal Extent](#ClassOfSpatioTemporalExtent)."@en ; + hqdm:memberOf hqdm:universalPartRelationSet ; + rdfs:domain hqdm:ClassOfSpatioTemporalExtent ; + rdfs:range hqdm:ClassOfSpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:universalRelationSet ; + skos:scopeNote "Typical examples further down the structure are between [Kind Of Individual](#KindOfIndividual) and an expected [Role](#Role)."@en . + +hqdm:partOfPlan a rdf:Property ; + skos:prefLabel "part of plan"@en ; + skos:definition "A [part of](#partOf) relationship type where a [Requirement](#Requirement) must be [part of](#partOf) one or more [Plan](#Plan)."@en ; + rdfs:domain hqdm:Requirement ; + rdfs:range hqdm:Plan ; + rdfs:subPropertyOf hqdm:partOfPossibleWorld . + +hqdm:partOfPossibleWorld a rdf:Property ; + skos:prefLabel "part of possible world"@en ; + skos:definition "A [aggregated into](#aggregatedInto) relationship type where a [Spatio-Temporal Extent](#SpatioTemporalExtent) may be part of one or more [Possible World](#PossibleWorld)."@en ; + rdfs:domain hqdm:SpatioTemporalExtent ; + rdfs:range hqdm:PossibleWorld ; + rdfs:subPropertyOf hqdm:aggregatedInto ; + skos:scopeNote "The relationship is optional because a [Possible World](#PossibleWorld) is not part of any other [Spatio-Temporal Extent](#SpatioTemporalExtent)."@en . + +hqdm:participantIn a rdf:Property ; + skos:prefLabel "participant in"@en ; + skos:definition "A relationship type where a [State](#State) is participating in an [Activity](#Activity) or [Association](#Association)."@en ; + rdfs:domain hqdm:Participant ; + rdfs:range hqdm:Activity, + hqdm:Association ; + rdfs:subPropertyOf hqdm:partOf . + +hqdm:periodOffered a rdf:Property ; + skos:prefLabel "period offered"@en ; + skos:definition "A relationship that is exactly one [Period Of Time](#PeriodOfTime) for which the [Offering](#Offering) is valid."@en ; + rdfs:domain hqdm:Offering ; + rdfs:range hqdm:PeriodOfTime ; + rdfs:subPropertyOf hqdm:referencesByClass . + +hqdm:rangesOver a rdf:Property ; + skos:prefLabel "ranges over"@en ; + skos:definition "A supertype_of relationship type where the members of each [Physical Property](#PhysicalProperty) in the [Physical Property Range](#PhysicalPropertyRange) are members of the [Physical Property Range](#PhysicalPropertyRange)."@en ; + rdfs:domain hqdm:PhysicalProperty ; + rdfs:range hqdm:PhysicalPropertyRange ; + rdfs:subPropertyOf hqdm:hasSuperclass . + +hqdm:references a rdf:Property ; + skos:prefLabel "references"@en ; + skos:definition "A relationship type where an [Activity](#Activity) may reference one or more [Thing](#Thing)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:Activity ; + rdfs:range hqdm:Thing ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:referencesByClass a rdf:Property ; + skos:prefLabel "references by class"@en ; + skos:definition "A relationship type where a [member of](#memberOf) the [Kind Of Activity](#KindOfActivity) references a [member of](#memberOf) the [Class](#Class)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:KindOfActivity ; + rdfs:range hqdm:Class ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:represented a rdf:Property ; + skos:prefLabel "represented"@en ; + skos:definition "A relationship type where the [Thing](#Thing) is represented by each [member of](#memberOf) the [Representation By Pattern](#RepresentationByPattern)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:RepresentationByPattern ; + rdfs:range hqdm:Thing ; + rdfs:subPropertyOf hqdm:universalRelationSet ; + skos:scopeNote "When used with [IdentificationOfPhysicalQuantity](#IdentificationOfPhysicalQuantity), represents by class means that each [member of](#memberOf) an [IdentificationOfPhysicalQuantity](#IdentificationOfPhysicalQuantity) represents the [Physical Quantity](#PhysicalQuantity). For example any writing down of 20C represents that particular degree of hotness."@en . + +hqdm:represents a rdf:Property ; + skos:prefLabel "represents"@en ; + skos:definition "A relationship type where a [Representation By Sign](#RepresentationBySign) represents one or more [Thing](#Thing)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:RepresentationBySign ; + rdfs:range hqdm:Thing ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:soldAs a rdf:Property ; + skos:prefLabel "sold as"@en ; + skos:definition "A [has superclass](#hasSuperclass) where the [Sales Product Version](#SalesProductVersion) may be sold as a [Sales Product](#SalesProduct)."@en ; + rdfs:domain hqdm:SalesProductVersion ; + rdfs:range hqdm:SalesProduct ; + rdfs:subPropertyOf hqdm:hasSuperclass . + +hqdm:soldUnder a rdf:Property ; + skos:prefLabel "sold under"@en ; + skos:definition "A [has superclass](#hasSuperclass) where the [Sales Product](#SalesProduct) is sold under a [Product Brand](#ProductBrand)."@en ; + rdfs:domain hqdm:SalesProduct ; + rdfs:range hqdm:ProductBrand ; + rdfs:subPropertyOf hqdm:hasSuperclass . + +hqdm:successor a rdf:Property ; + skos:prefLabel "successor"@en ; + skos:definition "A relationship type where a [Sales Product Version](#SalesProductVersion) may have exactly one successor."@en ; + hqdm:memberOf hqdm:universalOrderRelationSet ; + rdfs:domain hqdm:SalesProductVersion ; + rdfs:range hqdm:SalesProductVersion ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:unit a rdf:Property ; + skos:prefLabel "unit"@en ; + skos:definition "A [Scale](#Scale) may have at most one [UnitOfMeasure](#UnitOfMeasure)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:Scale ; + rdfs:range hqdm:UnitOfMeasure ; + rdfs:subPropertyOf hqdm:universalRelationSet ; + skos:scopeNote "A [Scale](#Scale) may not have a [Unit Of Measure](#UnitOfMeasure). To have a [Unit Of Measure](#UnitOfMeasure) the points on the [Scale](#Scale) must be evenly placed so that adding one means the same thing. This is not true for some scales such as Rockwell Hardness where the points on the scale are an arbitrary distance apart. A [Scale](#Scale) will also not have a [Unit Of Measure](#UnitOfMeasure) when it is a dimensionless scale."@en, + "A [Unit Of Measure](#UnitOfMeasure) may apply to more than one [Scale](#Scale)."@en . + +hqdm:upperBound a rdf:Property ; + skos:prefLabel "upper bound"@en ; + skos:definition "A `supertype of` relationship type where each [PhysicalQuantityRange](#PhysicalQuantityRange) must have as UpperBound exactly one [PhysicalQuantity](#PhysicalQuantity)."@en ; + rdfs:domain hqdm:PhysicalQuantity ; + rdfs:range hqdm:PhysicalQuantityRange ; + rdfs:subPropertyOf hqdm:rangesOver . + +hqdm:uses a rdf:Property ; + skos:prefLabel "uses"@en ; + skos:definition "A relationship type where an [IdentificationOfPhysicalQuantity](#IdentificationOfPhysicalQuantity) uses exactly one [Scale](#Scale)."@en ; + hqdm:memberOf hqdm:universalEmergentRelationSet ; + rdfs:domain hqdm:IdentificationOfPhysicalQuantity ; + rdfs:range hqdm:Scale ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +hqdm:value a rdf:Property ; + skos:prefLabel "value"@en ; + skos:definition "A relationship type where an [IdentificationOfPhysicalQuantity](#IdentificationOfPhysicalQuantity) consists of exactly one decimal as its value."@en ; + rdfs:domain hqdm:IdentificationOfPhysicalQuantity ; + rdfs:range xsd:decimal ; + rdfs:subPropertyOf hqdm:consistsOfByClass ; + skos:scopeNote "The members of this data type `xsd:decimal` is an identification of a value from the real world, not just a particular double when implemented as a data model. E.g. The Planck constant to 300 significant figures can't be captured by just a double."@en . + +hqdm:consistsOfByClass a rdf:Property ; + skos:prefLabel "consists of by class"@en ; + skos:definition "An inverse [part of by class](#partOfByClass) relationship type where a [member of](#memberOf) one [Class Of Spatio-Temporal Extent](#ClassOfSpatioTemporalExtent) [consists of](#consistsOf) another [member of](#memberOf) a [Class Of Spatio-Temporal Extent](#ClassOfSpatioTemporalExtent)."@en ; + hqdm:memberOf hqdm:universalPartRelationSet ; + rdfs:domain hqdm:ClassOfSpatioTemporalExtent ; + rdfs:range hqdm:ClassOfSpatioTemporalExtent ; + rdfs:subPropertyOf hqdm:universalRelationSet . + +################################################################# +# Classes +################################################################# + +hqdm:AbstractObject a rdfs:Class ; + skos:prefLabel "Abstract Object"@en ; + skos:definition "A [Thing](#Thing) that does not exist in space or time."@en ; + rdfs:subClassOf hqdm:Thing ; + foaf:image . + +hqdm:AcceptanceOfOffer a rdfs:Class ; + skos:prefLabel "Acceptance of Offer"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) that is the acceptance of an offer as `part of` an [AgreeContract](#AgreeContract)."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:AcceptanceOfOfferForGoods a rdfs:Class ; + skos:prefLabel "Acceptance of Offer for Goods"@en ; + skos:definition "A [ReachingAgreement](#ReachingAgreement) that consists of an [Offer](#Offer) of something in exchange for some consideration, and an [AcceptanceOfOffer](#AcceptanceOfOffer)."@en ; + rdfs:subClassOf hqdm:AcceptanceOfOffer ; + foaf:image . + +hqdm:Activity a rdfs:Class ; + skos:prefLabel "Activity"@en ; + skos:definition "An [Individual](#Individual) that consists of its participants and causes some [Event](#Event)."@en ; + rdfs:subClassOf hqdm:Individual, + hqdm:StateOfActivity ; + foaf:image . + +hqdm:AgreeContract a rdfs:Class ; + skos:prefLabel "Agree Contract"@en ; + skos:definition "A [ReachingAgreement](#ReachingAgreement) that consists of an [Offer](#Offer) of something in exchange for some consideration, and an [AcceptanceOfOffer](#AcceptanceOfOffer)."@en ; + rdfs:subClassOf hqdm:ReachingAgreement ; + foaf:image . + +hqdm:AgreementExecution a rdfs:Class ; + skos:prefLabel "Agreement Execution"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) where two or more parties carry out a course of action previously agreed upon."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:AgreementProcess a rdfs:Class ; + skos:prefLabel "Agreement Process"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) that consists of a [ReachingAgreement](#ReachingAgreement) and an [AgreementExecution](#AgreementExecution), where the [AgreementExecution](#AgreementExecution) is the course of action agreed to in the [ReachingAgreement](#ReachingAgreement)."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:AmountOfMoney a rdfs:Class ; + skos:prefLabel "Amount of Money"@en ; + skos:definition "A [StateOfAmountOfMoney](#StateOfAmountOfMoney), that is also a [SociallyConstructedObject](#SociallyConstructedObject), and a [PhysicalObject](#PhysicalObject) that is intended and accepted for use as a means of exchange."@en ; + rdfs:subClassOf hqdm:PhysicalObject, + hqdm:SociallyConstructedObject, + hqdm:StateOfAmountOfMoney ; + foaf:image . + +hqdm:Asset a rdfs:Class ; + skos:prefLabel "Asset"@en ; + skos:definition "A [StateOfPhysicalObject](#StateOfPhysicalObject) that is also a [Participant](#Participant) that is the [participant in](#participantIn) an [Ownership](#Ownership) that is owned."@en ; + rdfs:subClassOf hqdm:Participant ; + foaf:image . + +hqdm:Association a rdfs:Class ; + skos:prefLabel "Association"@en ; + skos:definition "An [Individual](#Individual) that [consists of](#consistsOf) the participants that are associated, and where the participants are `part of` the same [PeriodOfTime](#PeriodOfTime)."@en ; + rdfs:subClassOf hqdm:Individual, + hqdm:StateOfAssociation ; + foaf:image . + +hqdm:BeginningOfOwnership a rdfs:Class ; + skos:prefLabel "Beginning of Ownership"@en ; + skos:definition "An [Event](#Event) that is the beginning of an ownership association."@en ; + rdfs:subClassOf hqdm:Event ; + foaf:image . + +hqdm:BiologicalObject a rdfs:Class ; + skos:prefLabel "Biological Object"@en ; + skos:definition "A [StateOfBiologicalObject](#StateOfBiologicalObject) that is also a [PhysicalObject](#PhysicalObject) that sustains itself and reproduces."@en ; + rdfs:subClassOf hqdm:PhysicalObject, + hqdm:StateOfBiologicalObject ; + foaf:image . + +hqdm:BiologicalSystem a rdfs:Class ; + skos:prefLabel "Biological System"@en ; + skos:definition "Any system that is also an [OrdinaryBiologicalObject](#OrdinaryBiologicalObject) and a [StateOfBiologicalSystem](#StateOfBiologicalSystem)."@en ; + rdfs:subClassOf hqdm:OrdinaryBiologicalObject, + hqdm:StateOfBiologicalSystem, + hqdm:System ; + foaf:image . + +hqdm:BiologicalSystemComponent a rdfs:Class ; + skos:prefLabel "Biological System Component"@en ; + skos:definition "A [BiologicalObject](#BiologicalObject), [StateOfBiologicalSystemComponent](#StateOfBiologicalSystemComponent) and [SystemComponent](#SystemComponent) that is any [BiologicalObject](#BiologicalObject) that is also a [SystemComponent](#SystemComponent)."@en ; + rdfs:subClassOf hqdm:BiologicalObject, + hqdm:StateOfBiologicalSystemComponent, + hqdm:SystemComponent ; + foaf:image . + +hqdm:Class a rdfs:Class ; + skos:prefLabel "Class"@en ; + skos:definition "An [AbstractObject](#AbstractObject) that has members and whose identity is defined by its membership."@en ; + rdfs:subClassOf hqdm:AbstractObject, + rdfs:Class ; + foaf:image . + +hqdm:ClassOfAbstractObject a rdfs:Class ; + skos:prefLabel "Class of Abstract Object"@en ; + skos:definition "A [Class](#Class) that is [AbstractObject](#AbstractObject) or any its subsets."@en ; + rdfs:subClassOf hqdm:Class ; + foaf:image . + +hqdm:ClassOfActivity a rdfs:Class ; + skos:prefLabel "Class of Activity"@en ; + skos:definition "A [ClassOfIndividual](#ClassOfIndividual) and a [ClassOfStateOfActivity](#ClassOfStateOfActivity) that is [Activity](#Activity) or any of its possible subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual, + hqdm:ClassOfStateOfActivity ; + foaf:image . + +hqdm:ClassOfAgreeContract a rdfs:Class ; + skos:prefLabel "Class of Agree Contract"@en ; + skos:definition "A [ClassOfReachingAgreement](#ClassOfReachingAgreement) that is [AgreeContract](#AgreeContract) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfReachingAgreement ; + foaf:image . + +hqdm:ClassOfAgreementExecution a rdfs:Class ; + skos:prefLabel "Class of Agreement Execution"@en ; + skos:definition "A [ClassOfSociallyConstructedActivity](#ClassOfSociallyConstructedActivity) that is [AgreementExecution](#AgreementExecution) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedActivity ; + foaf:image . + +hqdm:ClassOfAgreementProcess a rdfs:Class ; + skos:prefLabel "Class of Agreement Process"@en ; + skos:definition "A [ClassOfSociallyConstructedActivity](#ClassOfSociallyConstructedActivity) that is [AgreementProcess](#AgreementProcess) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedActivity ; + foaf:image . + +hqdm:ClassOfAmountOfMoney a rdfs:Class ; + skos:prefLabel "Class of Amount of Money"@en ; + skos:definition "A [ClassOfStateOfAmountOfMoney](#ClassOfStateOfAmountOfMoney), that is also a [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject), and a [ClassOfPhysicalObject](#ClassOfPhysicalObject) that is [AmountOfMoney](#AmountOfMoney) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalObject, + hqdm:ClassOfSociallyConstructedObject, + hqdm:ClassOfStateOfAmountOfMoney ; + foaf:image . + +hqdm:ClassOfAssociation a rdfs:Class ; + skos:prefLabel "Class of Association"@en ; + skos:definition "A [ClassOfStateOfAssociation](#ClassOfStateOfAssociation) that is also a [ClassOfIndividual](#ClassOfIndividual) that is [Association](#Association) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual, + hqdm:ClassOfStateOfAssociation ; + foaf:image . + +hqdm:ClassOfBiologicalObject a rdfs:Class ; + skos:prefLabel "Class of Biological Object"@en ; + skos:definition "A [ClassOfStateOfBiologicalObject](#ClassOfStateOfBiologicalObject) and [ClassOfPhysicalObject](#ClassOfPhysicalObject) that is [BiologicalObject](#BiologicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalObject, + hqdm:ClassOfStateOfBiologicalObject ; + foaf:image . + +hqdm:ClassOfBiologicalSystem a rdfs:Class ; + skos:prefLabel "Class of Biological System"@en ; + skos:definition "A [ClassOfStateOfBiologicalSystem](#ClassOfStateOfBiologicalSystem), [ClassOfOrdinaryBiologicalObject](#ClassOfOrdinaryBiologicalObject), and [ClassOfSystem](#ClassOfSystem) that is [BiologicalSystem](#BiologicalSystem) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryBiologicalObject, + hqdm:ClassOfStateOfBiologicalSystem, + hqdm:ClassOfSystem ; + foaf:image . + +hqdm:ClassOfBiologicalSystemComponent a rdfs:Class ; + skos:prefLabel "Class of Biological System Component"@en ; + skos:definition "A [ClassOfBiologicalObject](#ClassOfBiologicalObject), [ClassOfStateOfBiologicalSystemComponent](#ClassOfStateOfBiologicalSystemComponent), and [ClassOfSystemComponent](#ClassOfSystemComponent) that is [BiologicalSystemComponent](#BiologicalSystemComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalObject, + hqdm:ClassOfStateOfBiologicalSystemComponent, + hqdm:ClassOfSystemComponent ; + foaf:image . + +hqdm:ClassOfClass a rdfs:Class ; + skos:prefLabel "Class of Class"@en ; + skos:definition "A [Class](#Class) that is [Class](#Class) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfAbstractObject ; + skos:scopeNote "More formally this means that any [member of](#memberOf) the powerset of [Class](#Class) is a valid [member of](#memberOf) `Class Of Class`."@en ; + foaf:image . + +hqdm:ClassOfClassOfSpatioTemporalExtent a rdfs:Class ; + skos:prefLabel "Class of Class of Spatio-Temporal Extent"@en ; + skos:definition "A [ClassOfClass](#ClassOfClass) that is [ClassOfSpatioTemporalExtent](#ClassOfSpatioTemporalExtent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfClass ; + foaf:image . + +hqdm:ClassOfContractExecution a rdfs:Class ; + skos:prefLabel "Class of Contract Execution"@en ; + skos:definition "A [ClassOfAgreementExecution](#ClassOfAgreementExecution) that is [ContractExecution](#ContractExecution) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfAgreementExecution ; + foaf:image . + +hqdm:ClassOfContractProcess a rdfs:Class ; + skos:prefLabel "Class of Contract Process"@en ; + skos:definition "A [ClassOfAgreementProcess](#ClassOfAgreementProcess) that is [ContractProcess](#ContractProcess) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfAgreementProcess ; + foaf:image . + +hqdm:ClassOfEvent a rdfs:Class ; + skos:prefLabel "Class of Event"@en ; + skos:definition "A [ClassOfSpatioTemporalExtent](#ClassOfSpatioTemporalExtent) that is [Event](#Event) or any of its possible subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSpatioTemporalExtent ; + foaf:image . + +hqdm:ClassOfFunctionalObject a rdfs:Class ; + skos:prefLabel "Class of Functional Object"@en ; + skos:definition "A [ClassOfPhysicalObject](#ClassOfPhysicalObject), [ClassOfIntentionallyConstructedObject](#ClassOfIntentionallyConstructedObject), and [ClassOfStateOfFunctionalObject](#ClassOfStateOfFunctionalObject) that is [FunctionalObject](#FunctionalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIntentionallyConstructedObject, + hqdm:ClassOfPhysicalObject, + hqdm:ClassOfStateOfFunctionalObject ; + foaf:image . + +hqdm:ClassOfFunctionalSystem a rdfs:Class ; + skos:prefLabel "Class of Functional System"@en ; + skos:definition "A [ClassOfStateOfFunctionalSystem](#ClassOfStateOfFunctionalSystem), that is also a [ClassOfOrdinaryFunctionalObject](#ClassOfOrdinaryFunctionalObject), and a [ClassOfSystem](#ClassOfSystem) that is [FunctionalSystem](#FunctionalSystem) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryFunctionalObject, + hqdm:ClassOfStateOfFunctionalSystem, + hqdm:ClassOfSystem ; + foaf:image . + +hqdm:ClassOfFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Class of Functional System Component"@en ; + skos:definition "A [ClassOfStateOfFunctionalSystemComponent](#ClassOfStateOfFunctionalSystemComponent), and [ClassOfSystemComponent](#ClassOfSystemComponent) that is [FunctionalSystemComponent](#FunctionalSystemComponent) and any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfFunctionalSystemComponent, + hqdm:ClassOfSystemComponent ; + foaf:image . + +hqdm:ClassOfInPlaceBiologicalComponent a rdfs:Class ; + skos:prefLabel "Class of In-Place Biological Component"@en ; + skos:definition "A [ClassOfStateOfBiologicalSystemComponent](#ClassOfStateOfBiologicalSystemComponent), that is also a [ClassOfStateOfOrdinaryBiologicalObject](#ClassOfStateOfOrdinaryBiologicalObject), and a [ClassOfInstalledObject](#ClassOfInstalledObject) that is [InPlaceBiologicalComponent](#InPlaceBiologicalComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfInstalledObject, + hqdm:ClassOfStateOfBiologicalSystemComponent, + hqdm:ClassOfStateOfOrdinaryBiologicalObject ; + foaf:image . + +hqdm:ClassOfIndividual a rdfs:Class ; + skos:prefLabel "Class of Individual"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [Individual](#Individual) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + skos:scopeNote "Only classes that necessarily apply to an [Individual](#Individual) for the whole of its life are valid members. Others are members of [Class Of State](#ClassOfState) and apply to the [State](#State) that is the [Individual](#Individual) for the [Period Of Time](#PeriodOfTime) that the class applies for."@en ; + foaf:image . + +hqdm:ClassOfInstalledFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Class of Installed Functional System Component"@en ; + skos:definition "A [ClassOfStateOfFunctionalSystemComponent](#ClassOfStateOfFunctionalSystemComponent) that is also a [ClassOfInstalledObject](#ClassOfInstalledObject) that is [InstalledFunctionalSystemComponent](#InstalledFunctionalSystemComponent) and any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfInstalledObject, + hqdm:ClassOfStateOfFunctionalSystemComponent ; + foaf:image . + +hqdm:ClassOfInstalledObject a rdfs:Class ; + skos:prefLabel "Class of Installed Object"@en ; + skos:definition "A [ClassOfStateOfSystemComponent](#ClassOfStateOfSystemComponent) that is also a [ClassOfStateOfOrdinaryPhysicalObject](#ClassOfStateOfOrdinaryPhysicalObject) that is [InstalledObject](#InstalledObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryPhysicalObject, + hqdm:ClassOfStateOfSystemComponent ; + foaf:image . + +hqdm:ClassOfIntentionallyConstructedObject a rdfs:Class ; + skos:prefLabel "Class of Intentionally Constructed Object"@en ; + skos:definition "A [ClassOfIndividual](#ClassOfIndividual) that is also a [ClassOfStateOfIntentionallyConstructedObject](#ClassOfStateOfIntentionallyConstructedObject) that is [IntentionallyConstructedObject](#IntentionallyConstructedObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual, + hqdm:ClassOfStateOfIntentionallyConstructedObject ; + foaf:image . + +hqdm:ClassOfOffer a rdfs:Class ; + skos:prefLabel "Class of Offer"@en ; + skos:definition "A [ClassOfSociallyConstructedActivity](#ClassOfSociallyConstructedActivity) that is [Offer](#Offer) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedActivity ; + foaf:image . + +hqdm:ClassOfOrdinaryBiologicalObject a rdfs:Class ; + skos:prefLabel "Class of Ordinary Biological Object"@en ; + skos:definition "A [ClassOfBiologicalObject](#ClassOfBiologicalObject), [ClassOfOrdinaryPhysicalObject](#ClassOfOrdinaryPhysicalObject) and [ClassOfStateOfOrdinaryBiologicalObject](#ClassOfStateOfOrdinaryBiologicalObject) that is [OrdinaryBiologicalObject](#OrdinaryBiologicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalObject, + hqdm:ClassOfOrdinaryPhysicalObject, + hqdm:ClassOfStateOfOrdinaryBiologicalObject ; + foaf:image . + +hqdm:ClassOfOrdinaryFunctionalObject a rdfs:Class ; + skos:prefLabel "Class of Ordinary Functional Object"@en ; + skos:definition "A [ClassOfStateOfOrdinaryFunctionalObject](#ClassOfStateOfOrdinaryFunctionalObject), that is also a [ClassOfFunctionalObject](#ClassOfFunctionalObject), and a [ClassOfOrdinaryPhysicalObject](#ClassOfOrdinaryPhysicalObject) that is [OrdinaryFunctionalObject](#OrdinaryFunctionalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfFunctionalObject, + hqdm:ClassOfOrdinaryPhysicalObject, + hqdm:ClassOfStateOfOrdinaryFunctionalObject ; + foaf:image . + +hqdm:ClassOfOrdinaryPhysicalObject a rdfs:Class ; + skos:prefLabel "Class of Ordinary Physical Object"@en ; + skos:definition "A [ClassOfStateOfOrdinaryPhysicalObject](#ClassOfStateOfOrdinaryPhysicalObject) that is also a [ClassOfPhysicalObject](#ClassOfPhysicalObject) that is [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalObject, + hqdm:ClassOfStateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:ClassOfOrganization a rdfs:Class ; + skos:prefLabel "Class of Organization"@en ; + skos:definition "A [ClassOfStateOfOrganization](#ClassOfStateOfOrganization), that is also a [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject), and a [ClassOfParty](#ClassOfParty) that is [Organization](#Organization) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfParty, + hqdm:ClassOfSociallyConstructedObject, + hqdm:ClassOfStateOfOrganization ; + foaf:image . + +hqdm:ClassOfOrganizationComponent a rdfs:Class ; + skos:prefLabel "Class of Organization Component"@en ; + skos:definition "A [ClassOfStateOfOrganizationComponent](#ClassOfStateOfOrganizationComponent), that is also a [ClassOfSystemComponent](#ClassOfSystemComponent), and a [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject) that is [OrganizationComponent](#OrganizationComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedObject, + hqdm:ClassOfStateOfOrganizationComponent, + hqdm:ClassOfSystemComponent ; + foaf:image . + +hqdm:ClassOfParticipant a rdfs:Class ; + skos:prefLabel "Class of Participant"@en ; + skos:definition "A [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [Participant](#Participant) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfParty a rdfs:Class ; + skos:prefLabel "Class of Party"@en ; + skos:definition "A [ClassOfSystem](#ClassOfSystem) that is [Party](#Party) or any of its subtypes."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfParty, + hqdm:ClassOfSystem ; + foaf:image . + +hqdm:ClassOfPeriodOfTime a rdfs:Class ; + skos:prefLabel "Class of Period of Time"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [PeriodOfTime](#PeriodOfTime) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + foaf:image . + +hqdm:ClassOfPerson a rdfs:Class ; + skos:prefLabel "Class of Person"@en ; + skos:definition "A [ClassOfBiologicalSystem](#ClassOfBiologicalSystem), [ClassOfStateOfPerson](#ClassOfStateOfPerson) and [ClassOfParty](#ClassOfParty) that is [Person](#Person) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalSystem, + hqdm:ClassOfParty, + hqdm:ClassOfStateOfPerson ; + foaf:image . + +hqdm:ClassOfPersonInPosition a rdfs:Class ; + skos:prefLabel "Class of Person in Position"@en ; + skos:definition "A [ClassOfInstalledObject](#ClassOfInstalledObject) that is also a [ClassOfStateOfPosition](#ClassOfStateOfPosition) that is [PersonInPosition](#PersonInPosition) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfInstalledObject, + hqdm:ClassOfStateOfPosition ; + foaf:image . + +hqdm:ClassOfPhysicalObject a rdfs:Class ; + skos:prefLabel "Class of Physical Object"@en ; + skos:definition "A [ClassOfIndividual](#ClassOfIndividual) and a [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [PhysicalObject](#PhysicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual, + hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfPhysicalProperty a rdfs:Class ; + skos:prefLabel "Class of Physical Property"@en ; + skos:definition "A [ClassOfClassOfSpatioTemporalExtent](#ClassOfClassOfSpatioTemporalExtent) that is [PhysicalProperty](#PhysicalProperty) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfClassOfSpatioTemporalExtent ; + foaf:image . + +hqdm:ClassOfPhysicalQuantity a rdfs:Class ; + skos:prefLabel "Class of Physical Quantity"@en ; + skos:definition "A [ClassOfPhysicalProperty](#ClassOfPhysicalProperty) that is [PhysicalQuantity](#PhysicalQuantity) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalProperty ; + foaf:image . + +hqdm:ClassOfPointInTime a rdfs:Class ; + skos:prefLabel "Class of Point in Time"@en ; + skos:definition "A [ClassOfEvent](#ClassOfEvent) that includes [PointInTime](#PointInTime) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfEvent ; + foaf:image . + +hqdm:ClassOfPosition a rdfs:Class ; + skos:prefLabel "Class of Position"@en ; + skos:definition "A [ClassOfStateOfPosition](#ClassOfStateOfPosition) that is also a [ClassOfOrganizationComponent](#ClassOfOrganizationComponent) that is [Position](#Position) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfOrganizationComponent, + hqdm:ClassOfStateOfPosition ; + foaf:image . + +hqdm:ClassOfPossibleWorld a rdfs:Class ; + skos:prefLabel "Class of Possible World"@en ; + skos:definition "A [ClassOfIndividual](#ClassOfIndividual) that is also a [ClassOfPeriodOfTime](#ClassOfPeriodOfTime) that is [PossibleWorld](#PossibleWorld) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual, + hqdm:ClassOfPeriodOfTime ; + foaf:image . + +hqdm:ClassOfReachingAgreement a rdfs:Class ; + skos:prefLabel "Class of Reaching Agreement"@en ; + skos:definition "A [ClassOfSociallyConstructedActivity](#ClassOfSociallyConstructedActivity) that is [ReachingAgreement](#ReachingAgreement) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedActivity ; + foaf:image . + +hqdm:ClassOfRelationship a rdfs:Class ; + skos:prefLabel "Class of Relationship"@en ; + skos:definition "A [Class](#Class) that is [Relationship](#Relationship) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfAbstractObject ; + foaf:image . + +hqdm:ClassOfRepresentation a rdfs:Class ; + skos:prefLabel "Class of Representation"@en ; + skos:definition "A [Class Of Association](#ClassOfAssociation) that is [Representation By Sign](#RepresentationBySign) or any of its subsets"@en ; + rdfs:subClassOf hqdm:ClassOfAssociation ; + foaf:image . + +hqdm:ClassOfSalesProductInstance a rdfs:Class ; + skos:prefLabel "Class of Sales Product Instance"@en ; + skos:definition "A [ClassOfStateOfSalesProductInstance](#ClassOfStateOfSalesProductInstance) that is also a [ClassOfOrdinaryFunctionalObject](#ClassOfOrdinaryFunctionalObject) that is [SalesProductInstance](#SalesProductInstance) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryFunctionalObject, + hqdm:ClassOfStateOfSalesProductInstance ; + foaf:image . + +hqdm:ClassOfSign a rdfs:Class ; + skos:prefLabel "Class of Sign"@en ; + skos:definition "A [ClassOfStateOfSign](#ClassOfStateOfSign) that is also a [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject) that is [Sign](#Sign) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedObject, + hqdm:ClassOfStateOfSign ; + foaf:image . + +hqdm:ClassOfSociallyConstructedActivity a rdfs:Class ; + skos:prefLabel "Class of Socially Constructed Activity"@en ; + skos:definition "A [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject) and [ClassOfActivity](#ClassOfActivity) that is [SociallyConstructedActivity](#SociallyConstructedActivity) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfActivity, + hqdm:ClassOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfSociallyConstructedObject a rdfs:Class ; + skos:prefLabel "Class of Socially Constructed Object"@en ; + skos:definition "A [ClassOfIntentionallyConstructedObject](#ClassOfIntentionallyConstructedObject) that is [SociallyConstructedObject](#SociallyConstructedObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfIntentionallyConstructedObject, + hqdm:ClassOfStateOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfSpatioTemporalExtent a rdfs:Class ; + skos:prefLabel "Class of Spatio-Temporal Extent"@en ; + skos:definition "A [Class](#Class) that is [SpatioTemporalExtent](#SpatioTemporalExtent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:Class ; + foaf:image . + +hqdm:ClassOfState a rdfs:Class ; + skos:prefLabel "Class of State"@en ; + skos:definition "A [ClassOfSpatioTemporalExtent](#ClassOfSpatioTemporalExtent) that is [State](#State) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfSpatioTemporalExtent ; + foaf:image . + +hqdm:ClassOfStateOfActivity a rdfs:Class ; + skos:prefLabel "Class of State of Activity"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [StateOfActivity](#StateOfActivity) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + foaf:image . + +hqdm:ClassOfStateOfAmountOfMoney a rdfs:Class ; + skos:prefLabel "Class of State of Amount of Money"@en ; + skos:definition "A [ClassOfStateOfSociallyConstructedObject](#ClassOfStateOfSociallyConstructedObject) that is also a [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [StateOfAmountOfMoney](#StateOfAmountOfMoney) or one of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfPhysicalObject, + hqdm:ClassOfStateOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfStateOfAssociation a rdfs:Class ; + skos:prefLabel "Class of State of Association"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [StateOfAssociation](#StateOfAssociation) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + foaf:image . + +hqdm:ClassOfStateOfBiologicalObject a rdfs:Class ; + skos:prefLabel "Class of State of Biological Object"@en ; + skos:definition "A [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [StateOfBiologicalObject](#StateOfBiologicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfBiologicalSystem a rdfs:Class ; + skos:prefLabel "Class of State of Biological System"@en ; + skos:definition "A [ClassOfStateOfOrdinaryBiologicalObject](#ClassOfStateOfOrdinaryBiologicalObject) and [ClassOfStateOfSystem](#ClassOfStateOfSystem) that is [StateOfBiologicalSystem](#StateOfBiologicalSystem) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryBiologicalObject, + hqdm:ClassOfStateOfSystem ; + foaf:image . + +hqdm:ClassOfStateOfBiologicalSystemComponent a rdfs:Class ; + skos:prefLabel "Class of State of Biological System Component"@en ; + skos:definition "A [ClassOfStateOfBiologicalObject](#ClassOfStateOfBiologicalObject) and [ClassOfStateOfSystemComponent](#ClassOfStateOfSystemComponent) that is [StateOfBiologicalSystemComponent](#StateOfBiologicalSystemComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfBiologicalObject, + hqdm:ClassOfStateOfSystemComponent ; + foaf:image . + +hqdm:ClassOfStateOfFunctionalObject a rdfs:Class ; + skos:prefLabel "Class of State of Functional Object"@en ; + skos:definition "A [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) and [ClassOfStateOfIntentionallyConstructedObject](#ClassOfStateOfIntentionallyConstructedObject) that is [StateOfFunctionalObject](#StateOfFunctionalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfIntentionallyConstructedObject, + hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfFunctionalSystem a rdfs:Class ; + skos:prefLabel "Class of State of Functional System"@en ; + skos:definition "A [ClassOfStateOfOrdinaryFunctionalObject](#ClassOfStateOfOrdinaryFunctionalObject) that is also a [ClassOfStateOfSystem](#ClassOfStateOfSystem) that is [StateOfFunctionalSystem](#StateOfFunctionalSystem) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryFunctionalObject, + hqdm:ClassOfStateOfSystem ; + foaf:image . + +hqdm:ClassOfStateOfFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Class of State of Functional System Component"@en ; + skos:definition "A [ClassOfStateOfOrdinaryFunctionalObject](#ClassOfStateOfOrdinaryFunctionalObject) that is also a [ClassOfStateOfSystemComponent](#ClassOfStateOfSystemComponent) that is [StateOfFunctionalSystemComponent](#StateOfFunctionalSystemComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryFunctionalObject, + hqdm:ClassOfStateOfSystemComponent ; + foaf:image . + +hqdm:ClassOfStateOfIntentionallyConstructedObject a rdfs:Class ; + skos:prefLabel "Class of State of Intentionally Constructed Object"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [StateOfIntentionallyConstructedObject](#StateOfIntentionallyConstructedObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + foaf:image . + +hqdm:ClassOfStateOfOrdinaryBiologicalObject a rdfs:Class ; + skos:prefLabel "Class of State of Ordinary Biological Object"@en ; + skos:definition "A [ClassOfStateOfBiologicalObject](#ClassOfStateOfBiologicalObject) that is also a [ClassOfStateOfOrdinaryPhysicalObject](#ClassOfStateOfOrdinaryPhysicalObject) that is [StateOfOrdinaryBiologicalObject](#StateOfOrdinaryBiologicalObject) or any of its subsets"@en ; + rdfs:subClassOf hqdm:ClassOfStateOfBiologicalObject, + hqdm:ClassOfStateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfOrdinaryFunctionalObject a rdfs:Class ; + skos:prefLabel "Class of State of Ordinary Functional Object"@en ; + skos:definition "A [ClassOfStateOfFunctionalObject](#ClassOfStateOfFunctionalObject) that is also a [ClassOfStateOfOrdinaryPhysicalObject](#ClassOfStateOfOrdinaryPhysicalObject) that is [StateOfOrdinaryFunctionalObject](#StateOfOrdinaryFunctionalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfFunctionalObject, + hqdm:ClassOfStateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfOrdinaryPhysicalObject a rdfs:Class ; + skos:prefLabel "Class of State of Ordinary Physical Object"@en ; + skos:definition "A [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [StateOfOrdinaryPhysicalObject](#StateOfOrdinaryPhysicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfOrganization a rdfs:Class ; + skos:prefLabel "Class of State of Organization"@en ; + skos:definition "A [ClassOfStateOfSociallyConstructedObject](#ClassOfStateOfSociallyConstructedObject) that is also a [ClassOfStateOfParty](#ClassOfStateOfParty) that is [StateOfOrganization](#StateOfOrganization) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfParty, + hqdm:ClassOfStateOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfStateOfOrganizationComponent a rdfs:Class ; + skos:prefLabel "Class of State of Organization Component"@en ; + skos:definition "A [ClassOfStateOfSystemComponent](#ClassOfStateOfSystemComponent) that is also a [ClassOfStateOfSociallyConstructedObject](#ClassOfStateOfSociallyConstructedObject) that is [StateOfOrganizationComponent](#StateOfOrganizationComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfSociallyConstructedObject, + hqdm:ClassOfStateOfSystemComponent ; + foaf:image . + +hqdm:ClassOfStateOfParty a rdfs:Class ; + skos:prefLabel "Class of State of Party"@en ; + skos:definition "A [ClassOfStateOfSystem](#ClassOfStateOfSystem) that is [StateOfParty](#StateOfParty) or any of its subtypes."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfSystem ; + foaf:image . + +hqdm:ClassOfStateOfPerson a rdfs:Class ; + skos:prefLabel "Class of State of Person"@en ; + skos:definition "A [ClassOfStateOfBiologicalSystem](#ClassOfStateOfBiologicalSystem) and [ClassOfStateOfParty](#ClassOfStateOfParty) that is [StateOfPerson](#StateOfPerson) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfBiologicalSystem, + hqdm:ClassOfStateOfParty ; + foaf:image . + +hqdm:ClassOfStateOfPhysicalObject a rdfs:Class ; + skos:prefLabel "Class of State of Physical Object"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is [StateOfPhysicalObject](#StateOfPhysicalObject) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + foaf:image . + +hqdm:ClassOfStateOfPosition a rdfs:Class ; + skos:prefLabel "Class of State of Position"@en ; + skos:definition "A [ClassOfStateOfOrganizationComponent](#ClassOfStateOfOrganizationComponent) that is [StateOfPosition](#StateOfPosition) and any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrganizationComponent ; + foaf:image . + +hqdm:ClassOfStateOfSalesProductInstance a rdfs:Class ; + skos:prefLabel "Class of State of Sales Product Instance"@en ; + skos:definition "A [ClassOfStateOfOrdinaryFunctionalObject](#ClassOfStateOfOrdinaryFunctionalObject) that is [StateOfSalesProductInstance](#StateOfSalesProductInstance) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryFunctionalObject ; + foaf:image . + +hqdm:ClassOfStateOfSign a rdfs:Class ; + skos:prefLabel "Class of State of Sign"@en ; + skos:definition "A [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject) that is [StateOfSign](#StateOfSign) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfStateOfSociallyConstructedActivity a rdfs:Class ; + skos:prefLabel "Class of State of Socially Constructed Activity"@en ; + skos:definition "A [ClassOfStateOfSociallyConstructedObject](#ClassOfStateOfSociallyConstructedObject) that is [StateOfSociallyConstructedActivity](#StateOfSociallyConstructedActivity) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfActivity, + hqdm:ClassOfStateOfSociallyConstructedObject ; + foaf:image . + +hqdm:ClassOfStateOfSociallyConstructedObject a rdfs:Class ; + skos:prefLabel "Class of State of Socially Constructed Object"@en ; + skos:definition "A [ClassOfStateOfIntentionallyConstructedObject](#ClassOfStateOfIntentionallyConstructedObject) that is [StateOfSociallyConstructedObject](#StateOfSociallyConstructedObject) or one of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfIntentionallyConstructedObject ; + foaf:image . + +hqdm:ClassOfStateOfSystem a rdfs:Class ; + skos:prefLabel "Class of State of System"@en ; + skos:definition "A [ClassOfStateOfOrdinaryPhysicalObject](#ClassOfStateOfOrdinaryPhysicalObject) that is [StateOfSystem](#StateOfSystem) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:ClassOfStateOfSystemComponent a rdfs:Class ; + skos:prefLabel "Class of State of System Component"@en ; + skos:definition "A [ClassOfStateOfPhysicalObject](#ClassOfStateOfPhysicalObject) that is [StateOfSystemComponent](#StateOfSystemComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfStateOfPhysicalObject ; + foaf:image . + +hqdm:ClassOfSystem a rdfs:Class ; + skos:prefLabel "Class of System"@en ; + skos:definition "A [ClassOfStateOfSystem](#ClassOfStateOfSystem) that is also a [ClassOfOrdinaryPhysicalObject](#ClassOfOrdinaryPhysicalObject) that is [System](#System) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryPhysicalObject, + hqdm:ClassOfStateOfSystem ; + foaf:image . + +hqdm:ClassOfSystemComponent a rdfs:Class ; + skos:prefLabel "Class of System Component"@en ; + skos:definition "A [ClassOfStateOfSystemComponent](#ClassOfStateOfSystemComponent) that is also a [ClassOfPhysicalObject](#ClassOfPhysicalObject) that is [SystemComponent](#SystemComponent) or any of its subsets."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalObject, + hqdm:ClassOfStateOfSystemComponent ; + foaf:image . + +hqdm:ContractExecution a rdfs:Class ; + skos:prefLabel "Contract Execution"@en ; + skos:definition "An [AgreementExecution](#AgreementExecution) that is the provision of something in exchange for some consideration."@en ; + rdfs:subClassOf hqdm:AgreementExecution ; + foaf:image . + +hqdm:ContractProcess a rdfs:Class ; + skos:prefLabel "Contract Process"@en ; + skos:definition "An [AgreementProcess](#AgreementProcess) that consists of an [AgreeContract](#AgreeContract) and a [ContractExecution](#ContractExecution)."@en ; + rdfs:subClassOf hqdm:AgreementProcess ; + foaf:image . + +hqdm:Currency a rdfs:Class ; + skos:prefLabel "Currency"@en ; + skos:definition "A [ClassOfAmountOfMoney](#ClassOfAmountOfMoney) that is the subset of [AmountOfMoney](#AmountOfMoney) that has as members all the money issued by an issuing authority."@en ; + rdfs:subClassOf hqdm:ClassOfAmountOfMoney ; + foaf:image . + +hqdm:Definition a rdfs:Class ; + skos:prefLabel "Definition"@en ; + skos:definition "A [RepresentationByPattern](#RepresentationByPattern) that defines a [Class](#Class)."@en ; + rdfs:subClassOf hqdm:RepresentationByPattern ; + foaf:image . + +hqdm:Description a rdfs:Class ; + skos:prefLabel "Description"@en ; + skos:definition "A [RepresentationByPattern](#RepresentationByPattern) that describes some [Thing](#Thing)."@en ; + rdfs:subClassOf hqdm:RepresentationByPattern ; + foaf:image . + +hqdm:Employee a rdfs:Class ; + skos:prefLabel "Employee"@en ; + skos:definition "A [StateOfPerson](#StateOfPerson) that is a [participant in](#participantIn) an [Employment](#Employment)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfPerson ; + foaf:image . + +hqdm:Employer a rdfs:Class ; + skos:prefLabel "Employer"@en ; + skos:definition "A [StateOfParty](#StateOfParty) that is a [participant in](#participantIn) an [Employment](#Employment)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfParty ; + foaf:image . + +hqdm:Employment a rdfs:Class ; + skos:prefLabel "Employment"@en ; + skos:definition "An [Association](#Association) that consists of an [Employer](#Employer) and an [Employee](#Employee) where the [Employer](#Employer) pays the [Employee](#Employee) to work for them."@en ; + rdfs:subClassOf hqdm:Association ; + foaf:image . + +hqdm:EndingOfOwnership a rdfs:Class ; + skos:prefLabel "Ending of Ownership"@en ; + skos:definition "An [Event](#Event) that is the ending of an [Ownership](#Ownership)."@en ; + rdfs:subClassOf hqdm:Event ; + foaf:image . + +hqdm:EnumeratedClass a rdfs:Class ; + skos:prefLabel "Enumerated Class"@en ; + skos:definition "A [Class](#Class) where each `member of` the [Class](#Class) is known."@en ; + rdfs:subClassOf hqdm:Class ; + foaf:image . + +hqdm:Event a rdfs:Class ; + skos:prefLabel "Event"@en ; + skos:definition "A [SpatioTemporalExtent](#SpatioTemporalExtent) that has zero temporal thickness and may bound some [SpatioTemporalExtent](#SpatioTemporalExtent)."@en ; + rdfs:subClassOf hqdm:SpatioTemporalExtent ; + foaf:image . + +hqdm:ExchangeOfGoodsAndMoney a rdfs:Class ; + skos:prefLabel "Exchange of Goods and Money"@en ; + skos:definition "An [AgreementExecution](#AgreementExecution) that consists of a [TransferOfOwnership](#TransferOfOwnership) of goods and a [TransferOfOwnershipOfMoney](#TransferOfOwnershipOfMoney)."@en ; + rdfs:subClassOf hqdm:ContractExecution ; + foaf:image . + +hqdm:Function a rdfs:Class ; + skos:prefLabel "Function"@en ; + skos:definition "A many-to-one [Relationship](#Relationship)."@en ; + rdfs:subClassOf hqdm:Relationship ; + foaf:image . + +hqdm:FunctionalObject a rdfs:Class ; + skos:prefLabel "Functional Object"@en ; + skos:definition "An [IntentionallyConstructedObject](#IntentionallyConstructedObject) that is also a [PhysicalObject](#PhysicalObject) that has an `intended role`."@en ; + rdfs:subClassOf hqdm:IntentionallyConstructedObject, + hqdm:PhysicalObject, + hqdm:StateOfFunctionalObject ; + foaf:image . + +hqdm:FunctionalSystem a rdfs:Class ; + skos:prefLabel "Functional System"@en ; + skos:definition "Any [StateOfFunctionalSystem](#StateOfFunctionalSystem) that is also an [OrdinaryFunctionalObject](#OrdinaryFunctionalObject) and a [System](#System)."@en ; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject, + hqdm:StateOfFunctionalSystem, + hqdm:System ; + foaf:image . + +hqdm:FunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Functional System Component"@en ; + skos:definition "An [IntentionallyConstructedObject](#IntentionallyConstructedObject) that is a replaceable `component of` a [FunctionalSystem](#FunctionalSystem)."@en ; + rdfs:subClassOf hqdm:FunctionalObject, + hqdm:StateOfFunctionalSystemComponent, + hqdm:SystemComponent ; + foaf:image . + +hqdm:Identification a rdfs:Class ; + skos:prefLabel "Identification"@en ; + skos:definition "A [RepresentationByPattern](#RepresentationByPattern) that is a surrogate for the [Thing](#Thing) represented."@en ; + rdfs:subClassOf hqdm:RepresentationByPattern ; + foaf:image . + +hqdm:IdentificationOfPhysicalQuantity a rdfs:Class ; + skos:prefLabel "Identification of Physical Quantity"@en ; + skos:definition "An [Identification](#Identification) that identifies a [PhysicalQuantity](#PhysicalQuantity). An `identification of physical quantity` consists of a number that is a representation of the `value` the physical quantity maps to on the [Scale](#Scale)."@en ; + rdfs:subClassOf hqdm:Identification ; + foaf:image . + +hqdm:InPlaceBiologicalComponent a rdfs:Class ; + skos:prefLabel "In-Place Biological Component"@en ; + skos:definition "An [InstalledObject](#InstalledObject) that is also a [StateOfOrdinaryBiologicalObject](#StateOfOrdinaryBiologicalObject) and a [StateOfSystemComponent](#StateOfSystemComponent)."@en ; + rdfs:subClassOf hqdm:InstalledObject, + hqdm:StateOfBiologicalSystemComponent, + hqdm:StateOfOrdinaryBiologicalObject ; + foaf:image . + +hqdm:Individual a rdfs:Class ; + skos:prefLabel "Individual"@en ; + skos:definition "A [SpatioTemporalExtent](#SpatioTemporalExtent) that is not a proper `temporal part of` any other [Individual](#Individual) of the same kind."@en ; + rdfs:subClassOf hqdm:State ; + skos:scopeNote "In standard mereology a [SpatioTemporalExtent](#SpatioTemporalExtent) is a part of itself. Parts of an individual excluding itself are called proper parts."@en ; + foaf:image . + +hqdm:InstalledFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Installed Functional System Component"@en ; + skos:definition "Any [InstalledObject](#InstalledObject) that is also a [StateOfOrdinaryFunctionalObject](#StateOfOrdinaryFunctionalObject) and a [StateOfFunctionalSystemComponent](#StateOfFunctionalSystemComponent)."@en ; + rdfs:subClassOf hqdm:InstalledObject, + hqdm:StateOfFunctionalSystemComponent, + hqdm:StateOfOrdinaryFunctionalObject ; + foaf:image . + +hqdm:InstalledObject a rdfs:Class ; + skos:prefLabel "Installed Object"@en ; + skos:definition "A [StateOfOrdinaryPhysicalObject](#StateOfOrdinaryPhysicalObject) that is also a [StateOfSystemComponent](#StateOfSystemComponent) that is a `temporal part of` an [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) from when it is installed as a [SystemComponent](#SystemComponent) to when it is removed."@en ; + rdfs:subClassOf hqdm:StateOfOrdinaryPhysicalObject, + hqdm:StateOfSystemComponent ; + foaf:image . + +hqdm:IntentionallyConstructedObject a rdfs:Class ; + skos:prefLabel "Intentionally Constructed Object"@en ; + skos:definition "An [Individual](#Individual) and [StateOfIntentionallyConstructedObject](#StateOfIntentionallyConstructedObject) that is intentionally constructed."@en ; + rdfs:subClassOf hqdm:Individual, + hqdm:StateOfIntentionallyConstructedObject ; + skos:scopeNote "Being intentionally constructed means that it is an act of will or agreement that makes it what it is."@en ; + foaf:image . + +hqdm:KindOfActivity a rdfs:Class ; + skos:prefLabel "Kind of Activity"@en ; + skos:definition "A [ClassOfActivity](#ClassOfActivity) all of whose members are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfActivity, + hqdm:KindOfIndividual ; + foaf:image . + +hqdm:KindOfAssociation a rdfs:Class ; + skos:prefLabel "Kind of Association"@en ; + skos:definition "A [ClassOfAssociation](#ClassOfAssociation) where all the members are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfAssociation, + hqdm:KindOfIndividual ; + foaf:image . + +hqdm:KindOfBiologicalObject a rdfs:Class ; + skos:prefLabel "Kind of Biological Object"@en ; + skos:definition "A [ClassOfBiologicalObject](#ClassOfBiologicalObject) and a [KindOfPhysicalObject](#KindOfPhysicalObject) where each `member of` a `Kind of Biological Object` is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalObject, + hqdm:KindOfPhysicalObject ; + foaf:image . + +hqdm:KindOfBiologicalSystem a rdfs:Class ; + skos:prefLabel "Kind of Biological System"@en ; + skos:definition "A [ClassOfBiologicalSystem](#ClassOfBiologicalSystem) that is also a [KindOfSystem](#KindOfSystem) all of whose members have a natural [Role](#Role) that they play."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalSystem, + hqdm:KindOfOrdinaryBiologicalObject, + hqdm:KindOfSystem ; + foaf:image . + +hqdm:KindOfBiologicalSystemComponent a rdfs:Class ; + skos:prefLabel "Kind of Biological System Component"@en ; + skos:definition "A [ClassOfBiologicalSystemComponent](#ClassOfBiologicalSystemComponent) that is also a [KindOfSystemComponent](#KindOfSystemComponent) where all the member components play the same role in some [BiologicalSystem](#BiologicalSystem)."@en ; + rdfs:subClassOf hqdm:ClassOfBiologicalSystemComponent, + hqdm:KindOfBiologicalObject, + hqdm:KindOfSystemComponent ; + foaf:image . + +hqdm:KindOfFunctionalObject a rdfs:Class ; + skos:prefLabel "Kind of Functional Object"@en ; + skos:definition "A [ClassOfFunctionalObject](#ClassOfFunctionalObject), that is also a [KindOfPhysicalObject](#KindOfPhysicalObject), and a [KindOfIntentionallyConstructedObject](#KindOfIntentionallyConstructedObject) where each `member of` a [KindOfFunctionalObject](#KindOfFunctionalObject) is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfFunctionalObject, + hqdm:KindOfIntentionallyConstructedObject, + hqdm:KindOfPhysicalObject ; + foaf:image . + +hqdm:KindOfFunctionalSystem a rdfs:Class ; + skos:prefLabel "Kind of Functional System"@en ; + skos:definition "A [ClassOfFunctionalSystem](#ClassOfFunctionalSystem) that is also a [KindOfSystem](#KindOfSystem) where each `Kind of Functional System` has members that are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfFunctionalSystem, + hqdm:KindOfOrdinaryFunctionalObject, + hqdm:KindOfSystem ; + foaf:image . + +hqdm:KindOfFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "Kind of Functional System Component"@en ; + skos:definition "A [ClassOfFunctionalSystemComponent](#ClassOfFunctionalSystemComponent) that is also a [KindOfSystemComponent](#KindOfSystemComponent) where each `member of` a [KindOfFunctionalSystemComponent](#KindOfFunctionalSystemComponent) is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfFunctionalSystemComponent, + hqdm:KindOfFunctionalObject, + hqdm:KindOfSystemComponent ; + foaf:image . + +hqdm:KindOfIndividual a rdfs:Class ; + skos:prefLabel "Kind of Individual"@en ; + skos:definition "A [ClassOfIndividual](#ClassOfIndividual) where all the members possess attributes in common."@en ; + rdfs:subClassOf hqdm:ClassOfIndividual ; + foaf:image . + +hqdm:KindOfIntentionallyConstructedObject a rdfs:Class ; + skos:prefLabel "Kind of Intentionally Constructed Object"@en ; + skos:definition "A [ClassOfIntentionallyConstructedObject](#ClassOfIntentionallyConstructedObject) that is also a [KindOfIndividual](#KindOfIndividual) where each `member of` a `Kind of Intentionally Constructed Object` is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfIntentionallyConstructedObject, + hqdm:KindOfIndividual ; + foaf:image . + +hqdm:KindOfOrdinaryBiologicalObject a rdfs:Class ; + skos:prefLabel "Kind of Ordinary Biological Object"@en ; + skos:definition "A [ClassOfOrdinaryBiologicalObject](#ClassOfOrdinaryBiologicalObject) a [KindOfOrdinaryPhysicalObject](#KindOfOrdinaryPhysicalObject) and a [KindOfBiologicalObject](#KindOfBiologicalObject) where each `member of` a `Kind of Ordinary Biological Object` is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryBiologicalObject, + hqdm:KindOfBiologicalObject, + hqdm:KindOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:KindOfOrdinaryFunctionalObject a rdfs:Class ; + skos:prefLabel "Kind of Ordinary Functional Object"@en ; + skos:definition "A [ClassOfOrdinaryFunctionalObject](#ClassOfOrdinaryFunctionalObject), that is also a [KindOfOrdinaryPhysicalObject](#KindOfOrdinaryPhysicalObject), and a [KindOfBiologicalObject](#KindOfBiologicalObject) where each `member of` a [ClassOfOrdinaryFunctionalObject](#ClassOfOrdinaryFunctionalObject) is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryFunctionalObject, + hqdm:KindOfFunctionalObject, + hqdm:KindOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:KindOfOrdinaryPhysicalObject a rdfs:Class ; + skos:prefLabel "Kind of Ordinary Physical Object"@en ; + skos:definition "A [ClassOfOrdinaryPhysicalObject](#ClassOfOrdinaryPhysicalObject) that is also a [KindOfPhysicalObject](#KindOfPhysicalObject) where each [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) has members that are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfOrdinaryPhysicalObject, + hqdm:KindOfPhysicalObject ; + foaf:image . + +hqdm:KindOfOrganization a rdfs:Class ; + skos:prefLabel "Kind of Organization"@en ; + skos:definition "A [ClassOfOrganization](#ClassOfOrganization), that is also a [KindOfParty](#KindOfParty), and a [KindOfSociallyConstructedObject](#KindOfSociallyConstructedObject) whose members are all of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfOrganization, + hqdm:KindOfParty, + hqdm:KindOfSociallyConstructedObject ; + foaf:image . + +hqdm:KindOfOrganizationComponent a rdfs:Class ; + skos:prefLabel "Kind of Organization Component"@en ; + skos:definition "A [ClassOfOrganizationComponent](#ClassOfOrganizationComponent) that is also a [KindOfSystemComponent](#KindOfSystemComponent) whose members are all of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfOrganizationComponent, + hqdm:KindOfSociallyConstructedObject, + hqdm:KindOfSystemComponent ; + foaf:image . + +hqdm:KindOfParty a rdfs:Class ; + skos:prefLabel "Kind of Party"@en ; + skos:definition "A [ClassOfParty](#ClassOfParty) that is also a [KindOfSystem](#KindOfSystem) where all the members are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfParty, + hqdm:KindOfSystem ; + foaf:image . + +hqdm:KindOfPerson a rdfs:Class ; + skos:prefLabel "Kind of Person"@en ; + skos:definition "A [ClassOfPerson](#ClassOfPerson) that is also a [KindOfParty](#KindOfParty) whose members are all of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfPerson, + hqdm:KindOfParty ; + foaf:image . + +hqdm:KindOfPhysicalObject a rdfs:Class ; + skos:prefLabel "Kind of Physical Object"@en ; + skos:definition "A [ClassOfPhysicalObject](#ClassOfPhysicalObject) that is also a [KindOfIndividual](#KindOfIndividual) where each [PhysicalObject](#PhysicalObject) has members that are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalObject, + hqdm:KindOfIndividual ; + foaf:image . + +hqdm:KindOfPhysicalProperty a rdfs:Class ; + skos:prefLabel "Kind of Physical Property"@en ; + skos:definition "A [ClassOfPhysicalProperty](#ClassOfPhysicalProperty) where each `member of` a [KindOfPhysicalProperty](#KindOfPhysicalProperty) is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalProperty ; + skos:example "Color, with members including red, green, and blue."@en ; + foaf:image . + +hqdm:KindOfPhysicalQuantity a rdfs:Class ; + skos:prefLabel "Kind of Physical Quantity"@en ; + skos:definition "A [ClassOfPhysicalQuantity](#ClassOfPhysicalQuantity) that is also a [KindOfPhysicalProperty](#KindOfPhysicalProperty) such that each [member of](#memberOf) the same [Kind Of Physical Quantity](#KindOfPhysicalQuantity) is comparable to the others."@en ; + rdfs:subClassOf hqdm:ClassOfPhysicalQuantity, + hqdm:KindOfPhysicalProperty ; + skos:example "Temperature and pressure are members of [Kind Of Physical Quantity](#KindOfPhysicalQuantity)."@en ; + foaf:image . + +hqdm:KindOfPosition a rdfs:Class ; + skos:prefLabel "Kind of Position"@en ; + skos:definition "A [ClassOfPosition](#ClassOfPosition) that is also a [KindOfOrganizationComponent](#KindOfOrganizationComponent) where all the members are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfPosition, + hqdm:KindOfOrganizationComponent ; + foaf:image . + +hqdm:KindOfSociallyConstructedObject a rdfs:Class ; + skos:prefLabel "Kind of Socially Constructed Object"@en ; + skos:definition "A [ClassOfSociallyConstructedObject](#ClassOfSociallyConstructedObject) that is also a [KindOfIntentionallyConstructedObject](#KindOfIntentionallyConstructedObject) where each `Kind of Socially Constructed Object` has members that are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfSociallyConstructedObject, + hqdm:KindOfIntentionallyConstructedObject ; + foaf:image . + +hqdm:KindOfSystem a rdfs:Class ; + skos:prefLabel "Kind of System"@en ; + skos:definition "A [ClassOfSystem](#ClassOfSystem) that is also a [KindOfOrdinaryPhysicalObject](#KindOfOrdinaryPhysicalObject) where each `member of` a `Kind of System` is of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfSystem, + hqdm:KindOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:KindOfSystemComponent a rdfs:Class ; + skos:prefLabel "Kind of System Component"@en ; + skos:definition "A [ClassOfSystemComponent](#ClassOfSystemComponent) that is also a [KindOfPhysicalObject](#KindOfPhysicalObject) where all the members are of the same kind."@en ; + rdfs:subClassOf hqdm:ClassOfSystemComponent, + hqdm:KindOfPhysicalObject ; + foaf:image . + +hqdm:LanguageCommunity a rdfs:Class ; + skos:prefLabel "Language Community"@en ; + skos:definition "An [Organization](#Organization) that is a group of people who share a common understanding of a set of signs."@en ; + rdfs:subClassOf hqdm:Organization, + hqdm:StateOfLanguageCommunity ; + skos:scopeNote "This is not restricted to natural languages, but also controlled languages, taxonomies etc."@en ; + foaf:image . + +hqdm:MoneyAsset a rdfs:Class ; + skos:prefLabel "Money Asset"@en ; + skos:definition "An [Asset](#Asset) that is a [StateOfAmountOfMoney](#StateOfAmountOfMoney)."@en ; + rdfs:subClassOf hqdm:Asset, + hqdm:StateOfAmountOfMoney ; + foaf:image . + +hqdm:Offer a rdfs:Class ; + skos:prefLabel "Offer"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) that proposes an exchange of something for some consideration."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:OfferAndAcceptanceForGoods a rdfs:Class ; + skos:prefLabel "Offer and Acceptance for Goods"@en ; + skos:definition "A [ReachingAgreement](#ReachingAgreement) that [consists of](#consistsOf) exactly one [Offer](#Offer) of a [TransferOfOwnershipOfMoney](#TransferOfOwnershipOfMoney) for exactly one [TransferOfOwnership](#TransferOfOwnership) that is accepted."@en ; + rdfs:subClassOf hqdm:AgreeContract ; + foaf:image . + +hqdm:OfferForGoods a rdfs:Class ; + skos:prefLabel "Offer for Goods"@en ; + skos:definition "An [Offer](#Offer) of an [ExchangeOfGoodsAndMoney](#ExchangeOfGoodsAndMoney)."@en ; + rdfs:subClassOf hqdm:Offer ; + foaf:image . + +hqdm:Offering a rdfs:Class ; + skos:prefLabel "Offering"@en ; + skos:definition "A [ClassOfOffer](#ClassOfOffer) that is for a [ClassOfIndividual](#ClassOfIndividual), at a [Price](#Price), by a [Party](#Party), for a [PeriodOfTime](#PeriodOfTime)."@en ; + rdfs:subClassOf hqdm:ClassOfOffer ; + foaf:image . + +hqdm:OrdinaryBiologicalObject a rdfs:Class ; + skos:prefLabel "Ordinary Biological Object"@en ; + skos:definition "A [StateOfOrdinaryBiologicalObject](#StateOfOrdinaryBiologicalObject), a [BiologicalObject](#BiologicalObject), and an [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) that is a [BiologicalObject](#BiologicalObject) that does not survive the replacement of all of its parts."@en ; + rdfs:subClassOf hqdm:BiologicalObject, + hqdm:OrdinaryPhysicalObject, + hqdm:StateOfOrdinaryBiologicalObject ; + foaf:image . + +hqdm:OrdinaryFunctionalObject a rdfs:Class ; + skos:prefLabel "Ordinary Functional Object"@en ; + skos:definition "Any [StateOfOrdinaryFunctionalObject](#StateOfOrdinaryFunctionalObject) and [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) that is a [FunctionalObject](#FunctionalObject)."@en ; + rdfs:subClassOf hqdm:FunctionalObject, + hqdm:OrdinaryPhysicalObject, + hqdm:StateOfOrdinaryFunctionalObject ; + foaf:image . + +hqdm:OrdinaryPhysicalObject a rdfs:Class ; + skos:prefLabel "Ordinary Physical Object"@en ; + skos:definition "A [PhysicalObject](#PhysicalObject) that does not survive changing all its parts at once."@en ; + rdfs:subClassOf hqdm:PhysicalObject, + hqdm:StateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:Organization a rdfs:Class ; + skos:prefLabel "Organization"@en ; + skos:definition "A [StateOfOrganization](#StateOfOrganization), that is also a [Party](#Party), and a [SociallyConstructedObject](#SociallyConstructedObject) that is an organized body of people."@en ; + rdfs:subClassOf hqdm:Party, + hqdm:SociallyConstructedObject, + hqdm:StateOfOrganization ; + foaf:image . + +hqdm:OrganizationComponent a rdfs:Class ; + skos:prefLabel "Organization Component"@en ; + skos:definition "A [StateOfOrganizationComponent](#StateOfOrganizationComponent), [SystemComponent](#SystemComponent), and [SociallyConstructedObject](#SociallyConstructedObject) that is a `component of` an [Organization](#Organization) that can be completely replaced without losing its identity."@en ; + rdfs:subClassOf hqdm:SociallyConstructedObject, + hqdm:StateOfOrganizationComponent, + hqdm:SystemComponent ; + foaf:image . + +hqdm:Owner a rdfs:Class ; + skos:prefLabel "Owner"@en ; + skos:definition "A [StateOfParty](#StateOfParty) that is also a [Participant](#Participant) that is a [participant in](#participantIn) an [Ownership](#Ownership)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfParty ; + foaf:image . + +hqdm:Ownership a rdfs:Class ; + skos:prefLabel "Ownership"@en ; + skos:definition "An [Association](#Association) that [consists of](#consistsOf) an [Owner](#Owner) and an [Asset](#Asset) where the [Owner](#Owner) owns the [Asset](#Asset)."@en ; + rdfs:subClassOf hqdm:Association ; + foaf:image . + +hqdm:Participant a rdfs:Class ; + skos:prefLabel "Participant"@en ; + skos:definition "A [State](#State) that is a [participant in](#participantIn) an [Activity](#Activity) or [Association](#Association)."@en ; + rdfs:subClassOf hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:Party a rdfs:Class ; + skos:prefLabel "Party"@en ; + skos:definition "A [StateOfParty](#StateOfParty) that is also a [System](#System) that is a [Person](#Person) or an [Organization](#Organization)."@en ; + rdfs:subClassOf hqdm:StateOfParty, + hqdm:System ; + foaf:image . + +hqdm:Pattern a rdfs:Class ; + skos:prefLabel "Pattern"@en ; + skos:definition "A [ClassOfSign](#ClassOfSign) where all the signs are of the same `Pattern`."@en ; + rdfs:subClassOf hqdm:ClassOfSign ; + foaf:image . + +hqdm:PeriodOfTime a rdfs:Class ; + skos:prefLabel "Period of Time"@en ; + skos:definition "A [State](#State) that is a `temporal part of` some [PossibleWorld](#PossibleWorld)."@en ; + rdfs:subClassOf hqdm:State ; + foaf:image . + +hqdm:Person a rdfs:Class ; + skos:prefLabel "Person"@en ; + skos:definition "A [BiologicalSystem](#BiologicalSystem) that is also, a [StateOfPerson](#StateOfPerson), and a [Party](#Party) that is a human being."@en ; + rdfs:subClassOf hqdm:BiologicalSystem, + hqdm:Party, + hqdm:StateOfPerson ; + foaf:image . + +hqdm:PersonInPosition a rdfs:Class ; + skos:prefLabel "Person in Position"@en ; + skos:definition "A [StateOfPosition](#StateOfPosition), that is also a [StateOfPerson](#StateOfPerson), and an [InstalledObject](#InstalledObject) that is a [Person](#Person) while they are in a [Position](#Position) and also the [Position](#Position) while it is filled by the [Person](#Person)."@en ; + rdfs:subClassOf hqdm:InstalledObject, + hqdm:StateOfPerson, + hqdm:StateOfPosition ; + foaf:image . + +hqdm:PhysicalObject a rdfs:Class ; + skos:prefLabel "Physical Object"@en ; + skos:definition "An [Individual](#Individual) that consists of a distribution of matter and/or energy."@en ; + rdfs:subClassOf hqdm:Individual, + hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:PhysicalProperty a rdfs:Class ; + skos:prefLabel "Physical Property"@en ; + skos:definition "A [ClassOfState](#ClassOfState) that is some characteristic that is the same for each state that possesses it (is a `member of` it)."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + skos:example "The color red is a [Physical Property](#PhysicalProperty)."@en ; + foaf:image . + +hqdm:PhysicalPropertyRange a rdfs:Class ; + skos:prefLabel "Physical Property Range"@en ; + skos:definition "A [ClassOfState](#ClassOfState) where each member of the set is a member of a [PhysicalProperty](#PhysicalProperty) within the range."@en ; + rdfs:subClassOf hqdm:ClassOfState ; + skos:scopeNote "The [Physical Property Range](#PhysicalPropertyRange) is a supertype of each [Physical Property](#PhysicalProperty) in the range."@en ; + foaf:image . + +hqdm:PhysicalQuantity a rdfs:Class ; + skos:prefLabel "Physical Quantity"@en ; + skos:definition "A [PhysicalProperty](#PhysicalProperty) that is a measurable quantity of a [KindOfPhysicalQuantity](#KindOfPhysicalQuantity)."@en ; + rdfs:subClassOf hqdm:PhysicalProperty ; + skos:example "The degree of hotness known as 20 Celsius is a [Physical Quantity](#PhysicalQuantity)."@en ; + foaf:image . + +hqdm:PhysicalQuantityRange a rdfs:Class ; + skos:prefLabel "Physical Quantity Range"@en ; + skos:definition "A [PhysicalPropertyRange](#PhysicalPropertyRange) that ranges over [PhysicalQuantity](#PhysicalQuantity) values."@en ; + rdfs:subClassOf hqdm:PhysicalPropertyRange ; + foaf:image . + +hqdm:Plan a rdfs:Class ; + skos:prefLabel "Plan"@en ; + skos:definition "A [PossibleWorld](#PossibleWorld) that some party would like to bring about."@en ; + rdfs:subClassOf hqdm:PossibleWorld ; + foaf:image . + +hqdm:PointInTime a rdfs:Class ; + skos:prefLabel "Point in Time"@en ; + skos:definition "An [Event](#Event) that is the whole of space at an instant from some viewpoint."@en ; + rdfs:subClassOf hqdm:Event ; + foaf:image . + +hqdm:Position a rdfs:Class ; + skos:prefLabel "Position"@en ; + skos:definition "An [OrganizationComponent](#OrganizationComponent) that is also a [StateOfPosition](#StateOfPosition) that may be held by a person."@en ; + rdfs:subClassOf hqdm:OrganizationComponent, + hqdm:StateOfPosition ; + skos:example "Normally a position is held by one [Person](#Person) at a time, but this does not have to be the case."@en ; + foaf:image . + +hqdm:PossibleWorld a rdfs:Class ; + skos:prefLabel "Possible World"@en ; + skos:definition "An [Individual](#Individual) that is a complete spatio-temporal history of some possible world."@en ; + rdfs:subClassOf hqdm:Individual, + hqdm:PeriodOfTime ; + foaf:image . + +hqdm:Price a rdfs:Class ; + skos:prefLabel "Price"@en ; + skos:definition "A [ClassOfAmountOfMoney](#ClassOfAmountOfMoney) that is the `Consideration By Class` in an [Offering](#Offering)."@en ; + rdfs:subClassOf hqdm:ClassOfAmountOfMoney ; + foaf:image . + +hqdm:ProductBrand a rdfs:Class ; + skos:prefLabel "Product Brand"@en ; + skos:definition "A [ClassOfSalesProductInstance](#ClassOfSalesProductInstance) that is a set of [SalesProductInstance](#SalesProductInstance) sold under a brand name."@en ; + rdfs:subClassOf hqdm:ClassOfSalesProductInstance ; + foaf:image . + +hqdm:ProductOffering a rdfs:Class ; + skos:prefLabel "Product Offering"@en ; + skos:definition "An [Offering](#Offering) that is for a [SalesProduct](#SalesProduct)."@en ; + rdfs:subClassOf hqdm:Offering ; + foaf:image . + +hqdm:ReachingAgreement a rdfs:Class ; + skos:prefLabel "Reaching Agreement"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) where two or more parties determine a course of action."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:RecognizingLanguageCommunity a rdfs:Class ; + skos:prefLabel "Recognizing Language Community"@en ; + skos:definition "A [State Of Language Community](#StateOfLanguageCommunity) that recognizes what a [Pattern](#Pattern) is intended to represent."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfLanguageCommunity ; + foaf:image . + +hqdm:Relationship a rdfs:Class ; + skos:prefLabel "Relationship"@en ; + skos:definition "An [Abstract Object](#AbstractObject) that is what one thing has to do with one or more others."@en ; + rdfs:subClassOf hqdm:AbstractObject ; + foaf:image . + +hqdm:RepresentationByPattern a rdfs:Class ; + skos:prefLabel "Representation by Pattern"@en ; + skos:definition "A [Class Of Representation](#ClassOfRepresentation) where the [Sign](#Sign) in all the members are members of the [Pattern](#Pattern) specified."@en ; + rdfs:subClassOf hqdm:ClassOfRepresentation ; + foaf:image . + +hqdm:RepresentationBySign a rdfs:Class ; + skos:prefLabel "Representation by Sign"@en ; + skos:definition "An [Association](#Association) of a [Sign](#Sign) and a [RecognizingLanguageCommunity](#RecognizingLanguageCommunity) that recognizes the [Sign](#Sign) as representing some [Thing](#Thing)."@en ; + rdfs:subClassOf hqdm:Association ; + foaf:image . + +hqdm:Requirement a rdfs:Class ; + skos:prefLabel "Requirement"@en ; + skos:definition "A [SpatioTemporalExtent](#SpatioTemporalExtent) that is `part of plan` at least one [Plan](#Plan) and is `defined by` exactly one [RequirementSpecification](#RequirementSpecification)."@en ; + rdfs:subClassOf hqdm:SpatioTemporalExtent ; + foaf:image . + +hqdm:RequirementSpecification a rdfs:Class ; + skos:prefLabel "Requirement Specification"@en ; + skos:definition "A [ClassOfSpatioTemporalExtent](#ClassOfSpatioTemporalExtent) that is the intersection_of one or more [ClassOfState](#ClassOfState)."@en ; + rdfs:subClassOf hqdm:ClassOfSpatioTemporalExtent ; + foaf:image . + +hqdm:Role a rdfs:Class ; + skos:prefLabel "Role"@en ; + skos:definition "A [ClassOfParticipant](#ClassOfParticipant) where each member participates in the same way in an [Activity](#Activity) or [Association](#Association)."@en ; + rdfs:subClassOf hqdm:ClassOfParticipant ; + foaf:image . + +hqdm:SaleOfGoods a rdfs:Class ; + skos:prefLabel "Sale of Goods"@en ; + skos:definition "An [AgreementProcess](#AgreementProcess) that consists of an [OfferAndAcceptanceForGoods](#OfferAndAcceptanceForGoods) and an [ExchangeOfGoodsAndMoney](#ExchangeOfGoodsAndMoney)."@en ; + rdfs:subClassOf hqdm:ContractProcess ; + foaf:image . + +hqdm:SalesProduct a rdfs:Class ; + skos:prefLabel "Sales Product"@en ; + skos:definition "A [ClassOfSalesProductInstance](#ClassOfSalesProductInstance) that is a set of [SalesProductInstance](#SalesProductInstance) sold under the same product name."@en ; + rdfs:subClassOf hqdm:ClassOfSalesProductInstance ; + foaf:image . + +hqdm:SalesProductInstance a rdfs:Class ; + skos:prefLabel "Sales Product Instance"@en ; + skos:definition "An [OrdinaryFunctionalObject](#OrdinaryFunctionalObject) that is produced in order to be sold."@en ; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject, + hqdm:StateOfSalesProductInstance ; + foaf:image . + +hqdm:SalesProductVersion a rdfs:Class ; + skos:prefLabel "Sales Product Version"@en ; + skos:definition "A [ClassOfSalesProductInstance](#ClassOfSalesProductInstance) that is the customer facing specification of a version of a [SalesProduct](#SalesProduct)."@en ; + rdfs:subClassOf hqdm:ClassOfSalesProductInstance ; + foaf:image . + +hqdm:Scale a rdfs:Class ; + skos:prefLabel "Scale"@en ; + skos:definition "A `scale` is a function from [KindOfPhysicalQuantity](#KindOfPhysicalQuantity) to the real numbers."@en ; + rdfs:subClassOf hqdm:Function ; + skos:example "The Celsius scale is a mapping from temperature to real number."@en ; + foaf:image . + +hqdm:Sign a rdfs:Class ; + skos:prefLabel "Sign"@en ; + skos:definition "A [StateOfSign](#StateOfSign), that is also a [SociallyConstructedObject](#SociallyConstructedObject), and a [Participant](#Participant) that represents some [Thing](#Thing) for some community in one or more [RepresentationBySign](#RepresentationBySign)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:SociallyConstructedObject, + hqdm:StateOfSign ; + foaf:image . + +hqdm:SociallyConstructedActivity a rdfs:Class ; + skos:prefLabel "Socially Constructed Activity"@en ; + skos:definition "Any [SociallyConstructedObject](#SociallyConstructedObject) that is also an [Activity](#Activity)."@en ; + rdfs:subClassOf hqdm:Activity, + hqdm:SociallyConstructedObject ; + foaf:image . + +hqdm:SociallyConstructedObject a rdfs:Class ; + skos:prefLabel "Socially Constructed Object"@en ; + skos:definition "An [IntentionallyConstructedObject](#IntentionallyConstructedObject) that is necessarily constructed by agreement or at least acquiescence of many people."@en ; + rdfs:subClassOf hqdm:IntentionallyConstructedObject, + hqdm:StateOfSociallyConstructedObject ; + foaf:image . + +hqdm:SpatioTemporalExtent a rdfs:Class ; + skos:prefLabel "Spatio-Temporal Extent"@en ; + skos:definition "A [Thing](#Thing) that exists in time and space."@en ; + rdfs:subClassOf hqdm:Thing ; + foaf:image . + +hqdm:State a rdfs:Class ; + skos:prefLabel "State"@en ; + skos:definition "A [SpatioTemporalExtent](#SpatioTemporalExtent) that is an [Individual](#Individual) or a `temporal part of` some [Individual](#Individual)."@en ; + rdfs:subClassOf hqdm:SpatioTemporalExtent ; + foaf:image . + +hqdm:StateOfActivity a rdfs:Class ; + skos:prefLabel "State of Activity"@en ; + skos:definition "A state that is an [Activity](#Activity) or a `temporal part of` an [Activity](#Activity)."@en ; + rdfs:subClassOf hqdm:State ; + foaf:image . + +hqdm:StateOfAmountOfMoney a rdfs:Class ; + skos:prefLabel "State of Amount of Money"@en ; + skos:definition "A [SociallyConstructedObject](#SociallyConstructedObject) that is also a [StateOfPhysicalObject](#StateOfPhysicalObject) that is a `temporal part of` an [AmountOfMoney](#AmountOfMoney)"@en ; + rdfs:subClassOf hqdm:StateOfPhysicalObject, + hqdm:StateOfSociallyConstructedObject ; + foaf:image . + +hqdm:StateOfAssociation a rdfs:Class ; + skos:prefLabel "State of Association"@en ; + skos:definition "A [State](#State) that is an [Association](#Association) or a `temporal part of` an [Association](#Association)."@en ; + rdfs:subClassOf hqdm:State ; + foaf:image . + +hqdm:StateOfBiologicalObject a rdfs:Class ; + skos:prefLabel "State of Biological Object"@en ; + skos:definition "A [StateOfPhysicalObject](#StateOfPhysicalObject) that is a [BiologicalObject](#BiologicalObject) or a `temporal part of` a [BiologicalObject](#BiologicalObject)."@en ; + rdfs:subClassOf hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:StateOfBiologicalSystem a rdfs:Class ; + skos:prefLabel "State of Biological System"@en ; + skos:definition "A [State of Ordinary Biological Object](#StateOfOrdinaryBiologicalObject) and [StateOfSystem](#StateOfSystem) that is [BiologicalSystem](#BiologicalSystem) or a `temporal part of` a [BiologicalSystem](#BiologicalSystem)."@en ; + rdfs:subClassOf hqdm:StateOfOrdinaryBiologicalObject, + hqdm:StateOfSystem ; + foaf:image . + +hqdm:StateOfBiologicalSystemComponent a rdfs:Class ; + skos:prefLabel "State of Biological System Component"@en ; + skos:definition "A [State of Biological Object](#StateOfBiologicalObject) and [State Of System Component](#StateOfSystemComponent) that is a [BiologicalSystemComponent](#BiologicalSystemComponent) or a `temporal part of` a [BiologicalSystemComponent](#BiologicalSystemComponent)."@en ; + rdfs:subClassOf hqdm:StateOfBiologicalObject, + hqdm:StateOfSystemComponent ; + foaf:image . + +hqdm:StateOfFunctionalObject a rdfs:Class ; + skos:prefLabel "State of Functional Object"@en ; + skos:definition "A [StateOfIntentionallyConstructedObject](#StateOfIntentionallyConstructedObject) and [StateOfPhysicalObject](#StateOfPhysicalObject) that is a [FunctionalObject](#FunctionalObject) or a `temporal part of` a [FunctionalObject](#FunctionalObject)."@en ; + rdfs:subClassOf hqdm:StateOfIntentionallyConstructedObject, + hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:StateOfFunctionalSystem a rdfs:Class ; + skos:prefLabel "State of Functional System"@en ; + skos:definition "Any [StateOfOrdinaryFunctionalObject](#StateOfOrdinaryFunctionalObject) that is also a [StateOfSystem](#StateOfSystem)."@en ; + rdfs:subClassOf hqdm:StateOfOrdinaryFunctionalObject, + hqdm:StateOfSystem ; + foaf:image . + +hqdm:StateOfFunctionalSystemComponent a rdfs:Class ; + skos:prefLabel "State of Functional System Component"@en ; + skos:definition "A [StateOfIntentionallyConstructedObject](#StateOfIntentionallyConstructedObject) that is a [SystemComponent](#SystemComponent) or a `temporal part of` a [SystemComponent](#SystemComponent)."@en ; + rdfs:subClassOf hqdm:StateOfFunctionalObject, + hqdm:StateOfSystemComponent ; + foaf:image . + +hqdm:StateOfIntentionallyConstructedObject a rdfs:Class ; + skos:prefLabel "State of Intentionally Constructed Object"@en ; + skos:definition "A [State](#State) that is an [IntentionallyConstructedObject](#IntentionallyConstructedObject) or a `temporal part of` an [IntentionallyConstructedObject](#IntentionallyConstructedObject)."@en ; + rdfs:subClassOf hqdm:State ; + foaf:image . + +hqdm:StateOfLanguageCommunity a rdfs:Class ; + skos:prefLabel "State of Language Community"@en ; + skos:definition "A [StateOfOrganization](#StateOfOrganization) that is a `temporal part of` a [LanguageCommunity](#LanguageCommunity)."@en ; + rdfs:subClassOf hqdm:StateOfOrganization ; + foaf:image . + +hqdm:StateOfOrdinaryBiologicalObject a rdfs:Class ; + skos:prefLabel "State of Ordinary Biological Object"@en ; + skos:definition "A [StateOfBiologicalObject](#StateOfBiologicalObject) that is also a [StateOfOrdinaryPhysicalObject](#StateOfOrdinaryPhysicalObject) that is an [OrdinaryBiologicalObject](#OrdinaryBiologicalObject) or a `temporal part of` an [OrdinaryBiologicalObject](#OrdinaryBiologicalObject)."@en ; + rdfs:subClassOf hqdm:StateOfBiologicalObject, + hqdm:StateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:StateOfOrdinaryFunctionalObject a rdfs:Class ; + skos:prefLabel "State of Ordinary Functional Object"@en ; + skos:definition "Any [StateOfFunctionalObject](#StateOfFunctionalObject) that is also a [StateOfOrdinaryPhysicalObject](#StateOfOrdinaryPhysicalObject)."@en ; + rdfs:subClassOf hqdm:StateOfFunctionalObject, + hqdm:StateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:StateOfOrdinaryPhysicalObject a rdfs:Class ; + skos:prefLabel "State of Ordinary Physical Object"@en ; + skos:definition "A [StateOfPhysicalObject](#StateOfPhysicalObject) that is an [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) or a `temporal part of` one."@en ; + rdfs:subClassOf hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:StateOfOrganization a rdfs:Class ; + skos:prefLabel "State of Organization"@en ; + skos:definition "A [StateOfParty](#StateOfParty) that is also a [StateOfSociallyConstructedObject](#StateOfSociallyConstructedObject) that is an [Organization](#Organization) or a `temporal part of` an [Organization](#Organization)."@en ; + rdfs:subClassOf hqdm:StateOfParty, + hqdm:StateOfSociallyConstructedObject ; + foaf:image . + +hqdm:StateOfOrganizationComponent a rdfs:Class ; + skos:prefLabel "State of Organization Component"@en ; + skos:definition "A [StateOfSystemComponent](#StateOfSystemComponent) that is also a [StateOfSociallyConstructedObject](#StateOfSociallyConstructedObject) that is a `temporal part of` an [OrganizationComponent](#OrganizationComponent)."@en ; + rdfs:subClassOf hqdm:StateOfSociallyConstructedObject, + hqdm:StateOfSystemComponent ; + foaf:image . + +hqdm:StateOfParty a rdfs:Class ; + skos:prefLabel "State of Party"@en ; + skos:definition "A [StateOfSystem](#StateOfSystem) that is a party or a `temporal part of` a [Party](#Party)."@en ; + rdfs:subClassOf hqdm:StateOfSystem ; + foaf:image . + +hqdm:StateOfPerson a rdfs:Class ; + skos:prefLabel "State of Person"@en ; + skos:definition "A [StateOfBiologicalSystem](#StateOfBiologicalSystem) and [StateOfParty](#StateOfParty) that is a [Person](#Person) or a `temporal part of` a [Person](#Person)."@en ; + rdfs:subClassOf hqdm:StateOfBiologicalSystem, + hqdm:StateOfParty ; + foaf:image . + +hqdm:StateOfPhysicalObject a rdfs:Class ; + skos:prefLabel "State of Physical Object"@en ; + skos:definition "A [State](#State) that is a [PhysicalObject](#PhysicalObject) or a `temporal part of` a [PhysicalObject](#PhysicalObject)."@en ; + rdfs:subClassOf hqdm:State ; + foaf:image . + +hqdm:StateOfPosition a rdfs:Class ; + skos:prefLabel "State of Position"@en ; + skos:definition "A [StateOfOrganizationComponent](#StateOfOrganizationComponent) that is a [Position](#Position) or a `temporal part of` a [Position](#Position)."@en ; + rdfs:subClassOf hqdm:StateOfOrganizationComponent ; + foaf:image . + +hqdm:StateOfSalesProductInstance a rdfs:Class ; + skos:prefLabel "State of Sales Product Instance"@en ; + skos:definition "A [StateOfOrdinaryFunctionalObject](#StateOfOrdinaryFunctionalObject) that is a [SalesProductInstance](#SalesProductInstance) or a `temporal part of` one."@en ; + rdfs:subClassOf hqdm:StateOfOrdinaryFunctionalObject ; + foaf:image . + +hqdm:StateOfSign a rdfs:Class ; + skos:prefLabel "State of Sign"@en ; + skos:definition "A [StateOfSociallyConstructedObject](#StateOfSociallyConstructedObject) that is a [Sign](#Sign) or a `temporal part of` a [Sign](#Sign)."@en ; + rdfs:subClassOf hqdm:StateOfSociallyConstructedObject ; + foaf:image . + +hqdm:StateOfSociallyConstructedActivity a rdfs:Class ; + skos:prefLabel "State of Socially Constructed Activity"@en ; + skos:definition "Any [StateOfSociallyConstructedObject](#StateOfSociallyConstructedObject) that is also a [StateOfActivity](#StateOfActivity)."@en ; + rdfs:subClassOf hqdm:StateOfActivity, + hqdm:StateOfSociallyConstructedObject ; + foaf:image . + +hqdm:StateOfSociallyConstructedObject a rdfs:Class ; + skos:prefLabel "State of Socially Constructed Object"@en ; + skos:definition "A [StateOfIntentionallyConstructedObject](#StateOfIntentionallyConstructedObject) that is a [SociallyConstructedObject](#SociallyConstructedObject) or a `temporal part of` a [SociallyConstructedObject](#SociallyConstructedObject)."@en ; + rdfs:subClassOf hqdm:StateOfIntentionallyConstructedObject ; + foaf:image . + +hqdm:StateOfSystem a rdfs:Class ; + skos:prefLabel "State of System"@en ; + skos:definition "A [StateOfOrdinaryPhysicalObject](#StateOfOrdinaryPhysicalObject) that is a [System](#System) or a `temporal part of` a [System](#System)."@en ; + rdfs:subClassOf hqdm:StateOfOrdinaryPhysicalObject ; + foaf:image . + +hqdm:StateOfSystemComponent a rdfs:Class ; + skos:prefLabel "State of System Component"@en ; + skos:definition "A [StateOfPhysicalObject](#StateOfPhysicalObject) that is a [SystemComponent](#SystemComponent) or a `temporal part of` a [SystemComponent](#SystemComponent)."@en ; + rdfs:subClassOf hqdm:StateOfPhysicalObject ; + foaf:image . + +hqdm:System a rdfs:Class ; + skos:prefLabel "System"@en ; + skos:definition "An [OrdinaryPhysicalObject](#OrdinaryPhysicalObject) that is an organized or connected group of [PhysicalObject](#PhysicalObject)."@en ; + rdfs:subClassOf hqdm:OrdinaryPhysicalObject, + hqdm:StateOfSystem ; + foaf:image . + +hqdm:SystemComponent a rdfs:Class ; + skos:prefLabel "System Component"@en ; + skos:definition "A [PhysicalObject](#PhysicalObject) that is a `component of` a [System](#System) and that can be completely replaced without losing identity."@en ; + rdfs:subClassOf hqdm:PhysicalObject, + hqdm:StateOfSystemComponent ; + skos:scopeNote "A `System Component`'s existence is dependent on the [System](#System) it is a component of, unlike any [Ordinary Physical Object](#OrdinaryPhysicalObject) that may be [installed](#InstalledObject) as the component."@en ; + foaf:image . + +hqdm:Thing a rdfs:Class ; + skos:prefLabel "Thing"@en ; + skos:definition "Anything that exists, real or imagined."@en ; + rdfs:subClassOf rdfs:Resource ; + foaf:image . + +hqdm:TransferOfOwnership a rdfs:Class ; + skos:prefLabel "Transfer of Ownership"@en ; + skos:definition "A [SociallyConstructedActivity](#SociallyConstructedActivity) that ends one [Ownership](#Ownership) and begins another for assets that are a `temporal part of` the same [PhysicalObject](#PhysicalObject)."@en ; + rdfs:subClassOf hqdm:SociallyConstructedActivity ; + foaf:image . + +hqdm:TransferOfOwnershipOfMoney a rdfs:Class ; + skos:prefLabel "Transfer of Ownership of Money"@en ; + skos:definition "A [TransferOfOwnership](#TransferOfOwnership) where the [Asset](#Asset) is a [MoneyAsset](#MoneyAsset)."@en ; + rdfs:subClassOf hqdm:TransferOfOwnership ; + foaf:image . + +hqdm:Transferee a rdfs:Class ; + skos:prefLabel "Transferee"@en ; + skos:definition "A [StateOfParty](#StateOfParty) and [Participant](#Participant) receiving ownership in a [TransferOfOwnership](#TransferOfOwnership)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfParty ; + foaf:image . + +hqdm:Transferor a rdfs:Class ; + skos:prefLabel "Transferor"@en ; + skos:definition "A [StateOfParty](#StateOfParty) that is also a [Participant](#Participant) that is a `temporal part of` an [Owner](#Owner) that is a [participant in](#participantIn) one or more [TransferOfOwnership](#TransferOfOwnership)."@en ; + rdfs:subClassOf hqdm:Participant, + hqdm:StateOfParty ; + foaf:image . + +hqdm:UnitOfMeasure a rdfs:Class ; + skos:prefLabel "Unit of Measure"@en ; + skos:definition "A plus one [Function](#Function) for a [Scale](#Scale)."@en ; + rdfs:subClassOf hqdm:Function ; + foaf:image . diff --git a/examples/src/test/resources/validation.rules b/examples/src/test/resources/validation.rules index b140473e..7072f8a1 100644 --- a/examples/src/test/resources/validation.rules +++ b/examples/src/test/resources/validation.rules @@ -1,7 +1,8 @@ @prefix rdfs: . @prefix rdf: . @prefix xsd: . -@prefix hqdm: . +@prefix hqdm: . +@prefix skos: . @include . @@ -10,24 +11,14 @@ # need 'there exists' rules. # -# -# Check that all classes have a data_EntityName predicate. -# -[checkForDataEntityName: - (?y rb:violation error('Missing Entity Name', 'Entity should have predicate data_EntityName', ?s)) - <- - (?s rdf:type hqdm:class) - noValue(?s hqdm:data_EntityName) -] - # # Check that participants have roles. # [checkParticipantRoles: (?y rb:violation error('Missing Participant Role', 'All participants should be a member_of_kind of a Role', ?s)) <- - (?s rdf:type hqdm:participant) - noValue(?s hqdm:member_of_kind) + (?s rdf:type hqdm:Participant) + noValue(?s hqdm:memberOfKind) ] # @@ -36,8 +27,8 @@ [checkPartOfPossibleWorld: (?y rb:violation error('Missing PossibleWorld', 'All SpatioTemporalExtents should be a part of a PossibleWorld', ?s)) <- - (?s rdf:type hqdm:spatio_temporal_extent) - noValue(?s hqdm:part_of_possible_world) + (?s rdf:type hqdm:SpatioTemporalExtent) + noValue(?s hqdm:partOfPossibleWorld) ] # @@ -46,7 +37,7 @@ [checkTemporalPartsPartOfSubtype: (?y rb:violation error('Invalid temporal_part_of parthood', 'All temporal parts must be temporal parts of a subtype.', ?s, ?t)) <- - (?s hqdm:temporal_part_of ?t) + (?s hqdm:temporalPartOf ?t) noValue(?t rdfs:subClassOf ?s) ] @@ -56,8 +47,8 @@ [checkAllSignsHaveAValue: (?y rb:violation error('Sign has no value', 'All signs should have a value_ predicate.', ?s)) <- - (?s rdf:type hqdm:sign) - noValue(?t hqdm:value_ ?v) + (?s rdf:type hqdm:Sign) + noValue(?t hqdm:value ?v) ] # @@ -66,8 +57,9 @@ [checkSignsMemberOfPattern: (?y rb:violation error('Sign has no pattern', 'All signs should be member_of_ a pattern.', ?s)) <- - (?s rdf:type hqdm:sign) - noValue(?t hqdm:member_of_ ?pattern) + (?s rdf:type hqdm:Sign) + (?t hqdm:memberOf ?pattern) + noValue(?pattern rdf:type hqdm:Pattern) ] # @@ -76,8 +68,8 @@ [checkAllRepByPatternConsistOfPattern: (?y rb:violation error('representation_by_pattern has no pattern', 'All representation_by_pattern should consists_of_by_class a pattern.', ?r)) <- - (?r rdf:type hqdm:representation_by_pattern) - noValue(?r hqdm:consists_of_by_class ?pattern) + (?r rdf:type hqdm:RepresentationByPattern) + noValue(?r hqdm:consistsOfByClass ?pattern) ] # @@ -86,8 +78,8 @@ [checkAllRepByPatternConsistOfCommunity: (?y rb:violation error('representation_by_pattern has no community', 'All representation_by_pattern should consists_of_in_members a community.', ?r)) <- - (?r rdf:type hqdm:representation_by_pattern) - noValue(?r hqdm:consists_of_in_members ?community) + (?r rdf:type hqdm:RepresentationByPattern) + noValue(?r hqdm:consistsOfInMembers ?community) ] # @@ -96,8 +88,8 @@ [checkAllRepByPatternConsistOfPattern: (?y rb:violation error('pattern has no representation_by_pattern', 'All patterns should have representation_by_patterns', ?pattern)) <- - (?pattern rdf:type hqdm:pattern) - noValue(?r hqdm:consists_of_by_class ?pattern) + (?pattern rdf:type hqdm:Pattern) + noValue(?r hqdm:consistsOfByClass ?pattern) ] # @@ -106,8 +98,8 @@ [checkAllRepBySignConsistOfCommunity: (?y rb:violation error('representation_by_sign has no community', 'All representation_by_sign should consists_of_ a community.', ?r)) <- - (?r rdf:type hqdm:representation_by_sign) - noValue(?r hqdm:consists_of_ ?community) + (?r rdf:type hqdm:RepresentationBySign) + noValue(?r hqdm:consistsOf ?community) ] # @@ -116,8 +108,8 @@ [checkAllRepBySignConsistOfSign: (?y rb:violation error('representation_by_sign has no sign', 'All representation_by_sign should consists_of a sign.', ?r)) <- - (?r rdf:type hqdm:representation_by_sign) - noValue(?r hqdm:consists_of ?sign) + (?r rdf:type hqdm:RepresentationBySign) + noValue(?r hqdm:consistsOf ?sign) ] # @@ -126,7 +118,7 @@ [checkAllRepBySignRepresentThing: (?y rb:violation error('representation_by_sign represents nothing', 'All representation_by_sign should represent a thing.', ?r)) <- - (?r rdf:type hqdm:representation_by_sign) + (?r rdf:type hqdm:RepresentationBySign) noValue(?r hqdm:represents ?thing) ] @@ -136,8 +128,8 @@ [checkAllStateOfSignParticipantInRepBySign: (?y rb:violation error('state_of_sign not participant_in representation_by_sign', 'All state_of_sign should be participant_in a representation_by_sign', ?r)) <- - (?r rdf:type hqdm:state_of_sign) - noValue(?r hqdm:participant_in ?thing) + (?r rdf:type hqdm:StateOfSign) + noValue(?r hqdm:participantIn ?thing) ] # @@ -146,8 +138,8 @@ [checkAllRepBySignHaveStateOfSignParticipant: (?y rb:violation error('representation_by_sign missing a state_of_sign', 'All representation_by_sign should have state_of_sign as a participant', ?r)) <- - (?r rdf:type hqdm:representation_by_sign) - noValue(?s hqdm:participant_in ?r) + (?r rdf:type hqdm:RepresentationBySign) + noValue(?s hqdm:participantIn ?r) ] # @@ -156,8 +148,8 @@ [checkAllRepBySignHaveACommunityParticipant: (?y rb:violation error('representation_by_sign missing a recognizing_language_community', 'All representation_by_sign should have recognizing_language_community as a participant', ?r)) <- - (?r rdf:type hqdm:representation_by_sign) - noValue(?s hqdm:participant_in ?r) - noValue(?s rdf:type hqdm:recognizing_language_community) + (?r rdf:type hqdm:RepresentationBySign) + noValue(?s hqdm:participantIn ?r) + noValue(?s rdf:type hqdm:RecognizingLanguageCommunity) ] diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AbstractObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AbstractObjectBuilder.java index 005233d0..805a3a80 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AbstractObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AbstractObjectBuilder.java @@ -44,8 +44,8 @@ public AbstractObjectBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final AbstractObjectBuilder member__Of(final Class clazz) { - this.abstractObject.addValue(HQDM.MEMBER__OF, clazz.getId()); + public final AbstractObjectBuilder member_Of(final Class clazz) { + this.abstractObject.addValue(HQDM.MEMBER_OF, clazz.getId()); return this; } @@ -56,9 +56,9 @@ public final AbstractObjectBuilder member__Of(final Class clazz) { * @throws HqdmException If the AbstractObject is missing any mandatory properties. */ public AbstractObject build() throws HqdmException { - if (this.abstractObject.hasValue(HQDM.MEMBER__OF) - && this.abstractObject.values(HQDM.MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); + if (this.abstractObject.hasValue(HQDM.MEMBER_OF) + && this.abstractObject.values(HQDM.MEMBER_OF).isEmpty()) { + throw new HqdmException("Property Not Set: member_of"); } return this.abstractObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferBuilder.java index 512302d9..5764a1d8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferBuilder.java @@ -19,27 +19,20 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOffer; import uk.gov.gchq.magmacore.hqdm.model.Activity; import uk.gov.gchq.magmacore.hqdm.model.AgreeContract; -import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; import uk.gov.gchq.magmacore.hqdm.model.Class; -import uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity; import uk.gov.gchq.magmacore.hqdm.model.Event; import uk.gov.gchq.magmacore.hqdm.model.Individual; import uk.gov.gchq.magmacore.hqdm.model.KindOfActivity; @@ -49,6 +42,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -110,27 +104,14 @@ public final AcceptanceOfOfferBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOffer.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); - return this; - } - - /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} relationship type where an - * {@link Activity} may {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} one or more - * other {@link Activity}. - * - * @param activity The Activity. - * @return This builder. - */ - public final AcceptanceOfOfferBuilder consists_Of(final Activity activity) { - this.acceptanceOfOffer.addValue(CONSISTS_OF, activity.getId()); + public final AcceptanceOfOfferBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOffer.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -183,23 +164,8 @@ public final AcceptanceOfOfferBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AcceptanceOfOfferBuilder member__Of(final Class clazz) { - this.acceptanceOfOffer.addValue(MEMBER__OF, clazz.getId()); - return this; - } - - /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfSociallyConstructedActivity}. - * - * @param classOfSociallyConstructedActivity The ClassOfSociallyConstructedActivity. - * @return This builder. - */ - public final AcceptanceOfOfferBuilder member_Of( - final ClassOfSociallyConstructedActivity classOfSociallyConstructedActivity) { - this.acceptanceOfOffer.addValue(MEMBER_OF, classOfSociallyConstructedActivity.getId()); + public final AcceptanceOfOfferBuilder member_Of(final Class clazz) { + this.acceptanceOfOffer.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -213,6 +179,7 @@ public final AcceptanceOfOfferBuilder member_Of( */ public final AcceptanceOfOfferBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.acceptanceOfOffer.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.acceptanceOfOffer.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -224,8 +191,8 @@ public final AcceptanceOfOfferBuilder member_Of_Kind_M(final KindOfActivity kind * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOffer.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AcceptanceOfOfferBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOffer.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } @@ -244,27 +211,12 @@ public final AcceptanceOfOfferBuilder part_Of_M(final AgreeContract agreeContrac /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. - * - * @param agreementExecution The AgreementExecution. - * @return This builder. - */ - public final AcceptanceOfOfferBuilder part_Of_(final AgreementExecution agreementExecution) { - this.acceptanceOfOffer.addValue(PART_OF_, agreementExecution.getId()); - return this; - } - - /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -277,8 +229,8 @@ public final AcceptanceOfOfferBuilder part_Of_Possible_World_M(final PossibleWor /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#REFERENCES} relationship type where an - * {@link AcceptanceOfOffer} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#REFERENCES} exactly - * one {@link Offer} that is accepted. + * {@link AcceptanceOfOffer} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#REFERENCES} exactly one + * {@link Offer} that is accepted. * * @param offer The Offer. * @return Builder @@ -296,24 +248,23 @@ public final AcceptanceOfOfferBuilder references_M(final Offer offer) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOffer.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AcceptanceOfOfferBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOffer.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -350,10 +301,6 @@ public AcceptanceOfOffer build() throws HqdmException { && this.acceptanceOfOffer.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.acceptanceOfOffer.hasValue(MEMBER__OF) - && this.acceptanceOfOffer.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.acceptanceOfOffer.hasValue(MEMBER_OF) && this.acceptanceOfOffer.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -361,27 +308,16 @@ public AcceptanceOfOffer build() throws HqdmException { if (!this.acceptanceOfOffer.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.acceptanceOfOffer.hasValue(PART__OF) - && this.acceptanceOfOffer.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.acceptanceOfOffer.hasValue(PART_OF)) { + if (this.acceptanceOfOffer.hasValue(PART_OF) + && this.acceptanceOfOffer.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.acceptanceOfOffer.hasValue(PART_OF_) - && this.acceptanceOfOffer.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.acceptanceOfOffer.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } if (!this.acceptanceOfOffer.hasValue(REFERENCES)) { throw new HqdmException("Property Not Set: references"); } - if (this.acceptanceOfOffer.hasValue(TEMPORAL__PART_OF) - && this.acceptanceOfOffer.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.acceptanceOfOffer.hasValue(TEMPORAL_PART_OF) && this.acceptanceOfOffer.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferForGoodsBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferForGoodsBuilder.java index 39051ebf..47132fcc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferForGoodsBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AcceptanceOfOfferForGoodsBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOfferForGoods; @@ -49,6 +44,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -111,14 +107,14 @@ public final AcceptanceOfOfferForGoodsBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOfferForGoods.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AcceptanceOfOfferForGoodsBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOfferForGoods.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -178,8 +174,8 @@ public final AcceptanceOfOfferForGoodsBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder member__Of(final Class clazz) { - this.acceptanceOfOfferForGoods.addValue(MEMBER__OF, clazz.getId()); + public final AcceptanceOfOfferForGoodsBuilder member_Of(final Class clazz) { + this.acceptanceOfOfferForGoods.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -209,6 +205,7 @@ public final AcceptanceOfOfferForGoodsBuilder member_Of( */ public final AcceptanceOfOfferForGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.acceptanceOfOfferForGoods.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.acceptanceOfOfferForGoods.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -220,49 +217,46 @@ public final AcceptanceOfOfferForGoodsBuilder member_Of_Kind_M(final KindOfActiv * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOfferForGoods.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AcceptanceOfOfferForGoodsBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOfferForGoods.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an - * {@link AcceptanceOfOfferForGoods} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly one - * {@link OfferAndAcceptanceForGoods}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * - * @param offerAndAcceptanceForGoods The OfferAndAcceptanceForGoods. + * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder part_Of_M( - final OfferAndAcceptanceForGoods offerAndAcceptanceForGoods) { - this.acceptanceOfOfferForGoods.addValue(PART_OF, offerAndAcceptanceForGoods.getId()); + public final AcceptanceOfOfferForGoodsBuilder part_Of(final AgreementExecution agreementExecution) { + this.acceptanceOfOfferForGoods.addValue(PART_OF, agreementExecution.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an + * {@link AcceptanceOfOfferForGoods} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} + * exactly one {@link OfferAndAcceptanceForGoods}. * - * @param agreementExecution The AgreementExecution. + * @param offerAndAcceptanceForGoods The OfferAndAcceptanceForGoods. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder part_Of_(final AgreementExecution agreementExecution) { - this.acceptanceOfOfferForGoods.addValue(PART_OF_, agreementExecution.getId()); + public final AcceptanceOfOfferForGoodsBuilder part_Of_M( + final OfferAndAcceptanceForGoods offerAndAcceptanceForGoods) { + this.acceptanceOfOfferForGoods.addValue(PART_OF, offerAndAcceptanceForGoods.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -292,8 +286,8 @@ public final AcceptanceOfOfferForGoodsBuilder references_M(final OfferForGoods o * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AcceptanceOfOfferForGoodsBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.acceptanceOfOfferForGoods.addValue(TEMPORAL__PART_OF, + public final AcceptanceOfOfferForGoodsBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.acceptanceOfOfferForGoods.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -301,16 +295,15 @@ public final AcceptanceOfOfferForGoodsBuilder temporal__Part_Of(final SpatioTemp /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -347,10 +340,6 @@ public AcceptanceOfOfferForGoods build() throws HqdmException { && this.acceptanceOfOfferForGoods.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.acceptanceOfOfferForGoods.hasValue(MEMBER__OF) - && this.acceptanceOfOfferForGoods.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.acceptanceOfOfferForGoods.hasValue(MEMBER_OF) && this.acceptanceOfOfferForGoods.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -358,27 +347,16 @@ public AcceptanceOfOfferForGoods build() throws HqdmException { if (!this.acceptanceOfOfferForGoods.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.acceptanceOfOfferForGoods.hasValue(PART__OF) - && this.acceptanceOfOfferForGoods.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.acceptanceOfOfferForGoods.hasValue(PART_OF)) { + if (this.acceptanceOfOfferForGoods.hasValue(PART_OF) + && this.acceptanceOfOfferForGoods.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.acceptanceOfOfferForGoods.hasValue(PART_OF_) - && this.acceptanceOfOfferForGoods.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.acceptanceOfOfferForGoods.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } if (!this.acceptanceOfOfferForGoods.hasValue(REFERENCES)) { throw new HqdmException("Property Not Set: references"); } - if (this.acceptanceOfOfferForGoods.hasValue(TEMPORAL__PART_OF) - && this.acceptanceOfOfferForGoods.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.acceptanceOfOfferForGoods.hasValue(TEMPORAL_PART_OF) && this.acceptanceOfOfferForGoods.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ActivityBuilder.java index 9e7148fc..0d7c0b9c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ActivityBuilder.java @@ -19,18 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -44,6 +40,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -105,14 +102,14 @@ public final ActivityBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ActivityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.activity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ActivityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.activity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -172,15 +169,15 @@ public final ActivityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ActivityBuilder member__Of(final Class clazz) { - this.activity.addValue(MEMBER__OF, clazz.getId()); + public final ActivityBuilder member_Of(final Class clazz) { + this.activity.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link Activity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link ClassOfActivity}. + * {@link Activity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link ClassOfActivity}. * * @param classOfActivity The ClassOfActivity. * @return This builder. @@ -200,6 +197,7 @@ public final ActivityBuilder member_Of(final ClassOfActivity classOfActivity) { */ public final ActivityBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.activity.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.activity.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -211,8 +209,8 @@ public final ActivityBuilder member_Of_Kind_M(final KindOfActivity kindOfActivit * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ActivityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.activity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ActivityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.activity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } @@ -231,13 +229,12 @@ public final ActivityBuilder part_Of(final Activity activity) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -267,24 +264,23 @@ public final ActivityBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ActivityBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.activity.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ActivityBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.activity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -321,10 +317,6 @@ public Activity build() throws HqdmException { && this.activity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.activity.hasValue(MEMBER__OF) - && this.activity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.activity.hasValue(MEMBER_OF) && this.activity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -332,10 +324,6 @@ public Activity build() throws HqdmException { if (!this.activity.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.activity.hasValue(PART__OF) - && this.activity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.activity.hasValue(PART_OF) && this.activity.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); @@ -347,10 +335,6 @@ public Activity build() throws HqdmException { && this.activity.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.activity.hasValue(TEMPORAL__PART_OF) - && this.activity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.activity.hasValue(TEMPORAL_PART_OF) && this.activity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AggregationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AggregationBuilder.java index ed5a2ecb..ee0edb5f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AggregationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AggregationBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.WHOLE; @@ -50,8 +49,8 @@ public AggregationBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final AggregationBuilder member__Of(final Class clazz) { - this.aggregation.addValue(MEMBER__OF, clazz.getId()); + public final AggregationBuilder member_Of(final Class clazz) { + this.aggregation.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -99,10 +98,6 @@ public final AggregationBuilder whole_M(final SpatioTemporalExtent spatioTempora * @throws HqdmException If the Aggregation is missing any mandatory properties. */ public Aggregation build() throws HqdmException { - if (this.aggregation.hasValue(MEMBER__OF) - && this.aggregation.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.aggregation.hasValue(MEMBER_OF) && this.aggregation.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreeContractBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreeContractBuilder.java index f55d7a7d..65f0ad3d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreeContractBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreeContractBuilder.java @@ -20,19 +20,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOffer; @@ -50,6 +45,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -112,14 +108,14 @@ public final AgreeContractBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreeContractBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreeContract.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AgreeContractBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreeContract.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -192,15 +188,15 @@ public final AgreeContractBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AgreeContractBuilder member__Of(final Class clazz) { - this.agreeContract.addValue(MEMBER__OF, clazz.getId()); + public final AgreeContractBuilder member_Of(final Class clazz) { + this.agreeContract.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link AgreeContract} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfAgreeContract}. + * {@link AgreeContract} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfAgreeContract}. * * @param classOfAgreeContract The ClassOfAgreeContract. * @return Builder @@ -220,6 +216,7 @@ public final AgreeContractBuilder member_Of(final ClassOfAgreeContract classOfAg */ public final AgreeContractBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.agreeContract.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.agreeContract.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -231,8 +228,8 @@ public final AgreeContractBuilder member_Of_Kind_M(final KindOfActivity kindOfAc * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreeContractBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreeContract.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AgreeContractBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreeContract.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } @@ -252,26 +249,24 @@ public final AgreeContractBuilder part_Of_M(final ContractProcess contractProces /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ public final AgreeContractBuilder part_Of_(final AgreementExecution agreementExecution) { - this.agreeContract.addValue(PART_OF_, agreementExecution.getId()); + this.agreeContract.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -302,24 +297,23 @@ public final AgreeContractBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreeContractBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreeContract.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AgreeContractBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreeContract.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -356,10 +350,6 @@ public AgreeContract build() throws HqdmException { && this.agreeContract.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.agreeContract.hasValue(MEMBER__OF) - && this.agreeContract.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.agreeContract.hasValue(MEMBER_OF) && this.agreeContract.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -367,17 +357,10 @@ public AgreeContract build() throws HqdmException { if (!this.agreeContract.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.agreeContract.hasValue(PART__OF) - && this.agreeContract.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.agreeContract.hasValue(PART_OF)) { + if (this.agreeContract.hasValue(PART_OF) + && this.agreeContract.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.agreeContract.hasValue(PART_OF_) - && this.agreeContract.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.agreeContract.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -385,10 +368,6 @@ public AgreeContract build() throws HqdmException { && this.agreeContract.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.agreeContract.hasValue(TEMPORAL__PART_OF) - && this.agreeContract.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.agreeContract.hasValue(TEMPORAL_PART_OF) && this.agreeContract.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementExecutionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementExecutionBuilder.java index ff9e0f10..5569d838 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementExecutionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementExecutionBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -47,6 +42,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -109,14 +105,14 @@ public final AgreementExecutionBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementExecutionBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementExecution.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AgreementExecutionBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementExecution.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -176,15 +172,15 @@ public final AgreementExecutionBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AgreementExecutionBuilder member__Of(final Class clazz) { - this.agreementExecution.addValue(MEMBER__OF, clazz.getId()); + public final AgreementExecutionBuilder member_Of(final Class clazz) { + this.agreementExecution.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link AgreementExecution} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfAgreementExecution}. + * {@link AgreementExecution} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. @@ -204,6 +200,7 @@ public final AgreementExecutionBuilder member_Of(final ClassOfAgreementExecution */ public final AgreementExecutionBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.agreementExecution.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.agreementExecution.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -215,47 +212,46 @@ public final AgreementExecutionBuilder member_Of_Kind_M(final KindOfActivity kin * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementExecutionBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementExecution.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AgreementExecutionBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementExecution.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an - * {@link AgreementExecution} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly - * one {@link AgreementProcess}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * - * @param agreementProcess The AgreementProcess. + * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final AgreementExecutionBuilder part_Of_M(final AgreementProcess agreementProcess) { - this.agreementExecution.addValue(PART_OF, agreementProcess.getId()); + public final AgreementExecutionBuilder part_Of(final AgreementExecution agreementExecution) { + this.agreementExecution.addValue(PART_OF, agreementExecution.getId()); return this; } + /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an + * {@link AgreementExecution} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly one + * {@link AgreementProcess}. * - * @param agreementExecution The AgreementExecution. + * @param agreementProcess The AgreementProcess. * @return This builder. */ - public final AgreementExecutionBuilder part_Of_(final AgreementExecution agreementExecution) { - this.agreementExecution.addValue(PART_OF_, agreementExecution.getId()); + public final AgreementExecutionBuilder part_Of_M(final AgreementProcess agreementProcess) { + this.agreementExecution.addValue(PART_OF, agreementProcess.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -285,24 +281,23 @@ public final AgreementExecutionBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementExecutionBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementExecution.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AgreementExecutionBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementExecution.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -339,10 +334,6 @@ public AgreementExecution build() throws HqdmException { && this.agreementExecution.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.agreementExecution.hasValue(MEMBER__OF) - && this.agreementExecution.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.agreementExecution.hasValue(MEMBER_OF) && this.agreementExecution.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -350,17 +341,10 @@ public AgreementExecution build() throws HqdmException { if (!this.agreementExecution.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.agreementExecution.hasValue(PART__OF) - && this.agreementExecution.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.agreementExecution.hasValue(PART_OF)) { + if (this.agreementExecution.hasValue(PART_OF) + && this.agreementExecution.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.agreementExecution.hasValue(PART_OF_) - && this.agreementExecution.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.agreementExecution.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -368,10 +352,6 @@ public AgreementExecution build() throws HqdmException { && this.agreementExecution.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.agreementExecution.hasValue(TEMPORAL__PART_OF) - && this.agreementExecution.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.agreementExecution.hasValue(TEMPORAL_PART_OF) && this.agreementExecution.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementProcessBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementProcessBuilder.java index 18fc2193..2bc333f8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementProcessBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AgreementProcessBuilder.java @@ -20,19 +20,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; @@ -48,6 +43,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -111,14 +107,14 @@ public final AgreementProcessBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementProcessBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementProcess.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AgreementProcessBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementProcess.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -189,15 +185,15 @@ public final AgreementProcessBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AgreementProcessBuilder member__Of(final Class clazz) { - this.agreementProcess.addValue(MEMBER__OF, clazz.getId()); + public final AgreementProcessBuilder member_Of(final Class clazz) { + this.agreementProcess.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link AgreementProcess} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfAgreementProcess}. + * {@link AgreementProcess} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfAgreementProcess}. * * @param classOfAgreementProcess The ClassOfAgreementProcess. * @return Builder @@ -217,6 +213,7 @@ public final AgreementProcessBuilder member_Of(final ClassOfAgreementProcess cla */ public final AgreementProcessBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.agreementProcess.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.agreementProcess.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -228,16 +225,15 @@ public final AgreementProcessBuilder member_Of_Kind_M(final KindOfActivity kindO * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementProcessBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementProcess.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AgreementProcessBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementProcess.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link ReachingAgreement}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link ReachingAgreement}. * * @param reachingAgreement The ReachingAgreement. * @return This builder. @@ -250,26 +246,24 @@ public final AgreementProcessBuilder part_Of(final ReachingAgreement reachingAgr /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final AgreementProcessBuilder part_Of_(final AgreementExecution agreementExecution) { - this.agreementProcess.addValue(PART_OF_, agreementExecution.getId()); + public final AgreementProcessBuilder part_Of(final AgreementExecution agreementExecution) { + this.agreementProcess.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -300,24 +294,23 @@ public final AgreementProcessBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AgreementProcessBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.agreementProcess.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AgreementProcessBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.agreementProcess.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -354,10 +347,6 @@ public AgreementProcess build() throws HqdmException { && this.agreementProcess.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.agreementProcess.hasValue(MEMBER__OF) - && this.agreementProcess.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.agreementProcess.hasValue(MEMBER_OF) && this.agreementProcess.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -365,18 +354,10 @@ public AgreementProcess build() throws HqdmException { if (!this.agreementProcess.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.agreementProcess.hasValue(PART__OF) - && this.agreementProcess.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.agreementProcess.hasValue(PART_OF) && this.agreementProcess.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.agreementProcess.hasValue(PART_OF_) - && this.agreementProcess.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.agreementProcess.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -384,10 +365,6 @@ public AgreementProcess build() throws HqdmException { && this.agreementProcess.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.agreementProcess.hasValue(TEMPORAL__PART_OF) - && this.agreementProcess.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.agreementProcess.hasValue(TEMPORAL_PART_OF) && this.agreementProcess.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AmountOfMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AmountOfMoneyBuilder.java index 788c88d8..b8648798 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AmountOfMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AmountOfMoneyBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_CURRENCY; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AmountOfMoney; @@ -37,6 +35,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -87,14 +86,14 @@ public final AmountOfMoneyBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AmountOfMoneyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.amountOfMoney.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AmountOfMoneyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.amountOfMoney.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -117,15 +116,15 @@ public final AmountOfMoneyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AmountOfMoneyBuilder member__Of(final Class clazz) { - this.amountOfMoney.addValue(MEMBER__OF, clazz.getId()); + public final AmountOfMoneyBuilder member_Of(final Class clazz) { + this.amountOfMoney.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link AmountOfMoney} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfAmountOfMoney}. + * {@link AmountOfMoney} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfAmountOfMoney}. * * @param classOfAmountOfMoney The ClassOfAmountOfMoney. * @return This builder. @@ -137,8 +136,8 @@ public final AmountOfMoneyBuilder member_Of(final ClassOfAmountOfMoney classOfAm /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link AmountOfMoney} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * exactly one {@link Currency}. + * {@link AmountOfMoney} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} exactly + * one {@link Currency}. * * @param currency The Currency. * @return This builder. @@ -160,6 +159,7 @@ public final AmountOfMoneyBuilder member_Of_Currency(final Currency currency) { public final AmountOfMoneyBuilder member_Of_Kind( final KindOfSociallyConstructedObject kindOfSociallyConstructedObject) { this.amountOfMoney.addValue(MEMBER_OF_KIND, kindOfSociallyConstructedObject.getId()); + this.amountOfMoney.addValue(RDFS.RDF_TYPE, kindOfSociallyConstructedObject.getId()); return this; } @@ -171,20 +171,19 @@ public final AmountOfMoneyBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AmountOfMoneyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.amountOfMoney.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AmountOfMoneyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.amountOfMoney.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -203,8 +202,8 @@ public final AmountOfMoneyBuilder part_Of_Possible_World_M(final PossibleWorld p * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AmountOfMoneyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.amountOfMoney.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AmountOfMoneyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.amountOfMoney.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -241,10 +240,6 @@ public AmountOfMoney build() throws HqdmException { && this.amountOfMoney.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.amountOfMoney.hasValue(MEMBER__OF) - && this.amountOfMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.amountOfMoney.hasValue(MEMBER_OF) && this.amountOfMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -257,17 +252,13 @@ public AmountOfMoney build() throws HqdmException { && this.amountOfMoney.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.amountOfMoney.hasValue(PART__OF) - && this.amountOfMoney.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.amountOfMoney.hasValue(PART_OF) + && this.amountOfMoney.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.amountOfMoney.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.amountOfMoney.hasValue(TEMPORAL__PART_OF) - && this.amountOfMoney.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.amountOfMoney.hasValue(TEMPORAL_PART_OF) && this.amountOfMoney.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssetBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssetBuilder.java index a15dba57..45932b85 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssetBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssetBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Asset; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final AssetBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssetBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.asset.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AssetBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.asset.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,16 +117,15 @@ public final AssetBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AssetBuilder member__Of(final Class clazz) { - this.asset.addValue(MEMBER__OF, clazz.getId()); + public final AssetBuilder member_Of(final Class clazz) { + this.asset.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfParticipant}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link ClassOfParticipant}. * * @param classOfParticipant The ClassOfParticipant. * @return This builder. @@ -147,6 +145,7 @@ public final AssetBuilder member_Of(final ClassOfParticipant classOfParticipant) */ public final AssetBuilder member_Of_Kind_M(final Role role) { this.asset.addValue(MEMBER_OF_KIND, role.getId()); + this.asset.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +157,19 @@ public final AssetBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssetBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.asset.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AssetBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.asset.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -183,8 +181,8 @@ public final AssetBuilder part_Of_Possible_World_M(final PossibleWorld possibleW } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an - * asset is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an asset + * is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one * {@link Ownership}. * * @param ownership The Ownership. @@ -203,8 +201,8 @@ public final AssetBuilder participant_In_M(final Ownership ownership) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssetBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.asset.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AssetBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.asset.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -241,10 +239,6 @@ public Asset build() throws HqdmException { && this.asset.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.asset.hasValue(MEMBER__OF) - && this.asset.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.asset.hasValue(MEMBER_OF) && this.asset.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -252,9 +246,9 @@ public Asset build() throws HqdmException { if (!this.asset.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.asset.hasValue(PART__OF) - && this.asset.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.asset.hasValue(PART_OF) + && this.asset.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.asset.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -262,10 +256,6 @@ public Asset build() throws HqdmException { if (!this.asset.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.asset.hasValue(TEMPORAL__PART_OF) - && this.asset.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.asset.hasValue(TEMPORAL_PART_OF) && this.asset.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssociationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssociationBuilder.java index 13db121f..52c095bc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssociationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/AssociationBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Association; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final AssociationBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssociationBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.association.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final AssociationBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.association.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -130,8 +129,8 @@ public final AssociationBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final AssociationBuilder member__Of(final Class clazz) { - this.association.addValue(MEMBER__OF, clazz.getId()); + public final AssociationBuilder member_Of(final Class clazz) { + this.association.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -150,14 +149,15 @@ public final AssociationBuilder member_Of(final ClassOfAssociation classOfAssoci /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where each - * {@link Association} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link KindOfAssociation}. + * {@link Association} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link KindOfAssociation}. * * @param kindOfAssociation The KindOfAssociation. * @return This builder. */ public final AssociationBuilder member_Of_Kind_M(final KindOfAssociation kindOfAssociation) { this.association.addValue(MEMBER_OF_KIND, kindOfAssociation.getId()); + this.association.addValue(RDFS.RDF_TYPE, kindOfAssociation.getId()); return this; } @@ -169,20 +169,19 @@ public final AssociationBuilder member_Of_Kind_M(final KindOfAssociation kindOfA * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssociationBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.association.addValue(PART__OF, spatioTemporalExtent.getId()); + public final AssociationBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.association.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -201,24 +200,23 @@ public final AssociationBuilder part_Of_Possible_World_M(final PossibleWorld pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final AssociationBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.association.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final AssociationBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.association.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -248,10 +246,6 @@ public Association build() throws HqdmException { && this.association.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.association.hasValue(MEMBER__OF) - && this.association.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.association.hasValue(MEMBER_OF) && this.association.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -259,17 +253,13 @@ public Association build() throws HqdmException { if (!this.association.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.association.hasValue(PART__OF) - && this.association.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.association.hasValue(PART_OF) + && this.association.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.association.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.association.hasValue(TEMPORAL__PART_OF) - && this.association.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.association.hasValue(TEMPORAL_PART_OF) && this.association.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BeginningOfOwnershipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BeginningOfOwnershipBuilder.java index 19f5fb78..2f8633ab 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BeginningOfOwnershipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BeginningOfOwnershipBuilder.java @@ -16,13 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BeginningOfOwnership; @@ -82,14 +81,14 @@ public final BeginningOfOwnershipBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BeginningOfOwnershipBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.beginningOfOwnership.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final BeginningOfOwnershipBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.beginningOfOwnership.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -112,8 +111,8 @@ public final BeginningOfOwnershipBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final BeginningOfOwnershipBuilder member__Of(final Class clazz) { - this.beginningOfOwnership.addValue(MEMBER__OF, clazz.getId()); + public final BeginningOfOwnershipBuilder member_Of(final Class clazz) { + this.beginningOfOwnership.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -138,20 +137,19 @@ public final BeginningOfOwnershipBuilder member_Of(final ClassOfEvent classOfEve * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BeginningOfOwnershipBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.beginningOfOwnership.addValue(PART__OF, spatioTemporalExtent.getId()); + public final BeginningOfOwnershipBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.beginningOfOwnership.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -170,8 +168,8 @@ public final BeginningOfOwnershipBuilder part_Of_Possible_World_M(final Possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BeginningOfOwnershipBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.beginningOfOwnership.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final BeginningOfOwnershipBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.beginningOfOwnership.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -194,24 +192,20 @@ public BeginningOfOwnership build() throws HqdmException { && this.beginningOfOwnership.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.beginningOfOwnership.hasValue(MEMBER__OF) - && this.beginningOfOwnership.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.beginningOfOwnership.hasValue(MEMBER_OF) && this.beginningOfOwnership.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.beginningOfOwnership.hasValue(PART__OF) - && this.beginningOfOwnership.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.beginningOfOwnership.hasValue(PART_OF) + && this.beginningOfOwnership.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.beginningOfOwnership.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.beginningOfOwnership.hasValue(TEMPORAL__PART_OF) - && this.beginningOfOwnership.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.beginningOfOwnership.hasValue(TEMPORAL_PART_OF) + && this.beginningOfOwnership.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return this.beginningOfOwnership; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalObjectBuilder.java index 982317cc..fea62873 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalObject; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final BiologicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final BiologicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,15 +114,15 @@ public final BiologicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final BiologicalObjectBuilder member__Of(final Class clazz) { - this.biologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final BiologicalObjectBuilder member_Of(final Class clazz) { + this.biologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfBiologicalObject}. + * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfBiologicalObject}. * * @param classOfBiologicalObject The ClassOfBiologicalObject. * @return This builder. @@ -135,14 +134,15 @@ public final BiologicalObjectBuilder member_Of(final ClassOfBiologicalObject cla /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link KindOfBiologicalObject}. + * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link KindOfBiologicalObject}. * * @param kindOfBiologicalObject The KindOfBiologicalObject. * @return This builder. */ public final BiologicalObjectBuilder member_Of_Kind(final KindOfBiologicalObject kindOfBiologicalObject) { this.biologicalObject.addValue(MEMBER_OF_KIND, kindOfBiologicalObject.getId()); + this.biologicalObject.addValue(RDFS.RDF_TYPE, kindOfBiologicalObject.getId()); return this; } @@ -154,20 +154,19 @@ public final BiologicalObjectBuilder member_Of_Kind(final KindOfBiologicalObject * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final BiologicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,8 +185,8 @@ public final BiologicalObjectBuilder part_Of_Possible_World_M(final PossibleWorl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final BiologicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -224,10 +223,6 @@ public BiologicalObject build() throws HqdmException { && this.biologicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.biologicalObject.hasValue(MEMBER__OF) - && this.biologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.biologicalObject.hasValue(MEMBER_OF) && this.biologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -236,17 +231,13 @@ public BiologicalObject build() throws HqdmException { && this.biologicalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.biologicalObject.hasValue(PART__OF) - && this.biologicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.biologicalObject.hasValue(PART_OF) + && this.biologicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.biologicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.biologicalObject.hasValue(TEMPORAL__PART_OF) - && this.biologicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.biologicalObject.hasValue(TEMPORAL_PART_OF) && this.biologicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemBuilder.java index 23236ecd..9d316ccf 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.NATURAL_ROLE; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final BiologicalSystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystem.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final BiologicalSystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystem.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,15 +117,15 @@ public final BiologicalSystemBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final BiologicalSystemBuilder member__Of(final Class clazz) { - this.biologicalSystem.addValue(MEMBER__OF, clazz.getId()); + public final BiologicalSystemBuilder member_Of(final Class clazz) { + this.biologicalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link BiologicalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfBiologicalSystem}. + * {@link BiologicalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfBiologicalSystem}. * * @param classOfBiologicalSystem The ClassOfBiologicalSystem. * @return Builder @@ -138,14 +137,15 @@ public final BiologicalSystemBuilder member_Of(final ClassOfBiologicalSystem cla /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where a - * {@link BiologicalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link KindOfBiologicalSystem}. + * {@link BiologicalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link KindOfBiologicalSystem}. * * @param kindOfBiologicalSystem The KindOfBiologicalSystem. * @return Builder */ public final BiologicalSystemBuilder member_Of_Kind(final KindOfBiologicalSystem kindOfBiologicalSystem) { this.biologicalSystem.addValue(MEMBER_OF_KIND, kindOfBiologicalSystem.getId()); + this.biologicalSystem.addValue(RDFS.RDF_TYPE, kindOfBiologicalSystem.getId()); return this; } @@ -169,20 +169,19 @@ public final BiologicalSystemBuilder natural_Role_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystem.addValue(PART__OF, spatioTemporalExtent.getId()); + public final BiologicalSystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystem.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -201,8 +200,8 @@ public final BiologicalSystemBuilder part_Of_Possible_World_M(final PossibleWorl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystem.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final BiologicalSystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystem.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -240,10 +239,6 @@ public BiologicalSystem build() throws HqdmException { && this.biologicalSystem.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.biologicalSystem.hasValue(MEMBER__OF) - && this.biologicalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.biologicalSystem.hasValue(MEMBER_OF) && this.biologicalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -255,17 +250,13 @@ public BiologicalSystem build() throws HqdmException { if (!this.biologicalSystem.hasValue(NATURAL_ROLE)) { throw new HqdmException("Property Not Set: natural_role"); } - if (this.biologicalSystem.hasValue(PART__OF) - && this.biologicalSystem.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.biologicalSystem.hasValue(PART_OF) + && this.biologicalSystem.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.biologicalSystem.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.biologicalSystem.hasValue(TEMPORAL__PART_OF) - && this.biologicalSystem.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.biologicalSystem.hasValue(TEMPORAL_PART_OF) && this.biologicalSystem.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemComponentBuilder.java index 20b1d8eb..6c62162e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/BiologicalSystemComponentBuilder.java @@ -17,15 +17,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.COMPONENT_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalObject; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -102,14 +101,14 @@ public final BiologicalSystemComponentBuilder component_Of_M(final BiologicalSys * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystemComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final BiologicalSystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -132,8 +131,8 @@ public final BiologicalSystemComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final BiologicalSystemComponentBuilder member__Of(final Class clazz) { - this.biologicalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final BiologicalSystemComponentBuilder member_Of(final Class clazz) { + this.biologicalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -155,14 +154,15 @@ public final BiologicalSystemComponentBuilder member_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link KindOfBiologicalObject}. + * {@link BiologicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link KindOfBiologicalObject}. * * @param kindOfBiologicalObject The KindOfBiologicalObject. * @return This builder. */ public final BiologicalSystemComponentBuilder member_Of_Kind(final KindOfBiologicalObject kindOfBiologicalObject) { this.biologicalSystemComponent.addValue(MEMBER_OF_KIND, kindOfBiologicalObject.getId()); + this.biologicalSystemComponent.addValue(RDFS.RDF_TYPE, kindOfBiologicalObject.getId()); return this; } @@ -174,20 +174,19 @@ public final BiologicalSystemComponentBuilder member_Of_Kind(final KindOfBiologi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final BiologicalSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -206,8 +205,8 @@ public final BiologicalSystemComponentBuilder part_Of_Possible_World_M(final Pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final BiologicalSystemComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.biologicalSystemComponent.addValue(TEMPORAL__PART_OF, + public final BiologicalSystemComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.biologicalSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -248,10 +247,6 @@ public BiologicalSystemComponent build() throws HqdmException { && this.biologicalSystemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.biologicalSystemComponent.hasValue(MEMBER__OF) - && this.biologicalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.biologicalSystemComponent.hasValue(MEMBER_OF) && this.biologicalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -260,17 +255,13 @@ public BiologicalSystemComponent build() throws HqdmException { && this.biologicalSystemComponent.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.biologicalSystemComponent.hasValue(PART__OF) - && this.biologicalSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.biologicalSystemComponent.hasValue(PART_OF) + && this.biologicalSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.biologicalSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.biologicalSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.biologicalSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.biologicalSystemComponent.hasValue(TEMPORAL_PART_OF) && this.biologicalSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassBuilder.java index 33a57574..5f763006 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -59,8 +58,8 @@ public final ClassBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassBuilder member__Of(final Class clazz) { - this.clazz.addValue(MEMBER__OF, clazz.getId()); + public final ClassBuilder member_Of(final Class clazz) { + this.clazz.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -88,10 +87,6 @@ public Class build() throws HqdmException { && this.clazz.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.clazz.hasValue(MEMBER__OF) - && this.clazz.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.clazz.hasValue(MEMBER_OF) && this.clazz.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAbstractObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAbstractObjectBuilder.java index e34a97b3..b546e335 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAbstractObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAbstractObjectBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final ClassOfAbstractObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfAbstractObjectBuilder member__Of(final Class clazz) { - this.classOfAbstractObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAbstractObjectBuilder member_Of(final Class clazz) { + this.classOfAbstractObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public ClassOfAbstractObject build() throws HqdmException { && this.classOfAbstractObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAbstractObject.hasValue(MEMBER__OF) - && this.classOfAbstractObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAbstractObject.hasValue(MEMBER_OF) && this.classOfAbstractObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfActivityBuilder.java index 4ef09d8e..ba6d2b25 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfActivityBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfActivityBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfActivityBuilder consists__Of_By_Class( + public final ClassOfActivityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfActivity.addValue(CONSISTS__OF_BY_CLASS, + this.classOfActivity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfActivityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfActivityBuilder member__Of(final Class clazz) { - this.classOfActivity.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfActivityBuilder member_Of(final Class clazz) { + this.classOfActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final ClassOfActivityBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfActivityBuilder member_Of_( + public final ClassOfActivityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfActivity.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfActivity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfActivityBuilder part__Of_By_Class( + public final ClassOfActivityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfActivity.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfActivity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public ClassOfActivity build() throws HqdmException { && this.classOfActivity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfActivity.hasValue(MEMBER__OF) - && this.classOfActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfActivity.hasValue(MEMBER_OF) && this.classOfActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfActivity.hasValue(MEMBER_OF_) - && this.classOfActivity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfActivity.hasValue(PART__OF_BY_CLASS) - && this.classOfActivity.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfActivity.hasValue(PART_OF_BY_CLASS) + && this.classOfActivity.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfActivity; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreeContractBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreeContractBuilder.java index a06f40e9..b1137a3d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreeContractBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreeContractBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfAgreeContractBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreeContractBuilder consists__Of_By_Class( + public final ClassOfAgreeContractBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreeContract.addValue(CONSISTS__OF_BY_CLASS, + this.classOfAgreeContract.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -87,8 +82,8 @@ public final ClassOfAgreeContractBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfAgreeContractBuilder member__Of(final Class clazz) { - this.classOfAgreeContract.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAgreeContractBuilder member_Of(final Class clazz) { + this.classOfAgreeContract.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,34 +108,33 @@ public final ClassOfAgreeContractBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreeContractBuilder member_Of_( + public final ClassOfAgreeContractBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfAgreeContract.addValue(MEMBER_OF_, + this.classOfAgreeContract.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreeContractBuilder part__Of_By_Class( + public final ClassOfAgreeContractBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreeContract.addValue(PART__OF_BY_CLASS, + this.classOfAgreeContract.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfAgreeContract} - * may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfAgreeContract} may be + * a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link ClassOfContractProcess}. * @@ -158,15 +152,14 @@ public final ClassOfAgreeContractBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfAgreeContractBuilder part_Of_By_Class_( + public final ClassOfAgreeContractBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfAgreeContract.addValue(PART_OF_BY_CLASS_, + this.classOfAgreeContract.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -182,29 +175,17 @@ public ClassOfAgreeContract build() throws HqdmException { && this.classOfAgreeContract.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAgreeContract.hasValue(MEMBER__OF) - && this.classOfAgreeContract.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAgreeContract.hasValue(MEMBER_OF) && this.classOfAgreeContract.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfAgreeContract.hasValue(MEMBER_OF_) - && this.classOfAgreeContract.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfAgreeContract.hasValue(PART__OF_BY_CLASS) - && this.classOfAgreeContract.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfAgreeContract.hasValue(PART_OF_BY_CLASS) && this.classOfAgreeContract.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfAgreeContract.hasValue(PART_OF_BY_CLASS_) - && this.classOfAgreeContract.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); + if (this.classOfAgreeContract.hasValue(PART_OF_BY_CLASS) + && this.classOfAgreeContract.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfAgreeContract; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementExecutionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementExecutionBuilder.java index cc34d5ff..ebae6a00 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementExecutionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementExecutionBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -50,19 +46,18 @@ public ClassOfAgreementExecutionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementExecutionBuilder consists__Of_By_Class( + public final ClassOfAgreementExecutionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreementExecution.addValue(CONSISTS__OF_BY_CLASS, + this.classOfAgreementExecution.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -86,8 +81,8 @@ public final ClassOfAgreementExecutionBuilder has_Superclass(final Class clazz) * @param clazz The Class. * @return This builder. */ - public final ClassOfAgreementExecutionBuilder member__Of(final Class clazz) { - this.classOfAgreementExecution.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAgreementExecutionBuilder member_Of(final Class clazz) { + this.classOfAgreementExecution.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,37 +107,34 @@ public final ClassOfAgreementExecutionBuilder member_Of(final ClassOfClass class * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementExecutionBuilder member_Of_( + public final ClassOfAgreementExecutionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfAgreementExecution.addValue(MEMBER_OF_, + this.classOfAgreementExecution.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementExecutionBuilder part__Of_By_Class( + public final ClassOfAgreementExecutionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreementExecution.addValue(PART__OF_BY_CLASS, + this.classOfAgreementExecution.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link ClassOfAgreementExecution} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link ClassOfAgreementProcess}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfAgreementExecution} + * may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfAgreementProcess}. * * @param classOfAgreementProcess The ClassOfAgreementProcess. * @return This builder. @@ -159,15 +151,14 @@ public final ClassOfAgreementExecutionBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfAgreementExecutionBuilder part_Of_By_Class_( + public final ClassOfAgreementExecutionBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfAgreementExecution.addValue(PART_OF_BY_CLASS_, + this.classOfAgreementExecution.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -183,30 +174,14 @@ public ClassOfAgreementExecution build() throws HqdmException { && this.classOfAgreementExecution.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAgreementExecution.hasValue(MEMBER__OF) - && this.classOfAgreementExecution.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAgreementExecution.hasValue(MEMBER_OF) && this.classOfAgreementExecution.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfAgreementExecution.hasValue(MEMBER_OF_) - && this.classOfAgreementExecution.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfAgreementExecution.hasValue(PART__OF_BY_CLASS) - && this.classOfAgreementExecution.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfAgreementExecution.hasValue(PART_OF_BY_CLASS) && this.classOfAgreementExecution.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfAgreementExecution.hasValue(PART_OF_BY_CLASS_) - && this.classOfAgreementExecution.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfAgreementExecution; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementProcessBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementProcessBuilder.java index fb4a5a68..75195823 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementProcessBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAgreementProcessBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfAgreementProcessBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementProcessBuilder consists__Of_By_Class( + public final ClassOfAgreementProcessBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreementProcess.addValue(CONSISTS__OF_BY_CLASS, + this.classOfAgreementProcess.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -87,8 +82,8 @@ public final ClassOfAgreementProcessBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfAgreementProcessBuilder member__Of(final Class clazz) { - this.classOfAgreementProcess.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAgreementProcessBuilder member_Of(final Class clazz) { + this.classOfAgreementProcess.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,26 +108,25 @@ public final ClassOfAgreementProcessBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementProcessBuilder member_Of_( + public final ClassOfAgreementProcessBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfAgreementProcess.addValue(MEMBER_OF_, + this.classOfAgreementProcess.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAgreementProcessBuilder part__Of_By_Class( + public final ClassOfAgreementProcessBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAgreementProcess.addValue(PART__OF_BY_CLASS, + this.classOfAgreementProcess.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -159,15 +153,14 @@ public final ClassOfAgreementProcessBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfAgreementProcessBuilder part_Of_By_Class_( + public final ClassOfAgreementProcessBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfAgreementProcess.addValue(PART_OF_BY_CLASS_, + this.classOfAgreementProcess.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -183,30 +176,14 @@ public ClassOfAgreementProcess build() throws HqdmException { && this.classOfAgreementProcess.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAgreementProcess.hasValue(MEMBER__OF) - && this.classOfAgreementProcess.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAgreementProcess.hasValue(MEMBER_OF) && this.classOfAgreementProcess.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfAgreementProcess.hasValue(MEMBER_OF_) - && this.classOfAgreementProcess.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfAgreementProcess.hasValue(PART__OF_BY_CLASS) - && this.classOfAgreementProcess.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfAgreementProcess.hasValue(PART_OF_BY_CLASS) && this.classOfAgreementProcess.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfAgreementProcess.hasValue(PART_OF_BY_CLASS_) - && this.classOfAgreementProcess.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfAgreementProcess; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAmountOfMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAmountOfMoneyBuilder.java index 09009d94..11aa2b7f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAmountOfMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAmountOfMoneyBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfAmountOfMoneyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAmountOfMoneyBuilder consists__Of_By_Class( + public final ClassOfAmountOfMoneyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAmountOfMoney.addValue(CONSISTS__OF_BY_CLASS, + this.classOfAmountOfMoney.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfAmountOfMoneyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfAmountOfMoneyBuilder member__Of(final Class clazz) { - this.classOfAmountOfMoney.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAmountOfMoneyBuilder member_Of(final Class clazz) { + this.classOfAmountOfMoney.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfAmountOfMoneyBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAmountOfMoneyBuilder member_Of_( + public final ClassOfAmountOfMoneyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfAmountOfMoney.addValue(MEMBER_OF_, + this.classOfAmountOfMoney.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAmountOfMoneyBuilder part__Of_By_Class( + public final ClassOfAmountOfMoneyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAmountOfMoney.addValue(PART__OF_BY_CLASS, + this.classOfAmountOfMoney.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfAmountOfMoney build() throws HqdmException { && this.classOfAmountOfMoney.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAmountOfMoney.hasValue(MEMBER__OF) - && this.classOfAmountOfMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAmountOfMoney.hasValue(MEMBER_OF) && this.classOfAmountOfMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfAmountOfMoney.hasValue(MEMBER_OF_) - && this.classOfAmountOfMoney.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfAmountOfMoney.hasValue(PART__OF_BY_CLASS) - && this.classOfAmountOfMoney.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfAmountOfMoney.hasValue(PART_OF_BY_CLASS) + && this.classOfAmountOfMoney.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfAmountOfMoney; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAssociationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAssociationBuilder.java index 1ee6f407..61b0d8d6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAssociationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfAssociationBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfAssociationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAssociationBuilder consists__Of_By_Class( + public final ClassOfAssociationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAssociation.addValue(CONSISTS__OF_BY_CLASS, + this.classOfAssociation.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfAssociationBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfAssociationBuilder member__Of(final Class clazz) { - this.classOfAssociation.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfAssociationBuilder member_Of(final Class clazz) { + this.classOfAssociation.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfAssociationBuilder member_Of(final ClassOfClass classOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAssociationBuilder member_Of_( + public final ClassOfAssociationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfAssociation.addValue(MEMBER_OF_, + this.classOfAssociation.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfAssociationBuilder part__Of_By_Class( + public final ClassOfAssociationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfAssociation.addValue(PART__OF_BY_CLASS, + this.classOfAssociation.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfAssociation build() throws HqdmException { && this.classOfAssociation.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfAssociation.hasValue(MEMBER__OF) - && this.classOfAssociation.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfAssociation.hasValue(MEMBER_OF) && this.classOfAssociation.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfAssociation.hasValue(MEMBER_OF_) - && this.classOfAssociation.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfAssociation.hasValue(PART__OF_BY_CLASS) - && this.classOfAssociation.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfAssociation.hasValue(PART_OF_BY_CLASS) + && this.classOfAssociation.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfAssociation; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalObjectBuilder.java index f1966a83..c9adfa67 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalObjectBuilder consists__Of_By_Class( + public final ClassOfBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfBiologicalObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfBiologicalObjectBuilder member__Of(final Class clazz) { - this.classOfBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfBiologicalObjectBuilder member_Of(final Class clazz) { + this.classOfBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfBiologicalObjectBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalObjectBuilder member_Of_( + public final ClassOfBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfBiologicalObject.addValue(MEMBER_OF_, + this.classOfBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalObjectBuilder part__Of_By_Class( + public final ClassOfBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalObject.addValue(PART__OF_BY_CLASS, + this.classOfBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfBiologicalObject build() throws HqdmException { && this.classOfBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfBiologicalObject.hasValue(MEMBER__OF) - && this.classOfBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfBiologicalObject.hasValue(MEMBER_OF) && this.classOfBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfBiologicalObject.hasValue(MEMBER_OF_) - && this.classOfBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfBiologicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfBiologicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemBuilder.java index 0255ecc8..3e7fe6e9 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfBiologicalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemBuilder consists__Of_By_Class( + public final ClassOfBiologicalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.classOfBiologicalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfBiologicalSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfBiologicalSystemBuilder member__Of(final Class clazz) { - this.classOfBiologicalSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfBiologicalSystemBuilder member_Of(final Class clazz) { + this.classOfBiologicalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfBiologicalSystemBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemBuilder member_Of_( + public final ClassOfBiologicalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfBiologicalSystem.addValue(MEMBER_OF_, + this.classOfBiologicalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemBuilder part__Of_By_Class( + public final ClassOfBiologicalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalSystem.addValue(PART__OF_BY_CLASS, + this.classOfBiologicalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfBiologicalSystem build() throws HqdmException { && this.classOfBiologicalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfBiologicalSystem.hasValue(MEMBER__OF) - && this.classOfBiologicalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfBiologicalSystem.hasValue(MEMBER_OF) && this.classOfBiologicalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfBiologicalSystem.hasValue(MEMBER_OF_) - && this.classOfBiologicalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfBiologicalSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfBiologicalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfBiologicalSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfBiologicalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfBiologicalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemComponentBuilder.java index 9ed681c2..5fe08f91 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfBiologicalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfBiologicalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemComponentBuilder consists__Of_By_Class( + public final ClassOfBiologicalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfBiologicalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfBiologicalSystemComponentBuilder has_Superclass(final Class * @param clazz The Class. * @return This builder. */ - public final ClassOfBiologicalSystemComponentBuilder member__Of(final Class clazz) { - this.classOfBiologicalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfBiologicalSystemComponentBuilder member_Of(final Class clazz) { + this.classOfBiologicalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfBiologicalSystemComponentBuilder member_Of(final ClassOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemComponentBuilder member_Of_( + public final ClassOfBiologicalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfBiologicalSystemComponent.addValue(MEMBER_OF_, + this.classOfBiologicalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfBiologicalSystemComponentBuilder part__Of_By_Class( + public final ClassOfBiologicalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfBiologicalSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfBiologicalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfBiologicalSystemComponent build() throws HqdmException { && this.classOfBiologicalSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfBiologicalSystemComponent.hasValue(MEMBER__OF) - && this.classOfBiologicalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfBiologicalSystemComponent.hasValue(MEMBER_OF) && this.classOfBiologicalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfBiologicalSystemComponent.hasValue(MEMBER_OF_) - && this.classOfBiologicalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfBiologicalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfBiologicalSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfBiologicalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfBiologicalSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfBiologicalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassBuilder.java index 39915852..69ee7207 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -59,8 +58,8 @@ public final ClassOfClassBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfClassBuilder member__Of(final Class clazz) { - this.classOfClass.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfClassBuilder member_Of(final Class clazz) { + this.classOfClass.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -88,10 +87,6 @@ public ClassOfClass build() throws HqdmException { && this.classOfClass.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfClass.hasValue(MEMBER__OF) - && this.classOfClass.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfClass.hasValue(MEMBER_OF) && this.classOfClass.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassOfSpatioTemporalExtentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassOfSpatioTemporalExtentBuilder.java index e72cea55..aca3a2a5 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassOfSpatioTemporalExtentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfClassOfSpatioTemporalExtentBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,8 +37,7 @@ public class ClassOfClassOfSpatioTemporalExtentBuilder { * @param iri IRI of the ClassOfClassOfSpatioTemporalExtent. */ public ClassOfClassOfSpatioTemporalExtentBuilder(final IRI iri) { - this.classOfClassOfSpatioTemporalExtent = - ClassServices.createClassOfClassOfSpatioTemporalExtent(iri); + this.classOfClassOfSpatioTemporalExtent = ClassServices.createClassOfClassOfSpatioTemporalExtent(iri); } /** @@ -61,8 +59,8 @@ public final ClassOfClassOfSpatioTemporalExtentBuilder has_Superclass(final Clas * @param clazz The Class. * @return This builder. */ - public final ClassOfClassOfSpatioTemporalExtentBuilder member__Of(final Class clazz) { - this.classOfClassOfSpatioTemporalExtent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfClassOfSpatioTemporalExtentBuilder member_Of(final Class clazz) { + this.classOfClassOfSpatioTemporalExtent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -92,10 +90,6 @@ public ClassOfClassOfSpatioTemporalExtent build() throws HqdmException { && this.classOfClassOfSpatioTemporalExtent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfClassOfSpatioTemporalExtent.hasValue(MEMBER__OF) - && this.classOfClassOfSpatioTemporalExtent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfClassOfSpatioTemporalExtent.hasValue(MEMBER_OF) && this.classOfClassOfSpatioTemporalExtent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractExecutionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractExecutionBuilder.java index 2512ac3d..6fa9985d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractExecutionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractExecutionBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfContractExecutionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractExecutionBuilder consists__Of_By_Class( + public final ClassOfContractExecutionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfContractExecution.addValue(CONSISTS__OF_BY_CLASS, + this.classOfContractExecution.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -87,8 +82,8 @@ public final ClassOfContractExecutionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfContractExecutionBuilder member__Of(final Class clazz) { - this.classOfContractExecution.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfContractExecutionBuilder member_Of(final Class clazz) { + this.classOfContractExecution.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,35 +108,33 @@ public final ClassOfContractExecutionBuilder member_Of(final ClassOfClass classO * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractExecutionBuilder member_Of_( + public final ClassOfContractExecutionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfContractExecution.addValue(MEMBER_OF_, + this.classOfContractExecution.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractExecutionBuilder part__Of_By_Class( + public final ClassOfContractExecutionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfContractExecution.addValue(PART__OF_BY_CLASS, + this.classOfContractExecution.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link ClassOfContractExecution} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfContractExecution} + * may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link ClassOfContractProcess}. * * @param classOfContractProcess The ClassOfContractProcess. @@ -159,15 +152,14 @@ public final ClassOfContractExecutionBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfContractExecutionBuilder part_Of_By_Class_( + public final ClassOfContractExecutionBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfContractExecution.addValue(PART_OF_BY_CLASS_, + this.classOfContractExecution.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -183,30 +175,14 @@ public ClassOfContractExecution build() throws HqdmException { && this.classOfContractExecution.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfContractExecution.hasValue(MEMBER__OF) - && this.classOfContractExecution.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfContractExecution.hasValue(MEMBER_OF) && this.classOfContractExecution.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfContractExecution.hasValue(MEMBER_OF_) - && this.classOfContractExecution.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfContractExecution.hasValue(PART__OF_BY_CLASS) - && this.classOfContractExecution.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfContractExecution.hasValue(PART_OF_BY_CLASS) && this.classOfContractExecution.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfContractExecution.hasValue(PART_OF_BY_CLASS_) - && this.classOfContractExecution.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfContractExecution; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractProcessBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractProcessBuilder.java index 843fac2b..4ecff05d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractProcessBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfContractProcessBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfContractProcessBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractProcessBuilder consists__Of_By_Class( + public final ClassOfContractProcessBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfContractProcess.addValue(CONSISTS__OF_BY_CLASS, + this.classOfContractProcess.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -87,8 +82,8 @@ public final ClassOfContractProcessBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfContractProcessBuilder member__Of(final Class clazz) { - this.classOfContractProcess.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfContractProcessBuilder member_Of(final Class clazz) { + this.classOfContractProcess.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,26 +108,25 @@ public final ClassOfContractProcessBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractProcessBuilder member_Of_( + public final ClassOfContractProcessBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfContractProcess.addValue(MEMBER_OF_, + this.classOfContractProcess.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfContractProcessBuilder part__Of_By_Class( + public final ClassOfContractProcessBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfContractProcess.addValue(PART__OF_BY_CLASS, + this.classOfContractProcess.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -159,15 +153,14 @@ public final ClassOfContractProcessBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfContractProcessBuilder part_Of_By_Class_( + public final ClassOfContractProcessBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfContractProcess.addValue(PART_OF_BY_CLASS_, + this.classOfContractProcess.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -183,30 +176,14 @@ public ClassOfContractProcess build() throws HqdmException { && this.classOfContractProcess.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfContractProcess.hasValue(MEMBER__OF) - && this.classOfContractProcess.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfContractProcess.hasValue(MEMBER_OF) && this.classOfContractProcess.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfContractProcess.hasValue(MEMBER_OF_) - && this.classOfContractProcess.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfContractProcess.hasValue(PART__OF_BY_CLASS) - && this.classOfContractProcess.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfContractProcess.hasValue(PART_OF_BY_CLASS) && this.classOfContractProcess.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfContractProcess.hasValue(PART_OF_BY_CLASS_) - && this.classOfContractProcess.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfContractProcess; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfEventBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfEventBuilder.java index 1f830b03..1d2a2572 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfEventBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfEventBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,20 +45,19 @@ public ClassOfEventBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfEventBuilder consists__Of_By_Class( + public final ClassOfEventBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { this.classOfEvent.addValue( - CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfEventBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfEventBuilder member__Of(final Class clazz) { - this.classOfEvent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfEventBuilder member_Of(final Class clazz) { + this.classOfEvent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final ClassOfEventBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfEventBuilder member_Of_( + public final ClassOfEventBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfEvent.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfEvent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfEventBuilder part__Of_By_Class( + public final ClassOfEventBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfEvent.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfEvent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public ClassOfEvent build() throws HqdmException { && this.classOfEvent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfEvent.hasValue(MEMBER__OF) - && this.classOfEvent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfEvent.hasValue(MEMBER_OF) && this.classOfEvent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfEvent.hasValue(MEMBER_OF_) - && this.classOfEvent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfEvent.hasValue(PART__OF_BY_CLASS) - && this.classOfEvent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfEvent.hasValue(PART_OF_BY_CLASS) + && this.classOfEvent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfEvent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalObjectBuilder.java index 2318e4b6..8d6db1f5 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalObjectBuilder consists__Of_By_Class( + public final ClassOfFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfFunctionalObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfFunctionalObjectBuilder member__Of(final Class clazz) { - this.classOfFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfFunctionalObjectBuilder member_Of(final Class clazz) { + this.classOfFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfFunctionalObjectBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalObjectBuilder member_Of_( + public final ClassOfFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfFunctionalObject.addValue(MEMBER_OF_, + this.classOfFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalObjectBuilder part__Of_By_Class( + public final ClassOfFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalObject.addValue(PART__OF_BY_CLASS, + this.classOfFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfFunctionalObject build() throws HqdmException { && this.classOfFunctionalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfFunctionalObject.hasValue(MEMBER__OF) - && this.classOfFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfFunctionalObject.hasValue(MEMBER_OF) && this.classOfFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfFunctionalObject.hasValue(MEMBER_OF_) - && this.classOfFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfFunctionalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfFunctionalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemBuilder.java index 8f83eb5f..e39d751c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfFunctionalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemBuilder consists__Of_By_Class( + public final ClassOfFunctionalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.classOfFunctionalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfFunctionalSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfFunctionalSystemBuilder member__Of(final Class clazz) { - this.classOfFunctionalSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfFunctionalSystemBuilder member_Of(final Class clazz) { + this.classOfFunctionalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfFunctionalSystemBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemBuilder member_Of_( + public final ClassOfFunctionalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfFunctionalSystem.addValue(MEMBER_OF_, + this.classOfFunctionalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemBuilder part__Of_By_Class( + public final ClassOfFunctionalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalSystem.addValue(PART__OF_BY_CLASS, + this.classOfFunctionalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfFunctionalSystem build() throws HqdmException { && this.classOfFunctionalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfFunctionalSystem.hasValue(MEMBER__OF) - && this.classOfFunctionalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfFunctionalSystem.hasValue(MEMBER_OF) && this.classOfFunctionalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfFunctionalSystem.hasValue(MEMBER_OF_) - && this.classOfFunctionalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfFunctionalSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfFunctionalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfFunctionalSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfFunctionalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfFunctionalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemComponentBuilder.java index 79347e83..cf322f63 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfFunctionalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfFunctionalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemComponentBuilder consists__Of_By_Class( + public final ClassOfFunctionalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfFunctionalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfFunctionalSystemComponentBuilder has_Superclass(final Class * @param clazz The Class. * @return This builder. */ - public final ClassOfFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.classOfFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.classOfFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfFunctionalSystemComponentBuilder member_Of(final ClassOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemComponentBuilder member_Of_( + public final ClassOfFunctionalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfFunctionalSystemComponent.addValue(MEMBER_OF_, + this.classOfFunctionalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfFunctionalSystemComponentBuilder part__Of_By_Class( + public final ClassOfFunctionalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfFunctionalSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfFunctionalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -147,21 +143,13 @@ public ClassOfFunctionalSystemComponent build() throws HqdmException { && this.classOfFunctionalSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.classOfFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfFunctionalSystemComponent.hasValue(MEMBER_OF) && this.classOfFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfFunctionalSystemComponent.hasValue(MEMBER_OF_) - && this.classOfFunctionalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfFunctionalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfFunctionalSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfFunctionalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfFunctionalSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfFunctionalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInPlaceBiologicalComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInPlaceBiologicalComponentBuilder.java index 41982e16..5abd271f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInPlaceBiologicalComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInPlaceBiologicalComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfInPlaceBiologicalComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInPlaceBiologicalComponentBuilder consists__Of_By_Class( + public final ClassOfInPlaceBiologicalComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInPlaceBiologicalComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfInPlaceBiologicalComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfInPlaceBiologicalComponentBuilder has_Superclass(final Class * @param clazz The Class. * @return This builder. */ - public final ClassOfInPlaceBiologicalComponentBuilder member__Of(final Class clazz) { - this.classOfInPlaceBiologicalComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfInPlaceBiologicalComponentBuilder member_Of(final Class clazz) { + this.classOfInPlaceBiologicalComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfInPlaceBiologicalComponentBuilder member_Of(final ClassOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInPlaceBiologicalComponentBuilder member_Of_( + public final ClassOfInPlaceBiologicalComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfInPlaceBiologicalComponent.addValue(MEMBER_OF_, + this.classOfInPlaceBiologicalComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInPlaceBiologicalComponentBuilder part__Of_By_Class( + public final ClassOfInPlaceBiologicalComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInPlaceBiologicalComponent.addValue(PART__OF_BY_CLASS, + this.classOfInPlaceBiologicalComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -147,21 +143,13 @@ public ClassOfInPlaceBiologicalComponent build() throws HqdmException { && this.classOfInPlaceBiologicalComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfInPlaceBiologicalComponent.hasValue(MEMBER__OF) - && this.classOfInPlaceBiologicalComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfInPlaceBiologicalComponent.hasValue(MEMBER_OF) && this.classOfInPlaceBiologicalComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfInPlaceBiologicalComponent.hasValue(MEMBER_OF_) - && this.classOfInPlaceBiologicalComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfInPlaceBiologicalComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfInPlaceBiologicalComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfInPlaceBiologicalComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfInPlaceBiologicalComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfInPlaceBiologicalComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIndividualBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIndividualBuilder.java index bf3826a1..2847eb21 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIndividualBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIndividualBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfIndividualBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIndividualBuilder consists__Of_By_Class( + public final ClassOfIndividualBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfIndividual.addValue(CONSISTS__OF_BY_CLASS, + this.classOfIndividual.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfIndividualBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfIndividualBuilder member__Of(final Class clazz) { - this.classOfIndividual.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfIndividualBuilder member_Of(final Class clazz) { + this.classOfIndividual.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final ClassOfIndividualBuilder member_Of(final ClassOfClass classOfClass) * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIndividualBuilder member_Of_( + public final ClassOfIndividualBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfIndividual.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfIndividual.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIndividualBuilder part__Of_By_Class( + public final ClassOfIndividualBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfIndividual.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfIndividual.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public ClassOfIndividual build() throws HqdmException { && this.classOfIndividual.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfIndividual.hasValue(MEMBER__OF) - && this.classOfIndividual.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfIndividual.hasValue(MEMBER_OF) && this.classOfIndividual.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfIndividual.hasValue(MEMBER_OF_) - && this.classOfIndividual.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfIndividual.hasValue(PART__OF_BY_CLASS) - && this.classOfIndividual.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfIndividual.hasValue(PART_OF_BY_CLASS) + && this.classOfIndividual.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfIndividual; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledFunctionalSystemComponentBuilder.java index b8155aa2..ab3d0bf3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledFunctionalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfInstalledFunctionalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledFunctionalSystemComponentBuilder consists__Of_By_Class( + public final ClassOfInstalledFunctionalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInstalledFunctionalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfInstalledFunctionalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfInstalledFunctionalSystemComponentBuilder has_Superclass(fin * @param clazz The Class. * @return This builder. */ - public final ClassOfInstalledFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.classOfInstalledFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfInstalledFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.classOfInstalledFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,26 +109,25 @@ public final ClassOfInstalledFunctionalSystemComponentBuilder member_Of(final Cl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledFunctionalSystemComponentBuilder member_Of_( + public final ClassOfInstalledFunctionalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfInstalledFunctionalSystemComponent.addValue(MEMBER_OF_, + this.classOfInstalledFunctionalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledFunctionalSystemComponentBuilder part__Of_By_Class( + public final ClassOfInstalledFunctionalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInstalledFunctionalSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfInstalledFunctionalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -151,23 +147,15 @@ public ClassOfInstalledFunctionalSystemComponent build() throws HqdmException { .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfInstalledFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.classOfInstalledFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfInstalledFunctionalSystemComponent.hasValue(MEMBER_OF) && this.classOfInstalledFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfInstalledFunctionalSystemComponent.hasValue(MEMBER_OF_) - && this.classOfInstalledFunctionalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfInstalledFunctionalSystemComponent.hasValue(PART__OF_BY_CLASS) + if (this.classOfInstalledFunctionalSystemComponent.hasValue(PART_OF_BY_CLASS) && this.classOfInstalledFunctionalSystemComponent - .values(PART__OF_BY_CLASS) + .values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfInstalledFunctionalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledObjectBuilder.java index 3e8684be..84e51c5f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfInstalledObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfInstalledObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledObjectBuilder consists__Of_By_Class( + public final ClassOfInstalledObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInstalledObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfInstalledObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfInstalledObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfInstalledObjectBuilder member__Of(final Class clazz) { - this.classOfInstalledObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfInstalledObjectBuilder member_Of(final Class clazz) { + this.classOfInstalledObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfInstalledObjectBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledObjectBuilder member_Of_( + public final ClassOfInstalledObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfInstalledObject.addValue(MEMBER_OF_, + this.classOfInstalledObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfInstalledObjectBuilder part__Of_By_Class( + public final ClassOfInstalledObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfInstalledObject.addValue(PART__OF_BY_CLASS, + this.classOfInstalledObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfInstalledObject build() throws HqdmException { && this.classOfInstalledObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfInstalledObject.hasValue(MEMBER__OF) - && this.classOfInstalledObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfInstalledObject.hasValue(MEMBER_OF) && this.classOfInstalledObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfInstalledObject.hasValue(MEMBER_OF_) - && this.classOfInstalledObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfInstalledObject.hasValue(PART__OF_BY_CLASS) - && this.classOfInstalledObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfInstalledObject.hasValue(PART_OF_BY_CLASS) + && this.classOfInstalledObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfInstalledObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIntentionallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIntentionallyConstructedObjectBuilder.java index bcaba1d2..d038b2fc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIntentionallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfIntentionallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfIntentionallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIntentionallyConstructedObjectBuilder consists__Of_By_Class( + public final ClassOfIntentionallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfIntentionallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfIntentionallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfIntentionallyConstructedObjectBuilder has_Superclass(final C * @param clazz The Class. * @return This builder. */ - public final ClassOfIntentionallyConstructedObjectBuilder member__Of(final Class clazz) { - this.classOfIntentionallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfIntentionallyConstructedObjectBuilder member_Of(final Class clazz) { + this.classOfIntentionallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfIntentionallyConstructedObjectBuilder member_Of(final ClassO * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIntentionallyConstructedObjectBuilder member_Of_( + public final ClassOfIntentionallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfIntentionallyConstructedObject.addValue(MEMBER_OF_, + this.classOfIntentionallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfIntentionallyConstructedObjectBuilder part__Of_By_Class( + public final ClassOfIntentionallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfIntentionallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.classOfIntentionallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,23 +144,15 @@ public ClassOfIntentionallyConstructedObject build() throws HqdmException { && this.classOfIntentionallyConstructedObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfIntentionallyConstructedObject.hasValue(MEMBER__OF) - && this.classOfIntentionallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfIntentionallyConstructedObject.hasValue(MEMBER_OF) && this.classOfIntentionallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfIntentionallyConstructedObject.hasValue(MEMBER_OF_) - && this.classOfIntentionallyConstructedObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfIntentionallyConstructedObject.hasValue(PART__OF_BY_CLASS) + if (this.classOfIntentionallyConstructedObject.hasValue(PART_OF_BY_CLASS) && this.classOfIntentionallyConstructedObject - .values(PART__OF_BY_CLASS) + .values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfIntentionallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOfferBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOfferBuilder.java index 3f566cc7..d51cd670 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOfferBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOfferBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfOfferBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOfferBuilder consists__Of_By_Class( + public final ClassOfOfferBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOffer.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfOffer.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -86,8 +81,8 @@ public final ClassOfOfferBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfOfferBuilder member__Of(final Class clazz) { - this.classOfOffer.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOfferBuilder member_Of(final Class clazz) { + this.classOfOffer.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,25 +107,24 @@ public final ClassOfOfferBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOfferBuilder member_Of_( + public final ClassOfOfferBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOffer.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfOffer.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOfferBuilder part__Of_By_Class( + public final ClassOfOfferBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOffer.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfOffer.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -155,15 +149,14 @@ public final ClassOfOfferBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfOfferBuilder part_Of_By_Class_( + public final ClassOfOfferBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfOffer.addValue(PART_OF_BY_CLASS_, classOfAgreementExecution.getId()); + this.classOfOffer.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -178,30 +171,14 @@ public ClassOfOffer build() throws HqdmException { && this.classOfOffer.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOffer.hasValue(MEMBER__OF) - && this.classOfOffer.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOffer.hasValue(MEMBER_OF) && this.classOfOffer.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOffer.hasValue(MEMBER_OF_) - && this.classOfOffer.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOffer.hasValue(PART__OF_BY_CLASS) - && this.classOfOffer.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfOffer.hasValue(PART_OF_BY_CLASS) && this.classOfOffer.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfOffer.hasValue(PART_OF_BY_CLASS_) - && this.classOfOffer.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfOffer; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryBiologicalObjectBuilder.java index 7073f015..51730b27 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfOrdinaryBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryBiologicalObjectBuilder consists__Of_By_Class( + public final ClassOfOrdinaryBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfOrdinaryBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfOrdinaryBiologicalObjectBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final ClassOfOrdinaryBiologicalObjectBuilder member__Of(final Class clazz) { - this.classOfOrdinaryBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOrdinaryBiologicalObjectBuilder member_Of(final Class clazz) { + this.classOfOrdinaryBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfOrdinaryBiologicalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryBiologicalObjectBuilder member_Of_( + public final ClassOfOrdinaryBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOrdinaryBiologicalObject.addValue(MEMBER_OF_, + this.classOfOrdinaryBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryBiologicalObjectBuilder part__Of_By_Class( + public final ClassOfOrdinaryBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryBiologicalObject.addValue(PART__OF_BY_CLASS, + this.classOfOrdinaryBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfOrdinaryBiologicalObject build() throws HqdmException { && this.classOfOrdinaryBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOrdinaryBiologicalObject.hasValue(MEMBER__OF) - && this.classOfOrdinaryBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOrdinaryBiologicalObject.hasValue(MEMBER_OF) && this.classOfOrdinaryBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOrdinaryBiologicalObject.hasValue(MEMBER_OF_) - && this.classOfOrdinaryBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOrdinaryBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfOrdinaryBiologicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfOrdinaryBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfOrdinaryBiologicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfOrdinaryBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryFunctionalObjectBuilder.java index f1d2608b..aa7fa4d1 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryFunctionalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfOrdinaryFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryFunctionalObjectBuilder consists__Of_By_Class( + public final ClassOfOrdinaryFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfOrdinaryFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfOrdinaryFunctionalObjectBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final ClassOfOrdinaryFunctionalObjectBuilder member__Of(final Class clazz) { - this.classOfOrdinaryFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOrdinaryFunctionalObjectBuilder member_Of(final Class clazz) { + this.classOfOrdinaryFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfOrdinaryFunctionalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryFunctionalObjectBuilder member_Of_( + public final ClassOfOrdinaryFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOrdinaryFunctionalObject.addValue(MEMBER_OF_, + this.classOfOrdinaryFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryFunctionalObjectBuilder part__Of_By_Class( + public final ClassOfOrdinaryFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryFunctionalObject.addValue(PART__OF_BY_CLASS, + this.classOfOrdinaryFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfOrdinaryFunctionalObject build() throws HqdmException { && this.classOfOrdinaryFunctionalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOrdinaryFunctionalObject.hasValue(MEMBER__OF) - && this.classOfOrdinaryFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOrdinaryFunctionalObject.hasValue(MEMBER_OF) && this.classOfOrdinaryFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOrdinaryFunctionalObject.hasValue(MEMBER_OF_) - && this.classOfOrdinaryFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOrdinaryFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfOrdinaryFunctionalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfOrdinaryFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfOrdinaryFunctionalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfOrdinaryFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryPhysicalObjectBuilder.java index 9ce8fc85..9918b191 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrdinaryPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfOrdinaryPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryPhysicalObjectBuilder consists__Of_By_Class( + public final ClassOfOrdinaryPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfOrdinaryPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfOrdinaryPhysicalObjectBuilder has_Superclass(final Class cla * @param clazz The Class. * @return This builder. */ - public final ClassOfOrdinaryPhysicalObjectBuilder member__Of(final Class clazz) { - this.classOfOrdinaryPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOrdinaryPhysicalObjectBuilder member_Of(final Class clazz) { + this.classOfOrdinaryPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfOrdinaryPhysicalObjectBuilder member_Of(final ClassOfClass c * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryPhysicalObjectBuilder member_Of_( + public final ClassOfOrdinaryPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOrdinaryPhysicalObject.addValue(MEMBER_OF_, + this.classOfOrdinaryPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrdinaryPhysicalObjectBuilder part__Of_By_Class( + public final ClassOfOrdinaryPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrdinaryPhysicalObject.addValue(PART__OF_BY_CLASS, + this.classOfOrdinaryPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfOrdinaryPhysicalObject build() throws HqdmException { && this.classOfOrdinaryPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOrdinaryPhysicalObject.hasValue(MEMBER__OF) - && this.classOfOrdinaryPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOrdinaryPhysicalObject.hasValue(MEMBER_OF) && this.classOfOrdinaryPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOrdinaryPhysicalObject.hasValue(MEMBER_OF_) - && this.classOfOrdinaryPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOrdinaryPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfOrdinaryPhysicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfOrdinaryPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfOrdinaryPhysicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfOrdinaryPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationBuilder.java index 6a745ee9..6b9e9d6d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfOrganizationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationBuilder consists__Of_By_Class( + public final ClassOfOrganizationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrganization.addValue(CONSISTS__OF_BY_CLASS, + this.classOfOrganization.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfOrganizationBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfOrganizationBuilder member__Of(final Class clazz) { - this.classOfOrganization.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOrganizationBuilder member_Of(final Class clazz) { + this.classOfOrganization.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfOrganizationBuilder member_Of(final ClassOfClass classOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationBuilder member_Of_( + public final ClassOfOrganizationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOrganization.addValue(MEMBER_OF_, + this.classOfOrganization.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationBuilder part__Of_By_Class( + public final ClassOfOrganizationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrganization.addValue(PART__OF_BY_CLASS, + this.classOfOrganization.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfOrganization build() throws HqdmException { && this.classOfOrganization.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOrganization.hasValue(MEMBER__OF) - && this.classOfOrganization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOrganization.hasValue(MEMBER_OF) && this.classOfOrganization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOrganization.hasValue(MEMBER_OF_) - && this.classOfOrganization.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOrganization.hasValue(PART__OF_BY_CLASS) - && this.classOfOrganization.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfOrganization.hasValue(PART_OF_BY_CLASS) + && this.classOfOrganization.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfOrganization; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationComponentBuilder.java index ca1d4d4f..22663a40 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfOrganizationComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfOrganizationComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationComponentBuilder consists__Of_By_Class( + public final ClassOfOrganizationComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrganizationComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfOrganizationComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfOrganizationComponentBuilder has_Superclass(final Class claz * @param clazz The Class. * @return This builder. */ - public final ClassOfOrganizationComponentBuilder member__Of(final Class clazz) { - this.classOfOrganizationComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfOrganizationComponentBuilder member_Of(final Class clazz) { + this.classOfOrganizationComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfOrganizationComponentBuilder member_Of(final ClassOfClass cl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationComponentBuilder member_Of_( + public final ClassOfOrganizationComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfOrganizationComponent.addValue(MEMBER_OF_, + this.classOfOrganizationComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfOrganizationComponentBuilder part__Of_By_Class( + public final ClassOfOrganizationComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfOrganizationComponent.addValue(PART__OF_BY_CLASS, + this.classOfOrganizationComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfOrganizationComponent build() throws HqdmException { && this.classOfOrganizationComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfOrganizationComponent.hasValue(MEMBER__OF) - && this.classOfOrganizationComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfOrganizationComponent.hasValue(MEMBER_OF) && this.classOfOrganizationComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfOrganizationComponent.hasValue(MEMBER_OF_) - && this.classOfOrganizationComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfOrganizationComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfOrganizationComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfOrganizationComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfOrganizationComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfOrganizationComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfParticipantBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfParticipantBuilder.java index f2b7d76a..80b20244 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfParticipantBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfParticipantBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfParticipantBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfParticipantBuilder consists__Of_By_Class( + public final ClassOfParticipantBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfParticipant.addValue(CONSISTS__OF_BY_CLASS, + this.classOfParticipant.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfParticipantBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfParticipantBuilder member__Of(final Class clazz) { - this.classOfParticipant.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfParticipantBuilder member_Of(final Class clazz) { + this.classOfParticipant.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfParticipantBuilder member_Of(final ClassOfClass classOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfParticipantBuilder member_Of_( + public final ClassOfParticipantBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfParticipant.addValue(MEMBER_OF_, + this.classOfParticipant.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfParticipantBuilder part__Of_By_Class( + public final ClassOfParticipantBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfParticipant.addValue(PART__OF_BY_CLASS, + this.classOfParticipant.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfParticipant build() throws HqdmException { && this.classOfParticipant.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfParticipant.hasValue(MEMBER__OF) - && this.classOfParticipant.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfParticipant.hasValue(MEMBER_OF) && this.classOfParticipant.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfParticipant.hasValue(MEMBER_OF_) - && this.classOfParticipant.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfParticipant.hasValue(PART__OF_BY_CLASS) - && this.classOfParticipant.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfParticipant.hasValue(PART_OF_BY_CLASS) + && this.classOfParticipant.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfParticipant; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPartyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPartyBuilder.java index 1b76637e..fb75734f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPartyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPartyBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPartyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPartyBuilder consists__Of_By_Class( + public final ClassOfPartyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfParty.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfParty.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfPartyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPartyBuilder member__Of(final Class clazz) { - this.classOfParty.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPartyBuilder member_Of(final Class clazz) { + this.classOfParty.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ClassOfPartyBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPartyBuilder member_Of_( + public final ClassOfPartyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfParty.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfParty.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPartyBuilder part__Of_By_Class( + public final ClassOfPartyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfParty.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfParty.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ClassOfParty build() throws HqdmException { && this.classOfParty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfParty.hasValue(MEMBER__OF) - && this.classOfParty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfParty.hasValue(MEMBER_OF) && this.classOfParty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfParty.hasValue(MEMBER_OF_) - && this.classOfParty.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfParty.hasValue(PART__OF_BY_CLASS) - && this.classOfParty.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfParty.hasValue(PART_OF_BY_CLASS) + && this.classOfParty.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfParty; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPeriodOfTimeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPeriodOfTimeBuilder.java index 58c2b047..a42b9dfb 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPeriodOfTimeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPeriodOfTimeBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPeriodOfTimeBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPeriodOfTimeBuilder consists__Of_By_Class( + public final ClassOfPeriodOfTimeBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPeriodOfTime.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPeriodOfTime.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPeriodOfTimeBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPeriodOfTimeBuilder member__Of(final Class clazz) { - this.classOfPeriodOfTime.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPeriodOfTimeBuilder member_Of(final Class clazz) { + this.classOfPeriodOfTime.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfPeriodOfTimeBuilder member_Of(final ClassOfClass classOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPeriodOfTimeBuilder member_Of_( + public final ClassOfPeriodOfTimeBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPeriodOfTime.addValue(MEMBER_OF_, + this.classOfPeriodOfTime.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPeriodOfTimeBuilder part__Of_By_Class( + public final ClassOfPeriodOfTimeBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPeriodOfTime.addValue(PART__OF_BY_CLASS, + this.classOfPeriodOfTime.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfPeriodOfTime build() throws HqdmException { && this.classOfPeriodOfTime.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPeriodOfTime.hasValue(MEMBER__OF) - && this.classOfPeriodOfTime.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPeriodOfTime.hasValue(MEMBER_OF) && this.classOfPeriodOfTime.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPeriodOfTime.hasValue(MEMBER_OF_) - && this.classOfPeriodOfTime.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPeriodOfTime.hasValue(PART__OF_BY_CLASS) - && this.classOfPeriodOfTime.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPeriodOfTime.hasValue(PART_OF_BY_CLASS) + && this.classOfPeriodOfTime.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPeriodOfTime; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonBuilder.java index 978a9133..bcc0f713 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPersonBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonBuilder consists__Of_By_Class( + public final ClassOfPersonBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPerson.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfPerson.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfPersonBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPersonBuilder member__Of(final Class clazz) { - this.classOfPerson.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPersonBuilder member_Of(final Class clazz) { + this.classOfPerson.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ClassOfPersonBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonBuilder member_Of_( + public final ClassOfPersonBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPerson.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfPerson.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonBuilder part__Of_By_Class( + public final ClassOfPersonBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPerson.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfPerson.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ClassOfPerson build() throws HqdmException { && this.classOfPerson.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPerson.hasValue(MEMBER__OF) - && this.classOfPerson.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPerson.hasValue(MEMBER_OF) && this.classOfPerson.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPerson.hasValue(MEMBER_OF_) - && this.classOfPerson.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPerson.hasValue(PART__OF_BY_CLASS) - && this.classOfPerson.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPerson.hasValue(PART_OF_BY_CLASS) + && this.classOfPerson.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPerson; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonInPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonInPositionBuilder.java index 2f557054..cdae7d41 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonInPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPersonInPositionBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPersonInPositionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonInPositionBuilder consists__Of_By_Class( + public final ClassOfPersonInPositionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPersonInPosition.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPersonInPosition.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPersonInPositionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPersonInPositionBuilder member__Of(final Class clazz) { - this.classOfPersonInPosition.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPersonInPositionBuilder member_Of(final Class clazz) { + this.classOfPersonInPosition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfPersonInPositionBuilder member_Of(final ClassOfClass classOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonInPositionBuilder member_Of_( + public final ClassOfPersonInPositionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPersonInPosition.addValue(MEMBER_OF_, + this.classOfPersonInPosition.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPersonInPositionBuilder part__Of_By_Class( + public final ClassOfPersonInPositionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPersonInPosition.addValue(PART__OF_BY_CLASS, + this.classOfPersonInPosition.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfPersonInPosition build() throws HqdmException { && this.classOfPersonInPosition.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPersonInPosition.hasValue(MEMBER__OF) - && this.classOfPersonInPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPersonInPosition.hasValue(MEMBER_OF) && this.classOfPersonInPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPersonInPosition.hasValue(MEMBER_OF_) - && this.classOfPersonInPosition.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPersonInPosition.hasValue(PART__OF_BY_CLASS) - && this.classOfPersonInPosition.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPersonInPosition.hasValue(PART_OF_BY_CLASS) + && this.classOfPersonInPosition.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPersonInPosition; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalObjectBuilder.java index c13fb38c..822ba3b4 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPhysicalObjectBuilder consists__Of_By_Class( + public final ClassOfPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPhysicalObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPhysicalObjectBuilder member__Of(final Class clazz) { - this.classOfPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPhysicalObjectBuilder member_Of(final Class clazz) { + this.classOfPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfPhysicalObjectBuilder member_Of(final ClassOfClass classOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPhysicalObjectBuilder member_Of_( + public final ClassOfPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPhysicalObject.addValue(MEMBER_OF_, + this.classOfPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPhysicalObjectBuilder part__Of_By_Class( + public final ClassOfPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPhysicalObject.addValue(PART__OF_BY_CLASS, + this.classOfPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfPhysicalObject build() throws HqdmException { && this.classOfPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPhysicalObject.hasValue(MEMBER__OF) - && this.classOfPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPhysicalObject.hasValue(MEMBER_OF) && this.classOfPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPhysicalObject.hasValue(MEMBER_OF_) - && this.classOfPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfPhysicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfPhysicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalPropertyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalPropertyBuilder.java index 29e48036..4d8ac05b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalPropertyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalPropertyBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final ClassOfPhysicalPropertyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPhysicalPropertyBuilder member__Of(final Class clazz) { - this.classOfPhysicalProperty.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPhysicalPropertyBuilder member_Of(final Class clazz) { + this.classOfPhysicalProperty.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public ClassOfPhysicalProperty build() throws HqdmException { && this.classOfPhysicalProperty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPhysicalProperty.hasValue(MEMBER__OF) - && this.classOfPhysicalProperty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPhysicalProperty.hasValue(MEMBER_OF) && this.classOfPhysicalProperty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalQuantityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalQuantityBuilder.java index fb1e17be..2b0999bc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalQuantityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPhysicalQuantityBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final ClassOfPhysicalQuantityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPhysicalQuantityBuilder member__Of(final Class clazz) { - this.classOfPhysicalQuantity.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPhysicalQuantityBuilder member_Of(final Class clazz) { + this.classOfPhysicalQuantity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public ClassOfPhysicalQuantity build() throws HqdmException { && this.classOfPhysicalQuantity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPhysicalQuantity.hasValue(MEMBER__OF) - && this.classOfPhysicalQuantity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPhysicalQuantity.hasValue(MEMBER_OF) && this.classOfPhysicalQuantity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPointInTimeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPointInTimeBuilder.java index a43e903c..9375e525 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPointInTimeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPointInTimeBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPointInTimeBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPointInTimeBuilder consists__Of_By_Class( + public final ClassOfPointInTimeBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPointInTime.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPointInTime.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPointInTimeBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPointInTimeBuilder member__Of(final Class clazz) { - this.classOfPointInTime.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPointInTimeBuilder member_Of(final Class clazz) { + this.classOfPointInTime.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfPointInTimeBuilder member_Of(final ClassOfClass classOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPointInTimeBuilder member_Of_( + public final ClassOfPointInTimeBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPointInTime.addValue(MEMBER_OF_, + this.classOfPointInTime.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPointInTimeBuilder part__Of_By_Class( + public final ClassOfPointInTimeBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPointInTime.addValue(PART__OF_BY_CLASS, + this.classOfPointInTime.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfPointInTime build() throws HqdmException { && this.classOfPointInTime.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPointInTime.hasValue(MEMBER__OF) - && this.classOfPointInTime.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPointInTime.hasValue(MEMBER_OF) && this.classOfPointInTime.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPointInTime.hasValue(MEMBER_OF_) - && this.classOfPointInTime.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPointInTime.hasValue(PART__OF_BY_CLASS) - && this.classOfPointInTime.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPointInTime.hasValue(PART_OF_BY_CLASS) + && this.classOfPointInTime.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPointInTime; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPositionBuilder.java index 903f8af6..32702c53 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPositionBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPositionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPositionBuilder consists__Of_By_Class( + public final ClassOfPositionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPosition.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPosition.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPositionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPositionBuilder member__Of(final Class clazz) { - this.classOfPosition.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPositionBuilder member_Of(final Class clazz) { + this.classOfPosition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final ClassOfPositionBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPositionBuilder member_Of_( + public final ClassOfPositionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPosition.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfPosition.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPositionBuilder part__Of_By_Class( + public final ClassOfPositionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPosition.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfPosition.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public ClassOfPosition build() throws HqdmException { && this.classOfPosition.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPosition.hasValue(MEMBER__OF) - && this.classOfPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPosition.hasValue(MEMBER_OF) && this.classOfPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPosition.hasValue(MEMBER_OF_) - && this.classOfPosition.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPosition.hasValue(PART__OF_BY_CLASS) - && this.classOfPosition.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPosition.hasValue(PART_OF_BY_CLASS) + && this.classOfPosition.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPosition; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPossibleWorldBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPossibleWorldBuilder.java index a9019ade..ced8ebe0 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPossibleWorldBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfPossibleWorldBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfPossibleWorldBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPossibleWorldBuilder consists__Of_By_Class( + public final ClassOfPossibleWorldBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPossibleWorld.addValue(CONSISTS__OF_BY_CLASS, + this.classOfPossibleWorld.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfPossibleWorldBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfPossibleWorldBuilder member__Of(final Class clazz) { - this.classOfPossibleWorld.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfPossibleWorldBuilder member_Of(final Class clazz) { + this.classOfPossibleWorld.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfPossibleWorldBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPossibleWorldBuilder member_Of_( + public final ClassOfPossibleWorldBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfPossibleWorld.addValue(MEMBER_OF_, + this.classOfPossibleWorld.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfPossibleWorldBuilder part__Of_By_Class( + public final ClassOfPossibleWorldBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfPossibleWorld.addValue(PART__OF_BY_CLASS, + this.classOfPossibleWorld.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfPossibleWorld build() throws HqdmException { && this.classOfPossibleWorld.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfPossibleWorld.hasValue(MEMBER__OF) - && this.classOfPossibleWorld.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfPossibleWorld.hasValue(MEMBER_OF) && this.classOfPossibleWorld.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfPossibleWorld.hasValue(MEMBER_OF_) - && this.classOfPossibleWorld.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfPossibleWorld.hasValue(PART__OF_BY_CLASS) - && this.classOfPossibleWorld.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfPossibleWorld.hasValue(PART_OF_BY_CLASS) + && this.classOfPossibleWorld.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfPossibleWorld; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfReachingAgreementBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfReachingAgreementBuilder.java index f5ac6729..a7f89417 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfReachingAgreementBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfReachingAgreementBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public ClassOfReachingAgreementBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfReachingAgreementBuilder consists__Of_By_Class( + public final ClassOfReachingAgreementBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfReachingAgreement.addValue(CONSISTS__OF_BY_CLASS, + this.classOfReachingAgreement.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -87,8 +82,8 @@ public final ClassOfReachingAgreementBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfReachingAgreementBuilder member__Of(final Class clazz) { - this.classOfReachingAgreement.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfReachingAgreementBuilder member_Of(final Class clazz) { + this.classOfReachingAgreement.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,34 +108,33 @@ public final ClassOfReachingAgreementBuilder member_Of(final ClassOfClass classO * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfReachingAgreementBuilder member_Of_( + public final ClassOfReachingAgreementBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfReachingAgreement.addValue(MEMBER_OF_, + this.classOfReachingAgreement.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfReachingAgreementBuilder part__Of_By_Class( + public final ClassOfReachingAgreementBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfReachingAgreement.addValue(PART__OF_BY_CLASS, + this.classOfReachingAgreement.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfReachingAgreement} - * may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfReachingAgreement} may + * be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementProcess}. * * @param classOfAgreementProcess The ClassOfAgreementProcess. @@ -158,15 +152,14 @@ public final ClassOfReachingAgreementBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfReachingAgreementBuilder part_Of_By_Class_( + public final ClassOfReachingAgreementBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfReachingAgreement.addValue(PART_OF_BY_CLASS_, + this.classOfReachingAgreement.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -182,30 +175,14 @@ public ClassOfReachingAgreement build() throws HqdmException { && this.classOfReachingAgreement.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfReachingAgreement.hasValue(MEMBER__OF) - && this.classOfReachingAgreement.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfReachingAgreement.hasValue(MEMBER_OF) && this.classOfReachingAgreement.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfReachingAgreement.hasValue(MEMBER_OF_) - && this.classOfReachingAgreement.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfReachingAgreement.hasValue(PART__OF_BY_CLASS) - && this.classOfReachingAgreement.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfReachingAgreement.hasValue(PART_OF_BY_CLASS) && this.classOfReachingAgreement.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfReachingAgreement.hasValue(PART_OF_BY_CLASS_) - && this.classOfReachingAgreement.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfReachingAgreement; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfRelationshipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfRelationshipBuilder.java index 9b96d1e5..7b174e86 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfRelationshipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfRelationshipBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final ClassOfRelationshipBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfRelationshipBuilder member__Of(final Class clazz) { - this.classOfRelationship.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfRelationshipBuilder member_Of(final Class clazz) { + this.classOfRelationship.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public ClassOfRelationship build() throws HqdmException { && this.classOfRelationship.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfRelationship.hasValue(MEMBER__OF) - && this.classOfRelationship.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfRelationship.hasValue(MEMBER_OF) && this.classOfRelationship.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSalesProductInstanceBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSalesProductInstanceBuilder.java index 3175c3d9..3b8b05b8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSalesProductInstanceBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSalesProductInstanceBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfSalesProductInstanceBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSalesProductInstanceBuilder consists__Of_By_Class( + public final ClassOfSalesProductInstanceBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSalesProductInstance.addValue(CONSISTS__OF_BY_CLASS, + this.classOfSalesProductInstance.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfSalesProductInstanceBuilder has_Superclass(final Class clazz * @param clazz The Class. * @return This builder. */ - public final ClassOfSalesProductInstanceBuilder member__Of(final Class clazz) { - this.classOfSalesProductInstance.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSalesProductInstanceBuilder member_Of(final Class clazz) { + this.classOfSalesProductInstance.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfSalesProductInstanceBuilder member_Of(final ClassOfClass cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSalesProductInstanceBuilder member_Of_( + public final ClassOfSalesProductInstanceBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSalesProductInstance.addValue(MEMBER_OF_, + this.classOfSalesProductInstance.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSalesProductInstanceBuilder part__Of_By_Class( + public final ClassOfSalesProductInstanceBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSalesProductInstance.addValue(PART__OF_BY_CLASS, + this.classOfSalesProductInstance.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfSalesProductInstance build() throws HqdmException { && this.classOfSalesProductInstance.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSalesProductInstance.hasValue(MEMBER__OF) - && this.classOfSalesProductInstance.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSalesProductInstance.hasValue(MEMBER_OF) && this.classOfSalesProductInstance.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSalesProductInstance.hasValue(MEMBER_OF_) - && this.classOfSalesProductInstance.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSalesProductInstance.hasValue(PART__OF_BY_CLASS) - && this.classOfSalesProductInstance.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSalesProductInstance.hasValue(PART_OF_BY_CLASS) + && this.classOfSalesProductInstance.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSalesProductInstance; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSignBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSignBuilder.java index 70c7d9d1..cc8ffc8e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSignBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSignBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfSignBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSignBuilder consists__Of_By_Class( + public final ClassOfSignBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSign.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfSign.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfSignBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfSignBuilder member__Of(final Class clazz) { - this.classOfSign.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSignBuilder member_Of(final Class clazz) { + this.classOfSign.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ClassOfSignBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSignBuilder member_Of_( + public final ClassOfSignBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSign.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfSign.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSignBuilder part__Of_By_Class( + public final ClassOfSignBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSign.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfSign.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ClassOfSign build() throws HqdmException { && this.classOfSign.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSign.hasValue(MEMBER__OF) - && this.classOfSign.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSign.hasValue(MEMBER_OF) && this.classOfSign.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSign.hasValue(MEMBER_OF_) - && this.classOfSign.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSign.hasValue(PART__OF_BY_CLASS) - && this.classOfSign.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSign.hasValue(PART_OF_BY_CLASS) + && this.classOfSign.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSign; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedActivityBuilder.java index 417ba0fb..b8985913 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedActivityBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -52,19 +48,18 @@ public ClassOfSociallyConstructedActivityBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedActivityBuilder consists__Of_By_Class( + public final ClassOfSociallyConstructedActivityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSociallyConstructedActivity.addValue(CONSISTS__OF_BY_CLASS, + this.classOfSociallyConstructedActivity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -88,8 +83,8 @@ public final ClassOfSociallyConstructedActivityBuilder has_Superclass(final Clas * @param clazz The Class. * @return This builder. */ - public final ClassOfSociallyConstructedActivityBuilder member__Of(final Class clazz) { - this.classOfSociallyConstructedActivity.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSociallyConstructedActivityBuilder member_Of(final Class clazz) { + this.classOfSociallyConstructedActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -114,26 +109,25 @@ public final ClassOfSociallyConstructedActivityBuilder member_Of(final ClassOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedActivityBuilder member_Of_( + public final ClassOfSociallyConstructedActivityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSociallyConstructedActivity.addValue(MEMBER_OF_, + this.classOfSociallyConstructedActivity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedActivityBuilder part__Of_By_Class( + public final ClassOfSociallyConstructedActivityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSociallyConstructedActivity.addValue(PART__OF_BY_CLASS, + this.classOfSociallyConstructedActivity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -160,15 +154,14 @@ public final ClassOfSociallyConstructedActivityBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ClassOfSociallyConstructedActivityBuilder part_Of_By_Class_( + public final ClassOfSociallyConstructedActivityBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.classOfSociallyConstructedActivity.addValue(PART_OF_BY_CLASS_, + this.classOfSociallyConstructedActivity.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -186,30 +179,14 @@ public ClassOfSociallyConstructedActivity build() throws HqdmException { && this.classOfSociallyConstructedActivity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSociallyConstructedActivity.hasValue(MEMBER__OF) - && this.classOfSociallyConstructedActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSociallyConstructedActivity.hasValue(MEMBER_OF) && this.classOfSociallyConstructedActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSociallyConstructedActivity.hasValue(MEMBER_OF_) - && this.classOfSociallyConstructedActivity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSociallyConstructedActivity.hasValue(PART__OF_BY_CLASS) - && this.classOfSociallyConstructedActivity.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.classOfSociallyConstructedActivity.hasValue(PART_OF_BY_CLASS) && this.classOfSociallyConstructedActivity.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.classOfSociallyConstructedActivity.hasValue(PART_OF_BY_CLASS_) - && this.classOfSociallyConstructedActivity.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return this.classOfSociallyConstructedActivity; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedObjectBuilder.java index 7677f7d3..ac31e158 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSociallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfSociallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedObjectBuilder consists__Of_By_Class( + public final ClassOfSociallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSociallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfSociallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfSociallyConstructedObjectBuilder has_Superclass(final Class * @param clazz The Class. * @return This builder. */ - public final ClassOfSociallyConstructedObjectBuilder member__Of(final Class clazz) { - this.classOfSociallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSociallyConstructedObjectBuilder member_Of(final Class clazz) { + this.classOfSociallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfSociallyConstructedObjectBuilder member_Of(final ClassOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedObjectBuilder member_Of_( + public final ClassOfSociallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSociallyConstructedObject.addValue(MEMBER_OF_, + this.classOfSociallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSociallyConstructedObjectBuilder part__Of_By_Class( + public final ClassOfSociallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSociallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.classOfSociallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -147,21 +143,13 @@ public ClassOfSociallyConstructedObject build() throws HqdmException { && this.classOfSociallyConstructedObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSociallyConstructedObject.hasValue(MEMBER__OF) - && this.classOfSociallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSociallyConstructedObject.hasValue(MEMBER_OF) && this.classOfSociallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSociallyConstructedObject.hasValue(MEMBER_OF_) - && this.classOfSociallyConstructedObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSociallyConstructedObject.hasValue(PART__OF_BY_CLASS) - && this.classOfSociallyConstructedObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSociallyConstructedObject.hasValue(PART_OF_BY_CLASS) + && this.classOfSociallyConstructedObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSociallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSpatioTemporalExtentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSpatioTemporalExtentBuilder.java index 598d6ea4..b08b7b04 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSpatioTemporalExtentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSpatioTemporalExtentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -46,19 +44,18 @@ public ClassOfSpatioTemporalExtentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSpatioTemporalExtentBuilder consists__Of_By_Class( + public final ClassOfSpatioTemporalExtentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSpatioTemporalExtent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfSpatioTemporalExtent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfSpatioTemporalExtentBuilder has_Superclass(final Class clazz * @param clazz The Class. * @return This builder. */ - public final ClassOfSpatioTemporalExtentBuilder member__Of(final Class clazz) { - this.classOfSpatioTemporalExtent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSpatioTemporalExtentBuilder member_Of(final Class clazz) { + this.classOfSpatioTemporalExtent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,26 +105,25 @@ public final ClassOfSpatioTemporalExtentBuilder member_Of(final ClassOfClass cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSpatioTemporalExtentBuilder member_Of_( + public final ClassOfSpatioTemporalExtentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSpatioTemporalExtent.addValue(MEMBER_OF_, + this.classOfSpatioTemporalExtent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSpatioTemporalExtentBuilder part__Of_By_Class( + public final ClassOfSpatioTemporalExtentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSpatioTemporalExtent.addValue(PART__OF_BY_CLASS, + this.classOfSpatioTemporalExtent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfSpatioTemporalExtent build() throws HqdmException { && this.classOfSpatioTemporalExtent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSpatioTemporalExtent.hasValue(MEMBER__OF) - && this.classOfSpatioTemporalExtent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSpatioTemporalExtent.hasValue(MEMBER_OF) && this.classOfSpatioTemporalExtent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSpatioTemporalExtent.hasValue(MEMBER_OF_) - && this.classOfSpatioTemporalExtent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSpatioTemporalExtent.hasValue(PART__OF_BY_CLASS) - && this.classOfSpatioTemporalExtent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSpatioTemporalExtent.hasValue(PART_OF_BY_CLASS) + && this.classOfSpatioTemporalExtent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSpatioTemporalExtent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateBuilder.java index 1f8b76a4..166014cf 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateBuilder consists__Of_By_Class( + public final ClassOfStateBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfState.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfState.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfStateBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateBuilder member__Of(final Class clazz) { - this.classOfState.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateBuilder member_Of(final Class clazz) { + this.classOfState.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ClassOfStateBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateBuilder member_Of_( + public final ClassOfStateBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfState.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfState.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateBuilder part__Of_By_Class( + public final ClassOfStateBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfState.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfState.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ClassOfState build() throws HqdmException { && this.classOfState.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfState.hasValue(MEMBER__OF) - && this.classOfState.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfState.hasValue(MEMBER_OF) && this.classOfState.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfState.hasValue(MEMBER_OF_) - && this.classOfState.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfState.hasValue(PART__OF_BY_CLASS) - && this.classOfState.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfState.hasValue(PART_OF_BY_CLASS) + && this.classOfState.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfState; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfActivityBuilder.java index 48866410..f22a4823 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfActivityBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfActivityBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfActivityBuilder consists__Of_By_Class( + public final ClassOfStateOfActivityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfActivity.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfActivity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfActivityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfActivityBuilder member__Of(final Class clazz) { - this.classOfStateOfActivity.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfActivityBuilder member_Of(final Class clazz) { + this.classOfStateOfActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfActivityBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfActivityBuilder member_Of_( + public final ClassOfStateOfActivityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfActivity.addValue(MEMBER_OF_, + this.classOfStateOfActivity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfActivityBuilder part__Of_By_Class( + public final ClassOfStateOfActivityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfActivity.addValue(PART__OF_BY_CLASS, + this.classOfStateOfActivity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfActivity build() throws HqdmException { && this.classOfStateOfActivity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfActivity.hasValue(MEMBER__OF) - && this.classOfStateOfActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfActivity.hasValue(MEMBER_OF) && this.classOfStateOfActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfActivity.hasValue(MEMBER_OF_) - && this.classOfStateOfActivity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfActivity.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfActivity.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfActivity.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfActivity.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfActivity; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAmountOfMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAmountOfMoneyBuilder.java index b6fcbff5..7343ba67 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAmountOfMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAmountOfMoneyBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfAmountOfMoneyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAmountOfMoneyBuilder consists__Of_By_Class( + public final ClassOfStateOfAmountOfMoneyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfAmountOfMoney.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfAmountOfMoney.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfAmountOfMoneyBuilder has_Superclass(final Class clazz * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfAmountOfMoneyBuilder member__Of(final Class clazz) { - this.classOfStateOfAmountOfMoney.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfAmountOfMoneyBuilder member_Of(final Class clazz) { + this.classOfStateOfAmountOfMoney.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfAmountOfMoneyBuilder member_Of(final ClassOfClass cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAmountOfMoneyBuilder member_Of_( + public final ClassOfStateOfAmountOfMoneyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfAmountOfMoney.addValue(MEMBER_OF_, + this.classOfStateOfAmountOfMoney.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAmountOfMoneyBuilder part__Of_By_Class( + public final ClassOfStateOfAmountOfMoneyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfAmountOfMoney.addValue(PART__OF_BY_CLASS, + this.classOfStateOfAmountOfMoney.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfStateOfAmountOfMoney build() throws HqdmException { && this.classOfStateOfAmountOfMoney.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfAmountOfMoney.hasValue(MEMBER__OF) - && this.classOfStateOfAmountOfMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfAmountOfMoney.hasValue(MEMBER_OF) && this.classOfStateOfAmountOfMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfAmountOfMoney.hasValue(MEMBER_OF_) - && this.classOfStateOfAmountOfMoney.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfAmountOfMoney.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfAmountOfMoney.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfAmountOfMoney.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfAmountOfMoney.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfAmountOfMoney; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAssociationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAssociationBuilder.java index eb08f449..4e160a44 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAssociationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfAssociationBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfAssociationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAssociationBuilder consists__Of_By_Class( + public final ClassOfStateOfAssociationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfAssociation.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfAssociation.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfAssociationBuilder has_Superclass(final Class clazz) * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfAssociationBuilder member__Of(final Class clazz) { - this.classOfStateOfAssociation.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfAssociationBuilder member_Of(final Class clazz) { + this.classOfStateOfAssociation.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfAssociationBuilder member_Of(final ClassOfClass class * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAssociationBuilder member_Of_( + public final ClassOfStateOfAssociationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfAssociation.addValue(MEMBER_OF_, + this.classOfStateOfAssociation.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfAssociationBuilder part__Of_By_Class( + public final ClassOfStateOfAssociationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfAssociation.addValue(PART__OF_BY_CLASS, + this.classOfStateOfAssociation.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfAssociation build() throws HqdmException { && this.classOfStateOfAssociation.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfAssociation.hasValue(MEMBER__OF) - && this.classOfStateOfAssociation.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfAssociation.hasValue(MEMBER_OF) && this.classOfStateOfAssociation.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfAssociation.hasValue(MEMBER_OF_) - && this.classOfStateOfAssociation.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfAssociation.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfAssociation.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfAssociation.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfAssociation.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfAssociation; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalObjectBuilder.java index 15f00853..38db7b3e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfStateOfBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfStateOfBiologicalObjectBuilder has_Superclass(final Class cl * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfBiologicalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfBiologicalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfStateOfBiologicalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalObjectBuilder member_Of_( + public final ClassOfStateOfBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalObject.addValue(MEMBER_OF_, + this.classOfStateOfBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfStateOfBiologicalObject build() throws HqdmException { && this.classOfStateOfBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfBiologicalObject.hasValue(MEMBER__OF) - && this.classOfStateOfBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfBiologicalObject.hasValue(MEMBER_OF) && this.classOfStateOfBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfBiologicalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfBiologicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfBiologicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemBuilder.java index 3f5484f1..9496df9d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfStateOfBiologicalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemBuilder consists__Of_By_Class( + public final ClassOfStateOfBiologicalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfBiologicalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfStateOfBiologicalSystemBuilder has_Superclass(final Class cl * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemBuilder member__Of(final Class clazz) { - this.classOfStateOfBiologicalSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfBiologicalSystemBuilder member_Of(final Class clazz) { + this.classOfStateOfBiologicalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfStateOfBiologicalSystemBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemBuilder member_Of_( + public final ClassOfStateOfBiologicalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystem.addValue(MEMBER_OF_, + this.classOfStateOfBiologicalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemBuilder part__Of_By_Class( + public final ClassOfStateOfBiologicalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystem.addValue(PART__OF_BY_CLASS, + this.classOfStateOfBiologicalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfStateOfBiologicalSystem build() throws HqdmException { && this.classOfStateOfBiologicalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfBiologicalSystem.hasValue(MEMBER__OF) - && this.classOfStateOfBiologicalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfBiologicalSystem.hasValue(MEMBER_OF) && this.classOfStateOfBiologicalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfBiologicalSystem.hasValue(MEMBER_OF_) - && this.classOfStateOfBiologicalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfBiologicalSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfBiologicalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfBiologicalSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfBiologicalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfBiologicalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemComponentBuilder.java index 0baa0fb7..5974ad47 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfBiologicalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfBiologicalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemComponentBuilder consists__Of_By_Class( + public final ClassOfStateOfBiologicalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfBiologicalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfBiologicalSystemComponentBuilder has_Superclass(final * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemComponentBuilder member__Of(final Class clazz) { - this.classOfStateOfBiologicalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfBiologicalSystemComponentBuilder member_Of(final Class clazz) { + this.classOfStateOfBiologicalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfBiologicalSystemComponentBuilder member_Of(final Clas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemComponentBuilder member_Of_( + public final ClassOfStateOfBiologicalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystemComponent.addValue(MEMBER_OF_, + this.classOfStateOfBiologicalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfBiologicalSystemComponentBuilder part__Of_By_Class( + public final ClassOfStateOfBiologicalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfBiologicalSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfStateOfBiologicalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -149,22 +145,14 @@ public ClassOfStateOfBiologicalSystemComponent build() throws HqdmException { .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfBiologicalSystemComponent.hasValue(MEMBER__OF) - && this.classOfStateOfBiologicalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfBiologicalSystemComponent.hasValue(MEMBER_OF) && this.classOfStateOfBiologicalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfBiologicalSystemComponent.hasValue(MEMBER_OF_) - && this.classOfStateOfBiologicalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfBiologicalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfBiologicalSystemComponent.values(PART__OF_BY_CLASS) + if (this.classOfStateOfBiologicalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfBiologicalSystemComponent.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfBiologicalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalObjectBuilder.java index 7b0dfb7c..eb75b8db 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfStateOfFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfStateOfFunctionalObjectBuilder has_Superclass(final Class cl * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfFunctionalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfFunctionalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfStateOfFunctionalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalObjectBuilder member_Of_( + public final ClassOfStateOfFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalObject.addValue(MEMBER_OF_, + this.classOfStateOfFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfStateOfFunctionalObject build() throws HqdmException { && this.classOfStateOfFunctionalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfFunctionalObject.hasValue(MEMBER__OF) - && this.classOfStateOfFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfFunctionalObject.hasValue(MEMBER_OF) && this.classOfStateOfFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfFunctionalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfFunctionalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfFunctionalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemBuilder.java index 9c026d14..eee377fc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfStateOfFunctionalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemBuilder consists__Of_By_Class( + public final ClassOfStateOfFunctionalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfFunctionalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfStateOfFunctionalSystemBuilder has_Superclass(final Class cl * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemBuilder member__Of(final Class clazz) { - this.classOfStateOfFunctionalSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfFunctionalSystemBuilder member_Of(final Class clazz) { + this.classOfStateOfFunctionalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfStateOfFunctionalSystemBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemBuilder member_Of_( + public final ClassOfStateOfFunctionalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystem.addValue(MEMBER_OF_, + this.classOfStateOfFunctionalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemBuilder part__Of_By_Class( + public final ClassOfStateOfFunctionalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystem.addValue(PART__OF_BY_CLASS, + this.classOfStateOfFunctionalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public ClassOfStateOfFunctionalSystem build() throws HqdmException { && this.classOfStateOfFunctionalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfFunctionalSystem.hasValue(MEMBER__OF) - && this.classOfStateOfFunctionalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfFunctionalSystem.hasValue(MEMBER_OF) && this.classOfStateOfFunctionalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfFunctionalSystem.hasValue(MEMBER_OF_) - && this.classOfStateOfFunctionalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfFunctionalSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfFunctionalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfFunctionalSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfFunctionalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfFunctionalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemComponentBuilder.java index c985eb2f..8625c41a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfFunctionalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfFunctionalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemComponentBuilder consists__Of_By_Class( + public final ClassOfStateOfFunctionalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfFunctionalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfFunctionalSystemComponentBuilder has_Superclass(final * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.classOfStateOfFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.classOfStateOfFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfFunctionalSystemComponentBuilder member_Of(final Clas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemComponentBuilder member_Of_( + public final ClassOfStateOfFunctionalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystemComponent.addValue(MEMBER_OF_, + this.classOfStateOfFunctionalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfFunctionalSystemComponentBuilder part__Of_By_Class( + public final ClassOfStateOfFunctionalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfFunctionalSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfStateOfFunctionalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -149,22 +145,14 @@ public ClassOfStateOfFunctionalSystemComponent build() throws HqdmException { .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.classOfStateOfFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfFunctionalSystemComponent.hasValue(MEMBER_OF) && this.classOfStateOfFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfFunctionalSystemComponent.hasValue(MEMBER_OF_) - && this.classOfStateOfFunctionalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfFunctionalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfFunctionalSystemComponent.values(PART__OF_BY_CLASS) + if (this.classOfStateOfFunctionalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfFunctionalSystemComponent.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfFunctionalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfIntentionallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfIntentionallyConstructedObjectBuilder.java index 63b9a9a9..ae2c8734 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfIntentionallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfIntentionallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfIntentionallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfIntentionallyConstructedObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfIntentionallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfIntentionallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfIntentionallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -86,8 +83,8 @@ public final ClassOfStateOfIntentionallyConstructedObjectBuilder has_Superclass( * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfIntentionallyConstructedObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfIntentionallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfIntentionallyConstructedObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfIntentionallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,26 +110,25 @@ public final ClassOfStateOfIntentionallyConstructedObjectBuilder member_Of(final * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfIntentionallyConstructedObjectBuilder member_Of_( + public final ClassOfStateOfIntentionallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfIntentionallyConstructedObject.addValue(MEMBER_OF_, + this.classOfStateOfIntentionallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfIntentionallyConstructedObjectBuilder part__Of_By_Class( + public final ClassOfStateOfIntentionallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfIntentionallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfIntentionallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -151,25 +147,15 @@ public ClassOfStateOfIntentionallyConstructedObject build() throws HqdmException .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfIntentionallyConstructedObject.hasValue(MEMBER__OF) - && this.classOfStateOfIntentionallyConstructedObject.values(MEMBER__OF) - .isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfIntentionallyConstructedObject.hasValue(MEMBER_OF) && this.classOfStateOfIntentionallyConstructedObject.values(MEMBER_OF) .isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfIntentionallyConstructedObject.hasValue(MEMBER_OF_) - && this.classOfStateOfIntentionallyConstructedObject.values(MEMBER_OF_) - .isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfIntentionallyConstructedObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfIntentionallyConstructedObject.values(PART__OF_BY_CLASS) + if (this.classOfStateOfIntentionallyConstructedObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfIntentionallyConstructedObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfIntentionallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryBiologicalObjectBuilder.java index 146ef17c..fcce3a2a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfOrdinaryBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryBiologicalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfOrdinaryBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfOrdinaryBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfOrdinaryBiologicalObjectBuilder has_Superclass(final * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfOrdinaryBiologicalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfOrdinaryBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfOrdinaryBiologicalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfOrdinaryBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfOrdinaryBiologicalObjectBuilder member_Of(final Class * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryBiologicalObjectBuilder member_Of_( + public final ClassOfStateOfOrdinaryBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryBiologicalObject.addValue(MEMBER_OF_, + this.classOfStateOfOrdinaryBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryBiologicalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfOrdinaryBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryBiologicalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfOrdinaryBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,22 +144,14 @@ public ClassOfStateOfOrdinaryBiologicalObject build() throws HqdmException { && this.classOfStateOfOrdinaryBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfOrdinaryBiologicalObject.hasValue(MEMBER__OF) - && this.classOfStateOfOrdinaryBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfOrdinaryBiologicalObject.hasValue(MEMBER_OF) && this.classOfStateOfOrdinaryBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfOrdinaryBiologicalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfOrdinaryBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfOrdinaryBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfOrdinaryBiologicalObject.values(PART__OF_BY_CLASS) + if (this.classOfStateOfOrdinaryBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfOrdinaryBiologicalObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfOrdinaryBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryFunctionalObjectBuilder.java index a3bbd1b0..ee198efe 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryFunctionalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfOrdinaryFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryFunctionalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfOrdinaryFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfOrdinaryFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfOrdinaryFunctionalObjectBuilder has_Superclass(final * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfOrdinaryFunctionalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfOrdinaryFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfOrdinaryFunctionalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfOrdinaryFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfOrdinaryFunctionalObjectBuilder member_Of(final Class * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryFunctionalObjectBuilder member_Of_( + public final ClassOfStateOfOrdinaryFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryFunctionalObject.addValue(MEMBER_OF_, + this.classOfStateOfOrdinaryFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryFunctionalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfOrdinaryFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryFunctionalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfOrdinaryFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,22 +144,14 @@ public ClassOfStateOfOrdinaryFunctionalObject build() throws HqdmException { && this.classOfStateOfOrdinaryFunctionalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfOrdinaryFunctionalObject.hasValue(MEMBER__OF) - && this.classOfStateOfOrdinaryFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfOrdinaryFunctionalObject.hasValue(MEMBER_OF) && this.classOfStateOfOrdinaryFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfOrdinaryFunctionalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfOrdinaryFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfOrdinaryFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfOrdinaryFunctionalObject.values(PART__OF_BY_CLASS) + if (this.classOfStateOfOrdinaryFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfOrdinaryFunctionalObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfOrdinaryFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryPhysicalObjectBuilder.java index cbfdaa89..2e55caf6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrdinaryPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfOrdinaryPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryPhysicalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfOrdinaryPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfOrdinaryPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfOrdinaryPhysicalObjectBuilder has_Superclass(final Cl * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfOrdinaryPhysicalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfOrdinaryPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfOrdinaryPhysicalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfOrdinaryPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfOrdinaryPhysicalObjectBuilder member_Of(final ClassOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryPhysicalObjectBuilder member_Of_( + public final ClassOfStateOfOrdinaryPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryPhysicalObject.addValue(MEMBER_OF_, + this.classOfStateOfOrdinaryPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrdinaryPhysicalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfOrdinaryPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrdinaryPhysicalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfOrdinaryPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,22 +144,14 @@ public ClassOfStateOfOrdinaryPhysicalObject build() throws HqdmException { && this.classOfStateOfOrdinaryPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfOrdinaryPhysicalObject.hasValue(MEMBER__OF) - && this.classOfStateOfOrdinaryPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfOrdinaryPhysicalObject.hasValue(MEMBER_OF) && this.classOfStateOfOrdinaryPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfOrdinaryPhysicalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfOrdinaryPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfOrdinaryPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfOrdinaryPhysicalObject.values(PART__OF_BY_CLASS) + if (this.classOfStateOfOrdinaryPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfOrdinaryPhysicalObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfOrdinaryPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationBuilder.java index 5316e8f2..71f29f39 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfOrganizationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationBuilder consists__Of_By_Class( + public final ClassOfStateOfOrganizationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrganization.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfOrganization.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfOrganizationBuilder has_Superclass(final Class clazz) * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfOrganizationBuilder member__Of(final Class clazz) { - this.classOfStateOfOrganization.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfOrganizationBuilder member_Of(final Class clazz) { + this.classOfStateOfOrganization.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfOrganizationBuilder member_Of(final ClassOfClass clas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationBuilder member_Of_( + public final ClassOfStateOfOrganizationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfOrganization.addValue(MEMBER_OF_, + this.classOfStateOfOrganization.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationBuilder part__Of_By_Class( + public final ClassOfStateOfOrganizationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrganization.addValue(PART__OF_BY_CLASS, + this.classOfStateOfOrganization.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfStateOfOrganization build() throws HqdmException { && this.classOfStateOfOrganization.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfOrganization.hasValue(MEMBER__OF) - && this.classOfStateOfOrganization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfOrganization.hasValue(MEMBER_OF) && this.classOfStateOfOrganization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfOrganization.hasValue(MEMBER_OF_) - && this.classOfStateOfOrganization.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfOrganization.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfOrganization.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfOrganization.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfOrganization.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfOrganization; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationComponentBuilder.java index 23629050..632d8556 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfOrganizationComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfOrganizationComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationComponentBuilder consists__Of_By_Class( + public final ClassOfStateOfOrganizationComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrganizationComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfOrganizationComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfOrganizationComponentBuilder has_Superclass(final Cla * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfOrganizationComponentBuilder member__Of(final Class clazz) { - this.classOfStateOfOrganizationComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfOrganizationComponentBuilder member_Of(final Class clazz) { + this.classOfStateOfOrganizationComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfOrganizationComponentBuilder member_Of(final ClassOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationComponentBuilder member_Of_( + public final ClassOfStateOfOrganizationComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfOrganizationComponent.addValue(MEMBER_OF_, + this.classOfStateOfOrganizationComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfOrganizationComponentBuilder part__Of_By_Class( + public final ClassOfStateOfOrganizationComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfOrganizationComponent.addValue(PART__OF_BY_CLASS, + this.classOfStateOfOrganizationComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,21 +144,13 @@ public ClassOfStateOfOrganizationComponent build() throws HqdmException { && this.classOfStateOfOrganizationComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfOrganizationComponent.hasValue(MEMBER__OF) - && this.classOfStateOfOrganizationComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfOrganizationComponent.hasValue(MEMBER_OF) && this.classOfStateOfOrganizationComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfOrganizationComponent.hasValue(MEMBER_OF_) - && this.classOfStateOfOrganizationComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfOrganizationComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfOrganizationComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfOrganizationComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfOrganizationComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfOrganizationComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPartyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPartyBuilder.java index 868ed003..2d5d07a2 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPartyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPartyBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfPartyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPartyBuilder consists__Of_By_Class( + public final ClassOfStateOfPartyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfParty.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfParty.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfPartyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfPartyBuilder member__Of(final Class clazz) { - this.classOfStateOfParty.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfPartyBuilder member_Of(final Class clazz) { + this.classOfStateOfParty.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfPartyBuilder member_Of(final ClassOfClass classOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPartyBuilder member_Of_( + public final ClassOfStateOfPartyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfParty.addValue(MEMBER_OF_, + this.classOfStateOfParty.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPartyBuilder part__Of_By_Class( + public final ClassOfStateOfPartyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfParty.addValue(PART__OF_BY_CLASS, + this.classOfStateOfParty.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfParty build() throws HqdmException { && this.classOfStateOfParty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfParty.hasValue(MEMBER__OF) - && this.classOfStateOfParty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfParty.hasValue(MEMBER_OF) && this.classOfStateOfParty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfParty.hasValue(MEMBER_OF_) - && this.classOfStateOfParty.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfParty.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfParty.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfParty.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfParty.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfParty; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPersonBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPersonBuilder.java index b9688784..4f7d91c0 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPersonBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPersonBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfPersonBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPersonBuilder consists__Of_By_Class( + public final ClassOfStateOfPersonBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPerson.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfPerson.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfPersonBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfPersonBuilder member__Of(final Class clazz) { - this.classOfStateOfPerson.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfPersonBuilder member_Of(final Class clazz) { + this.classOfStateOfPerson.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfPersonBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPersonBuilder member_Of_( + public final ClassOfStateOfPersonBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfPerson.addValue(MEMBER_OF_, + this.classOfStateOfPerson.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPersonBuilder part__Of_By_Class( + public final ClassOfStateOfPersonBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPerson.addValue(PART__OF_BY_CLASS, + this.classOfStateOfPerson.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfPerson build() throws HqdmException { && this.classOfStateOfPerson.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfPerson.hasValue(MEMBER__OF) - && this.classOfStateOfPerson.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfPerson.hasValue(MEMBER_OF) && this.classOfStateOfPerson.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfPerson.hasValue(MEMBER_OF_) - && this.classOfStateOfPerson.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfPerson.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfPerson.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfPerson.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfPerson.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfPerson; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPhysicalObjectBuilder.java index d6bf50ab..f5cffdf3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPhysicalObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfPhysicalObjectBuilder has_Superclass(final Class claz * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfPhysicalObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfPhysicalObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfPhysicalObjectBuilder member_Of(final ClassOfClass cl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPhysicalObjectBuilder member_Of_( + public final ClassOfStateOfPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfPhysicalObject.addValue(MEMBER_OF_, + this.classOfStateOfPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPhysicalObjectBuilder part__Of_By_Class( + public final ClassOfStateOfPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPhysicalObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfStateOfPhysicalObject build() throws HqdmException { && this.classOfStateOfPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfPhysicalObject.hasValue(MEMBER__OF) - && this.classOfStateOfPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfPhysicalObject.hasValue(MEMBER_OF) && this.classOfStateOfPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfPhysicalObject.hasValue(MEMBER_OF_) - && this.classOfStateOfPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfPhysicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfPhysicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPositionBuilder.java index f532538a..d1b5f42c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfPositionBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfPositionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPositionBuilder consists__Of_By_Class( + public final ClassOfStateOfPositionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPosition.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfPosition.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfPositionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfPositionBuilder member__Of(final Class clazz) { - this.classOfStateOfPosition.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfPositionBuilder member_Of(final Class clazz) { + this.classOfStateOfPosition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfPositionBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPositionBuilder member_Of_( + public final ClassOfStateOfPositionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfPosition.addValue(MEMBER_OF_, + this.classOfStateOfPosition.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfPositionBuilder part__Of_By_Class( + public final ClassOfStateOfPositionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfPosition.addValue(PART__OF_BY_CLASS, + this.classOfStateOfPosition.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfPosition build() throws HqdmException { && this.classOfStateOfPosition.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfPosition.hasValue(MEMBER__OF) - && this.classOfStateOfPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfPosition.hasValue(MEMBER_OF) && this.classOfStateOfPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfPosition.hasValue(MEMBER_OF_) - && this.classOfStateOfPosition.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfPosition.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfPosition.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfPosition.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfPosition.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfPosition; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSalesProductInstanceBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSalesProductInstanceBuilder.java index 43cf750d..772498b8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSalesProductInstanceBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSalesProductInstanceBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public ClassOfStateOfSalesProductInstanceBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSalesProductInstanceBuilder consists__Of_By_Class( + public final ClassOfStateOfSalesProductInstanceBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSalesProductInstance.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSalesProductInstance.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final ClassOfStateOfSalesProductInstanceBuilder has_Superclass(final Clas * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSalesProductInstanceBuilder member__Of(final Class clazz) { - this.classOfStateOfSalesProductInstance.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSalesProductInstanceBuilder member_Of(final Class clazz) { + this.classOfStateOfSalesProductInstance.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final ClassOfStateOfSalesProductInstanceBuilder member_Of(final ClassOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSalesProductInstanceBuilder member_Of_( + public final ClassOfStateOfSalesProductInstanceBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSalesProductInstance.addValue(MEMBER_OF_, + this.classOfStateOfSalesProductInstance.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSalesProductInstanceBuilder part__Of_By_Class( + public final ClassOfStateOfSalesProductInstanceBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSalesProductInstance.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSalesProductInstance.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -147,21 +143,13 @@ public ClassOfStateOfSalesProductInstance build() throws HqdmException { && this.classOfStateOfSalesProductInstance.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSalesProductInstance.hasValue(MEMBER__OF) - && this.classOfStateOfSalesProductInstance.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSalesProductInstance.hasValue(MEMBER_OF) && this.classOfStateOfSalesProductInstance.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSalesProductInstance.hasValue(MEMBER_OF_) - && this.classOfStateOfSalesProductInstance.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSalesProductInstance.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSalesProductInstance.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfSalesProductInstance.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSalesProductInstance.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSalesProductInstance; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSignBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSignBuilder.java index dff69e28..bd8d5257 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSignBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSignBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfSignBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSignBuilder consists__Of_By_Class( + public final ClassOfStateOfSignBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSign.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSign.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfSignBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSignBuilder member__Of(final Class clazz) { - this.classOfStateOfSign.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSignBuilder member_Of(final Class clazz) { + this.classOfStateOfSign.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfSignBuilder member_Of(final ClassOfClass classOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSignBuilder member_Of_( + public final ClassOfStateOfSignBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSign.addValue(MEMBER_OF_, + this.classOfStateOfSign.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSignBuilder part__Of_By_Class( + public final ClassOfStateOfSignBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSign.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSign.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfSign build() throws HqdmException { && this.classOfStateOfSign.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSign.hasValue(MEMBER__OF) - && this.classOfStateOfSign.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSign.hasValue(MEMBER_OF) && this.classOfStateOfSign.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSign.hasValue(MEMBER_OF_) - && this.classOfStateOfSign.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSign.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSign.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfSign.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSign.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSign; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedActivityBuilder.java index b4aaa3a5..7f97e2db 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedActivityBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfSociallyConstructedActivityBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedActivityBuilder consists__Of_By_Class( + public final ClassOfStateOfSociallyConstructedActivityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedActivity.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSociallyConstructedActivity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfSociallyConstructedActivityBuilder has_Superclass(fin * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedActivityBuilder member__Of(final Class clazz) { - this.classOfStateOfSociallyConstructedActivity.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSociallyConstructedActivityBuilder member_Of(final Class clazz) { + this.classOfStateOfSociallyConstructedActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,26 +109,25 @@ public final ClassOfStateOfSociallyConstructedActivityBuilder member_Of(final Cl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedActivityBuilder member_Of_( + public final ClassOfStateOfSociallyConstructedActivityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedActivity.addValue(MEMBER_OF_, + this.classOfStateOfSociallyConstructedActivity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedActivityBuilder part__Of_By_Class( + public final ClassOfStateOfSociallyConstructedActivityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedActivity.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSociallyConstructedActivity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -150,22 +146,14 @@ public ClassOfStateOfSociallyConstructedActivity build() throws HqdmException { .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSociallyConstructedActivity.hasValue(MEMBER__OF) - && this.classOfStateOfSociallyConstructedActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSociallyConstructedActivity.hasValue(MEMBER_OF) && this.classOfStateOfSociallyConstructedActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSociallyConstructedActivity.hasValue(MEMBER_OF_) - && this.classOfStateOfSociallyConstructedActivity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSociallyConstructedActivity.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSociallyConstructedActivity.values(PART__OF_BY_CLASS) + if (this.classOfStateOfSociallyConstructedActivity.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSociallyConstructedActivity.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSociallyConstructedActivity; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedObjectBuilder.java index af7d32a9..6f2bf9e5 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSociallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public ClassOfStateOfSociallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedObjectBuilder consists__Of_By_Class( + public final ClassOfStateOfSociallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSociallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final ClassOfStateOfSociallyConstructedObjectBuilder has_Superclass(final * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedObjectBuilder member__Of(final Class clazz) { - this.classOfStateOfSociallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSociallyConstructedObjectBuilder member_Of(final Class clazz) { + this.classOfStateOfSociallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final ClassOfStateOfSociallyConstructedObjectBuilder member_Of(final Clas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedObjectBuilder member_Of_( + public final ClassOfStateOfSociallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedObject.addValue(MEMBER_OF_, + this.classOfStateOfSociallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSociallyConstructedObjectBuilder part__Of_By_Class( + public final ClassOfStateOfSociallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSociallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSociallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -149,22 +145,14 @@ public ClassOfStateOfSociallyConstructedObject build() throws HqdmException { .isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSociallyConstructedObject.hasValue(MEMBER__OF) - && this.classOfStateOfSociallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSociallyConstructedObject.hasValue(MEMBER_OF) && this.classOfStateOfSociallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSociallyConstructedObject.hasValue(MEMBER_OF_) - && this.classOfStateOfSociallyConstructedObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSociallyConstructedObject.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSociallyConstructedObject.values(PART__OF_BY_CLASS) + if (this.classOfStateOfSociallyConstructedObject.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSociallyConstructedObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSociallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemBuilder.java index c8055724..0824cbbe 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemBuilder consists__Of_By_Class( + public final ClassOfStateOfSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSystem.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSystemBuilder member__Of(final Class clazz) { - this.classOfStateOfSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSystemBuilder member_Of(final Class clazz) { + this.classOfStateOfSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfSystemBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemBuilder member_Of_( + public final ClassOfStateOfSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSystem.addValue(MEMBER_OF_, + this.classOfStateOfSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemBuilder part__Of_By_Class( + public final ClassOfStateOfSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSystem.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfStateOfSystem build() throws HqdmException { && this.classOfStateOfSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSystem.hasValue(MEMBER__OF) - && this.classOfStateOfSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSystem.hasValue(MEMBER_OF) && this.classOfStateOfSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSystem.hasValue(MEMBER_OF_) - && this.classOfStateOfSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemComponentBuilder.java index bbd5345a..8755d064 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfStateOfSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfStateOfSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemComponentBuilder consists__Of_By_Class( + public final ClassOfStateOfSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfStateOfSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfStateOfSystemComponentBuilder has_Superclass(final Class cla * @param clazz The Class. * @return This builder. */ - public final ClassOfStateOfSystemComponentBuilder member__Of(final Class clazz) { - this.classOfStateOfSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfStateOfSystemComponentBuilder member_Of(final Class clazz) { + this.classOfStateOfSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfStateOfSystemComponentBuilder member_Of(final ClassOfClass c * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemComponentBuilder member_Of_( + public final ClassOfStateOfSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfStateOfSystemComponent.addValue(MEMBER_OF_, + this.classOfStateOfSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfStateOfSystemComponentBuilder part__Of_By_Class( + public final ClassOfStateOfSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfStateOfSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfStateOfSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public ClassOfStateOfSystemComponent build() throws HqdmException { && this.classOfStateOfSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfStateOfSystemComponent.hasValue(MEMBER__OF) - && this.classOfStateOfSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfStateOfSystemComponent.hasValue(MEMBER_OF) && this.classOfStateOfSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfStateOfSystemComponent.hasValue(MEMBER_OF_) - && this.classOfStateOfSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfStateOfSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfStateOfSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfStateOfSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfStateOfSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfStateOfSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemBuilder.java index d89a8f65..d70d0458 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemBuilder consists__Of_By_Class( + public final ClassOfSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSystem.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ClassOfSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfSystemBuilder member__Of(final Class clazz) { - this.classOfSystem.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSystemBuilder member_Of(final Class clazz) { + this.classOfSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ClassOfSystemBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemBuilder member_Of_( + public final ClassOfSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSystem.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.classOfSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemBuilder part__Of_By_Class( + public final ClassOfSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSystem.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.classOfSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ClassOfSystem build() throws HqdmException { && this.classOfSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSystem.hasValue(MEMBER__OF) - && this.classOfSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSystem.hasValue(MEMBER_OF) && this.classOfSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSystem.hasValue(MEMBER_OF_) - && this.classOfSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSystem.hasValue(PART__OF_BY_CLASS) - && this.classOfSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSystem.hasValue(PART_OF_BY_CLASS) + && this.classOfSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemComponentBuilder.java index 362c2df8..24bd1a66 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassOfSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ClassOfSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemComponentBuilder consists__Of_By_Class( + public final ClassOfSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.classOfSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final ClassOfSystemComponentBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ClassOfSystemComponentBuilder member__Of(final Class clazz) { - this.classOfSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final ClassOfSystemComponentBuilder member_Of(final Class clazz) { + this.classOfSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final ClassOfSystemComponentBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemComponentBuilder member_Of_( + public final ClassOfSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.classOfSystemComponent.addValue(MEMBER_OF_, + this.classOfSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ClassOfSystemComponentBuilder part__Of_By_Class( + public final ClassOfSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.classOfSystemComponent.addValue(PART__OF_BY_CLASS, + this.classOfSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public ClassOfSystemComponent build() throws HqdmException { && this.classOfSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.classOfSystemComponent.hasValue(MEMBER__OF) - && this.classOfSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classOfSystemComponent.hasValue(MEMBER_OF) && this.classOfSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.classOfSystemComponent.hasValue(MEMBER_OF_) - && this.classOfSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.classOfSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.classOfSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.classOfSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.classOfSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.classOfSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassificationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassificationBuilder.java index cc2fcd2f..8d2609f1 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassificationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ClassificationBuilder.java @@ -17,7 +17,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CLASSIFIER; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -76,14 +75,15 @@ public final ClassificationBuilder member_M(final Thing thing) { * @param clazz The Class. * @return This builder. */ - public final ClassificationBuilder member__Of(final Class clazz) { - this.classification.addValue(MEMBER__OF, clazz.getId()); + public final ClassificationBuilder member_Of(final Class clazz) { + this.classification.addValue(MEMBER_OF, clazz.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a relationship is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfRelationship}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a + * relationship is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * {@link ClassOfRelationship}. * * @param classOfRelationship The ClassOfRelationship. * @return This builder. @@ -106,10 +106,6 @@ public Classification build() throws HqdmException { if (!this.classification.hasValue(MEMBER)) { throw new HqdmException("Property Not Set: member"); } - if (this.classification.hasValue(MEMBER__OF) - && this.classification.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.classification.hasValue(MEMBER_OF) && this.classification.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CompositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CompositionBuilder.java index 24ace293..3de62ca7 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CompositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CompositionBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.WHOLE; @@ -50,8 +49,8 @@ public CompositionBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final CompositionBuilder member__Of(final Class clazz) { - this.composition.addValue(MEMBER__OF, clazz.getId()); + public final CompositionBuilder member_Of(final Class clazz) { + this.composition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -99,10 +98,6 @@ public final CompositionBuilder whole_M(final SpatioTemporalExtent spatioTempora * @throws HqdmException If the Composition is missing any mandatory properties. */ public Composition build() throws HqdmException { - if (this.composition.hasValue(MEMBER__OF) - && this.composition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.composition.hasValue(MEMBER_OF) && this.composition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractExecutionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractExecutionBuilder.java index 2f7874bb..414c1ced 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractExecutionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractExecutionBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -48,6 +43,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -109,14 +105,14 @@ public final ContractExecutionBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractExecutionBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractExecution.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ContractExecutionBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractExecution.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -176,15 +172,15 @@ public final ContractExecutionBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ContractExecutionBuilder member__Of(final Class clazz) { - this.contractExecution.addValue(MEMBER__OF, clazz.getId()); + public final ContractExecutionBuilder member_Of(final Class clazz) { + this.contractExecution.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link ContractExecution} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfContractExecution}. + * {@link ContractExecution} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfContractExecution}. * * @param classOfContractExecution The ClassOfContractExecution. * @return This builder. @@ -204,6 +200,7 @@ public final ContractExecutionBuilder member_Of(final ClassOfContractExecution c */ public final ContractExecutionBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.contractExecution.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.contractExecution.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -215,47 +212,46 @@ public final ContractExecutionBuilder member_Of_Kind_M(final KindOfActivity kind * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractExecutionBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractExecution.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ContractExecutionBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractExecution.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link ContractExecution} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly - * one {@link ContractProcess}. + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * - * @param contractProcess The ContractProcess. + * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final ContractExecutionBuilder part_Of_M(final ContractProcess contractProcess) { - this.contractExecution.addValue(PART_OF, contractProcess.getId()); + public final ContractExecutionBuilder part_Of(final AgreementExecution agreementExecution) { + this.contractExecution.addValue(PART_OF, agreementExecution.getId()); return this; } + /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link ContractExecution} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly one + * {@link ContractProcess}. * - * @param agreementExecution The AgreementExecution. + * @param contractProcess The ContractProcess. * @return This builder. */ - public final ContractExecutionBuilder part_Of_(final AgreementExecution agreementExecution) { - this.contractExecution.addValue(PART_OF_, agreementExecution.getId()); + public final ContractExecutionBuilder part_Of_M(final ContractProcess contractProcess) { + this.contractExecution.addValue(PART_OF, contractProcess.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -285,24 +281,23 @@ public final ContractExecutionBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractExecutionBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractExecution.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ContractExecutionBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractExecution.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -339,10 +334,6 @@ public ContractExecution build() throws HqdmException { && this.contractExecution.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.contractExecution.hasValue(MEMBER__OF) - && this.contractExecution.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.contractExecution.hasValue(MEMBER_OF) && this.contractExecution.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -350,17 +341,10 @@ public ContractExecution build() throws HqdmException { if (!this.contractExecution.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.contractExecution.hasValue(PART__OF) - && this.contractExecution.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.contractExecution.hasValue(PART_OF)) { + if (this.contractExecution.hasValue(PART_OF) + && this.contractExecution.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.contractExecution.hasValue(PART_OF_) - && this.contractExecution.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.contractExecution.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -368,10 +352,6 @@ public ContractExecution build() throws HqdmException { && this.contractExecution.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.contractExecution.hasValue(TEMPORAL__PART_OF) - && this.contractExecution.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.contractExecution.hasValue(TEMPORAL_PART_OF) && this.contractExecution.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractProcessBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractProcessBuilder.java index f0fadc7f..19327231 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractProcessBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ContractProcessBuilder.java @@ -18,21 +18,15 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AgreeContract; @@ -50,6 +44,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -112,21 +107,21 @@ public final ContractProcessBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractProcessBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractProcess.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ContractProcessBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractProcess.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} relationship type where a - * {@link ContractProcess} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} exactly - * one {@link AgreeContract}. + * {@link ContractProcess} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} exactly one + * {@link AgreeContract}. * * @param agreeContract The AgreeContract. * @return This builder. @@ -138,14 +133,14 @@ public final ContractProcessBuilder consists_Of(final AgreeContract agreeContrac /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_} relationship type where a - * {@link ContractProcess} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} exactly - * one {@link ContractExecution}. + * {@link ContractProcess} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} exactly one + * {@link ContractExecution}. * * @param contractExecution The ContractExecution. * @return This builder. */ - public final ContractProcessBuilder consists_Of_(final ContractExecution contractExecution) { - this.contractProcess.addValue(CONSISTS_OF_, contractExecution.getId()); + public final ContractProcessBuilder consists_Of(final ContractExecution contractExecution) { + this.contractProcess.addValue(CONSISTS_OF, contractExecution.getId()); return this; } @@ -192,15 +187,15 @@ public final ContractProcessBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ContractProcessBuilder member__Of(final Class clazz) { - this.contractProcess.addValue(MEMBER__OF, clazz.getId()); + public final ContractProcessBuilder member_Of(final Class clazz) { + this.contractProcess.addValue(MEMBER_OF, clazz.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * contract process may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link ClassOfContractProcess}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a contract + * process may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link ClassOfContractProcess}. * * @param classOfContractProcess The ClassOfContractProcess. * @return This builder. @@ -220,6 +215,7 @@ public final ContractProcessBuilder member_Of(final ClassOfContractProcess class */ public final ContractProcessBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.contractProcess.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.contractProcess.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -231,16 +227,15 @@ public final ContractProcessBuilder member_Of_Kind_M(final KindOfActivity kindOf * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractProcessBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractProcess.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ContractProcessBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractProcess.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link ReachingAgreement}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link ReachingAgreement}. * * @param reachingAgreement The ReachingAgreement. * @return This builder. @@ -253,26 +248,24 @@ public final ContractProcessBuilder part_Of(final ReachingAgreement reachingAgre /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final ContractProcessBuilder part_Of_(final AgreementExecution agreementExecution) { - this.contractProcess.addValue(PART_OF_, agreementExecution.getId()); + public final ContractProcessBuilder part_Of(final AgreementExecution agreementExecution) { + this.contractProcess.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -303,24 +296,23 @@ public final ContractProcessBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ContractProcessBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.contractProcess.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ContractProcessBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.contractProcess.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -357,10 +349,6 @@ public ContractProcess build() throws HqdmException { && this.contractProcess.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.contractProcess.hasValue(MEMBER__OF) - && this.contractProcess.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.contractProcess.hasValue(MEMBER_OF) && this.contractProcess.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -368,18 +356,10 @@ public ContractProcess build() throws HqdmException { if (!this.contractProcess.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.contractProcess.hasValue(PART__OF) - && this.contractProcess.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.contractProcess.hasValue(PART_OF) && this.contractProcess.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.contractProcess.hasValue(PART_OF_) - && this.contractProcess.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.contractProcess.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -387,10 +367,6 @@ public ContractProcess build() throws HqdmException { && this.contractProcess.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.contractProcess.hasValue(TEMPORAL__PART_OF) - && this.contractProcess.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.contractProcess.hasValue(TEMPORAL_PART_OF) && this.contractProcess.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CurrencyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CurrencyBuilder.java index c9628983..2549c00a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CurrencyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/CurrencyBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public CurrencyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final CurrencyBuilder consists__Of_By_Class( + public final CurrencyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.currency.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.currency.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final CurrencyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final CurrencyBuilder member__Of(final Class clazz) { - this.currency.addValue(MEMBER__OF, clazz.getId()); + public final CurrencyBuilder member_Of(final Class clazz) { + this.currency.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final CurrencyBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final CurrencyBuilder member_Of_( + public final CurrencyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.currency.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.currency.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final CurrencyBuilder part__Of_By_Class( + public final CurrencyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.currency.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.currency.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public Currency build() throws HqdmException { && this.currency.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.currency.hasValue(MEMBER__OF) - && this.currency.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.currency.hasValue(MEMBER_OF) && this.currency.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.currency.hasValue(MEMBER_OF_) - && this.currency.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.currency.hasValue(PART__OF_BY_CLASS) - && this.currency.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.currency.hasValue(PART_OF_BY_CLASS) + && this.currency.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return this.currency; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinedRelationshipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinedRelationshipBuilder.java index a5811cfc..5b8510f8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinedRelationshipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinedRelationshipBuilder.java @@ -17,7 +17,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INVOLVES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -26,6 +25,7 @@ import uk.gov.gchq.magmacore.hqdm.model.DefinedRelationship; import uk.gov.gchq.magmacore.hqdm.model.KindOfRelationshipWithSignature; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.RelationshipServices; /** @@ -64,8 +64,8 @@ public final DefinedRelationshipBuilder involves_M(final Classification classifi * @param clazz The Class. * @return This builder. */ - public final DefinedRelationshipBuilder member__Of(final Class clazz) { - this.definedRelationship.addValue(MEMBER__OF, clazz.getId()); + public final DefinedRelationshipBuilder member_Of(final Class clazz) { + this.definedRelationship.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -92,8 +92,8 @@ public final DefinedRelationshipBuilder member_Of(final ClassOfRelationship clas */ public final DefinedRelationshipBuilder member_Of_Kind_M( final KindOfRelationshipWithSignature kindOfRelationshipWithSignature) { - this.definedRelationship.addValue(MEMBER_OF_KIND, - kindOfRelationshipWithSignature.getId()); + this.definedRelationship.addValue(MEMBER_OF_KIND, kindOfRelationshipWithSignature.getId()); + this.definedRelationship.addValue(RDFS.RDF_TYPE, kindOfRelationshipWithSignature.getId()); return this; } @@ -107,10 +107,6 @@ public DefinedRelationship build() throws HqdmException { if (!this.definedRelationship.hasValue(INVOLVES)) { throw new HqdmException("Property Not Set: involves"); } - if (this.definedRelationship.hasValue(MEMBER__OF) - && this.definedRelationship.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.definedRelationship.hasValue(MEMBER_OF) && this.definedRelationship.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinitionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinitionBuilder.java index 6d313372..8b5bd6b8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinitionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DefinitionBuilder.java @@ -43,8 +43,8 @@ public DefinitionBuilder(final IRI iri) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the * {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} has a * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} that is a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link Pattern}. diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DescriptionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DescriptionBuilder.java index 38a1e208..12ec1d6f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DescriptionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/DescriptionBuilder.java @@ -43,8 +43,8 @@ public DescriptionBuilder(final IRI iri) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the * {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} has a * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} that is a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link Pattern}. diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployeeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployeeBuilder.java index 94e5c50e..b37a480e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployeeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployeeBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final EmployeeBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployeeBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employee.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final EmployeeBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employee.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final EmployeeBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final EmployeeBuilder member__Of(final Class clazz) { - this.employee.addValue(MEMBER__OF, clazz.getId()); + public final EmployeeBuilder member_Of(final Class clazz) { + this.employee.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,6 +146,7 @@ public final EmployeeBuilder member_Of(final ClassOfStateOfPerson classOfStateOf */ public final EmployeeBuilder member_Of_Kind_M(final Role role) { this.employee.addValue(MEMBER_OF_KIND, role.getId()); + this.employee.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +158,19 @@ public final EmployeeBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployeeBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employee.addValue(PART__OF, spatioTemporalExtent.getId()); + public final EmployeeBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employee.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -184,8 +183,8 @@ public final EmployeeBuilder part_Of_Possible_World_M(final PossibleWorld possib /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an - * {@link Employee} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly - * one {@link Employment}. + * {@link Employee} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one + * {@link Employment}. * * @param employment The Employment. * @return This builder. @@ -203,8 +202,8 @@ public final EmployeeBuilder participant_In_M(final Employment employment) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployeeBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employee.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final EmployeeBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employee.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -240,10 +239,6 @@ public Employee build() throws HqdmException { && this.employee.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.employee.hasValue(MEMBER__OF) - && this.employee.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.employee.hasValue(MEMBER_OF) && this.employee.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,9 +246,9 @@ public Employee build() throws HqdmException { if (!this.employee.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.employee.hasValue(PART__OF) - && this.employee.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.employee.hasValue(PART_OF) + && this.employee.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.employee.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -261,10 +256,6 @@ public Employee build() throws HqdmException { if (!this.employee.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.employee.hasValue(TEMPORAL__PART_OF) - && this.employee.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.employee.hasValue(TEMPORAL_PART_OF) && this.employee.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployerBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployerBuilder.java index 9fb3cfa2..11dea917 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployerBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmployerBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final EmployerBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployerBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employer.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final EmployerBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employer.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final EmployerBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final EmployerBuilder member__Of(final Class clazz) { - this.employer.addValue(MEMBER__OF, clazz.getId()); + public final EmployerBuilder member_Of(final Class clazz) { + this.employer.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,6 +146,7 @@ public final EmployerBuilder member_Of(final ClassOfStateOfParty classOfStateOfP */ public final EmployerBuilder member_Of_Kind_M(final Role role) { this.employer.addValue(MEMBER_OF_KIND, role.getId()); + this.employer.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +158,19 @@ public final EmployerBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployerBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employer.addValue(PART__OF, spatioTemporalExtent.getId()); + public final EmployerBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employer.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -184,8 +183,8 @@ public final EmployerBuilder part_Of_Possible_World_M(final PossibleWorld possib /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an - * {@link Employer} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly - * one {@link Employment}. + * {@link Employer} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one + * {@link Employment}. * * @param employment The Employment. * @return This builder. @@ -203,8 +202,8 @@ public final EmployerBuilder participant_In_M(final Employment employment) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmployerBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employer.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final EmployerBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employer.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -240,10 +239,6 @@ public Employer build() throws HqdmException { && this.employer.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.employer.hasValue(MEMBER__OF) - && this.employer.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.employer.hasValue(MEMBER_OF) && this.employer.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,9 +246,9 @@ public Employer build() throws HqdmException { if (!this.employer.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.employer.hasValue(PART__OF) - && this.employer.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.employer.hasValue(PART_OF) + && this.employer.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.employer.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -261,10 +256,6 @@ public Employer build() throws HqdmException { if (!this.employer.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.employer.hasValue(TEMPORAL__PART_OF) - && this.employer.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.employer.hasValue(TEMPORAL_PART_OF) && this.employer.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmploymentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmploymentBuilder.java index 27bdc522..4a7e5ef7 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmploymentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EmploymentBuilder.java @@ -16,17 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -40,6 +37,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -90,20 +88,20 @@ public final EmploymentBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmploymentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employment.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final EmploymentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employment.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where an {@link Employment} consists of exactly one {@link Employer}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * an {@link Employment} consists of exactly one {@link Employer}. * * @param employer The Employer. * @return This builder. @@ -114,14 +112,14 @@ public final EmploymentBuilder consists_Of_Participant(final Employer employer) } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where an {@link Employment} consists of exactly one {@link Employee}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * an {@link Employment} consists of exactly one {@link Employee}. * * @param employee The Employee. * @return This builder. */ - public final EmploymentBuilder consists_Of_Participant_(final Employee employee) { - this.employment.addValue(CONSISTS_OF_PARTICIPANT_, employee.getId()); + public final EmploymentBuilder consists_Of_Participant(final Employee employee) { + this.employment.addValue(CONSISTS_OF_PARTICIPANT, employee.getId()); return this; } @@ -144,16 +142,15 @@ public final EmploymentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final EmploymentBuilder member__Of(final Class clazz) { - this.employment.addValue(MEMBER__OF, clazz.getId()); + public final EmploymentBuilder member_Of(final Class clazz) { + this.employment.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an * {@link uk.gov.gchq.magmacore.hqdm.model.Association} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfAssociation}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link ClassOfAssociation}. * * @param classOfAssociation The ClassOfAssociation. * @return This builder. @@ -166,14 +163,14 @@ public final EmploymentBuilder member_Of(final ClassOfAssociation classOfAssocia /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where each * {@link uk.gov.gchq.magmacore.hqdm.model.Association} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfAssociation}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link KindOfAssociation}. * * @param kindOfAssociation The KindOfAssociation. * @return This builder. */ public final EmploymentBuilder member_Of_Kind_M(final KindOfAssociation kindOfAssociation) { this.employment.addValue(MEMBER_OF_KIND, kindOfAssociation.getId()); + this.employment.addValue(RDFS.RDF_TYPE, kindOfAssociation.getId()); return this; } @@ -185,20 +182,19 @@ public final EmploymentBuilder member_Of_Kind_M(final KindOfAssociation kindOfAs * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmploymentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employment.addValue(PART__OF, spatioTemporalExtent.getId()); + public final EmploymentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employment.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -217,24 +213,23 @@ public final EmploymentBuilder part_Of_Possible_World_M(final PossibleWorld poss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EmploymentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.employment.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final EmploymentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.employment.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -264,10 +259,6 @@ public Employment build() throws HqdmException { && this.employment.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.employment.hasValue(MEMBER__OF) - && this.employment.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.employment.hasValue(MEMBER_OF) && this.employment.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -275,17 +266,13 @@ public Employment build() throws HqdmException { if (!this.employment.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.employment.hasValue(PART__OF) - && this.employment.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.employment.hasValue(PART_OF) + && this.employment.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.employment.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.employment.hasValue(TEMPORAL__PART_OF) - && this.employment.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.employment.hasValue(TEMPORAL_PART_OF) && this.employment.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EndingOfOwnershipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EndingOfOwnershipBuilder.java index 11db2cd3..1d03ed3b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EndingOfOwnershipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EndingOfOwnershipBuilder.java @@ -16,13 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -82,14 +81,14 @@ public final EndingOfOwnershipBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EndingOfOwnershipBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.endingOfOwnership.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final EndingOfOwnershipBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.endingOfOwnership.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -112,8 +111,8 @@ public final EndingOfOwnershipBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final EndingOfOwnershipBuilder member__Of(final Class clazz) { - this.endingOfOwnership.addValue(MEMBER__OF, clazz.getId()); + public final EndingOfOwnershipBuilder member_Of(final Class clazz) { + this.endingOfOwnership.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -138,20 +137,19 @@ public final EndingOfOwnershipBuilder member_Of(final ClassOfEvent classOfEvent) * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EndingOfOwnershipBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.endingOfOwnership.addValue(PART__OF, spatioTemporalExtent.getId()); + public final EndingOfOwnershipBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.endingOfOwnership.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -170,8 +168,8 @@ public final EndingOfOwnershipBuilder part_Of_Possible_World_M(final PossibleWor * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EndingOfOwnershipBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.endingOfOwnership.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final EndingOfOwnershipBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.endingOfOwnership.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -194,24 +192,20 @@ public EndingOfOwnership build() throws HqdmException { && this.endingOfOwnership.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.endingOfOwnership.hasValue(MEMBER__OF) - && this.endingOfOwnership.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.endingOfOwnership.hasValue(MEMBER_OF) && this.endingOfOwnership.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.endingOfOwnership.hasValue(PART__OF) - && this.endingOfOwnership.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.endingOfOwnership.hasValue(PART_OF) + && this.endingOfOwnership.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.endingOfOwnership.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.endingOfOwnership.hasValue(TEMPORAL__PART_OF) - && this.endingOfOwnership.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.endingOfOwnership.hasValue(TEMPORAL_PART_OF) + && this.endingOfOwnership.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return this.endingOfOwnership; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EnumeratedClassBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EnumeratedClassBuilder.java index be206986..4795ba48 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EnumeratedClassBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EnumeratedClassBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final EnumeratedClassBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final EnumeratedClassBuilder member__Of(final Class clazz) { - this.enumeratedClass.addValue(MEMBER__OF, clazz.getId()); + public final EnumeratedClassBuilder member_Of(final Class clazz) { + this.enumeratedClass.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public EnumeratedClass build() throws HqdmException { && this.enumeratedClass.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.enumeratedClass.hasValue(MEMBER__OF) - && this.enumeratedClass.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.enumeratedClass.hasValue(MEMBER_OF) && this.enumeratedClass.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EventBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EventBuilder.java index 64fb1399..bfc91de9 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EventBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/EventBuilder.java @@ -16,13 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -81,14 +80,14 @@ public final EventBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EventBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.event.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final EventBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.event.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -111,8 +110,8 @@ public final EventBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final EventBuilder member__Of(final Class clazz) { - this.event.addValue(MEMBER__OF, clazz.getId()); + public final EventBuilder member_Of(final Class clazz) { + this.event.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -137,20 +136,19 @@ public final EventBuilder member_Of(final ClassOfEvent classOfEvent) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EventBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.event.addValue(PART__OF, spatioTemporalExtent.getId()); + public final EventBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.event.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -169,8 +167,8 @@ public final EventBuilder part_Of_Possible_World_M(final PossibleWorld possibleW * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final EventBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.event.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final EventBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.event.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -193,24 +191,20 @@ public Event build() throws HqdmException { && this.event.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.event.hasValue(MEMBER__OF) - && this.event.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.event.hasValue(MEMBER_OF) && this.event.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.event.hasValue(PART__OF) - && this.event.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.event.hasValue(PART_OF) + && this.event.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.event.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.event.hasValue(TEMPORAL__PART_OF) - && this.event.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.event.hasValue(TEMPORAL_PART_OF) + && this.event.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return event; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ExchangeOfGoodsAndMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ExchangeOfGoodsAndMoneyBuilder.java index 2fa9ee15..438ccb17 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ExchangeOfGoodsAndMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ExchangeOfGoodsAndMoneyBuilder.java @@ -20,19 +20,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; @@ -50,6 +45,7 @@ import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership; import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnershipOfMoney; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -112,14 +108,14 @@ public final ExchangeOfGoodsAndMoneyBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ExchangeOfGoodsAndMoneyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.exchangeOfGoodsAndMoney.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ExchangeOfGoodsAndMoneyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.exchangeOfGoodsAndMoney.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -142,7 +138,7 @@ public final ExchangeOfGoodsAndMoneyBuilder consists_Of(final TransferOfOwnershi * @param transferOfOwnershipOfMoney The TransferOfOwnershipOfMoney. * @return Builder */ - public final ExchangeOfGoodsAndMoneyBuilder consists_Of_( + public final ExchangeOfGoodsAndMoneyBuilder consists_Of( final TransferOfOwnershipOfMoney transferOfOwnershipOfMoney) { this.exchangeOfGoodsAndMoney.addValue(CONSISTS_OF_, transferOfOwnershipOfMoney.getId()); return this; @@ -191,8 +187,8 @@ public final ExchangeOfGoodsAndMoneyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ExchangeOfGoodsAndMoneyBuilder member__Of(final Class clazz) { - this.exchangeOfGoodsAndMoney.addValue(MEMBER__OF, clazz.getId()); + public final ExchangeOfGoodsAndMoneyBuilder member_Of(final Class clazz) { + this.exchangeOfGoodsAndMoney.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -220,6 +216,7 @@ public final ExchangeOfGoodsAndMoneyBuilder member_Of(final ClassOfContractExecu */ public final ExchangeOfGoodsAndMoneyBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.exchangeOfGoodsAndMoney.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.exchangeOfGoodsAndMoney.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -231,8 +228,21 @@ public final ExchangeOfGoodsAndMoneyBuilder member_Of_Kind_M(final KindOfActivit * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ExchangeOfGoodsAndMoneyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.exchangeOfGoodsAndMoney.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ExchangeOfGoodsAndMoneyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.exchangeOfGoodsAndMoney.addValue(PART_OF, spatioTemporalExtent.getId()); + return this; + } + + /** + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. + * + * @param agreementExecution The AgreementExecution. + * @return This builder. + */ + public final ExchangeOfGoodsAndMoneyBuilder part_Of(final AgreementExecution agreementExecution) { + this.exchangeOfGoodsAndMoney.addValue(PART_OF, agreementExecution.getId()); return this; } @@ -251,27 +261,12 @@ public final ExchangeOfGoodsAndMoneyBuilder part_Of_M(final SaleOfGoods saleOfGo /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. - * - * @param agreementExecution The AgreementExecution. - * @return This builder. - */ - public final ExchangeOfGoodsAndMoneyBuilder part_Of_(final AgreementExecution agreementExecution) { - this.exchangeOfGoodsAndMoney.addValue(PART_OF_, agreementExecution.getId()); - return this; - } - - /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -302,24 +297,23 @@ public final ExchangeOfGoodsAndMoneyBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ExchangeOfGoodsAndMoneyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.exchangeOfGoodsAndMoney.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ExchangeOfGoodsAndMoneyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.exchangeOfGoodsAndMoney.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -356,10 +350,6 @@ public ExchangeOfGoodsAndMoney build() throws HqdmException { && this.exchangeOfGoodsAndMoney.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.exchangeOfGoodsAndMoney.hasValue(MEMBER__OF) - && this.exchangeOfGoodsAndMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.exchangeOfGoodsAndMoney.hasValue(MEMBER_OF) && this.exchangeOfGoodsAndMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -367,17 +357,10 @@ public ExchangeOfGoodsAndMoney build() throws HqdmException { if (!this.exchangeOfGoodsAndMoney.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.exchangeOfGoodsAndMoney.hasValue(PART__OF) - && this.exchangeOfGoodsAndMoney.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.exchangeOfGoodsAndMoney.hasValue(PART_OF)) { + if (this.exchangeOfGoodsAndMoney.hasValue(PART_OF) + && this.exchangeOfGoodsAndMoney.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.exchangeOfGoodsAndMoney.hasValue(PART_OF_) - && this.exchangeOfGoodsAndMoney.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.exchangeOfGoodsAndMoney.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -385,10 +368,6 @@ public ExchangeOfGoodsAndMoney build() throws HqdmException { && this.exchangeOfGoodsAndMoney.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.exchangeOfGoodsAndMoney.hasValue(TEMPORAL__PART_OF) - && this.exchangeOfGoodsAndMoney.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.exchangeOfGoodsAndMoney.hasValue(TEMPORAL_PART_OF) && this.exchangeOfGoodsAndMoney.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionBuilder.java index 4ac5de3a..65f4009a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,8 +46,8 @@ public FunctionBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final FunctionBuilder member__Of(final Class clazz) { - this.function.addValue(MEMBER__OF, clazz.getId()); + public final FunctionBuilder member_Of(final Class clazz) { + this.function.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -72,10 +71,6 @@ public final FunctionBuilder member_Of(final ClassOfRelationship classOfRelation * @throws HqdmException If the Function_ is missing any mandatory properties. */ public Function_ build() throws HqdmException { - if (this.function.hasValue(MEMBER__OF) - && this.function.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.function.hasValue(MEMBER_OF) && this.function.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalObjectBuilder.java index 31bcaaf6..6bc4c750 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalObjectBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final FunctionalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final FunctionalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -129,15 +128,15 @@ public final FunctionalObjectBuilder intended_Role_M(final Role role) { * @param clazz The Class. * @return This builder. */ - public final FunctionalObjectBuilder member__Of(final Class clazz) { - this.functionalObject.addValue(MEMBER__OF, clazz.getId()); + public final FunctionalObjectBuilder member_Of(final Class clazz) { + this.functionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link FunctionalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfFunctionalObject}. + * {@link FunctionalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfFunctionalObject}. * * @param classOfFunctionalObject The ClassOfFunctionalObject. * @return This builder. @@ -149,14 +148,15 @@ public final FunctionalObjectBuilder member_Of(final ClassOfFunctionalObject cla /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where a - * {@link FunctionalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link KindOfFunctionalObject}. + * {@link FunctionalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link KindOfFunctionalObject}. * * @param kindOfFunctionalObject The KindOfFunctionalObject. * @return This builder. */ public final FunctionalObjectBuilder member_Of_Kind(final KindOfFunctionalObject kindOfFunctionalObject) { this.functionalObject.addValue(MEMBER_OF_KIND, kindOfFunctionalObject.getId()); + this.functionalObject.addValue(RDFS.RDF_TYPE, kindOfFunctionalObject.getId()); return this; } @@ -168,20 +168,19 @@ public final FunctionalObjectBuilder member_Of_Kind(final KindOfFunctionalObject * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final FunctionalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -200,24 +199,23 @@ public final FunctionalObjectBuilder part_Of_Possible_World_M(final PossibleWorl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final FunctionalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -250,10 +248,6 @@ public FunctionalObject build() throws HqdmException { if (!this.functionalObject.hasValue(INTENDED_ROLE)) { throw new HqdmException("Property Not Set: intended_role"); } - if (this.functionalObject.hasValue(MEMBER__OF) - && this.functionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.functionalObject.hasValue(MEMBER_OF) && this.functionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -262,17 +256,13 @@ public FunctionalObject build() throws HqdmException { && this.functionalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.functionalObject.hasValue(PART__OF) - && this.functionalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.functionalObject.hasValue(PART_OF) + && this.functionalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.functionalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.functionalObject.hasValue(TEMPORAL__PART_OF) - && this.functionalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.functionalObject.hasValue(TEMPORAL_PART_OF) && this.functionalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemBuilder.java index 1e94d168..361f0c11 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.System; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final FunctionalSystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystem.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final FunctionalSystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystem.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -130,15 +129,15 @@ public final FunctionalSystemBuilder intended_Role_M(final Role role) { * @param clazz The Class. * @return This builder. */ - public final FunctionalSystemBuilder member__Of(final Class clazz) { - this.functionalSystem.addValue(MEMBER__OF, clazz.getId()); + public final FunctionalSystemBuilder member_Of(final Class clazz) { + this.functionalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link FunctionalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfFunctionalSystem}. + * {@link FunctionalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfFunctionalSystem}. * * @param classOfFunctionalSystem The ClassOfFunctionalSystem. * @return This builder. @@ -150,14 +149,15 @@ public final FunctionalSystemBuilder member_Of(final ClassOfFunctionalSystem cla /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where a - * {@link FunctionalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link KindOfFunctionalSystem}. + * {@link FunctionalSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link KindOfFunctionalSystem}. * * @param kindOfFunctionalSystem The KindOfFunctionalSystem. * @return This builder. */ public final FunctionalSystemBuilder member_Of_Kind(final KindOfFunctionalSystem kindOfFunctionalSystem) { this.functionalSystem.addValue(MEMBER_OF_KIND, kindOfFunctionalSystem.getId()); + this.functionalSystem.addValue(RDFS.RDF_TYPE, kindOfFunctionalSystem.getId()); return this; } @@ -169,20 +169,19 @@ public final FunctionalSystemBuilder member_Of_Kind(final KindOfFunctionalSystem * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystem.addValue(PART__OF, spatioTemporalExtent.getId()); + public final FunctionalSystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystem.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -201,8 +200,8 @@ public final FunctionalSystemBuilder part_Of_Possible_World_M(final PossibleWorl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystem.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final FunctionalSystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystem.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -241,10 +240,6 @@ public FunctionalSystem build() throws HqdmException { if (!this.functionalSystem.hasValue(INTENDED_ROLE)) { throw new HqdmException("Property Not Set: intended_role"); } - if (this.functionalSystem.hasValue(MEMBER__OF) - && this.functionalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.functionalSystem.hasValue(MEMBER_OF) && this.functionalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -253,17 +248,13 @@ public FunctionalSystem build() throws HqdmException { && this.functionalSystem.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.functionalSystem.hasValue(PART__OF) - && this.functionalSystem.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.functionalSystem.hasValue(PART_OF) + && this.functionalSystem.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.functionalSystem.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.functionalSystem.hasValue(TEMPORAL__PART_OF) - && this.functionalSystem.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.functionalSystem.hasValue(TEMPORAL_PART_OF) && this.functionalSystem.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemComponentBuilder.java index 2409602a..607464c2 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/FunctionalSystemComponentBuilder.java @@ -17,16 +17,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.COMPONENT_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -40,6 +38,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -102,14 +101,14 @@ public final FunctionalSystemComponentBuilder component_Of_M(final FunctionalSys * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystemComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final FunctionalSystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -144,8 +143,8 @@ public final FunctionalSystemComponentBuilder intended_Role_M(final Role role) { * @param clazz The Class. * @return This builder. */ - public final FunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.functionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final FunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.functionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -167,17 +166,16 @@ public final FunctionalSystemComponentBuilder member_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where a - * {@link FunctionalSystemComponent} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} at least one - * {@link KindOfFunctionalSystemComponent}. + * {@link FunctionalSystemComponent} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * at least one {@link KindOfFunctionalSystemComponent}. * * @param kindOfFunctionalSystemComponent The KindOfFunctionalSystemComponent. * @return This builder. */ public final FunctionalSystemComponentBuilder member_Of_Kind_M( final KindOfFunctionalSystemComponent kindOfFunctionalSystemComponent) { - this.functionalSystemComponent.addValue(MEMBER_OF_KIND, - kindOfFunctionalSystemComponent.getId()); + this.functionalSystemComponent.addValue(MEMBER_OF_KIND, kindOfFunctionalSystemComponent.getId()); + this.functionalSystemComponent.addValue(RDFS.RDF_TYPE, kindOfFunctionalSystemComponent.getId()); return this; } @@ -189,20 +187,19 @@ public final FunctionalSystemComponentBuilder member_Of_Kind_M( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final FunctionalSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -221,8 +218,8 @@ public final FunctionalSystemComponentBuilder part_Of_Possible_World_M(final Pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final FunctionalSystemComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.functionalSystemComponent.addValue(TEMPORAL__PART_OF, + public final FunctionalSystemComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.functionalSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -230,16 +227,15 @@ public final FunctionalSystemComponentBuilder temporal__Part_Of(final SpatioTemp /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -275,10 +271,6 @@ public FunctionalSystemComponent build() throws HqdmException { if (!this.functionalSystemComponent.hasValue(INTENDED_ROLE)) { throw new HqdmException("Property Not Set: intended_role"); } - if (this.functionalSystemComponent.hasValue(MEMBER__OF) - && this.functionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.functionalSystemComponent.hasValue(MEMBER_OF) && this.functionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -286,17 +278,13 @@ public FunctionalSystemComponent build() throws HqdmException { if (!this.functionalSystemComponent.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.functionalSystemComponent.hasValue(PART__OF) - && this.functionalSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.functionalSystemComponent.hasValue(PART_OF) + && this.functionalSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.functionalSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.functionalSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.functionalSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.functionalSystemComponent.hasValue(TEMPORAL_PART_OF) && this.functionalSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationBuilder.java index eacfb2bb..ce2392d1 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationBuilder.java @@ -43,8 +43,8 @@ public IdentificationBuilder(final IRI iri) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the * {@link uk.gov.gchq.magmacore.hqdm.model.RepresentationByPattern} has a * {@link uk.gov.gchq.magmacore.hqdm.model.Sign} that is a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link Pattern}. diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationOfPhysicalQuantityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationOfPhysicalQuantityBuilder.java index df4fd22d..4f9decd2 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationOfPhysicalQuantityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IdentificationOfPhysicalQuantityBuilder.java @@ -51,7 +51,7 @@ public IdentificationOfPhysicalQuantityBuilder(final IRI iri) { * @param value The Value. * @return This builder. */ - public final IdentificationOfPhysicalQuantityBuilder value__M(final double value) { + public final IdentificationOfPhysicalQuantityBuilder value_M(final double value) { this.identificationOfPhysicalQuantity.addRealValue(VALUE_, value); return this; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InPlaceBiologicalComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InPlaceBiologicalComponentBuilder.java index 3be4e5a4..bed10e54 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InPlaceBiologicalComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InPlaceBiologicalComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystemComponent; @@ -84,14 +82,14 @@ public final InPlaceBiologicalComponentBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InPlaceBiologicalComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.inPlaceBiologicalComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final InPlaceBiologicalComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.inPlaceBiologicalComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final InPlaceBiologicalComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final InPlaceBiologicalComponentBuilder member__Of(final Class clazz) { - this.inPlaceBiologicalComponent.addValue(MEMBER__OF, clazz.getId()); + public final InPlaceBiologicalComponentBuilder member_Of(final Class clazz) { + this.inPlaceBiologicalComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,20 +141,19 @@ public final InPlaceBiologicalComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InPlaceBiologicalComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.inPlaceBiologicalComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final InPlaceBiologicalComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.inPlaceBiologicalComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -175,8 +172,8 @@ public final InPlaceBiologicalComponentBuilder part_Of_Possible_World_M(final Po * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InPlaceBiologicalComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.inPlaceBiologicalComponent.addValue(TEMPORAL__PART_OF, + public final InPlaceBiologicalComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.inPlaceBiologicalComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -217,25 +214,17 @@ public InPlaceBiologicalComponent build() throws HqdmException { && this.inPlaceBiologicalComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.inPlaceBiologicalComponent.hasValue(MEMBER__OF) - && this.inPlaceBiologicalComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.inPlaceBiologicalComponent.hasValue(MEMBER_OF) && this.inPlaceBiologicalComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.inPlaceBiologicalComponent.hasValue(PART__OF) - && this.inPlaceBiologicalComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.inPlaceBiologicalComponent.hasValue(PART_OF) + && this.inPlaceBiologicalComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.inPlaceBiologicalComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.inPlaceBiologicalComponent.hasValue(TEMPORAL__PART_OF) - && this.inPlaceBiologicalComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.inPlaceBiologicalComponent.hasValue(TEMPORAL_PART_OF) && this.inPlaceBiologicalComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IndividualBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IndividualBuilder.java index b2f26bfc..59e67ce6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IndividualBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IndividualBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final IndividualBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IndividualBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.individual.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final IndividualBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.individual.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,15 +114,15 @@ public final IndividualBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final IndividualBuilder member__Of(final Class clazz) { - this.individual.addValue(MEMBER__OF, clazz.getId()); + public final IndividualBuilder member_Of(final Class clazz) { + this.individual.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link ClassOfIndividual}. + * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link ClassOfIndividual}. * * @param classOfIndividual The ClassOfIndividual. * @return This builder. @@ -135,14 +134,15 @@ public final IndividualBuilder member_Of(final ClassOfIndividual classOfIndividu /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link KindOfIndividual}. + * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link KindOfIndividual}. * * @param kindOfIndividual The KindOfIndividual. * @return This builder. */ public final IndividualBuilder member_Of_Kind(final KindOfIndividual kindOfIndividual) { this.individual.addValue(MEMBER_OF_KIND, kindOfIndividual.getId()); + this.individual.addValue(RDFS.RDF_TYPE, kindOfIndividual.getId()); return this; } @@ -154,20 +154,19 @@ public final IndividualBuilder member_Of_Kind(final KindOfIndividual kindOfIndiv * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IndividualBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.individual.addValue(PART__OF, spatioTemporalExtent.getId()); + public final IndividualBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.individual.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,24 +185,23 @@ public final IndividualBuilder part_Of_Possible_World_M(final PossibleWorld poss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IndividualBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.individual.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final IndividualBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.individual.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -233,10 +231,6 @@ public Individual build() throws HqdmException { && this.individual.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.individual.hasValue(MEMBER__OF) - && this.individual.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.individual.hasValue(MEMBER_OF) && this.individual.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -245,17 +239,13 @@ public Individual build() throws HqdmException { && this.individual.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.individual.hasValue(PART__OF) - && this.individual.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.individual.hasValue(PART_OF) + && this.individual.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.individual.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.individual.hasValue(TEMPORAL__PART_OF) - && this.individual.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.individual.hasValue(TEMPORAL_PART_OF) && this.individual.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledFunctionalSystemComponentBuilder.java index 9c057d7e..7e422df3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledFunctionalSystemComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,15 +85,15 @@ public final InstalledFunctionalSystemComponentBuilder beginning(final Event eve * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledFunctionalSystemComponentBuilder consists__Of( + public final InstalledFunctionalSystemComponentBuilder consists_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.installedFunctionalSystemComponent.addValue(CONSISTS__OF, + this.installedFunctionalSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -119,8 +117,8 @@ public final InstalledFunctionalSystemComponentBuilder ending(final Event event) * @param clazz The Class. * @return This builder. */ - public final InstalledFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.installedFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final InstalledFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.installedFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -149,21 +147,20 @@ public final InstalledFunctionalSystemComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledFunctionalSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.installedFunctionalSystemComponent.addValue(PART__OF, + public final InstalledFunctionalSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.installedFunctionalSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -183,9 +180,9 @@ public final InstalledFunctionalSystemComponentBuilder part_Of_Possible_World_M( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledFunctionalSystemComponentBuilder temporal__Part_Of( + public final InstalledFunctionalSystemComponentBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.installedFunctionalSystemComponent.addValue(TEMPORAL__PART_OF, + this.installedFunctionalSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -227,25 +224,17 @@ public InstalledFunctionalSystemComponent build() throws HqdmException { && this.installedFunctionalSystemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.installedFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.installedFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.installedFunctionalSystemComponent.hasValue(MEMBER_OF) && this.installedFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.installedFunctionalSystemComponent.hasValue(PART__OF) - && this.installedFunctionalSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.installedFunctionalSystemComponent.hasValue(PART_OF) + && this.installedFunctionalSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.installedFunctionalSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.installedFunctionalSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.installedFunctionalSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.installedFunctionalSystemComponent.hasValue(TEMPORAL_PART_OF) && this.installedFunctionalSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledObjectBuilder.java index 11482f6e..0e5d647c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/InstalledObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final InstalledObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.installedObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final InstalledObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.installedObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final InstalledObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final InstalledObjectBuilder member__Of(final Class clazz) { - this.installedObject.addValue(MEMBER__OF, clazz.getId()); + public final InstalledObjectBuilder member_Of(final Class clazz) { + this.installedObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link InstalledObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfInstalledObject}. + * {@link InstalledObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfInstalledObject}. * * @param classOfInstalledObject The ClassOfInstalledObject. * @return This builder. @@ -140,20 +138,19 @@ public final InstalledObjectBuilder member_Of(final ClassOfInstalledObject class * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.installedObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final InstalledObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.installedObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,8 +169,8 @@ public final InstalledObjectBuilder part_Of_Possible_World_M(final PossibleWorld * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final InstalledObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.installedObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final InstalledObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.installedObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -210,25 +207,17 @@ public InstalledObject build() throws HqdmException { && this.installedObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.installedObject.hasValue(MEMBER__OF) - && this.installedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.installedObject.hasValue(MEMBER_OF) && this.installedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.installedObject.hasValue(PART__OF) - && this.installedObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.installedObject.hasValue(PART_OF) + && this.installedObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.installedObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.installedObject.hasValue(TEMPORAL__PART_OF) - && this.installedObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.installedObject.hasValue(TEMPORAL_PART_OF) && this.installedObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IntentionallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IntentionallyConstructedObjectBuilder.java index 10755eba..0327f74b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IntentionallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/IntentionallyConstructedObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -36,6 +34,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -89,14 +88,14 @@ public final IntentionallyConstructedObjectBuilder beginning(final Event event) * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IntentionallyConstructedObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.intentionallyConstructedObject.addValue(CONSISTS__OF, + public final IntentionallyConstructedObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.intentionallyConstructedObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -120,8 +119,8 @@ public final IntentionallyConstructedObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final IntentionallyConstructedObjectBuilder member__Of(final Class clazz) { - this.intentionallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final IntentionallyConstructedObjectBuilder member_Of(final Class clazz) { + this.intentionallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -152,8 +151,8 @@ public final IntentionallyConstructedObjectBuilder member_Of( */ public final IntentionallyConstructedObjectBuilder member_Of_Kind( final KindOfIntentionallyConstructedObject kindOfIntentionallyConstructedObject) { - this.intentionallyConstructedObject.addValue(MEMBER_OF_KIND, - kindOfIntentionallyConstructedObject.getId()); + this.intentionallyConstructedObject.addValue(MEMBER_OF_KIND, kindOfIntentionallyConstructedObject.getId()); + this.intentionallyConstructedObject.addValue(RDFS.RDF_TYPE, kindOfIntentionallyConstructedObject.getId()); return this; } @@ -165,20 +164,19 @@ public final IntentionallyConstructedObjectBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IntentionallyConstructedObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.intentionallyConstructedObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final IntentionallyConstructedObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.intentionallyConstructedObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -198,9 +196,9 @@ public final IntentionallyConstructedObjectBuilder part_Of_Possible_World_M(fina * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final IntentionallyConstructedObjectBuilder temporal__Part_Of( + public final IntentionallyConstructedObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.intentionallyConstructedObject.addValue(TEMPORAL__PART_OF, + this.intentionallyConstructedObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -208,16 +206,15 @@ public final IntentionallyConstructedObjectBuilder temporal__Part_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -248,10 +245,6 @@ public IntentionallyConstructedObject build() throws HqdmException { && this.intentionallyConstructedObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.intentionallyConstructedObject.hasValue(MEMBER__OF) - && this.intentionallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.intentionallyConstructedObject.hasValue(MEMBER_OF) && this.intentionallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -260,17 +253,13 @@ public IntentionallyConstructedObject build() throws HqdmException { && this.intentionallyConstructedObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.intentionallyConstructedObject.hasValue(PART__OF) - && this.intentionallyConstructedObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.intentionallyConstructedObject.hasValue(PART_OF) + && this.intentionallyConstructedObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.intentionallyConstructedObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.intentionallyConstructedObject.hasValue(TEMPORAL__PART_OF) - && this.intentionallyConstructedObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.intentionallyConstructedObject.hasValue(TEMPORAL_PART_OF) && this.intentionallyConstructedObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfActivityBuilder.java index 3bfef431..36785c4d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfActivityBuilder.java @@ -16,13 +16,10 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -66,27 +63,26 @@ public final KindOfActivityBuilder causes_By_Class(final ClassOfEvent classOfEve } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfActivityBuilder consists__Of_By_Class( + public final KindOfActivityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfActivity.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfActivity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfActivity} - * has a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link Role} as a + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfActivity} has a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link Role} as a * {@link uk.gov.gchq.magmacore.hqdm.model.Participant}. * * @param role The Role. @@ -99,8 +95,8 @@ public final KindOfActivityBuilder consists_Of_By_Class(final Role role) { /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link KindOfActivity} determines a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * the {@link Class}. + * {@link KindOfActivity} determines a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * {@link Class}. * * @param clazz The Class. * @return This builder. @@ -129,8 +125,8 @@ public final KindOfActivityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfActivityBuilder member__Of(final Class clazz) { - this.kindOfActivity.addValue(MEMBER__OF, clazz.getId()); + public final KindOfActivityBuilder member_Of(final Class clazz) { + this.kindOfActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -155,32 +151,31 @@ public final KindOfActivityBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfActivityBuilder member_Of_( + public final KindOfActivityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfActivity.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfActivity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfActivityBuilder part__Of_By_Class( + public final KindOfActivityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfActivity.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfActivity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link KindOfActivity} references a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * the {@link Class}. + * {@link KindOfActivity} references a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * {@link Class}. * * @param clazz The Class. * @return This builder. @@ -209,21 +204,13 @@ public KindOfActivity build() throws HqdmException { && this.kindOfActivity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfActivity.hasValue(MEMBER__OF) - && this.kindOfActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfActivity.hasValue(MEMBER_OF) && this.kindOfActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfActivity.hasValue(MEMBER_OF_) - && this.kindOfActivity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfActivity.hasValue(PART__OF_BY_CLASS) - && this.kindOfActivity.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfActivity.hasValue(PART_OF_BY_CLASS) + && this.kindOfActivity.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } if (this.kindOfActivity.hasValue(REFERENCES_BY_CLASS) && this.kindOfActivity.values(REFERENCES_BY_CLASS).isEmpty()) { diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfAssociationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfAssociationBuilder.java index 4745dade..63cb9fc0 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfAssociationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfAssociationBuilder.java @@ -15,12 +15,9 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,28 +46,26 @@ public KindOfAssociationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfAssociationBuilder consists__Of_By_Class( + public final KindOfAssociationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfAssociation.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfAssociation.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link KindOfAssociation} has a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link Role} as a part. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link KindOfAssociation} has a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link Role} as a part. * * @param role The Role. * @return This builder. @@ -99,8 +94,8 @@ public final KindOfAssociationBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfAssociationBuilder member__Of(final Class clazz) { - this.kindOfAssociation.addValue(MEMBER__OF, clazz.getId()); + public final KindOfAssociationBuilder member_Of(final Class clazz) { + this.kindOfAssociation.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -125,25 +120,24 @@ public final KindOfAssociationBuilder member_Of(final ClassOfClass classOfClass) * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfAssociationBuilder member_Of_( + public final KindOfAssociationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfAssociation.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfAssociation.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfAssociationBuilder part__Of_By_Class( + public final KindOfAssociationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfAssociation.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfAssociation.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -158,21 +152,13 @@ public KindOfAssociation build() throws HqdmException { && this.kindOfAssociation.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfAssociation.hasValue(MEMBER__OF) - && this.kindOfAssociation.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfAssociation.hasValue(MEMBER_OF) && this.kindOfAssociation.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfAssociation.hasValue(MEMBER_OF_) - && this.kindOfAssociation.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfAssociation.hasValue(PART__OF_BY_CLASS) - && this.kindOfAssociation.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfAssociation.hasValue(PART_OF_BY_CLASS) + && this.kindOfAssociation.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfAssociation; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalObjectBuilder.java index 8ca885bb..4140c1cd 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalObjectBuilder consists__Of_By_Class( + public final KindOfBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfBiologicalObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfBiologicalObjectBuilder member__Of(final Class clazz) { - this.kindOfBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfBiologicalObjectBuilder member_Of(final Class clazz) { + this.kindOfBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfBiologicalObjectBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalObjectBuilder member_Of_( + public final KindOfBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfBiologicalObject.addValue(MEMBER_OF_, + this.kindOfBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalObjectBuilder part__Of_By_Class( + public final KindOfBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalObject.addValue(PART__OF_BY_CLASS, + this.kindOfBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public KindOfBiologicalObject build() throws HqdmException { && this.kindOfBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfBiologicalObject.hasValue(MEMBER__OF) - && this.kindOfBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfBiologicalObject.hasValue(MEMBER_OF) && this.kindOfBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfBiologicalObject.hasValue(MEMBER_OF_) - && this.kindOfBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfBiologicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfBiologicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemBuilder.java index da03ed4a..75827bd8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemBuilder.java @@ -14,14 +14,12 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.NATURAL_ROLE_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,27 +49,26 @@ public KindOfBiologicalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemBuilder consists__Of_By_Class( + public final KindOfBiologicalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfBiologicalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A has_component_by_class relationship type where each - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfBiologicalSystem} - * has a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfBiologicalSystem} has a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link KindOfBiologicalSystemComponent} as a component. * * @param kindOfBiologicalSystemComponent The KindOfBiologicalSystemComponent. @@ -103,8 +100,8 @@ public final KindOfBiologicalSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfBiologicalSystemBuilder member__Of(final Class clazz) { - this.kindOfBiologicalSystem.addValue(MEMBER__OF, clazz.getId()); + public final KindOfBiologicalSystemBuilder member_Of(final Class clazz) { + this.kindOfBiologicalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -129,9 +126,9 @@ public final KindOfBiologicalSystemBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemBuilder member_Of_( + public final KindOfBiologicalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfBiologicalSystem.addValue(MEMBER_OF_, + this.kindOfBiologicalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } @@ -150,17 +147,16 @@ public final KindOfBiologicalSystemBuilder natural_Role_By_Class_M(final Role ro /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemBuilder part__Of_By_Class( + public final KindOfBiologicalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalSystem.addValue(PART__OF_BY_CLASS, + this.kindOfBiologicalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -179,24 +175,16 @@ public KindOfBiologicalSystem build() throws HqdmException { && this.kindOfBiologicalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfBiologicalSystem.hasValue(MEMBER__OF) - && this.kindOfBiologicalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfBiologicalSystem.hasValue(MEMBER_OF) && this.kindOfBiologicalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfBiologicalSystem.hasValue(MEMBER_OF_) - && this.kindOfBiologicalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.kindOfBiologicalSystem.hasValue(NATURAL_ROLE_BY_CLASS)) { throw new HqdmException("Property Not Set: natural_role_by_class"); } - if (this.kindOfBiologicalSystem.hasValue(PART__OF_BY_CLASS) - && this.kindOfBiologicalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfBiologicalSystem.hasValue(PART_OF_BY_CLASS) + && this.kindOfBiologicalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfBiologicalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemComponentBuilder.java index 432c601d..58d8e52e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfBiologicalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public KindOfBiologicalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemComponentBuilder consists__Of_By_Class( + public final KindOfBiologicalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfBiologicalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final KindOfBiologicalSystemComponentBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final KindOfBiologicalSystemComponentBuilder member__Of(final Class clazz) { - this.kindOfBiologicalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final KindOfBiologicalSystemComponentBuilder member_Of(final Class clazz) { + this.kindOfBiologicalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final KindOfBiologicalSystemComponentBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemComponentBuilder member_Of_( + public final KindOfBiologicalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfBiologicalSystemComponent.addValue(MEMBER_OF_, + this.kindOfBiologicalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfBiologicalSystemComponentBuilder part__Of_By_Class( + public final KindOfBiologicalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfBiologicalSystemComponent.addValue(PART__OF_BY_CLASS, + this.kindOfBiologicalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public KindOfBiologicalSystemComponent build() throws HqdmException { && this.kindOfBiologicalSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfBiologicalSystemComponent.hasValue(MEMBER__OF) - && this.kindOfBiologicalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfBiologicalSystemComponent.hasValue(MEMBER_OF) && this.kindOfBiologicalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfBiologicalSystemComponent.hasValue(MEMBER_OF_) - && this.kindOfBiologicalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfBiologicalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.kindOfBiologicalSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfBiologicalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.kindOfBiologicalSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfBiologicalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalObjectBuilder.java index 2e33fe93..fb1cf51f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalObjectBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public KindOfFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalObjectBuilder consists__Of_By_Class( + public final KindOfFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -97,8 +94,8 @@ public final KindOfFunctionalObjectBuilder intended_Role_By_Class_M(final Role r * @param clazz The Class. * @return This builder. */ - public final KindOfFunctionalObjectBuilder member__Of(final Class clazz) { - this.kindOfFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfFunctionalObjectBuilder member_Of(final Class clazz) { + this.kindOfFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -123,26 +120,25 @@ public final KindOfFunctionalObjectBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalObjectBuilder member_Of_( + public final KindOfFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfFunctionalObject.addValue(MEMBER_OF_, + this.kindOfFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalObjectBuilder part__Of_By_Class( + public final KindOfFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalObject.addValue(PART__OF_BY_CLASS, + this.kindOfFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -161,21 +157,13 @@ public KindOfFunctionalObject build() throws HqdmException { if (!this.kindOfFunctionalObject.hasValue(INTENDED_ROLE_BY_CLASS)) { throw new HqdmException("Property Not Set: intended_role_by_class"); } - if (this.kindOfFunctionalObject.hasValue(MEMBER__OF) - && this.kindOfFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfFunctionalObject.hasValue(MEMBER_OF) && this.kindOfFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfFunctionalObject.hasValue(MEMBER_OF_) - && this.kindOfFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfFunctionalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfFunctionalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemBuilder.java index b68db045..c25366ba 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,27 +47,26 @@ public KindOfFunctionalSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemBuilder consists__Of_By_Class( + public final KindOfFunctionalSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalSystem.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfFunctionalSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** * A has_component_by_class relationship type where each - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link KindOfFunctionalSystem} - * has a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link KindOfFunctionalSystem} has + * a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link KindOfFunctionalSystemComponent} as a component. * * @param kindOfFunctionalSystemComponent The KindOfFunctionalSystemComponent. @@ -101,8 +98,8 @@ public final KindOfFunctionalSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfFunctionalSystemBuilder member__Of(final Class clazz) { - this.kindOfFunctionalSystem.addValue(MEMBER__OF, clazz.getId()); + public final KindOfFunctionalSystemBuilder member_Of(final Class clazz) { + this.kindOfFunctionalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -127,26 +124,25 @@ public final KindOfFunctionalSystemBuilder member_Of(final ClassOfClass classOfC * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemBuilder member_Of_( + public final KindOfFunctionalSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfFunctionalSystem.addValue(MEMBER_OF_, + this.kindOfFunctionalSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemBuilder part__Of_By_Class( + public final KindOfFunctionalSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalSystem.addValue(PART__OF_BY_CLASS, + this.kindOfFunctionalSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -165,21 +161,13 @@ public KindOfFunctionalSystem build() throws HqdmException { && this.kindOfFunctionalSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfFunctionalSystem.hasValue(MEMBER__OF) - && this.kindOfFunctionalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfFunctionalSystem.hasValue(MEMBER_OF) && this.kindOfFunctionalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfFunctionalSystem.hasValue(MEMBER_OF_) - && this.kindOfFunctionalSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfFunctionalSystem.hasValue(PART__OF_BY_CLASS) - && this.kindOfFunctionalSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfFunctionalSystem.hasValue(PART_OF_BY_CLASS) + && this.kindOfFunctionalSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfFunctionalSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemComponentBuilder.java index 3645fede..ea373308 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfFunctionalSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public KindOfFunctionalSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemComponentBuilder consists__Of_By_Class( + public final KindOfFunctionalSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfFunctionalSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final KindOfFunctionalSystemComponentBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final KindOfFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.kindOfFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final KindOfFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.kindOfFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final KindOfFunctionalSystemComponentBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemComponentBuilder member_Of_( + public final KindOfFunctionalSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfFunctionalSystemComponent.addValue(MEMBER_OF_, + this.kindOfFunctionalSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfFunctionalSystemComponentBuilder part__Of_By_Class( + public final KindOfFunctionalSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfFunctionalSystemComponent.addValue(PART__OF_BY_CLASS, + this.kindOfFunctionalSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public KindOfFunctionalSystemComponent build() throws HqdmException { && this.kindOfFunctionalSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.kindOfFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfFunctionalSystemComponent.hasValue(MEMBER_OF) && this.kindOfFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfFunctionalSystemComponent.hasValue(MEMBER_OF_) - && this.kindOfFunctionalSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfFunctionalSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.kindOfFunctionalSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfFunctionalSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.kindOfFunctionalSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfFunctionalSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIndividualBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIndividualBuilder.java index 2157103e..11fa6a80 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIndividualBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIndividualBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfIndividualBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIndividualBuilder consists__Of_By_Class( + public final KindOfIndividualBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfIndividual.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfIndividual.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfIndividualBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfIndividualBuilder member__Of(final Class clazz) { - this.kindOfIndividual.addValue(MEMBER__OF, clazz.getId()); + public final KindOfIndividualBuilder member_Of(final Class clazz) { + this.kindOfIndividual.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final KindOfIndividualBuilder member_Of(final ClassOfClass classOfClass) * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIndividualBuilder member_Of_( + public final KindOfIndividualBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfIndividual.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfIndividual.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIndividualBuilder part__Of_By_Class( + public final KindOfIndividualBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfIndividual.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfIndividual.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public KindOfIndividual build() throws HqdmException { && this.kindOfIndividual.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfIndividual.hasValue(MEMBER__OF) - && this.kindOfIndividual.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfIndividual.hasValue(MEMBER_OF) && this.kindOfIndividual.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfIndividual.hasValue(MEMBER_OF_) - && this.kindOfIndividual.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfIndividual.hasValue(PART__OF_BY_CLASS) - && this.kindOfIndividual.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfIndividual.hasValue(PART_OF_BY_CLASS) + && this.kindOfIndividual.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfIndividual; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIntentionallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIntentionallyConstructedObjectBuilder.java index 6b32c2c3..ee84eaa9 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIntentionallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfIntentionallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public KindOfIntentionallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIntentionallyConstructedObjectBuilder consists__Of_By_Class( + public final KindOfIntentionallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfIntentionallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfIntentionallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final KindOfIntentionallyConstructedObjectBuilder has_Superclass(final Cl * @param clazz The Class. * @return This builder. */ - public final KindOfIntentionallyConstructedObjectBuilder member__Of(final Class clazz) { - this.kindOfIntentionallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfIntentionallyConstructedObjectBuilder member_Of(final Class clazz) { + this.kindOfIntentionallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final KindOfIntentionallyConstructedObjectBuilder member_Of(final ClassOf * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIntentionallyConstructedObjectBuilder member_Of_( + public final KindOfIntentionallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfIntentionallyConstructedObject.addValue(MEMBER_OF_, + this.kindOfIntentionallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfIntentionallyConstructedObjectBuilder part__Of_By_Class( + public final KindOfIntentionallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfIntentionallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.kindOfIntentionallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -148,22 +144,14 @@ public KindOfIntentionallyConstructedObject build() throws HqdmException { && this.kindOfIntentionallyConstructedObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfIntentionallyConstructedObject.hasValue(MEMBER__OF) - && this.kindOfIntentionallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfIntentionallyConstructedObject.hasValue(MEMBER_OF) && this.kindOfIntentionallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfIntentionallyConstructedObject.hasValue(MEMBER_OF_) - && this.kindOfIntentionallyConstructedObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfIntentionallyConstructedObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfIntentionallyConstructedObject.values(PART__OF_BY_CLASS) + if (this.kindOfIntentionallyConstructedObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfIntentionallyConstructedObject.values(PART_OF_BY_CLASS) .isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfIntentionallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryBiologicalObjectBuilder.java index ceb41d58..c0edd97b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryBiologicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -48,19 +46,18 @@ public KindOfOrdinaryBiologicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryBiologicalObjectBuilder consists__Of_By_Class( + public final KindOfOrdinaryBiologicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryBiologicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfOrdinaryBiologicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -84,8 +81,8 @@ public final KindOfOrdinaryBiologicalObjectBuilder has_Superclass(final Class cl * @param clazz The Class. * @return This builder. */ - public final KindOfOrdinaryBiologicalObjectBuilder member__Of(final Class clazz) { - this.kindOfOrdinaryBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfOrdinaryBiologicalObjectBuilder member_Of(final Class clazz) { + this.kindOfOrdinaryBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -110,26 +107,25 @@ public final KindOfOrdinaryBiologicalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryBiologicalObjectBuilder member_Of_( + public final KindOfOrdinaryBiologicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfOrdinaryBiologicalObject.addValue(MEMBER_OF_, + this.kindOfOrdinaryBiologicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryBiologicalObjectBuilder part__Of_By_Class( + public final KindOfOrdinaryBiologicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryBiologicalObject.addValue(PART__OF_BY_CLASS, + this.kindOfOrdinaryBiologicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -146,21 +142,13 @@ public KindOfOrdinaryBiologicalObject build() throws HqdmException { && this.kindOfOrdinaryBiologicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfOrdinaryBiologicalObject.hasValue(MEMBER__OF) - && this.kindOfOrdinaryBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfOrdinaryBiologicalObject.hasValue(MEMBER_OF) && this.kindOfOrdinaryBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfOrdinaryBiologicalObject.hasValue(MEMBER_OF_) - && this.kindOfOrdinaryBiologicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfOrdinaryBiologicalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfOrdinaryBiologicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfOrdinaryBiologicalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfOrdinaryBiologicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfOrdinaryBiologicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryFunctionalObjectBuilder.java index d97cfd54..0cc3d13f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryFunctionalObjectBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -50,19 +48,18 @@ public KindOfOrdinaryFunctionalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryFunctionalObjectBuilder consists__Of_By_Class( + public final KindOfOrdinaryFunctionalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryFunctionalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfOrdinaryFunctionalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -99,8 +96,8 @@ public final KindOfOrdinaryFunctionalObjectBuilder intended_Role_By_Class_M(fina * @param clazz The Class. * @return This builder. */ - public final KindOfOrdinaryFunctionalObjectBuilder member__Of(final Class clazz) { - this.kindOfOrdinaryFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfOrdinaryFunctionalObjectBuilder member_Of(final Class clazz) { + this.kindOfOrdinaryFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -125,26 +122,25 @@ public final KindOfOrdinaryFunctionalObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryFunctionalObjectBuilder member_Of_( + public final KindOfOrdinaryFunctionalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfOrdinaryFunctionalObject.addValue(MEMBER_OF_, + this.kindOfOrdinaryFunctionalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryFunctionalObjectBuilder part__Of_By_Class( + public final KindOfOrdinaryFunctionalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryFunctionalObject.addValue(PART__OF_BY_CLASS, + this.kindOfOrdinaryFunctionalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -164,21 +160,13 @@ public KindOfOrdinaryFunctionalObject build() throws HqdmException { if (!this.kindOfOrdinaryFunctionalObject.hasValue(INTENDED_ROLE_BY_CLASS)) { throw new HqdmException("Property Not Set: intended_role_by_class"); } - if (this.kindOfOrdinaryFunctionalObject.hasValue(MEMBER__OF) - && this.kindOfOrdinaryFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfOrdinaryFunctionalObject.hasValue(MEMBER_OF) && this.kindOfOrdinaryFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfOrdinaryFunctionalObject.hasValue(MEMBER_OF_) - && this.kindOfOrdinaryFunctionalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfOrdinaryFunctionalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfOrdinaryFunctionalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfOrdinaryFunctionalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfOrdinaryFunctionalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfOrdinaryFunctionalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryPhysicalObjectBuilder.java index bc7c2b90..9e2ff8b0 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrdinaryPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfOrdinaryPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryPhysicalObjectBuilder consists__Of_By_Class( + public final KindOfOrdinaryPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfOrdinaryPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfOrdinaryPhysicalObjectBuilder has_Superclass(final Class claz * @param clazz The Class. * @return This builder. */ - public final KindOfOrdinaryPhysicalObjectBuilder member__Of(final Class clazz) { - this.kindOfOrdinaryPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfOrdinaryPhysicalObjectBuilder member_Of(final Class clazz) { + this.kindOfOrdinaryPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfOrdinaryPhysicalObjectBuilder member_Of(final ClassOfClass cl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryPhysicalObjectBuilder member_Of_( + public final KindOfOrdinaryPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfOrdinaryPhysicalObject.addValue(MEMBER_OF_, + this.kindOfOrdinaryPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrdinaryPhysicalObjectBuilder part__Of_By_Class( + public final KindOfOrdinaryPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrdinaryPhysicalObject.addValue(PART__OF_BY_CLASS, + this.kindOfOrdinaryPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public KindOfOrdinaryPhysicalObject build() throws HqdmException { && this.kindOfOrdinaryPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfOrdinaryPhysicalObject.hasValue(MEMBER__OF) - && this.kindOfOrdinaryPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfOrdinaryPhysicalObject.hasValue(MEMBER_OF) && this.kindOfOrdinaryPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfOrdinaryPhysicalObject.hasValue(MEMBER_OF_) - && this.kindOfOrdinaryPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfOrdinaryPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfOrdinaryPhysicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfOrdinaryPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfOrdinaryPhysicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfOrdinaryPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationBuilder.java index 64cd0ef2..e8ccdcd7 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,7 +47,7 @@ public KindOfOrganizationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one * {@link ClassOfSpatioTemporalExtent} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another @@ -59,9 +57,9 @@ public KindOfOrganizationBuilder(final IRI iri) { * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationBuilder consists__Of_By_Class( + public final KindOfOrganizationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrganization.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfOrganization.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -102,8 +100,8 @@ public final KindOfOrganizationBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfOrganizationBuilder member__Of(final Class clazz) { - this.kindOfOrganization.addValue(MEMBER__OF, clazz.getId()); + public final KindOfOrganizationBuilder member_Of(final Class clazz) { + this.kindOfOrganization.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -128,9 +126,9 @@ public final KindOfOrganizationBuilder member_Of(final ClassOfClass classOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationBuilder member_Of_( + public final KindOfOrganizationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfOrganization.addValue(MEMBER_OF_, + this.kindOfOrganization.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } @@ -145,9 +143,9 @@ public final KindOfOrganizationBuilder member_Of_( * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationBuilder part__Of_By_Class( + public final KindOfOrganizationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrganization.addValue(PART__OF_BY_CLASS, + this.kindOfOrganization.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -166,21 +164,13 @@ public KindOfOrganization build() throws HqdmException { && this.kindOfOrganization.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfOrganization.hasValue(MEMBER__OF) - && this.kindOfOrganization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfOrganization.hasValue(MEMBER_OF) && this.kindOfOrganization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfOrganization.hasValue(MEMBER_OF_) - && this.kindOfOrganization.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfOrganization.hasValue(PART__OF_BY_CLASS) - && this.kindOfOrganization.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfOrganization.hasValue(PART_OF_BY_CLASS) + && this.kindOfOrganization.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfOrganization; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationComponentBuilder.java index f6a80451..b8c36693 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfOrganizationComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfOrganizationComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationComponentBuilder consists__Of_By_Class( + public final KindOfOrganizationComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrganizationComponent.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfOrganizationComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfOrganizationComponentBuilder has_Superclass(final Class clazz * @param clazz The Class. * @return This builder. */ - public final KindOfOrganizationComponentBuilder member__Of(final Class clazz) { - this.kindOfOrganizationComponent.addValue(MEMBER__OF, clazz.getId()); + public final KindOfOrganizationComponentBuilder member_Of(final Class clazz) { + this.kindOfOrganizationComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfOrganizationComponentBuilder member_Of(final ClassOfClass cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationComponentBuilder member_Of_( + public final KindOfOrganizationComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfOrganizationComponent.addValue(MEMBER_OF_, + this.kindOfOrganizationComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfOrganizationComponentBuilder part__Of_By_Class( + public final KindOfOrganizationComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfOrganizationComponent.addValue(PART__OF_BY_CLASS, + this.kindOfOrganizationComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public KindOfOrganizationComponent build() throws HqdmException { && this.kindOfOrganizationComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfOrganizationComponent.hasValue(MEMBER__OF) - && this.kindOfOrganizationComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfOrganizationComponent.hasValue(MEMBER_OF) && this.kindOfOrganizationComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfOrganizationComponent.hasValue(MEMBER_OF_) - && this.kindOfOrganizationComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfOrganizationComponent.hasValue(PART__OF_BY_CLASS) - && this.kindOfOrganizationComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfOrganizationComponent.hasValue(PART_OF_BY_CLASS) + && this.kindOfOrganizationComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfOrganizationComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPartyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPartyBuilder.java index 9d88ea07..781c99bb 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPartyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPartyBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,25 +47,24 @@ public KindOfPartyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPartyBuilder consists__Of_By_Class( + public final KindOfPartyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfParty.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfParty.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where + * each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystem} has a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link KindOfSystemComponent} as a component. @@ -100,8 +97,8 @@ public final KindOfPartyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPartyBuilder member__Of(final Class clazz) { - this.kindOfParty.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPartyBuilder member_Of(final Class clazz) { + this.kindOfParty.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -126,25 +123,24 @@ public final KindOfPartyBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPartyBuilder member_Of_( + public final KindOfPartyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfParty.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfParty.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPartyBuilder part__Of_By_Class( + public final KindOfPartyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfParty.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfParty.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -162,21 +158,13 @@ public KindOfParty build() throws HqdmException { && this.kindOfParty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfParty.hasValue(MEMBER__OF) - && this.kindOfParty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfParty.hasValue(MEMBER_OF) && this.kindOfParty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfParty.hasValue(MEMBER_OF_) - && this.kindOfParty.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfParty.hasValue(PART__OF_BY_CLASS) - && this.kindOfParty.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfParty.hasValue(PART_OF_BY_CLASS) + && this.kindOfParty.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfParty; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPersonBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPersonBuilder.java index eba93a31..61d89154 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPersonBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPersonBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,25 +47,24 @@ public KindOfPersonBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPersonBuilder consists__Of_By_Class( + public final KindOfPersonBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPerson.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfPerson.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where + * each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.KindOfSystem} has a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link KindOfSystemComponent} as a component. @@ -100,8 +97,8 @@ public final KindOfPersonBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPersonBuilder member__Of(final Class clazz) { - this.kindOfPerson.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPersonBuilder member_Of(final Class clazz) { + this.kindOfPerson.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -126,25 +123,24 @@ public final KindOfPersonBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPersonBuilder member_Of_( + public final KindOfPersonBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfPerson.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfPerson.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPersonBuilder part__Of_By_Class( + public final KindOfPersonBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPerson.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfPerson.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -162,21 +158,13 @@ public KindOfPerson build() throws HqdmException { && this.kindOfPerson.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfPerson.hasValue(MEMBER__OF) - && this.kindOfPerson.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfPerson.hasValue(MEMBER_OF) && this.kindOfPerson.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfPerson.hasValue(MEMBER_OF_) - && this.kindOfPerson.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfPerson.hasValue(PART__OF_BY_CLASS) - && this.kindOfPerson.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfPerson.hasValue(PART_OF_BY_CLASS) + && this.kindOfPerson.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfPerson; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalObjectBuilder.java index db354ca3..fe1b9e98 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfPhysicalObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPhysicalObjectBuilder consists__Of_By_Class( + public final KindOfPhysicalObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPhysicalObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfPhysicalObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfPhysicalObjectBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPhysicalObjectBuilder member__Of(final Class clazz) { - this.kindOfPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPhysicalObjectBuilder member_Of(final Class clazz) { + this.kindOfPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfPhysicalObjectBuilder member_Of(final ClassOfClass classOfCla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPhysicalObjectBuilder member_Of_( + public final KindOfPhysicalObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfPhysicalObject.addValue(MEMBER_OF_, + this.kindOfPhysicalObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPhysicalObjectBuilder part__Of_By_Class( + public final KindOfPhysicalObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPhysicalObject.addValue(PART__OF_BY_CLASS, + this.kindOfPhysicalObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public KindOfPhysicalObject build() throws HqdmException { && this.kindOfPhysicalObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfPhysicalObject.hasValue(MEMBER__OF) - && this.kindOfPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfPhysicalObject.hasValue(MEMBER_OF) && this.kindOfPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfPhysicalObject.hasValue(MEMBER_OF_) - && this.kindOfPhysicalObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfPhysicalObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfPhysicalObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfPhysicalObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfPhysicalObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfPhysicalObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalPropertyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalPropertyBuilder.java index 1343ec87..c31e29e8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalPropertyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalPropertyBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final KindOfPhysicalPropertyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPhysicalPropertyBuilder member__Of(final Class clazz) { - this.kindOfPhysicalProperty.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPhysicalPropertyBuilder member_Of(final Class clazz) { + this.kindOfPhysicalProperty.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public KindOfPhysicalProperty build() throws HqdmException { && this.kindOfPhysicalProperty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfPhysicalProperty.hasValue(MEMBER__OF) - && this.kindOfPhysicalProperty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfPhysicalProperty.hasValue(MEMBER_OF) && this.kindOfPhysicalProperty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalQuantityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalQuantityBuilder.java index cc9dae61..9828333a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalQuantityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPhysicalQuantityBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -60,8 +59,8 @@ public final KindOfPhysicalQuantityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPhysicalQuantityBuilder member__Of(final Class clazz) { - this.kindOfPhysicalQuantity.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPhysicalQuantityBuilder member_Of(final Class clazz) { + this.kindOfPhysicalQuantity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -89,10 +88,6 @@ public KindOfPhysicalQuantity build() throws HqdmException { && this.kindOfPhysicalQuantity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfPhysicalQuantity.hasValue(MEMBER__OF) - && this.kindOfPhysicalQuantity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfPhysicalQuantity.hasValue(MEMBER_OF) && this.kindOfPhysicalQuantity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPositionBuilder.java index 49eff319..703830f9 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfPositionBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfPositionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPositionBuilder consists__Of_By_Class( + public final KindOfPositionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPosition.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfPosition.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfPositionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfPositionBuilder member__Of(final Class clazz) { - this.kindOfPosition.addValue(MEMBER__OF, clazz.getId()); + public final KindOfPositionBuilder member_Of(final Class clazz) { + this.kindOfPosition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,25 +106,24 @@ public final KindOfPositionBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPositionBuilder member_Of_( + public final KindOfPositionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfPosition.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfPosition.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfPositionBuilder part__Of_By_Class( + public final KindOfPositionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfPosition.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfPosition.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -142,21 +138,13 @@ public KindOfPosition build() throws HqdmException { && this.kindOfPosition.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfPosition.hasValue(MEMBER__OF) - && this.kindOfPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfPosition.hasValue(MEMBER_OF) && this.kindOfPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfPosition.hasValue(MEMBER_OF_) - && this.kindOfPosition.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfPosition.hasValue(PART__OF_BY_CLASS) - && this.kindOfPosition.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfPosition.hasValue(PART_OF_BY_CLASS) + && this.kindOfPosition.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfPosition; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithRestrictionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithRestrictionBuilder.java index 4a573150..d53fccd3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithRestrictionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithRestrictionBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REQUIRED_ROLE_PLAYER; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ROLES; @@ -63,8 +62,8 @@ public final KindOfRelationshipWithRestrictionBuilder has_Superclass(final Class * @param clazz The Class. * @return This builder. */ - public final KindOfRelationshipWithRestrictionBuilder member__Of(final Class clazz) { - this.kindOfRelationshipWithRestriction.addValue(MEMBER__OF, clazz.getId()); + public final KindOfRelationshipWithRestrictionBuilder member_Of(final Class clazz) { + this.kindOfRelationshipWithRestriction.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -119,10 +118,6 @@ public KindOfRelationshipWithRestriction build() throws HqdmException { && this.kindOfRelationshipWithRestriction.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfRelationshipWithRestriction.hasValue(MEMBER__OF) - && this.kindOfRelationshipWithRestriction.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfRelationshipWithRestriction.hasValue(MEMBER_OF) && this.kindOfRelationshipWithRestriction.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithSignatureBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithSignatureBuilder.java index a9f90c97..1b8d8900 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithSignatureBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfRelationshipWithSignatureBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ROLES; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -61,8 +60,8 @@ public final KindOfRelationshipWithSignatureBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final KindOfRelationshipWithSignatureBuilder member__Of(final Class clazz) { - this.kindOfRelationshipWithSignature.addValue(MEMBER__OF, clazz.getId()); + public final KindOfRelationshipWithSignatureBuilder member_Of(final Class clazz) { + this.kindOfRelationshipWithSignature.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -102,10 +101,6 @@ public KindOfRelationshipWithSignature build() throws HqdmException { && this.kindOfRelationshipWithSignature.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfRelationshipWithSignature.hasValue(MEMBER__OF) - && this.kindOfRelationshipWithSignature.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfRelationshipWithSignature.hasValue(MEMBER_OF) && this.kindOfRelationshipWithSignature.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSociallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSociallyConstructedObjectBuilder.java index 53b4358a..9176817c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSociallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSociallyConstructedObjectBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfSociallyConstructedObjectBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSociallyConstructedObjectBuilder consists__Of_By_Class( + public final KindOfSociallyConstructedObjectBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSociallyConstructedObject.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfSociallyConstructedObject.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfSociallyConstructedObjectBuilder has_Superclass(final Class c * @param clazz The Class. * @return This builder. */ - public final KindOfSociallyConstructedObjectBuilder member__Of(final Class clazz) { - this.kindOfSociallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final KindOfSociallyConstructedObjectBuilder member_Of(final Class clazz) { + this.kindOfSociallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfSociallyConstructedObjectBuilder member_Of(final ClassOfClass * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSociallyConstructedObjectBuilder member_Of_( + public final KindOfSociallyConstructedObjectBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfSociallyConstructedObject.addValue(MEMBER_OF_, + this.kindOfSociallyConstructedObject.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSociallyConstructedObjectBuilder part__Of_By_Class( + public final KindOfSociallyConstructedObjectBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSociallyConstructedObject.addValue(PART__OF_BY_CLASS, + this.kindOfSociallyConstructedObject.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -145,21 +141,13 @@ public KindOfSociallyConstructedObject build() throws HqdmException { && this.kindOfSociallyConstructedObject.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfSociallyConstructedObject.hasValue(MEMBER__OF) - && this.kindOfSociallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfSociallyConstructedObject.hasValue(MEMBER_OF) && this.kindOfSociallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfSociallyConstructedObject.hasValue(MEMBER_OF_) - && this.kindOfSociallyConstructedObject.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfSociallyConstructedObject.hasValue(PART__OF_BY_CLASS) - && this.kindOfSociallyConstructedObject.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfSociallyConstructedObject.hasValue(PART_OF_BY_CLASS) + && this.kindOfSociallyConstructedObject.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfSociallyConstructedObject; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemBuilder.java index 56d9d0e8..b6fa81ec 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_COMPONENT_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,26 +47,25 @@ public KindOfSystemBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemBuilder consists__Of_By_Class( + public final KindOfSystemBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSystem.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfSystem.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfSystem} - * has a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where + * each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link KindOfSystem} has a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more * {@link KindOfSystemComponent} as a component. * * @param kindOfSystemComponent The KindOfSystemComponent. @@ -99,8 +96,8 @@ public final KindOfSystemBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfSystemBuilder member__Of(final Class clazz) { - this.kindOfSystem.addValue(MEMBER__OF, clazz.getId()); + public final KindOfSystemBuilder member_Of(final Class clazz) { + this.kindOfSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -125,25 +122,24 @@ public final KindOfSystemBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemBuilder member_Of_( + public final KindOfSystemBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfSystem.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.kindOfSystem.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemBuilder part__Of_By_Class( + public final KindOfSystemBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSystem.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.kindOfSystem.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -161,21 +157,13 @@ public KindOfSystem build() throws HqdmException { && this.kindOfSystem.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfSystem.hasValue(MEMBER__OF) - && this.kindOfSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfSystem.hasValue(MEMBER_OF) && this.kindOfSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfSystem.hasValue(MEMBER_OF_) - && this.kindOfSystem.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfSystem.hasValue(PART__OF_BY_CLASS) - && this.kindOfSystem.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfSystem.hasValue(PART_OF_BY_CLASS) + && this.kindOfSystem.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfSystem; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemComponentBuilder.java index cc5304c3..1c548669 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/KindOfSystemComponentBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public KindOfSystemComponentBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemComponentBuilder consists__Of_By_Class( + public final KindOfSystemComponentBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSystemComponent.addValue(CONSISTS__OF_BY_CLASS, + this.kindOfSystemComponent.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,8 @@ public final KindOfSystemComponentBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final KindOfSystemComponentBuilder member__Of(final Class clazz) { - this.kindOfSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final KindOfSystemComponentBuilder member_Of(final Class clazz) { + this.kindOfSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -109,26 +106,25 @@ public final KindOfSystemComponentBuilder member_Of(final ClassOfClass classOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemComponentBuilder member_Of_( + public final KindOfSystemComponentBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.kindOfSystemComponent.addValue(MEMBER_OF_, + this.kindOfSystemComponent.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final KindOfSystemComponentBuilder part__Of_By_Class( + public final KindOfSystemComponentBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.kindOfSystemComponent.addValue(PART__OF_BY_CLASS, + this.kindOfSystemComponent.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -144,21 +140,13 @@ public KindOfSystemComponent build() throws HqdmException { && this.kindOfSystemComponent.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.kindOfSystemComponent.hasValue(MEMBER__OF) - && this.kindOfSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.kindOfSystemComponent.hasValue(MEMBER_OF) && this.kindOfSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.kindOfSystemComponent.hasValue(MEMBER_OF_) - && this.kindOfSystemComponent.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.kindOfSystemComponent.hasValue(PART__OF_BY_CLASS) - && this.kindOfSystemComponent.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.kindOfSystemComponent.hasValue(PART_OF_BY_CLASS) + && this.kindOfSystemComponent.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return kindOfSystemComponent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/LanguageCommunityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/LanguageCommunityBuilder.java index 34590ed4..9dc2a85a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/LanguageCommunityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/LanguageCommunityBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final LanguageCommunityBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final LanguageCommunityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.languageCommunity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final LanguageCommunityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.languageCommunity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +114,8 @@ public final LanguageCommunityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final LanguageCommunityBuilder member__Of(final Class clazz) { - this.languageCommunity.addValue(MEMBER__OF, clazz.getId()); + public final LanguageCommunityBuilder member_Of(final Class clazz) { + this.languageCommunity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -138,14 +137,14 @@ public final LanguageCommunityBuilder member_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where * {@link uk.gov.gchq.magmacore.hqdm.model.Organization} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfOrganization}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link KindOfOrganization}. * * @param kindOfOrganization The KindOfOrganization. * @return This builder. */ public final LanguageCommunityBuilder member_Of_Kind(final KindOfOrganization kindOfOrganization) { this.languageCommunity.addValue(MEMBER_OF_KIND, kindOfOrganization.getId()); + this.languageCommunity.addValue(RDFS.RDF_TYPE, kindOfOrganization.getId()); return this; } @@ -157,20 +156,19 @@ public final LanguageCommunityBuilder member_Of_Kind(final KindOfOrganization ki * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final LanguageCommunityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.languageCommunity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final LanguageCommunityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.languageCommunity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -189,8 +187,8 @@ public final LanguageCommunityBuilder part_Of_Possible_World_M(final PossibleWor * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final LanguageCommunityBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.languageCommunity.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final LanguageCommunityBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.languageCommunity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -227,10 +225,6 @@ public LanguageCommunity build() throws HqdmException { && this.languageCommunity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.languageCommunity.hasValue(MEMBER__OF) - && this.languageCommunity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.languageCommunity.hasValue(MEMBER_OF) && this.languageCommunity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -239,17 +233,13 @@ public LanguageCommunity build() throws HqdmException { && this.languageCommunity.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.languageCommunity.hasValue(PART__OF) - && this.languageCommunity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.languageCommunity.hasValue(PART_OF) + && this.languageCommunity.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.languageCommunity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.languageCommunity.hasValue(TEMPORAL__PART_OF) - && this.languageCommunity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.languageCommunity.hasValue(TEMPORAL_PART_OF) && this.languageCommunity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/MoneyAssetBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/MoneyAssetBuilder.java index 4d44ec25..bcac7ff8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/MoneyAssetBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/MoneyAssetBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final MoneyAssetBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final MoneyAssetBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.moneyAsset.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final MoneyAssetBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.moneyAsset.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,16 +117,15 @@ public final MoneyAssetBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final MoneyAssetBuilder member__Of(final Class clazz) { - this.moneyAsset.addValue(MEMBER__OF, clazz.getId()); + public final MoneyAssetBuilder member_Of(final Class clazz) { + this.moneyAsset.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.Participant} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfParticipant}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link ClassOfParticipant}. * * @param classOfParticipant The ClassOfParticipant. * @return This builder. @@ -147,6 +145,7 @@ public final MoneyAssetBuilder member_Of(final ClassOfParticipant classOfPartici */ public final MoneyAssetBuilder member_Of_Kind_M(final Role role) { this.moneyAsset.addValue(MEMBER_OF_KIND, role.getId()); + this.moneyAsset.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +157,19 @@ public final MoneyAssetBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final MoneyAssetBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.moneyAsset.addValue(PART__OF, spatioTemporalExtent.getId()); + public final MoneyAssetBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.moneyAsset.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -183,8 +181,8 @@ public final MoneyAssetBuilder part_Of_Possible_World_M(final PossibleWorld poss } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an - * asset is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an asset + * is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one * {@link Ownership}. * * @param ownership The Ownership. @@ -203,8 +201,8 @@ public final MoneyAssetBuilder participant_In_M(final Ownership ownership) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final MoneyAssetBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.moneyAsset.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final MoneyAssetBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.moneyAsset.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -241,10 +239,6 @@ public MoneyAsset build() throws HqdmException { && this.moneyAsset.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.moneyAsset.hasValue(MEMBER__OF) - && this.moneyAsset.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.moneyAsset.hasValue(MEMBER_OF) && this.moneyAsset.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -252,9 +246,9 @@ public MoneyAsset build() throws HqdmException { if (!this.moneyAsset.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.moneyAsset.hasValue(PART__OF) - && this.moneyAsset.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.moneyAsset.hasValue(PART_OF) + && this.moneyAsset.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.moneyAsset.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -262,10 +256,6 @@ public MoneyAsset build() throws HqdmException { if (!this.moneyAsset.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.moneyAsset.hasValue(TEMPORAL__PART_OF) - && this.moneyAsset.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.moneyAsset.hasValue(TEMPORAL_PART_OF) && this.moneyAsset.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferAndAcceptanceForGoodsBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferAndAcceptanceForGoodsBuilder.java index 5cf7e909..cdcac2f8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferAndAcceptanceForGoodsBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferAndAcceptanceForGoodsBuilder.java @@ -18,21 +18,15 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AcceptanceOfOfferForGoods; @@ -50,6 +44,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -112,14 +107,14 @@ public final OfferAndAcceptanceForGoodsBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferAndAcceptanceForGoodsBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerAndAcceptanceForGoods.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OfferAndAcceptanceForGoodsBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerAndAcceptanceForGoods.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -144,8 +139,8 @@ public final OfferAndAcceptanceForGoodsBuilder consists_Of( * @param offerForGoods The OfferForGoods. * @return Builder */ - public final OfferAndAcceptanceForGoodsBuilder consists_Of_(final OfferForGoods offerForGoods) { - this.offerAndAcceptanceForGoods.addValue(CONSISTS_OF_, offerForGoods.getId()); + public final OfferAndAcceptanceForGoodsBuilder consists_Of(final OfferForGoods offerForGoods) { + this.offerAndAcceptanceForGoods.addValue(CONSISTS_OF, offerForGoods.getId()); return this; } @@ -192,8 +187,8 @@ public final OfferAndAcceptanceForGoodsBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OfferAndAcceptanceForGoodsBuilder member__Of(final Class clazz) { - this.offerAndAcceptanceForGoods.addValue(MEMBER__OF, clazz.getId()); + public final OfferAndAcceptanceForGoodsBuilder member_Of(final Class clazz) { + this.offerAndAcceptanceForGoods.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -221,6 +216,7 @@ public final OfferAndAcceptanceForGoodsBuilder member_Of(final ClassOfAgreeContr */ public final OfferAndAcceptanceForGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.offerAndAcceptanceForGoods.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.offerAndAcceptanceForGoods.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -232,47 +228,46 @@ public final OfferAndAcceptanceForGoodsBuilder member_Of_Kind_M(final KindOfActi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferAndAcceptanceForGoodsBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerAndAcceptanceForGoods.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OfferAndAcceptanceForGoodsBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerAndAcceptanceForGoods.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an - * {@link OfferAndAcceptanceForGoods} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly one {@link SaleOfGoods}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * - * @param saleOfGoods The SaleOfGoods. - * @return Builder + * @param agreementExecution The AgreementExecution. + * @return This builder. */ - public final OfferAndAcceptanceForGoodsBuilder part_Of_M(final SaleOfGoods saleOfGoods) { - this.offerAndAcceptanceForGoods.addValue(PART_OF, saleOfGoods.getId()); + public final OfferAndAcceptanceForGoodsBuilder part_Of(final AgreementExecution agreementExecution) { + this.offerAndAcceptanceForGoods.addValue(PART_OF, agreementExecution.getId()); return this; } + /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an + * {@link OfferAndAcceptanceForGoods} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} + * exactly one {@link SaleOfGoods}. * - * @param agreementExecution The AgreementExecution. - * @return This builder. + * @param saleOfGoods The SaleOfGoods. + * @return Builder */ - public final OfferAndAcceptanceForGoodsBuilder part_Of_(final AgreementExecution agreementExecution) { - this.offerAndAcceptanceForGoods.addValue(PART_OF_, agreementExecution.getId()); + public final OfferAndAcceptanceForGoodsBuilder part_Of_M(final SaleOfGoods saleOfGoods) { + this.offerAndAcceptanceForGoods.addValue(PART_OF, saleOfGoods.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -303,8 +298,8 @@ public final OfferAndAcceptanceForGoodsBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferAndAcceptanceForGoodsBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerAndAcceptanceForGoods.addValue(TEMPORAL__PART_OF, + public final OfferAndAcceptanceForGoodsBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerAndAcceptanceForGoods.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -312,16 +307,15 @@ public final OfferAndAcceptanceForGoodsBuilder temporal__Part_Of(final SpatioTem /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -359,10 +353,6 @@ public OfferAndAcceptanceForGoods build() throws HqdmException { && this.offerAndAcceptanceForGoods.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.offerAndAcceptanceForGoods.hasValue(MEMBER__OF) - && this.offerAndAcceptanceForGoods.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.offerAndAcceptanceForGoods.hasValue(MEMBER_OF) && this.offerAndAcceptanceForGoods.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -370,16 +360,16 @@ public OfferAndAcceptanceForGoods build() throws HqdmException { if (!this.offerAndAcceptanceForGoods.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.offerAndAcceptanceForGoods.hasValue(PART__OF) - && this.offerAndAcceptanceForGoods.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.offerAndAcceptanceForGoods.hasValue(PART_OF) + && this.offerAndAcceptanceForGoods.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.offerAndAcceptanceForGoods.hasValue(PART_OF)) { throw new HqdmException("Property Not Set: part_of"); } - if (this.offerAndAcceptanceForGoods.hasValue(PART_OF_) - && this.offerAndAcceptanceForGoods.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); + if (this.offerAndAcceptanceForGoods.hasValue(PART_OF) + && this.offerAndAcceptanceForGoods.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.offerAndAcceptanceForGoods.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -388,10 +378,6 @@ public OfferAndAcceptanceForGoods build() throws HqdmException { && this.offerAndAcceptanceForGoods.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.offerAndAcceptanceForGoods.hasValue(TEMPORAL__PART_OF) - && this.offerAndAcceptanceForGoods.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.offerAndAcceptanceForGoods.hasValue(TEMPORAL_PART_OF) && this.offerAndAcceptanceForGoods.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferBuilder.java index bdf3423b..01beebe0 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -48,6 +43,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -109,14 +105,14 @@ public final OfferBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offer.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OfferBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offer.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -176,8 +172,8 @@ public final OfferBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OfferBuilder member__Of(final Class clazz) { - this.offer.addValue(MEMBER__OF, clazz.getId()); + public final OfferBuilder member_Of(final Class clazz) { + this.offer.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -204,6 +200,7 @@ public final OfferBuilder member_Of(final ClassOfOffer classOfOffer) { */ public final OfferBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.offer.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.offer.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -215,8 +212,8 @@ public final OfferBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offer.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OfferBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offer.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } @@ -236,26 +233,24 @@ public final OfferBuilder part_Of(final AgreeContract agreeContract) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final OfferBuilder part_Of_(final AgreementExecution agreementExecution) { - this.offer.addValue(PART_OF_, agreementExecution.getId()); + public final OfferBuilder part_Of(final AgreementExecution agreementExecution) { + this.offer.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -285,24 +280,23 @@ public final OfferBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offer.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OfferBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offer.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -339,10 +333,6 @@ public Offer build() throws HqdmException { && this.offer.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.offer.hasValue(MEMBER__OF) - && this.offer.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.offer.hasValue(MEMBER_OF) && this.offer.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -350,18 +340,10 @@ public Offer build() throws HqdmException { if (!this.offer.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.offer.hasValue(PART__OF) - && this.offer.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.offer.hasValue(PART_OF) && this.offer.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.offer.hasValue(PART_OF_) - && this.offer.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.offer.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -369,10 +351,6 @@ public Offer build() throws HqdmException { && this.offer.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.offer.hasValue(TEMPORAL__PART_OF) - && this.offer.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.offer.hasValue(TEMPORAL_PART_OF) && this.offer.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferForGoodsBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferForGoodsBuilder.java index e98cce11..fd47efe5 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferForGoodsBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferForGoodsBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -49,6 +44,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -110,14 +106,14 @@ public final OfferForGoodsBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferForGoodsBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerForGoods.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OfferForGoodsBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerForGoods.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -177,8 +173,8 @@ public final OfferForGoodsBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OfferForGoodsBuilder member__Of(final Class clazz) { - this.offerForGoods.addValue(MEMBER__OF, clazz.getId()); + public final OfferForGoodsBuilder member_Of(final Class clazz) { + this.offerForGoods.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -205,6 +201,7 @@ public final OfferForGoodsBuilder member_Of(final ClassOfOffer classOfOffer) { */ public final OfferForGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.offerForGoods.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.offerForGoods.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -216,15 +213,15 @@ public final OfferForGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfAc * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferForGoodsBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerForGoods.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OfferForGoodsBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerForGoods.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where an - * {@link OfferForGoods} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} no more - * than one {@link OfferAndAcceptanceForGoods}. + * {@link OfferForGoods} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} no more than + * one {@link OfferAndAcceptanceForGoods}. * * @param offerAndAcceptanceForGoods The OfferAndAcceptanceForGoods. * @return This builder. @@ -237,26 +234,24 @@ public final OfferForGoodsBuilder part_Of(final OfferAndAcceptanceForGoods offer /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final OfferForGoodsBuilder part_Of_(final AgreementExecution agreementExecution) { - this.offerForGoods.addValue(PART_OF_, agreementExecution.getId()); + public final OfferForGoodsBuilder part_Of(final AgreementExecution agreementExecution) { + this.offerForGoods.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -286,24 +281,23 @@ public final OfferForGoodsBuilder references_M(final ExchangeOfGoodsAndMoney exc * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OfferForGoodsBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.offerForGoods.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OfferForGoodsBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.offerForGoods.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -340,10 +334,6 @@ public OfferForGoods build() throws HqdmException { && this.offerForGoods.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.offerForGoods.hasValue(MEMBER__OF) - && this.offerForGoods.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.offerForGoods.hasValue(MEMBER_OF) && this.offerForGoods.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -351,28 +341,16 @@ public OfferForGoods build() throws HqdmException { if (!this.offerForGoods.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.offerForGoods.hasValue(PART__OF) - && this.offerForGoods.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.offerForGoods.hasValue(PART_OF) && this.offerForGoods.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.offerForGoods.hasValue(PART_OF_) - && this.offerForGoods.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.offerForGoods.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } if (!this.offerForGoods.hasValue(REFERENCES)) { throw new HqdmException("Property Not Set: references"); } - if (this.offerForGoods.hasValue(TEMPORAL__PART_OF) - && this.offerForGoods.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.offerForGoods.hasValue(TEMPORAL_PART_OF) && this.offerForGoods.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferingBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferingBuilder.java index cdb414ea..84751867 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferingBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OfferingBuilder.java @@ -16,15 +16,11 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CLASS_OF_OFFERED; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSIDERATION_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.OFFEROR; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PERIOD_OFFERED; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -83,19 +79,18 @@ public final OfferingBuilder consideration_By_Class_M(final Price price) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final OfferingBuilder consists__Of_By_Class( + public final OfferingBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.offering.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.offering.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -118,8 +113,8 @@ public final OfferingBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final OfferingBuilder member__Of(final Class clazz) { - this.offering.addValue(MEMBER__OF, clazz.getId()); + public final OfferingBuilder member_Of(final Class clazz) { + this.offering.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -144,9 +139,9 @@ public final OfferingBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final OfferingBuilder member_Of_( + public final OfferingBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.offering.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.offering.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } @@ -164,17 +159,16 @@ public final OfferingBuilder offeror_M(final Party party) { /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final OfferingBuilder part__Of_By_Class( + public final OfferingBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.offering.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.offering.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -199,15 +193,14 @@ public final OfferingBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final OfferingBuilder part_Of_By_Class_( + public final OfferingBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.offering.addValue(PART_OF_BY_CLASS_, classOfAgreementExecution.getId()); + this.offering.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -239,33 +232,17 @@ public Offering build() throws HqdmException { && this.offering.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.offering.hasValue(MEMBER__OF) - && this.offering.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.offering.hasValue(MEMBER_OF) && this.offering.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.offering.hasValue(MEMBER_OF_) - && this.offering.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.offering.hasValue(OFFEROR)) { throw new HqdmException("Property Not Set: offeror"); } - if (this.offering.hasValue(PART__OF_BY_CLASS) - && this.offering.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.offering.hasValue(PART_OF_BY_CLASS) && this.offering.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.offering.hasValue(PART_OF_BY_CLASS_) - && this.offering.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } if (!this.offering.hasValue(PERIOD_OFFERED)) { throw new HqdmException("Property Not Set: period_offered"); } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryBiologicalObjectBuilder.java index f9b728fe..a2a30b93 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryBiologicalObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final OrdinaryBiologicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryBiologicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryBiologicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OrdinaryBiologicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryBiologicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +114,8 @@ public final OrdinaryBiologicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OrdinaryBiologicalObjectBuilder member__Of(final Class clazz) { - this.ordinaryBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final OrdinaryBiologicalObjectBuilder member_Of(final Class clazz) { + this.ordinaryBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,8 +146,8 @@ public final OrdinaryBiologicalObjectBuilder member_Of( */ public final OrdinaryBiologicalObjectBuilder member_Of_Kind( final KindOfOrdinaryBiologicalObject kindOfOrdinaryBiologicalObject) { - this.ordinaryBiologicalObject.addValue(MEMBER_OF_KIND, - kindOfOrdinaryBiologicalObject.getId()); + this.ordinaryBiologicalObject.addValue(MEMBER_OF_KIND, kindOfOrdinaryBiologicalObject.getId()); + this.ordinaryBiologicalObject.addValue(RDFS.RDF_TYPE, kindOfOrdinaryBiologicalObject.getId()); return this; } @@ -160,20 +159,19 @@ public final OrdinaryBiologicalObjectBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryBiologicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryBiologicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OrdinaryBiologicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryBiologicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -192,8 +190,8 @@ public final OrdinaryBiologicalObjectBuilder part_Of_Possible_World_M(final Poss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryBiologicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryBiologicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OrdinaryBiologicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryBiologicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -232,10 +230,6 @@ public OrdinaryBiologicalObject build() throws HqdmException { && this.ordinaryBiologicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.ordinaryBiologicalObject.hasValue(MEMBER__OF) - && this.ordinaryBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.ordinaryBiologicalObject.hasValue(MEMBER_OF) && this.ordinaryBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -244,17 +238,13 @@ public OrdinaryBiologicalObject build() throws HqdmException { && this.ordinaryBiologicalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.ordinaryBiologicalObject.hasValue(PART__OF) - && this.ordinaryBiologicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.ordinaryBiologicalObject.hasValue(PART_OF) + && this.ordinaryBiologicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.ordinaryBiologicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.ordinaryBiologicalObject.hasValue(TEMPORAL__PART_OF) - && this.ordinaryBiologicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.ordinaryBiologicalObject.hasValue(TEMPORAL_PART_OF) && this.ordinaryBiologicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryFunctionalObjectBuilder.java index 6047e8f5..d32e01cb 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryFunctionalObjectBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final OrdinaryFunctionalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryFunctionalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryFunctionalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OrdinaryFunctionalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryFunctionalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -130,8 +129,8 @@ public final OrdinaryFunctionalObjectBuilder intended_Role_M(final Role role) { * @param clazz The Class. * @return This builder. */ - public final OrdinaryFunctionalObjectBuilder member__Of(final Class clazz) { - this.ordinaryFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final OrdinaryFunctionalObjectBuilder member_Of(final Class clazz) { + this.ordinaryFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -162,8 +161,8 @@ public final OrdinaryFunctionalObjectBuilder member_Of( */ public final OrdinaryFunctionalObjectBuilder member_Of_Kind( final KindOfOrdinaryFunctionalObject kindOfOrdinaryFunctionalObject) { - this.ordinaryFunctionalObject.addValue(MEMBER_OF_KIND, - kindOfOrdinaryFunctionalObject.getId()); + this.ordinaryFunctionalObject.addValue(MEMBER_OF_KIND, kindOfOrdinaryFunctionalObject.getId()); + this.ordinaryFunctionalObject.addValue(RDFS.RDF_TYPE, kindOfOrdinaryFunctionalObject.getId()); return this; } @@ -175,20 +174,19 @@ public final OrdinaryFunctionalObjectBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryFunctionalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryFunctionalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OrdinaryFunctionalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryFunctionalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -207,24 +205,23 @@ public final OrdinaryFunctionalObjectBuilder part_Of_Possible_World_M(final Poss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryFunctionalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryFunctionalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OrdinaryFunctionalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryFunctionalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -257,10 +254,6 @@ public OrdinaryFunctionalObject build() throws HqdmException { if (!this.ordinaryFunctionalObject.hasValue(INTENDED_ROLE)) { throw new HqdmException("Property Not Set: intended_role"); } - if (this.ordinaryFunctionalObject.hasValue(MEMBER__OF) - && this.ordinaryFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.ordinaryFunctionalObject.hasValue(MEMBER_OF) && this.ordinaryFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -269,17 +262,13 @@ public OrdinaryFunctionalObject build() throws HqdmException { && this.ordinaryFunctionalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.ordinaryFunctionalObject.hasValue(PART__OF) - && this.ordinaryFunctionalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.ordinaryFunctionalObject.hasValue(PART_OF) + && this.ordinaryFunctionalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.ordinaryFunctionalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.ordinaryFunctionalObject.hasValue(TEMPORAL__PART_OF) - && this.ordinaryFunctionalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.ordinaryFunctionalObject.hasValue(TEMPORAL_PART_OF) && this.ordinaryFunctionalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryPhysicalObjectBuilder.java index 9cb18c4d..861814da 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrdinaryPhysicalObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -36,6 +34,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -86,14 +85,14 @@ public final OrdinaryPhysicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryPhysicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryPhysicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OrdinaryPhysicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryPhysicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -116,16 +115,15 @@ public final OrdinaryPhysicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OrdinaryPhysicalObjectBuilder member__Of(final Class clazz) { - this.ordinaryPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final OrdinaryPhysicalObjectBuilder member_Of(final Class clazz) { + this.ordinaryPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link OrdinaryPhysicalObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfOrdinaryPhysicalObject}. + * {@link OrdinaryPhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfOrdinaryPhysicalObject}. * * @param classOfOrdinaryPhysicalObject The ClassOfOrdinaryPhysicalObject. * @return This builder. @@ -138,17 +136,16 @@ public final OrdinaryPhysicalObjectBuilder member_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where an - * {@link OrdinaryPhysicalObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfOrdinaryPhysicalObject}. + * {@link OrdinaryPhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link KindOfOrdinaryPhysicalObject}. * * @param kindOfOrdinaryPhysicalObject The KindOfOrdinaryPhysicalObject. * @return This builder. */ public final OrdinaryPhysicalObjectBuilder member_Of_Kind( final KindOfOrdinaryPhysicalObject kindOfOrdinaryPhysicalObject) { - this.ordinaryPhysicalObject.addValue(MEMBER_OF_KIND, - kindOfOrdinaryPhysicalObject.getId()); + this.ordinaryPhysicalObject.addValue(MEMBER_OF_KIND, kindOfOrdinaryPhysicalObject.getId()); + this.ordinaryPhysicalObject.addValue(RDFS.RDF_TYPE, kindOfOrdinaryPhysicalObject.getId()); return this; } @@ -160,20 +157,19 @@ public final OrdinaryPhysicalObjectBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryPhysicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryPhysicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OrdinaryPhysicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryPhysicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -192,24 +188,23 @@ public final OrdinaryPhysicalObjectBuilder part_Of_Possible_World_M(final Possib * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrdinaryPhysicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ordinaryPhysicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OrdinaryPhysicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ordinaryPhysicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -239,10 +234,6 @@ public OrdinaryPhysicalObject build() throws HqdmException { && this.ordinaryPhysicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.ordinaryPhysicalObject.hasValue(MEMBER__OF) - && this.ordinaryPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.ordinaryPhysicalObject.hasValue(MEMBER_OF) && this.ordinaryPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,17 +242,13 @@ public OrdinaryPhysicalObject build() throws HqdmException { && this.ordinaryPhysicalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.ordinaryPhysicalObject.hasValue(PART__OF) - && this.ordinaryPhysicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.ordinaryPhysicalObject.hasValue(PART_OF) + && this.ordinaryPhysicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.ordinaryPhysicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.ordinaryPhysicalObject.hasValue(TEMPORAL__PART_OF) - && this.ordinaryPhysicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.ordinaryPhysicalObject.hasValue(TEMPORAL_PART_OF) && this.ordinaryPhysicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationBuilder.java index 877d6f8f..6c077264 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final OrganizationBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organization.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OrganizationBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organization.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,15 +114,15 @@ public final OrganizationBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OrganizationBuilder member__Of(final Class clazz) { - this.organization.addValue(MEMBER__OF, clazz.getId()); + public final OrganizationBuilder member_Of(final Class clazz) { + this.organization.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where - * {@link Organization} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfOrganization}. + * {@link Organization} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfOrganization}. * * @param classOfOrganization The ClassOfOrganization. * @return This builder. @@ -135,14 +134,15 @@ public final OrganizationBuilder member_Of(final ClassOfOrganization classOfOrga /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where - * {@link Organization} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link KindOfOrganization}. + * {@link Organization} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link KindOfOrganization}. * * @param kindOfOrganization The KindOfOrganization. * @return This builder. */ public final OrganizationBuilder member_Of_Kind(final KindOfOrganization kindOfOrganization) { this.organization.addValue(MEMBER_OF_KIND, kindOfOrganization.getId()); + this.organization.addValue(RDFS.RDF_TYPE, kindOfOrganization.getId()); return this; } @@ -154,20 +154,19 @@ public final OrganizationBuilder member_Of_Kind(final KindOfOrganization kindOfO * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organization.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OrganizationBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organization.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,8 +185,8 @@ public final OrganizationBuilder part_Of_Possible_World_M(final PossibleWorld po * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organization.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OrganizationBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organization.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -224,10 +223,6 @@ public Organization build() throws HqdmException { && this.organization.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.organization.hasValue(MEMBER__OF) - && this.organization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.organization.hasValue(MEMBER_OF) && this.organization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -236,17 +231,13 @@ public Organization build() throws HqdmException { && this.organization.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.organization.hasValue(PART__OF) - && this.organization.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.organization.hasValue(PART_OF) + && this.organization.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.organization.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.organization.hasValue(TEMPORAL__PART_OF) - && this.organization.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.organization.hasValue(TEMPORAL_PART_OF) && this.organization.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationComponentBuilder.java index f1b3a872..aa8bee00 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OrganizationComponentBuilder.java @@ -17,15 +17,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.COMPONENT_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -37,6 +35,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -99,14 +98,14 @@ public final OrganizationComponentBuilder component_Of_M(final Organization orga * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organizationComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OrganizationComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organizationComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -129,16 +128,15 @@ public final OrganizationComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OrganizationComponentBuilder member__Of(final Class clazz) { - this.organizationComponent.addValue(MEMBER__OF, clazz.getId()); + public final OrganizationComponentBuilder member_Of(final Class clazz) { + this.organizationComponent.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link OrganizationComponent} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfOrganizationComponent}. + * {@link OrganizationComponent} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfOrganizationComponent}. * * @param classOfOrganizationComponent The ClassOfOrganizationComponent. * @return This builder. @@ -151,17 +149,16 @@ public final OrganizationComponentBuilder member_Of( /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where an - * {@link OrganizationComponent} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfOrganizationComponent}. + * {@link OrganizationComponent} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link KindOfOrganizationComponent}. * * @param kindOfOrganizationComponent The KindOfOrganizationComponent. * @return This builder. */ public final OrganizationComponentBuilder member_Of_Kind( final KindOfOrganizationComponent kindOfOrganizationComponent) { - this.organizationComponent.addValue(MEMBER_OF_KIND, - kindOfOrganizationComponent.getId()); + this.organizationComponent.addValue(MEMBER_OF_KIND, kindOfOrganizationComponent.getId()); + this.organizationComponent.addValue(RDFS.RDF_TYPE, kindOfOrganizationComponent.getId()); return this; } @@ -173,20 +170,19 @@ public final OrganizationComponentBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organizationComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OrganizationComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organizationComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -205,8 +201,8 @@ public final OrganizationComponentBuilder part_Of_Possible_World_M(final Possibl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OrganizationComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.organizationComponent.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OrganizationComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.organizationComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -246,10 +242,6 @@ public OrganizationComponent build() throws HqdmException { && this.organizationComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.organizationComponent.hasValue(MEMBER__OF) - && this.organizationComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.organizationComponent.hasValue(MEMBER_OF) && this.organizationComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -258,17 +250,13 @@ public OrganizationComponent build() throws HqdmException { && this.organizationComponent.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.organizationComponent.hasValue(PART__OF) - && this.organizationComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.organizationComponent.hasValue(PART_OF) + && this.organizationComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.organizationComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.organizationComponent.hasValue(TEMPORAL__PART_OF) - && this.organizationComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.organizationComponent.hasValue(TEMPORAL_PART_OF) && this.organizationComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnerBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnerBuilder.java index fcb56f4a..db32d664 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnerBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnerBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final OwnerBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnerBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.owner.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OwnerBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.owner.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final OwnerBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final OwnerBuilder member__Of(final Class clazz) { - this.owner.addValue(MEMBER__OF, clazz.getId()); + public final OwnerBuilder member_Of(final Class clazz) { + this.owner.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,6 +146,7 @@ public final OwnerBuilder member_Of(final ClassOfStateOfParty classOfStateOfPart */ public final OwnerBuilder member_Of_Kind_M(final Role role) { this.owner.addValue(MEMBER_OF_KIND, role.getId()); + this.owner.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +158,19 @@ public final OwnerBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnerBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.owner.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OwnerBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.owner.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -183,8 +182,8 @@ public final OwnerBuilder part_Of_Possible_World_M(final PossibleWorld possibleW } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an - * owner is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where an owner + * is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} exactly one * {@link Ownership}. * * @param ownership The Ownership. @@ -203,8 +202,8 @@ public final OwnerBuilder participant_In_M(final Ownership ownership) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnerBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.owner.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OwnerBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.owner.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -240,10 +239,6 @@ public Owner build() throws HqdmException { && this.owner.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.owner.hasValue(MEMBER__OF) - && this.owner.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.owner.hasValue(MEMBER_OF) && this.owner.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,9 +246,9 @@ public Owner build() throws HqdmException { if (!this.owner.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.owner.hasValue(PART__OF) - && this.owner.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.owner.hasValue(PART_OF) + && this.owner.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.owner.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -261,10 +256,6 @@ public Owner build() throws HqdmException { if (!this.owner.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.owner.hasValue(TEMPORAL__PART_OF) - && this.owner.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.owner.hasValue(TEMPORAL_PART_OF) && this.owner.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnershipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnershipBuilder.java index d321e960..b8efe130 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnershipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/OwnershipBuilder.java @@ -16,17 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Asset; @@ -41,6 +38,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -77,8 +75,8 @@ public final OwnershipBuilder aggregated_Into(final SpatioTemporalExtent spatioT /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#BEGINNING} relationship type where an - * {@link Ownership} has as {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#BEGINNING} exactly - * one {@link BeginningOfOwnership}. + * {@link Ownership} has as {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#BEGINNING} exactly one + * {@link BeginningOfOwnership}. * * @param beginningOfOwnership The BeginningOfOwnership. * @return This builder. @@ -92,22 +90,21 @@ public final OwnershipBuilder beginning_M(final BeginningOfOwnership beginningOf * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnershipBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ownership.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final OwnershipBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ownership.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where an {@link Ownership} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one - * {@link Owner}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * an {@link Ownership} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} + * exactly one {@link Owner}. * * @param owner The Owner. * @return This builder. @@ -118,23 +115,22 @@ public final OwnershipBuilder consists_Of_Participant(final Owner owner) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where an {@link Ownership} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one - * {@link Asset}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * an {@link Ownership} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} + * exactly one {@link Asset}. * * @param asset The Asset. * @return This builder. */ - public final OwnershipBuilder consists_Of_Participant_(final Asset asset) { - this.ownership.addValue(CONSISTS_OF_PARTICIPANT_, asset.getId()); + public final OwnershipBuilder consists_Of_Participant(final Asset asset) { + this.ownership.addValue(CONSISTS_OF_PARTICIPANT, asset.getId()); return this; } /** * An {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#ENDING} relationship type where an - * {@link Ownership} has as {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#ENDING} not more than - * one {@link EndingOfOwnership}. + * {@link Ownership} has as {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#ENDING} not more than one + * {@link EndingOfOwnership}. * * @param endingOfOwnership The EndingOfOwnership. * @return This builder. @@ -151,16 +147,15 @@ public final OwnershipBuilder ending(final EndingOfOwnership endingOfOwnership) * @param clazz The Class. * @return This builder. */ - public final OwnershipBuilder member__Of(final Class clazz) { - this.ownership.addValue(MEMBER__OF, clazz.getId()); + public final OwnershipBuilder member_Of(final Class clazz) { + this.ownership.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an * {@link uk.gov.gchq.magmacore.hqdm.model.Association} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfAssociation}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link ClassOfAssociation}. * * @param classOfAssociation The ClassOfAssociation. * @return This builder. @@ -173,14 +168,14 @@ public final OwnershipBuilder member_Of(final ClassOfAssociation classOfAssociat /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where each * {@link uk.gov.gchq.magmacore.hqdm.model.Association} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfAssociation}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link KindOfAssociation}. * * @param kindOfAssociation The KindOfAssociation. * @return This builder. */ public final OwnershipBuilder member_Of_Kind_M(final KindOfAssociation kindOfAssociation) { this.ownership.addValue(MEMBER_OF_KIND, kindOfAssociation.getId()); + this.ownership.addValue(RDFS.RDF_TYPE, kindOfAssociation.getId()); return this; } @@ -192,20 +187,19 @@ public final OwnershipBuilder member_Of_Kind_M(final KindOfAssociation kindOfAss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnershipBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ownership.addValue(PART__OF, spatioTemporalExtent.getId()); + public final OwnershipBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ownership.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -224,24 +218,23 @@ public final OwnershipBuilder part_Of_Possible_World_M(final PossibleWorld possi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final OwnershipBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.ownership.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final OwnershipBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.ownership.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -270,10 +263,6 @@ public Ownership build() throws HqdmException { && this.ownership.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.ownership.hasValue(MEMBER__OF) - && this.ownership.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.ownership.hasValue(MEMBER_OF) && this.ownership.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -281,17 +270,13 @@ public Ownership build() throws HqdmException { if (!this.ownership.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.ownership.hasValue(PART__OF) - && this.ownership.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.ownership.hasValue(PART_OF) + && this.ownership.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.ownership.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.ownership.hasValue(TEMPORAL__PART_OF) - && this.ownership.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.ownership.hasValue(TEMPORAL_PART_OF) && this.ownership.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ParticipantBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ParticipantBuilder.java index e90e6e88..13ce735b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ParticipantBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ParticipantBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final ParticipantBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ParticipantBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.participant.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ParticipantBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.participant.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final ParticipantBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ParticipantBuilder member__Of(final Class clazz) { - this.participant.addValue(MEMBER__OF, clazz.getId()); + public final ParticipantBuilder member_Of(final Class clazz) { + this.participant.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -138,14 +137,15 @@ public final ParticipantBuilder member_Of(final ClassOfParticipant classOfPartic /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where each - * {@link Participant} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link Role}. + * {@link Participant} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link Role}. * * @param role The Role. * @return This builder. */ public final ParticipantBuilder member_Of_Kind_M(final Role role) { this.participant.addValue(MEMBER_OF_KIND, role.getId()); + this.participant.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -157,20 +157,19 @@ public final ParticipantBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ParticipantBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.participant.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ParticipantBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.participant.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -204,8 +203,8 @@ public final ParticipantBuilder participant_In( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ParticipantBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.participant.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ParticipantBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.participant.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -242,10 +241,6 @@ public Participant build() throws HqdmException { && this.participant.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.participant.hasValue(MEMBER__OF) - && this.participant.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.participant.hasValue(MEMBER_OF) && this.participant.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -253,9 +248,9 @@ public Participant build() throws HqdmException { if (!this.participant.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.participant.hasValue(PART__OF) - && this.participant.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.participant.hasValue(PART_OF) + && this.participant.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.participant.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -264,10 +259,6 @@ public Participant build() throws HqdmException { && this.participant.values(PARTICIPANT_IN).isEmpty()) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.participant.hasValue(TEMPORAL__PART_OF) - && this.participant.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.participant.hasValue(TEMPORAL_PART_OF) && this.participant.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PartyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PartyBuilder.java index 6b292ea3..64bee473 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PartyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PartyBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final PartyBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PartyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.party.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PartyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.party.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +114,8 @@ public final PartyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PartyBuilder member__Of(final Class clazz) { - this.party.addValue(MEMBER__OF, clazz.getId()); + public final PartyBuilder member_Of(final Class clazz) { + this.party.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,6 +142,7 @@ public final PartyBuilder member_Of(final ClassOfParty classOfParty) { */ public final PartyBuilder member_Of_Kind(final KindOfParty kindOfParty) { this.party.addValue(MEMBER_OF_KIND, kindOfParty.getId()); + this.party.addValue(RDFS.RDF_TYPE, kindOfParty.getId()); return this; } @@ -154,20 +154,19 @@ public final PartyBuilder member_Of_Kind(final KindOfParty kindOfParty) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PartyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.party.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PartyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.party.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,8 +185,8 @@ public final PartyBuilder part_Of_Possible_World_M(final PossibleWorld possibleW * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PartyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.party.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PartyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.party.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -223,10 +222,6 @@ public Party build() throws HqdmException { && this.party.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.party.hasValue(MEMBER__OF) - && this.party.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.party.hasValue(MEMBER_OF) && this.party.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -235,17 +230,13 @@ public Party build() throws HqdmException { && this.party.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.party.hasValue(PART__OF) - && this.party.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.party.hasValue(PART_OF) + && this.party.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.party.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.party.hasValue(TEMPORAL__PART_OF) - && this.party.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.party.hasValue(TEMPORAL_PART_OF) && this.party.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PatternBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PatternBuilder.java index 1e5fc293..3fd990bf 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PatternBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PatternBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public PatternBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PatternBuilder consists__Of_By_Class( + public final PatternBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.pattern.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.pattern.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final PatternBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final PatternBuilder member__Of(final Class clazz) { - this.pattern.addValue(MEMBER__OF, clazz.getId()); + public final PatternBuilder member_Of(final Class clazz) { + this.pattern.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final PatternBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PatternBuilder member_Of_( + public final PatternBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.pattern.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.pattern.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PatternBuilder part__Of_By_Class( + public final PatternBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.pattern.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.pattern.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public Pattern build() throws HqdmException { && this.pattern.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.pattern.hasValue(MEMBER__OF) - && this.pattern.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.pattern.hasValue(MEMBER_OF) && this.pattern.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.pattern.hasValue(MEMBER_OF_) - && this.pattern.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.pattern.hasValue(PART__OF_BY_CLASS) - && this.pattern.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.pattern.hasValue(PART_OF_BY_CLASS) + && this.pattern.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return pattern; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PeriodOfTimeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PeriodOfTimeBuilder.java index af0a7bba..00a56388 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PeriodOfTimeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PeriodOfTimeBuilder.java @@ -16,15 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -85,14 +82,14 @@ public final PeriodOfTimeBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PeriodOfTimeBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.periodOfTime.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PeriodOfTimeBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.periodOfTime.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,15 +112,15 @@ public final PeriodOfTimeBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PeriodOfTimeBuilder member__Of(final Class clazz) { - this.periodOfTime.addValue(MEMBER__OF, clazz.getId()); + public final PeriodOfTimeBuilder member_Of(final Class clazz) { + this.periodOfTime.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PeriodOfTime} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfPeriodOfTime}. + * {@link PeriodOfTime} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfPeriodOfTime}. * * @param classOfPeriodOfTime The ClassOfPeriodOfTime. * @return This builder. @@ -141,20 +138,19 @@ public final PeriodOfTimeBuilder member_Of(final ClassOfPeriodOfTime classOfPeri * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PeriodOfTimeBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.periodOfTime.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PeriodOfTimeBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.periodOfTime.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -173,24 +169,23 @@ public final PeriodOfTimeBuilder part_Of_Possible_World_M(final PossibleWorld po * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PeriodOfTimeBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.periodOfTime.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PeriodOfTimeBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.periodOfTime.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -203,15 +198,14 @@ public final PeriodOfTimeBuilder temporal_Part_Of(final Individual individual) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link PeriodOfTime} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link PossibleWorld}. + * {@link PeriodOfTime} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link PossibleWorld}. * * @param possibleWorld The PossibleWorld. * @return This builder. */ - public final PeriodOfTimeBuilder temporal_Part_Of_(final PossibleWorld possibleWorld) { - this.periodOfTime.addValue(TEMPORAL_PART_OF_, possibleWorld.getId()); + public final PeriodOfTimeBuilder temporal_Part_Of(final PossibleWorld possibleWorld) { + this.periodOfTime.addValue(TEMPORAL_PART_OF, possibleWorld.getId()); return this; } @@ -234,33 +228,21 @@ public PeriodOfTime build() throws HqdmException { && this.periodOfTime.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.periodOfTime.hasValue(MEMBER__OF) - && this.periodOfTime.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.periodOfTime.hasValue(MEMBER_OF) && this.periodOfTime.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.periodOfTime.hasValue(PART__OF) - && this.periodOfTime.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.periodOfTime.hasValue(PART_OF) + && this.periodOfTime.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.periodOfTime.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.periodOfTime.hasValue(TEMPORAL__PART_OF) - && this.periodOfTime.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.periodOfTime.hasValue(TEMPORAL_PART_OF) && this.periodOfTime.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); } - if (this.periodOfTime.hasValue(TEMPORAL_PART_OF_) - && this.periodOfTime.values(TEMPORAL_PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: temporal_part_of_"); - } return periodOfTime; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilder.java index 50919bed..b58f573c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.NATURAL_ROLE; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final PersonBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.person.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PersonBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.person.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final PersonBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PersonBuilder member__Of(final Class clazz) { - this.person.addValue(MEMBER__OF, clazz.getId()); + public final PersonBuilder member_Of(final Class clazz) { + this.person.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -146,6 +145,7 @@ public final PersonBuilder member_Of(final ClassOfPerson classOfPerson) { */ public final PersonBuilder member_Of_Kind(final KindOfPerson kindOfPerson) { this.person.addValue(MEMBER_OF_KIND, kindOfPerson.getId()); + this.person.addValue(RDFS.RDF_TYPE, kindOfPerson.getId()); return this; } @@ -176,20 +176,19 @@ public final PersonBuilder natural_Role_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.person.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PersonBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.person.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -208,8 +207,8 @@ public final PersonBuilder part_Of_Possible_World_M(final PossibleWorld possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.person.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PersonBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.person.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -247,10 +246,6 @@ public Person build() throws HqdmException { && this.person.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.person.hasValue(MEMBER__OF) - && this.person.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.person.hasValue(MEMBER_OF) && this.person.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -262,17 +257,13 @@ public Person build() throws HqdmException { if (!this.person.hasValue(NATURAL_ROLE)) { throw new HqdmException("Property Not Set: natural_role"); } - if (this.person.hasValue(PART__OF) - && this.person.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.person.hasValue(PART_OF) + && this.person.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.person.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.person.hasValue(TEMPORAL__PART_OF) - && this.person.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.person.hasValue(TEMPORAL_PART_OF) && this.person.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonInPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonInPositionBuilder.java index 43ec07ac..aa193ea6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonInPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonInPositionBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final PersonInPositionBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonInPositionBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.personInPosition.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PersonInPositionBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.personInPosition.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final PersonInPositionBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PersonInPositionBuilder member__Of(final Class clazz) { - this.personInPosition.addValue(MEMBER__OF, clazz.getId()); + public final PersonInPositionBuilder member_Of(final Class clazz) { + this.personInPosition.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PersonInPosition} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfPersonInPosition}. + * {@link PersonInPosition} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfPersonInPosition}. * * @param classOfPersonInPosition The ClassOfPersonInPosition. * @return This builder. @@ -140,20 +138,19 @@ public final PersonInPositionBuilder member_Of(final ClassOfPersonInPosition cla * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonInPositionBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.personInPosition.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PersonInPositionBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.personInPosition.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,16 +169,15 @@ public final PersonInPositionBuilder part_Of_Possible_World_M(final PossibleWorl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PersonInPositionBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.personInPosition.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PersonInPositionBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.personInPosition.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPosition} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Position}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Position}. * * @param position The Position. * @return This builder. @@ -210,25 +206,17 @@ public PersonInPosition build() throws HqdmException { && this.personInPosition.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.personInPosition.hasValue(MEMBER__OF) - && this.personInPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.personInPosition.hasValue(MEMBER_OF) && this.personInPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.personInPosition.hasValue(PART__OF) - && this.personInPosition.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.personInPosition.hasValue(PART_OF) + && this.personInPosition.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.personInPosition.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.personInPosition.hasValue(TEMPORAL__PART_OF) - && this.personInPosition.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.personInPosition.hasValue(TEMPORAL_PART_OF) && this.personInPosition.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalObjectBuilder.java index 75e7b993..1182f2ce 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -36,6 +34,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -86,14 +85,14 @@ public final PhysicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PhysicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.physicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PhysicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.physicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -116,15 +115,15 @@ public final PhysicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PhysicalObjectBuilder member__Of(final Class clazz) { - this.physicalObject.addValue(MEMBER__OF, clazz.getId()); + public final PhysicalObjectBuilder member_Of(final Class clazz) { + this.physicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfPhysicalObject}. + * {@link PhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfPhysicalObject}. * * @param classOfPhysicalObject The ClassOfPhysicalObject. * @return This builder. @@ -136,14 +135,15 @@ public final PhysicalObjectBuilder member_Of(final ClassOfPhysicalObject classOf /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link KindOfPhysicalObject}. + * {@link PhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link KindOfPhysicalObject}. * * @param kindOfPhysicalObject The KindOfPhysicalObject. * @return This builder. */ public final PhysicalObjectBuilder member_Of_Kind(final KindOfPhysicalObject kindOfPhysicalObject) { this.physicalObject.addValue(MEMBER_OF_KIND, kindOfPhysicalObject.getId()); + this.physicalObject.addValue(RDFS.RDF_TYPE, kindOfPhysicalObject.getId()); return this; } @@ -155,20 +155,19 @@ public final PhysicalObjectBuilder member_Of_Kind(final KindOfPhysicalObject kin * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PhysicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.physicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PhysicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.physicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -187,24 +186,23 @@ public final PhysicalObjectBuilder part_Of_Possible_World_M(final PossibleWorld * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PhysicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.physicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PhysicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.physicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -234,10 +232,6 @@ public PhysicalObject build() throws HqdmException { && this.physicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.physicalObject.hasValue(MEMBER__OF) - && this.physicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.physicalObject.hasValue(MEMBER_OF) && this.physicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -246,17 +240,13 @@ public PhysicalObject build() throws HqdmException { && this.physicalObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.physicalObject.hasValue(PART__OF) - && this.physicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.physicalObject.hasValue(PART_OF) + && this.physicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.physicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.physicalObject.hasValue(TEMPORAL__PART_OF) - && this.physicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.physicalObject.hasValue(TEMPORAL_PART_OF) && this.physicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyBuilder.java index d42d6cdb..a5ca5dff 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -30,6 +28,7 @@ import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalProperty; import uk.gov.gchq.magmacore.hqdm.model.PhysicalProperty; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -49,19 +48,18 @@ public PhysicalPropertyBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyBuilder consists__Of_By_Class( + public final PhysicalPropertyBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalProperty.addValue(CONSISTS__OF_BY_CLASS, + this.physicalProperty.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,15 +83,15 @@ public final PhysicalPropertyBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final PhysicalPropertyBuilder member__Of(final Class clazz) { - this.physicalProperty.addValue(MEMBER__OF, clazz.getId()); + public final PhysicalPropertyBuilder member_Of(final Class clazz) { + this.physicalProperty.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalProperty} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfPhysicalProperty}. + * {@link PhysicalProperty} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfPhysicalProperty}. * * @param classOfPhysicalProperty The ClassOfPhysicalProperty. * @return This builder. @@ -111,38 +109,38 @@ public final PhysicalPropertyBuilder member_Of(final ClassOfPhysicalProperty cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyBuilder member_Of_( + public final PhysicalPropertyBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.physicalProperty.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.physicalProperty.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalProperty} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * exactly one {@link KindOfPhysicalProperty}. + * {@link PhysicalProperty} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} exactly + * one {@link KindOfPhysicalProperty}. * * @param kindOfPhysicalProperty The KindOfPhysicalProperty. * @return This builder. */ public final PhysicalPropertyBuilder member_Of_Kind_M(final KindOfPhysicalProperty kindOfPhysicalProperty) { this.physicalProperty.addValue(MEMBER_OF_KIND, kindOfPhysicalProperty.getId()); + this.physicalProperty.addValue(RDFS.RDF_TYPE, kindOfPhysicalProperty.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyBuilder part__Of_By_Class( + public final PhysicalPropertyBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalProperty.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.physicalProperty.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -157,24 +155,16 @@ public PhysicalProperty build() throws HqdmException { && this.physicalProperty.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.physicalProperty.hasValue(MEMBER__OF) - && this.physicalProperty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.physicalProperty.hasValue(MEMBER_OF) && this.physicalProperty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.physicalProperty.hasValue(MEMBER_OF_) - && this.physicalProperty.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.physicalProperty.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.physicalProperty.hasValue(PART__OF_BY_CLASS) - && this.physicalProperty.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.physicalProperty.hasValue(PART_OF_BY_CLASS) + && this.physicalProperty.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return physicalProperty; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyRangeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyRangeBuilder.java index a4a45ec5..509c9f3d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyRangeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalPropertyRangeBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.RANGES_OVER; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -49,19 +47,18 @@ public PhysicalPropertyRangeBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyRangeBuilder consists__Of_By_Class( + public final PhysicalPropertyRangeBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalPropertyRange.addValue(CONSISTS__OF_BY_CLASS, + this.physicalPropertyRange.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,8 +82,8 @@ public final PhysicalPropertyRangeBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final PhysicalPropertyRangeBuilder member__Of(final Class clazz) { - this.physicalPropertyRange.addValue(MEMBER__OF, clazz.getId()); + public final PhysicalPropertyRangeBuilder member_Of(final Class clazz) { + this.physicalPropertyRange.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -111,26 +108,25 @@ public final PhysicalPropertyRangeBuilder member_Of(final ClassOfClass classOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyRangeBuilder member_Of_( + public final PhysicalPropertyRangeBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.physicalPropertyRange.addValue(MEMBER_OF_, + this.physicalPropertyRange.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalPropertyRangeBuilder part__Of_By_Class( + public final PhysicalPropertyRangeBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalPropertyRange.addValue(PART__OF_BY_CLASS, + this.physicalPropertyRange.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -158,21 +154,13 @@ public PhysicalPropertyRange build() throws HqdmException { && this.physicalPropertyRange.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.physicalPropertyRange.hasValue(MEMBER__OF) - && this.physicalPropertyRange.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.physicalPropertyRange.hasValue(MEMBER_OF) && this.physicalPropertyRange.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.physicalPropertyRange.hasValue(MEMBER_OF_) - && this.physicalPropertyRange.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.physicalPropertyRange.hasValue(PART__OF_BY_CLASS) - && this.physicalPropertyRange.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.physicalPropertyRange.hasValue(PART_OF_BY_CLASS) + && this.physicalPropertyRange.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } if (!this.physicalPropertyRange.hasValue(RANGES_OVER)) { throw new HqdmException("Property Not Set: ranges_over"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityBuilder.java index 4c54f0dd..e24407d4 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -30,6 +28,7 @@ import uk.gov.gchq.magmacore.hqdm.model.KindOfPhysicalQuantity; import uk.gov.gchq.magmacore.hqdm.model.PhysicalQuantity; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -49,19 +48,18 @@ public PhysicalQuantityBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityBuilder consists__Of_By_Class( + public final PhysicalQuantityBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalQuantity.addValue(CONSISTS__OF_BY_CLASS, + this.physicalQuantity.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -85,15 +83,15 @@ public final PhysicalQuantityBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final PhysicalQuantityBuilder member__Of(final Class clazz) { - this.physicalQuantity.addValue(MEMBER__OF, clazz.getId()); + public final PhysicalQuantityBuilder member_Of(final Class clazz) { + this.physicalQuantity.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalQuantity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfPhysicalQuantity}. + * {@link PhysicalQuantity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfPhysicalQuantity}. * * @param classOfPhysicalQuantity The ClassOfPhysicalQuantity. * @return This builder. @@ -111,38 +109,38 @@ public final PhysicalQuantityBuilder member_Of(final ClassOfPhysicalQuantity cla * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityBuilder member_Of_( + public final PhysicalQuantityBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.physicalQuantity.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.physicalQuantity.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PhysicalQuantity} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * exactly one {@link KindOfPhysicalQuantity}. + * {@link PhysicalQuantity} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} exactly + * one {@link KindOfPhysicalQuantity}. * * @param kindOfPhysicalQuantity The KindOfPhysicalQuantity. * @return This builder. */ public final PhysicalQuantityBuilder member_Of_Kind_M(final KindOfPhysicalQuantity kindOfPhysicalQuantity) { this.physicalQuantity.addValue(MEMBER_OF_KIND, kindOfPhysicalQuantity.getId()); + this.physicalQuantity.addValue(RDFS.RDF_TYPE, kindOfPhysicalQuantity.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityBuilder part__Of_By_Class( + public final PhysicalQuantityBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalQuantity.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.physicalQuantity.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -157,24 +155,16 @@ public PhysicalQuantity build() throws HqdmException { && this.physicalQuantity.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.physicalQuantity.hasValue(MEMBER__OF) - && this.physicalQuantity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.physicalQuantity.hasValue(MEMBER_OF) && this.physicalQuantity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.physicalQuantity.hasValue(MEMBER_OF_) - && this.physicalQuantity.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.physicalQuantity.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.physicalQuantity.hasValue(PART__OF_BY_CLASS) - && this.physicalQuantity.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.physicalQuantity.hasValue(PART_OF_BY_CLASS) + && this.physicalQuantity.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return physicalQuantity; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityRangeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityRangeBuilder.java index 2ce903ff..686b279a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityRangeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PhysicalQuantityRangeBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.LOWER_BOUND; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.RANGES_OVER; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.UPPER_BOUND; @@ -52,19 +50,18 @@ public PhysicalQuantityRangeBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityRangeBuilder consists__Of_By_Class( + public final PhysicalQuantityRangeBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalQuantityRange.addValue(CONSISTS__OF_BY_CLASS, + this.physicalQuantityRange.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -83,8 +80,7 @@ public final PhysicalQuantityRangeBuilder has_Superclass(final Class clazz) { /** * A supertype_of relationship type where each {@link PhysicalQuantityRange} must have as - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#LOWER_BOUND} exactly one - * {@link PhysicalQuantity}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#LOWER_BOUND} exactly one {@link PhysicalQuantity}. * * @param physicalQuantity The PhysicalQuantity. * @return This builder. @@ -101,8 +97,8 @@ public final PhysicalQuantityRangeBuilder lower_Bound_M(final PhysicalQuantity p * @param clazz The Class. * @return This builder. */ - public final PhysicalQuantityRangeBuilder member__Of(final Class clazz) { - this.physicalQuantityRange.addValue(MEMBER__OF, clazz.getId()); + public final PhysicalQuantityRangeBuilder member_Of(final Class clazz) { + this.physicalQuantityRange.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -127,26 +123,25 @@ public final PhysicalQuantityRangeBuilder member_Of(final ClassOfClass classOfCl * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityRangeBuilder member_Of_( + public final PhysicalQuantityRangeBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.physicalQuantityRange.addValue(MEMBER_OF_, + this.physicalQuantityRange.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PhysicalQuantityRangeBuilder part__Of_By_Class( + public final PhysicalQuantityRangeBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.physicalQuantityRange.addValue(PART__OF_BY_CLASS, + this.physicalQuantityRange.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -166,8 +161,7 @@ public final PhysicalQuantityRangeBuilder ranges_Over_M(final PhysicalProperty p /** * A supertype_of relationship type where each {@link PhysicalQuantityRange} must have as - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#UPPER_BOUND} exactly one - * {@link PhysicalQuantity}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#UPPER_BOUND} exactly one {@link PhysicalQuantity}. * * @param physicalQuantity The PhysicalQuantity. * @return This builder. @@ -191,21 +185,13 @@ public PhysicalQuantityRange build() throws HqdmException { if (!this.physicalQuantityRange.hasValue(LOWER_BOUND)) { throw new HqdmException("Property Not Set: lower_bound"); } - if (this.physicalQuantityRange.hasValue(MEMBER__OF) - && this.physicalQuantityRange.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.physicalQuantityRange.hasValue(MEMBER_OF) && this.physicalQuantityRange.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.physicalQuantityRange.hasValue(MEMBER_OF_) - && this.physicalQuantityRange.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.physicalQuantityRange.hasValue(PART__OF_BY_CLASS) - && this.physicalQuantityRange.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.physicalQuantityRange.hasValue(PART_OF_BY_CLASS) + && this.physicalQuantityRange.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } if (!this.physicalQuantityRange.hasValue(RANGES_OVER)) { throw new HqdmException("Property Not Set: ranges_over"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PlanBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PlanBuilder.java index 4e0e4c15..40793c68 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PlanBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PlanBuilder.java @@ -16,16 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -37,6 +34,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -87,14 +85,14 @@ public final PlanBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PlanBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.plan.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PlanBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.plan.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -117,15 +115,15 @@ public final PlanBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PlanBuilder member__Of(final Class clazz) { - this.plan.addValue(MEMBER__OF, clazz.getId()); + public final PlanBuilder member_Of(final Class clazz) { + this.plan.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PossibleWorld} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfPossibleWorld}. + * {@link PossibleWorld} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfPossibleWorld}. * * @param classOfPossibleWorld The ClassOfPossibleWorld. * @return This builder. @@ -137,14 +135,15 @@ public final PlanBuilder member_Of(final ClassOfPossibleWorld classOfPossibleWor /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link KindOfIndividual}. + * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link KindOfIndividual}. * * @param kindOfIndividual The KindOfIndividual. * @return This builder. */ public final PlanBuilder member_Of_Kind(final KindOfIndividual kindOfIndividual) { this.plan.addValue(MEMBER_OF_KIND, kindOfIndividual.getId()); + this.plan.addValue(RDFS.RDF_TYPE, kindOfIndividual.getId()); return this; } @@ -156,20 +155,19 @@ public final PlanBuilder member_Of_Kind(final KindOfIndividual kindOfIndividual) * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PlanBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.plan.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PlanBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.plan.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -188,24 +186,23 @@ public final PlanBuilder part_Of_Possible_World_M(final PossibleWorld possibleWo * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PlanBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.plan.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PlanBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.plan.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -225,8 +222,8 @@ public final PlanBuilder temporal_Part_Of(final Individual individual) { * @param possibleWorld The PossibleWorld. * @return This builder. */ - public final PlanBuilder temporal_Part_Of_(final PossibleWorld possibleWorld) { - this.plan.addValue(TEMPORAL_PART_OF_, possibleWorld.getId()); + public final PlanBuilder temporal_Part_Of(final PossibleWorld possibleWorld) { + this.plan.addValue(TEMPORAL_PART_OF, possibleWorld.getId()); return this; } @@ -249,10 +246,6 @@ public Plan build() throws HqdmException { && this.plan.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.plan.hasValue(MEMBER__OF) - && this.plan.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.plan.hasValue(MEMBER_OF) && this.plan.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -261,25 +254,17 @@ public Plan build() throws HqdmException { && this.plan.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.plan.hasValue(PART__OF) - && this.plan.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.plan.hasValue(PART_OF) + && this.plan.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.plan.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.plan.hasValue(TEMPORAL__PART_OF) - && this.plan.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.plan.hasValue(TEMPORAL_PART_OF) && this.plan.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); } - if (this.plan.hasValue(TEMPORAL_PART_OF_) - && this.plan.values(TEMPORAL_PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: temporal_part_of_"); - } return plan; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PointInTimeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PointInTimeBuilder.java index 264e6fca..0db8b575 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PointInTimeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PointInTimeBuilder.java @@ -16,13 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -82,14 +81,14 @@ public final PointInTimeBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PointInTimeBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.pointInTime.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PointInTimeBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.pointInTime.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -112,8 +111,8 @@ public final PointInTimeBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PointInTimeBuilder member__Of(final Class clazz) { - this.pointInTime.addValue(MEMBER__OF, clazz.getId()); + public final PointInTimeBuilder member_Of(final Class clazz) { + this.pointInTime.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -138,20 +137,19 @@ public final PointInTimeBuilder member_Of(final ClassOfPointInTime classOfPointI * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PointInTimeBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.pointInTime.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PointInTimeBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.pointInTime.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -170,8 +168,8 @@ public final PointInTimeBuilder part_Of_Possible_World_M(final PossibleWorld pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PointInTimeBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.pointInTime.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PointInTimeBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.pointInTime.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -194,24 +192,20 @@ public PointInTime build() throws HqdmException { && this.pointInTime.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.pointInTime.hasValue(MEMBER__OF) - && this.pointInTime.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.pointInTime.hasValue(MEMBER_OF) && this.pointInTime.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.pointInTime.hasValue(PART__OF) - && this.pointInTime.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.pointInTime.hasValue(PART_OF) + && this.pointInTime.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.pointInTime.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.pointInTime.hasValue(TEMPORAL__PART_OF) - && this.pointInTime.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.pointInTime.hasValue(TEMPORAL_PART_OF) + && this.pointInTime.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return pointInTime; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PositionBuilder.java index 98f950fb..a2531f8c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PositionBuilder.java @@ -17,15 +17,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.COMPONENT_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -100,14 +99,14 @@ public final PositionBuilder component_Of_M(final Organization organization) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PositionBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.position.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PositionBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.position.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -130,15 +129,15 @@ public final PositionBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PositionBuilder member__Of(final Class clazz) { - this.position.addValue(MEMBER__OF, clazz.getId()); + public final PositionBuilder member_Of(final Class clazz) { + this.position.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link Position} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link ClassOfPosition}. + * {@link Position} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link ClassOfPosition}. * * @param classOfPosition The ClassOfPosition. * @return This builder. @@ -150,14 +149,15 @@ public final PositionBuilder member_Of(final ClassOfPosition classOfPosition) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where a - * {@link Position} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link KindOfPosition}. + * {@link Position} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link KindOfPosition}. * * @param kindOfPosition The KindOfPosition. * @return This builder. */ public final PositionBuilder member_Of_Kind(final KindOfPosition kindOfPosition) { this.position.addValue(MEMBER_OF_KIND, kindOfPosition.getId()); + this.position.addValue(RDFS.RDF_TYPE, kindOfPosition.getId()); return this; } @@ -169,20 +169,19 @@ public final PositionBuilder member_Of_Kind(final KindOfPosition kindOfPosition) * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PositionBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.position.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PositionBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.position.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -201,8 +200,8 @@ public final PositionBuilder part_Of_Possible_World_M(final PossibleWorld possib * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PositionBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.position.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PositionBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.position.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -242,10 +241,6 @@ public Position build() throws HqdmException { && this.position.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.position.hasValue(MEMBER__OF) - && this.position.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.position.hasValue(MEMBER_OF) && this.position.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -254,17 +249,13 @@ public Position build() throws HqdmException { && this.position.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.position.hasValue(PART__OF) - && this.position.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.position.hasValue(PART_OF) + && this.position.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.position.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.position.hasValue(TEMPORAL__PART_OF) - && this.position.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.position.hasValue(TEMPORAL_PART_OF) && this.position.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PossibleWorldBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PossibleWorldBuilder.java index a2d88e59..a79dfed3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PossibleWorldBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PossibleWorldBuilder.java @@ -16,16 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -36,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.PossibleWorld; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -86,14 +84,14 @@ public final PossibleWorldBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PossibleWorldBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.possibleWorld.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final PossibleWorldBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.possibleWorld.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -116,15 +114,15 @@ public final PossibleWorldBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final PossibleWorldBuilder member__Of(final Class clazz) { - this.possibleWorld.addValue(MEMBER__OF, clazz.getId()); + public final PossibleWorldBuilder member_Of(final Class clazz) { + this.possibleWorld.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link PossibleWorld} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfPossibleWorld}. + * {@link PossibleWorld} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfPossibleWorld}. * * @param classOfPossibleWorld The ClassOfPossibleWorld. * @return This builder. @@ -136,14 +134,15 @@ public final PossibleWorldBuilder member_Of(final ClassOfPossibleWorld classOfPo /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where an - * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link KindOfIndividual}. + * {@link Individual} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link KindOfIndividual}. * * @param kindOfIndividual The KindOfIndividual. * @return This builder. */ public final PossibleWorldBuilder member_Of_Kind(final KindOfIndividual kindOfIndividual) { this.possibleWorld.addValue(MEMBER_OF_KIND, kindOfIndividual.getId()); + this.possibleWorld.addValue(RDFS.RDF_TYPE, kindOfIndividual.getId()); return this; } @@ -155,20 +154,19 @@ public final PossibleWorldBuilder member_Of_Kind(final KindOfIndividual kindOfIn * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PossibleWorldBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.possibleWorld.addValue(PART__OF, spatioTemporalExtent.getId()); + public final PossibleWorldBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.possibleWorld.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -187,24 +185,23 @@ public final PossibleWorldBuilder part_Of_Possible_World_M(final PossibleWorld p * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final PossibleWorldBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.possibleWorld.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final PossibleWorldBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.possibleWorld.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -224,8 +221,8 @@ public final PossibleWorldBuilder temporal_Part_Of(final Individual individual) * @param possibleWorld The PossibleWorld. * @return This builder. */ - public final PossibleWorldBuilder temporal_Part_Of_(final PossibleWorld possibleWorld) { - this.possibleWorld.addValue(TEMPORAL_PART_OF_, possibleWorld.getId()); + public final PossibleWorldBuilder temporal_Part_Of(final PossibleWorld possibleWorld) { + this.possibleWorld.addValue(TEMPORAL_PART_OF, possibleWorld.getId()); return this; } @@ -248,10 +245,6 @@ public PossibleWorld build() throws HqdmException { && this.possibleWorld.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.possibleWorld.hasValue(MEMBER__OF) - && this.possibleWorld.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.possibleWorld.hasValue(MEMBER_OF) && this.possibleWorld.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -260,25 +253,17 @@ public PossibleWorld build() throws HqdmException { && this.possibleWorld.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.possibleWorld.hasValue(PART__OF) - && this.possibleWorld.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.possibleWorld.hasValue(PART_OF) + && this.possibleWorld.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.possibleWorld.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.possibleWorld.hasValue(TEMPORAL__PART_OF) - && this.possibleWorld.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.possibleWorld.hasValue(TEMPORAL_PART_OF) && this.possibleWorld.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); } - if (this.possibleWorld.hasValue(TEMPORAL_PART_OF_) - && this.possibleWorld.values(TEMPORAL_PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: temporal_part_of_"); - } return possibleWorld; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PriceBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PriceBuilder.java index 13bbfbd3..44cb1dba 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PriceBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PriceBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public PriceBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PriceBuilder consists__Of_By_Class( + public final PriceBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.price.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.price.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final PriceBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final PriceBuilder member__Of(final Class clazz) { - this.price.addValue(MEMBER__OF, clazz.getId()); + public final PriceBuilder member_Of(final Class clazz) { + this.price.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final PriceBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final PriceBuilder member_Of_( + public final PriceBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.price.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.price.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final PriceBuilder part__Of_By_Class( + public final PriceBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.price.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.price.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public Price build() throws HqdmException { && this.price.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.price.hasValue(MEMBER__OF) - && this.price.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.price.hasValue(MEMBER_OF) && this.price.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.price.hasValue(MEMBER_OF_) - && this.price.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.price.hasValue(PART__OF_BY_CLASS) - && this.price.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.price.hasValue(PART_OF_BY_CLASS) + && this.price.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return price; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductBrandBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductBrandBuilder.java index bddeb1ff..84fe6816 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductBrandBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductBrandBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,19 +45,18 @@ public ProductBrandBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductBrandBuilder consists__Of_By_Class( + public final ProductBrandBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.productBrand.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.productBrand.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,8 +79,8 @@ public final ProductBrandBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ProductBrandBuilder member__Of(final Class clazz) { - this.productBrand.addValue(MEMBER__OF, clazz.getId()); + public final ProductBrandBuilder member_Of(final Class clazz) { + this.productBrand.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -108,25 +105,24 @@ public final ProductBrandBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductBrandBuilder member_Of_( + public final ProductBrandBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.productBrand.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.productBrand.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductBrandBuilder part__Of_By_Class( + public final ProductBrandBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.productBrand.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.productBrand.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -141,21 +137,13 @@ public ProductBrand build() throws HqdmException { && this.productBrand.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.productBrand.hasValue(MEMBER__OF) - && this.productBrand.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.productBrand.hasValue(MEMBER_OF) && this.productBrand.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.productBrand.hasValue(MEMBER_OF_) - && this.productBrand.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.productBrand.hasValue(PART__OF_BY_CLASS) - && this.productBrand.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.productBrand.hasValue(PART_OF_BY_CLASS) + && this.productBrand.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return productBrand; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductOfferingBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductOfferingBuilder.java index 24e8c69d..6a78de27 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductOfferingBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ProductOfferingBuilder.java @@ -16,15 +16,11 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CLASS_OF_OFFERED; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSIDERATION_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.OFFEROR; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PERIOD_OFFERED; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -83,19 +79,18 @@ public final ProductOfferingBuilder consideration_By_Class_M(final Price price) } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductOfferingBuilder consists__Of_By_Class( + public final ProductOfferingBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.productOffering.addValue(CONSISTS__OF_BY_CLASS, + this.productOffering.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -119,8 +114,8 @@ public final ProductOfferingBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final ProductOfferingBuilder member__Of(final Class clazz) { - this.productOffering.addValue(MEMBER__OF, clazz.getId()); + public final ProductOfferingBuilder member_Of(final Class clazz) { + this.productOffering.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -145,9 +140,9 @@ public final ProductOfferingBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductOfferingBuilder member_Of_( + public final ProductOfferingBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.productOffering.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.productOffering.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } @@ -165,17 +160,16 @@ public final ProductOfferingBuilder offeror_M(final Party party) { /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final ProductOfferingBuilder part__Of_By_Class( + public final ProductOfferingBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.productOffering.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.productOffering.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -200,15 +194,14 @@ public final ProductOfferingBuilder part_Of_By_Class( * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedActivity} may be a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfAgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link ClassOfAgreementExecution}. * * @param classOfAgreementExecution The ClassOfAgreementExecution. * @return This builder. */ - public final ProductOfferingBuilder part_Of_By_Class_( + public final ProductOfferingBuilder part_Of_By_Class( final ClassOfAgreementExecution classOfAgreementExecution) { - this.productOffering.addValue(PART_OF_BY_CLASS_, classOfAgreementExecution.getId()); + this.productOffering.addValue(PART_OF_BY_CLASS, classOfAgreementExecution.getId()); return this; } @@ -241,33 +234,17 @@ public ProductOffering build() throws HqdmException { && this.productOffering.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.productOffering.hasValue(MEMBER__OF) - && this.productOffering.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.productOffering.hasValue(MEMBER_OF) && this.productOffering.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.productOffering.hasValue(MEMBER_OF_) - && this.productOffering.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.productOffering.hasValue(OFFEROR)) { throw new HqdmException("Property Not Set: offeror"); } - if (this.productOffering.hasValue(PART__OF_BY_CLASS) - && this.productOffering.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.productOffering.hasValue(PART_OF_BY_CLASS) && this.productOffering.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.productOffering.hasValue(PART_OF_BY_CLASS_) - && this.productOffering.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } if (!this.productOffering.hasValue(PERIOD_OFFERED)) { throw new HqdmException("Property Not Set: period_offered"); } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ReachingAgreementBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ReachingAgreementBuilder.java index 2fb6394e..d0e546ce 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ReachingAgreementBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ReachingAgreementBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -48,6 +43,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -109,14 +105,14 @@ public final ReachingAgreementBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ReachingAgreementBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.reachingAgreement.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final ReachingAgreementBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.reachingAgreement.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -176,15 +172,15 @@ public final ReachingAgreementBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final ReachingAgreementBuilder member__Of(final Class clazz) { - this.reachingAgreement.addValue(MEMBER__OF, clazz.getId()); + public final ReachingAgreementBuilder member_Of(final Class clazz) { + this.reachingAgreement.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link ReachingAgreement} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfReachingAgreement}. + * {@link ReachingAgreement} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfReachingAgreement}. * * @param classOfReachingAgreement The ClassOfReachingAgreement. * @return This builder. @@ -204,6 +200,7 @@ public final ReachingAgreementBuilder member_Of(final ClassOfReachingAgreement c */ public final ReachingAgreementBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.reachingAgreement.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.reachingAgreement.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -215,47 +212,46 @@ public final ReachingAgreementBuilder member_Of_Kind_M(final KindOfActivity kind * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ReachingAgreementBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.reachingAgreement.addValue(PART__OF, spatioTemporalExtent.getId()); + public final ReachingAgreementBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.reachingAgreement.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link ReachingAgreement} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * exactly one {@link AgreementProcess}. + * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * - * @param agreementProcess The AgreementProcess. + * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final ReachingAgreementBuilder part_Of_M(final AgreementProcess agreementProcess) { - this.reachingAgreement.addValue(PART_OF, agreementProcess.getId()); + public final ReachingAgreementBuilder part_Of(final AgreementExecution agreementExecution) { + this.reachingAgreement.addValue(PART_OF, agreementExecution.getId()); return this; } + /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link ReachingAgreement} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly + * one {@link AgreementProcess}. * - * @param agreementExecution The AgreementExecution. + * @param agreementProcess The AgreementProcess. * @return This builder. */ - public final ReachingAgreementBuilder part_Of_(final AgreementExecution agreementExecution) { - this.reachingAgreement.addValue(PART_OF_, agreementExecution.getId()); + public final ReachingAgreementBuilder part_Of_M(final AgreementProcess agreementProcess) { + this.reachingAgreement.addValue(PART_OF, agreementProcess.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -285,24 +281,23 @@ public final ReachingAgreementBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final ReachingAgreementBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.reachingAgreement.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final ReachingAgreementBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.reachingAgreement.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -339,10 +334,6 @@ public ReachingAgreement build() throws HqdmException { && this.reachingAgreement.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.reachingAgreement.hasValue(MEMBER__OF) - && this.reachingAgreement.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.reachingAgreement.hasValue(MEMBER_OF) && this.reachingAgreement.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -350,17 +341,10 @@ public ReachingAgreement build() throws HqdmException { if (!this.reachingAgreement.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.reachingAgreement.hasValue(PART__OF) - && this.reachingAgreement.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } - if (!this.reachingAgreement.hasValue(PART_OF)) { + if (this.reachingAgreement.hasValue(PART_OF) + && this.reachingAgreement.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.reachingAgreement.hasValue(PART_OF_) - && this.reachingAgreement.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.reachingAgreement.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -368,10 +352,6 @@ public ReachingAgreement build() throws HqdmException { && this.reachingAgreement.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.reachingAgreement.hasValue(TEMPORAL__PART_OF) - && this.reachingAgreement.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.reachingAgreement.hasValue(TEMPORAL_PART_OF) && this.reachingAgreement.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RecognizingLanguageCommunityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RecognizingLanguageCommunityBuilder.java index 9abddeb7..c28c0341 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RecognizingLanguageCommunityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RecognizingLanguageCommunityBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Role; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -89,14 +88,14 @@ public final RecognizingLanguageCommunityBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RecognizingLanguageCommunityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.recognizingLanguageCommunity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final RecognizingLanguageCommunityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.recognizingLanguageCommunity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -119,8 +118,8 @@ public final RecognizingLanguageCommunityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final RecognizingLanguageCommunityBuilder member__Of(final Class clazz) { - this.recognizingLanguageCommunity.addValue(MEMBER__OF, clazz.getId()); + public final RecognizingLanguageCommunityBuilder member_Of(final Class clazz) { + this.recognizingLanguageCommunity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -150,6 +149,7 @@ public final RecognizingLanguageCommunityBuilder member_Of( */ public final RecognizingLanguageCommunityBuilder member_Of_Kind_M(final Role role) { this.recognizingLanguageCommunity.addValue(MEMBER_OF_KIND, role.getId()); + this.recognizingLanguageCommunity.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -161,20 +161,19 @@ public final RecognizingLanguageCommunityBuilder member_Of_Kind_M(final Role rol * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RecognizingLanguageCommunityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.recognizingLanguageCommunity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final RecognizingLanguageCommunityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.recognizingLanguageCommunity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -209,9 +208,9 @@ public final RecognizingLanguageCommunityBuilder participant_In(final Representa * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RecognizingLanguageCommunityBuilder temporal__Part_Of( + public final RecognizingLanguageCommunityBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.recognizingLanguageCommunity.addValue(TEMPORAL__PART_OF, + this.recognizingLanguageCommunity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -250,10 +249,6 @@ public RecognizingLanguageCommunity build() throws HqdmException { && this.recognizingLanguageCommunity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.recognizingLanguageCommunity.hasValue(MEMBER__OF) - && this.recognizingLanguageCommunity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.recognizingLanguageCommunity.hasValue(MEMBER_OF) && this.recognizingLanguageCommunity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -261,9 +256,9 @@ public RecognizingLanguageCommunity build() throws HqdmException { if (!this.recognizingLanguageCommunity.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.recognizingLanguageCommunity.hasValue(PART__OF) - && this.recognizingLanguageCommunity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.recognizingLanguageCommunity.hasValue(PART_OF) + && this.recognizingLanguageCommunity.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.recognizingLanguageCommunity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -272,10 +267,6 @@ public RecognizingLanguageCommunity build() throws HqdmException { && this.recognizingLanguageCommunity.values(PARTICIPANT_IN).isEmpty()) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.recognizingLanguageCommunity.hasValue(TEMPORAL__PART_OF) - && this.recognizingLanguageCommunity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.recognizingLanguageCommunity.hasValue(TEMPORAL_PART_OF) && this.recognizingLanguageCommunity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RelationshipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RelationshipBuilder.java index 78dfe0f9..566216f3 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RelationshipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RelationshipBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,8 +46,8 @@ public RelationshipBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final RelationshipBuilder member__Of(final Class clazz) { - this.relationship.addValue(MEMBER__OF, clazz.getId()); + public final RelationshipBuilder member_Of(final Class clazz) { + this.relationship.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -72,10 +71,6 @@ public final RelationshipBuilder member_Of(final ClassOfRelationship classOfRela * @throws HqdmException If the Relationship is missing any mandatory properties. */ public Relationship build() throws HqdmException { - if (this.relationship.hasValue(MEMBER__OF) - && this.relationship.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.relationship.hasValue(MEMBER_OF) && this.relationship.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationByPatternBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationByPatternBuilder.java index 62798b3f..d3155d95 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationByPatternBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationByPatternBuilder.java @@ -43,9 +43,9 @@ public RepresentationByPatternBuilder(final IRI iri) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link RepresentationByPattern} has a {@link uk.gov.gchq.magmacore.hqdm.model.Sign} that is a + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_BY_CLASS} relationship type where a + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link RepresentationByPattern} has + * a {@link uk.gov.gchq.magmacore.hqdm.model.Sign} that is a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link Pattern}. * * @param pattern The Pattern. @@ -74,8 +74,7 @@ public final RepresentationByPatternBuilder consists_Of_In_Members_M( /** * A relationship type where the {@link Thing} is represented by each - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the - * {@link RepresentationByPattern}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the {@link RepresentationByPattern}. * * @param thing The Thing. * @return This builder. diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationBySignBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationBySignBuilder.java index 79442c74..922a1a56 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationBySignBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RepresentationBySignBuilder.java @@ -17,19 +17,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REPRESENTS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -46,6 +41,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -96,20 +92,20 @@ public final RepresentationBySignBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RepresentationBySignBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.representationBySign.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final RepresentationBySignBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.representationBySign.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} relationship type where one or - * more {@link Sign} is used in the {@link RepresentationBySign}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} relationship type where one or more + * {@link Sign} is used in the {@link RepresentationBySign}. * * @param sign The Sign. * @return This builder. @@ -126,9 +122,9 @@ public final RepresentationBySignBuilder consists_Of(final Sign sign) { * @param recognizingLanguageCommunity The RecognizingLanguageCommunity. * @return This builder. */ - public final RepresentationBySignBuilder consists_Of_( + public final RepresentationBySignBuilder consists_Of( final RecognizingLanguageCommunity recognizingLanguageCommunity) { - this.representationBySign.addValue(CONSISTS_OF_, recognizingLanguageCommunity.getId()); + this.representationBySign.addValue(CONSISTS_OF, recognizingLanguageCommunity.getId()); return this; } @@ -167,16 +163,15 @@ public final RepresentationBySignBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final RepresentationBySignBuilder member__Of(final Class clazz) { - this.representationBySign.addValue(MEMBER__OF, clazz.getId()); + public final RepresentationBySignBuilder member_Of(final Class clazz) { + this.representationBySign.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where the - * {@link RepresentationBySign} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfRepresentation}. + * {@link RepresentationBySign} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfRepresentation}. * * @param classOfRepresentation The ClassOfRepresentation. * @return This builder. @@ -188,29 +183,28 @@ public final RepresentationBySignBuilder member_Of(final ClassOfRepresentation c /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where the - * {@link RepresentationBySign} must be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} exactly one - * {@link RepresentationByPattern}. + * {@link RepresentationBySign} must be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * exactly one {@link RepresentationByPattern}. * * @param representationByPattern The RepresentationByPattern. * @return This builder. */ - public final RepresentationBySignBuilder member_Of__M(final RepresentationByPattern representationByPattern) { - this.representationBySign.addValue(MEMBER_OF_, representationByPattern.getId()); + public final RepresentationBySignBuilder member_Of_M(final RepresentationByPattern representationByPattern) { + this.representationBySign.addValue(MEMBER_OF, representationByPattern.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF_KIND} relationship type where each * {@link uk.gov.gchq.magmacore.hqdm.model.Association} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link KindOfAssociation}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more {@link KindOfAssociation}. * * @param kindOfAssociation The KindOfAssociation. * @return This builder. */ public final RepresentationBySignBuilder member_Of_Kind_M(final KindOfAssociation kindOfAssociation) { this.representationBySign.addValue(MEMBER_OF_KIND, kindOfAssociation.getId()); + this.representationBySign.addValue(RDFS.RDF_TYPE, kindOfAssociation.getId()); return this; } @@ -222,20 +216,19 @@ public final RepresentationBySignBuilder member_Of_Kind_M(final KindOfAssociatio * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RepresentationBySignBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.representationBySign.addValue(PART__OF, spatioTemporalExtent.getId()); + public final RepresentationBySignBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.representationBySign.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -265,24 +258,23 @@ public final RepresentationBySignBuilder represents_M(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RepresentationBySignBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.representationBySign.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final RepresentationBySignBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.representationBySign.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -312,23 +304,16 @@ public RepresentationBySign build() throws HqdmException { && this.representationBySign.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.representationBySign.hasValue(MEMBER__OF) - && this.representationBySign.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.representationBySign.hasValue(MEMBER_OF) && this.representationBySign.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (!this.representationBySign.hasValue(MEMBER_OF_)) { - throw new HqdmException("Property Not Set: member_of_"); - } if (!this.representationBySign.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.representationBySign.hasValue(PART__OF) - && this.representationBySign.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.representationBySign.hasValue(PART_OF) + && this.representationBySign.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.representationBySign.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -336,10 +321,6 @@ public RepresentationBySign build() throws HqdmException { if (!this.representationBySign.hasValue(REPRESENTS)) { throw new HqdmException("Property Not Set: represents"); } - if (this.representationBySign.hasValue(TEMPORAL__PART_OF) - && this.representationBySign.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.representationBySign.hasValue(TEMPORAL_PART_OF) && this.representationBySign.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementBuilder.java index f19db0db..8aa66f13 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementBuilder.java @@ -16,15 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DEFINED_BY; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_PLAN; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -86,14 +85,14 @@ public final RequirementBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RequirementBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.requirement.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final RequirementBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.requirement.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -129,8 +128,8 @@ public final RequirementBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final RequirementBuilder member__Of(final Class clazz) { - this.requirement.addValue(MEMBER__OF, clazz.getId()); + public final RequirementBuilder member_Of(final Class clazz) { + this.requirement.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -156,15 +155,15 @@ public final RequirementBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RequirementBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.requirement.addValue(PART__OF, spatioTemporalExtent.getId()); + public final RequirementBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.requirement.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link Requirement} must be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or - * more {@link Plan}. + * {@link Requirement} must be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more + * {@link Plan}. * * @param plan The Plan. * @return This builder. @@ -176,13 +175,12 @@ public final RequirementBuilder part_Of_Plan_M(final Plan plan) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -201,8 +199,8 @@ public final RequirementBuilder part_Of_Possible_World_M(final PossibleWorld pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final RequirementBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.requirement.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final RequirementBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.requirement.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -228,17 +226,13 @@ public Requirement build() throws HqdmException { && this.requirement.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.requirement.hasValue(MEMBER__OF) - && this.requirement.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.requirement.hasValue(MEMBER_OF) && this.requirement.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.requirement.hasValue(PART__OF) - && this.requirement.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.requirement.hasValue(PART_OF) + && this.requirement.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.requirement.hasValue(PART_OF_PLAN)) { throw new HqdmException("Property Not Set: part_of_plan"); @@ -246,9 +240,9 @@ public Requirement build() throws HqdmException { if (!this.requirement.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.requirement.hasValue(TEMPORAL__PART_OF) - && this.requirement.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.requirement.hasValue(TEMPORAL_PART_OF) + && this.requirement.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return requirement; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementSpecificationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementSpecificationBuilder.java index fe2ab0d5..5335b059 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementSpecificationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RequirementSpecificationBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTERSECTION_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -49,19 +47,18 @@ public RequirementSpecificationBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final RequirementSpecificationBuilder consists__Of_By_Class( + public final RequirementSpecificationBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.requirementSpecification.addValue(CONSISTS__OF_BY_CLASS, + this.requirementSpecification.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -80,8 +77,7 @@ public final RequirementSpecificationBuilder has_Superclass(final Class clazz) { /** * A subtype_of relationship type where each {@link RequirementSpecification} is the - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#INTERSECTION_OF} one or more - * {@link ClassOfState}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#INTERSECTION_OF} one or more {@link ClassOfState}. * * @param classOfState The ClassOfState. * @return This builder. @@ -98,8 +94,8 @@ public final RequirementSpecificationBuilder intersection_Of_M(final ClassOfStat * @param clazz The Class. * @return This builder. */ - public final RequirementSpecificationBuilder member__Of(final Class clazz) { - this.requirementSpecification.addValue(MEMBER__OF, clazz.getId()); + public final RequirementSpecificationBuilder member_Of(final Class clazz) { + this.requirementSpecification.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -124,26 +120,25 @@ public final RequirementSpecificationBuilder member_Of(final ClassOfClass classO * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final RequirementSpecificationBuilder member_Of_( + public final RequirementSpecificationBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.requirementSpecification.addValue(MEMBER_OF_, + this.requirementSpecification.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final RequirementSpecificationBuilder part__Of_By_Class( + public final RequirementSpecificationBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.requirementSpecification.addValue(PART__OF_BY_CLASS, + this.requirementSpecification.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -162,21 +157,13 @@ public RequirementSpecification build() throws HqdmException { if (!this.requirementSpecification.hasValue(INTERSECTION_OF)) { throw new HqdmException("Property Not Set: intersection_of"); } - if (this.requirementSpecification.hasValue(MEMBER__OF) - && this.requirementSpecification.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.requirementSpecification.hasValue(MEMBER_OF) && this.requirementSpecification.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.requirementSpecification.hasValue(MEMBER_OF_) - && this.requirementSpecification.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.requirementSpecification.hasValue(PART__OF_BY_CLASS) - && this.requirementSpecification.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.requirementSpecification.hasValue(PART_OF_BY_CLASS) + && this.requirementSpecification.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } return requirementSpecification; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RoleBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RoleBuilder.java index f7414ee3..8777f3d6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RoleBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/RoleBuilder.java @@ -14,14 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -51,19 +47,18 @@ public RoleBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final RoleBuilder consists__Of_By_Class( + public final RoleBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.role.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.role.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -86,8 +81,8 @@ public final RoleBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final RoleBuilder member__Of(final Class clazz) { - this.role.addValue(MEMBER__OF, clazz.getId()); + public final RoleBuilder member_Of(final Class clazz) { + this.role.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,25 +107,24 @@ public final RoleBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final RoleBuilder member_Of_( + public final RoleBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.role.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.role.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final RoleBuilder part__Of_By_Class( + public final RoleBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.role.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.role.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -157,8 +151,8 @@ public final RoleBuilder part_Of_By_Class(final KindOfActivity kindOfActivity) { * @param kindOfAssociation The KindOfAssociation. * @return This builder. */ - public final RoleBuilder part_Of_By_Class_(final KindOfAssociation kindOfAssociation) { - this.role.addValue(PART_OF_BY_CLASS_, kindOfAssociation.getId()); + public final RoleBuilder part_Of_By_Class(final KindOfAssociation kindOfAssociation) { + this.role.addValue(PART_OF_BY_CLASS, kindOfAssociation.getId()); return this; } @@ -173,30 +167,14 @@ public Role build() throws HqdmException { && this.role.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.role.hasValue(MEMBER__OF) - && this.role.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.role.hasValue(MEMBER_OF) && this.role.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.role.hasValue(MEMBER_OF_) - && this.role.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.role.hasValue(PART__OF_BY_CLASS) - && this.role.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); - } if (this.role.hasValue(PART_OF_BY_CLASS) && this.role.values(PART_OF_BY_CLASS).isEmpty()) { throw new HqdmException("Property Not Set: part_of_by_class"); } - if (this.role.hasValue(PART_OF_BY_CLASS_) - && this.role.values(PART_OF_BY_CLASS_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_by_class_"); - } return role; } } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SaleOfGoodsBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SaleOfGoodsBuilder.java index 3de1c93e..10217fdb 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SaleOfGoodsBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SaleOfGoodsBuilder.java @@ -20,19 +20,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AgreementExecution; @@ -50,6 +45,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -112,14 +108,14 @@ public final SaleOfGoodsBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SaleOfGoodsBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.saleOfGoods.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SaleOfGoodsBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.saleOfGoods.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -145,7 +141,7 @@ public final SaleOfGoodsBuilder consists_Of( * @param exchangeOfGoodsAndMoney The ExchangeOfGoodsAndMoney. * @return Builder */ - public final SaleOfGoodsBuilder consists_Of_(final ExchangeOfGoodsAndMoney exchangeOfGoodsAndMoney) { + public final SaleOfGoodsBuilder consists_Of(final ExchangeOfGoodsAndMoney exchangeOfGoodsAndMoney) { this.saleOfGoods.addValue(CONSISTS_OF_, exchangeOfGoodsAndMoney.getId()); return this; } @@ -193,15 +189,15 @@ public final SaleOfGoodsBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SaleOfGoodsBuilder member__Of(final Class clazz) { - this.saleOfGoods.addValue(MEMBER__OF, clazz.getId()); + public final SaleOfGoodsBuilder member_Of(final Class clazz) { + this.saleOfGoods.addValue(MEMBER_OF, clazz.getId()); return this; } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * contract process may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or - * more {@link ClassOfContractProcess}. + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a contract + * process may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more + * {@link ClassOfContractProcess}. * * @param classOfContractProcess The ClassOfContractProcess. * @return This builder. @@ -221,6 +217,7 @@ public final SaleOfGoodsBuilder member_Of(final ClassOfContractProcess classOfCo */ public final SaleOfGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.saleOfGoods.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.saleOfGoods.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -232,16 +229,15 @@ public final SaleOfGoodsBuilder member_Of_Kind_M(final KindOfActivity kindOfActi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SaleOfGoodsBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.saleOfGoods.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SaleOfGoodsBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.saleOfGoods.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link ReachingAgreement}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link ReachingAgreement}. * * @param reachingAgreement The ReachingAgreement. * @return This builder. @@ -254,26 +250,24 @@ public final SaleOfGoodsBuilder part_Of(final ReachingAgreement reachingAgreemen /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final SaleOfGoodsBuilder part_Of_(final AgreementExecution agreementExecution) { - this.saleOfGoods.addValue(PART_OF_, agreementExecution.getId()); + public final SaleOfGoodsBuilder part_Of(final AgreementExecution agreementExecution) { + this.saleOfGoods.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -304,24 +298,23 @@ public final SaleOfGoodsBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SaleOfGoodsBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.saleOfGoods.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SaleOfGoodsBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.saleOfGoods.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -358,10 +351,6 @@ public SaleOfGoods build() throws HqdmException { && this.saleOfGoods.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.saleOfGoods.hasValue(MEMBER__OF) - && this.saleOfGoods.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.saleOfGoods.hasValue(MEMBER_OF) && this.saleOfGoods.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -369,18 +358,10 @@ public SaleOfGoods build() throws HqdmException { if (!this.saleOfGoods.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.saleOfGoods.hasValue(PART__OF) - && this.saleOfGoods.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.saleOfGoods.hasValue(PART_OF) && this.saleOfGoods.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.saleOfGoods.hasValue(PART_OF_) - && this.saleOfGoods.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.saleOfGoods.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -388,10 +369,6 @@ public SaleOfGoods build() throws HqdmException { && this.saleOfGoods.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.saleOfGoods.hasValue(TEMPORAL__PART_OF) - && this.saleOfGoods.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.saleOfGoods.hasValue(TEMPORAL_PART_OF) && this.saleOfGoods.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductBuilder.java index 001db230..d9c4e62e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductBuilder.java @@ -14,13 +14,11 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEETS_SPECIFICATION; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.SOLD_UNDER; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -51,19 +49,18 @@ public SalesProductBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductBuilder consists__Of_By_Class( + public final SalesProductBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.salesProduct.addValue(CONSISTS__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.salesProduct.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -82,9 +79,8 @@ public final SalesProductBuilder has_Superclass(final Class clazz) { /** * A subclass_of relationship type where when a {@link SalesProduct} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEETS_SPECIFICATION} of a - * {@link RequirementSpecification}, each - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a {@link SalesProduct} is a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the + * {@link RequirementSpecification}, each {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * a {@link SalesProduct} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} the * {@link RequirementSpecification}. * * @param requirementSpecification The RequirementSpecification. @@ -103,8 +99,8 @@ public final SalesProductBuilder meets_Specification( * @param clazz The Class. * @return This builder. */ - public final SalesProductBuilder member__Of(final Class clazz) { - this.salesProduct.addValue(MEMBER__OF, clazz.getId()); + public final SalesProductBuilder member_Of(final Class clazz) { + this.salesProduct.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -129,25 +125,24 @@ public final SalesProductBuilder member_Of(final ClassOfClass classOfClass) { * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductBuilder member_Of_( + public final SalesProductBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.salesProduct.addValue(MEMBER_OF_, classOfClassOfSpatioTemporalExtent.getId()); + this.salesProduct.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductBuilder part__Of_By_Class( + public final SalesProductBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.salesProduct.addValue(PART__OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); + this.salesProduct.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -178,21 +173,13 @@ public SalesProduct build() throws HqdmException { && this.salesProduct.values(MEETS_SPECIFICATION).isEmpty()) { throw new HqdmException("Property Not Set: meets_specification"); } - if (this.salesProduct.hasValue(MEMBER__OF) - && this.salesProduct.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.salesProduct.hasValue(MEMBER_OF) && this.salesProduct.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.salesProduct.hasValue(MEMBER_OF_) - && this.salesProduct.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.salesProduct.hasValue(PART__OF_BY_CLASS) - && this.salesProduct.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.salesProduct.hasValue(PART_OF_BY_CLASS) + && this.salesProduct.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } if (this.salesProduct.hasValue(SOLD_UNDER) && this.salesProduct.values(SOLD_UNDER).isEmpty()) { diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductInstanceBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductInstanceBuilder.java index 5df8735b..c8f662a4 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductInstanceBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductInstanceBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.INTENDED_ROLE; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -37,6 +35,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SalesProductInstance; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -87,14 +86,14 @@ public final SalesProductInstanceBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SalesProductInstanceBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.salesProductInstance.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SalesProductInstanceBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.salesProductInstance.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -129,16 +128,15 @@ public final SalesProductInstanceBuilder intended_Role_M(final Role role) { * @param clazz The Class. * @return This builder. */ - public final SalesProductInstanceBuilder member__Of(final Class clazz) { - this.salesProductInstance.addValue(MEMBER__OF, clazz.getId()); + public final SalesProductInstanceBuilder member_Of(final Class clazz) { + this.salesProductInstance.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link SalesProductInstance} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfSalesProductInstance}. + * {@link SalesProductInstance} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfSalesProductInstance}. * * @param classOfSalesProductInstance The ClassOfSalesProductInstance. * @return This builder. @@ -160,8 +158,8 @@ public final SalesProductInstanceBuilder member_Of( */ public final SalesProductInstanceBuilder member_Of_Kind( final KindOfOrdinaryFunctionalObject kindOfOrdinaryFunctionalObject) { - this.salesProductInstance.addValue(MEMBER_OF_KIND, - kindOfOrdinaryFunctionalObject.getId()); + this.salesProductInstance.addValue(MEMBER_OF_KIND, kindOfOrdinaryFunctionalObject.getId()); + this.salesProductInstance.addValue(RDFS.RDF_TYPE, kindOfOrdinaryFunctionalObject.getId()); return this; } @@ -173,20 +171,19 @@ public final SalesProductInstanceBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SalesProductInstanceBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.salesProductInstance.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SalesProductInstanceBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.salesProductInstance.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -205,8 +202,8 @@ public final SalesProductInstanceBuilder part_Of_Possible_World_M(final Possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SalesProductInstanceBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.salesProductInstance.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SalesProductInstanceBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.salesProductInstance.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -246,10 +243,6 @@ public SalesProductInstance build() throws HqdmException { if (!this.salesProductInstance.hasValue(INTENDED_ROLE)) { throw new HqdmException("Property Not Set: intended_role"); } - if (this.salesProductInstance.hasValue(MEMBER__OF) - && this.salesProductInstance.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.salesProductInstance.hasValue(MEMBER_OF) && this.salesProductInstance.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -258,17 +251,13 @@ public SalesProductInstance build() throws HqdmException { && this.salesProductInstance.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.salesProductInstance.hasValue(PART__OF) - && this.salesProductInstance.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.salesProductInstance.hasValue(PART_OF) + && this.salesProductInstance.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.salesProductInstance.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.salesProductInstance.hasValue(TEMPORAL__PART_OF) - && this.salesProductInstance.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.salesProductInstance.hasValue(TEMPORAL_PART_OF) && this.salesProductInstance.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductVersionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductVersionBuilder.java index cb5ed468..304163d6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductVersionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SalesProductVersionBuilder.java @@ -14,12 +14,10 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HAS_SUPERCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF_BY_CLASS; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_BY_CLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.SOLD_AS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.SUCCESSOR; @@ -50,19 +48,18 @@ public SalesProductVersionBuilder(final IRI iri) { } /** - * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF_BY_CLASS} relationship - * type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * {@link ClassOfSpatioTemporalExtent} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} another - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a + * An inverse {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF_BY_CLASS} relationship type + * where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * {@link ClassOfSpatioTemporalExtent} {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF} + * another {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductVersionBuilder consists__Of_By_Class( + public final SalesProductVersionBuilder consists_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.salesProductVersion.addValue(CONSISTS__OF_BY_CLASS, + this.salesProductVersion.addValue(CONSISTS_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -86,8 +83,8 @@ public final SalesProductVersionBuilder has_Superclass(final Class clazz) { * @param clazz The Class. * @return This builder. */ - public final SalesProductVersionBuilder member__Of(final Class clazz) { - this.salesProductVersion.addValue(MEMBER__OF, clazz.getId()); + public final SalesProductVersionBuilder member_Of(final Class clazz) { + this.salesProductVersion.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -112,26 +109,25 @@ public final SalesProductVersionBuilder member_Of(final ClassOfClass classOfClas * @param classOfClassOfSpatioTemporalExtent The ClassOfClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductVersionBuilder member_Of_( + public final SalesProductVersionBuilder member_Of( final ClassOfClassOfSpatioTemporalExtent classOfClassOfSpatioTemporalExtent) { - this.salesProductVersion.addValue(MEMBER_OF_, + this.salesProductVersion.addValue(MEMBER_OF, classOfClassOfSpatioTemporalExtent.getId()); return this; } /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} a - * {@link ClassOfSpatioTemporalExtent} is - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a + * {@link ClassOfSpatioTemporalExtent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} a * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} some * {@link ClassOfSpatioTemporalExtent}. * * @param classOfSpatioTemporalExtent The ClassOfSpatioTemporalExtent. * @return This builder. */ - public final SalesProductVersionBuilder part__Of_By_Class( + public final SalesProductVersionBuilder part_Of_By_Class( final ClassOfSpatioTemporalExtent classOfSpatioTemporalExtent) { - this.salesProductVersion.addValue(PART__OF_BY_CLASS, + this.salesProductVersion.addValue(PART_OF_BY_CLASS, classOfSpatioTemporalExtent.getId()); return this; } @@ -170,21 +166,13 @@ public SalesProductVersion build() throws HqdmException { && this.salesProductVersion.values(HAS_SUPERCLASS).isEmpty()) { throw new HqdmException("Property Not Set: has_superclass"); } - if (this.salesProductVersion.hasValue(MEMBER__OF) - && this.salesProductVersion.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.salesProductVersion.hasValue(MEMBER_OF) && this.salesProductVersion.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.salesProductVersion.hasValue(MEMBER_OF_) - && this.salesProductVersion.values(MEMBER_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: member_of_"); - } - if (this.salesProductVersion.hasValue(PART__OF_BY_CLASS) - && this.salesProductVersion.values(PART__OF_BY_CLASS).isEmpty()) { - throw new HqdmException("Property Not Set: part__of_by_class"); + if (this.salesProductVersion.hasValue(PART_OF_BY_CLASS) + && this.salesProductVersion.values(PART_OF_BY_CLASS).isEmpty()) { + throw new HqdmException("Property Not Set: part_of_by_class"); } if (this.salesProductVersion.hasValue(SOLD_AS) && this.salesProductVersion.values(SOLD_AS).isEmpty()) { diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ScaleBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ScaleBuilder.java index e54361f5..d4a2585b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ScaleBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ScaleBuilder.java @@ -16,7 +16,6 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DOMAIN; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.UNIT; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -62,8 +61,8 @@ public final ScaleBuilder domain_M(final KindOfPhysicalQuantity kindOfPhysicalQu * @param clazz The Class. * @return This builder. */ - public final ScaleBuilder member__Of(final Class clazz) { - this.scale.addValue(MEMBER__OF, clazz.getId()); + public final ScaleBuilder member_Of(final Class clazz) { + this.scale.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -113,10 +112,6 @@ public Scale build() throws HqdmException { if (!this.scale.hasValue(DOMAIN)) { throw new HqdmException("Property Not Set: domain"); } - if (this.scale.hasValue(MEMBER__OF) - && this.scale.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.scale.hasValue(MEMBER_OF) && this.scale.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SignBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SignBuilder.java index 9e60c1e6..ae3ac00b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SignBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SignBuilder.java @@ -16,17 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -40,6 +37,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Sign; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -90,14 +88,14 @@ public final SignBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SignBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sign.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SignBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sign.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -120,8 +118,8 @@ public final SignBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SignBuilder member__Of(final Class clazz) { - this.sign.addValue(MEMBER__OF, clazz.getId()); + public final SignBuilder member_Of(final Class clazz) { + this.sign.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -146,8 +144,8 @@ public final SignBuilder member_Of(final ClassOfSign classOfSign) { * @param pattern The Pattern. * @return This builder. */ - public final SignBuilder member_Of__M(final Pattern pattern) { - this.sign.addValue(MEMBER_OF_, pattern.getId()); + public final SignBuilder member_Of_M(final Pattern pattern) { + this.sign.addValue(MEMBER_OF, pattern.getId()); return this; } @@ -163,6 +161,7 @@ public final SignBuilder member_Of__M(final Pattern pattern) { public final SignBuilder member_Of_Kind( final KindOfSociallyConstructedObject kindOfSociallyConstructedObject) { this.sign.addValue(MEMBER_OF_KIND, kindOfSociallyConstructedObject.getId()); + this.sign.addValue(RDFS.RDF_TYPE, kindOfSociallyConstructedObject.getId()); return this; } @@ -174,20 +173,19 @@ public final SignBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SignBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sign.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SignBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sign.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -219,24 +217,23 @@ public final SignBuilder participant_In_M(final RepresentationBySign representat * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SignBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sign.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SignBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sign.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -266,24 +263,17 @@ public Sign build() throws HqdmException { && this.sign.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.sign.hasValue(MEMBER__OF) - && this.sign.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.sign.hasValue(MEMBER_OF) && this.sign.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (!this.sign.hasValue(MEMBER_OF_)) { - throw new HqdmException("Property Not Set: member_of_"); - } if (this.sign.hasValue(MEMBER_OF_KIND) && this.sign.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.sign.hasValue(PART__OF) - && this.sign.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.sign.hasValue(PART_OF) + && this.sign.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.sign.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -291,10 +281,6 @@ public Sign build() throws HqdmException { if (!this.sign.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.sign.hasValue(TEMPORAL__PART_OF) - && this.sign.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.sign.hasValue(TEMPORAL_PART_OF) && this.sign.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedActivityBuilder.java index d4700a55..5860a712 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedActivityBuilder.java @@ -19,19 +19,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -48,6 +43,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -110,14 +106,14 @@ public final SociallyConstructedActivityBuilder causes_M(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedActivityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedActivity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SociallyConstructedActivityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedActivity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -177,8 +173,8 @@ public final SociallyConstructedActivityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SociallyConstructedActivityBuilder member__Of(final Class clazz) { - this.sociallyConstructedActivity.addValue(MEMBER__OF, clazz.getId()); + public final SociallyConstructedActivityBuilder member_Of(final Class clazz) { + this.sociallyConstructedActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -208,6 +204,7 @@ public final SociallyConstructedActivityBuilder member_Of( */ public final SociallyConstructedActivityBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.sociallyConstructedActivity.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.sociallyConstructedActivity.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -219,16 +216,15 @@ public final SociallyConstructedActivityBuilder member_Of_Kind_M(final KindOfAct * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedActivityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedActivity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SociallyConstructedActivityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedActivity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link SociallyConstructedActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link ReachingAgreement}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link ReachingAgreement}. * * @param reachingAgreement The ReachingAgreement. * @return This builder. @@ -241,26 +237,24 @@ public final SociallyConstructedActivityBuilder part_Of(final ReachingAgreement /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final SociallyConstructedActivityBuilder part_Of_(final AgreementExecution agreementExecution) { - this.sociallyConstructedActivity.addValue(PART_OF_, agreementExecution.getId()); + public final SociallyConstructedActivityBuilder part_Of(final AgreementExecution agreementExecution) { + this.sociallyConstructedActivity.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -291,8 +285,8 @@ public final SociallyConstructedActivityBuilder references(final Thing thing) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedActivityBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedActivity.addValue(TEMPORAL__PART_OF, + public final SociallyConstructedActivityBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedActivity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -300,16 +294,15 @@ public final SociallyConstructedActivityBuilder temporal__Part_Of(final SpatioTe /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -347,10 +340,6 @@ public SociallyConstructedActivity build() throws HqdmException { && this.sociallyConstructedActivity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.sociallyConstructedActivity.hasValue(MEMBER__OF) - && this.sociallyConstructedActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.sociallyConstructedActivity.hasValue(MEMBER_OF) && this.sociallyConstructedActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -358,18 +347,10 @@ public SociallyConstructedActivity build() throws HqdmException { if (!this.sociallyConstructedActivity.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.sociallyConstructedActivity.hasValue(PART__OF) - && this.sociallyConstructedActivity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.sociallyConstructedActivity.hasValue(PART_OF) && this.sociallyConstructedActivity.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.sociallyConstructedActivity.hasValue(PART_OF_) - && this.sociallyConstructedActivity.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.sociallyConstructedActivity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } @@ -377,10 +358,6 @@ public SociallyConstructedActivity build() throws HqdmException { && this.sociallyConstructedActivity.values(REFERENCES).isEmpty()) { throw new HqdmException("Property Not Set: references"); } - if (this.sociallyConstructedActivity.hasValue(TEMPORAL__PART_OF) - && this.sociallyConstructedActivity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.sociallyConstructedActivity.hasValue(TEMPORAL_PART_OF) && this.sociallyConstructedActivity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedObjectBuilder.java index c5f2ccf7..255a44b8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SociallyConstructedObjectBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -36,6 +34,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject; import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -86,14 +85,14 @@ public final SociallyConstructedObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SociallyConstructedObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -116,8 +115,8 @@ public final SociallyConstructedObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SociallyConstructedObjectBuilder member__Of(final Class clazz) { - this.sociallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final SociallyConstructedObjectBuilder member_Of(final Class clazz) { + this.sociallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,8 +147,8 @@ public final SociallyConstructedObjectBuilder member_Of( */ public final SociallyConstructedObjectBuilder member_Of_Kind( final KindOfSociallyConstructedObject kindOfSociallyConstructedObject) { - this.sociallyConstructedObject.addValue(MEMBER_OF_KIND, - kindOfSociallyConstructedObject.getId()); + this.sociallyConstructedObject.addValue(MEMBER_OF_KIND, kindOfSociallyConstructedObject.getId()); + this.sociallyConstructedObject.addValue(RDFS.RDF_TYPE, kindOfSociallyConstructedObject.getId()); return this; } @@ -161,20 +160,19 @@ public final SociallyConstructedObjectBuilder member_Of_Kind( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SociallyConstructedObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -193,8 +191,8 @@ public final SociallyConstructedObjectBuilder part_Of_Possible_World_M(final Pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SociallyConstructedObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.sociallyConstructedObject.addValue(TEMPORAL__PART_OF, + public final SociallyConstructedObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.sociallyConstructedObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -202,16 +200,15 @@ public final SociallyConstructedObjectBuilder temporal__Part_Of(final SpatioTemp /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -241,10 +238,6 @@ public SociallyConstructedObject build() throws HqdmException { && this.sociallyConstructedObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.sociallyConstructedObject.hasValue(MEMBER__OF) - && this.sociallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.sociallyConstructedObject.hasValue(MEMBER_OF) && this.sociallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -253,17 +246,13 @@ public SociallyConstructedObject build() throws HqdmException { && this.sociallyConstructedObject.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.sociallyConstructedObject.hasValue(PART__OF) - && this.sociallyConstructedObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.sociallyConstructedObject.hasValue(PART_OF) + && this.sociallyConstructedObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.sociallyConstructedObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.sociallyConstructedObject.hasValue(TEMPORAL__PART_OF) - && this.sociallyConstructedObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.sociallyConstructedObject.hasValue(TEMPORAL_PART_OF) && this.sociallyConstructedObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpatioTemporalExtentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpatioTemporalExtentBuilder.java index 85dfe5c7..ac3191db 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpatioTemporalExtentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpatioTemporalExtentBuilder.java @@ -16,13 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -79,8 +78,8 @@ public final SpatioTemporalExtentBuilder beginning(final Event event) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SpatioTemporalExtentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.spatioTemporalExtent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SpatioTemporalExtentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.spatioTemporalExtent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -103,8 +102,8 @@ public final SpatioTemporalExtentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SpatioTemporalExtentBuilder member__Of(final Class clazz) { - this.spatioTemporalExtent.addValue(MEMBER__OF, clazz.getId()); + public final SpatioTemporalExtentBuilder member_Of(final Class clazz) { + this.spatioTemporalExtent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -130,15 +129,15 @@ public final SpatioTemporalExtentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SpatioTemporalExtentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.spatioTemporalExtent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SpatioTemporalExtentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.spatioTemporalExtent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * * @param possibleWorld The PossibleWorld. * @return This builder. @@ -156,8 +155,8 @@ public final SpatioTemporalExtentBuilder part_Of_Possible_World_M(final Possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SpatioTemporalExtentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.spatioTemporalExtent.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SpatioTemporalExtentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.spatioTemporalExtent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -180,24 +179,20 @@ public SpatioTemporalExtent build() throws HqdmException { && this.spatioTemporalExtent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.spatioTemporalExtent.hasValue(MEMBER__OF) - && this.spatioTemporalExtent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.spatioTemporalExtent.hasValue(MEMBER_OF) && this.spatioTemporalExtent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.spatioTemporalExtent.hasValue(PART__OF) - && this.spatioTemporalExtent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.spatioTemporalExtent.hasValue(PART_OF) + && this.spatioTemporalExtent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.spatioTemporalExtent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.spatioTemporalExtent.hasValue(TEMPORAL__PART_OF) - && this.spatioTemporalExtent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); + if (this.spatioTemporalExtent.hasValue(TEMPORAL_PART_OF) + && this.spatioTemporalExtent.values(TEMPORAL_PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: temporal_part_of"); } return spatioTemporalExtent; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpecializationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpecializationBuilder.java index fe940d8e..21ff8b59 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpecializationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SpecializationBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.SUBCLASS; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.SUPERCLASS; @@ -49,8 +48,8 @@ public SpecializationBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final SpecializationBuilder member__Of(final Class clazz) { - this.specialization.addValue(MEMBER__OF, clazz.getId()); + public final SpecializationBuilder member_Of(final Class clazz) { + this.specialization.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -97,10 +96,6 @@ public final SpecializationBuilder superclass_M(final Class clazz) { * @throws HqdmException If the Specialization is missing any mandatory properties. */ public Specialization build() throws HqdmException { - if (this.specialization.hasValue(MEMBER__OF) - && this.specialization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.specialization.hasValue(MEMBER_OF) && this.specialization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateBuilder.java index de22c8c6..d9dc218a 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.state.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.state.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateBuilder member__Of(final Class clazz) { - this.state.addValue(MEMBER__OF, clazz.getId()); + public final StateBuilder member_Of(final Class clazz) { + this.state.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -140,20 +138,19 @@ public final StateBuilder member_Of(final ClassOfState classOfState) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.state.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.state.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,20 +169,20 @@ public final StateBuilder part_Of_Possible_World_M(final PossibleWorld possibleW * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.state.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.state.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link State} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one - * or more {@link Individual}. + * {@link State} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or + * more {@link Individual}. * *

* Note: The relationship is optional because an {@link Individual} is not necessarily a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} another {@link Individual}, - * yet is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} {@link State} as well as + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} another {@link Individual}, yet + * is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} {@link State} as well as * {@link Individual}. This applies to all subtypes of * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} that are between a * {@code state_of_X} and {@code X}. @@ -218,25 +215,17 @@ public State build() throws HqdmException { && this.state.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.state.hasValue(MEMBER__OF) - && this.state.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.state.hasValue(MEMBER_OF) && this.state.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.state.hasValue(PART__OF) - && this.state.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.state.hasValue(PART_OF) + && this.state.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.state.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.state.hasValue(TEMPORAL__PART_OF) - && this.state.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.state.hasValue(TEMPORAL_PART_OF) && this.state.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfActivityBuilder.java index 11ac849f..ad98ed12 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfActivityBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -84,14 +82,14 @@ public final StateOfActivityBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfActivityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfActivity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfActivityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfActivity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfActivityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfActivityBuilder member__Of(final Class clazz) { - this.stateOfActivity.addValue(MEMBER__OF, clazz.getId()); + public final StateOfActivityBuilder member_Of(final Class clazz) { + this.stateOfActivity.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfActivity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfStateOfActivity}. + * {@link StateOfActivity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfStateOfActivity}. * * @param classOfStateOfActivity The ClassOfStateOfActivity. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfActivityBuilder member_Of(final ClassOfStateOfActivity class * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfActivityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfActivity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfActivityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfActivity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,16 +169,15 @@ public final StateOfActivityBuilder part_Of_Possible_World_M(final PossibleWorld * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfActivityBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfActivity.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfActivityBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfActivity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfActivity} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Activity}. + * {@link StateOfActivity} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link Activity}. * * @param activity The Activity. * @return This builder. @@ -210,25 +206,17 @@ public StateOfActivity build() throws HqdmException { && this.stateOfActivity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfActivity.hasValue(MEMBER__OF) - && this.stateOfActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfActivity.hasValue(MEMBER_OF) && this.stateOfActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfActivity.hasValue(PART__OF) - && this.stateOfActivity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfActivity.hasValue(PART_OF) + && this.stateOfActivity.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfActivity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfActivity.hasValue(TEMPORAL__PART_OF) - && this.stateOfActivity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfActivity.hasValue(TEMPORAL_PART_OF) && this.stateOfActivity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAmountOfMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAmountOfMoneyBuilder.java index 49de801e..9702938c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAmountOfMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAmountOfMoneyBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.AmountOfMoney; @@ -84,14 +82,14 @@ public final StateOfAmountOfMoneyBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAmountOfMoneyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAmountOfMoney.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfAmountOfMoneyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAmountOfMoney.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,16 +112,15 @@ public final StateOfAmountOfMoneyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfAmountOfMoneyBuilder member__Of(final Class clazz) { - this.stateOfAmountOfMoney.addValue(MEMBER__OF, clazz.getId()); + public final StateOfAmountOfMoneyBuilder member_Of(final Class clazz) { + this.stateOfAmountOfMoney.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfAmountOfMoney} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfStateOfAmountOfMoney}. + * {@link StateOfAmountOfMoney} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfStateOfAmountOfMoney}. * * @param classOfStateOfAmountOfMoney The ClassOfStateOfAmountOfMoney. * @return This builder. @@ -142,20 +139,19 @@ public final StateOfAmountOfMoneyBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAmountOfMoneyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAmountOfMoney.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfAmountOfMoneyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAmountOfMoney.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -174,8 +170,8 @@ public final StateOfAmountOfMoneyBuilder part_Of_Possible_World_M(final Possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAmountOfMoneyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAmountOfMoney.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfAmountOfMoneyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAmountOfMoney.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -212,25 +208,17 @@ public StateOfAmountOfMoney build() throws HqdmException { && this.stateOfAmountOfMoney.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfAmountOfMoney.hasValue(MEMBER__OF) - && this.stateOfAmountOfMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfAmountOfMoney.hasValue(MEMBER_OF) && this.stateOfAmountOfMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfAmountOfMoney.hasValue(PART__OF) - && this.stateOfAmountOfMoney.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfAmountOfMoney.hasValue(PART_OF) + && this.stateOfAmountOfMoney.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfAmountOfMoney.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfAmountOfMoney.hasValue(TEMPORAL__PART_OF) - && this.stateOfAmountOfMoney.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfAmountOfMoney.hasValue(TEMPORAL_PART_OF) && this.stateOfAmountOfMoney.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAssociationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAssociationBuilder.java index f6646d79..e827e7c6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAssociationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfAssociationBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Association; @@ -84,14 +82,14 @@ public final StateOfAssociationBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAssociationBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAssociation.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfAssociationBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAssociation.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfAssociationBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfAssociationBuilder member__Of(final Class clazz) { - this.stateOfAssociation.addValue(MEMBER__OF, clazz.getId()); + public final StateOfAssociationBuilder member_Of(final Class clazz) { + this.stateOfAssociation.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfAssociation} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfStateOfAssociation}. + * {@link StateOfAssociation} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one + * or more {@link ClassOfStateOfAssociation}. * * @param classOfStateOfAssociation The ClassOfStateOfAssociation. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfAssociationBuilder member_Of(final ClassOfStateOfAssociation * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAssociationBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAssociation.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfAssociationBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAssociation.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,16 +169,15 @@ public final StateOfAssociationBuilder part_Of_Possible_World_M(final PossibleWo * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfAssociationBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfAssociation.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfAssociationBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfAssociation.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link StateOfAssociation} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Association}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Association}. * * @param association The Association. * @return This builder. @@ -210,25 +206,17 @@ public StateOfAssociation build() throws HqdmException { && this.stateOfAssociation.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfAssociation.hasValue(MEMBER__OF) - && this.stateOfAssociation.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfAssociation.hasValue(MEMBER_OF) && this.stateOfAssociation.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfAssociation.hasValue(PART__OF) - && this.stateOfAssociation.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfAssociation.hasValue(PART_OF) + && this.stateOfAssociation.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfAssociation.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfAssociation.hasValue(TEMPORAL__PART_OF) - && this.stateOfAssociation.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfAssociation.hasValue(TEMPORAL_PART_OF) && this.stateOfAssociation.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalObjectBuilder.java index 7dc1b7dd..5ee06a16 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalObject; @@ -84,14 +82,14 @@ public final StateOfBiologicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfBiologicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfBiologicalObjectBuilder member__Of(final Class clazz) { - this.stateOfBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfBiologicalObjectBuilder member_Of(final Class clazz) { + this.stateOfBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,20 +141,19 @@ public final StateOfBiologicalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -175,8 +172,8 @@ public final StateOfBiologicalObjectBuilder part_Of_Possible_World_M(final Possi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -213,25 +210,17 @@ public StateOfBiologicalObject build() throws HqdmException { && this.stateOfBiologicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfBiologicalObject.hasValue(MEMBER__OF) - && this.stateOfBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfBiologicalObject.hasValue(MEMBER_OF) && this.stateOfBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfBiologicalObject.hasValue(PART__OF) - && this.stateOfBiologicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfBiologicalObject.hasValue(PART_OF) + && this.stateOfBiologicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfBiologicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfBiologicalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfBiologicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfBiologicalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfBiologicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemBuilder.java index 60e966e7..fa49218b 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystem; @@ -84,14 +82,14 @@ public final StateOfBiologicalSystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystem.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalSystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalSystem.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfBiologicalSystemBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfBiologicalSystemBuilder member__Of(final Class clazz) { - this.stateOfBiologicalSystem.addValue(MEMBER__OF, clazz.getId()); + public final StateOfBiologicalSystemBuilder member_Of(final Class clazz) { + this.stateOfBiologicalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,20 +141,19 @@ public final StateOfBiologicalSystemBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystem.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalSystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalSystem.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -175,8 +172,8 @@ public final StateOfBiologicalSystemBuilder part_Of_Possible_World_M(final Possi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystem.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalSystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalSystem.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -213,25 +210,17 @@ public StateOfBiologicalSystem build() throws HqdmException { && this.stateOfBiologicalSystem.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfBiologicalSystem.hasValue(MEMBER__OF) - && this.stateOfBiologicalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfBiologicalSystem.hasValue(MEMBER_OF) && this.stateOfBiologicalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfBiologicalSystem.hasValue(PART__OF) - && this.stateOfBiologicalSystem.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfBiologicalSystem.hasValue(PART_OF) + && this.stateOfBiologicalSystem.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfBiologicalSystem.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfBiologicalSystem.hasValue(TEMPORAL__PART_OF) - && this.stateOfBiologicalSystem.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfBiologicalSystem.hasValue(TEMPORAL_PART_OF) && this.stateOfBiologicalSystem.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemComponentBuilder.java index 00f9ef1f..74fd4005 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfBiologicalSystemComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.BiologicalSystemComponent; @@ -87,14 +85,14 @@ public final StateOfBiologicalSystemComponentBuilder beginning(final Event event * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystemComponent.addValue(CONSISTS__OF, + public final StateOfBiologicalSystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +116,8 @@ public final StateOfBiologicalSystemComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfBiologicalSystemComponentBuilder member__Of(final Class clazz) { - this.stateOfBiologicalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final StateOfBiologicalSystemComponentBuilder member_Of(final Class clazz) { + this.stateOfBiologicalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,20 +146,19 @@ public final StateOfBiologicalSystemComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfBiologicalSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfBiologicalSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -181,9 +178,9 @@ public final StateOfBiologicalSystemComponentBuilder part_Of_Possible_World_M(fi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfBiologicalSystemComponentBuilder temporal__Part_Of( + public final StateOfBiologicalSystemComponentBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfBiologicalSystemComponent.addValue(TEMPORAL__PART_OF, + this.stateOfBiologicalSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -225,25 +222,17 @@ public StateOfBiologicalSystemComponent build() throws HqdmException { && this.stateOfBiologicalSystemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfBiologicalSystemComponent.hasValue(MEMBER__OF) - && this.stateOfBiologicalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfBiologicalSystemComponent.hasValue(MEMBER_OF) && this.stateOfBiologicalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfBiologicalSystemComponent.hasValue(PART__OF) - && this.stateOfBiologicalSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfBiologicalSystemComponent.hasValue(PART_OF) + && this.stateOfBiologicalSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfBiologicalSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfBiologicalSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.stateOfBiologicalSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfBiologicalSystemComponent.hasValue(TEMPORAL_PART_OF) && this.stateOfBiologicalSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalObjectBuilder.java index d290a853..70b84b29 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfFunctionalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfFunctionalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfFunctionalObjectBuilder member__Of(final Class clazz) { - this.stateOfFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfFunctionalObjectBuilder member_Of(final Class clazz) { + this.stateOfFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,20 +141,19 @@ public final StateOfFunctionalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -175,8 +172,8 @@ public final StateOfFunctionalObjectBuilder part_Of_Possible_World_M(final Possi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -213,25 +210,17 @@ public StateOfFunctionalObject build() throws HqdmException { && this.stateOfFunctionalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfFunctionalObject.hasValue(MEMBER__OF) - && this.stateOfFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfFunctionalObject.hasValue(MEMBER_OF) && this.stateOfFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfFunctionalObject.hasValue(PART__OF) - && this.stateOfFunctionalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfFunctionalObject.hasValue(PART_OF) + && this.stateOfFunctionalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfFunctionalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfFunctionalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfFunctionalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfFunctionalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfFunctionalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemBuilder.java index fd4f7c8a..1d0fb413 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfFunctionalSystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystem.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalSystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalSystem.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfFunctionalSystemBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfFunctionalSystemBuilder member__Of(final Class clazz) { - this.stateOfFunctionalSystem.addValue(MEMBER__OF, clazz.getId()); + public final StateOfFunctionalSystemBuilder member_Of(final Class clazz) { + this.stateOfFunctionalSystem.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,20 +141,19 @@ public final StateOfFunctionalSystemBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystem.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalSystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalSystem.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -175,8 +172,8 @@ public final StateOfFunctionalSystemBuilder part_Of_Possible_World_M(final Possi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystem.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalSystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalSystem.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -213,25 +210,17 @@ public StateOfFunctionalSystem build() throws HqdmException { && this.stateOfFunctionalSystem.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfFunctionalSystem.hasValue(MEMBER__OF) - && this.stateOfFunctionalSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfFunctionalSystem.hasValue(MEMBER_OF) && this.stateOfFunctionalSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfFunctionalSystem.hasValue(PART__OF) - && this.stateOfFunctionalSystem.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfFunctionalSystem.hasValue(PART_OF) + && this.stateOfFunctionalSystem.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfFunctionalSystem.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfFunctionalSystem.hasValue(TEMPORAL__PART_OF) - && this.stateOfFunctionalSystem.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfFunctionalSystem.hasValue(TEMPORAL_PART_OF) && this.stateOfFunctionalSystem.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemComponentBuilder.java index 28654ef5..13db0e6f 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfFunctionalSystemComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,14 +85,14 @@ public final StateOfFunctionalSystemComponentBuilder beginning(final Event event * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystemComponent.addValue(CONSISTS__OF, + public final StateOfFunctionalSystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +116,8 @@ public final StateOfFunctionalSystemComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfFunctionalSystemComponentBuilder member__Of(final Class clazz) { - this.stateOfFunctionalSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final StateOfFunctionalSystemComponentBuilder member_Of(final Class clazz) { + this.stateOfFunctionalSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,20 +146,19 @@ public final StateOfFunctionalSystemComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfFunctionalSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfFunctionalSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -181,9 +178,9 @@ public final StateOfFunctionalSystemComponentBuilder part_Of_Possible_World_M(fi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfFunctionalSystemComponentBuilder temporal__Part_Of( + public final StateOfFunctionalSystemComponentBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfFunctionalSystemComponent.addValue(TEMPORAL__PART_OF, + this.stateOfFunctionalSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -225,25 +222,17 @@ public StateOfFunctionalSystemComponent build() throws HqdmException { && this.stateOfFunctionalSystemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfFunctionalSystemComponent.hasValue(MEMBER__OF) - && this.stateOfFunctionalSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfFunctionalSystemComponent.hasValue(MEMBER_OF) && this.stateOfFunctionalSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfFunctionalSystemComponent.hasValue(PART__OF) - && this.stateOfFunctionalSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfFunctionalSystemComponent.hasValue(PART_OF) + && this.stateOfFunctionalSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfFunctionalSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfFunctionalSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.stateOfFunctionalSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfFunctionalSystemComponent.hasValue(TEMPORAL_PART_OF) && this.stateOfFunctionalSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfIntentionallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfIntentionallyConstructedObjectBuilder.java index c9442a1d..824180eb 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfIntentionallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfIntentionallyConstructedObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -88,15 +86,15 @@ public final StateOfIntentionallyConstructedObjectBuilder beginning(final Event * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfIntentionallyConstructedObjectBuilder consists__Of( + public final StateOfIntentionallyConstructedObjectBuilder consists_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfIntentionallyConstructedObject.addValue(CONSISTS__OF, + this.stateOfIntentionallyConstructedObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -120,8 +118,8 @@ public final StateOfIntentionallyConstructedObjectBuilder ending(final Event eve * @param clazz The Class. * @return This builder. */ - public final StateOfIntentionallyConstructedObjectBuilder member__Of(final Class clazz) { - this.stateOfIntentionallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfIntentionallyConstructedObjectBuilder member_Of(final Class clazz) { + this.stateOfIntentionallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -150,22 +148,21 @@ public final StateOfIntentionallyConstructedObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfIntentionallyConstructedObjectBuilder part__Of( + public final StateOfIntentionallyConstructedObjectBuilder part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfIntentionallyConstructedObject.addValue(PART__OF, + this.stateOfIntentionallyConstructedObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,9 +183,9 @@ public final StateOfIntentionallyConstructedObjectBuilder part_Of_Possible_World * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfIntentionallyConstructedObjectBuilder temporal__Part_Of( + public final StateOfIntentionallyConstructedObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfIntentionallyConstructedObject.addValue(TEMPORAL__PART_OF, + this.stateOfIntentionallyConstructedObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -230,26 +227,17 @@ public StateOfIntentionallyConstructedObject build() throws HqdmException { && this.stateOfIntentionallyConstructedObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfIntentionallyConstructedObject.hasValue(MEMBER__OF) - && this.stateOfIntentionallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfIntentionallyConstructedObject.hasValue(MEMBER_OF) && this.stateOfIntentionallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfIntentionallyConstructedObject.hasValue(PART__OF) - && this.stateOfIntentionallyConstructedObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfIntentionallyConstructedObject.hasValue(PART_OF) + && this.stateOfIntentionallyConstructedObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfIntentionallyConstructedObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfIntentionallyConstructedObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfIntentionallyConstructedObject.values(TEMPORAL__PART_OF) - .isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfIntentionallyConstructedObject.hasValue(TEMPORAL_PART_OF) && this.stateOfIntentionallyConstructedObject.values(TEMPORAL_PART_OF) .isEmpty()) { diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfLanguageCommunityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfLanguageCommunityBuilder.java index 84850664..e4b178bf 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfLanguageCommunityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfLanguageCommunityBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfLanguageCommunityBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfLanguageCommunityBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfLanguageCommunity.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfLanguageCommunityBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfLanguageCommunity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfLanguageCommunityBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfLanguageCommunityBuilder member__Of(final Class clazz) { - this.stateOfLanguageCommunity.addValue(MEMBER__OF, clazz.getId()); + public final StateOfLanguageCommunityBuilder member_Of(final Class clazz) { + this.stateOfLanguageCommunity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -142,20 +140,19 @@ public final StateOfLanguageCommunityBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfLanguageCommunityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfLanguageCommunity.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfLanguageCommunityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfLanguageCommunity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -174,8 +171,8 @@ public final StateOfLanguageCommunityBuilder part_Of_Possible_World_M(final Poss * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfLanguageCommunityBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfLanguageCommunity.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfLanguageCommunityBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfLanguageCommunity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -212,25 +209,17 @@ public StateOfLanguageCommunity build() throws HqdmException { && this.stateOfLanguageCommunity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfLanguageCommunity.hasValue(MEMBER__OF) - && this.stateOfLanguageCommunity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfLanguageCommunity.hasValue(MEMBER_OF) && this.stateOfLanguageCommunity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfLanguageCommunity.hasValue(PART__OF) - && this.stateOfLanguageCommunity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfLanguageCommunity.hasValue(PART_OF) + && this.stateOfLanguageCommunity.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfLanguageCommunity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfLanguageCommunity.hasValue(TEMPORAL__PART_OF) - && this.stateOfLanguageCommunity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfLanguageCommunity.hasValue(TEMPORAL_PART_OF) && this.stateOfLanguageCommunity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryBiologicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryBiologicalObjectBuilder.java index c5cb9c1f..7f0f1268 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryBiologicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryBiologicalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,14 +85,14 @@ public final StateOfOrdinaryBiologicalObjectBuilder beginning(final Event event) * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryBiologicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryBiologicalObject.addValue(CONSISTS__OF, + public final StateOfOrdinaryBiologicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryBiologicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +116,8 @@ public final StateOfOrdinaryBiologicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfOrdinaryBiologicalObjectBuilder member__Of(final Class clazz) { - this.stateOfOrdinaryBiologicalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfOrdinaryBiologicalObjectBuilder member_Of(final Class clazz) { + this.stateOfOrdinaryBiologicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,20 +146,19 @@ public final StateOfOrdinaryBiologicalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryBiologicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryBiologicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfOrdinaryBiologicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryBiologicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -181,9 +178,9 @@ public final StateOfOrdinaryBiologicalObjectBuilder part_Of_Possible_World_M(fin * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryBiologicalObjectBuilder temporal__Part_Of( + public final StateOfOrdinaryBiologicalObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryBiologicalObject.addValue(TEMPORAL__PART_OF, + this.stateOfOrdinaryBiologicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -224,25 +221,17 @@ public StateOfOrdinaryBiologicalObject build() throws HqdmException { && this.stateOfOrdinaryBiologicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfOrdinaryBiologicalObject.hasValue(MEMBER__OF) - && this.stateOfOrdinaryBiologicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfOrdinaryBiologicalObject.hasValue(MEMBER_OF) && this.stateOfOrdinaryBiologicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfOrdinaryBiologicalObject.hasValue(PART__OF) - && this.stateOfOrdinaryBiologicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfOrdinaryBiologicalObject.hasValue(PART_OF) + && this.stateOfOrdinaryBiologicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfOrdinaryBiologicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfOrdinaryBiologicalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfOrdinaryBiologicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfOrdinaryBiologicalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfOrdinaryBiologicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryFunctionalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryFunctionalObjectBuilder.java index 9cb502b4..f7907be4 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryFunctionalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryFunctionalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,14 +85,14 @@ public final StateOfOrdinaryFunctionalObjectBuilder beginning(final Event event) * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryFunctionalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryFunctionalObject.addValue(CONSISTS__OF, + public final StateOfOrdinaryFunctionalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryFunctionalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +116,8 @@ public final StateOfOrdinaryFunctionalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfOrdinaryFunctionalObjectBuilder member__Of(final Class clazz) { - this.stateOfOrdinaryFunctionalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfOrdinaryFunctionalObjectBuilder member_Of(final Class clazz) { + this.stateOfOrdinaryFunctionalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,20 +146,19 @@ public final StateOfOrdinaryFunctionalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryFunctionalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryFunctionalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfOrdinaryFunctionalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryFunctionalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -181,9 +178,9 @@ public final StateOfOrdinaryFunctionalObjectBuilder part_Of_Possible_World_M(fin * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryFunctionalObjectBuilder temporal__Part_Of( + public final StateOfOrdinaryFunctionalObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryFunctionalObject.addValue(TEMPORAL__PART_OF, + this.stateOfOrdinaryFunctionalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -223,25 +220,17 @@ public StateOfOrdinaryFunctionalObject build() throws HqdmException { && this.stateOfOrdinaryFunctionalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfOrdinaryFunctionalObject.hasValue(MEMBER__OF) - && this.stateOfOrdinaryFunctionalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfOrdinaryFunctionalObject.hasValue(MEMBER_OF) && this.stateOfOrdinaryFunctionalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfOrdinaryFunctionalObject.hasValue(PART__OF) - && this.stateOfOrdinaryFunctionalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfOrdinaryFunctionalObject.hasValue(PART_OF) + && this.stateOfOrdinaryFunctionalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfOrdinaryFunctionalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfOrdinaryFunctionalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfOrdinaryFunctionalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfOrdinaryFunctionalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfOrdinaryFunctionalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryPhysicalObjectBuilder.java index 04b0afa1..3627f044 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrdinaryPhysicalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -86,14 +84,14 @@ public final StateOfOrdinaryPhysicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryPhysicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryPhysicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfOrdinaryPhysicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryPhysicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -116,8 +114,8 @@ public final StateOfOrdinaryPhysicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfOrdinaryPhysicalObjectBuilder member__Of(final Class clazz) { - this.stateOfOrdinaryPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfOrdinaryPhysicalObjectBuilder member_Of(final Class clazz) { + this.stateOfOrdinaryPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -145,20 +143,19 @@ public final StateOfOrdinaryPhysicalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryPhysicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryPhysicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfOrdinaryPhysicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrdinaryPhysicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -178,9 +175,9 @@ public final StateOfOrdinaryPhysicalObjectBuilder part_Of_Possible_World_M(final * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrdinaryPhysicalObjectBuilder temporal__Part_Of( + public final StateOfOrdinaryPhysicalObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrdinaryPhysicalObject.addValue(TEMPORAL__PART_OF, + this.stateOfOrdinaryPhysicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -221,25 +218,17 @@ public StateOfOrdinaryPhysicalObject build() throws HqdmException { && this.stateOfOrdinaryPhysicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfOrdinaryPhysicalObject.hasValue(MEMBER__OF) - && this.stateOfOrdinaryPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfOrdinaryPhysicalObject.hasValue(MEMBER_OF) && this.stateOfOrdinaryPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfOrdinaryPhysicalObject.hasValue(PART__OF) - && this.stateOfOrdinaryPhysicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfOrdinaryPhysicalObject.hasValue(PART_OF) + && this.stateOfOrdinaryPhysicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfOrdinaryPhysicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfOrdinaryPhysicalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfOrdinaryPhysicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfOrdinaryPhysicalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfOrdinaryPhysicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationBuilder.java index c252d6cc..16001197 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfOrganizationBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganization.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfOrganizationBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrganization.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,16 +112,15 @@ public final StateOfOrganizationBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfOrganizationBuilder member__Of(final Class clazz) { - this.stateOfOrganization.addValue(MEMBER__OF, clazz.getId()); + public final StateOfOrganizationBuilder member_Of(final Class clazz) { + this.stateOfOrganization.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfOrganization} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfStateOfOrganization}. + * {@link StateOfOrganization} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfStateOfOrganization}. * * @param classOfStateOfOrganization The ClassOfStateOfOrganization. * @return This builder. @@ -142,20 +139,19 @@ public final StateOfOrganizationBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganization.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfOrganizationBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrganization.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -174,8 +170,8 @@ public final StateOfOrganizationBuilder part_Of_Possible_World_M(final PossibleW * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganization.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfOrganizationBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrganization.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -212,25 +208,17 @@ public StateOfOrganization build() throws HqdmException { && this.stateOfOrganization.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfOrganization.hasValue(MEMBER__OF) - && this.stateOfOrganization.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfOrganization.hasValue(MEMBER_OF) && this.stateOfOrganization.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfOrganization.hasValue(PART__OF) - && this.stateOfOrganization.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfOrganization.hasValue(PART_OF) + && this.stateOfOrganization.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfOrganization.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfOrganization.hasValue(TEMPORAL__PART_OF) - && this.stateOfOrganization.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfOrganization.hasValue(TEMPORAL_PART_OF) && this.stateOfOrganization.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationComponentBuilder.java index b337ffa5..2c785732 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfOrganizationComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -85,14 +83,14 @@ public final StateOfOrganizationComponentBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganizationComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfOrganizationComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrganizationComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +113,8 @@ public final StateOfOrganizationComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfOrganizationComponentBuilder member__Of(final Class clazz) { - this.stateOfOrganizationComponent.addValue(MEMBER__OF, clazz.getId()); + public final StateOfOrganizationComponentBuilder member_Of(final Class clazz) { + this.stateOfOrganizationComponent.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -144,20 +142,19 @@ public final StateOfOrganizationComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganizationComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfOrganizationComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfOrganizationComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -177,9 +174,9 @@ public final StateOfOrganizationComponentBuilder part_Of_Possible_World_M(final * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfOrganizationComponentBuilder temporal__Part_Of( + public final StateOfOrganizationComponentBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfOrganizationComponent.addValue(TEMPORAL__PART_OF, + this.stateOfOrganizationComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -220,25 +217,17 @@ public StateOfOrganizationComponent build() throws HqdmException { && this.stateOfOrganizationComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfOrganizationComponent.hasValue(MEMBER__OF) - && this.stateOfOrganizationComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfOrganizationComponent.hasValue(MEMBER_OF) && this.stateOfOrganizationComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfOrganizationComponent.hasValue(PART__OF) - && this.stateOfOrganizationComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfOrganizationComponent.hasValue(PART_OF) + && this.stateOfOrganizationComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfOrganizationComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfOrganizationComponent.hasValue(TEMPORAL__PART_OF) - && this.stateOfOrganizationComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfOrganizationComponent.hasValue(TEMPORAL_PART_OF) && this.stateOfOrganizationComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPartyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPartyBuilder.java index 9d3ad38f..24671815 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPartyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPartyBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfPartyBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPartyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfParty.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfPartyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfParty.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfPartyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfPartyBuilder member__Of(final Class clazz) { - this.stateOfParty.addValue(MEMBER__OF, clazz.getId()); + public final StateOfPartyBuilder member_Of(final Class clazz) { + this.stateOfParty.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfParty} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfStateOfParty}. + * {@link StateOfParty} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfStateOfParty}. * * @param classOfStateOfParty The ClassOfStateOfParty. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfPartyBuilder member_Of(final ClassOfStateOfParty classOfStat * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPartyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfParty.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfPartyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfParty.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,15 +169,15 @@ public final StateOfPartyBuilder part_Of_Possible_World_M(final PossibleWorld po * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPartyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfParty.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfPartyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfParty.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfParty} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Party}. + * {@link StateOfParty} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link Party}. * * @param party The Party. * @return This builder. @@ -209,25 +206,17 @@ public StateOfParty build() throws HqdmException { && this.stateOfParty.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfParty.hasValue(MEMBER__OF) - && this.stateOfParty.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfParty.hasValue(MEMBER_OF) && this.stateOfParty.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfParty.hasValue(PART__OF) - && this.stateOfParty.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfParty.hasValue(PART_OF) + && this.stateOfParty.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfParty.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfParty.hasValue(TEMPORAL__PART_OF) - && this.stateOfParty.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfParty.hasValue(TEMPORAL_PART_OF) && this.stateOfParty.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPersonBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPersonBuilder.java index fc472629..49d2ce45 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPersonBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPersonBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfPersonBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPersonBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPerson.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfPersonBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPerson.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfPersonBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfPersonBuilder member__Of(final Class clazz) { - this.stateOfPerson.addValue(MEMBER__OF, clazz.getId()); + public final StateOfPersonBuilder member_Of(final Class clazz) { + this.stateOfPerson.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfPerson} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfStateOfPerson}. + * {@link StateOfPerson} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfStateOfPerson}. * * @param classOfStateOfPerson The ClassOfStateOfPerson. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfPersonBuilder member_Of(final ClassOfStateOfPerson classOfSt * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPersonBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPerson.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfPersonBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPerson.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,15 +169,15 @@ public final StateOfPersonBuilder part_Of_Possible_World_M(final PossibleWorld p * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPersonBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPerson.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfPersonBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPerson.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfPerson} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Person}. + * {@link StateOfPerson} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link Person}. * * @param person The Person. * @return This builder. @@ -209,25 +206,17 @@ public StateOfPerson build() throws HqdmException { && this.stateOfPerson.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfPerson.hasValue(MEMBER__OF) - && this.stateOfPerson.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfPerson.hasValue(MEMBER_OF) && this.stateOfPerson.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfPerson.hasValue(PART__OF) - && this.stateOfPerson.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfPerson.hasValue(PART_OF) + && this.stateOfPerson.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfPerson.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfPerson.hasValue(TEMPORAL__PART_OF) - && this.stateOfPerson.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfPerson.hasValue(TEMPORAL_PART_OF) && this.stateOfPerson.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPhysicalObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPhysicalObjectBuilder.java index 7764c06e..f7c102af 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPhysicalObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPhysicalObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfPhysicalObjectBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPhysicalObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPhysicalObject.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfPhysicalObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPhysicalObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,16 +112,15 @@ public final StateOfPhysicalObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfPhysicalObjectBuilder member__Of(final Class clazz) { - this.stateOfPhysicalObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfPhysicalObjectBuilder member_Of(final Class clazz) { + this.stateOfPhysicalObject.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfPhysicalObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfStateOfPhysicalObject}. + * {@link StateOfPhysicalObject} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfStateOfPhysicalObject}. * * @param classOfStateOfPhysicalObject The ClassOfStateOfPhysicalObject. * @return This builder. @@ -142,20 +139,19 @@ public final StateOfPhysicalObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPhysicalObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPhysicalObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfPhysicalObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPhysicalObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -174,8 +170,8 @@ public final StateOfPhysicalObjectBuilder part_Of_Possible_World_M(final Possibl * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPhysicalObjectBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPhysicalObject.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfPhysicalObjectBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPhysicalObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -212,25 +208,17 @@ public StateOfPhysicalObject build() throws HqdmException { && this.stateOfPhysicalObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfPhysicalObject.hasValue(MEMBER__OF) - && this.stateOfPhysicalObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfPhysicalObject.hasValue(MEMBER_OF) && this.stateOfPhysicalObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfPhysicalObject.hasValue(PART__OF) - && this.stateOfPhysicalObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfPhysicalObject.hasValue(PART_OF) + && this.stateOfPhysicalObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfPhysicalObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfPhysicalObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfPhysicalObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfPhysicalObject.hasValue(TEMPORAL_PART_OF) && this.stateOfPhysicalObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPositionBuilder.java index a534e662..22e377fc 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfPositionBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfPositionBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPositionBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPosition.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfPositionBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPosition.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfPositionBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfPositionBuilder member__Of(final Class clazz) { - this.stateOfPosition.addValue(MEMBER__OF, clazz.getId()); + public final StateOfPositionBuilder member_Of(final Class clazz) { + this.stateOfPosition.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfPosition} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfStateOfPosition}. + * {@link StateOfPosition} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfStateOfPosition}. * * @param classOfStateOfPosition The ClassOfStateOfPosition. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfPositionBuilder member_Of(final ClassOfStateOfPosition class * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPositionBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPosition.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfPositionBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPosition.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,16 +169,15 @@ public final StateOfPositionBuilder part_Of_Possible_World_M(final PossibleWorld * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfPositionBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfPosition.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfPositionBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfPosition.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfPosition} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Position}. + * {@link StateOfPosition} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link Position}. * * @param position The Position. * @return This builder. @@ -210,25 +206,17 @@ public StateOfPosition build() throws HqdmException { && this.stateOfPosition.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfPosition.hasValue(MEMBER__OF) - && this.stateOfPosition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfPosition.hasValue(MEMBER_OF) && this.stateOfPosition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfPosition.hasValue(PART__OF) - && this.stateOfPosition.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfPosition.hasValue(PART_OF) + && this.stateOfPosition.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfPosition.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfPosition.hasValue(TEMPORAL__PART_OF) - && this.stateOfPosition.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfPosition.hasValue(TEMPORAL_PART_OF) && this.stateOfPosition.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSalesProductInstanceBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSalesProductInstanceBuilder.java index 2efa7c37..f7ce2048 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSalesProductInstanceBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSalesProductInstanceBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -85,14 +83,14 @@ public final StateOfSalesProductInstanceBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSalesProductInstanceBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSalesProductInstance.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfSalesProductInstanceBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSalesProductInstance.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +113,8 @@ public final StateOfSalesProductInstanceBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfSalesProductInstanceBuilder member__Of(final Class clazz) { - this.stateOfSalesProductInstance.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSalesProductInstanceBuilder member_Of(final Class clazz) { + this.stateOfSalesProductInstance.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -144,20 +142,19 @@ public final StateOfSalesProductInstanceBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSalesProductInstanceBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSalesProductInstance.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfSalesProductInstanceBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSalesProductInstance.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -177,8 +174,8 @@ public final StateOfSalesProductInstanceBuilder part_Of_Possible_World_M(final P * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSalesProductInstanceBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSalesProductInstance.addValue(TEMPORAL__PART_OF, + public final StateOfSalesProductInstanceBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSalesProductInstance.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -218,25 +215,17 @@ public StateOfSalesProductInstance build() throws HqdmException { && this.stateOfSalesProductInstance.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSalesProductInstance.hasValue(MEMBER__OF) - && this.stateOfSalesProductInstance.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSalesProductInstance.hasValue(MEMBER_OF) && this.stateOfSalesProductInstance.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSalesProductInstance.hasValue(PART__OF) - && this.stateOfSalesProductInstance.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSalesProductInstance.hasValue(PART_OF) + && this.stateOfSalesProductInstance.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSalesProductInstance.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSalesProductInstance.hasValue(TEMPORAL__PART_OF) - && this.stateOfSalesProductInstance.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSalesProductInstance.hasValue(TEMPORAL_PART_OF) && this.stateOfSalesProductInstance.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSignBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSignBuilder.java index d124029c..9b54ae58 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSignBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSignBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfSignBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSignBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSign.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfSignBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSign.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,8 +112,8 @@ public final StateOfSignBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfSignBuilder member__Of(final Class clazz) { - this.stateOfSign.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSignBuilder member_Of(final Class clazz) { + this.stateOfSign.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -140,20 +138,19 @@ public final StateOfSignBuilder member_Of(final ClassOfStateOfSign classOfStateO * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSignBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSign.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfSignBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSign.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,15 +169,15 @@ public final StateOfSignBuilder part_Of_Possible_World_M(final PossibleWorld pos * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSignBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSign.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfSignBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSign.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfSign} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} - * one or more {@link Sign}. + * {@link StateOfSign} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one + * or more {@link Sign}. * * @param sign The Sign. * @return This builder. @@ -209,25 +206,17 @@ public StateOfSign build() throws HqdmException { && this.stateOfSign.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSign.hasValue(MEMBER__OF) - && this.stateOfSign.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSign.hasValue(MEMBER_OF) && this.stateOfSign.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSign.hasValue(PART__OF) - && this.stateOfSign.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSign.hasValue(PART_OF) + && this.stateOfSign.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSign.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSign.hasValue(TEMPORAL__PART_OF) - && this.stateOfSign.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSign.hasValue(TEMPORAL_PART_OF) && this.stateOfSign.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedActivityBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedActivityBuilder.java index 8beb9615..c87c96e2 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedActivityBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedActivityBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,15 +85,15 @@ public final StateOfSociallyConstructedActivityBuilder beginning(final Event eve * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedActivityBuilder consists__Of( + public final StateOfSociallyConstructedActivityBuilder consists_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedActivity.addValue(CONSISTS__OF, + this.stateOfSociallyConstructedActivity.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -119,8 +117,8 @@ public final StateOfSociallyConstructedActivityBuilder ending(final Event event) * @param clazz The Class. * @return This builder. */ - public final StateOfSociallyConstructedActivityBuilder member__Of(final Class clazz) { - this.stateOfSociallyConstructedActivity.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSociallyConstructedActivityBuilder member_Of(final Class clazz) { + this.stateOfSociallyConstructedActivity.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -149,21 +147,20 @@ public final StateOfSociallyConstructedActivityBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedActivityBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedActivity.addValue(PART__OF, + public final StateOfSociallyConstructedActivityBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSociallyConstructedActivity.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -183,9 +180,9 @@ public final StateOfSociallyConstructedActivityBuilder part_Of_Possible_World_M( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedActivityBuilder temporal__Part_Of( + public final StateOfSociallyConstructedActivityBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedActivity.addValue(TEMPORAL__PART_OF, + this.stateOfSociallyConstructedActivity.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -227,25 +224,17 @@ public StateOfSociallyConstructedActivity build() throws HqdmException { && this.stateOfSociallyConstructedActivity.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSociallyConstructedActivity.hasValue(MEMBER__OF) - && this.stateOfSociallyConstructedActivity.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSociallyConstructedActivity.hasValue(MEMBER_OF) && this.stateOfSociallyConstructedActivity.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSociallyConstructedActivity.hasValue(PART__OF) - && this.stateOfSociallyConstructedActivity.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSociallyConstructedActivity.hasValue(PART_OF) + && this.stateOfSociallyConstructedActivity.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSociallyConstructedActivity.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSociallyConstructedActivity.hasValue(TEMPORAL__PART_OF) - && this.stateOfSociallyConstructedActivity.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSociallyConstructedActivity.hasValue(TEMPORAL_PART_OF) && this.stateOfSociallyConstructedActivity.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedObjectBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedObjectBuilder.java index 27d5a47d..4d9ace8c 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedObjectBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSociallyConstructedObjectBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -87,14 +85,14 @@ public final StateOfSociallyConstructedObjectBuilder beginning(final Event event * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedObjectBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedObject.addValue(CONSISTS__OF, + public final StateOfSociallyConstructedObjectBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSociallyConstructedObject.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +116,8 @@ public final StateOfSociallyConstructedObjectBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfSociallyConstructedObjectBuilder member__Of(final Class clazz) { - this.stateOfSociallyConstructedObject.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSociallyConstructedObjectBuilder member_Of(final Class clazz) { + this.stateOfSociallyConstructedObject.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -148,20 +146,19 @@ public final StateOfSociallyConstructedObjectBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedObjectBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedObject.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfSociallyConstructedObjectBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSociallyConstructedObject.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -181,9 +178,9 @@ public final StateOfSociallyConstructedObjectBuilder part_Of_Possible_World_M(fi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSociallyConstructedObjectBuilder temporal__Part_Of( + public final StateOfSociallyConstructedObjectBuilder temporal_Part_Of( final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSociallyConstructedObject.addValue(TEMPORAL__PART_OF, + this.stateOfSociallyConstructedObject.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -225,25 +222,17 @@ public StateOfSociallyConstructedObject build() throws HqdmException { && this.stateOfSociallyConstructedObject.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSociallyConstructedObject.hasValue(MEMBER__OF) - && this.stateOfSociallyConstructedObject.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSociallyConstructedObject.hasValue(MEMBER_OF) && this.stateOfSociallyConstructedObject.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSociallyConstructedObject.hasValue(PART__OF) - && this.stateOfSociallyConstructedObject.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSociallyConstructedObject.hasValue(PART_OF) + && this.stateOfSociallyConstructedObject.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSociallyConstructedObject.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSociallyConstructedObject.hasValue(TEMPORAL__PART_OF) - && this.stateOfSociallyConstructedObject.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSociallyConstructedObject.hasValue(TEMPORAL_PART_OF) && this.stateOfSociallyConstructedObject.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemBuilder.java index 3428acef..195819d1 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfSystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystem.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfSystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystem.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,15 +112,15 @@ public final StateOfSystemBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfSystemBuilder member__Of(final Class clazz) { - this.stateOfSystem.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSystemBuilder member_Of(final Class clazz) { + this.stateOfSystem.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one - * or more {@link ClassOfStateOfSystem}. + * {@link StateOfSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfStateOfSystem}. * * @param classOfStateOfSystem The ClassOfStateOfSystem. * @return This builder. @@ -140,20 +138,19 @@ public final StateOfSystemBuilder member_Of(final ClassOfStateOfSystem classOfSt * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystem.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfSystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystem.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -172,15 +169,15 @@ public final StateOfSystemBuilder part_Of_Possible_World_M(final PossibleWorld p * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystem.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfSystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystem.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link StateOfSystem} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link System}. + * {@link StateOfSystem} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} + * one or more {@link System}. * * @param system The System. * @return This builder. @@ -209,25 +206,17 @@ public StateOfSystem build() throws HqdmException { && this.stateOfSystem.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSystem.hasValue(MEMBER__OF) - && this.stateOfSystem.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSystem.hasValue(MEMBER_OF) && this.stateOfSystem.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSystem.hasValue(PART__OF) - && this.stateOfSystem.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSystem.hasValue(PART_OF) + && this.stateOfSystem.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSystem.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSystem.hasValue(TEMPORAL__PART_OF) - && this.stateOfSystem.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSystem.hasValue(TEMPORAL_PART_OF) && this.stateOfSystem.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemComponentBuilder.java index 69eb6b17..5a6e5d61 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/StateOfSystemComponentBuilder.java @@ -16,14 +16,12 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -84,14 +82,14 @@ public final StateOfSystemComponentBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystemComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final StateOfSystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -114,16 +112,15 @@ public final StateOfSystemComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final StateOfSystemComponentBuilder member__Of(final Class clazz) { - this.stateOfSystemComponent.addValue(MEMBER__OF, clazz.getId()); + public final StateOfSystemComponentBuilder member_Of(final Class clazz) { + this.stateOfSystemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link StateOfSystemComponent} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or more - * {@link ClassOfStateOfSystemComponent}. + * {@link StateOfSystemComponent} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} + * one or more {@link ClassOfStateOfSystemComponent}. * * @param classOfStateOfSystemComponent The ClassOfStateOfSystemComponent. * @return This builder. @@ -142,20 +139,19 @@ public final StateOfSystemComponentBuilder member_Of( * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final StateOfSystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -174,8 +170,8 @@ public final StateOfSystemComponentBuilder part_Of_Possible_World_M(final Possib * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final StateOfSystemComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.stateOfSystemComponent.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final StateOfSystemComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.stateOfSystemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -212,25 +208,17 @@ public StateOfSystemComponent build() throws HqdmException { && this.stateOfSystemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.stateOfSystemComponent.hasValue(MEMBER__OF) - && this.stateOfSystemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.stateOfSystemComponent.hasValue(MEMBER_OF) && this.stateOfSystemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); } - if (this.stateOfSystemComponent.hasValue(PART__OF) - && this.stateOfSystemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.stateOfSystemComponent.hasValue(PART_OF) + && this.stateOfSystemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.stateOfSystemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.stateOfSystemComponent.hasValue(TEMPORAL__PART_OF) - && this.stateOfSystemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.stateOfSystemComponent.hasValue(TEMPORAL_PART_OF) && this.stateOfSystemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemBuilder.java index db8dbcd0..dc21bbb8 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemBuilder.java @@ -16,15 +16,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -35,6 +33,7 @@ import uk.gov.gchq.magmacore.hqdm.model.SpatioTemporalExtent; import uk.gov.gchq.magmacore.hqdm.model.System; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -85,14 +84,14 @@ public final SystemBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.system.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SystemBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.system.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -115,8 +114,8 @@ public final SystemBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SystemBuilder member__Of(final Class clazz) { - this.system.addValue(MEMBER__OF, clazz.getId()); + public final SystemBuilder member_Of(final Class clazz) { + this.system.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -143,6 +142,7 @@ public final SystemBuilder member_Of(final ClassOfSystem classOfSystem) { */ public final SystemBuilder member_Of_Kind(final KindOfSystem kindOfSystem) { this.system.addValue(MEMBER_OF_KIND, kindOfSystem.getId()); + this.system.addValue(RDFS.RDF_TYPE, kindOfSystem.getId()); return this; } @@ -154,20 +154,19 @@ public final SystemBuilder member_Of_Kind(final KindOfSystem kindOfSystem) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.system.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SystemBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.system.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -186,8 +185,8 @@ public final SystemBuilder part_Of_Possible_World_M(final PossibleWorld possible * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.system.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SystemBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.system.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -223,10 +222,6 @@ public System build() throws HqdmException { && this.system.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.system.hasValue(MEMBER__OF) - && this.system.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.system.hasValue(MEMBER_OF) && this.system.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -235,17 +230,13 @@ public System build() throws HqdmException { && this.system.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.system.hasValue(PART__OF) - && this.system.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.system.hasValue(PART_OF) + && this.system.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.system.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.system.hasValue(TEMPORAL__PART_OF) - && this.system.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.system.hasValue(TEMPORAL_PART_OF) && this.system.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemComponentBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemComponentBuilder.java index 1aca040b..1934f325 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemComponentBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/SystemComponentBuilder.java @@ -17,15 +17,13 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.COMPONENT_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.System; import uk.gov.gchq.magmacore.hqdm.model.SystemComponent; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -86,8 +85,8 @@ public final SystemComponentBuilder beginning(final Event event) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where each - * {@link SystemComponent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly - * one {@link System}. + * {@link SystemComponent} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} exactly one + * {@link System}. * * @param system The System. * @return This builder. @@ -101,14 +100,14 @@ public final SystemComponentBuilder component_Of_M(final System system) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemComponentBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.systemComponent.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final SystemComponentBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.systemComponent.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -131,15 +130,15 @@ public final SystemComponentBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final SystemComponentBuilder member__Of(final Class clazz) { - this.systemComponent.addValue(MEMBER__OF, clazz.getId()); + public final SystemComponentBuilder member_Of(final Class clazz) { + this.systemComponent.addValue(MEMBER_OF, clazz.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} relationship type where a - * {@link SystemComponent} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} - * one or more {@link ClassOfSystemComponent}. + * {@link SystemComponent} may be a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#MEMBER_OF} one or + * more {@link ClassOfSystemComponent}. * * @param classOfSystemComponent The ClassOfSystemComponent. * @return This builder. @@ -160,6 +159,7 @@ public final SystemComponentBuilder member_Of(final ClassOfSystemComponent class */ public final SystemComponentBuilder member_Of_Kind(final KindOfPhysicalObject kindOfPhysicalObject) { this.systemComponent.addValue(MEMBER_OF_KIND, kindOfPhysicalObject.getId()); + this.systemComponent.addValue(RDFS.RDF_TYPE, kindOfPhysicalObject.getId()); return this; } @@ -171,20 +171,19 @@ public final SystemComponentBuilder member_Of_Kind(final KindOfPhysicalObject ki * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemComponentBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.systemComponent.addValue(PART__OF, spatioTemporalExtent.getId()); + public final SystemComponentBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.systemComponent.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -203,24 +202,23 @@ public final SystemComponentBuilder part_Of_Possible_World_M(final PossibleWorld * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final SystemComponentBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.systemComponent.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final SystemComponentBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.systemComponent.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -253,10 +251,6 @@ public SystemComponent build() throws HqdmException { && this.systemComponent.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.systemComponent.hasValue(MEMBER__OF) - && this.systemComponent.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.systemComponent.hasValue(MEMBER_OF) && this.systemComponent.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -265,17 +259,13 @@ public SystemComponent build() throws HqdmException { && this.systemComponent.values(MEMBER_OF_KIND).isEmpty()) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.systemComponent.hasValue(PART__OF) - && this.systemComponent.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.systemComponent.hasValue(PART_OF) + && this.systemComponent.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.systemComponent.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } - if (this.systemComponent.hasValue(TEMPORAL__PART_OF) - && this.systemComponent.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.systemComponent.hasValue(TEMPORAL_PART_OF) && this.systemComponent.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TemporalCompositionBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TemporalCompositionBuilder.java index 21743f51..9cf397a1 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TemporalCompositionBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TemporalCompositionBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.WHOLE; @@ -50,8 +49,8 @@ public TemporalCompositionBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final TemporalCompositionBuilder member__Of(final Class clazz) { - this.temporalComposition.addValue(MEMBER__OF, clazz.getId()); + public final TemporalCompositionBuilder member_Of(final Class clazz) { + this.temporalComposition.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -99,10 +98,6 @@ public final TemporalCompositionBuilder whole_M(final SpatioTemporalExtent spati * @throws HqdmException If the TemporalComposition is missing any mandatory properties. */ public TemporalComposition build() throws HqdmException { - if (this.temporalComposition.hasValue(MEMBER__OF) - && this.temporalComposition.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.temporalComposition.hasValue(MEMBER_OF) && this.temporalComposition.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ThingBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ThingBuilder.java index 6d5e249f..203cb112 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ThingBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/ThingBuilder.java @@ -14,7 +14,7 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -44,8 +44,8 @@ public ThingBuilder(final IRI iri) { * @param clazz Class of the Thing. * @return This builder. */ - public final ThingBuilder member__Of(final Class clazz) { - this.thing.addValue(MEMBER__OF, clazz.getId()); + public final ThingBuilder member_Of(final Class clazz) { + this.thing.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -56,9 +56,9 @@ public final ThingBuilder member__Of(final Class clazz) { * @throws HqdmException If the Thing is missing any mandatory properties. */ public Thing build() throws HqdmException { - if (this.thing.hasValue(MEMBER__OF) - && this.thing.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); + if (this.thing.hasValue(MEMBER_OF) + && this.thing.values(MEMBER_OF).isEmpty()) { + throw new HqdmException("Property Not Set: member_of"); } return thing; } diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipBuilder.java index baf4ce93..b2468d9e 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipBuilder.java @@ -21,20 +21,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES_ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -55,6 +49,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Transferee; import uk.gov.gchq.magmacore.hqdm.model.Transferor; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -114,8 +109,7 @@ public final TransferOfOwnershipBuilder causes_M(final Event event) { /** * A causes relationship type where a {@link TransferOfOwnership} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CAUSES} exactly one - * {@link BeginningOfOwnership}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CAUSES} exactly one {@link BeginningOfOwnership}. * * @param beginningOfOwnership The BeginningOfOwnership. * @return This builder. @@ -141,14 +135,14 @@ public final TransferOfOwnershipBuilder causes_Ending_M(final EndingOfOwnership * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnership.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final TransferOfOwnershipBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnership.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -166,8 +160,8 @@ public final TransferOfOwnershipBuilder consists_Of(final Activity activity) { } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where a {@link TransferOfOwnership} + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * a {@link TransferOfOwnership} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one * {@link Transferor}. * @@ -180,16 +174,16 @@ public final TransferOfOwnershipBuilder consists_Of_Participant(final Transferor } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where a {@link TransferOfOwnership} + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * a {@link TransferOfOwnership} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one * {@link Transferee}. * * @param transferee The Transferee. * @return This builder. */ - public final TransferOfOwnershipBuilder consists_Of_Participant_(final Transferee transferee) { - this.transferOfOwnership.addValue(CONSISTS_OF_PARTICIPANT_, transferee.getId()); + public final TransferOfOwnershipBuilder consists_Of_Participant(final Transferee transferee) { + this.transferOfOwnership.addValue(CONSISTS_OF_PARTICIPANT, transferee.getId()); return this; } @@ -223,8 +217,8 @@ public final TransferOfOwnershipBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final TransferOfOwnershipBuilder member__Of(final Class clazz) { - this.transferOfOwnership.addValue(MEMBER__OF, clazz.getId()); + public final TransferOfOwnershipBuilder member_Of(final Class clazz) { + this.transferOfOwnership.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -254,6 +248,7 @@ public final TransferOfOwnershipBuilder member_Of( */ public final TransferOfOwnershipBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.transferOfOwnership.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.transferOfOwnership.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -265,15 +260,15 @@ public final TransferOfOwnershipBuilder member_Of_Kind_M(final KindOfActivity ki * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnership.addValue(PART__OF, spatioTemporalExtent.getId()); + public final TransferOfOwnershipBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnership.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link TransferOfOwnership} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * not more than one {@link ExchangeOfGoodsAndMoney}. + * {@link TransferOfOwnership} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} not + * more than one {@link ExchangeOfGoodsAndMoney}. * * @param exchangeOfGoodsAndMoney The ExchangeOfGoodsAndMoney. * @return This builder. @@ -286,26 +281,24 @@ public final TransferOfOwnershipBuilder part_Of(final ExchangeOfGoodsAndMoney ex /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final TransferOfOwnershipBuilder part_Of_(final AgreementExecution agreementExecution) { - this.transferOfOwnership.addValue(PART_OF_, agreementExecution.getId()); + public final TransferOfOwnershipBuilder part_Of(final AgreementExecution agreementExecution) { + this.transferOfOwnership.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -336,24 +329,23 @@ public final TransferOfOwnershipBuilder references_M(final Asset asset) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnership.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final TransferOfOwnershipBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnership.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -396,10 +388,6 @@ public TransferOfOwnership build() throws HqdmException { && this.transferOfOwnership.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.transferOfOwnership.hasValue(MEMBER__OF) - && this.transferOfOwnership.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.transferOfOwnership.hasValue(MEMBER_OF) && this.transferOfOwnership.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -407,28 +395,16 @@ public TransferOfOwnership build() throws HqdmException { if (!this.transferOfOwnership.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.transferOfOwnership.hasValue(PART__OF) - && this.transferOfOwnership.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.transferOfOwnership.hasValue(PART_OF) && this.transferOfOwnership.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.transferOfOwnership.hasValue(PART_OF_) - && this.transferOfOwnership.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.transferOfOwnership.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } if (!this.transferOfOwnership.hasValue(REFERENCES)) { throw new HqdmException("Property Not Set: references"); } - if (this.transferOfOwnership.hasValue(TEMPORAL__PART_OF) - && this.transferOfOwnership.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.transferOfOwnership.hasValue(TEMPORAL_PART_OF) && this.transferOfOwnership.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipOfMoneyBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipOfMoneyBuilder.java index eb4f86f8..1c65ead6 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipOfMoneyBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferOfOwnershipOfMoneyBuilder.java @@ -21,20 +21,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CAUSES_ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF_PARTICIPANT_; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.DETERMINES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.REFERENCES; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Activity; @@ -55,6 +49,7 @@ import uk.gov.gchq.magmacore.hqdm.model.Transferee; import uk.gov.gchq.magmacore.hqdm.model.Transferor; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -115,8 +110,7 @@ public final TransferOfOwnershipOfMoneyBuilder causes_M(final Event event) { /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CAUSES} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CAUSES} exactly one - * {@link BeginningOfOwnership}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CAUSES} exactly one {@link BeginningOfOwnership}. * * @param beginningOfOwnership The BeginningOfOwnership. * @return This builder. @@ -144,14 +138,14 @@ public final TransferOfOwnershipOfMoneyBuilder causes_Ending_M(final EndingOfOwn * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnershipOfMoney.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final TransferOfOwnershipOfMoneyBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnershipOfMoney.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -169,8 +163,8 @@ public final TransferOfOwnershipOfMoneyBuilder consists_Of(final Activity activi } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * a {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one * {@link Transferor}. * @@ -183,16 +177,16 @@ public final TransferOfOwnershipOfMoneyBuilder consists_Of_Participant(final Tra } /** - * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type - * where a {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} + * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} relationship type where + * a {@link uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership} * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#CONSISTS_OF_PARTICIPANT} exactly one * {@link Transferee}. * * @param transferee The Transferee. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder consists_Of_Participant_(final Transferee transferee) { - this.transferOfOwnershipOfMoney.addValue(CONSISTS_OF_PARTICIPANT_, transferee.getId()); + public final TransferOfOwnershipOfMoneyBuilder consists_Of_Participant(final Transferee transferee) { + this.transferOfOwnershipOfMoney.addValue(CONSISTS_OF_PARTICIPANT, transferee.getId()); return this; } @@ -226,8 +220,8 @@ public final TransferOfOwnershipOfMoneyBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder member__Of(final Class clazz) { - this.transferOfOwnershipOfMoney.addValue(MEMBER__OF, clazz.getId()); + public final TransferOfOwnershipOfMoneyBuilder member_Of(final Class clazz) { + this.transferOfOwnershipOfMoney.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -257,6 +251,7 @@ public final TransferOfOwnershipOfMoneyBuilder member_Of( */ public final TransferOfOwnershipOfMoneyBuilder member_Of_Kind_M(final KindOfActivity kindOfActivity) { this.transferOfOwnershipOfMoney.addValue(MEMBER_OF_KIND, kindOfActivity.getId()); + this.transferOfOwnershipOfMoney.addValue(RDFS.RDF_TYPE, kindOfActivity.getId()); return this; } @@ -268,8 +263,8 @@ public final TransferOfOwnershipOfMoneyBuilder member_Of_Kind_M(final KindOfActi * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnershipOfMoney.addValue(PART__OF, spatioTemporalExtent.getId()); + public final TransferOfOwnershipOfMoneyBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnershipOfMoney.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } @@ -290,26 +285,24 @@ public final TransferOfOwnershipOfMoneyBuilder part_Of(final ExchangeOfGoodsAndM /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more - * {@link AgreementExecution}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one or more {@link AgreementExecution}. * * @param agreementExecution The AgreementExecution. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder part_Of_(final AgreementExecution agreementExecution) { - this.transferOfOwnershipOfMoney.addValue(PART_OF_, agreementExecution.getId()); + public final TransferOfOwnershipOfMoneyBuilder part_Of(final AgreementExecution agreementExecution) { + this.transferOfOwnershipOfMoney.addValue(PART_OF, agreementExecution.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -340,8 +333,8 @@ public final TransferOfOwnershipOfMoneyBuilder references_M(final MoneyAsset mon * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferOfOwnershipOfMoneyBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferOfOwnershipOfMoney.addValue(TEMPORAL__PART_OF, + public final TransferOfOwnershipOfMoneyBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferOfOwnershipOfMoney.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -349,16 +342,15 @@ public final TransferOfOwnershipOfMoneyBuilder temporal__Part_Of(final SpatioTem /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a * {@link uk.gov.gchq.magmacore.hqdm.model.State} may be a - * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more - * {@link Individual}. + * {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} one or more {@link Individual}. * *

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

* * @param individual The Individual. @@ -402,10 +394,6 @@ public TransferOfOwnershipOfMoney build() throws HqdmException { && this.transferOfOwnershipOfMoney.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.transferOfOwnershipOfMoney.hasValue(MEMBER__OF) - && this.transferOfOwnershipOfMoney.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.transferOfOwnershipOfMoney.hasValue(MEMBER_OF) && this.transferOfOwnershipOfMoney.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -413,28 +401,16 @@ public TransferOfOwnershipOfMoney build() throws HqdmException { if (!this.transferOfOwnershipOfMoney.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.transferOfOwnershipOfMoney.hasValue(PART__OF) - && this.transferOfOwnershipOfMoney.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); - } if (this.transferOfOwnershipOfMoney.hasValue(PART_OF) && this.transferOfOwnershipOfMoney.values(PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: part_of"); } - if (this.transferOfOwnershipOfMoney.hasValue(PART_OF_) - && this.transferOfOwnershipOfMoney.values(PART_OF_).isEmpty()) { - throw new HqdmException("Property Not Set: part_of_"); - } if (!this.transferOfOwnershipOfMoney.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); } if (!this.transferOfOwnershipOfMoney.hasValue(REFERENCES)) { throw new HqdmException("Property Not Set: references"); } - if (this.transferOfOwnershipOfMoney.hasValue(TEMPORAL__PART_OF) - && this.transferOfOwnershipOfMoney.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.transferOfOwnershipOfMoney.hasValue(TEMPORAL_PART_OF) && this.transferOfOwnershipOfMoney.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransfereeBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransfereeBuilder.java index 91678576..4c430e61 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransfereeBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransfereeBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership; import uk.gov.gchq.magmacore.hqdm.model.Transferee; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final TransfereeBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransfereeBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferee.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final TransfereeBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferee.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final TransfereeBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final TransfereeBuilder member__Of(final Class clazz) { - this.transferee.addValue(MEMBER__OF, clazz.getId()); + public final TransfereeBuilder member_Of(final Class clazz) { + this.transferee.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,6 +146,7 @@ public final TransfereeBuilder member_Of(final ClassOfStateOfParty classOfStateO */ public final TransfereeBuilder member_Of_Kind_M(final Role role) { this.transferee.addValue(MEMBER_OF_KIND, role.getId()); + this.transferee.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +158,19 @@ public final TransfereeBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransfereeBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferee.addValue(PART__OF, spatioTemporalExtent.getId()); + public final TransfereeBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferee.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -203,8 +202,8 @@ public final TransfereeBuilder participant_In_M(final TransferOfOwnership transf * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransfereeBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferee.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final TransfereeBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferee.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } @@ -240,10 +239,6 @@ public Transferee build() throws HqdmException { && this.transferee.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.transferee.hasValue(MEMBER__OF) - && this.transferee.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.transferee.hasValue(MEMBER_OF) && this.transferee.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,9 +246,9 @@ public Transferee build() throws HqdmException { if (!this.transferee.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.transferee.hasValue(PART__OF) - && this.transferee.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.transferee.hasValue(PART_OF) + && this.transferee.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.transferee.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -261,10 +256,6 @@ public Transferee build() throws HqdmException { if (!this.transferee.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.transferee.hasValue(TEMPORAL__PART_OF) - && this.transferee.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.transferee.hasValue(TEMPORAL_PART_OF) && this.transferee.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferorBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferorBuilder.java index 450cc232..f294c69d 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferorBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/TransferorBuilder.java @@ -16,16 +16,14 @@ import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.AGGREGATED_INTO; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.BEGINNING; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS__OF; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.CONSISTS_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.ENDING; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF_KIND; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PARTICIPANT_IN; +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART_OF_POSSIBLE_WORLD; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.PART__OF; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL_PART_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.TEMPORAL__PART_OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -38,6 +36,7 @@ import uk.gov.gchq.magmacore.hqdm.model.TransferOfOwnership; import uk.gov.gchq.magmacore.hqdm.model.Transferor; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; import uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices; /** @@ -88,14 +87,14 @@ public final TransferorBuilder beginning(final Event event) { * A relationship type where a {@link SpatioTemporalExtent} may consist of one or more others. * *

- * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART__OF}. + * Note: This is the inverse of {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF}. *

* * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferorBuilder consists__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferor.addValue(CONSISTS__OF, spatioTemporalExtent.getId()); + public final TransferorBuilder consists_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferor.addValue(CONSISTS_OF, spatioTemporalExtent.getId()); return this; } @@ -118,8 +117,8 @@ public final TransferorBuilder ending(final Event event) { * @param clazz The Class. * @return This builder. */ - public final TransferorBuilder member__Of(final Class clazz) { - this.transferor.addValue(MEMBER__OF, clazz.getId()); + public final TransferorBuilder member_Of(final Class clazz) { + this.transferor.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -147,6 +146,7 @@ public final TransferorBuilder member_Of(final ClassOfStateOfParty classOfStateO */ public final TransferorBuilder member_Of_Kind_M(final Role role) { this.transferor.addValue(MEMBER_OF_KIND, role.getId()); + this.transferor.addValue(RDFS.RDF_TYPE, role.getId()); return this; } @@ -158,20 +158,19 @@ public final TransferorBuilder member_Of_Kind_M(final Role role) { * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferorBuilder part__Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferor.addValue(PART__OF, spatioTemporalExtent.getId()); + public final TransferorBuilder part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferor.addValue(PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} relationship type where a - * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} - * one or more {@link PossibleWorld}. + * {@link SpatioTemporalExtent} may be {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PART_OF} one + * or more {@link PossibleWorld}. * *

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

* * @param possibleWorld The PossibleWorld. @@ -184,8 +183,8 @@ public final TransferorBuilder part_Of_Possible_World_M(final PossibleWorld poss /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} relationship type where a - * {@link Transferor} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} one or - * more {@link TransferOfOwnership}. + * {@link Transferor} is {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#PARTICIPANT_IN} one or more + * {@link TransferOfOwnership}. * * @param transferOfOwnership The TransferOfOwnership. * @return This builder. @@ -203,15 +202,15 @@ public final TransferorBuilder participant_In_M(final TransferOfOwnership transf * @param spatioTemporalExtent The SpatioTemporalExtent. * @return This builder. */ - public final TransferorBuilder temporal__Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { - this.transferor.addValue(TEMPORAL__PART_OF, spatioTemporalExtent.getId()); + public final TransferorBuilder temporal_Part_Of(final SpatioTemporalExtent spatioTemporalExtent) { + this.transferor.addValue(TEMPORAL_PART_OF, spatioTemporalExtent.getId()); return this; } /** * A {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} relationship type where a - * {@link Transferor} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} - * exactly one {@link Owner}. + * {@link Transferor} is a {@link uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM#TEMPORAL_PART_OF} exactly + * one {@link Owner}. * * @param owner The Owner. * @return This builder. @@ -240,10 +239,6 @@ public Transferor build() throws HqdmException { && this.transferor.values(ENDING).isEmpty()) { throw new HqdmException("Property Not Set: ending"); } - if (this.transferor.hasValue(MEMBER__OF) - && this.transferor.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.transferor.hasValue(MEMBER_OF) && this.transferor.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); @@ -251,9 +246,9 @@ public Transferor build() throws HqdmException { if (!this.transferor.hasValue(MEMBER_OF_KIND)) { throw new HqdmException("Property Not Set: member_of_kind"); } - if (this.transferor.hasValue(PART__OF) - && this.transferor.values(PART__OF).isEmpty()) { - throw new HqdmException("Property Not Set: part__of"); + if (this.transferor.hasValue(PART_OF) + && this.transferor.values(PART_OF).isEmpty()) { + throw new HqdmException("Property Not Set: part_of"); } if (!this.transferor.hasValue(PART_OF_POSSIBLE_WORLD)) { throw new HqdmException("Property Not Set: part_of_possible_world"); @@ -261,10 +256,6 @@ public Transferor build() throws HqdmException { if (!this.transferor.hasValue(PARTICIPANT_IN)) { throw new HqdmException("Property Not Set: participant_in"); } - if (this.transferor.hasValue(TEMPORAL__PART_OF) - && this.transferor.values(TEMPORAL__PART_OF).isEmpty()) { - throw new HqdmException("Property Not Set: temporal__part_of"); - } if (this.transferor.hasValue(TEMPORAL_PART_OF) && this.transferor.values(TEMPORAL_PART_OF).isEmpty()) { throw new HqdmException("Property Not Set: temporal_part_of"); diff --git a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/UnitOfMeasureBuilder.java b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/UnitOfMeasureBuilder.java index 2dddbd1c..b18ba106 100644 --- a/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/UnitOfMeasureBuilder.java +++ b/hqdm-canonical/src/main/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/UnitOfMeasureBuilder.java @@ -15,7 +15,6 @@ package uk.gov.gchq.magmacore.hqdm.rdfbuilders; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER_OF; -import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.MEMBER__OF; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; import uk.gov.gchq.magmacore.hqdm.model.Class; @@ -47,8 +46,8 @@ public UnitOfMeasureBuilder(final IRI iri) { * @param clazz The Class. * @return This builder. */ - public final UnitOfMeasureBuilder member__Of(final Class clazz) { - this.unitOfMeasure.addValue(MEMBER__OF, clazz.getId()); + public final UnitOfMeasureBuilder member_Of(final Class clazz) { + this.unitOfMeasure.addValue(MEMBER_OF, clazz.getId()); return this; } @@ -72,10 +71,6 @@ public final UnitOfMeasureBuilder member_Of(final ClassOfRelationship classOfRel * @throws HqdmException If the UnitOfMeasure is missing any mandatory properties. */ public UnitOfMeasure build() throws HqdmException { - if (this.unitOfMeasure.hasValue(MEMBER__OF) - && this.unitOfMeasure.values(MEMBER__OF).isEmpty()) { - throw new HqdmException("Property Not Set: member__of"); - } if (this.unitOfMeasure.hasValue(MEMBER_OF) && this.unitOfMeasure.values(MEMBER_OF).isEmpty()) { throw new HqdmException("Property Not Set: member_of"); diff --git a/hqdm-canonical/src/test/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilderTest.java b/hqdm-canonical/src/test/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilderTest.java index d1c1cdc2..5d8b7ced 100644 --- a/hqdm-canonical/src/test/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilderTest.java +++ b/hqdm-canonical/src/test/java/uk/gov/gchq/magmacore/hqdm/rdfbuilders/PersonBuilderTest.java @@ -44,32 +44,35 @@ public void testBuilder() { final Person person = new PersonBuilder(new IRI(HQDM.HQDM, UUID.randomUUID().toString())) .aggregated_Into(spatioTemporalExtent) .beginning(event) - .consists__Of(spatioTemporalExtent) + .consists_Of(spatioTemporalExtent) .ending(event) .member_Of(classOfPerson) .member_Of_Kind(kindOfPerson) - .member__Of(classOfPerson) + .member_Of(classOfPerson) .natural_Role_M(role) .part_Of_Possible_World_M(possibleWorld) - .part__Of(spatioTemporalExtent) + .part_Of(spatioTemporalExtent) .temporal_Part_Of(ordinaryBiologicalObject) - .temporal__Part_Of(spatioTemporalExtent) + .temporal_Part_Of(spatioTemporalExtent) .build(); assertNotNull(person); assertTrue(person.hasThisValue(RDFS.RDF_TYPE, HQDM.PERSON)); assertTrue(person.hasThisValue(HQDM.AGGREGATED_INTO, iriFromThing(spatioTemporalExtent))); assertTrue(person.hasThisValue(HQDM.BEGINNING, iriFromThing(event))); - assertTrue(person.hasThisValue(HQDM.CONSISTS__OF, iriFromThing(spatioTemporalExtent))); + assertTrue(person.hasThisValue(HQDM.CONSISTS_OF, iriFromThing(spatioTemporalExtent))); assertTrue(person.hasThisValue(HQDM.ENDING, iriFromThing(event))); assertTrue(person.hasThisValue(HQDM.MEMBER_OF, iriFromThing(classOfPerson))); assertTrue(person.hasThisValue(HQDM.MEMBER_OF_KIND, iriFromThing(kindOfPerson))); - assertTrue(person.hasThisValue(HQDM.MEMBER__OF, iriFromThing(classOfPerson))); + assertTrue(person.hasThisValue(HQDM.MEMBER_OF, iriFromThing(classOfPerson))); assertTrue(person.hasThisValue(HQDM.NATURAL_ROLE, iriFromThing(role))); assertTrue(person.hasThisValue(HQDM.PART_OF_POSSIBLE_WORLD, iriFromThing(possibleWorld))); - assertTrue(person.hasThisValue(HQDM.PART__OF, iriFromThing(spatioTemporalExtent))); + assertTrue(person.hasThisValue(HQDM.PART_OF, iriFromThing(spatioTemporalExtent))); assertTrue(person.hasThisValue(HQDM.TEMPORAL_PART_OF, iriFromThing(ordinaryBiologicalObject))); - assertTrue(person.hasThisValue(HQDM.TEMPORAL__PART_OF, iriFromThing(spatioTemporalExtent))); + assertTrue(person.hasThisValue(HQDM.TEMPORAL_PART_OF, iriFromThing(spatioTemporalExtent))); + + assertTrue(person.hasThisValue(RDFS.RDF_TYPE, iriFromThing(kindOfPerson))); + assertTrue(kindOfPerson.hasThisValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PERSON)); } private IRI iriFromThing(final Thing thing) { diff --git a/hqdm/src/main/java/module-info.java b/hqdm/src/main/java/module-info.java index 3ea4b5b5..4e193a93 100644 --- a/hqdm/src/main/java/module-info.java +++ b/hqdm/src/main/java/module-info.java @@ -25,4 +25,7 @@ exports uk.gov.gchq.magmacore.hqdm.rdf.iri; exports uk.gov.gchq.magmacore.hqdm.rdf.util; exports uk.gov.gchq.magmacore.hqdm.rdf; + + uses uk.gov.gchq.magmacore.hqdm.extensions.ExtensionService; + uses uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider; } diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/extensions/ExtensionService.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/extensions/ExtensionService.java index 507df4fb..0fa80120 100644 --- a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/extensions/ExtensionService.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/extensions/ExtensionService.java @@ -1,5 +1,7 @@ package uk.gov.gchq.magmacore.hqdm.extensions; +import java.io.InputStream; + import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; @@ -21,4 +23,11 @@ public interface ExtensionService { * @return A Thing if the typeName is recognised, null otherwise. */ T createEntity(final String typeName, final IRI iri); + + /** + * Extensions need to provide their model as TTL. + * + * @return an InputStream of TTL that defines the schema extension. + */ + InputStream getDomainTtl(); } 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 index 6f980076..b6d03f43 100755 --- 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 @@ -14,14 +14,13 @@ package uk.gov.gchq.magmacore.hqdm.model.impl; -import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; /** * An implementation of Thing. */ -public class ThingImpl extends HqdmObject implements Thing { +public class ThingImpl extends HqdmObject /* implements Thing */ { /** * Constructs a new Thing. * 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 index f7af6ffd..68bbb5f8 100755 --- 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 @@ -74,7 +74,8 @@ public void setPredicates(final Map> predicates) { final Object value = entry.getValue().iterator().next(); final IRI key = entry.getKey(); if (value instanceof Map) { - final Map valueMap = (Map) value; + @SuppressWarnings("unchecked") + final Map valueMap = (Map) value; this.predicates.remove(key); this.addValue(key, (IRI) valueMap.get("id")); } else { @@ -87,6 +88,7 @@ public void setPredicates(final Map> predicates) { /** * {@inheritDoc} */ + @SuppressWarnings("unchecked") public Set values(final IRI predicateId) { return (Set) predicates.get(predicateId); } @@ -95,6 +97,7 @@ public Set values(final IRI predicateId) { * {@inheritDoc} */ public T oneValue(final IRI predicateId) { + @SuppressWarnings("unchecked") final Set predicateValues = (Set) predicates.get(predicateId); if (predicateValues != null && !predicateValues.isEmpty()) { return predicateValues.iterator().next(); diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java index f801cfb8..837e9715 100755 --- a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/HqdmObjectFactory.java @@ -15,6 +15,7 @@ package uk.gov.gchq.magmacore.hqdm.rdf; import static uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS.RDF_TYPE; +import static uk.gov.gchq.magmacore.hqdm.services.SpatioTemporalExtentServices.*; import java.util.ArrayList; import java.util.HashMap; @@ -23,6 +24,7 @@ import java.util.Map; import java.util.ServiceLoader; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import uk.gov.gchq.magmacore.hqdm.exception.HqdmException; @@ -71,6 +73,7 @@ private static List getExtensionServices() { * @return The constructed HQDM object. * @throws HqdmException If the HqdmObject could not be built. */ + @SuppressWarnings("unchecked") public static T create(final HqdmIri hqdmType, final IRI iri) throws HqdmException { return (T) mapToThing(hqdmType.getResource(), iri); } @@ -124,6 +127,7 @@ public static Thing create(final IRI iri, final List> pairs) t * @param iris List of {@link IRI}. * @return Array of Class. */ + @SuppressWarnings("unchecked") private static java.lang.Class[] irisToClasses(final Set iris) { final Set> classes = new HashSet<>(3); @@ -136,7 +140,7 @@ private static java.lang.Class[] irisToClasses(final Set> iriToClassMap = new HashMap<>(250); + private static final Map> iriToClassMap = new HashMap<>(400); static { iriToClassMap.put(HQDM.ABSTRACT_OBJECT, AbstractObject.class); @@ -389,477 +393,312 @@ private static java.lang.Class[] irisToClasses(final Set { + return findExtendedTypes(typeName, ir); + }) + // Call the method to create the new entity. + .apply(iri); + } - switch (typeName) { - case "abstract_object": - return SpatioTemporalExtentServices.createAbstractObject(iri); - case "acceptance_of_offer": - return SpatioTemporalExtentServices.createAcceptanceOfOffer(iri); - case "acceptance_of_offer_for_goods": - return SpatioTemporalExtentServices.createAcceptanceOfOfferForGoods(iri); - case "activity": - return SpatioTemporalExtentServices.createActivity(iri); - case "aggregation": - return RelationshipServices.createAggregation(iri); - case "agree_contract": - return SpatioTemporalExtentServices.createAgreeContract(iri); - case "agreement_execution": - return SpatioTemporalExtentServices.createAgreementExecution(iri); - case "agreement_process": - return SpatioTemporalExtentServices.createAgreementProcess(iri); - case "amount_of_money": - return SpatioTemporalExtentServices.createAmountOfMoney(iri); - case "asset": - return SpatioTemporalExtentServices.createAsset(iri); - case "association": - return SpatioTemporalExtentServices.createAssociation(iri); - case "beginning_of_ownership": - return SpatioTemporalExtentServices.createBeginningOfOwnership(iri); - case "biological_object": - return SpatioTemporalExtentServices.createBiologicalObject(iri); - case "biological_system": - return SpatioTemporalExtentServices.createBiologicalSystem(iri); - case "biological_system_component": - return SpatioTemporalExtentServices.createBiologicalSystemComponent(iri); - case "class": - return ClassServices.createClass(iri); - case "classification": - return RelationshipServices.createClassification(iri); - case "class_of_abstract_object": - return ClassServices.createClassOfAbstractObject(iri); - case "class_of_activity": - return ClassServices.createClassOfActivity(iri); - case "class_of_agree_contract": - return ClassServices.createClassOfAgreeContract(iri); - case "class_of_agreement_execution": - return ClassServices.createClassOfAgreementExecution(iri); - case "class_of_agreement_process": - return ClassServices.createClassOfAgreementProcess(iri); - case "class_of_amount_of_money": - return ClassServices.createClassOfAmountOfMoney(iri); - case "class_of_association": - return ClassServices.createClassOfAssociation(iri); - case "class_of_biological_object": - return ClassServices.createClassOfBiologicalObject(iri); - case "class_of_biological_system": - return ClassServices.createClassOfBiologicalSystem(iri); - case "class_of_biological_system_component": - return ClassServices.createClassOfBiologicalSystemComponent(iri); - case "class_of_class": - return ClassServices.createClassOfClass(iri); - case "class_of_class_of_spatio_temporal_extent": - return ClassServices.createClassOfClassOfSpatioTemporalExtent(iri); - case "class_of_contract_execution": - return ClassServices.createClassOfContractExecution(iri); - case "class_of_contract_process": - return ClassServices.createClassOfContractProcess(iri); - case "class_of_event": - return ClassServices.createClassOfEvent(iri); - case "class_of_functional_object": - return ClassServices.createClassOfFunctionalObject(iri); - case "class_of_functional_system": - return ClassServices.createClassOfFunctionalSystem(iri); - case "class_of_functional_system_component": - return ClassServices.createClassOfFunctionalSystemComponent(iri); - case "class_of_individual": - return ClassServices.createClassOfIndividual(iri); - case "class_of_in_place_biological_component": - return ClassServices.createClassOfInPlaceBiologicalComponent(iri); - case "class_of_installed_functional_system_component": - return ClassServices.createClassOfInstalledFunctionalSystemComponent(iri); - case "class_of_installed_object": - return ClassServices.createClassOfInstalledObject(iri); - case "class_of_intentionally_constructed_object": - return ClassServices.createClassOfIntentionallyConstructedObject(iri); - case "class_of_offer": - return ClassServices.createClassOfOffer(iri); - case "class_of_ordinary_biological_object": - return ClassServices.createClassOfOrdinaryBiologicalObject(iri); - case "class_of_ordinary_functional_object": - return ClassServices.createClassOfOrdinaryFunctionalObject(iri); - case "class_of_ordinary_physical_object": - return ClassServices.createClassOfOrdinaryPhysicalObject(iri); - case "class_of_organization": - return ClassServices.createClassOfOrganization(iri); - case "class_of_organization_component": - return ClassServices.createClassOfOrganizationComponent(iri); - case "class_of_participant": - return ClassServices.createClassOfParticipant(iri); - case "class_of_party": - return ClassServices.createClassOfParty(iri); - case "class_of_period_of_time": - return ClassServices.createClassOfPeriodOfTime(iri); - case "class_of_person": - return ClassServices.createClassOfPerson(iri); - case "class_of_person_in_position": - return ClassServices.createClassOfPersonInPosition(iri); - case "class_of_physical_object": - return ClassServices.createClassOfPhysicalObject(iri); - case "class_of_physical_property": - return ClassServices.createClassOfPhysicalProperty(iri); - case "class_of_physical_quantity": - return ClassServices.createClassOfPhysicalQuantity(iri); - case "class_of_point_in_time": - return ClassServices.createClassOfPointInTime(iri); - case "class_of_position": - return ClassServices.createClassOfPosition(iri); - case "class_of_possible_world": - return ClassServices.createClassOfPossibleWorld(iri); - case "class_of_reaching_agreement": - return ClassServices.createClassOfReachingAgreement(iri); - case "class_of_relationship": - return ClassServices.createClassOfRelationship(iri); - case "class_of_representation": - return ClassServices.createClassOfRepresentation(iri); - case "class_of_sales_product_instance": - return ClassServices.createClassOfSalesProductInstance(iri); - case "class_of_sign": - return ClassServices.createClassOfSign(iri); - case "class_of_socially_constructed_activity": - return ClassServices.createClassOfSociallyConstructedActivity(iri); - case "class_of_socially_constructed_object": - return ClassServices.createClassOfSociallyConstructedObject(iri); - case "class_of_spatio_temporal_extent": - return ClassServices.createClassOfSpatioTemporalExtent(iri); - case "class_of_state": - return ClassServices.createClassOfState(iri); - case "class_of_state_of_activity": - return ClassServices.createClassOfStateOfActivity(iri); - case "class_of_state_of_amount_of_money": - return ClassServices.createClassOfStateOfAmountOfMoney(iri); - case "class_of_state_of_association": - return ClassServices.createClassOfStateOfAssociation(iri); - case "class_of_state_of_biological_object": - return ClassServices.createClassOfStateOfBiologicalObject(iri); - case "class_of_state_of_biological_system": - return ClassServices.createClassOfStateOfBiologicalSystem(iri); - case "class_of_state_of_biological_system_component": - return ClassServices.createClassOfStateOfBiologicalSystemComponent(iri); - case "class_of_state_of_functional_object": - return ClassServices.createClassOfStateOfFunctionalObject(iri); - case "class_of_state_of_functional_system": - return ClassServices.createClassOfStateOfFunctionalSystem(iri); - case "class_of_state_of_functional_system_component": - return ClassServices.createClassOfStateOfFunctionalSystemComponent(iri); - case "class_of_state_of_intentionally_constructed_object": - return ClassServices.createClassOfStateOfIntentionallyConstructedObject(iri); - case "class_of_state_of_ordinary_biological_object": - return ClassServices.createClassOfStateOfOrdinaryBiologicalObject(iri); - case "class_of_state_of_ordinary_functional_object": - return ClassServices.createClassOfStateOfOrdinaryFunctionalObject(iri); - case "class_of_state_of_ordinary_physical_object": - return ClassServices.createClassOfStateOfOrdinaryPhysicalObject(iri); - case "class_of_state_of_organization": - return ClassServices.createClassOfStateOfOrganization(iri); - case "class_of_state_of_organization_component": - return ClassServices.createClassOfStateOfOrganizationComponent(iri); - case "class_of_state_of_party": - return ClassServices.createClassOfStateOfParty(iri); - case "class_of_state_of_person": - return ClassServices.createClassOfStateOfPerson(iri); - case "class_of_state_of_physical_object": - return ClassServices.createClassOfStateOfPhysicalObject(iri); - case "class_of_state_of_position": - return ClassServices.createClassOfStateOfPosition(iri); - case "class_of_state_of_sales_product_instance": - return ClassServices.createClassOfStateOfSalesProductInstance(iri); - case "class_of_state_of_sign": - return ClassServices.createClassOfStateOfSign(iri); - case "class_of_state_of_socially_constructed_activity": - return ClassServices.createClassOfStateOfSociallyConstructedActivity(iri); - case "class_of_state_of_socially_constructed_object": - return ClassServices.createClassOfStateOfSociallyConstructedObject(iri); - case "class_of_state_of_system": - return ClassServices.createClassOfStateOfSystem(iri); - case "class_of_state_of_system_component": - return ClassServices.createClassOfStateOfSystemComponent(iri); - case "class_of_system": - return ClassServices.createClassOfSystem(iri); - case "class_of_system_component": - return ClassServices.createClassOfSystemComponent(iri); - case "composition": - return RelationshipServices.createComposition(iri); - case "contract_execution": - return SpatioTemporalExtentServices.createContractExecution(iri); - case "contract_process": - return SpatioTemporalExtentServices.createContractProcess(iri); - case "currency": - return SpatioTemporalExtentServices.createCurrency(iri); - case "defined_relationship": - return RelationshipServices.createDefinedRelationship(iri); - case "definition": - return ClassServices.createDefinition(iri); - case "description": - return ClassServices.createDescription(iri); - case "employee": - return SpatioTemporalExtentServices.createEmployee(iri); - case "employer": - return SpatioTemporalExtentServices.createEmployer(iri); - case "employment": - return SpatioTemporalExtentServices.createEmployment(iri); - case "ending_of_ownership": - return SpatioTemporalExtentServices.createEndingOfOwnership(iri); - case "enumerated_class": - return ClassServices.createEnumeratedClass(iri); - case "event": - return SpatioTemporalExtentServices.createEvent(iri); - case "exchange_of_goods_and_money": - return SpatioTemporalExtentServices.createExchangeOfGoodsAndMoney(iri); - case "function_": - return RelationshipServices.createFunction(iri); - case "functional_object": - return SpatioTemporalExtentServices.createFunctionalObject(iri); - case "functional_system": - return SpatioTemporalExtentServices.createFunctionalSystem(iri); - case "functional_system_component": - return SpatioTemporalExtentServices.createFunctionalSystemComponent(iri); - case "identification": - return ClassServices.createIdentification(iri); - case "identification_of_physical_quantity": - return SpatioTemporalExtentServices.createIdentificationOfPhysicalQuantity(iri); - case "individual": - return SpatioTemporalExtentServices.createIndividual(iri); - case "in_place_biological_component": - return SpatioTemporalExtentServices.createInPlaceBiologicalComponent(iri); - case "installed_functional_system_component": - return SpatioTemporalExtentServices.createInstalledFunctionalSystemComponent(iri); - case "installed_object": - return SpatioTemporalExtentServices.createInstalledObject(iri); - case "intentionally_constructed_object": - return SpatioTemporalExtentServices.createIntentionallyConstructedObject(iri); - case "kind_of_activity": - return ClassServices.createKindOfActivity(iri); - case "kind_of_association": - return ClassServices.createKindOfAssociation(iri); - case "kind_of_biological_object": - return ClassServices.createKindOfBiologicalObject(iri); - case "kind_of_biological_system": - return ClassServices.createKindOfBiologicalSystem(iri); - case "kind_of_biological_system_component": - return ClassServices.createKindOfBiologicalSystemComponent(iri); - case "kind_of_functional_object": - return ClassServices.createKindOfFunctionalObject(iri); - case "kind_of_functional_system": - return ClassServices.createKindOfFunctionalSystem(iri); - case "kind_of_functional_system_component": - return ClassServices.createKindOfFunctionalSystemComponent(iri); - case "kind_of_individual": - return ClassServices.createKindOfIndividual(iri); - case "kind_of_intentionally_constructed_object": - return ClassServices.createKindOfIntentionallyConstructedObject(iri); - case "kind_of_ordinary_biological_object": - return ClassServices.createKindOfOrdinaryBiologicalObject(iri); - case "kind_of_ordinary_functional_object": - return ClassServices.createKindOfOrdinaryFunctionalObject(iri); - case "kind_of_ordinary_physical_object": - return ClassServices.createKindOfOrdinaryPhysicalObject(iri); - case "kind_of_organization": - return ClassServices.createKindOfOrganization(iri); - case "kind_of_organization_component": - return ClassServices.createKindOfOrganizationComponent(iri); - case "kind_of_party": - return ClassServices.createKindOfParty(iri); - case "kind_of_person": - return ClassServices.createKindOfPerson(iri); - case "kind_of_physical_object": - return ClassServices.createKindOfPhysicalObject(iri); - case "kind_of_physical_property": - return ClassServices.createKindOfPhysicalProperty(iri); - case "kind_of_physical_quantity": - return ClassServices.createKindOfPhysicalQuantity(iri); - case "kind_of_position": - return ClassServices.createKindOfPosition(iri); - case "kind_of_relationship_with_restriction": - return ClassServices.createKindOfRelationshipWithRestriction(iri); - case "kind_of_relationship_with_signature": - return ClassServices.createKindOfRelationshipWithSignature(iri); - case "kind_of_socially_constructed_object": - return ClassServices.createKindOfSociallyConstructedObject(iri); - case "kind_of_system": - return ClassServices.createKindOfSystem(iri); - case "kind_of_system_component": - return ClassServices.createKindOfSystemComponent(iri); - case "language_community": - return SpatioTemporalExtentServices.createLanguageCommunity(iri); - case "money_asset": - return SpatioTemporalExtentServices.createMoneyAsset(iri); - case "offer": - return SpatioTemporalExtentServices.createOffer(iri); - case "offer_and_acceptance_for_goods": - return SpatioTemporalExtentServices.createOfferAndAcceptanceForGoods(iri); - case "offer_for_goods": - return SpatioTemporalExtentServices.createOfferForGoods(iri); - case "offering": - return SpatioTemporalExtentServices.createOffering(iri); - case "ordinary_biological_object": - return SpatioTemporalExtentServices.createOrdinaryBiologicalObject(iri); - case "ordinary_functional_object": - return SpatioTemporalExtentServices.createOrdinaryFunctionalObject(iri); - case "ordinary_physical_object": - return SpatioTemporalExtentServices.createOrdinaryPhysicalObject(iri); - case "organization": - return SpatioTemporalExtentServices.createOrganization(iri); - case "organization_component": - return SpatioTemporalExtentServices.createOrganizationComponent(iri); - case "owner": - return SpatioTemporalExtentServices.createOwner(iri); - case "ownership": - return SpatioTemporalExtentServices.createOwnership(iri); - case "participant": - return SpatioTemporalExtentServices.createParticipant(iri); - case "party": - return SpatioTemporalExtentServices.createParty(iri); - case "pattern": - return ClassServices.createPattern(iri); - case "period_of_time": - return SpatioTemporalExtentServices.createPeriodOfTime(iri); - case "person": - return SpatioTemporalExtentServices.createPerson(iri); - case "person_in_position": - return SpatioTemporalExtentServices.createPersonInPosition(iri); - case "physical_object": - return SpatioTemporalExtentServices.createPhysicalObject(iri); - case "physical_property": - return SpatioTemporalExtentServices.createPhysicalProperty(iri); - case "physical_property_range": - return SpatioTemporalExtentServices.createPhysicalPropertyRange(iri); - case "physical_quantity": - return SpatioTemporalExtentServices.createPhysicalQuantity(iri); - case "physical_quantity_range": - return SpatioTemporalExtentServices.createPhysicalQuantityRange(iri); - case "plan": - return SpatioTemporalExtentServices.createPlan(iri); - case "point_in_time": - return SpatioTemporalExtentServices.createPointInTime(iri); - case "position": - return SpatioTemporalExtentServices.createPosition(iri); - case "possible_world": - return SpatioTemporalExtentServices.createPossibleWorld(iri); - case "price": - return SpatioTemporalExtentServices.createPrice(iri); - case "product_brand": - return SpatioTemporalExtentServices.createProductBrand(iri); - case "product_offering": - return SpatioTemporalExtentServices.createProductOffering(iri); - case "reaching_agreement": - return SpatioTemporalExtentServices.createReachingAgreement(iri); - case "recognizing_language_community": - return SpatioTemporalExtentServices.createRecognizingLanguageCommunity(iri); - case "relationship": - return RelationshipServices.createRelationship(iri); - case "representation_by_pattern": - return ClassServices.createRepresentationByPattern(iri); - case "representation_by_sign": - return SpatioTemporalExtentServices.createRepresentationBySign(iri); - case "requirement": - return SpatioTemporalExtentServices.createRequirement(iri); - case "requirement_specification": - return SpatioTemporalExtentServices.createRequirementSpecification(iri); - case "role": - return ClassServices.createRole(iri); - case "sale_of_goods": - return SpatioTemporalExtentServices.createSaleOfGoods(iri); - case "sales_product": - return SpatioTemporalExtentServices.createSalesProduct(iri); - case "sales_product_instance": - return SpatioTemporalExtentServices.createSalesProductInstance(iri); - case "sales_product_version": - return SpatioTemporalExtentServices.createSalesProductVersion(iri); - case "scale": - return RelationshipServices.createScale(iri); - case "sign": - return SpatioTemporalExtentServices.createSign(iri); - case "socially_constructed_activity": - return SpatioTemporalExtentServices.createSociallyConstructedActivity(iri); - case "socially_constructed_object": - return SpatioTemporalExtentServices.createSociallyConstructedObject(iri); - case "spatio_temporal_extent": - return SpatioTemporalExtentServices.createSpatioTemporalExtent(iri); - case "specialization": - return RelationshipServices.createSpecialization(iri); - case "state": - return SpatioTemporalExtentServices.createState(iri); - case "state_of_activity": - return SpatioTemporalExtentServices.createStateOfActivity(iri); - case "state_of_amount_of_money": - return SpatioTemporalExtentServices.createStateOfAmountOfMoney(iri); - case "state_of_association": - return SpatioTemporalExtentServices.createStateOfAssociation(iri); - case "state_of_biological_object": - return SpatioTemporalExtentServices.createStateOfBiologicalObject(iri); - case "state_of_biological_system": - return SpatioTemporalExtentServices.createStateOfBiologicalSystem(iri); - case "state_of_biological_system_component": - return SpatioTemporalExtentServices.createStateOfBiologicalSystemComponent(iri); - case "state_of_functional_object": - return SpatioTemporalExtentServices.createStateOfFunctionalObject(iri); - case "state_of_functional_system": - return SpatioTemporalExtentServices.createStateOfFunctionalSystem(iri); - case "state_of_functional_system_component": - return SpatioTemporalExtentServices.createStateOfFunctionalSystemComponent(iri); - case "state_of_intentionally_constructed_object": - return SpatioTemporalExtentServices.createStateOfIntentionallyConstructedObject(iri); - case "state_of_language_community": - return SpatioTemporalExtentServices.createStateOfLanguageCommunity(iri); - case "state_of_ordinary_biological_object": - return SpatioTemporalExtentServices.createStateOfOrdinaryBiologicalObject(iri); - case "state_of_ordinary_functional_object": - return SpatioTemporalExtentServices.createStateOfOrdinaryFunctionalObject(iri); - case "state_of_ordinary_physical_object": - return SpatioTemporalExtentServices.createStateOfOrdinaryPhysicalObject(iri); - case "state_of_organization": - return SpatioTemporalExtentServices.createStateOfOrganization(iri); - case "state_of_organization_component": - return SpatioTemporalExtentServices.createStateOfOrganizationComponent(iri); - case "state_of_party": - return SpatioTemporalExtentServices.createStateOfParty(iri); - case "state_of_person": - return SpatioTemporalExtentServices.createStateOfPerson(iri); - case "state_of_physical_object": - return SpatioTemporalExtentServices.createStateOfPhysicalObject(iri); - case "state_of_position": - return SpatioTemporalExtentServices.createStateOfPosition(iri); - case "state_of_sales_product_instance": - return SpatioTemporalExtentServices.createStateOfSalesProductInstance(iri); - case "state_of_sign": - return SpatioTemporalExtentServices.createStateOfSign(iri); - case "state_of_socially_constructed_activity": - return SpatioTemporalExtentServices.createStateOfSociallyConstructedActivity(iri); - case "state_of_socially_constructed_object": - return SpatioTemporalExtentServices.createStateOfSociallyConstructedObject(iri); - case "state_of_system": - return SpatioTemporalExtentServices.createStateOfSystem(iri); - case "state_of_system_component": - return SpatioTemporalExtentServices.createStateOfSystemComponent(iri); - case "system": - return SpatioTemporalExtentServices.createSystem(iri); - case "system_component": - return SpatioTemporalExtentServices.createSystemComponent(iri); - case "temporal_composition": - return RelationshipServices.createTemporalComposition(iri); - case "thing": - return SpatioTemporalExtentServices.createThing(iri); - case "transferee": - return SpatioTemporalExtentServices.createTransferee(iri); - case "transfer_of_ownership": - return SpatioTemporalExtentServices.createTransferOfOwnership(iri); - case "transfer_of_ownership_of_money": - return SpatioTemporalExtentServices.createTransferOfOwnershipOfMoney(iri); - case "transferor": - return SpatioTemporalExtentServices.createTransferor(iri); - case "unit_of_measure": - return RelationshipServices.createUnitOfMeasure(iri); - case "participant_in_activity_or_association": - default: - // Check whether any extensions can handle the type. - for (final var service : getExtensionServices()) { - final Thing t = service.createEntity(typeName, iri); - if (t != null) { - return t; - } - } - // We still don't recognise the type so just create a Thing to represent it. - return SpatioTemporalExtentServices.createThing(iri); + /** + * Search extension libraries for the named type. + * + * @param typeName String type name. + * @param iri {@link IRI} + * @return {@link Thing} + */ + private static Thing findExtendedTypes(final String typeName, final IRI iri) { + // Check whether any extensions can handle the type. + for (final var service : getExtensionServices()) { + final Thing t = service.createEntity(typeName, iri); + if (t != null) { + return t; + } } + // We still don't recognise the type so just create a Thing to represent it. + return createThing(iri); + } + + // A Map of type names to factoryMethods that create instances of the type. + private static Map> factoryMethods = new HashMap<>(); + + static { + // + // Populate a map of type names to factory methods. + // + factoryMethods.put("AbstractObject", SpatioTemporalExtentServices::createAbstractObject); + factoryMethods.put("AcceptanceOfOffer", SpatioTemporalExtentServices::createAcceptanceOfOffer); + factoryMethods.put("AcceptanceOfOfferForGoods", + SpatioTemporalExtentServices::createAcceptanceOfOfferForGoods); + factoryMethods.put("aCtivity", SpatioTemporalExtentServices::createActivity); + factoryMethods.put("Aggregation", RelationshipServices::createAggregation); + factoryMethods.put("AgreeContract", SpatioTemporalExtentServices::createAgreeContract); + factoryMethods.put("AgreementExecution", SpatioTemporalExtentServices::createAgreementExecution); + factoryMethods.put("AgreementProcess", SpatioTemporalExtentServices::createAgreementProcess); + factoryMethods.put("AmountOfMoney", SpatioTemporalExtentServices::createAmountOfMoney); + factoryMethods.put("Asset", SpatioTemporalExtentServices::createAsset); + factoryMethods.put("Association", SpatioTemporalExtentServices::createAssociation); + factoryMethods.put("BeginningOfOwnership", SpatioTemporalExtentServices::createBeginningOfOwnership); + factoryMethods.put("BiologicalObject", SpatioTemporalExtentServices::createBiologicalObject); + factoryMethods.put("BiologicalSystem", SpatioTemporalExtentServices::createBiologicalSystem); + factoryMethods.put("BiologicalSystemComponent", + SpatioTemporalExtentServices::createBiologicalSystemComponent); + factoryMethods.put("Class", ClassServices::createClass); + factoryMethods.put("Classification", RelationshipServices::createClassification); + factoryMethods.put("ClassOfAbstractObject", ClassServices::createClassOfAbstractObject); + factoryMethods.put("ClassOfActivity", ClassServices::createClassOfActivity); + factoryMethods.put("ClassOfAgreeContract", ClassServices::createClassOfAgreeContract); + factoryMethods.put("ClassOfAgreementExecution", ClassServices::createClassOfAgreementExecution); + factoryMethods.put("ClassOfAgreementProcess", ClassServices::createClassOfAgreementProcess); + factoryMethods.put("ClassOfAmountOfMoney", ClassServices::createClassOfAmountOfMoney); + factoryMethods.put("ClassOfAssociation", ClassServices::createClassOfAssociation); + factoryMethods.put("ClassOfBiologicalObject", ClassServices::createClassOfBiologicalObject); + factoryMethods.put("ClassOfBiologicalSystem", ClassServices::createClassOfBiologicalSystem); + factoryMethods.put("ClassOfBiologicalSystemComponent", + ClassServices::createClassOfBiologicalSystemComponent); + factoryMethods.put("ClassOfClass", ClassServices::createClassOfClass); + factoryMethods.put("ClassOfClassOfSpatioTemporalExtent", + ClassServices::createClassOfSpatioTemporalExtent); + factoryMethods.put("ClassOfContractExecution", ClassServices::createClassOfContractExecution); + factoryMethods.put("ClassOfContractProcess", ClassServices::createClassOfContractProcess); + factoryMethods.put("ClassOfEvent", ClassServices::createClassOfEvent); + factoryMethods.put("ClassOfFunctionalObject", ClassServices::createClassOfFunctionalObject); + factoryMethods.put("ClassOfFunctionalSystem", ClassServices::createClassOfFunctionalSystem); + factoryMethods.put("ClassOfFunctionalSystemComponent", + ClassServices::createClassOfFunctionalSystemComponent); + factoryMethods.put("ClassOfIndividual", ClassServices::createClassOfIndividual); + factoryMethods.put("ClassOfInPlaceBiologicalComponent", + ClassServices::createClassOfInPlaceBiologicalComponent); + factoryMethods.put("ClassOfInstalledFunctionalSystemComponent", + ClassServices::createClassOfInstalledFunctionalSystemComponent); + factoryMethods.put("ClassOfInstalledObject", ClassServices::createClassOfInstalledObject); + factoryMethods.put("ClassOfIntentionallyConstructedObject", + ClassServices::createClassOfIntentionallyConstructedObject); + factoryMethods.put("ClassOfOffer", ClassServices::createClassOfOffer); + factoryMethods.put("ClassOfOrdinaryBiologicalObject", ClassServices::createClassOfOrdinaryBiologicalObject); + factoryMethods.put("ClassOfOrdinaryFunctionalObject", ClassServices::createClassOfOrdinaryFunctionalObject); + factoryMethods.put("ClassOfOrdinaryPhysicalObject", ClassServices::createClassOfOrdinaryPhysicalObject); + factoryMethods.put("ClassOfOrganization", ClassServices::createClassOfOrganization); + factoryMethods.put("ClassOfOrganizationComponent", ClassServices::createClassOfOrganizationComponent); + factoryMethods.put("ClassOfParticipant", ClassServices::createClassOfParticipant); + factoryMethods.put("ClassOfParty", ClassServices::createClassOfParty); + factoryMethods.put("ClassOfPeriodOfTime", ClassServices::createClassOfPeriodOfTime); + factoryMethods.put("ClassOfPerson", ClassServices::createClassOfPerson); + factoryMethods.put("ClassOfPersonInPosition", ClassServices::createClassOfPersonInPosition); + factoryMethods.put("ClassOfPhysicalObject", ClassServices::createClassOfPhysicalObject); + factoryMethods.put("ClassOfPhysicalProperty", ClassServices::createClassOfPhysicalProperty); + factoryMethods.put("ClassOfPhysicalQuantity", ClassServices::createClassOfPhysicalQuantity); + factoryMethods.put("ClassOfPointInTime", ClassServices::createClassOfPointInTime); + factoryMethods.put("ClassOfPosition", ClassServices::createClassOfPosition); + factoryMethods.put("ClassOfPossibleWorld", ClassServices::createClassOfPossibleWorld); + factoryMethods.put("ClassOfReachingAgreement", ClassServices::createClassOfReachingAgreement); + factoryMethods.put("ClassOfRelationship", ClassServices::createClassOfRelationship); + factoryMethods.put("ClassOfRepresentation", ClassServices::createClassOfRepresentation); + factoryMethods.put("ClassOfSalesProductInstance", ClassServices::createClassOfSalesProductInstance); + factoryMethods.put("ClassOfSign", ClassServices::createClassOfSign); + factoryMethods.put("ClassOfSociallyConstructedActivity", + ClassServices::createClassOfSociallyConstructedActivity); + factoryMethods.put("ClassOfSociallyConstructedObject", + ClassServices::createClassOfSociallyConstructedObject); + factoryMethods.put("ClassOfSpatioTemporalExtent", ClassServices::createClassOfSpatioTemporalExtent); + factoryMethods.put("ClassOfState", ClassServices::createClassOfState); + factoryMethods.put("ClassOfStateOfActivity", ClassServices::createClassOfStateOfActivity); + factoryMethods.put("ClassOfStateOfAmountOfMoney", ClassServices::createClassOfStateOfAmountOfMoney); + factoryMethods.put("ClassOfStateOfAssociation", ClassServices::createClassOfStateOfAssociation); + factoryMethods.put("ClassOfStateOfBiologicalObject", ClassServices::createClassOfStateOfBiologicalObject); + factoryMethods.put("ClassOfStateOfBiologicalSystem", ClassServices::createClassOfStateOfBiologicalSystem); + factoryMethods.put("ClassOfStateOfBiologicalSystemComponent", + ClassServices::createClassOfStateOfBiologicalSystemComponent); + factoryMethods.put("ClassOfStateOfFunctionalObject", ClassServices::createClassOfStateOfFunctionalObject); + factoryMethods.put("ClassOfStateOfFunctionalSystem", ClassServices::createClassOfStateOfFunctionalSystem); + factoryMethods.put("ClassOfStateOfFunctionalSystemComponent", + ClassServices::createClassOfStateOfFunctionalSystemComponent); + factoryMethods.put("ClassOfStateOfIntentionallyConstructedObject", + ClassServices::createClassOfStateOfIntentionallyConstructedObject); + factoryMethods.put("ClassOfStateOfOrdinaryBiologicalObject", + ClassServices::createClassOfStateOfOrdinaryBiologicalObject); + factoryMethods.put("ClassOfStateOfOrdinaryFunctionalObject", + ClassServices::createClassOfStateOfOrdinaryFunctionalObject); + factoryMethods.put("ClassOfStateOfOrdinaryPhysicalObject", + ClassServices::createClassOfStateOfOrdinaryPhysicalObject); + factoryMethods.put("ClassOfStateOfOrganization", ClassServices::createClassOfStateOfOrganization); + factoryMethods.put("ClassOfStateOfOrganizationComponent", + ClassServices::createClassOfStateOfOrganizationComponent); + factoryMethods.put("ClassOfStateOfParty", ClassServices::createClassOfStateOfParty); + factoryMethods.put("ClassOfStateOfPerson", ClassServices::createClassOfStateOfPerson); + factoryMethods.put("ClassOfStateOfPhysicalObject", ClassServices::createClassOfStateOfPhysicalObject); + factoryMethods.put("ClassOfStateOfPosition", ClassServices::createClassOfStateOfPosition); + factoryMethods.put("ClassOfStateOfSalesProductInstance", + ClassServices::createClassOfStateOfSalesProductInstance); + factoryMethods.put("ClassOfStateOfSign", ClassServices::createClassOfStateOfSign); + factoryMethods.put("ClassOfStateOfSociallyConstructedActivity", + ClassServices::createClassOfStateOfSociallyConstructedActivity); + factoryMethods.put("ClassOfStateOfSociallyConstructedObject", + ClassServices::createClassOfStateOfSociallyConstructedObject); + factoryMethods.put("ClassOfStateOfSystem", ClassServices::createClassOfStateOfSystem); + factoryMethods.put("ClassOfStateOfSystemComponent", ClassServices::createClassOfStateOfSystemComponent); + factoryMethods.put("ClassOfSystem", ClassServices::createClassOfSystem); + factoryMethods.put("ClassOfSystemComponent", ClassServices::createClassOfSystemComponent); + factoryMethods.put("Composition", RelationshipServices::createComposition); + factoryMethods.put("ContractExecution", SpatioTemporalExtentServices::createContractExecution); + factoryMethods.put("ContractProcess", SpatioTemporalExtentServices::createContractProcess); + factoryMethods.put("Currency", SpatioTemporalExtentServices::createCurrency); + factoryMethods.put("DefinedRelationship", RelationshipServices::createDefinedRelationship); + factoryMethods.put("Definition", ClassServices::createDefinition); + factoryMethods.put("Description", ClassServices::createDescription); + factoryMethods.put("Employee", SpatioTemporalExtentServices::createEmployee); + factoryMethods.put("Employer", SpatioTemporalExtentServices::createEmployer); + factoryMethods.put("Employment", SpatioTemporalExtentServices::createEmployment); + factoryMethods.put("EndingOfOwnership", SpatioTemporalExtentServices::createEndingOfOwnership); + factoryMethods.put("EnumeratedClass", ClassServices::createEnumeratedClass); + factoryMethods.put("Event", SpatioTemporalExtentServices::createEvent); + factoryMethods.put("ExchangeOfGoodsAndMoney", SpatioTemporalExtentServices::createExchangeOfGoodsAndMoney); + factoryMethods.put("Function", RelationshipServices::createFunction); + factoryMethods.put("FunctionalObject", SpatioTemporalExtentServices::createFunctionalObject); + factoryMethods.put("FunctionalSystem", SpatioTemporalExtentServices::createFunctionalSystem); + factoryMethods.put("FunctionalSystemComponent", + SpatioTemporalExtentServices::createFunctionalSystemComponent); + factoryMethods.put("Identification", ClassServices::createIdentification); + factoryMethods.put("IdentificationOfPhysicalQuantity", + SpatioTemporalExtentServices::createIdentificationOfPhysicalQuantity); + factoryMethods.put("Individual", SpatioTemporalExtentServices::createIndividual); + factoryMethods.put("InPlaceBiologicalComponent", + SpatioTemporalExtentServices::createInPlaceBiologicalComponent); + factoryMethods.put("InstalledFunctionalSystemComponent", + SpatioTemporalExtentServices::createInstalledFunctionalSystemComponent); + factoryMethods.put("InstalledObject", SpatioTemporalExtentServices::createInstalledObject); + factoryMethods.put("IntentionallyConstructedObject", + SpatioTemporalExtentServices::createIntentionallyConstructedObject); + factoryMethods.put("KindOfActivity", ClassServices::createKindOfActivity); + factoryMethods.put("KindOfAssociation", ClassServices::createKindOfAssociation); + factoryMethods.put("KindOfBiologicalObject", ClassServices::createKindOfBiologicalObject); + factoryMethods.put("KindOfBiologicalSystem", ClassServices::createKindOfBiologicalSystem); + factoryMethods.put("KindOfBiologicalSystemComponent", ClassServices::createKindOfBiologicalSystemComponent); + factoryMethods.put("KindOfFunctionalObject", ClassServices::createKindOfFunctionalObject); + factoryMethods.put("KindOfFunctionalSystem", ClassServices::createKindOfFunctionalSystem); + factoryMethods.put("KindOfFunctionalSystemComponent", ClassServices::createKindOfFunctionalSystemComponent); + factoryMethods.put("KindOfIndividual", ClassServices::createKindOfIndividual); + factoryMethods.put("KindOfIntentionallyConstructedObject", + ClassServices::createKindOfIntentionallyConstructedObject); + factoryMethods.put("KindOfOrdinaryBiologicalObject", ClassServices::createKindOfOrdinaryBiologicalObject); + factoryMethods.put("KindOfOrdinaryFunctionalObject", ClassServices::createKindOfOrdinaryFunctionalObject); + factoryMethods.put("KindOfOrdinaryPhysicalObject", ClassServices::createKindOfOrdinaryPhysicalObject); + factoryMethods.put("KindOfOrganization", ClassServices::createKindOfOrganization); + factoryMethods.put("KindOfOrganizationComponent", ClassServices::createKindOfOrganizationComponent); + factoryMethods.put("KindOfParty", ClassServices::createKindOfParty); + factoryMethods.put("KindOfPerson", ClassServices::createKindOfPerson); + factoryMethods.put("KindOfPhysicalObject", ClassServices::createKindOfPhysicalObject); + factoryMethods.put("KindOfPhysicalProperty", ClassServices::createKindOfPhysicalProperty); + factoryMethods.put("KindOfPhysicalQuantity", ClassServices::createKindOfPhysicalQuantity); + factoryMethods.put("KindOfPosition", ClassServices::createKindOfPosition); + factoryMethods.put("KindOfRelationshipWithRestriction", + ClassServices::createKindOfRelationshipWithRestriction); + factoryMethods.put("KindOfRelationshipWithSignature", ClassServices::createKindOfRelationshipWithSignature); + factoryMethods.put("KindOfSociallyConstructedObject", ClassServices::createKindOfSociallyConstructedObject); + factoryMethods.put("KindOfSystem", ClassServices::createKindOfSystem); + factoryMethods.put("KindOfSystemComponent", ClassServices::createKindOfSystemComponent); + factoryMethods.put("LanguageCommunity", SpatioTemporalExtentServices::createLanguageCommunity); + factoryMethods.put("MoneyAsset", SpatioTemporalExtentServices::createMoneyAsset); + factoryMethods.put("Offer", SpatioTemporalExtentServices::createOffer); + factoryMethods.put("OfferAndAcceptanceForGoods", + SpatioTemporalExtentServices::createOfferAndAcceptanceForGoods); + factoryMethods.put("OfferForGoods", SpatioTemporalExtentServices::createOfferForGoods); + factoryMethods.put("Offering", SpatioTemporalExtentServices::createOffering); + factoryMethods.put("OrdinaryBiologicalObject", SpatioTemporalExtentServices::createOrdinaryBiologicalObject); + factoryMethods.put("OrdinaryFunctionalObject", SpatioTemporalExtentServices::createOrdinaryFunctionalObject); + factoryMethods.put("OrdinaryPhysicalObject", SpatioTemporalExtentServices::createOrdinaryPhysicalObject); + factoryMethods.put("Organization", SpatioTemporalExtentServices::createOrganization); + factoryMethods.put("OrganizationComponent", SpatioTemporalExtentServices::createOrganizationComponent); + factoryMethods.put("Owner", SpatioTemporalExtentServices::createOwner); + factoryMethods.put("Ownership", SpatioTemporalExtentServices::createOwnership); + factoryMethods.put("Participant", SpatioTemporalExtentServices::createParticipant); + factoryMethods.put("Party", SpatioTemporalExtentServices::createParty); + factoryMethods.put("Pattern", ClassServices::createPattern); + factoryMethods.put("PeriodOfTime", SpatioTemporalExtentServices::createPeriodOfTime); + factoryMethods.put("Person", SpatioTemporalExtentServices::createPerson); + factoryMethods.put("PersonInPosition", SpatioTemporalExtentServices::createPersonInPosition); + factoryMethods.put("PhysicalObject", SpatioTemporalExtentServices::createPhysicalObject); + factoryMethods.put("PhysicalProperty", SpatioTemporalExtentServices::createPhysicalProperty); + factoryMethods.put("PhysicalPropertyRange", SpatioTemporalExtentServices::createPhysicalPropertyRange); + factoryMethods.put("PhysicalQuantity", SpatioTemporalExtentServices::createPhysicalQuantity); + factoryMethods.put("PhysicalQuantityRange", SpatioTemporalExtentServices::createPhysicalQuantityRange); + factoryMethods.put("Plan", SpatioTemporalExtentServices::createPlan); + factoryMethods.put("PointInTime", SpatioTemporalExtentServices::createPointInTime); + factoryMethods.put("Position", SpatioTemporalExtentServices::createPosition); + factoryMethods.put("PossibleWorld", SpatioTemporalExtentServices::createPossibleWorld); + factoryMethods.put("Price", SpatioTemporalExtentServices::createPrice); + factoryMethods.put("ProductBrand", SpatioTemporalExtentServices::createProductBrand); + factoryMethods.put("ProductOffering", SpatioTemporalExtentServices::createProductOffering); + factoryMethods.put("ReachingAgreement", SpatioTemporalExtentServices::createReachingAgreement); + factoryMethods.put("RecognizingLanguageCommunity", + SpatioTemporalExtentServices::createRecognizingLanguageCommunity); + factoryMethods.put("Relationship", RelationshipServices::createRelationship); + factoryMethods.put("RepresentationByPattern", ClassServices::createRepresentationByPattern); + factoryMethods.put("RepresentationBySign", SpatioTemporalExtentServices::createRepresentationBySign); + factoryMethods.put("Requirement", SpatioTemporalExtentServices::createRequirement); + factoryMethods.put("RequirementSpecification", SpatioTemporalExtentServices::createRequirementSpecification); + factoryMethods.put("Role", ClassServices::createRole); + factoryMethods.put("SaleOfGoods", SpatioTemporalExtentServices::createSaleOfGoods); + factoryMethods.put("SalesProduct", SpatioTemporalExtentServices::createSalesProduct); + factoryMethods.put("SalesProductInstance", SpatioTemporalExtentServices::createSalesProductInstance); + factoryMethods.put("SalesProductVersion", SpatioTemporalExtentServices::createSalesProductVersion); + factoryMethods.put("Scale", RelationshipServices::createScale); + factoryMethods.put("Sign", SpatioTemporalExtentServices::createSign); + factoryMethods.put("SociallyConstructedActivity", + SpatioTemporalExtentServices::createSociallyConstructedActivity); + factoryMethods.put("SociallyConstructedObject", + SpatioTemporalExtentServices::createSociallyConstructedObject); + factoryMethods.put("SpatioTemporalExtent", SpatioTemporalExtentServices::createSpatioTemporalExtent); + factoryMethods.put("Specialization", RelationshipServices::createSpecialization); + factoryMethods.put("State", SpatioTemporalExtentServices::createState); + factoryMethods.put("StateOfActivity", SpatioTemporalExtentServices::createStateOfActivity); + factoryMethods.put("StateOfAmountOfMoney", SpatioTemporalExtentServices::createStateOfAmountOfMoney); + factoryMethods.put("StateOfAssociation", SpatioTemporalExtentServices::createStateOfAssociation); + factoryMethods.put("StateOfBiologicalObject", SpatioTemporalExtentServices::createStateOfBiologicalObject); + factoryMethods.put("StateOfBiologicalSystem", SpatioTemporalExtentServices::createStateOfBiologicalSystem); + factoryMethods.put("StateOfBiologicalSystemComponent", + SpatioTemporalExtentServices::createStateOfBiologicalSystemComponent); + factoryMethods.put("StateOfFunctionalObject", SpatioTemporalExtentServices::createStateOfFunctionalObject); + factoryMethods.put("StateOfFunctionalSystem", SpatioTemporalExtentServices::createStateOfFunctionalSystem); + factoryMethods.put("StateOfFunctionalSystemComponent", + SpatioTemporalExtentServices::createStateOfFunctionalSystemComponent); + factoryMethods.put("StateOfIntentionallyConstructedObject", + SpatioTemporalExtentServices::createStateOfIntentionallyConstructedObject); + factoryMethods.put("StateOfLanguageCommunity", SpatioTemporalExtentServices::createStateOfLanguageCommunity); + factoryMethods.put("StateOfOrdinaryBiologicalObject", + SpatioTemporalExtentServices::createStateOfOrdinaryBiologicalObject); + factoryMethods.put("StateOfOrdinaryFunctionalObject", + SpatioTemporalExtentServices::createStateOfOrdinaryFunctionalObject); + factoryMethods.put("StateOfOrdinaryPhysicalObject", + SpatioTemporalExtentServices::createStateOfOrdinaryPhysicalObject); + factoryMethods.put("StateOfOrganization", SpatioTemporalExtentServices::createStateOfOrganization); + factoryMethods.put("StateOfOrganizationComponent", + SpatioTemporalExtentServices::createStateOfOrganizationComponent); + factoryMethods.put("StateOfParty", SpatioTemporalExtentServices::createStateOfParty); + factoryMethods.put("StateOfPerson", SpatioTemporalExtentServices::createStateOfPerson); + factoryMethods.put("StateOfPhysicalObject", SpatioTemporalExtentServices::createStateOfPhysicalObject); + factoryMethods.put("StateOfPosition", SpatioTemporalExtentServices::createStateOfPosition); + factoryMethods.put("StateOfSalesProductInstance", + SpatioTemporalExtentServices::createStateOfSalesProductInstance); + factoryMethods.put("StateOfSign", SpatioTemporalExtentServices::createStateOfSign); + factoryMethods.put("StateOfSociallyConstructedActivity", + SpatioTemporalExtentServices::createStateOfSociallyConstructedActivity); + factoryMethods.put("StateOfSociallyConstructedObject", + SpatioTemporalExtentServices::createStateOfSociallyConstructedObject); + factoryMethods.put("StateOfSystem", SpatioTemporalExtentServices::createStateOfSystem); + factoryMethods.put("StateOfSystemComponent", SpatioTemporalExtentServices::createStateOfSystemComponent); + factoryMethods.put("System", SpatioTemporalExtentServices::createSystem); + factoryMethods.put("SystemComponent", SpatioTemporalExtentServices::createSystemComponent); + factoryMethods.put("TemporalComposition", RelationshipServices::createTemporalComposition); + factoryMethods.put("Thing", SpatioTemporalExtentServices::createThing); + factoryMethods.put("Transferee", SpatioTemporalExtentServices::createTransferee); + factoryMethods.put("TransferOfOwnership", SpatioTemporalExtentServices::createTransferOfOwnership); + factoryMethods.put("TransferOfOwnershipOfMoney", + SpatioTemporalExtentServices::createTransferOfOwnershipOfMoney); + factoryMethods.put("Transferor", SpatioTemporalExtentServices::createTransferor); + factoryMethods.put("UnitOfMeasure", RelationshipServices::createUnitOfMeasure); } } diff --git a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java index 21b6ac6e..efd3cd8c 100755 --- a/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java +++ b/hqdm/src/main/java/uk/gov/gchq/magmacore/hqdm/rdf/iri/HQDM.java @@ -23,24 +23,29 @@ private HQDM() { } /** HQDM namespace. */ - public static final IriBase HQDM = new IriBase("hqdm", "https://hqdmtop.github.io/hqdm#"); + public static final IriBase HQDM = new IriBase("hqdm", "https://hqdmtop.github.io/hqdmOntology/1.0.0#"); + + /** SKOS namespace. */ + public static final IriBase SKOS = new IriBase("skos", "http://www.w3.org/2004/02/skos/core#"); /** A human-interpretable name for a particular HQDM entity. */ - public static final HqdmIri ENTITY_NAME = new HqdmIri(HQDM, "data_EntityName"); + public static final HqdmIri ENTITY_NAME = new HqdmIri(SKOS, "prefLabel"); + /** Used to add values to signs etc. **/ + public static final HqdmIri SKOS_DEFINITION = new HqdmIri(SKOS, "definition"); // ======================================================================= // 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"); + public static final HqdmIri ABSTRACT_OBJECT = new HqdmIri(HQDM, "AbstractObject"); /** * 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"); + public static final HqdmIri ACCEPTANCE_OF_OFFER = new HqdmIri(HQDM, "AcceptanceOfOffer"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} that consists of one or more @@ -49,20 +54,20 @@ private HQDM() { * {@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"); + public static final HqdmIri ACCEPTANCE_OF_OFFER_FOR_GOODS = new HqdmIri(HQDM, "AcceptanceOfOfferForGoods"); /** * 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"); + 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"); + public static final HqdmIri AGGREGATION = new HqdmIri(HQDM, "Aggregation"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} that consists of an @@ -70,13 +75,13 @@ private HQDM() { * {@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"); + public static final HqdmIri AGREE_CONTRACT = new HqdmIri(HQDM, "AgreeContract"); /** * 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"); + public static final HqdmIri AGREEMENT_EXECUTION = new HqdmIri(HQDM, "AgreementExecution"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} that consists of a @@ -85,7 +90,7 @@ private HQDM() { * {@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"); + public static final HqdmIri AGREEMENT_PROCESS = new HqdmIri(HQDM, "AgreementProcess"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfAmountOfMoney}, that is also a @@ -93,14 +98,14 @@ private HQDM() { * {@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"); + public static final HqdmIri AMOUNT_OF_MONEY = new HqdmIri(HQDM, "AmountOfMoney"); /** * 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"); + public static final HqdmIri ASSET = new HqdmIri(HQDM, "Asset"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Individual} that {@link #CONSISTS_OF} the @@ -108,26 +113,26 @@ private HQDM() { * {@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"); + 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"); + public static final HqdmIri BEGINNING_OF_OWNERSHIP = new HqdmIri(HQDM, "BeginningOfOwnership"); /** * 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"); + public static final HqdmIri BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "BiologicalObject"); /** * 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"); + public static final HqdmIri BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "BiologicalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.BiologicalObject}, @@ -136,51 +141,51 @@ private HQDM() { * {@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"); + public static final HqdmIri BIOLOGICAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "BiologicalSystemComponent"); /** * 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"); + 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"); + 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"); + public static final HqdmIri CLASS_OF_ABSTRACT_OBJECT = new HqdmIri(HQDM, "ClassOfAbstractObject"); /** * 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"); + public static final HqdmIri CLASS_OF_ACTIVITY = new HqdmIri(HQDM, "ClassOfActivity"); /** * 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"); + public static final HqdmIri CLASS_OF_AGREE_CONTRACT = new HqdmIri(HQDM, "ClassOfAgreeContract"); /** * 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"); + public static final HqdmIri CLASS_OF_AGREEMENT_EXECUTION = new HqdmIri(HQDM, "ClassOfAgreementExecution"); /** * 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"); + public static final HqdmIri CLASS_OF_AGREEMENT_PROCESS = new HqdmIri(HQDM, "ClassOfAgreementProcess"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfAmountOfMoney}, that is also a @@ -188,21 +193,21 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "ClassOfAmountOfMoney"); /** * 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"); + public static final HqdmIri CLASS_OF_ASSOCIATION = new HqdmIri(HQDM, "ClassOfAssociation"); /** * 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"); + public static final HqdmIri CLASS_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "ClassOfBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystem}, @@ -210,7 +215,7 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "ClassOfBiologicalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalObject}, @@ -219,38 +224,38 @@ private HQDM() { * {@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"); + "ClassOfBiologicalSystemComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_CLASS = new HqdmIri(HQDM, "ClassOfClass"); /** * 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"); + "ClassOfClassOfSpatioTemporalExtent"); /** * 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"); + public static final HqdmIri CLASS_OF_CONTRACT_EXECUTION = new HqdmIri(HQDM, "ClassOfContractExecution"); /** * 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"); + public static final HqdmIri CLASS_OF_CONTRACT_PROCESS = new HqdmIri(HQDM, "ClassOfContractProcess"); /** * 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"); + public static final HqdmIri CLASS_OF_EVENT = new HqdmIri(HQDM, "ClassOfEvent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalObject}, @@ -258,7 +263,7 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "ClassOfFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystem}, that is also a @@ -266,7 +271,7 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "ClassOfFunctionalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent}, and @@ -274,13 +279,13 @@ private HQDM() { * {@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"); + "ClassOfFunctionalSystemComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_INDIVIDUAL = new HqdmIri(HQDM, "ClassOfIndividual"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalSystemComponent}, that is also @@ -289,7 +294,7 @@ private HQDM() { * {@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"); + "ClassOfInPlaceBiologicalComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalSystemComponent} that is also a @@ -298,14 +303,14 @@ private HQDM() { * subsets. */ public static final HqdmIri CLASS_OF_INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "class_of_installed_functional_system_component"); + "ClassOfInstalledFunctionalSystemComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_INSTALLED_OBJECT = new HqdmIri(HQDM, "ClassOfInstalledObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIndividual} that is also a @@ -313,13 +318,13 @@ private HQDM() { * {@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"); + "ClassOfIntentionallyConstructedObject"); /** * 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"); + public static final HqdmIri CLASS_OF_OFFER = new HqdmIri(HQDM, "ClassOfOffer"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalObject}, @@ -328,7 +333,7 @@ private HQDM() { * {@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"); + "ClassOfOrdinaryBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject}, that is also a @@ -337,7 +342,7 @@ private HQDM() { * {@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"); + "ClassOfOrdinaryFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryPhysicalObject} that is also a @@ -345,7 +350,7 @@ private HQDM() { * {@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"); + "ClassOfOrdinaryPhysicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganization}, that is also a @@ -353,7 +358,7 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_ORGANIZATION = new HqdmIri(HQDM, "ClassOfOrganization"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrganizationComponent}, that is also a @@ -361,25 +366,25 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "ClassOfOrganizationComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_PARTICIPANT = new HqdmIri(HQDM, "ClassOfParticipant"); /** * 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"); + public static final HqdmIri CLASS_OF_PARTY = new HqdmIri(HQDM, "ClassOfParty"); /** * 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"); + public static final HqdmIri CLASS_OF_PERIOD_OF_TIME = new HqdmIri(HQDM, "ClassOfPeriodOfTime"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystem}, @@ -387,85 +392,85 @@ private HQDM() { * {@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"); + public static final HqdmIri CLASS_OF_PERSON = new HqdmIri(HQDM, "ClassOfPerson"); /** * 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"); + public static final HqdmIri CLASS_OF_PERSON_IN_POSITION = new HqdmIri(HQDM, "ClassOfPersonInPosition"); /** * 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"); + public static final HqdmIri CLASS_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "ClassOfPhysicalObject"); /** * 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"); + public static final HqdmIri CLASS_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "ClassOfPhysicalProperty"); /** * 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"); + public static final HqdmIri CLASS_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "ClassOfPhysicalQuantity"); /** * 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"); + public static final HqdmIri CLASS_OF_POINT_IN_TIME = new HqdmIri(HQDM, "ClassOfPointInTime"); /** * 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"); + public static final HqdmIri CLASS_OF_POSITION = new HqdmIri(HQDM, "ClassOfPosition"); /** * 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"); + public static final HqdmIri CLASS_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "ClassOfPossibleWorld"); /** * 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"); + public static final HqdmIri CLASS_OF_REACHING_AGREEMENT = new HqdmIri(HQDM, "ClassOfReachingAgreement"); /** * 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"); + public static final HqdmIri CLASS_OF_RELATIONSHIP = new HqdmIri(HQDM, "ClassOfRelationship"); /** * 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"); + public static final HqdmIri CLASS_OF_REPRESENTATION = new HqdmIri(HQDM, "ClassOfRepresentation"); /** * 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"); + public static final HqdmIri CLASS_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "ClassOfSalesProductInstance"); /** * 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"); + public static final HqdmIri CLASS_OF_SIGN = new HqdmIri(HQDM, "ClassOfSign"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject} and @@ -473,32 +478,32 @@ private HQDM() { * {@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"); + "ClassOfSociallyConstructedActivity"); /** * 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"); + "ClassOfSociallyConstructedObject"); /** * 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"); + public static final HqdmIri CLASS_OF_SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "ClassOfSpatioTemporalExtent"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE = new HqdmIri(HQDM, "ClassOfState"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_ACTIVITY = new HqdmIri(HQDM, "ClassOfStateOfActivity"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSociallyConstructedObject} that is also a @@ -506,20 +511,20 @@ private HQDM() { * {@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"); + "ClassOfStateOfAmountOfMoney"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "ClassOfStateOfAssociation"); /** * 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"); + "ClassOfStateOfBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryBiologicalObject} and @@ -527,7 +532,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfBiologicalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalObject} and @@ -535,7 +540,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfBiologicalSystemComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfPhysicalObject} and @@ -543,7 +548,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a @@ -551,7 +556,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfFunctionalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfOrdinaryFunctionalObject} that is also a @@ -559,7 +564,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfFunctionalSystemComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfState} that is @@ -567,7 +572,7 @@ private HQDM() { * subsets. */ public static final HqdmIri CLASS_OF_STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "class_of_state_of_intentionally_constructed_object"); + "ClassOfStateOfIntentionallyConstructedObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfBiologicalObject} that is also a @@ -575,7 +580,7 @@ private HQDM() { * {@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"); + "ClassOfStateOfOrdinaryBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfFunctionalObject} that is also a @@ -583,21 +588,21 @@ private HQDM() { * {@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"); + "ClassOfStateOfOrdinaryFunctionalObject"); /** * 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"); + "ClassOfStateOfOrdinaryPhysicalObject"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "ClassOfStateOfOrganization"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfStateOfSystemComponent} that is also a @@ -605,143 +610,143 @@ private HQDM() { * {@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"); + "ClassOfStateOfOrganizationComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_PARTY = new HqdmIri(HQDM, "ClassOfStateOfParty"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_PERSON = new HqdmIri(HQDM, "ClassOfStateOfPerson"); /** * 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"); + "ClassOfStateOfPhysicalObject"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_POSITION = new HqdmIri(HQDM, "ClassOfStateOfPosition"); /** * 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"); + "ClassOfStateOfSalesProductInstance"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_SIGN = new HqdmIri(HQDM, "ClassOfStateOfSign"); /** * 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"); + "ClassOfStateOfSociallyConstructedActivity"); /** * 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"); + "ClassOfStateOfSociallyConstructedObject"); /** * 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"); + public static final HqdmIri CLASS_OF_STATE_OF_SYSTEM = new HqdmIri(HQDM, "ClassOfStateOfSystem"); /** * 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"); + "ClassOfStateOfSystemComponent"); /** * 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"); + public static final HqdmIri CLASS_OF_SYSTEM = new HqdmIri(HQDM, "ClassOfSystem"); /** * 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"); + public static final HqdmIri CLASS_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "ClassOfSystemComponent"); /** * 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"); + 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"); + public static final HqdmIri CONTRACT_EXECUTION = new HqdmIri(HQDM, "ContractExecution"); /** * 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"); + public static final HqdmIri CONTRACT_PROCESS = new HqdmIri(HQDM, "ContractProcess"); /** * 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"); + 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"); + public static final HqdmIri DEFINED_RELATIONSHIP = new HqdmIri(HQDM, "DefinedRelationship"); /** * 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"); + 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"); + 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"); + 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"); + public static final HqdmIri EMPLOYER = new HqdmIri(HQDM, "Employer"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} that consists of an @@ -750,62 +755,62 @@ private HQDM() { * {@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"); + 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"); + public static final HqdmIri ENDING_OF_OWNERSHIP = new HqdmIri(HQDM, "EndingOfOwnership"); /** * 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"); + public static final HqdmIri ENUMERATED_CLASS = new HqdmIri(HQDM, "EnumeratedClass"); /** * 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"); + 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"); + public static final HqdmIri EXCHANGE_OF_GOODS_AND_MONEY = new HqdmIri(HQDM, "ExchangeOfGoodsAndMoney"); /** * A one-to-many {@link uk.gov.gchq.magmacore.hqdm.model.Relationship}. */ - public static final HqdmIri FUNCTION_ = new HqdmIri(HQDM, "function_"); + 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"); + public static final HqdmIri FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "FunctionalObject"); /** * 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"); + public static final HqdmIri FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "FunctionalSystem"); /** * 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"); + public static final HqdmIri FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, "FunctionalSystemComponent"); /** * 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"); + public static final HqdmIri IDENTIFICATION = new HqdmIri(HQDM, "Identification"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Identification} that identifies a @@ -815,21 +820,21 @@ private HQDM() { * {@link uk.gov.gchq.magmacore.hqdm.model.Scale}. */ public static final HqdmIri IDENTIFICATION_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, - "identification_of_physical_quantity"); + "IdentificationOfPhysicalQuantity"); /** * 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"); + 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"); + public static final HqdmIri IN_PLACE_BIOLOGICAL_COMPONENT = new HqdmIri(HQDM, "InPlaceBiologicalComponent"); /** * Any {@link uk.gov.gchq.magmacore.hqdm.model.InstalledObject} that is also a @@ -837,7 +842,7 @@ private HQDM() { * {@link uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent}. */ public static final HqdmIri INSTALLED_FUNCTIONAL_SYSTEM_COMPONENT = new HqdmIri(HQDM, - "installed_functional_system_component"); + "InstalledFunctionalSystemComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryPhysicalObject} that is also a @@ -846,7 +851,7 @@ private HQDM() { * 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"); + public static final HqdmIri INSTALLED_OBJECT = new HqdmIri(HQDM, "InstalledObject"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Individual} and @@ -854,33 +859,33 @@ private HQDM() { * intentionally constructed. */ public static final HqdmIri INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "intentionally_constructed_object"); + "IntentionallyConstructedObject"); /** * 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"); + public static final HqdmIri KIND_OF_ACTIVITY = new HqdmIri(HQDM, "KindOfActivity"); /** * 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"); + public static final HqdmIri KIND_OF_ASSOCIATION = new HqdmIri(HQDM, "KindOfAssociation"); /** * 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"); + public static final HqdmIri KIND_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "KindOfBiologicalObject"); /** * 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"); + public static final HqdmIri KIND_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "KindOfBiologicalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfBiologicalSystemComponent} that is also a @@ -889,7 +894,7 @@ private HQDM() { * {@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"); + "KindOfBiologicalSystemComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalObject}, that is also a @@ -898,7 +903,7 @@ private HQDM() { * {@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"); + public static final HqdmIri KIND_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "KindOfFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystem} that is also a @@ -906,7 +911,7 @@ private HQDM() { * {@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"); + public static final HqdmIri KIND_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "KindOfFunctionalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfFunctionalSystemComponent} that is also a @@ -914,13 +919,13 @@ private HQDM() { * {@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"); + "KindOfFunctionalSystemComponent"); /** * 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"); + public static final HqdmIri KIND_OF_INDIVIDUAL = new HqdmIri(HQDM, "KindOfIndividual"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfIntentionallyConstructedObject} that is also a @@ -929,7 +934,7 @@ private HQDM() { * kind. */ public static final HqdmIri KIND_OF_INTENTIONALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "kind_of_intentionally_constructed_object"); + "KindOfIntentionallyConstructedObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject} a @@ -938,7 +943,7 @@ private HQDM() { * {@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"); + "KindOfOrdinaryBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryBiologicalObject}, that is also a @@ -947,7 +952,7 @@ private HQDM() { * {@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"); + "KindOfOrdinaryFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a @@ -956,7 +961,7 @@ private HQDM() { * kind. */ public static final HqdmIri KIND_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "kind_of_ordinary_physical_object"); + "KindOfOrdinaryPhysicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOrdinaryPhysicalObject} that is also a @@ -964,39 +969,39 @@ private HQDM() { * {@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"); + public static final HqdmIri KIND_OF_ORGANIZATION = new HqdmIri(HQDM, "KindOfOrganization"); /** * 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"); + public static final HqdmIri KIND_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "KindOfOrganizationComponent"); /** * 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"); + public static final HqdmIri KIND_OF_PARTY = new HqdmIri(HQDM, "KindOfParty"); /** * 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"); + public static final HqdmIri KIND_OF_PERSON = new HqdmIri(HQDM, "KindOfPerson"); /** * 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"); + public static final HqdmIri KIND_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "KindOfPhysicalObject"); /** * 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"); + public static final HqdmIri KIND_OF_PHYSICAL_PROPERTY = new HqdmIri(HQDM, "KindOfPhysicalProperty"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfPhysicalQuantity} that is also a @@ -1004,21 +1009,21 @@ private HQDM() { * 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"); + public static final HqdmIri KIND_OF_PHYSICAL_QUANTITY = new HqdmIri(HQDM, "KindOfPhysicalQuantity"); /** * 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"); + public static final HqdmIri KIND_OF_POSITION = new HqdmIri(HQDM, "KindOfPosition"); /** * 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"); + "KindOfRelationshipWithRestriction"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfRelationship} that is a subset of @@ -1029,7 +1034,7 @@ private HQDM() { * {@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"); + "KindOfRelationshipWithSignature"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfSociallyConstructedObject} that is also a @@ -1038,39 +1043,39 @@ private HQDM() { * the same kind. */ public static final HqdmIri KIND_OF_SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, - "kind_of_socially_constructed_object"); + "KindOfSociallyConstructedObject"); /** * 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"); + public static final HqdmIri KIND_OF_SYSTEM = new HqdmIri(HQDM, "KindOfSystem"); /** * 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"); + public static final HqdmIri KIND_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "KindOfSystemComponent"); /** * 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"); + public static final HqdmIri LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "LanguageCommunity"); /** * 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"); + public static final HqdmIri MONEY_ASSET = new HqdmIri(HQDM, "MoneyAsset"); /** * 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"); + public static final HqdmIri OFFER = new HqdmIri(HQDM, "Offer"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ReachingAgreement} that {@link #CONSISTS_OF} exactly @@ -1078,13 +1083,13 @@ private HQDM() { * {@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"); + public static final HqdmIri OFFER_AND_ACCEPTANCE_FOR_GOODS = new HqdmIri(HQDM, "OfferAndAcceptanceForGoods"); /** * 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"); + public static final HqdmIri OFFER_FOR_GOODS = new HqdmIri(HQDM, "OfferForGoods"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfOffer} that is for a @@ -1093,7 +1098,7 @@ private HQDM() { * {@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"); + public static final HqdmIri OFFERING = new HqdmIri(HQDM, "Offering"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject}, a @@ -1102,20 +1107,20 @@ private HQDM() { * {@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"); + public static final HqdmIri ORDINARY_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "OrdinaryBiologicalObject"); /** * 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"); + public static final HqdmIri ORDINARY_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "OrdinaryFunctionalObject"); /** * 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"); + public static final HqdmIri ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, "OrdinaryPhysicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrganization}, that is also a @@ -1123,7 +1128,7 @@ private HQDM() { * {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedObject} that is an organized body of * people. */ - public static final HqdmIri ORGANIZATION = new HqdmIri(HQDM, "organization"); + public static final HqdmIri ORGANIZATION = new HqdmIri(HQDM, "Organization"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrganizationComponent}, @@ -1132,14 +1137,14 @@ private HQDM() { * {@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"); + public static final HqdmIri ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "OrganizationComponent"); /** * 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"); + public static final HqdmIri OWNER = new HqdmIri(HQDM, "Owner"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} that {@link #CONSISTS_OF} an @@ -1148,14 +1153,14 @@ private HQDM() { * {@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"); + 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"); + public static final HqdmIri PARTICIPANT = new HqdmIri(HQDM, "Participant"); /** * A SELECT where a {@link uk.gov.gchq.magmacore.hqdm.model.Participant} may be a @@ -1163,7 +1168,7 @@ private HQDM() { * {@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"); + "ParticipantInActivityOrAssociation"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} that is also a @@ -1171,27 +1176,27 @@ private HQDM() { * {@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"); + 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"); + 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"); + public static final HqdmIri PERIOD_OF_TIME = new HqdmIri(HQDM, "PeriodOfTime"); /** * 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"); + public static final HqdmIri PERSON = new HqdmIri(HQDM, "Person"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPosition}, that is also a @@ -1202,107 +1207,107 @@ private HQDM() { * {@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"); + public static final HqdmIri PERSON_IN_POSITION = new HqdmIri(HQDM, "PersonInPosition"); /** * 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"); + public static final HqdmIri PHYSICAL_OBJECT = new HqdmIri(HQDM, "PhysicalObject"); /** * 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"); + public static final HqdmIri PHYSICAL_PROPERTY = new HqdmIri(HQDM, "PhysicalProperty"); /** * 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"); + public static final HqdmIri PHYSICAL_PROPERTY_RANGE = new HqdmIri(HQDM, "PhysicalPropertyRange"); /** * 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"); + public static final HqdmIri PHYSICAL_QUANTITY = new HqdmIri(HQDM, "PhysicalQuantity"); /** * 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"); + public static final HqdmIri PHYSICAL_QUANTITY_RANGE = new HqdmIri(HQDM, "PhysicalQuantityRange"); /** * 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"); + 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"); + public static final HqdmIri POINT_IN_TIME = new HqdmIri(HQDM, "PointInTime"); /** * 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"); + 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"); + public static final HqdmIri POSSIBLE_WORLD = new HqdmIri(HQDM, "PossibleWorld"); /** * 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"); + 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"); + public static final HqdmIri PRODUCT_BRAND = new HqdmIri(HQDM, "ProductBrand"); /** * 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"); + public static final HqdmIri PRODUCT_OFFERING = new HqdmIri(HQDM, "ProductOffering"); /** * 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"); + public static final HqdmIri REACHING_AGREEMENT = new HqdmIri(HQDM, "ReachingAgreement"); /** * 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"); + public static final HqdmIri RECOGNIZING_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "RecognizingLanguageCommunity"); /** * 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"); + 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"); + public static final HqdmIri REPRESENTATION_BY_PATTERN = new HqdmIri(HQDM, "RepresentationByPattern"); /** * An {@link uk.gov.gchq.magmacore.hqdm.model.Association} of a @@ -1311,58 +1316,58 @@ private HQDM() { * {@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"); + public static final HqdmIri REPRESENTATION_BY_SIGN = new HqdmIri(HQDM, "RepresentationBySign"); /** * 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"); + 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"); + public static final HqdmIri REQUIREMENT_SPECIFICATION = new HqdmIri(HQDM, "RequirementSpecification"); /** * 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"); + 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"); + public static final HqdmIri SALE_OF_GOODS = new HqdmIri(HQDM, "SaleOfGoods"); /** * 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"); + public static final HqdmIri SALES_PRODUCT = new HqdmIri(HQDM, "SalesProduct"); /** * 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"); + public static final HqdmIri SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "SalesProductInstance"); /** * 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"); + public static final HqdmIri SALES_PRODUCT_VERSION = new HqdmIri(HQDM, "SalesProductVersion"); /** * 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"); + public static final HqdmIri SCALE = new HqdmIri(HQDM, "Scale"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfSign}, that is also a @@ -1371,64 +1376,64 @@ private HQDM() { * {@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"); + 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"); + public static final HqdmIri SOCIALLY_CONSTRUCTED_ACTIVITY = new HqdmIri(HQDM, "SociallyConstructedActivity"); /** * 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"); + public static final HqdmIri SOCIALLY_CONSTRUCTED_OBJECT = new HqdmIri(HQDM, "SociallyConstructedObject"); /** * 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"); + public static final HqdmIri SPATIO_TEMPORAL_EXTENT = new HqdmIri(HQDM, "SpatioTemporalExtent"); /** * 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"); + 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"); + 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"); + public static final HqdmIri STATE_OF_ACTIVITY = new HqdmIri(HQDM, "StateOfActivity"); /** * 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"); + public static final HqdmIri STATE_OF_AMOUNT_OF_MONEY = new HqdmIri(HQDM, "StateOfAmountOfMoney"); /** * 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"); + public static final HqdmIri STATE_OF_ASSOCIATION = new HqdmIri(HQDM, "StateOfAssociation"); /** * 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"); + public static final HqdmIri STATE_OF_BIOLOGICAL_OBJECT = new HqdmIri(HQDM, "StateOfBiologicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryBiologicalObject} and @@ -1436,7 +1441,7 @@ private HQDM() { * {@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"); + public static final HqdmIri STATE_OF_BIOLOGICAL_SYSTEM = new HqdmIri(HQDM, "stateOfBiologicalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystemComponent} and @@ -1445,7 +1450,7 @@ private HQDM() { * 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"); + "StateOfBiologicalSystemComponent"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} and @@ -1453,13 +1458,13 @@ private HQDM() { * {@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"); + public static final HqdmIri STATE_OF_FUNCTIONAL_OBJECT = new HqdmIri(HQDM, "StateOfFunctionalObject"); /** * 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"); + public static final HqdmIri STATE_OF_FUNCTIONAL_SYSTEM = new HqdmIri(HQDM, "StateOfFunctionalSystem"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} that is a @@ -1467,7 +1472,7 @@ private HQDM() { * {@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"); + "StateOfFunctionalSystemComponent"); /** * A state that is an {@link uk.gov.gchq.magmacore.hqdm.model.IntentionallyConstructedObject} or a @@ -1475,13 +1480,13 @@ private HQDM() { * {@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"); + "StateOfIntentionallyConstructedObject"); /** * 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"); + public static final HqdmIri STATE_OF_LANGUAGE_COMMUNITY = new HqdmIri(HQDM, "StateOfLanguageCommunity"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalObject} that is also a @@ -1490,14 +1495,14 @@ private HQDM() { * 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"); + "StateOfOrdinaryBiologicalObject"); /** * 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"); + "StateOfOrdinaryFunctionalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfPhysicalObject} that is an @@ -1505,7 +1510,7 @@ private HQDM() { * one. */ public static final HqdmIri STATE_OF_ORDINARY_PHYSICAL_OBJECT = new HqdmIri(HQDM, - "state_of_ordinary_physical_object"); + "StateOfOrdinaryPhysicalObject"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} that is also a @@ -1513,21 +1518,21 @@ private HQDM() { * {@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"); + public static final HqdmIri STATE_OF_ORGANIZATION = new HqdmIri(HQDM, "StateOfOrganization"); /** * 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"); + public static final HqdmIri STATE_OF_ORGANIZATION_COMPONENT = new HqdmIri(HQDM, "StateOfOrganizationComponent"); /** * 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"); + public static final HqdmIri STATE_OF_PARTY = new HqdmIri(HQDM, "StateOfParty"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfBiologicalSystem} and @@ -1535,41 +1540,41 @@ private HQDM() { * {@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"); + public static final HqdmIri STATE_OF_PERSON = new HqdmIri(HQDM, "StateOfPerson"); /** * 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"); + public static final HqdmIri STATE_OF_PHYSICAL_OBJECT = new HqdmIri(HQDM, "StateOfPhysicalObject"); /** * 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"); + public static final HqdmIri STATE_OF_POSITION = new HqdmIri(HQDM, "StateOfPosition"); /** * 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"); + public static final HqdmIri STATE_OF_SALES_PRODUCT_INSTANCE = new HqdmIri(HQDM, "StateOfSalesProductInstance"); /** * 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"); + public static final HqdmIri STATE_OF_SIGN = new HqdmIri(HQDM, "StateOfSign"); /** * 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"); + "StateOfSociallyConstructedActivity"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfIntentionallyConstructedObject} that is a @@ -1577,45 +1582,45 @@ private HQDM() { * 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"); + "StateOfSociallyConstructedObject"); /** * 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"); + public static final HqdmIri STATE_OF_SYSTEM = new HqdmIri(HQDM, "StateOfSystem"); /** * 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"); + public static final HqdmIri STATE_OF_SYSTEM_COMPONENT = new HqdmIri(HQDM, "StateOfSystemComponent"); /** * 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"); + 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"); + public static final HqdmIri SYSTEM_COMPONENT = new HqdmIri(HQDM, "SystemComponent"); /** * 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"); + public static final HqdmIri TEMPORAL_COMPOSITION = new HqdmIri(HQDM, "TemporalComposition"); /** * Anything that exists, real or imagined. */ - public static final HqdmIri THING = new HqdmIri(HQDM, "thing"); + public static final HqdmIri THING = new HqdmIri(HQDM, "Thing"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} and @@ -1623,7 +1628,7 @@ private HQDM() { * {@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"); + public static final HqdmIri TRANSFEREE = new HqdmIri(HQDM, "Transferee"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.SociallyConstructedActivity} that ends one @@ -1631,14 +1636,14 @@ private HQDM() { * {@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"); + public static final HqdmIri TRANSFER_OF_OWNERSHIP = new HqdmIri(HQDM, "TransferOfOwnership"); /** * 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"); + public static final HqdmIri TRANSFER_OF_OWNERSHIP_OF_MONEY = new HqdmIri(HQDM, "TransferOfOwnershipOfMoney"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.StateOfParty} that is also a @@ -1646,13 +1651,13 @@ private HQDM() { * {@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"); + 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"); + public static final HqdmIri UNIT_OF_MEASURE = new HqdmIri(HQDM, "UnitOfMeasure"); // ======================================================================= // Associations @@ -1667,7 +1672,7 @@ private HQDM() { * {@link uk.gov.gchq.magmacore.hqdm.model.Aggregation} entity type. *

*/ - public static final HqdmIri AGGREGATED_INTO = new HqdmIri(HQDM, "aggregated_into"); + public static final HqdmIri AGGREGATED_INTO = new HqdmIri(HQDM, "aggregatedInto"); /** * A {@link #PART_OF} relationship type where a @@ -1687,28 +1692,28 @@ private HQDM() { * {@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"); + public static final HqdmIri CAUSES_BEGINNING = new HqdmIri(HQDM, "causesBeginning"); /** * 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"); + public static final HqdmIri CAUSES_BY_CLASS = new HqdmIri(HQDM, "causesByClass"); /** * 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"); + public static final HqdmIri CAUSES_ENDING = new HqdmIri(HQDM, "causesEnding"); /** * 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"); + public static final HqdmIri CLASS_OF_OFFERED = new HqdmIri(HQDM, "classOfOffered"); /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Classification} has exactly @@ -1721,37 +1726,27 @@ private HQDM() { * {@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"); + public static final HqdmIri COMPONENT_OF = new HqdmIri(HQDM, "componentOf"); /** * 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"); + public static final HqdmIri CONSIDERATION_BY_CLASS = new HqdmIri(HQDM, "considerationByClass"); /** * 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"); + public static final HqdmIri CONSISTS_OF = new HqdmIri(HQDM, "consistsOf"); /** * 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"); + public static final HqdmIri CONSISTS_OF_ = new HqdmIri(HQDM, "consistsOf"); /** * A relationship type where a {@link #MEMBER_OF} a @@ -1760,21 +1755,14 @@ private HQDM() { * {@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"); + public static final HqdmIri CONSISTS_OF_BY_CLASS = new HqdmIri(HQDM, "consistsOfByClass"); /** * 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"); + public static final HqdmIri CONSISTS_OF_IN_MEMBERS = new HqdmIri(HQDM, "consistsOfInMembers"); /** * A {@link #CONSISTS_OF} relationship type where an @@ -1782,20 +1770,14 @@ private HQDM() { * {@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_"); + public static final HqdmIri CONSISTS_OF_PARTICIPANT = new HqdmIri(HQDM, "consistsOfParticipant"); /** * 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"); + public static final HqdmIri DEFINED_BY = new HqdmIri(HQDM, "definedBy"); /** * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} may determine one @@ -1808,7 +1790,7 @@ private HQDM() { * {@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"); + public static final HqdmIri DETERMINES_BY_CLASS = new HqdmIri(HQDM, "determinesByClass"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.Scale} has exactly one @@ -1828,26 +1810,26 @@ private HQDM() { * {@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"); + public static final HqdmIri HAS_COMPONENT_BY_CLASS = new HqdmIri(HQDM, "hasComponentByClass"); /** * 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"); + public static final HqdmIri HAS_SUPERCLASS = new HqdmIri(HQDM, "hasSuperclass"); /** * 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"); + public static final HqdmIri INTENDED_ROLE = new HqdmIri(HQDM, "intendedRole"); /** * 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"); + public static final HqdmIri INTENDED_ROLE_BY_CLASS = new HqdmIri(HQDM, "intendedRoleByClass"); /** * A {@code subtype_of} relationship type where each @@ -1859,7 +1841,7 @@ private HQDM() { * of the related {@link uk.gov.gchq.magmacore.hqdm.model.ClassOfState}. *

*/ - public static final HqdmIri INTERSECTION_OF = new HqdmIri(HQDM, "intersection_of"); + public static final HqdmIri INTERSECTION_OF = new HqdmIri(HQDM, "intersectionOf"); /** * A meta-relationship type where the {@link uk.gov.gchq.magmacore.hqdm.model.Classification} of @@ -1873,7 +1855,7 @@ private HQDM() { * {@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"); + public static final HqdmIri LOWER_BOUND = new HqdmIri(HQDM, "lowerBound"); /** * A {@code subclass_of} relationship type where when a @@ -1882,7 +1864,7 @@ private HQDM() { * {@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"); + public static final HqdmIri MEETS_SPECIFICATION = new HqdmIri(HQDM, "meetsSpecification"); /** * A relationship type where a {@link uk.gov.gchq.magmacore.hqdm.model.Classification} has exactly @@ -1895,38 +1877,21 @@ private HQDM() { * {@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"); + public static final HqdmIri MEMBER_OF = new HqdmIri(HQDM, "memberOf"); /** * 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"); + public static final HqdmIri MEMBER_OF_CURRENCY = new HqdmIri(HQDM, "memberOfCurrency"); /** * 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"); + public static final HqdmIri MEMBER_OF_KIND = new HqdmIri(HQDM, "memberOfKind"); /** * A {@link #MEMBER_OF} relationship type where a @@ -1936,14 +1901,14 @@ private HQDM() { * 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"); + public static final HqdmIri NATURAL_ROLE = new HqdmIri(HQDM, "naturalRole"); /** * 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"); + public static final HqdmIri NATURAL_ROLE_BY_CLASS = new HqdmIri(HQDM, "naturalRoleByClass"); /** * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Offering} has exactly one @@ -1962,14 +1927,7 @@ private HQDM() { * 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_"); + public static final HqdmIri PART_OF = new HqdmIri(HQDM, "partOf"); /** * A {@link #PART_OF_BY_CLASS} where a {@link #MEMBER_OF} a @@ -1977,20 +1935,13 @@ private HQDM() { * {@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_"); + public static final HqdmIri PART_OF_BY_CLASS = new HqdmIri(HQDM, "partOfByClass"); /** * 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"); + public static final HqdmIri PART_OF_PLAN = new HqdmIri(HQDM, "partOfPlan"); /** * A {@link #PART_OF} relationship type where a @@ -2003,34 +1954,20 @@ private HQDM() { * {@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"); + public static final HqdmIri PART_OF_POSSIBLE_WORLD = new HqdmIri(HQDM, "partOfPossibleWorld"); /** * 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"); + public static final HqdmIri PARTICIPANT_IN = new HqdmIri(HQDM, "participantIn"); /** * 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"); + public static final HqdmIri PERIOD_OFFERED = new HqdmIri(HQDM, "periodOffered"); /** * A {@code supertype_of} relationship type where the members of each @@ -2038,14 +1975,14 @@ private HQDM() { * {@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"); + public static final HqdmIri RANGES_OVER = new HqdmIri(HQDM, "rangesOver"); /** * 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"); + public static final HqdmIri REFERENCES_BY_CLASS = new HqdmIri(HQDM, "referencesByClass"); /** * A relationship type where an {@link uk.gov.gchq.magmacore.hqdm.model.Activity} may reference one @@ -2070,7 +2007,7 @@ private HQDM() { * 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"); + public static final HqdmIri REQUIRED_ROLE_PLAYER = new HqdmIri(HQDM, "requiredRolePlayer"); /** * The roles that must be filled by members of a @@ -2083,14 +2020,14 @@ private HQDM() { * {@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"); + public static final HqdmIri SOLD_AS = new HqdmIri(HQDM, "soldAs"); /** * 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"); + public static final HqdmIri SOLD_UNDER = new HqdmIri(HQDM, "soldUnder"); /** * A relationship type where each {@link uk.gov.gchq.magmacore.hqdm.model.Specialization} has @@ -2124,21 +2061,7 @@ private HQDM() { * {@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"); + public static final HqdmIri TEMPORAL_PART_OF = new HqdmIri(HQDM, "temporalPartOf"); /** * A {@link uk.gov.gchq.magmacore.hqdm.model.Scale} may have at most one @@ -2169,7 +2092,7 @@ private HQDM() { * {@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"); + public static final HqdmIri UPPER_BOUND = new HqdmIri(HQDM, "upperBound"); /** * A relationship type where an @@ -2193,7 +2116,7 @@ private HQDM() { * {@link uk.gov.gchq.magmacore.hqdm.model.Class} to value. *

*/ - public static final HqdmIri VALUE_ = new HqdmIri(HQDM, "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 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 index d899d2f9..6d6d76c6 100644 --- 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 @@ -731,8 +731,7 @@ public static ClassOfStateOfFunctionalSystem createClassOfStateOfFunctionalSyste */ public static ClassOfStateOfFunctionalSystemComponent createClassOfStateOfFunctionalSystemComponent( final IRI id) { - final ClassOfStateOfFunctionalSystemComponent result = - new ClassOfStateOfFunctionalSystemComponentImpl(id); + final ClassOfStateOfFunctionalSystemComponent result = new ClassOfStateOfFunctionalSystemComponentImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_FUNCTIONAL_SYSTEM_COMPONENT); return result; } @@ -745,8 +744,8 @@ public static ClassOfStateOfFunctionalSystemComponent createClassOfStateOfFuncti */ public static ClassOfStateOfIntentionallyConstructedObject createClassOfStateOfIntentionallyConstructedObject( final IRI id) { - final ClassOfStateOfIntentionallyConstructedObject result = - new ClassOfStateOfIntentionallyConstructedObjectImpl(id); + final ClassOfStateOfIntentionallyConstructedObject result = new ClassOfStateOfIntentionallyConstructedObjectImpl( + id); result.addValue(RDFS.RDF_TYPE, HQDM.CLASS_OF_STATE_OF_INTENTIONALLY_CONSTRUCTED_OBJECT); return result; } @@ -1002,6 +1001,7 @@ public static EnumeratedClass createEnumeratedClass(final IRI id) { public static KindOfActivity createKindOfActivity(final IRI id) { final KindOfActivity result = new KindOfActivityImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ACTIVITY); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ACTIVITY); return result; } @@ -1014,6 +1014,7 @@ public static KindOfActivity createKindOfActivity(final IRI id) { public static KindOfAssociation createKindOfAssociation(final IRI id) { final KindOfAssociation result = new KindOfAssociationImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ASSOCIATION); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ASSOCIATION); return result; } @@ -1026,6 +1027,7 @@ public static KindOfAssociation createKindOfAssociation(final IRI id) { public static KindOfBiologicalObject createKindOfBiologicalObject(final IRI id) { final KindOfBiologicalObject result = new KindOfBiologicalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.BIOLOGICAL_OBJECT); return result; } @@ -1038,6 +1040,7 @@ public static KindOfBiologicalObject createKindOfBiologicalObject(final IRI id) public static KindOfBiologicalSystem createKindOfBiologicalSystem(final IRI id) { final KindOfBiologicalSystem result = new KindOfBiologicalSystemImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.BIOLOGICAL_SYSTEM); return result; } @@ -1050,6 +1053,7 @@ public static KindOfBiologicalSystem createKindOfBiologicalSystem(final IRI id) public static KindOfBiologicalSystemComponent createKindOfBiologicalSystemComponent(final IRI id) { final KindOfBiologicalSystemComponent result = new KindOfBiologicalSystemComponentImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_BIOLOGICAL_SYSTEM_COMPONENT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.BIOLOGICAL_SYSTEM_COMPONENT); return result; } @@ -1062,6 +1066,7 @@ public static KindOfBiologicalSystemComponent createKindOfBiologicalSystemCompon public static KindOfFunctionalObject createKindOfFunctionalObject(final IRI id) { final KindOfFunctionalObject result = new KindOfFunctionalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.FUNCTIONAL_OBJECT); return result; } @@ -1074,6 +1079,7 @@ public static KindOfFunctionalObject createKindOfFunctionalObject(final IRI id) public static KindOfFunctionalSystem createKindOfFunctionalSystem(final IRI id) { final KindOfFunctionalSystem result = new KindOfFunctionalSystemImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.FUNCTIONAL_SYSTEM); return result; } @@ -1086,6 +1092,7 @@ public static KindOfFunctionalSystem createKindOfFunctionalSystem(final IRI id) public static KindOfFunctionalSystemComponent createKindOfFunctionalSystemComponent(final IRI id) { final KindOfFunctionalSystemComponent result = new KindOfFunctionalSystemComponentImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_FUNCTIONAL_SYSTEM_COMPONENT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.FUNCTIONAL_SYSTEM_COMPONENT); return result; } @@ -1098,6 +1105,7 @@ public static KindOfFunctionalSystemComponent createKindOfFunctionalSystemCompon public static KindOfIndividual createKindOfIndividual(final IRI id) { final KindOfIndividual result = new KindOfIndividualImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_INDIVIDUAL); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.INDIVIDUAL); return result; } @@ -1110,6 +1118,7 @@ public static KindOfIndividual createKindOfIndividual(final IRI id) { public static KindOfIntentionallyConstructedObject createKindOfIntentionallyConstructedObject(final IRI id) { final KindOfIntentionallyConstructedObject result = new KindOfIntentionallyConstructedObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_INTENTIONALLY_CONSTRUCTED_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.INTENTIONALLY_CONSTRUCTED_OBJECT); return result; } @@ -1122,6 +1131,7 @@ public static KindOfIntentionallyConstructedObject createKindOfIntentionallyCons public static KindOfOrdinaryBiologicalObject createKindOfOrdinaryBiologicalObject(final IRI id) { final KindOfOrdinaryBiologicalObject result = new KindOfOrdinaryBiologicalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ORDINARY_BIOLOGICAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ORDINARY_BIOLOGICAL_OBJECT); return result; } @@ -1134,6 +1144,7 @@ public static KindOfOrdinaryBiologicalObject createKindOfOrdinaryBiologicalObjec public static KindOfOrdinaryFunctionalObject createKindOfOrdinaryFunctionalObject(final IRI id) { final KindOfOrdinaryFunctionalObject result = new KindOfOrdinaryFunctionalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ORDINARY_FUNCTIONAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ORDINARY_FUNCTIONAL_OBJECT); return result; } @@ -1146,6 +1157,7 @@ public static KindOfOrdinaryFunctionalObject createKindOfOrdinaryFunctionalObjec public static KindOfOrdinaryPhysicalObject createKindOfOrdinaryPhysicalObject(final IRI id) { final KindOfOrdinaryPhysicalObject result = new KindOfOrdinaryPhysicalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ORDINARY_PHYSICAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ORDINARY_PHYSICAL_OBJECT); return result; } @@ -1158,6 +1170,7 @@ public static KindOfOrdinaryPhysicalObject createKindOfOrdinaryPhysicalObject(fi public static KindOfOrganization createKindOfOrganization(final IRI id) { final KindOfOrganization result = new KindOfOrganizationImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ORGANIZATION); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ORGANIZATION); return result; } @@ -1170,6 +1183,7 @@ public static KindOfOrganization createKindOfOrganization(final IRI id) { public static KindOfOrganizationComponent createKindOfOrganizationComponent(final IRI id) { final KindOfOrganizationComponent result = new KindOfOrganizationComponentImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_ORGANIZATION_COMPONENT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.ORGANIZATION_COMPONENT); return result; } @@ -1182,6 +1196,7 @@ public static KindOfOrganizationComponent createKindOfOrganizationComponent(fina public static KindOfParty createKindOfParty(final IRI id) { final KindOfParty result = new KindOfPartyImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_PARTY); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PARTY); return result; } @@ -1194,6 +1209,7 @@ public static KindOfParty createKindOfParty(final IRI id) { public static KindOfPerson createKindOfPerson(final IRI id) { final KindOfPerson result = new KindOfPersonImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_PERSON); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PERSON); return result; } @@ -1206,6 +1222,7 @@ public static KindOfPerson createKindOfPerson(final IRI id) { public static KindOfPhysicalObject createKindOfPhysicalObject(final IRI id) { final KindOfPhysicalObject result = new KindOfPhysicalObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_PHYSICAL_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PHYSICAL_OBJECT); return result; } @@ -1218,6 +1235,7 @@ public static KindOfPhysicalObject createKindOfPhysicalObject(final IRI id) { public static KindOfPhysicalProperty createKindOfPhysicalProperty(final IRI id) { final KindOfPhysicalProperty result = new KindOfPhysicalPropertyImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_PHYSICAL_PROPERTY); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PHYSICAL_PROPERTY); return result; } @@ -1230,6 +1248,7 @@ public static KindOfPhysicalProperty createKindOfPhysicalProperty(final IRI id) public static KindOfPhysicalQuantity createKindOfPhysicalQuantity(final IRI id) { final KindOfPhysicalQuantity result = new KindOfPhysicalQuantityImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_PHYSICAL_QUANTITY); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.PHYSICAL_QUANTITY); return result; } @@ -1242,6 +1261,7 @@ public static KindOfPhysicalQuantity createKindOfPhysicalQuantity(final IRI id) public static KindOfPosition createKindOfPosition(final IRI id) { final KindOfPosition result = new KindOfPositionImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_POSITION); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.POSITION); return result; } @@ -1254,6 +1274,7 @@ public static KindOfPosition createKindOfPosition(final IRI id) { public static KindOfRelationshipWithRestriction createKindOfRelationshipWithRestriction(final IRI id) { final KindOfRelationshipWithRestriction result = new KindOfRelationshipWithRestrictionImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_RELATIONSHIP_WITH_RESTRICTION); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.RELATIONSHIP); return result; } @@ -1266,6 +1287,7 @@ public static KindOfRelationshipWithRestriction createKindOfRelationshipWithRest public static KindOfRelationshipWithSignature createKindOfRelationshipWithSignature(final IRI id) { final KindOfRelationshipWithSignature result = new KindOfRelationshipWithSignatureImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_RELATIONSHIP_WITH_SIGNATURE); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.RELATIONSHIP); return result; } @@ -1278,6 +1300,7 @@ public static KindOfRelationshipWithSignature createKindOfRelationshipWithSignat public static KindOfSociallyConstructedObject createKindOfSociallyConstructedObject(final IRI id) { final KindOfSociallyConstructedObject result = new KindOfSociallyConstructedObjectImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_SOCIALLY_CONSTRUCTED_OBJECT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.SOCIALLY_CONSTRUCTED_OBJECT); return result; } @@ -1290,6 +1313,7 @@ public static KindOfSociallyConstructedObject createKindOfSociallyConstructedObj public static KindOfSystem createKindOfSystem(final IRI id) { final KindOfSystem result = new KindOfSystemImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_SYSTEM); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.SYSTEM); return result; } @@ -1302,6 +1326,7 @@ public static KindOfSystem createKindOfSystem(final IRI id) { public static KindOfSystemComponent createKindOfSystemComponent(final IRI id) { final KindOfSystemComponent result = new KindOfSystemComponentImpl(id); result.addValue(RDFS.RDF_TYPE, HQDM.KIND_OF_SYSTEM_COMPONENT); + result.addValue(RDFS.RDFS_SUB_CLASS_OF, HQDM.SYSTEM_COMPONENT); return result; } 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 index 166ade11..18668c69 100644 --- 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 @@ -40,6 +40,7 @@ public class DynamicObjects { * @param classes The array of classes to implement. * @return An object of type U. */ + @SuppressWarnings("unchecked") public static U create(final IRI id, final java.lang.Class returnType, final java.lang.Class[] classes) { @@ -56,6 +57,7 @@ public static U create(final IRI id, final ja * @param classes The array of classes to implement. * @return An object of type U. */ + @SuppressWarnings("unchecked") public static U implementInterfaces(final T thing, final java.lang.Class returnType, final java.lang.Class[] classes) { return (U) Proxy.newProxyInstance(ClassServices.class.getClassLoader(), classes, new ThingHandler(thing)); 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 index 114ff057..aac168b7 100755 --- 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 @@ -40,6 +40,7 @@ public void testCreate() { // Create the object with three interfaces. final IRI personIri = new IRI(TEST_BASE, "person"); + @SuppressWarnings("unchecked") final Person person = DynamicObjects.create(personIri, Person.class, new Class[] { Person.class, Participant.class, Party.class }); @@ -67,6 +68,7 @@ public void testAddInterface() { assertEquals(person1Iri, person1.getId()); // Add two more interfaces to the object - this time return it as a Participant. + @SuppressWarnings("unchecked") final Participant person2 = DynamicObjects.implementInterfaces(person1, Participant.class, new Class[] { Person.class, Participant.class, Party.class }); diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ext/HqdmExtensionService.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ext/HqdmExtensionService.java index b09303c0..a46d2daa 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ext/HqdmExtensionService.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/ext/HqdmExtensionService.java @@ -6,11 +6,13 @@ import static uk.gov.gchq.magmacore.examples.extensions.model.Constants.UK_LIMITED_COMPANY_TYPE_NAME; import static uk.gov.gchq.magmacore.examples.extensions.model.Constants.UK_SOFTWARE_DEVELOPMENT_COMPANY_TYPE_NAME; -import uk.gov.gchq.magmacore.examples.extensions.model.ChildImpl; -import uk.gov.gchq.magmacore.examples.extensions.model.ParentChildAssociationImpl; -import uk.gov.gchq.magmacore.examples.extensions.model.ParentImpl; -import uk.gov.gchq.magmacore.examples.extensions.model.UkLimitedCompanyImpl; -import uk.gov.gchq.magmacore.examples.extensions.model.UkSoftwareDevelopmentCompanyImpl; +import java.io.InputStream; + +import uk.gov.gchq.magmacore.examples.extensions.impl.ChildImpl; +import uk.gov.gchq.magmacore.examples.extensions.impl.ParentChildAssociationImpl; +import uk.gov.gchq.magmacore.examples.extensions.impl.ParentImpl; +import uk.gov.gchq.magmacore.examples.extensions.impl.UkLimitedCompanyImpl; +import uk.gov.gchq.magmacore.examples.extensions.impl.UkSoftwareDevelopmentCompanyImpl; import uk.gov.gchq.magmacore.hqdm.extensions.ExtensionService; import uk.gov.gchq.magmacore.hqdm.model.Thing; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; @@ -20,6 +22,9 @@ * MagmaCore. */ public class HqdmExtensionService implements ExtensionService { + + private static InputStream ttl = null; + /** * {@inheritDoc} */ @@ -48,4 +53,12 @@ public T createEntity(final String typeName, final IRI iri) { return null; } } + + @Override + public InputStream getDomainTtl() { + if (ttl == null) { + ttl = HqdmExtensionService.class.getResourceAsStream("/example-model.ttl"); + } + return ttl; + } } diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ChildImpl.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ChildImpl.java similarity index 71% rename from model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ChildImpl.java rename to model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ChildImpl.java index 7e549d79..27ae43a7 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ChildImpl.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ChildImpl.java @@ -1,5 +1,7 @@ -package uk.gov.gchq.magmacore.examples.extensions.model; +package uk.gov.gchq.magmacore.examples.extensions.impl; +import uk.gov.gchq.magmacore.examples.extensions.model.Child; +import uk.gov.gchq.magmacore.examples.extensions.model.Constants; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentChildAssociationImpl.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentChildAssociationImpl.java similarity index 90% rename from model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentChildAssociationImpl.java rename to model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentChildAssociationImpl.java index a277c3ca..c8585836 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentChildAssociationImpl.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentChildAssociationImpl.java @@ -1,9 +1,10 @@ -package uk.gov.gchq.magmacore.examples.extensions.model; +package uk.gov.gchq.magmacore.examples.extensions.impl; import static uk.gov.gchq.magmacore.examples.extensions.model.Constants.CHILD_ROLE_IRI; import static uk.gov.gchq.magmacore.examples.extensions.model.Constants.PARENT_CHILD_ASSOCIATION_IRI; import static uk.gov.gchq.magmacore.examples.extensions.model.Constants.PARENT_ROLE_IRI; +import uk.gov.gchq.magmacore.examples.extensions.model.ParentChildAssociation; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentImpl.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentImpl.java similarity index 71% rename from model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentImpl.java rename to model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentImpl.java index 8dc2015d..06a92846 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/ParentImpl.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/ParentImpl.java @@ -1,5 +1,7 @@ -package uk.gov.gchq.magmacore.examples.extensions.model; +package uk.gov.gchq.magmacore.examples.extensions.impl; +import uk.gov.gchq.magmacore.examples.extensions.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.model.Parent; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkLimitedCompanyImpl.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkLimitedCompanyImpl.java similarity index 74% rename from model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkLimitedCompanyImpl.java rename to model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkLimitedCompanyImpl.java index 6d336085..8bd7a4af 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkLimitedCompanyImpl.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkLimitedCompanyImpl.java @@ -1,5 +1,7 @@ -package uk.gov.gchq.magmacore.examples.extensions.model; +package uk.gov.gchq.magmacore.examples.extensions.impl; +import uk.gov.gchq.magmacore.examples.extensions.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.model.UkLimitedCompany; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; diff --git a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkSoftwareDevelopmentCompanyImpl.java b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkSoftwareDevelopmentCompanyImpl.java similarity index 76% rename from model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkSoftwareDevelopmentCompanyImpl.java rename to model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkSoftwareDevelopmentCompanyImpl.java index 47037c96..b2bcbcde 100644 --- a/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/model/UkSoftwareDevelopmentCompanyImpl.java +++ b/model-extension-example/src/main/java/uk/gov/gchq/magmacore/examples/extensions/impl/UkSoftwareDevelopmentCompanyImpl.java @@ -1,5 +1,7 @@ -package uk.gov.gchq.magmacore.examples.extensions.model; +package uk.gov.gchq.magmacore.examples.extensions.impl; +import uk.gov.gchq.magmacore.examples.extensions.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.model.UkLimitedCompany; import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; diff --git a/model-extension-example/src/main/resources/example-model.ttl b/model-extension-example/src/main/resources/example-model.ttl new file mode 100644 index 00000000..59e71d61 --- /dev/null +++ b/model-extension-example/src/main/resources/example-model.ttl @@ -0,0 +1,18 @@ +@prefix hqdm: . +@prefix rdf: . +@prefix rdfs: . + +hqdm:child a rdfs:Class; + rdfs:subClassOf hqdm:StateOfPerson. + +hqdm:parent a rdfs:Class; + rdfs:subClassOf hqdm:StateOfPerson. + +hqdm:parent_child_association a rdfs:Class; + rdfs:subClassOf hqdm:Association. + +hqdm:uk_limited_company a rdfs:Class; + rdfs:subClassOf hqdm: Organization. + +hqdm:uk_software_development_company a rdfs:Class; + rdfs:subClassOf hqdm: Organization. diff --git a/model-extension-f35/diagrams/uml.txt b/model-extension-f35/diagrams/uml.txt new file mode 100644 index 00000000..f9426d68 --- /dev/null +++ b/model-extension-f35/diagrams/uml.txt @@ -0,0 +1,321 @@ +@startuml + +interface Constants { + {field} {static} +F135_ENGINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +F135_ENGINE_COMPONENT_TYPE_NAME : String + {field} {static} +F135_ENGINE_SYSTEM_TYPE_IRI : IRI + {field} {static} +F135_ENGINE_SYSTEM_TYPE_NAME : String + {field} {static} +F135_ENGINE_TYPE_IRI : IRI + {field} {static} +F135_ENGINE_TYPE_NAME : String + {field} {static} +F135_TURBINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +F135_TURBINE_COMPONENT_TYPE_NAME : String + {field} {static} +F135_TURBINE_TYPE_IRI : IRI + {field} {static} +F135_TURBINE_TYPE_NAME : String + {field} {static} +F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI : IRI + {field} {static} +F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME : String + {field} {static} +F135_VERTICAL_LIFT_SYSTEM_TYPE_IRI : IRI + {field} {static} +F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME : String + {field} {static} +F35_AIRCRAFT_TYPE_IRI : IRI + {field} {static} +F35_AIRCRAFT_TYPE_NAME : String + {field} {static} +F35_AIRFRAME_COMPONENT_TYPE_IRI : IRI + {field} {static} +F35_AIRFRAME_COMPONENT_TYPE_NAME : String + {field} {static} +F35_AIRFRAME_TYPE_IRI : IRI + {field} {static} +F35_AIRFRAME_TYPE_NAME : String + {field} {static} +F35_EJECTION_SEAT_COMPONENT_TYPE_IRI : IRI + {field} {static} +F35_EJECTION_SEAT_COMPONENT_TYPE_NAME : String + {field} {static} +F35_ENGINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +F35_ENGINE_COMPONENT_TYPE_NAME : String + {field} {static} +F35_TURBINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +F35_TURBINE_COMPONENT_TYPE_NAME : String + {field} {static} +F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI : IRI + {field} {static} +F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME : String + {field} {static} +INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI : IRI + {field} {static} +INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME : String + {field} {static} +INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_IRI : IRI + {field} {static} +INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME : String + {field} {static} +INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI : IRI + {field} {static} +INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME : String + {field} {static} +INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_IRI : IRI + {field} {static} +INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME : String + {field} {static} +INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_IRI : IRI + {field} {static} +INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME : String + {field} {static} +INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_IRI : IRI + {field} {static} +INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME : String + {field} {static} +INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_IRI : IRI + {field} {static} +INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME : String + {field} {static} +INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_IRI : IRI + {field} {static} +INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME : String + {field} {static} +STATE_OF_F135_ENGINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_ENGINE_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F135_ENGINE_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_ENGINE_TYPE_NAME : String + {field} {static} +STATE_OF_F135_TURBINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_TURBINE_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F135_TURBINE_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_TURBINE_TYPE_NAME : String + {field} {static} +STATE_OF_F135_VLS_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_VLS_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F135_VLS_TYPE_IRI : IRI + {field} {static} +STATE_OF_F135_VLS_TYPE_NAME : String + {field} {static} +STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F35_AIRFRAME_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_AIRFRAME_TYPE_NAME : String + {field} {static} +STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F35_ENGINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_ENGINE_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F35_TURBINE_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_TURBINE_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_F35_VLS_COMPONENT_TYPE_IRI : IRI + {field} {static} +STATE_OF_F35_VLS_COMPONENT_TYPE_NAME : String + {field} {static} +STATE_OF_US16E_EJECTION_SEAT_TYPE_IRI : IRI + {field} {static} +STATE_OF_US16E_EJECTION_SEAT_TYPE_NAME : String + {field} {static} +US16E_EJECTION_SEAT_TYPE_IRI : IRI + {field} {static} +US16E_EJECTION_SEAT_TYPE_NAME : String +} + + +interface F135Engine { + {field} {static} +intendedRole : Role +} + + +interface F135EngineComponent { + {field} {static} +intendedRole : Role +} + + +interface F135EngineSystem { + {field} {static} +intendedRole : Role + {method} {abstract} +getEngine () : F135EngineComponent + {method} {abstract} +getTurbine () : F135TurbineComponent + {method} {abstract} +getVls () : F135VerticalLiftSystemComponent + {method} {abstract} +setEngine ( paramF135EngineComponent1 : F135EngineComponent ) : void + {method} {abstract} +setTurbine ( paramF135TurbineComponent1 : F135TurbineComponent ) : void + {method} {abstract} +setVerticalLiftSystem ( paramF135VerticalLiftSystemComponent1 : F135VerticalLiftSystemComponent ) : void +} + + +interface F135Turbine { + {field} {static} +intendedRole : Role +} + + +interface F135TurbineComponent { + {field} {static} +intendedRole : Role +} + + +interface F135VerticalLiftSystem { + {field} {static} +intendedRole : Role +} + + +interface F135VerticalLiftSystemComponent { + {field} {static} +intendedRole : Role +} + + +interface F35Aircraft { + {field} {static} +intendedRole : Role + {method} {abstract} +getAirframe () : F35AirframeComponent + {method} {abstract} +getEjectionSeat () : F35EjectionSeatComponent + {method} {abstract} +getEngine () : F35EngineComponent + {method} {abstract} +getTurbine () : F35TurbineComponent + {method} {abstract} +getVls () : F35VerticalLiftSystemComponent + {method} {abstract} +setAirframe ( paramF35AirframeComponent1 : F35AirframeComponent ) : void + {method} {abstract} +setEjectionSeat ( paramF35EjectionSeatComponent1 : F35EjectionSeatComponent ) : void + {method} {abstract} +setEngine ( paramF35EngineComponent1 : F35EngineComponent ) : void + {method} {abstract} +setTurbine ( paramF35TurbineComponent1 : F35TurbineComponent ) : void + {method} {abstract} +setVerticalLiftSystem ( paramF35VerticalLiftSystemComponent1 : F35VerticalLiftSystemComponent ) : void +} + + +interface F35Airframe { + {field} {static} +intendedRole : Role +} + + +interface F35AirframeComponent { + {field} {static} +intendedRole : Role +} + + +interface F35EjectionSeatComponent { + {field} {static} +intendedRole : Role +} + + +interface F35EngineComponent { + {field} {static} +intendedRole : Role +} + + +interface F35TurbineComponent { + {field} {static} +intendedRole : Role +} + + +interface F35VerticalLiftSystemComponent { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135EngineInF135EngineSystem { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135EngineInF35Aircraft { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135TurbineInF135EngineSystem { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135TurbineInF35Aircraft { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135VLSInF135EngineSystem { + {field} {static} +intendedRole : Role +} + + +interface InstalledF135VLSInF35Aircraft { + {field} {static} +intendedRole : Role +} + + +interface InstalledF35AirframeInF35Aircraft { + {field} {static} +intendedRole : Role +} + + +interface InstalledUS16EEjectionSeatInF35Aircraft { + {field} {static} +intendedRole : Role +} + + +class IntendedRoles { + {field} {static} +F135EngineIntendedRole : Role + {field} {static} +F135TurbineIntendedRole : Role + {field} {static} +F135VerticalLiftSystemIntendedRole : Role + {field} {static} +F35AircraftIntendedRole : Role + {field} {static} +F35AirframeIntendedRole : Role + {field} {static} +US16EEjectionSeatIntendedRole : Role +} + + +interface StateOfF135Engine { + {field} {static} +intendedRole : Role +} + + +interface StateOfF135EngineComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF135Turbine { + {field} {static} +intendedRole : Role +} + + +interface StateOfF135TurbineComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF135VLS { + {field} {static} +intendedRole : Role +} + + +interface StateOfF135VLSComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35Airframe { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35AirframeComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35EjectionSeatComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35EngineComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35TurbineComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfF35VerticalLiftSystemComponent { + {field} {static} +intendedRole : Role +} + + +interface StateOfUS16EEjectionSeat { + {field} {static} +intendedRole : Role +} + + +interface US16EEjectionSeat { + {field} {static} +intendedRole : Role +} + + + + +F135Engine ..|> StateOfF135Engine +F135EngineComponent ..|> StateOfF135EngineComponent +F135Turbine ..|> StateOfF135Turbine +F135TurbineComponent ..|> StateOfF135TurbineComponent +F135VerticalLiftSystem ..|> StateOfF135VLS +F135VerticalLiftSystemComponent ..|> StateOfF135VLSComponent +F35Airframe ..|> StateOfF35Airframe +F35AirframeComponent ..|> StateOfF35AirframeComponent +F35EjectionSeatComponent ..|> StateOfF35EjectionSeatComponent +F35EngineComponent ..|> StateOfF35EngineComponent +F35TurbineComponent ..|> StateOfF35TurbineComponent +F35VerticalLiftSystemComponent ..|> StateOfF35VerticalLiftSystemComponent +InstalledF135EngineInF135EngineSystem ..|> StateOfF135Engine +InstalledF135EngineInF135EngineSystem ..|> StateOfF135EngineComponent +InstalledF135EngineInF35Aircraft ..|> StateOfF135Engine +InstalledF135EngineInF35Aircraft ..|> StateOfF35EngineComponent +InstalledF135TurbineInF135EngineSystem ..|> StateOfF135Turbine +InstalledF135TurbineInF135EngineSystem ..|> StateOfF135TurbineComponent +InstalledF135TurbineInF35Aircraft ..|> StateOfF135Turbine +InstalledF135TurbineInF35Aircraft ..|> StateOfF35TurbineComponent +InstalledF135VLSInF135EngineSystem ..|> StateOfF135VLS +InstalledF135VLSInF135EngineSystem ..|> StateOfF135VLSComponent +InstalledF135VLSInF35Aircraft ..|> StateOfF135VLS +InstalledF135VLSInF35Aircraft ..|> StateOfF35VerticalLiftSystemComponent +InstalledF35AirframeInF35Aircraft ..|> StateOfF35Airframe +InstalledF35AirframeInF35Aircraft ..|> StateOfF35AirframeComponent +InstalledUS16EEjectionSeatInF35Aircraft ..|> StateOfF35EjectionSeatComponent +InstalledUS16EEjectionSeatInF35Aircraft ..|> StateOfUS16EEjectionSeat +US16EEjectionSeat ..|> StateOfUS16EEjectionSeat + +hide methods +hide Constants +hide *Impl + +@enduml \ No newline at end of file diff --git a/model-extension-f35/pom.xml b/model-extension-f35/pom.xml new file mode 100644 index 00000000..ce1dd86e --- /dev/null +++ b/model-extension-f35/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + + uk.gov.gchq.magma-core + magma-core + 4.0.1-SNAPSHOT + + + uk.gov.gchq.magma-core + model-extension-f35 + 4.0.1-SNAPSHOT + jar + + model-extension-f35 + + + + uk.gov.gchq.magma-core + hqdm + + + + + UTF-8 + UTF-8 + 17 + + + + + plantuml-generator-maven-plugin + de.elnarion.maven + 3.0.1 + + + generate-simple-diagram + + generate + + package + + ./diagrams + uml.txt + + + uk.gov.gchq.magmacore.examples.extensions.f35.model + + + false + true + true + + + Constants + + + *Impl + + + + + + + + + diff --git a/model-extension-f35/src/main/java/module-info.java b/model-extension-f35/src/main/java/module-info.java new file mode 100644 index 00000000..b56afce8 --- /dev/null +++ b/model-extension-f35/src/main/java/module-info.java @@ -0,0 +1,15 @@ +/** + * Example module for extension of MagmaCore HQDM classes. + */ + +import uk.gov.gchq.magmacore.examples.extensions.f35.ext.F35ExtensionServiceProvider; + +module uk.gov.gchq.magmacore.examples.extensions.f35 { + exports uk.gov.gchq.magmacore.examples.extensions.f35.ext; + exports uk.gov.gchq.magmacore.examples.extensions.f35.model; + + requires transitive uk.gov.gchq.magmacore.hqdm; + + provides uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider + with F35ExtensionServiceProvider; +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionService.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionService.java new file mode 100644 index 00000000..e23a08b8 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionService.java @@ -0,0 +1,210 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.ext; + +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_ENGINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_ENGINE_SYSTEM_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_ENGINE_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_TURBINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_TURBINE_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_AIRCRAFT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_AIRFRAME_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_AIRFRAME_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_EJECTION_SEAT_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_ENGINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_TURBINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_ENGINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_ENGINE_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_TURBINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_TURBINE_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_VLS_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F135_VLS_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F35_ENGINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F35_TURBINE_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_F35_VLS_COMPONENT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.STATE_OF_US16E_EJECTION_SEAT_TYPE_NAME; +import static uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants.US16E_EJECTION_SEAT_TYPE_NAME; + +import java.io.InputStream; + +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135EngineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135EngineImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135EngineSystemImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135TurbineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135TurbineImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135VerticalLiftSystemComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F135VerticalLiftSystemImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35AirframeComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35AirframeImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35EjectionSeatComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35EngineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35TurbineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.F35VerticalLiftSystemComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135EngineInF135EngineSystemImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135EngineInF35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135TurbineInF135EngineSystemImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135TurbineInF35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135VLSInF135EngineSystemImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF135VLSInF35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledF35AirframeInF35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.InstalledUS16EEjectionSeatInF35AircraftImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135EngineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135EngineImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135TurbineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135TurbineImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135VLSComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF135VLSImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF35EjectionSeatComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF35EngineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF35TurbineComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfF35VerticalLiftSystemComponentImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.StateOfUS16EEjectionSeatImpl; +import uk.gov.gchq.magmacore.examples.extensions.f35.impl.US16EEjectionSeatImpl; +import uk.gov.gchq.magmacore.hqdm.extensions.ExtensionService; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; + + +/** + * An example HQDM ExtensionService for adding some extension classes to + * MagmaCore. + */ +public class F35ExtensionService implements ExtensionService { + + private static InputStream ttl = null; + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public T createEntity(final String typeName, final IRI iri) { + + switch (typeName) { + case F135_ENGINE_COMPONENT_TYPE_NAME: + return (T) new F135EngineComponentImpl(iri); + + case F135_ENGINE_SYSTEM_TYPE_NAME: + return (T) new F135EngineSystemImpl(iri); + + case F135_ENGINE_TYPE_NAME: + return (T) new F135EngineImpl(iri); + + case F135_TURBINE_COMPONENT_TYPE_NAME: + return (T) new F135TurbineComponentImpl(iri); + + case F135_TURBINE_TYPE_NAME: + return (T) new F135TurbineImpl(iri); + + case F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME: + return (T) new F135VerticalLiftSystemComponentImpl(iri); + + case F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME: + return (T) new F135VerticalLiftSystemImpl(iri); + + case F35_AIRFRAME_COMPONENT_TYPE_NAME: + return (T) new F35AirframeComponentImpl(iri); + + case F35_AIRCRAFT_TYPE_NAME: + return (T) new F35AircraftImpl(iri); + + case F35_AIRFRAME_TYPE_NAME: + return (T) new F35AirframeImpl(iri); + + case F35_EJECTION_SEAT_COMPONENT_TYPE_NAME: + return (T) new F35EjectionSeatComponentImpl(iri); + + case F35_ENGINE_COMPONENT_TYPE_NAME: + return (T) new F35EngineComponentImpl(iri); + + case F35_TURBINE_COMPONENT_TYPE_NAME: + return (T) new F35TurbineComponentImpl(iri); + + case F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME: + return (T) new F35VerticalLiftSystemComponentImpl(iri); + + case INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME: + return (T) new InstalledF135EngineInF135EngineSystemImpl(iri); + + case INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME: + return (T) new InstalledF135TurbineInF35AircraftImpl(iri); + + case INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME: + return (T) new InstalledF135TurbineInF135EngineSystemImpl(iri); + + case INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME: + return (T) new InstalledF135VLSInF135EngineSystemImpl(iri); + + case INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME: + return (T) new InstalledF35AirframeInF35AircraftImpl(iri); + + case INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME: + return (T) new InstalledF135EngineInF35AircraftImpl(iri); + + case INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME: + return (T) new InstalledF135VLSInF35AircraftImpl(iri); + + case INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME: + return (T) new InstalledUS16EEjectionSeatInF35AircraftImpl(iri); + + case US16E_EJECTION_SEAT_TYPE_NAME: + return (T) new US16EEjectionSeatImpl(iri); + + case STATE_OF_F135_ENGINE_COMPONENT_TYPE_NAME: + return (T) new StateOfF135EngineComponentImpl(iri); + + case STATE_OF_F135_ENGINE_TYPE_NAME: + return (T) new StateOfF135EngineImpl(iri); + + case STATE_OF_F135_TURBINE_COMPONENT_TYPE_NAME: + return (T) new StateOfF135TurbineComponentImpl(iri); + + case STATE_OF_F135_TURBINE_TYPE_NAME: + return (T) new StateOfF135TurbineImpl(iri); + + case STATE_OF_F135_VLS_COMPONENT_TYPE_NAME: + return (T) new StateOfF135VLSComponentImpl(iri); + + case STATE_OF_F135_VLS_TYPE_NAME: + return (T) new StateOfF135VLSImpl(iri); + + case STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_NAME: + return (T) new StateOfF35EjectionSeatComponentImpl(iri); + + case STATE_OF_F35_ENGINE_COMPONENT_TYPE_NAME: + return (T) new StateOfF35EngineComponentImpl(iri); + + case STATE_OF_F35_TURBINE_COMPONENT_TYPE_NAME: + return (T) new StateOfF35TurbineComponentImpl(iri); + + case STATE_OF_F35_VLS_COMPONENT_TYPE_NAME: + return (T) new StateOfF35VerticalLiftSystemComponentImpl(iri); + + case STATE_OF_US16E_EJECTION_SEAT_TYPE_NAME: + return (T) new StateOfUS16EEjectionSeatImpl(iri); + + default: + // Or null if it's not a class from this extension package. + return null; + } + } + + @Override + public InputStream getDomainTtl() { + if (ttl == null) { + ttl = F35ExtensionService.class.getResourceAsStream("/f35-model.ttl"); + } + return ttl; + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionServiceProvider.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionServiceProvider.java new file mode 100644 index 00000000..0fd50f9b --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/ext/F35ExtensionServiceProvider.java @@ -0,0 +1,57 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.ext; + +import java.util.Map; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Engine; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Turbine; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Airframe; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35AirframeComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EjectionSeatComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.US16EEjectionSeat; +import uk.gov.gchq.magmacore.hqdm.extensions.ExtensionService; +import uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider; +import uk.gov.gchq.magmacore.hqdm.model.Thing; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; + +/** + * An example ExtensionServiceProvider for adding some extension classes to + * MagmaCore. + */ +public class F35ExtensionServiceProvider implements ExtensionServiceProvider { + /** + * {@inheritDoc} + */ + @Override + public ExtensionService createService(final Map> map) { + + // Register our extension IRIs and the corresponding interfaces. + + map.put(Constants.F135_ENGINE_COMPONENT_TYPE_IRI, F135EngineComponent.class); + map.put(Constants.F135_ENGINE_SYSTEM_TYPE_IRI, F135EngineSystem.class); + map.put(Constants.F135_ENGINE_TYPE_IRI, F135Engine.class); + map.put(Constants.F135_TURBINE_COMPONENT_TYPE_IRI, F135TurbineComponent.class); + map.put(Constants.F135_TURBINE_TYPE_IRI, F135Turbine.class); + map.put(Constants.F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI, F135VerticalLiftSystemComponent.class); + map.put(Constants.F135_VERTICAL_LIFT_SYSTEM_TYPE_IRI, F135VerticalLiftSystem.class); + map.put(Constants.F35_AIRCRAFT_TYPE_IRI, F35Aircraft.class); + map.put(Constants.F35_AIRFRAME_COMPONENT_TYPE_IRI, F35AirframeComponent.class); + map.put(Constants.F35_AIRFRAME_TYPE_IRI, F35Airframe.class); + map.put(Constants.F35_EJECTION_SEAT_COMPONENT_TYPE_IRI, F35EjectionSeatComponent.class); + map.put(Constants.F35_ENGINE_COMPONENT_TYPE_IRI, F35EngineComponent.class); + map.put(Constants.F35_TURBINE_COMPONENT_TYPE_IRI, F35TurbineComponent.class); + map.put(Constants.F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI, F35VerticalLiftSystemComponent.class); + map.put(Constants.US16E_EJECTION_SEAT_TYPE_IRI, US16EEjectionSeat.class); + // Create ane return the extension service. + return new F35ExtensionService(); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineComponentImpl.java new file mode 100644 index 00000000..86202d20 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35EngineComponent interface. + */ +public class F135EngineComponentImpl extends HqdmObject implements F135EngineComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135EngineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_ENGINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineImpl.java new file mode 100644 index 00000000..4c138fd4 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Engine; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35Engine interface. + */ +public class F135EngineImpl extends HqdmObject implements F135Engine { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135EngineImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_ENGINE_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineSystemImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineSystemImpl.java new file mode 100644 index 00000000..442520cd --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135EngineSystemImpl.java @@ -0,0 +1,63 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135EngineSystem; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +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; + +/** + * An implementation of the F135EngineSystem interface. + */ +public class F135EngineSystemImpl extends HqdmObject implements F135EngineSystem { + private F135EngineComponent engine; + private F135TurbineComponent turbine; + private F135VerticalLiftSystemComponent vls; + + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135EngineSystemImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_ENGINE_SYSTEM_TYPE_IRI); + } + + @Override + public F135EngineComponent getEngine() { + return engine; + } + + @Override + public F135TurbineComponent getTurbine() { + return turbine; + } + + @Override + public F135VerticalLiftSystemComponent getVls() { + return vls; + } + + @Override + public void setEngine(final F135EngineComponent engine) { + this.engine = engine; + engine.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setTurbine(final F135TurbineComponent turbine) { + this.turbine = turbine; + turbine.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setVerticalLiftSystem(final F135VerticalLiftSystemComponent vls) { + this.vls = vls; + vls.addValue(HQDM.COMPONENT_OF, this.getId()); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineComponentImpl.java new file mode 100644 index 00000000..78140a2a --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135TurbineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35TurbineComponent interface. + */ +public class F135TurbineComponentImpl extends HqdmObject implements F135TurbineComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135TurbineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_TURBINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineImpl.java new file mode 100644 index 00000000..0bb3c17f --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135TurbineImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135Turbine; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F135Turbine interface. + */ +public class F135TurbineImpl extends HqdmObject implements F135Turbine { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135TurbineImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_TURBINE_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemComponentImpl.java new file mode 100644 index 00000000..30ce37c9 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35VerticalLiftSystemComponent interface. + */ +public class F135VerticalLiftSystemComponentImpl extends HqdmObject implements F135VerticalLiftSystemComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135VerticalLiftSystemComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemImpl.java new file mode 100644 index 00000000..6ef5f65d --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F135VerticalLiftSystemImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F135VerticalLiftSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F135VerticalLiftSystem interface. + */ +public class F135VerticalLiftSystemImpl extends HqdmObject implements F135VerticalLiftSystem { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F135VerticalLiftSystemImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F135_VERTICAL_LIFT_SYSTEM_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AircraftImpl.java new file mode 100644 index 00000000..687564df --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AircraftImpl.java @@ -0,0 +1,89 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Aircraft; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35AirframeComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EjectionSeatComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EngineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35TurbineComponent; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +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; + +/** + * An implementation of the F35Aircraft interface. + */ +public class F35AircraftImpl extends HqdmObject implements F35Aircraft { + + private F35AirframeComponent airframe; + + private F35EjectionSeatComponent ejectionSeat; + + private F35EngineComponent engine; + + private F35TurbineComponent turbine; + + private F35VerticalLiftSystemComponent vls; + + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_AIRCRAFT_TYPE_IRI); + } + + public F35AirframeComponent getAirframe() { + return airframe; + } + + public F35EjectionSeatComponent getEjectionSeat() { + return ejectionSeat; + } + + public F35EngineComponent getEngine() { + return engine; + } + + public F35TurbineComponent getTurbine() { + return turbine; + } + + public F35VerticalLiftSystemComponent getVls() { + return vls; + } + + @Override + public void setAirframe(final F35AirframeComponent airframe) { + this.airframe = airframe; + airframe.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setEjectionSeat(final F35EjectionSeatComponent ejectionSeat) { + this.ejectionSeat = ejectionSeat; + ejectionSeat.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setEngine(final F35EngineComponent engine) { + this.engine = engine; + engine.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setTurbine(final F35TurbineComponent turbine) { + this.turbine = turbine; + turbine.addValue(HQDM.COMPONENT_OF, this.getId()); + } + + @Override + public void setVerticalLiftSystem(final F35VerticalLiftSystemComponent vls) { + this.vls = vls; + vls.addValue(HQDM.COMPONENT_OF, this.getId()); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeComponentImpl.java new file mode 100644 index 00000000..8854e1fd --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35AirframeComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35AirframeComponent interface. + */ +public class F35AirframeComponentImpl extends HqdmObject implements F35AirframeComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35AirframeComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_AIRFRAME_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeImpl.java new file mode 100644 index 00000000..24eec95c --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35AirframeImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35Airframe; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35Airframe interface. + */ +public class F35AirframeImpl extends HqdmObject implements F35Airframe { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35AirframeImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_AIRFRAME_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EjectionSeatComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EjectionSeatComponentImpl.java new file mode 100644 index 00000000..b1ffe674 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EjectionSeatComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EjectionSeatComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35EjectionSeatComponent interface. + */ +public class F35EjectionSeatComponentImpl extends HqdmObject implements F35EjectionSeatComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35EjectionSeatComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_EJECTION_SEAT_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EngineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EngineComponentImpl.java new file mode 100644 index 00000000..ae6eb009 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35EngineComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35EngineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35EngineComponent interface. + */ +public class F35EngineComponentImpl extends HqdmObject implements F35EngineComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35EngineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_ENGINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35TurbineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35TurbineComponentImpl.java new file mode 100644 index 00000000..6e4b0748 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35TurbineComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35TurbineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35TurbineComponent interface. + */ +public class F35TurbineComponentImpl extends HqdmObject implements F35TurbineComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35TurbineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_TURBINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35VerticalLiftSystemComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35VerticalLiftSystemComponentImpl.java new file mode 100644 index 00000000..a87c9199 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/F35VerticalLiftSystemComponentImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.F35VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the F35VerticalLiftSystemComponent interface. + */ +public class F35VerticalLiftSystemComponentImpl extends HqdmObject implements F35VerticalLiftSystemComponent { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public F35VerticalLiftSystemComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF135EngineSystemImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF135EngineSystemImpl.java new file mode 100644 index 00000000..ae3b75b2 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF135EngineSystemImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135EngineInF135EngineSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135EngineInF135EngineSystemImpl. + */ +public class InstalledF135EngineInF135EngineSystemImpl extends HqdmObject implements InstalledF135EngineInF135EngineSystem { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135EngineInF135EngineSystemImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF35AircraftImpl.java new file mode 100644 index 00000000..c8ebe38f --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135EngineInF35AircraftImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135EngineInF35Aircraft; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135EngineInF35AircraftImpl. + */ +public class InstalledF135EngineInF35AircraftImpl extends HqdmObject implements InstalledF135EngineInF35Aircraft { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135EngineInF35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF135EngineSystemImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF135EngineSystemImpl.java new file mode 100644 index 00000000..66f25d4e --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF135EngineSystemImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135TurbineInF135EngineSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135TurbineInF135EngineSystemImpl. + */ +public class InstalledF135TurbineInF135EngineSystemImpl extends HqdmObject implements InstalledF135TurbineInF135EngineSystem { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135TurbineInF135EngineSystemImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF35AircraftImpl.java new file mode 100644 index 00000000..4b51102c --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135TurbineInF35AircraftImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135TurbineInF35Aircraft; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135TurbineInF35AircraftImpl. + */ +public class InstalledF135TurbineInF35AircraftImpl extends HqdmObject implements InstalledF135TurbineInF35Aircraft { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135TurbineInF35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF135EngineSystemImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF135EngineSystemImpl.java new file mode 100644 index 00000000..7fcca8b3 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF135EngineSystemImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135VLSInF135EngineSystem; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135VLSInF135EngineSystemImpl. + */ +public class InstalledF135VLSInF135EngineSystemImpl extends HqdmObject implements InstalledF135VLSInF135EngineSystem { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135VLSInF135EngineSystemImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF35AircraftImpl.java new file mode 100644 index 00000000..68525f98 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF135VLSInF35AircraftImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF135VLSInF35Aircraft; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF135VLSInF35AircraftImpl. + */ +public class InstalledF135VLSInF35AircraftImpl extends HqdmObject implements InstalledF135VLSInF35Aircraft { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF135VLSInF35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF35AirframeInF35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF35AirframeInF35AircraftImpl.java new file mode 100644 index 00000000..d81ec6a5 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledF35AirframeInF35AircraftImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledF35AirframeInF35Aircraft; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledF35AirframeInF35AircraftImpl. + */ +public class InstalledF35AirframeInF35AircraftImpl extends HqdmObject implements InstalledF35AirframeInF35Aircraft { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledF35AirframeInF35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledUS16EEjectionSeatInF35AircraftImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledUS16EEjectionSeatInF35AircraftImpl.java new file mode 100644 index 00000000..7b97d1c1 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/InstalledUS16EEjectionSeatInF35AircraftImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.InstalledUS16EEjectionSeatInF35Aircraft; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An InstalledUS16EEjectionSeatInF35AircraftImpl. + */ +public class InstalledUS16EEjectionSeatInF35AircraftImpl extends HqdmObject implements InstalledUS16EEjectionSeatInF35Aircraft { + + /** + * Constructor. + * + * @param id An IRI. + */ + public InstalledUS16EEjectionSeatInF35AircraftImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineComponentImpl.java new file mode 100644 index 00000000..08cb35d8 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135EngineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135EngineComponentImpl. + */ +public class StateOfF135EngineComponentImpl extends HqdmObject implements StateOfF135EngineComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135EngineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_ENGINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineImpl.java new file mode 100644 index 00000000..9b3a5a60 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135EngineImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135Engine; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135EngineImpl. + */ +public class StateOfF135EngineImpl extends HqdmObject implements StateOfF135Engine { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135EngineImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_ENGINE_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineComponentImpl.java new file mode 100644 index 00000000..35aa5789 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135TurbineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135TurbineComponentImpl. + */ +public class StateOfF135TurbineComponentImpl extends HqdmObject implements StateOfF135TurbineComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135TurbineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_TURBINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineImpl.java new file mode 100644 index 00000000..ff0ee471 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135TurbineImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135Turbine; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135TurbineImpl. + */ +public class StateOfF135TurbineImpl extends HqdmObject implements StateOfF135Turbine { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135TurbineImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_TURBINE_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSComponentImpl.java new file mode 100644 index 00000000..176008f3 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135VLSComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135VLSComponentImpl. + */ +public class StateOfF135VLSComponentImpl extends HqdmObject implements StateOfF135VLSComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135VLSComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_VLS_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSImpl.java new file mode 100644 index 00000000..7a342bd0 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF135VLSImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF135VLS; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF135VLSImpl. + */ +public class StateOfF135VLSImpl extends HqdmObject implements StateOfF135VLS { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF135VLSImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F135_VLS_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeComponentImpl.java new file mode 100644 index 00000000..f99199d4 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35AirframeComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35AirframeComponentImpl. + */ +public class StateOfF35AirframeComponentImpl extends HqdmObject implements StateOfF35AirframeComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35AirframeComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeImpl.java new file mode 100644 index 00000000..cba8da6c --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35AirframeImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35Airframe; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35AirframeImpl. + */ +public class StateOfF35AirframeImpl extends HqdmObject implements StateOfF35Airframe { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35AirframeImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_AIRFRAME_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EjectionSeatComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EjectionSeatComponentImpl.java new file mode 100644 index 00000000..7b47aca3 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EjectionSeatComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35EjectionSeatComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35EjectionSeatComponentImpl. + */ +public class StateOfF35EjectionSeatComponentImpl extends HqdmObject implements StateOfF35EjectionSeatComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35EjectionSeatComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EngineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EngineComponentImpl.java new file mode 100644 index 00000000..bfeed00b --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35EngineComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35EngineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35EngineComponentImpl. + */ +public class StateOfF35EngineComponentImpl extends HqdmObject implements StateOfF35EngineComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35EngineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_ENGINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35TurbineComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35TurbineComponentImpl.java new file mode 100644 index 00000000..c5287c4c --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35TurbineComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35TurbineComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35TurbineComponentImpl. + */ +public class StateOfF35TurbineComponentImpl extends HqdmObject implements StateOfF35TurbineComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35TurbineComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_TURBINE_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35VerticalLiftSystemComponentImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35VerticalLiftSystemComponentImpl.java new file mode 100644 index 00000000..f6331b65 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfF35VerticalLiftSystemComponentImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfF35VerticalLiftSystemComponent; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfF35VerticalLiftSystemComponentImpl. + */ +public class StateOfF35VerticalLiftSystemComponentImpl extends HqdmObject implements StateOfF35VerticalLiftSystemComponent { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfF35VerticalLiftSystemComponentImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_F35_VLS_COMPONENT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfUS16EEjectionSeatImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfUS16EEjectionSeatImpl.java new file mode 100644 index 00000000..118666f4 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/StateOfUS16EEjectionSeatImpl.java @@ -0,0 +1,23 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.StateOfUS16EEjectionSeat; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An StateOfUS16EEjectionSeatImpl. + */ +public class StateOfUS16EEjectionSeatImpl extends HqdmObject implements StateOfUS16EEjectionSeat { + + /** + * Constructor. + * + * @param id An IRI. + */ + public StateOfUS16EEjectionSeatImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.STATE_OF_US16E_EJECTION_SEAT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/US16EEjectionSeatImpl.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/US16EEjectionSeatImpl.java new file mode 100644 index 00000000..bd1d4631 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/impl/US16EEjectionSeatImpl.java @@ -0,0 +1,22 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.impl; + +import uk.gov.gchq.magmacore.examples.extensions.f35.model.Constants; +import uk.gov.gchq.magmacore.examples.extensions.f35.model.US16EEjectionSeat; +import uk.gov.gchq.magmacore.hqdm.pojo.HqdmObject; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.RDFS; + +/** + * An implementation of the US16EEjectionSeat interface. + */ +public class US16EEjectionSeatImpl extends HqdmObject implements US16EEjectionSeat { + /** + * Constructor. + * + * @param id {@link IRI} + */ + public US16EEjectionSeatImpl(final IRI id) { + super(id); + addValue(RDFS.RDF_TYPE, Constants.US16E_EJECTION_SEAT_TYPE_IRI); + } +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/Constants.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/Constants.java new file mode 100644 index 00000000..0bdf67a7 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/Constants.java @@ -0,0 +1,87 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import static uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM.HQDM; + +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.IRI; + +/** + * Define some useful Constants. + */ +public interface Constants { + + public static final String F135_ENGINE_COMPONENT_TYPE_NAME = "F135EngineComponent"; + public static final String F135_ENGINE_SYSTEM_TYPE_NAME = "F135EngineSystem"; + public static final String F135_ENGINE_TYPE_NAME = "F135Engine"; + public static final String F135_TURBINE_COMPONENT_TYPE_NAME = "F135TurbineComponent"; + public static final String F135_TURBINE_TYPE_NAME = "F135Turbine"; + public static final String F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME = "F135VerticalLiftSystemComponent"; + public static final String F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME = "F135VerticalLiftSystem"; + public static final String F35_AIRCRAFT_TYPE_NAME = "F35Aircraft"; + public static final String F35_AIRFRAME_COMPONENT_TYPE_NAME = "F35AirframeComponent"; + public static final String F35_AIRFRAME_TYPE_NAME = "F35Airframe"; + public static final String F35_EJECTION_SEAT_COMPONENT_TYPE_NAME = "F35EjectionSeatComponent"; + public static final String F35_ENGINE_COMPONENT_TYPE_NAME = "F35EngineComponent"; + public static final String F35_TURBINE_COMPONENT_TYPE_NAME = "F35TurbineComponent"; + public static final String F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME = "F35VerticalLiftSystemComponent"; + public static final String INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME = "InstalledF135EngineInF135EngineSystem"; + public static final String INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME = "InstalledF135EngineInF35Aircraft"; + public static final String INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME = "InstalledF135TurbineInF135EngineSystem"; + public static final String INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME = "InstalledF135TurbineInF35Aircraft"; + public static final String INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME = "InstalledF135VLSInF135EngineSystem"; + public static final String INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME = "InstalledF135VLSInF35Aircraft"; + public static final String INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME = "InstalledF35AirframeInF35Aircraft"; + public static final String INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME = "InstalledUS16EEjectionSeatInF35Aircraft"; + public static final String STATE_OF_F135_ENGINE_COMPONENT_TYPE_NAME = "StateOfF135EngineComponent"; + public static final String STATE_OF_F135_ENGINE_TYPE_NAME = "StateOfF135Engine"; + public static final String STATE_OF_F135_TURBINE_COMPONENT_TYPE_NAME = "StateOfF135TurbineComponent"; + public static final String STATE_OF_F135_TURBINE_TYPE_NAME = "StateOfF135Turbine"; + public static final String STATE_OF_F135_VLS_COMPONENT_TYPE_NAME = "StateOfF135VLSComponent"; + public static final String STATE_OF_F135_VLS_TYPE_NAME = "StateOfF135VLS"; + public static final String STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_NAME = "StateOfF35AirframeComponent"; + public static final String STATE_OF_F35_AIRFRAME_TYPE_NAME = "StateOfF35Airframe"; + public static final String STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_NAME = "StateOfF35EjectionSeatComponent"; + public static final String STATE_OF_F35_ENGINE_COMPONENT_TYPE_NAME = "StateOfF35EngineComponent"; + public static final String STATE_OF_F35_TURBINE_COMPONENT_TYPE_NAME = "StateOfF35TurbineComponent"; + public static final String STATE_OF_F35_VLS_COMPONENT_TYPE_NAME = "StateOfF35VLSComponent"; + public static final String STATE_OF_US16E_EJECTION_SEAT_TYPE_NAME = "StateOfUS16EEjectionSeat"; + public static final String US16E_EJECTION_SEAT_TYPE_NAME = "US16EEjectionSeat"; + + public static final IRI F135_ENGINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F135_ENGINE_COMPONENT_TYPE_NAME); + public static final IRI F135_ENGINE_SYSTEM_TYPE_IRI = new HqdmIri(HQDM, F135_ENGINE_SYSTEM_TYPE_NAME); + public static final IRI F135_ENGINE_TYPE_IRI = new HqdmIri(HQDM, F135_ENGINE_TYPE_NAME); + public static final IRI F135_TURBINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F135_TURBINE_COMPONENT_TYPE_NAME); + public static final IRI F135_TURBINE_TYPE_IRI = new HqdmIri(HQDM, F135_TURBINE_TYPE_NAME); + public static final IRI F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F135_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME); + public static final IRI F135_VERTICAL_LIFT_SYSTEM_TYPE_IRI = new HqdmIri(HQDM, F135_VERTICAL_LIFT_SYSTEM_TYPE_NAME); + public static final IRI F35_AIRCRAFT_TYPE_IRI = new HqdmIri(HQDM, F35_AIRCRAFT_TYPE_NAME); + public static final IRI F35_AIRFRAME_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F35_AIRFRAME_COMPONENT_TYPE_NAME); + public static final IRI F35_AIRFRAME_TYPE_IRI = new HqdmIri(HQDM, F35_AIRFRAME_TYPE_NAME); + public static final IRI F35_EJECTION_SEAT_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F35_EJECTION_SEAT_COMPONENT_TYPE_NAME); + public static final IRI F35_ENGINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F35_ENGINE_COMPONENT_TYPE_NAME); + public static final IRI F35_TURBINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F35_TURBINE_COMPONENT_TYPE_NAME); + public static final IRI F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, F35_VERTICAL_LIFT_SYSTEM_COMPONENT_TYPE_NAME); + public static final IRI INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI = new HqdmIri(HQDM, INSTALLED_F135_ENGINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME); + public static final IRI INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_IRI = new HqdmIri(HQDM, INSTALLED_F135_ENGINE_IN_F35_AIRCRAFT_NAME); + public static final IRI INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_IRI = new HqdmIri(HQDM, INSTALLED_F135_TURBINE_IN_F135_ENGINE_SYSTEM_TYPE_NAME); + public static final IRI INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_IRI = new HqdmIri(HQDM, INSTALLED_F135_VLS_IN_F135_ENGINE_SYSTEM_TYPE_NAME); + public static final IRI INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_IRI = new HqdmIri(HQDM, INSTALLED_F135_VLS_IN_F35_AIRCRAFT_TYPE_NAME); + public static final IRI INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_IRI = new HqdmIri(HQDM, INSTALLED_F35_AIRFRAME_IN_F35_AIRCRAFT_NAME); + public static final IRI INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_IRI = new HqdmIri(HQDM, INSTALLED_US16E_EJECTION_SEAT_IN_F35_AIRCRAFT_NAME); + public static final IRI STATE_OF_F135_ENGINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_ENGINE_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F135_ENGINE_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_ENGINE_TYPE_NAME); + public static final IRI STATE_OF_F135_TURBINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_TURBINE_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F135_TURBINE_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_TURBINE_TYPE_NAME); + public static final IRI STATE_OF_F135_VLS_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_VLS_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F135_VLS_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F135_VLS_TYPE_NAME); + public static final IRI STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_AIRFRAME_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F35_AIRFRAME_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_AIRFRAME_TYPE_NAME); + public static final IRI STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_EJECTION_SEAT_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F35_ENGINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_ENGINE_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_F35_VLS_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_VLS_COMPONENT_TYPE_NAME); + public static final IRI STATE_OF_US16E_EJECTION_SEAT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_US16E_EJECTION_SEAT_TYPE_NAME); + public static final IRI US16E_EJECTION_SEAT_TYPE_IRI = new HqdmIri(HQDM, US16E_EJECTION_SEAT_TYPE_NAME); + public static final IRI INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_IRI = new HqdmIri(HQDM, INSTALLED_F135_TURBINE_IN_F35_AIRCRAFT_TYPE_NAME); + public static final IRI STATE_OF_F35_TURBINE_COMPONENT_TYPE_IRI = new HqdmIri(HQDM, STATE_OF_F35_TURBINE_COMPONENT_TYPE_NAME); + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Engine.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Engine.java new file mode 100644 index 00000000..e9552099 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Engine.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Engine. + */ +public interface F135Engine extends OrdinaryFunctionalObject, StateOfF135Engine { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineComponent.java new file mode 100644 index 00000000..1db2314d --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Engine Component. + */ +public interface F135EngineComponent extends FunctionalSystemComponent, StateOfF135EngineComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineSystem.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineSystem.java new file mode 100644 index 00000000..61206957 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135EngineSystem.java @@ -0,0 +1,24 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Engine System. + */ +public interface F135EngineSystem extends FunctionalSystem { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + + public F135EngineComponent getEngine(); + + public F135TurbineComponent getTurbine(); + + public F135VerticalLiftSystemComponent getVls(); + + void setEngine(final F135EngineComponent engine); + + void setTurbine(final F135TurbineComponent turbine); + + void setVerticalLiftSystem(final F135VerticalLiftSystemComponent vls); +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Turbine.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Turbine.java new file mode 100644 index 00000000..e09b2c99 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135Turbine.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Turbine. + */ +public interface F135Turbine extends OrdinaryFunctionalObject, StateOfF135Turbine { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135TurbineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135TurbineComponent.java new file mode 100644 index 00000000..6a7ea475 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135TurbineComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Turbine Component. + */ +public interface F135TurbineComponent extends FunctionalSystemComponent, StateOfF135TurbineComponent { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystem.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystem.java new file mode 100644 index 00000000..7926623e --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystem.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135VerticalLiftSystem. + */ +public interface F135VerticalLiftSystem extends OrdinaryFunctionalObject, StateOfF135VLS { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystemComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystemComponent.java new file mode 100644 index 00000000..229af1d0 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F135VerticalLiftSystemComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F135 Vertical Lift System Component. + */ +public interface F135VerticalLiftSystemComponent extends FunctionalSystemComponent, StateOfF135VLSComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Aircraft.java new file mode 100644 index 00000000..7e9cba74 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Aircraft.java @@ -0,0 +1,32 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystem; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Aircraft System. + */ +public interface F35Aircraft extends FunctionalSystem { + + static Role intendedRole = IntendedRoles.F35AircraftIntendedRole; + + public F35AirframeComponent getAirframe(); + + public F35EjectionSeatComponent getEjectionSeat(); + + public F35EngineComponent getEngine(); + + public F35TurbineComponent getTurbine(); + + public F35VerticalLiftSystemComponent getVls(); + + void setAirframe(final F35AirframeComponent airframe); + + void setEjectionSeat(final F35EjectionSeatComponent ejectionSeat); + + void setEngine(final F35EngineComponent engine); + + void setTurbine(final F35TurbineComponent turbine); + + void setVerticalLiftSystem(final F35VerticalLiftSystemComponent vls); +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Airframe.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Airframe.java new file mode 100644 index 00000000..2c05922f --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35Airframe.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An F35 Air Frame. + */ +public interface F35Airframe extends OrdinaryFunctionalObject, StateOfF35Airframe { + + static Role intendedRole = IntendedRoles.F35AirframeIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35AirframeComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35AirframeComponent.java new file mode 100644 index 00000000..96d3cdf9 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35AirframeComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Airframe Component. + */ +public interface F35AirframeComponent extends FunctionalSystemComponent, StateOfF35AirframeComponent { + + static Role intendedRole = IntendedRoles.F35AirframeIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EjectionSeatComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EjectionSeatComponent.java new file mode 100644 index 00000000..2b6d1e3f --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EjectionSeatComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Ejection Seat Component. + */ +public interface F35EjectionSeatComponent extends FunctionalSystemComponent, StateOfF35EjectionSeatComponent { + + static Role intendedRole = IntendedRoles.US16EEjectionSeatIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EngineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EngineComponent.java new file mode 100644 index 00000000..a8fde452 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35EngineComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Engine Component. + */ +public interface F35EngineComponent extends FunctionalSystemComponent, StateOfF35EngineComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35TurbineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35TurbineComponent.java new file mode 100644 index 00000000..56978746 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35TurbineComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Turbine Component. + */ +public interface F35TurbineComponent extends FunctionalSystemComponent, StateOfF35TurbineComponent { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35VerticalLiftSystemComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35VerticalLiftSystemComponent.java new file mode 100644 index 00000000..154e5790 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/F35VerticalLiftSystemComponent.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.FunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * F35 Vertical Lift System Component. + */ +public interface F35VerticalLiftSystemComponent extends FunctionalSystemComponent, StateOfF35VerticalLiftSystemComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF135EngineSystem.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF135EngineSystem.java new file mode 100644 index 00000000..3d85b3cf --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF135EngineSystem.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135EngineInF135EngineSystem. + */ +public interface InstalledF135EngineInF135EngineSystem extends InstalledFunctionalSystemComponent, StateOfF135Engine, StateOfF135EngineComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF35Aircraft.java new file mode 100644 index 00000000..b0e72bc7 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135EngineInF35Aircraft.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135EngineInF35Aircraft. + */ +public interface InstalledF135EngineInF35Aircraft extends InstalledFunctionalSystemComponent, StateOfF135Engine, StateOfF35EngineComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF135EngineSystem.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF135EngineSystem.java new file mode 100644 index 00000000..1f723e92 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF135EngineSystem.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135TurbineInF135EngineSystem. + */ +public interface InstalledF135TurbineInF135EngineSystem extends InstalledFunctionalSystemComponent, StateOfF135Turbine, StateOfF135TurbineComponent { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF35Aircraft.java new file mode 100644 index 00000000..653e6bbe --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135TurbineInF35Aircraft.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135TurbineInF35Aircraft. + */ +public interface InstalledF135TurbineInF35Aircraft extends InstalledFunctionalSystemComponent, StateOfF135Turbine, StateOfF35TurbineComponent { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF135EngineSystem.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF135EngineSystem.java new file mode 100644 index 00000000..7b80a0e2 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF135EngineSystem.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135VLSInF135EngineSystem. + */ +public interface InstalledF135VLSInF135EngineSystem extends InstalledFunctionalSystemComponent, StateOfF135VLS, StateOfF135VLSComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF35Aircraft.java new file mode 100644 index 00000000..d876a635 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF135VLSInF35Aircraft.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF135VLSInF35Aircraft. + */ +public interface InstalledF135VLSInF35Aircraft extends InstalledFunctionalSystemComponent, StateOfF135VLS, StateOfF35VerticalLiftSystemComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF35AirframeInF35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF35AirframeInF35Aircraft.java new file mode 100644 index 00000000..00ab3f28 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledF35AirframeInF35Aircraft.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledF35AirframeInF35Aircraft. + */ +public interface InstalledF35AirframeInF35Aircraft extends InstalledFunctionalSystemComponent, StateOfF35Airframe, StateOfF35AirframeComponent { + + static Role intendedRole = IntendedRoles.F35AirframeIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledUS16EEjectionSeatInF35Aircraft.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledUS16EEjectionSeatInF35Aircraft.java new file mode 100644 index 00000000..7324b175 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/InstalledUS16EEjectionSeatInF35Aircraft.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.InstalledFunctionalSystemComponent; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * An InstalledUS16EEjectionSeatInF35Aircraft. + */ +public interface InstalledUS16EEjectionSeatInF35Aircraft extends InstalledFunctionalSystemComponent, StateOfUS16EEjectionSeat, StateOfF35EjectionSeatComponent { + + static Role intendedRole = IntendedRoles.US16EEjectionSeatIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/IntendedRoles.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/IntendedRoles.java new file mode 100644 index 00000000..f1cba85e --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/IntendedRoles.java @@ -0,0 +1,35 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HQDM; +import uk.gov.gchq.magmacore.hqdm.rdf.iri.HqdmIri; +import uk.gov.gchq.magmacore.hqdm.services.ClassServices; + +/** + * IntendedRoles for the domain FunctionalObjects. + */ +public class IntendedRoles { + + public static final Role F35AircraftIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "cc342252-08f0-4f81-a71b-723794f9a7af")); + + public static final Role F35AirframeIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "3c85a699-71a5-4158-8404-0a39dff7df2c")); + + public static final Role F135EngineIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "84cb77e9-409e-4f54-a7df-f50561f3c930")); + + public static final Role F135TurbineIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "8a1fcd10-6db4-48c1-86b9-3e9c63f70b41")); + + public static final Role F135VerticalLiftSystemIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "7be97087-1f41-4108-8294-23d699d753e9")); + + public static final Role US16EEjectionSeatIntendedRole = ClassServices.createRole(new HqdmIri(HQDM.HQDM, "79760082-e77a-43d1-bf13-0ef212f2f2f7")); + + static { + F35AircraftIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, "A Lockheed Martin F-35 Lightning II aircraft"); + F35AirframeIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, "An airframe for a Lockheed Martin F-35 Lightning II aircraft"); + F135EngineIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, "An afterburning turbofan for the Lockheed Martin F-35 Lightning II aircraft."); + F135TurbineIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, "A turbine for an F135 turbofan engine for the Lockheed Martin F-35 Lightning II aircraft"); + F135VerticalLiftSystemIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, + "A Rolls-Royce LiftSystem for the F135 turbofan engine for the Lockheed Martin F-35 Lightning II aircraft"); + US16EEjectionSeatIntendedRole.addStringValue(HQDM.SKOS_DEFINITION, "A US16E Ejection Seat for a Lockheed Martin F-35 Lightning II aircraft"); + } +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Engine.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Engine.java new file mode 100644 index 00000000..97cbfc57 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Engine.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfOrdinaryFunctionalObject. + */ +public interface StateOfF135Engine extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135EngineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135EngineComponent.java new file mode 100644 index 00000000..949ae6aa --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135EngineComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF135EngineComponent. + */ +public interface StateOfF135EngineComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Turbine.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Turbine.java new file mode 100644 index 00000000..a6d02b87 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135Turbine.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfOrdinaryFunctionalObject. + */ +public interface StateOfF135Turbine extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135TurbineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135TurbineComponent.java new file mode 100644 index 00000000..39b0a9ba --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135TurbineComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF135TurbineComponent. + */ +public interface StateOfF135TurbineComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLS.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLS.java new file mode 100644 index 00000000..a4198d68 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLS.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfOrdinaryFunctionalObject. + */ +public interface StateOfF135VLS extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLSComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLSComponent.java new file mode 100644 index 00000000..8e1d0731 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF135VLSComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF135VLSComponent. + */ +public interface StateOfF135VLSComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35Airframe.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35Airframe.java new file mode 100644 index 00000000..1c1efefa --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35Airframe.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfF35Airframe. + */ +public interface StateOfF35Airframe extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.F35AirframeIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35AirframeComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35AirframeComponent.java new file mode 100644 index 00000000..f462f4da --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35AirframeComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF35AirframeComponent. + */ +public interface StateOfF35AirframeComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F35AirframeIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EjectionSeatComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EjectionSeatComponent.java new file mode 100644 index 00000000..ba8f0818 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EjectionSeatComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF35EjectionSeatComponent. + */ +public interface StateOfF35EjectionSeatComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.US16EEjectionSeatIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EngineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EngineComponent.java new file mode 100644 index 00000000..86e73177 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35EngineComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF35EngineComponent. + */ +public interface StateOfF35EngineComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F135EngineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35TurbineComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35TurbineComponent.java new file mode 100644 index 00000000..1bb1a48f --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35TurbineComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfF35TurbineComponent. + */ +public interface StateOfF35TurbineComponent extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.F135TurbineIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35VerticalLiftSystemComponent.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35VerticalLiftSystemComponent.java new file mode 100644 index 00000000..ef2a1850 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfF35VerticalLiftSystemComponent.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfFunctionalSystemComponent; + +/** + * A StateOfF35VerticalLiftSystemComponent. + */ +public interface StateOfF35VerticalLiftSystemComponent extends StateOfFunctionalSystemComponent { + + static Role intendedRole = IntendedRoles.F135VerticalLiftSystemIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfUS16EEjectionSeat.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfUS16EEjectionSeat.java new file mode 100644 index 00000000..e6d5f0c8 --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/StateOfUS16EEjectionSeat.java @@ -0,0 +1,14 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.Role; +import uk.gov.gchq.magmacore.hqdm.model.StateOfOrdinaryFunctionalObject; + +/** + * A StateOfUS16EEjectionSeat. + */ +public interface StateOfUS16EEjectionSeat extends StateOfOrdinaryFunctionalObject { + + static Role intendedRole = IntendedRoles.US16EEjectionSeatIntendedRole; + +} + diff --git a/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/US16EEjectionSeat.java b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/US16EEjectionSeat.java new file mode 100644 index 00000000..db30027a --- /dev/null +++ b/model-extension-f35/src/main/java/uk/gov/gchq/magmacore/examples/extensions/f35/model/US16EEjectionSeat.java @@ -0,0 +1,13 @@ +package uk.gov.gchq.magmacore.examples.extensions.f35.model; + +import uk.gov.gchq.magmacore.hqdm.model.OrdinaryFunctionalObject; +import uk.gov.gchq.magmacore.hqdm.model.Role; + +/** + * US16E Ejection Seat. + */ +public interface US16EEjectionSeat extends OrdinaryFunctionalObject, StateOfUS16EEjectionSeat { + + static Role intendedRole = IntendedRoles.US16EEjectionSeatIntendedRole; + +} diff --git a/model-extension-f35/src/main/resources/META-INF/services/uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider b/model-extension-f35/src/main/resources/META-INF/services/uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider new file mode 100644 index 00000000..693984e7 --- /dev/null +++ b/model-extension-f35/src/main/resources/META-INF/services/uk.gov.gchq.magmacore.hqdm.extensions.ExtensionServiceProvider @@ -0,0 +1 @@ +uk.gov.gchq.magmacore.examples.extensions.f35.ext.F35ExtensionServiceProvider diff --git a/model-extension-f35/src/main/resources/f35-model.ttl b/model-extension-f35/src/main/resources/f35-model.ttl new file mode 100644 index 00000000..b133e2a7 --- /dev/null +++ b/model-extension-f35/src/main/resources/f35-model.ttl @@ -0,0 +1,161 @@ +@prefix hqdm: . +@prefix rdf: . +@prefix rdfs: . +@prefix skos: . + +hqdm:cc342252-08f0-4f81-a71b-723794f9a7af a hqdm:Role; + skos:definition "A Lockheed Martin F-35 Lightning II aircraft". + +hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c a hqdm:Role; + skos:definition "An airframe for a Lockheed Martin F-35 Lightning II aircraft". + +hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930 a hqdm:Role; + skos:definition "An afterburning turbofan for the Lockheed Martin F-35 Lightning II aircraft.". + +hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41 a hqdm:Role; + skos:definition "A turbine for an F135 turbofan engine for the Lockheed Martin F-35 Lightning II aircraft". + +hqdm:7be97087-1f41-4108-8294-23d699d753e9 a hqdm:Role; + skos:definition "A Rolls-Royce LiftSystem for the F135 turbofan engine for the Lockheed Martin F-35 Lightning II aircraft". + +hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7 a hqdm:Role; + skos:definition "A US16E Ejection Seat for a Lockheed Martin F-35 Lightning II aircraft". + +hqdm:F135EngineComponent a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135EngineComponent. +hqdm:F135EngineSystem a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:FunctionalSystem. +hqdm:F135Engine a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject; + rdfs:subClassOf hqdm:StateOfF135Engine. +hqdm:F135TurbineComponent a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135TurbineComponent. +hqdm:F135Turbine a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject; + rdfs:subClassOf hqdm:StateOfF135Turbine. +hqdm:F135VerticalLiftSystemComponent a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135VLSComponent. +hqdm:F135VerticalLiftSystem a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject; + rdfs:subClassOf hqdm:StateOfF135VLS. +hqdm:F35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:cc342252-08f0-4f81-a71b-723794f9a7af; + rdfs:subClassOf hqdm:FunctionalSystem. +hqdm:F35AirframeComponent a rdfs:Class; + hqdm:intendedRole hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF35AirframeComponent. +hqdm:F35Airframe a rdfs:Class; + hqdm:intendedRole hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject; + rdfs:subClassOf hqdm:StateOfF35Airframe. +hqdm:F35EjectionSeatComponent a rdfs:Class; + hqdm:intendedRole hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF35EjectionSeatComponent. +hqdm:F35EngineComponent a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF35EngineComponent. +hqdm:F35TurbineComponent a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF35TurbineComponent. +hqdm:F35VerticalLiftSystemComponent a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:FunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135VLSComponent. +hqdm:InstalledF135EngineInF135EngineSystem a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135Engine; + rdfs:subClassOf hqdm:StateOfF135EngineComponent. +hqdm:InstalledF135EngineInF35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135Engine; + rdfs:subClassOf hqdm:StateOfF35EngineComponent. +hqdm:InstalledF135TurbineInF135EngineSystem a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135Turbine; + rdfs:subClassOf hqdm:StateOfF135TurbineComponent. +hqdm:InstalledF135TurbineInF35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135Turbine; + rdfs:subClassOf hqdm:StateOfF135TurbineComponent. +hqdm:InstalledF135VLSInF135EngineSystem a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135VLS; + rdfs:subClassOf hqdm:StateOfF35VLSComponent. +hqdm:InstalledF135VLSInF35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF135VLS; + rdfs:subClassOf hqdm:StateOfF35VLSComponent. +hqdm:InstalledF35AirframeInF35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfF35Airframe; + rdfs:subClassOf hqdm:StateOfF35AirframeComponent. +hqdm:InstalledUS16EEjectionSeatInF35Aircraft a rdfs:Class; + hqdm:intendedRole hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7; + rdfs:subClassOf hqdm:InstalledFunctionalSystemComponent; + rdfs:subClassOf hqdm:StateOfUS16EEjectionSeat; + rdfs:subClassOf hqdm:StateOfF35EjectionSeatComponent. +hqdm:StateOfF135EngineComponent a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF135Engine a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF135TurbineComponent a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF135Turbine a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF135VLSComponent a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF135VLS a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35AirframeComponent a rdfs:Class; + hqdm:intendedRole hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35Airframe a rdfs:Class; + hqdm:intendedRole hqdm:3c85a699-71a5-4158-8404-0a39dff7df2c; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35EjectionSeatComponent a rdfs:Class; + hqdm:intendedRole hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35EngineComponent a rdfs:Class; + hqdm:intendedRole hqdm:84cb77e9-409e-4f54-a7df-f50561f3c930; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35TurbineComponent a rdfs:Class; + hqdm:intendedRole hqdm:8a1fcd10-6db4-48c1-86b9-3e9c63f70b41; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfF35VLSComponent a rdfs:Class; + hqdm:intendedRole hqdm:7be97087-1f41-4108-8294-23d699d753e9; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:StateOfUS16EEjectionSeat a rdfs:Class; + hqdm:intendedRole hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7; + rdfs:subClassOf hqdm:StateOfFunctionalSystemComponent. +hqdm:US16EEjectionSeat a rdfs:Class; + hqdm:intendedRole hqdm:79760082-e77a-43d1-bf13-0ef212f2f2f7; + rdfs:subClassOf hqdm:OrdinaryFunctionalObject; + rdfs:subClassOf hqdm:StateOfUS16EEjectionSeat. + diff --git a/pom.xml b/pom.xml index 30b55c07..959e2041 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,7 @@ hqdm hqdm-canonical model-extension-example + model-extension-f35 @@ -84,6 +85,11 @@ model-extension-example 4.0.1-SNAPSHOT
+ + uk.gov.gchq.magma-core + model-extension-f35 + 4.0.1-SNAPSHOT + junit junit