Mercurial > hg > ismi-richfaces
diff src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java @ 125:eee2e0ca4032
updated entry beans to use EditIntents.
author | casties |
---|---|
date | Tue, 31 Jan 2017 18:09:54 +0100 |
parents | 28a0c2726466 |
children | 5ccd6e709f95 |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Mon Jan 30 20:35:36 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/ismi/entry/beans/CurrentWitnessBean.java Tue Jan 31 18:09:54 2017 +0100 @@ -15,6 +15,7 @@ import org.mpi.openmind.repository.bo.Entity; import org.mpi.openmind.repository.bo.Node; import org.mpi.openmind.repository.bo.Relation; +import org.mpi.openmind.repository.services.utils.EditIntent; import org.mpi.openmind.security.bo.User; import de.mpiwg.itgroup.ismi.auxObjects.AliasListenerObject; @@ -99,6 +100,21 @@ private MisidentificationTable misidentTable; + /** intent to edit all attributes and relations in the form */ + public static EditIntent editWitnessIntent = new EditIntent( + AbstractISMIBean.WITNESS, + // attributes + new String[]{"ahlward_no", "creation_date", "table_of_contents", "incipit", "explicit", "colophon", + "folios", "is_autograph", "page_dimensions", "written_area_dimensions", "lines_per_page", + "writing_surface", "page_layout", "script", "other_features", "diagrams_and_illustrations", + "scans", "notes", "notes_old", "notes_on_title_author", "notes_on_collation_and_corrections", + "notes_on_ownership", "source_of_information"}, + // source relations + new String[]{"is_exemplar_of", "is_part_of", "has_author_misidentification", "was_copied_by", + "was_copied_in", "was_copied_in_as", "had_patron", "was_studied_by"}, + // target relations + new String[]{"is_reference_of"}); + public CurrentWitnessBean() { super(); this.entity = new Entity(Node.TYPE_ABOX, WITNESS, false); @@ -257,9 +273,9 @@ // WITNESS -> is_part_of_codex if(this.isSelectedSaveAsNew()){ - this.entity = getWrapper().saveEntityAsNew(this.entity, user.getEmail()); + //this.entity = getWrapper().saveEntityAsNew(this.entity, user.getEmail()); }else{ - this.entity = getWrapper().saveEntity(this.entity, user.getEmail(), null); + this.entity = getWrapper().saveEntity(this.entity, user.getEmail(), editWitnessIntent); } this.setEntity(this.entity);