changeset 104:42d0169904f3

add search for place type.
author casties
date Fri, 04 Nov 2016 18:10:07 +0100
parents 03dcbaf8b8cf
children e27603a39e70
files src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java src/main/webapp/browse/entityRepository.xhtml
diffstat 2 files changed, 36 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java	Thu Nov 03 20:10:58 2016 +0100
+++ b/src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java	Fri Nov 04 18:10:07 2016 +0100
@@ -52,6 +52,7 @@
 	private String collectionName;
 
 	private String placeName;
+	private String placeType;
 	
 	private String aliasAlias;
 	
@@ -269,6 +270,9 @@
             if (StringUtils.isNotEmpty(this.placeName)) {
                 filterList.add(new AttributeFilter("name", this.placeName, PLACE));
             }
+            if (StringUtils.isNotEmpty(this.placeType)) {
+                filterList.add(new AttributeFilter("type", this.placeType, PLACE));
+            }
         } else if (this.objectClass.equals(CODEX)) {
             if (StringUtils.isNotEmpty(this.codexIdentifier)) {
                 filterList.add(new AttributeFilter("identifier", this.codexIdentifier, CODEX));
@@ -466,7 +470,21 @@
 		this.placeName = placeName;
 	}
 
-	public String getCollectionName() {
+	/**
+     * @return the placeType
+     */
+    public String getPlaceType() {
+        return placeType;
+    }
+
+    /**
+     * @param placeType the placeType to set
+     */
+    public void setPlaceType(String placeType) {
+        this.placeType = placeType;
+    }
+
+    public String getCollectionName() {
 		return collectionName;
 	}
 
--- a/src/main/webapp/browse/entityRepository.xhtml	Thu Nov 03 20:10:58 2016 +0100
+++ b/src/main/webapp/browse/entityRepository.xhtml	Fri Nov 04 18:10:07 2016 +0100
@@ -73,12 +73,14 @@
 									<h:column>
 										<h:inputText value="#{EntityRepository.textFullTitle}" />
 									</h:column>
+									
 									<h:column>
 										<h:outputText value="Full Title Translit" />
 									</h:column>
 									<h:column>
 										<h:inputText value="#{EntityRepository.textFullTitleTranslit}" />
 									</h:column>
+									
 									<h:column>
 										<h:outputText value="Prime Alias" />
 									</h:column>
@@ -96,6 +98,7 @@
 										<h:inputText value="#{EntityRepository.aliasAlias}" />
 									</h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'PLACE'}">
 									<h:column>
@@ -104,7 +107,15 @@
 									<h:column>
 										<h:inputText value="#{EntityRepository.placeName}" />
 									</h:column>
+
+                                    <h:column>
+                                        <h:outputText value="Type" />
+                                    </h:column>
+                                    <h:column>
+                                        <h:inputText value="#{EntityRepository.placeType}" />
+                                    </h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'COLLECTION'}">
 									<h:column>
@@ -114,6 +125,7 @@
 										<h:inputText value="#{EntityRepository.collectionName}" />
 									</h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'WITNESS'}">
 									<h:column>
@@ -123,6 +135,7 @@
 										<h:inputText value="#{EntityRepository.witnessAhlwardtNo}" />
 									</h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'REPOSITORY'}">
 									<h:column>
@@ -132,6 +145,7 @@
 										<h:inputText value="#{EntityRepository.repositoryName}" />
 									</h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'CODEX'}">
 									<h:column>
@@ -141,6 +155,7 @@
 										<h:inputText value="#{EntityRepository.codexIdentifier}" />
 									</h:column>
 								</h:panelGrid>
+								
 								<h:panelGrid columns="2"
 									rendered="#{EntityRepository.objectClass == 'SUBJECT'}">
 									<h:column>
@@ -153,6 +168,7 @@
 										</h:selectOneMenu>
 									</h:column>
 								</h:panelGrid>
+								
                                 <h:panelGrid columns="2"
                                     rendered="#{EntityRepository.objectClass == 'REFERENCE'}">
                                     <h:column>
@@ -162,6 +178,7 @@
                                         <h:inputText value="#{EntityRepository.referenceBibIdNo}" />
                                     </h:column>
                                 </h:panelGrid>
+                                
 								<a4j:commandButton value="Submit"
 									rendered="#{EntityRepository.renderedSearch}"
 									action="#{EntityRepository.actionSearchByAttributes}" styleClass="button"