diff --git a/pom.xml b/pom.xml
index 23f9968..02bf9e4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
eu.nampi
backend
- 0.1.1
+ 0.1.2
nampi-backend
The NAMPI backend
diff --git a/src/main/java/eu/nampi/backend/repository/ActRepository.java b/src/main/java/eu/nampi/backend/repository/ActRepository.java
index 8cd476d..60509dc 100644
--- a/src/main/java/eu/nampi/backend/repository/ActRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/ActRepository.java
@@ -67,13 +67,13 @@ public class ActRepository extends AbstractHydraRepository {
model
.add(main, Core.isAuthoredOn, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime, row.getLiteral(VAR_DATE_TIME.toString()));
+ .add(resDate, Core.hasDateTime, row.getLiteral(VAR_DATE_TIME.toString()));
// Source location
Resource resLocation = row.getResource(VAR_LOC.toString());
model
.add(main, Core.hasSourceLocation, resLocation)
.add(resLocation, RDF.type, Core.sourceLocation)
- .add(resLocation, Core.hasXsdString, row.getLiteral(VAR_LOC_STRING.toString()));
+ .add(resLocation, Core.hasText, row.getLiteral(VAR_LOC_STRING.toString()));
// Source
Resource resSource = row.getResource(VAR_SRC.toString());
model
@@ -142,12 +142,12 @@ private void addData(WhereBuilder builder) {
.addWhere(VAR_INT, RDFS.label, VAR_INT_LABEL)
.addWhere(VAR_MAIN, Core.hasSourceLocation, VAR_LOC)
- .addWhere(VAR_LOC, Core.hasXsdString, VAR_LOC_STRING)
+ .addWhere(VAR_LOC, Core.hasText, VAR_LOC_STRING)
.addWhere(VAR_LOC, Core.hasSource, VAR_SRC)
.addWhere(VAR_SRC, RDFS.label, VAR_SRC_LABEL)
.addWhere(VAR_MAIN, Core.isAuthoredOn, VAR_DATE)
- .addWhere(VAR_DATE, Core.hasXsdDateTime, VAR_DATE_TIME);
+ .addWhere(VAR_DATE, Core.hasDateTime, VAR_DATE_TIME);
}
}
diff --git a/src/main/java/eu/nampi/backend/repository/AspectRepository.java b/src/main/java/eu/nampi/backend/repository/AspectRepository.java
index 7d0d15c..355edb0 100644
--- a/src/main/java/eu/nampi/backend/repository/AspectRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/AspectRepository.java
@@ -30,7 +30,6 @@
import eu.nampi.backend.model.hydra.HydraSingleBuilder;
import eu.nampi.backend.vocabulary.Api;
import eu.nampi.backend.vocabulary.Core;
-import eu.nampi.backend.vocabulary.SchemaOrg;
@Repository
@CacheConfig(cacheNames = "aspects")
@@ -51,10 +50,10 @@ public class AspectRepository extends AbstractHydraRepository {
.ifPresent(comment -> model.add(main, RDFS.comment, comment));
// XSD-String
Optional.ofNullable(row.getLiteral(VAR_STRING.toString())).map(Literal::getString)
- .ifPresent(string -> model.add(main, Core.hasXsdString, string));
+ .ifPresent(string -> model.add(main, Core.hasText, string));
// SameAs
Optional.ofNullable(row.getResource(VAR_SAME_AS.toString())).map(Resource::getURI)
- .ifPresent(string -> model.add(main, SchemaOrg.sameAs, string));
+ .ifPresent(string -> model.add(main, Core.sameAs, string));
return main;
};
@@ -79,7 +78,7 @@ public String findAll(QueryParameters params, Lang lang, Optional partic
Node varSearchString = NodeFactory.createVariable("searchString");
Path path = PathFactory.pathAlt(
PathFactory.pathLink(RDFS.label.asNode()),
- PathFactory.pathLink(Core.hasXsdString.asNode()));
+ PathFactory.pathLink(Core.hasText.asNode()));
builder.coreData
.addOptional(VAR_MAIN, path, varSearchString)
.addFilter(ef.regex(varSearchString, params.getText().get(), "i"));
@@ -104,8 +103,8 @@ private String build(AbstractHydraBuilder builder, Lang lang) {
private void addData(WhereBuilder builder) {
builder
- .addOptional(VAR_MAIN, Core.hasXsdString, VAR_STRING)
- .addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ .addOptional(VAR_MAIN, Core.hasText, VAR_STRING)
+ .addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
}
}
diff --git a/src/main/java/eu/nampi/backend/repository/DocumentationRepository.java b/src/main/java/eu/nampi/backend/repository/DocumentationRepository.java
index 96d4d10..0af84f1 100644
--- a/src/main/java/eu/nampi/backend/repository/DocumentationRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/DocumentationRepository.java
@@ -79,10 +79,10 @@ private void addAspectClass(Class doc) {
Class aspect = new Class(Core.aspect, Core.aspect.getLocalName());
aspect.addSupportedProperty(new SupportedProperty(RDFS.label, XSD.xstring,
RDFS.label.getLocalName(), true, false, false));
- aspect.addSupportedProperty(new SupportedProperty(Core.hasXsdString, XSD.xstring,
- Core.hasXsdString.getLocalName(), true, false, false));
- aspect.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ aspect.addSupportedProperty(new SupportedProperty(Core.hasText, XSD.xstring,
+ Core.hasText.getLocalName(), true, false, false));
+ aspect.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, aspect);
}
@@ -104,8 +104,8 @@ private void addClassClass(Class doc) {
private void addDateClass(Class doc) {
Class date = new Class(Core.date, Core.date.getLocalName());
- date.addSupportedProperty(new SupportedProperty(Core.hasXsdDateTime, XSD.dateTime,
- Core.hasXsdDateTime.getLocalName(), true, false, false));
+ date.addSupportedProperty(new SupportedProperty(Core.hasDateTime, XSD.dateTime,
+ Core.hasDateTime.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, date);
}
@@ -134,8 +134,8 @@ private void addGroupClass(Class doc) {
Class group = new Class(Core.group, Core.group.getLocalName());
group.addSupportedProperty(new SupportedProperty(RDFS.label, XSD.xstring,
RDFS.label.getLocalName(), true, false, false));
- group.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ group.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, group);
}
@@ -143,8 +143,8 @@ private void addPersonClass(Class doc) {
Class person = new Class(Core.person, Core.person.getLocalName());
person.addSupportedProperty(new SupportedProperty(RDFS.label, XSD.xstring,
RDFS.label.getLocalName(), true, false, false));
- person.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ person.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
person.addSupportedProperty(new SupportedProperty(Core.isBornIn, Core.event,
Core.isBornIn.getLocalName(), true, false, false));
person.addSupportedProperty(new SupportedProperty(Core.diesIn, Core.event,
@@ -156,8 +156,8 @@ private void addPlaceClass(Class doc) {
Class place = new Class(Core.place, Core.place.getLocalName());
place.addSupportedProperty(new SupportedProperty(RDFS.label, XSD.xstring,
RDFS.label.getLocalName(), true, false, false));
- place.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ place.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, place);
}
@@ -165,8 +165,8 @@ private void addSourceClass(Class doc) {
Class source = new Class(Core.source, Core.source.getLocalName());
source.addSupportedProperty(new SupportedProperty(RDFS.label, XSD.xstring,
RDFS.label.getLocalName(), true, false, false));
- source.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ source.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, source);
}
@@ -174,8 +174,8 @@ private void addSourceLocationClass(Class doc) {
Class sourceLocation = new Class(Core.sourceLocation, Core.sourceLocation.getLocalName());
sourceLocation.addSupportedProperty(new SupportedProperty(Core.hasSource, Core.source,
Core.hasSource.getLocalName(), true, false, false));
- sourceLocation.addSupportedProperty(new SupportedProperty(Core.hasXsdString, XSD.xstring,
- Core.hasXsdString.getLocalName(), true, false, false));
+ sourceLocation.addSupportedProperty(new SupportedProperty(Core.hasText, XSD.xstring,
+ Core.hasText.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, sourceLocation);
}
@@ -193,8 +193,8 @@ private void addUserClass(Class doc) {
SchemaOrg.identifier.getNameSpace(), true, false, false));
user.addSupportedProperty(new SupportedProperty(SchemaOrg.email, XSD.xstring,
SchemaOrg.email.getLocalName(), true, false, false));
- user.addSupportedProperty(new SupportedProperty(SchemaOrg.sameAs, SchemaOrg.URL,
- SchemaOrg.sameAs.getLocalName(), true, false, false));
+ user.addSupportedProperty(new SupportedProperty(Core.sameAs, SchemaOrg.URL,
+ Core.sameAs.getLocalName(), true, false, false));
doc.add(Hydra.supportedClass, user);
}
diff --git a/src/main/java/eu/nampi/backend/repository/EventRepository.java b/src/main/java/eu/nampi/backend/repository/EventRepository.java
index 161cb76..208feea 100644
--- a/src/main/java/eu/nampi/backend/repository/EventRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/EventRepository.java
@@ -68,7 +68,6 @@ public class EventRepository extends AbstractHydraRepository {
private static final Node VAR_PLACE_LABEL = NodeFactory.createVariable("placeLabel");
private static final BiFunction ROW_MAPPER = (model, row) -> {
- System.out.println(row);
Resource main = row.getResource(VAR_MAIN.toString());
// Main
model.add(main, RDF.type, Core.event);
@@ -87,7 +86,7 @@ public class EventRepository extends AbstractHydraRepository {
Optional.ofNullable(row.getLiteral(VAR_ASPECT_LABEL.toString()))
.ifPresent(label -> model.add(aspect, RDFS.label, label));
Optional.ofNullable(row.getLiteral(VAR_ASPECT_STRING.toString()))
- .ifPresent(str -> model.add(aspect, Core.hasXsdString, str));
+ .ifPresent(str -> model.add(aspect, Core.hasText, str));
});
// Participant
Optional.ofNullable(row.getResource(VAR_PARTICIPANT.toString()))
@@ -108,7 +107,7 @@ public class EventRepository extends AbstractHydraRepository {
model
.add(main, Core.takesPlaceOn, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime, dateTime);
+ .add(resDate, Core.hasDateTime, dateTime);
});
// Earliest date
Optional.ofNullable(row.getLiteral(VAR_DATE_TIME_EARLIEST.toString())).ifPresent(dateTime -> {
@@ -116,7 +115,7 @@ public class EventRepository extends AbstractHydraRepository {
model
.add(main, Core.takesPlaceNotEarlierThan, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime, dateTime);
+ .add(resDate, Core.hasDateTime, dateTime);
});
// Latest date
Optional.ofNullable(row.getLiteral(VAR_DATE_TIME_LATEST.toString())).ifPresent(dateTime -> {
@@ -124,7 +123,7 @@ public class EventRepository extends AbstractHydraRepository {
model
.add(main, Core.takesPlaceNotLaterThan, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime, dateTime);
+ .add(resDate, Core.hasDateTime, dateTime);
});
// Sorting date
Optional.ofNullable(row.getLiteral(VAR_DATE_OUTER.toString())).ifPresent(dateTime -> {
@@ -132,7 +131,7 @@ public class EventRepository extends AbstractHydraRepository {
model
.add(main, Core.hasSortingDate, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime, dateTime);
+ .add(resDate, Core.hasDateTime, dateTime);
});
return main;
};
@@ -269,7 +268,7 @@ private WhereBuilder aspectWhere() {
return new WhereBuilder()
.addWhere(VAR_MAIN, Core.usesAspect, VAR_ASPECT)
.addWhere(VAR_ASPECT, RDFS.label, VAR_ASPECT_LABEL)
- .addOptional(VAR_ASPECT, Core.hasXsdString, VAR_ASPECT_STRING);
+ .addOptional(VAR_ASPECT, Core.hasText, VAR_ASPECT_STRING);
}
private WhereBuilder datesWhere(Order order, Node varDate, Node varDateTime) {
@@ -278,16 +277,16 @@ private WhereBuilder datesWhere(Order order, Node varDate, Node varDateTime) {
builder
.addOptional(new WhereBuilder()
.addWhere(VAR_MAIN, Core.takesPlaceOn, VAR_DATE_EXACT)
- .addWhere(VAR_DATE_EXACT, Core.hasXsdDateTime, VAR_DATE_TIME_EXACT))
+ .addWhere(VAR_DATE_EXACT, Core.hasDateTime, VAR_DATE_TIME_EXACT))
.addOptional(new WhereBuilder()
.addWhere(VAR_MAIN, Core.takesPlaceNotEarlierThan, VAR_DATE_EARLIEST)
- .addWhere(VAR_DATE_EARLIEST, Core.hasXsdDateTime, VAR_DATE_TIME_EARLIEST))
+ .addWhere(VAR_DATE_EARLIEST, Core.hasDateTime, VAR_DATE_TIME_EARLIEST))
.addOptional(new WhereBuilder()
.addWhere(VAR_MAIN, Core.takesPlaceNotLaterThan, VAR_DATE_LATEST)
- .addWhere(VAR_DATE_LATEST, Core.hasXsdDateTime, VAR_DATE_TIME_LATEST))
+ .addWhere(VAR_DATE_LATEST, Core.hasDateTime, VAR_DATE_TIME_LATEST))
.addOptional(new WhereBuilder()
.addWhere(VAR_MAIN, Core.hasSortingDate, VAR_DATE_SORT)
- .addWhere(VAR_DATE_SORT, Core.hasXsdDateTime, VAR_DATE_TIME_SORT))
+ .addWhere(VAR_DATE_SORT, Core.hasDateTime, VAR_DATE_TIME_SORT))
.addBind(
ef.cond(ef.bound(VAR_DATE_SORT), ef.asVar(VAR_DATE_SORT),
ef.cond(ef.bound(VAR_DATE_EXACT), ef.asVar(VAR_DATE_EXACT),
diff --git a/src/main/java/eu/nampi/backend/repository/GroupRepository.java b/src/main/java/eu/nampi/backend/repository/GroupRepository.java
index e8a9c60..59f65da 100644
--- a/src/main/java/eu/nampi/backend/repository/GroupRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/GroupRepository.java
@@ -25,7 +25,6 @@
import eu.nampi.backend.model.hydra.HydraSingleBuilder;
import eu.nampi.backend.vocabulary.Api;
import eu.nampi.backend.vocabulary.Core;
-import eu.nampi.backend.vocabulary.SchemaOrg;
@Repository
@CacheConfig(cacheNames = "groups")
@@ -45,7 +44,7 @@ public class GroupRepository extends AbstractHydraRepository {
.ifPresent(comment -> model.add(main, RDFS.comment, comment));
// SameAs
Optional.ofNullable(row.getResource(VAR_SAME_AS.toString())).map(Resource::getURI)
- .ifPresent(string -> model.add(main, SchemaOrg.sameAs, string));
+ .ifPresent(string -> model.add(main, Core.sameAs, string));
return main;
};
@@ -54,7 +53,7 @@ public class GroupRepository extends AbstractHydraRepository {
public String findAll(QueryParameters params, Lang lang) {
HydraCollectionBuilder builder = new HydraCollectionBuilder(jenaService, endpointUri("groups"),
Core.group, Api.groupOrderByVar, params);
- builder.extendedData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.extendedData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
@@ -62,7 +61,7 @@ public String findAll(QueryParameters params, Lang lang) {
public String findOne(Lang lang, UUID id) {
HydraSingleBuilder builder =
new HydraSingleBuilder(jenaService, individualsUri(Core.group, id), Core.group);
- builder.coreData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.coreData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
diff --git a/src/main/java/eu/nampi/backend/repository/PersonRepository.java b/src/main/java/eu/nampi/backend/repository/PersonRepository.java
index 5b75258..80222fd 100644
--- a/src/main/java/eu/nampi/backend/repository/PersonRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/PersonRepository.java
@@ -27,7 +27,6 @@
import eu.nampi.backend.model.hydra.HydraSingleBuilder;
import eu.nampi.backend.vocabulary.Api;
import eu.nampi.backend.vocabulary.Core;
-import eu.nampi.backend.vocabulary.SchemaOrg;
@Repository
@CacheConfig(cacheNames = "persons")
@@ -50,7 +49,7 @@ public class PersonRepository extends AbstractHydraRepository {
.ifPresent(comment -> model.add(main, RDFS.comment, comment));
// SameAs
Optional.ofNullable(row.getResource(VAR_SAME_AS.toString())).map(Resource::getURI)
- .ifPresent(string -> model.add(main, SchemaOrg.sameAs, string));
+ .ifPresent(string -> model.add(main, Core.sameAs, string));
// Birth
addEvent(model, row, main, PREF_BIRTH, Core.isBornIn);
addEvent(model, row, main, PREF_DEATH, Core.diesIn);
@@ -70,25 +69,25 @@ private static final void addEvent(Model model, QuerySolution row, Resource main
.ifPresent(resDate -> model
.add(evt, Core.takesPlaceAt, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime,
+ .add(resDate, Core.hasDateTime,
row.getLiteral(varDateTimeExact(base).toString())));
Optional.ofNullable(row.getResource(varDateNotEarlier(base).toString()))
.ifPresent(resDate -> model
.add(evt, Core.takesPlaceNotEarlierThan, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime,
+ .add(resDate, Core.hasDateTime,
row.getLiteral(varDateTimeNotEarlier(base).toString())));
Optional.ofNullable(row.getResource(varDateNotLater(base).toString()))
.ifPresent(resDate -> model
.add(evt, Core.takesPlaceNotLaterThan, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime,
+ .add(resDate, Core.hasDateTime,
row.getLiteral(varDateTimeNotLater(base).toString())));
Optional.ofNullable(row.getResource(varDateSort(base).toString()))
.ifPresent(resDate -> model
.add(evt, Core.hasSortingDate, resDate)
.add(resDate, RDF.type, Core.date)
- .add(resDate, Core.hasXsdDateTime,
+ .add(resDate, Core.hasDateTime,
row.getLiteral(varDateTimeSort(base).toString())));
});
}
@@ -119,7 +118,7 @@ private WhereBuilder dataWhere() {
return new WhereBuilder()
.addWhere(eventWhere(PREF_BIRTH, Core.isBornIn))
.addWhere(eventWhere(PREF_DEATH, Core.diesIn))
- .addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ .addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
}
private WhereBuilder eventWhere(String base, Property type) {
@@ -130,17 +129,17 @@ private WhereBuilder eventWhere(String base, Property type) {
.addWhere(var, RDFS.label, varEventLabel(base))
.addOptional(new WhereBuilder()
.addWhere(var, Core.takesPlaceOn, varDateExact(base))
- .addWhere(varDateExact(base), Core.hasXsdDateTime, varDateTimeExact(base)))
+ .addWhere(varDateExact(base), Core.hasDateTime, varDateTimeExact(base)))
.addOptional(new WhereBuilder()
.addWhere(var, Core.takesPlaceNotEarlierThan, varDateNotEarlier(base))
- .addWhere(varDateNotEarlier(base), Core.hasXsdDateTime,
+ .addWhere(varDateNotEarlier(base), Core.hasDateTime,
varDateTimeNotEarlier(base)))
.addOptional(new WhereBuilder()
.addWhere(var, Core.takesPlaceNotLaterThan, varDateNotLater(base))
- .addWhere(varDateNotLater(base), Core.hasXsdDateTime, varDateTimeNotLater(base)))
+ .addWhere(varDateNotLater(base), Core.hasDateTime, varDateTimeNotLater(base)))
.addOptional(new WhereBuilder()
.addWhere(var, Core.hasSortingDate, varDateSort(base))
- .addWhere(varDateSort(base), Core.hasXsdDateTime, varDateTimeSort(base))));
+ .addWhere(varDateSort(base), Core.hasDateTime, varDateTimeSort(base))));
}
private static Node varDateExact(String base) {
diff --git a/src/main/java/eu/nampi/backend/repository/PlaceRepository.java b/src/main/java/eu/nampi/backend/repository/PlaceRepository.java
index b080461..9d76dde 100644
--- a/src/main/java/eu/nampi/backend/repository/PlaceRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/PlaceRepository.java
@@ -25,7 +25,6 @@
import eu.nampi.backend.model.hydra.HydraSingleBuilder;
import eu.nampi.backend.vocabulary.Api;
import eu.nampi.backend.vocabulary.Core;
-import eu.nampi.backend.vocabulary.SchemaOrg;
@Repository
@CacheConfig(cacheNames = "places")
@@ -45,7 +44,7 @@ public class PlaceRepository extends AbstractHydraRepository {
.ifPresent(comment -> model.add(main, RDFS.comment, comment));
// SameAs
Optional.ofNullable(row.getResource(VAR_SAME_AS.toString())).map(Resource::getURI)
- .ifPresent(string -> model.add(main, SchemaOrg.sameAs, string));
+ .ifPresent(string -> model.add(main, Core.sameAs, string));
return main;
};
@@ -54,7 +53,7 @@ public class PlaceRepository extends AbstractHydraRepository {
public String findAll(QueryParameters params, Lang lang) {
HydraCollectionBuilder builder = new HydraCollectionBuilder(jenaService, endpointUri("places"),
Core.place, Api.placeOrderByVar, params);
- builder.extendedData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.extendedData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
@@ -62,7 +61,7 @@ public String findAll(QueryParameters params, Lang lang) {
public String findOne(Lang lang, UUID id) {
HydraSingleBuilder builder =
new HydraSingleBuilder(jenaService, individualsUri(Core.place, id), Core.place);
- builder.coreData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.coreData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
diff --git a/src/main/java/eu/nampi/backend/repository/SourceRepository.java b/src/main/java/eu/nampi/backend/repository/SourceRepository.java
index 0b642f6..d53fd63 100644
--- a/src/main/java/eu/nampi/backend/repository/SourceRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/SourceRepository.java
@@ -25,7 +25,6 @@
import eu.nampi.backend.model.hydra.HydraSingleBuilder;
import eu.nampi.backend.vocabulary.Api;
import eu.nampi.backend.vocabulary.Core;
-import eu.nampi.backend.vocabulary.SchemaOrg;
@Repository
@CacheConfig(cacheNames = "sources")
@@ -45,7 +44,7 @@ public class SourceRepository extends AbstractHydraRepository {
.ifPresent(comment -> model.add(main, RDFS.comment, comment));
// SameAs
Optional.ofNullable(row.getResource(VAR_SAME_AS.toString())).map(Resource::getURI)
- .ifPresent(string -> model.add(main, SchemaOrg.sameAs, string));
+ .ifPresent(string -> model.add(main, Core.sameAs, string));
return main;
};
@@ -54,7 +53,7 @@ public class SourceRepository extends AbstractHydraRepository {
public String findAll(QueryParameters params, Lang lang) {
HydraCollectionBuilder builder = new HydraCollectionBuilder(jenaService, endpointUri("sources"),
Core.source, Api.sourceOrderByVar, params);
- builder.extendedData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.extendedData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
@@ -62,7 +61,7 @@ public String findAll(QueryParameters params, Lang lang) {
public String findOne(Lang lang, UUID id) {
HydraSingleBuilder builder =
new HydraSingleBuilder(jenaService, individualsUri(Core.source, id), Core.source);
- builder.coreData.addOptional(VAR_MAIN, SchemaOrg.sameAs, VAR_SAME_AS);
+ builder.coreData.addOptional(VAR_MAIN, Core.sameAs, VAR_SAME_AS);
return build(builder, lang);
}
diff --git a/src/main/java/eu/nampi/backend/repository/UserRepository.java b/src/main/java/eu/nampi/backend/repository/UserRepository.java
index 1b65e11..9cd0b97 100644
--- a/src/main/java/eu/nampi/backend/repository/UserRepository.java
+++ b/src/main/java/eu/nampi/backend/repository/UserRepository.java
@@ -68,7 +68,7 @@ public Optional getCurrentUser(Lang lang) {
model.setNsPrefix("api", Api.getURI()).setNsPrefix("core", Core.getURI());
model.add(userResource, RDF.type, Api.user);
if (u.getAuthorities().contains("ROLE_AUTHOR")) {
- model.add(userResource, SchemaOrg.sameAs,
+ model.add(userResource, Core.sameAs,
ResourceFactory.createResource(individualsUri(Core.author, u.getRdfId())));
}
model.add(userResource, RDFS.label, u.getLabel());
diff --git a/src/main/java/eu/nampi/backend/vocabulary/Core.java b/src/main/java/eu/nampi/backend/vocabulary/Core.java
index 47c9bfe..f817eb8 100644
--- a/src/main/java/eu/nampi/backend/vocabulary/Core.java
+++ b/src/main/java/eu/nampi/backend/vocabulary/Core.java
@@ -34,17 +34,20 @@ protected static final Property property(String local) {
public static final Property aspectIsUsedIn = property("aspect_is_used_in");
public static final Property diesIn = property("dies_in");
public static final Property endsLifeOf = property("ends_life_of");
+ public static final Property hasDateTime = property("has_date_time");
public static final Property hasInterpretation = property("has_interpretation");
public static final Property hasMainParticipant = property("has_main_participant");
public static final Property hasParticipant = property("has_participant");
public static final Property hasSortingDate = property("has_sorting_date");
public static final Property hasSource = property("has_source");
public static final Property hasSourceLocation = property("has_source_location");
- public static final Property hasXsdDateTime = property("has_xsd_date_time");
- public static final Property hasXsdString = property("has_xsd_string");
+ public static final Property hasText = property("has_text");
+ public static final Property hasUrl = property("has_url");
+ public static final Property hasValue = property("has_value");
public static final Property isAuthoredBy = property("is_authored_by");
public static final Property isAuthoredOn = property("is_authored_on");
public static final Property isBornIn = property("is_born_in");
+ public static final Property sameAs = property("same_as");
public static final Property startsLifeOf = property("starts_life_of");
public static final Property takesPlaceAt = property("takes_place_at");
public static final Property takesPlaceNotEarlierThan = property("takes_place_not_earlier_than");
diff --git a/src/main/java/eu/nampi/backend/vocabulary/SchemaOrg.java b/src/main/java/eu/nampi/backend/vocabulary/SchemaOrg.java
index 24cf390..3c5d60e 100644
--- a/src/main/java/eu/nampi/backend/vocabulary/SchemaOrg.java
+++ b/src/main/java/eu/nampi/backend/vocabulary/SchemaOrg.java
@@ -38,7 +38,5 @@ protected static final Property property(String local) {
public static final Property email = property("email");
- public static final Property sameAs = property("sameAs");
-
public static final Property URL = property("URL");
}