# HG changeset patch # User Robert Casties # Date 1527007750 -7200 # Node ID d5ae699a41529fbf4f45cece49b5d1f7115f0cf1 # Parent 92c4c9f7312a1c800bd55797de902ce4b23b544c# Parent 1611da70e43e5ad66084ce17dba0402c3a310c71 Merge from HEAD 1611da70e43e5ad66084ce17dba0402c3a310c71 diff -r 92c4c9f7312a -r d5ae699a4152 docs/docs/Public_Transliteration/translit-to-romanization-2.0.docx Binary file docs/docs/Public_Transliteration/translit-to-romanization-2.0.docx has changed diff -r 92c4c9f7312a -r d5ae699a4152 docs/docs/Public_Transliteration/translit-to-romanization-2.0.pdf Binary file docs/docs/Public_Transliteration/translit-to-romanization-2.0.pdf has changed diff -r 92c4c9f7312a -r d5ae699a4152 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/AbstractISMIBean.java Tue May 22 18:49:10 2018 +0200 @@ -71,6 +71,7 @@ public static String is_prime_alias_name_of = "is_prime_alias_name_of"; public static String is_alias_title_of = "is_alias_title_of"; public static String is_prime_alias_title_of = "is_prime_alias_title_of"; + public static String is_alias_identifier_of = "is_alias_identifier_of"; public static String alias = "alias"; public static String has_floruit_date = "has_floruit_date"; diff -r 92c4c9f7312a -r d5ae699a4152 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCodexBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCodexBean.java Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentCodexBean.java Tue May 22 18:49:10 2018 +0200 @@ -32,7 +32,8 @@ private List witnessInCurrentCodex; private boolean showWitnessInCurrentCodex; - + + private EntityList aliasIdList; private EntityList ownedByPeople; private EntityList readByPeople; @@ -51,7 +52,7 @@ // source relations new String[]{"is_part_of", "is_alias_of", "owned_by", "read_by"}, // target relations - new String[]{"is_alias_of", "is_reference_of"}); + new String[]{"is_alias_of", "is_reference_of", is_alias_identifier_of}); public CurrentCodexBean() { @@ -70,6 +71,8 @@ super.reset(); this.entity = new Entity(Node.TYPE_ABOX, CODEX, false); + this.aliasIdList = new EntityList(ALIAS, "alias", getWrapper(), getUserName()); + this.ownedByPeople = new EntityList(PERSON, "name_translit", true); this.readByPeople = new EntityList(PERSON, "name_translit", true); @@ -140,6 +143,11 @@ this.isAlias = false; } + for(Relation rel : getWrapper().getTargetRelations(codex, is_alias_identifier_of, ALIAS, -1)) { + Entity alias = getWrapper().getEntityById(rel.getSourceId()); + this.aliasIdList.add(alias); + } + for(Relation rel : getWrapper().getSourceRelations(codex, owned_by, PERSON, -1)) { this.ownedByPeople.add(getWrapper().getEntityById(rel.getTargetId()), rel.getAttributeByName("date")); } @@ -244,22 +252,22 @@ this.entity.replaceUniqueSourceRelation(this.getCollectionLo().entity, COLLECTION, is_part_of); - // CODEX -> owner_by (manyToMany) -> PERSON - this.entity.removeAllSourceRelationsByName(owned_by); - - // CODEX -> read_by (manyToMany) -> PERSON - this.entity.removeAllSourceRelationsByName("read_by"); - - //REFERENCE -> is_reference_of -> THIS - //this.entity = this.prepareReferencesToSave(this.entity); - this.saveReferences(); - + // ALIAS -> is_identifier_of -> CODEX + replaceMultipleTargetRelations(entity, aliasIdList.getEntities(), ALIAS, is_alias_identifier_of); + // CODEX -> owned_by -> PERSON replaceMultipleSourceRelations(entity, ownedByPeople.getEntities(), PERSON, owned_by); + // CODEX -> read_by -> PERSON replaceMultipleSourceRelations(entity, readByPeople.getEntities(), PERSON, "read_by"); /* TODO: currently ignoring date on relations + // CODEX -> owner_by (manyToMany) -> PERSON + this.entity.removeAllSourceRelationsByName(owned_by); + + // CODEX -> read_by (manyToMany) -> PERSON + this.entity.removeAllSourceRelationsByName("read_by"); + for (Entity owner : this.ownedByPeople.getEntities()) { if (owner.isLightweight()) { owner = getWrapper().getEntityByIdWithContent(owner.getId()); @@ -279,6 +287,11 @@ } */ + //REFERENCE -> is_reference_of -> THIS + //this.entity = this.prepareReferencesToSave(this.entity); + this.saveReferences(); + + // save this entity this.entity = getWrapper().saveEntity(this.entity, getSessionUser().getEmail(), editCodexIntent); @@ -356,7 +369,21 @@ } } - public EntityList getOwnedByPeople() { + /** + * @return the aliasIdList + */ + public EntityList getAliasIdList() { + return aliasIdList; + } + + /** + * @param aliasIdList the aliasIdList to set + */ + public void setAliasIdList(EntityList aliasIdList) { + this.aliasIdList = aliasIdList; + } + + public EntityList getOwnedByPeople() { return ownedByPeople; } diff -r 92c4c9f7312a -r d5ae699a4152 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentPersonBean.java Tue May 22 18:49:10 2018 +0200 @@ -66,7 +66,7 @@ PERSON, // attributes new String[]{"name", "name_translit", "birth_date", "birth_date_text", "death_date", "death_date_text", - "url", "authority_id", "notes", "notes_old"}, + "url", "authority_id", "notes", "notes_old", "mams_number"}, // source relations new String[]{"was_born_in", "was_born_in_as", "died_in", "died_in_as", "lived_in", "lived_in_as", "was_student_of", "has_floruit_date", "has_role"}, diff -r 92c4c9f7312a -r d5ae699a4152 src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java --- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Tue May 22 18:49:10 2018 +0200 @@ -90,6 +90,7 @@ private boolean renderShowAllCodexCandidates = false; //private Entity witness_old; + private EntityList aliasIdList; private String newIdentifier; //private IslamicCalendar islamicCalCopyDate; @@ -114,7 +115,7 @@ "was_copied_in", "was_copied_in_as", "had_patron", "was_studied_by", "has_author_written_as", "has_title_written_as"}, // target relations - new String[] {"is_reference_of"}); + new String[] {"is_reference_of", is_alias_identifier_of}); public CurrentWitnessBean() { super(); @@ -188,7 +189,9 @@ this.createCodexRendered = false; this.renderShowAllCodexCandidates = false; - this.newIdentifier = ""; + this.aliasIdList = new EntityList(ALIAS, "alias", getWrapper(), getUserName()); + + this.newIdentifier = ""; //this.islamicCalCopyDate = new IslamicCalendar(); this.copyDate = new Calendar(); @@ -245,6 +248,8 @@ // WITNESS -> had_patron -> PERSON this.entity.replaceUniqueSourceRelation(this.patronageLo.entity, PERSON, rel_had_patron); + // ALIAS -> is_identifier_of -> CODEX + replaceMultipleTargetRelations(entity, aliasIdList.getEntities(), ALIAS, is_alias_identifier_of); /* * save misidentifications @@ -528,7 +533,13 @@ } } - //this.loadReferences(this.entity); + // ALIAS is_alias_identifier_of WITNESS + for(Relation rel : getWrapper().getTargetRelations(witness, is_alias_identifier_of, ALIAS, -1)) { + Entity alias = getWrapper().getEntityById(rel.getSourceId()); + this.aliasIdList.add(alias); + } + + //this.loadReferences(this.entity); this.loadEndNoteRefs(); this.setCurrentId(this.entity.getId().toString()); @@ -1131,6 +1142,20 @@ public void setMisidentTable(MisidentificationTable misidentTable) { this.misidentTable = misidentTable; } + + /** + * @return the aliasIdList + */ + public EntityList getAliasIdList() { + return aliasIdList; + } + + /** + * @param aliasIdList the aliasIdList to set + */ + public void setAliasIdList(EntityList aliasIdList) { + this.aliasIdList = aliasIdList; + } } diff -r 92c4c9f7312a -r d5ae699a4152 src/main/webapp/browse/entityDetails.xhtml --- a/src/main/webapp/browse/entityDetails.xhtml Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/webapp/browse/entityDetails.xhtml Tue May 22 18:49:10 2018 +0200 @@ -50,12 +50,6 @@ rendered="#{Session.canEdit}" action="#{Session.entDetailsForm.actionEdit}" style="margin-right: 20px;" /> - + + + + diff -r 92c4c9f7312a -r d5ae699a4152 src/main/webapp/entry/codex.xhtml --- a/src/main/webapp/entry/codex.xhtml Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/webapp/entry/codex.xhtml Tue May 22 18:49:10 2018 +0200 @@ -104,6 +104,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -274,7 +303,7 @@ - diff -r 92c4c9f7312a -r d5ae699a4152 src/main/webapp/entry/witness.xhtml --- a/src/main/webapp/entry/witness.xhtml Fri Oct 20 16:59:48 2017 +0200 +++ b/src/main/webapp/entry/witness.xhtml Tue May 22 18:49:10 2018 +0200 @@ -123,12 +123,39 @@ - - + + + + + + + + + + + + + + + + + + + + + + +