Commit 7abf4bbf authored by Jörg Richter's avatar Jörg Richter

Core model: rename data type `Identity` -> `Entity` (#341)

Change data type URI: `dmx.core.identity` -> `dmx.core.entity`
parent 21f8f0e1
Pipeline #10065 canceled with stages
......@@ -17,7 +17,7 @@
{
"value": "User Account",
"uri": "dmx.accesscontrol.user_account",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.accesscontrol.username",
......
......@@ -11,7 +11,7 @@
{
"value": "Bookmark",
"uri": "dmx.bookmarks.bookmark",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.base.url",
......
......@@ -180,7 +180,7 @@
{
"value": "Person",
"uri": "dmx.contacts.person",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.contacts.person_name",
......@@ -234,7 +234,7 @@
{
"value": "Organization",
"uri": "dmx.contacts.organization",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.contacts.organization_name",
......
......@@ -38,7 +38,7 @@ public class Constants {
public static final String BOOLEAN = "dmx.core.boolean";
public static final String COMPOSITE = "dmx.core.composite";
public static final String VALUE = "dmx.core.value";
public static final String IDENTITY = "dmx.core.identity";
public static final String ENTITY = "dmx.core.entity";
// role types
public static final String DEFAULT = "dmx.core.default";
......
......@@ -21,7 +21,7 @@ public class AssocTypeModelImpl extends TypeModelImpl implements AssocTypeModel
AssocTypeModelImpl(TypeModelImpl type) {
super(type);
if (type.dataTypeUri.equals(VALUE) || type.dataTypeUri.equals(IDENTITY)) {
if (type.dataTypeUri.equals(VALUE) || type.dataTypeUri.equals(ENTITY)) {
throw new IllegalArgumentException("\"" + type.dataTypeUri + "\" is an illegal data type for an assoc " +
"type. Use \"dmx.core.composite\" instead. " + type);
}
......
......@@ -23,7 +23,7 @@ class TopicTypeModelImpl extends TypeModelImpl implements TopicTypeModel {
super(type);
if (type.dataTypeUri.equals(COMPOSITE)) {
throw new IllegalArgumentException("\"" + type.dataTypeUri + "\" is an illegal data type for a topic " +
"type. Use \"dmx.core.value\" or \"dmx.core.identity\" instead. " + type);
"type. Use \"dmx.core.value\" or \"dmx.core.entity\" instead. " + type);
}
}
......
......@@ -326,7 +326,7 @@ class ValueIntegrator {
*
* Preconditions:
* - this.newValues is composite
* - this.type is an identity type OR this is a facet update
* - this.type is an entity type OR this is a facet update
*
* @param childValues value: UnifiedValue or List<UnifiedValue>
*
......@@ -354,7 +354,7 @@ class ValueIntegrator {
return !childTopics.isEmpty() ? unifyChildTopics(childTopics, identityCompDefUris) : null;
} else {
// FIXME: when the POST_CREATE_TOPIC event is fired, the child topics should exist already.
// Note: for value-types this is fixed meanwhile, but not for identity-types.
// Note: for value-types this is fixed meanwhile, but not for entity-types.
DMXObjectModelImpl parent = createSimpleTopic();
logger.fine("### Creating composite (w/o identity attrs) " + parent.id + " (typeUri=\"" + type.uri +
"\")");
......@@ -406,7 +406,7 @@ class ValueIntegrator {
*
* Preconditions:
* - this.newValues is composite
* - this.type is an identity type OR this is a facet update
* - this.type is an entity type OR this is a facet update
* - parent's type is this.type
* - compDef's parent type is this.type
* - newChildTopic's type is compDef's child type
......
......@@ -81,8 +81,8 @@
"typeUri": "dmx.core.data_type"
},
{
"value": "Identity",
"uri": "dmx.core.identity",
"value": "Entity",
"uri": "dmx.core.entity",
"typeUri": "dmx.core.data_type"
},
// Role Types
......
......@@ -18,7 +18,7 @@
{
"value": "Plugin",
"uri": "dmx.core.plugin",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.core.plugin_name",
......
......@@ -17,7 +17,7 @@
{
"value": "Event",
"uri": "dmx.events.event",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.events.event_name",
......
......@@ -32,7 +32,7 @@
{
"value": "File",
"uri": "dmx.files.file",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.files.file_content",
......@@ -79,7 +79,7 @@
{
"value": "Folder",
"uri": "dmx.files.folder",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.files.folder_name",
......
......@@ -8,7 +8,7 @@
</div>
<div class="field">
<div class="field-label">Released</div>
Apr 30, 2020
May 1, 2020
</div>
<div class="field">
<div class="field-label">License</div>
......
......@@ -13,7 +13,7 @@
{
"value": "Note",
"uri": "dmx.notes.note",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.notes.title",
......
......@@ -8,7 +8,7 @@
{
"value": "Tag",
"uri": "dmx.tags.tag",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.tags.tag_name",
......
......@@ -66,7 +66,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
TopicType topicType = dmx.getTopicType(PLUGIN);
assertEquals(PLUGIN, topicType.getUri());
assertEquals(TOPIC_TYPE, topicType.getTypeUri());
assertEquals(IDENTITY, topicType.getDataTypeUri());
assertEquals(ENTITY, topicType.getDataTypeUri());
assertEquals(3, topicType.getCompDefs().size());
CompDef compDef = topicType.getCompDef(PLUGIN_MIGRATION_NR);
assertEquals(COMPOSITION_DEF, compDef.getTypeUri());
......@@ -272,7 +272,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
// "Person Name" (simple)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.person_name", "Person Name", TEXT));
// "Comment" (composite)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.comment", "dmx.test.person_name", ONE
))
......@@ -314,7 +314,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
))
);
// "Comment" (composite)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.comment", "dmx.test.person_name", ONE
))
......@@ -359,7 +359,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
))
);
// "Comment" (composite)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.comment", "Comment", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.comment", "dmx.test.person_name", ONE
))
......@@ -448,7 +448,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.date", "Date", TEXT));
dmx.createAssocType(mf.newAssocTypeModel("dmx.test.birthday", "Birthday", TEXT));
TopicTypeImpl tt = dmx.createTopicType(
mf.newTopicTypeModel("dmx.test.person", "Person", IDENTITY).addCompDef(
mf.newTopicTypeModel("dmx.test.person", "Person", ENTITY).addCompDef(
mf.newCompDefModel("dmx.test.birthday", false, false,
"dmx.test.person", "dmx.test.date", ONE)));
// test comp def children *before* set
......@@ -932,7 +932,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.name", "Name", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.item", "Item", TEXT));
// parent type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.composite", "Composite", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.composite", "Composite", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.composite", "dmx.test.name", ONE
))
......@@ -1006,7 +1006,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
try {
// 1) define facet
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.item", "Item", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.item_facet", "Item Facet", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.item_facet", "Item Facet", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.item_facet", "dmx.test.item", ONE
))
......@@ -1073,7 +1073,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
// child type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
// parent type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", MANY
))
......@@ -1102,7 +1102,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
try {
// 1) define parent type (with Aggregation-Many child definition)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", MANY
))
......@@ -1131,7 +1131,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
// child type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
// parent type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", MANY
))
......@@ -1156,7 +1156,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
try {
// 1) define parent type (with Aggregation-One child definition)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", ONE
))
......@@ -1186,7 +1186,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
try {
// 1) define composite type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", ONE
))
......@@ -1212,7 +1212,7 @@ public class CoreServiceTest extends CoreServiceTestEnvironment {
try {
// 1) define composite type
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.child", "Child", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.test.parent", "Parent", ENTITY)
.addCompDef(mf.newCompDefModel(
"dmx.test.parent", "dmx.test.child", ONE
))
......
......@@ -195,7 +195,7 @@ public class DM5CoreServiceTest extends CoreServiceTestEnvironment {
public void childParentValueUpdate() {
DMXTransaction tx = dmx.beginTx();
try {
defineSimpleNameIdentityModel();
defineSimpleNameEntityModel();
String SIMPLE_NAME = "simple.name";
String SIMPLE_ENTITY = "simple.entity";
// create composite topic
......@@ -218,7 +218,7 @@ public class DM5CoreServiceTest extends CoreServiceTestEnvironment {
public void addChildTopicByValue() {
DMXTransaction tx = dmx.beginTx();
try {
defineManyNamesIdentityModel();
defineManyNamesEntityModel();
String SIMPLE_NAME = "simple.name";
String SIMPLE_ENTITY = "simple.entity";
// create composite topic
......@@ -248,7 +248,7 @@ public class DM5CoreServiceTest extends CoreServiceTestEnvironment {
public void addChildTopicByRef() {
DMXTransaction tx = dmx.beginTx();
try {
defineManyNamesIdentityModel();
defineManyNamesEntityModel();
String SIMPLE_NAME = "simple.name";
String SIMPLE_ENTITY = "simple.entity";
// create composite topic
......@@ -276,7 +276,7 @@ public class DM5CoreServiceTest extends CoreServiceTestEnvironment {
private void defineLottoModel() {
dmx.createTopicType(mf.newTopicTypeModel("lotto.number", "Lotto Number", NUMBER));
dmx.createTopicType(mf.newTopicTypeModel("lotto.draw", "Lotto Draw", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("lotto.draw", "Lotto Draw", ENTITY)
.addCompDef(mf.newCompDefModel(
"lotto.draw", "lotto.number", MANY
))
......@@ -294,18 +294,18 @@ public class DM5CoreServiceTest extends CoreServiceTestEnvironment {
// ---
private void defineSimpleNameIdentityModel() {
private void defineSimpleNameEntityModel() {
dmx.createTopicType(mf.newTopicTypeModel("simple.name", "Simple Name", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("simple.entity", "Simple Entity", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("simple.entity", "Simple Entity", ENTITY)
.addCompDef(mf.newCompDefModel(
"simple.entity", "simple.name", ONE
))
);
}
private void defineManyNamesIdentityModel() {
private void defineManyNamesEntityModel() {
dmx.createTopicType(mf.newTopicTypeModel("simple.name", "Simple Name", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("simple.entity", "Simple Entity", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("simple.entity", "Simple Entity", ENTITY)
.addCompDef(mf.newCompDefModel(
"simple.entity", "simple.name", MANY
))
......
......@@ -316,7 +316,7 @@ public class PersonTest extends CoreServiceTestEnvironment {
dmx.createAssocType(mf.newAssocTypeModel("dmx.contacts.address_entry", "Address Entry", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.contacts.email_address", "Email Address", TEXT));
dmx.createTopicType(mf.newTopicTypeModel("dmx.contacts.person_description", "Person Description", HTML));
dmx.createTopicType(mf.newTopicTypeModel("dmx.contacts.person", "Person", IDENTITY)
dmx.createTopicType(mf.newTopicTypeModel("dmx.contacts.person", "Person", ENTITY)
.addCompDef(mf.newCompDefModel(null, true, false, "dmx.contacts.person", "dmx.contacts.person_name", ONE))
.addCompDef(mf.newCompDefModel("dmx.contacts.person", "dmx.contacts.email_address", MANY))
.addCompDef(mf.newCompDefModel("dmx.contacts.address_entry", false, false,
......
......@@ -21,7 +21,7 @@
{
"value": "Topicmap",
"uri": "dmx.topicmaps.topicmap",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.topicmaps.topicmap_name",
......
<template>
<el-select v-model="type.dataTypeUri">
<el-option-group label="Simple">
<el-option :label="dataTypes['dmx.core.text'].value" :value="dataTypes['dmx.core.text'].uri">
<el-option :label="dataTypes['dmx.core.text'].value" :value="dataTypes['dmx.core.text'].uri">
</el-option>
<el-option :label="dataTypes['dmx.core.number'].value" :value="dataTypes['dmx.core.number'].uri">
<el-option :label="dataTypes['dmx.core.number'].value" :value="dataTypes['dmx.core.number'].uri">
</el-option>
<el-option :label="dataTypes['dmx.core.boolean'].value" :value="dataTypes['dmx.core.boolean'].uri">
<el-option :label="dataTypes['dmx.core.boolean'].value" :value="dataTypes['dmx.core.boolean'].uri">
</el-option>
<el-option :label="dataTypes['dmx.core.html'].value" :value="dataTypes['dmx.core.html'].uri">
<el-option :label="dataTypes['dmx.core.html'].value" :value="dataTypes['dmx.core.html'].uri">
</el-option>
</el-option-group>
<el-option-group label="Composite">
<template v-if="isTopicType">
<el-option :label="dataTypes['dmx.core.value'].value" :value="dataTypes['dmx.core.value'].uri">
<el-option :label="dataTypes['dmx.core.value'].value" :value="dataTypes['dmx.core.value'].uri">
</el-option>
<el-option :label="dataTypes['dmx.core.identity'].value" :value="dataTypes['dmx.core.identity'].uri">
<el-option :label="dataTypes['dmx.core.entity'].value" :value="dataTypes['dmx.core.entity'].uri">
</el-option>
</template>
<el-option :label="dataTypes['dmx.core.composite'].value" :value="dataTypes['dmx.core.composite'].uri" v-else>
<el-option :label="dataTypes['dmx.core.composite'].value" :value="dataTypes['dmx.core.composite'].uri" v-else>
</el-option>
</el-option-group>
</el-select>
......
......@@ -9,7 +9,7 @@ import extraElementUI from './element-ui'
import 'font-awesome/css/font-awesome.css'
import './websocket'
console.log('[DMX] 2020/04/30')
console.log('[DMX] 2020/05/01')
// 1) Init dm5 library
// The dm5 library must be inited *before* the dm5-webclient component is instantiated.
......
......@@ -59,7 +59,7 @@
{
"value": "View Configuration",
"uri": "dmx.webclient.view_config",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.webclient.icon",
......
......@@ -174,7 +174,7 @@ public class WebservicePlugin extends PluginActivator {
// Note: the "children" query parameter is handled by the core's JerseyResponseFilter
@GET
@Path("/assoc/{assoc_type_uri}/{topic1_id}/{topic2_id}/{role_type1_uri}/{role_type2_uri}")
public Assoc getAssoc(@PathParam("assoc_type_uri") String assocTypeUri,
public Assoc getAssocBetweenTopicAndTopic(@PathParam("assoc_type_uri") String assocTypeUri,
@PathParam("topic1_id") long topic1Id, @PathParam("topic2_id") long topic2Id,
@PathParam("role_type1_uri") String roleTypeUri1, @PathParam("role_type2_uri") String roleTypeUri2) {
return dmx.getAssocBetweenTopicAndTopic(assocTypeUri, topic1Id, topic2Id, roleTypeUri1, roleTypeUri2);
......
......@@ -41,7 +41,7 @@
{
"value": "Workspace",
"uri": "dmx.workspaces.workspace",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.workspaces.workspace_name",
......@@ -77,7 +77,7 @@
{
"value": "Workspace Facet",
"uri": "dmx.workspaces.workspace_facet",
"dataTypeUri": "dmx.core.identity",
"dataTypeUri": "dmx.core.entity",
"compDefs": [
{
"childTypeUri": "dmx.workspaces.workspace",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment