DB연동처리 및 검색엔진 기존 소스 추가 작업 - 중간백업
This commit is contained in:
parent
62f8ac6567
commit
218a426ee8
@ -34,5 +34,6 @@
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
13
pom.xml
13
pom.xml
@ -250,6 +250,19 @@
|
||||
<artifactId>log4jdbc-remix</artifactId>
|
||||
<version>0.2.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.20</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 검색엔진 연동 (DIGITALSHIP KNKIM 2021.08.09) -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.7</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
185
src/main/java/egovframework/com/cmm/ComDefaultCodeVO.java
Normal file
@ -0,0 +1,185 @@
|
||||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.11 이삼섭 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ComDefaultCodeVO implements Serializable {
|
||||
/** 코드 ID */
|
||||
private String codeId = "";
|
||||
|
||||
/** 상세코드 */
|
||||
private String code = "";
|
||||
|
||||
/** 코드명 */
|
||||
private String codeNm = "";
|
||||
|
||||
/** 코드설명 */
|
||||
private String codeDc = "";
|
||||
|
||||
/** 특정테이블명 */
|
||||
private String tableNm = ""; //특정테이블에서 코드정보를추출시 사용
|
||||
|
||||
/** 상세 조건 여부 */
|
||||
private String haveDetailCondition = "N";
|
||||
|
||||
/** 상세 조건 */
|
||||
private String detailCondition = "";
|
||||
|
||||
/**
|
||||
* codeId attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeId
|
||||
*/
|
||||
public String getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeId
|
||||
* the codeId to set
|
||||
*/
|
||||
public void setCodeId(String codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute를 리턴한다.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 값을 설정한다.
|
||||
*
|
||||
* @param code
|
||||
* the code to set
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeNm
|
||||
*/
|
||||
public String getCodeNm() {
|
||||
return codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeNm
|
||||
* the codeNm to set
|
||||
*/
|
||||
public void setCodeNm(String codeNm) {
|
||||
this.codeNm = codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeDc
|
||||
*/
|
||||
public String getCodeDc() {
|
||||
return codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeDc
|
||||
* the codeDc to set
|
||||
*/
|
||||
public void setCodeDc(String codeDc) {
|
||||
this.codeDc = codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the tableNm
|
||||
*/
|
||||
public String getTableNm() {
|
||||
return tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param tableNm
|
||||
* the tableNm to set
|
||||
*/
|
||||
public void setTableNm(String tableNm) {
|
||||
this.tableNm = tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the haveDetailCondition
|
||||
*/
|
||||
public String getHaveDetailCondition() {
|
||||
return haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param haveDetailCondition
|
||||
* the haveDetailCondition to set
|
||||
*/
|
||||
public void setHaveDetailCondition(String haveDetailCondition) {
|
||||
this.haveDetailCondition = haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the detailCondition
|
||||
*/
|
||||
public String getDetailCondition() {
|
||||
return detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param detailCondition
|
||||
* the detailCondition to set
|
||||
*/
|
||||
public void setDetailCondition(String detailCondition) {
|
||||
this.detailCondition = detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
}
|
||||
108
src/main/java/kccf/sch/common/WNAnchor.java
Normal file
108
src/main/java/kccf/sch/common/WNAnchor.java
Normal file
@ -0,0 +1,108 @@
|
||||
package kccf.sch.common;
|
||||
|
||||
public class WNAnchor {
|
||||
private int m_before = -1;
|
||||
private int m_next = -1;
|
||||
private int m_bundleBefore = -1;
|
||||
private int m_bundleNext = -1;
|
||||
private int m_firstPage = -1;
|
||||
private int m_lastPage = -1;
|
||||
private int m_totalPgCount = 0;
|
||||
private int m_totlalBundlePgCount = 0;
|
||||
private int m_pageCount = 0;
|
||||
private int m_curPageNumber = 1;
|
||||
private String[][] m_pages = new String[1][2];
|
||||
|
||||
public WNAnchor() {
|
||||
m_pages[0][0] = "1";
|
||||
m_pages[0][1] = "-1";
|
||||
}
|
||||
|
||||
public int getBefore() {
|
||||
return m_before;
|
||||
}
|
||||
|
||||
public void setBefore(int before) {
|
||||
m_before = before;
|
||||
}
|
||||
|
||||
public int getFirstPage() {
|
||||
return m_firstPage;
|
||||
}
|
||||
|
||||
public void setFirstPage(int firstPage) {
|
||||
m_firstPage = firstPage;
|
||||
}
|
||||
|
||||
public int getLastPage() {
|
||||
return m_lastPage;
|
||||
}
|
||||
|
||||
public void setLastPage(int lastPage) {
|
||||
m_lastPage = lastPage;
|
||||
}
|
||||
|
||||
public int getNext() {
|
||||
return m_next;
|
||||
}
|
||||
|
||||
public void setNext(int next) {
|
||||
m_next = next;
|
||||
}
|
||||
|
||||
public int getBundleBefore() {
|
||||
return m_bundleBefore;
|
||||
}
|
||||
|
||||
public void setBundleBefore(int bundleBefore) {
|
||||
m_bundleBefore = bundleBefore;
|
||||
}
|
||||
|
||||
public int getBundleNext() {
|
||||
return m_bundleNext;
|
||||
}
|
||||
|
||||
public void setBundleNext(int bundleNext) {
|
||||
m_bundleNext = bundleNext;
|
||||
}
|
||||
|
||||
public int getTotalPgCount() {
|
||||
return m_totalPgCount;
|
||||
}
|
||||
|
||||
public void setTotalPgCount(int totalPgCount) {
|
||||
m_totalPgCount = totalPgCount;
|
||||
}
|
||||
|
||||
public int getTotlalBundlePgCount() {
|
||||
return m_totlalBundlePgCount;
|
||||
}
|
||||
|
||||
public void setTotlalBundlePgCount(int totlalBundlePgCount) {
|
||||
m_totlalBundlePgCount = totlalBundlePgCount;
|
||||
}
|
||||
|
||||
public int getPageCount() {
|
||||
return m_pageCount;
|
||||
}
|
||||
|
||||
public void setPageCount(int pageCount) {
|
||||
m_pageCount = pageCount;
|
||||
}
|
||||
|
||||
public int getCurPageNumber() {
|
||||
return m_curPageNumber;
|
||||
}
|
||||
|
||||
public void setCurPageNumber(int curPageNumber) {
|
||||
m_curPageNumber = curPageNumber;
|
||||
}
|
||||
|
||||
public String[][] getPages() {
|
||||
return m_pages;
|
||||
}
|
||||
|
||||
public void setPages(String[][] pages) {
|
||||
m_pages = pages;
|
||||
}
|
||||
}
|
||||
335
src/main/java/kccf/sch/common/WNCollection.java
Normal file
335
src/main/java/kccf/sch/common/WNCollection.java
Normal file
@ -0,0 +1,335 @@
|
||||
package kccf.sch.common;
|
||||
|
||||
public class WNCollection {
|
||||
|
||||
|
||||
public static String[] COLLECTIONS = new String[]{"info","map","number","pick","reference","story","culturePost","total","culturePostHot","toon","ocr"};
|
||||
public static String[] COLLECTIONS_NAME = new String[]{"info","map","number","pick","reference","story","culturePost","total","culturePostHot","toon","ocr"};
|
||||
public static String[] MERGE_COLLECTIONS = new String[]{""};
|
||||
public String[][] MERGE_COLLECTION_INFO = null;
|
||||
public String[][] COLLECTION_INFO = null;
|
||||
public WNCollection(){
|
||||
COLLECTION_INFO = new String[][]
|
||||
{
|
||||
{
|
||||
"info", // set index name
|
||||
"info", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,CONTENT_TYPE_NAME_EX,SIDO_NAME",// set search field
|
||||
"DOCID,DATE,CONT_TYPE,CAT1_NAME,GIA_CAT2_NAME,CAT3_NAME,CONTENT_ID,CONTENT_TYPE_ID,CONTENT_TYPE_NAME,TITLE,SIDO_NAME,SIGUNGU_NAME,SEARCH_AREA,MAIN_IMG,ADDR1,ZIP_CODE,TEL,ALIAS,SEARCH_AREA_COUNCIL,SEARCH_AREA_COUNCIL_INFO",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"CONTENT_TYPE_NAME,SEARCH_AREA_COUNCIL_INFO", // use check prefix query filed
|
||||
"", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"info" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"map", // set index name
|
||||
"map", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,TRS_AGE_EX,INTERFACE_ID,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_TOPIC,SECOND_TOPIC,FIRST_CLASS,SECOND_CLASS,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM",// set search field
|
||||
"DOCID,DATE,CONTENT_TYPE,CONTENT_ID,TITLE,SUMMARY,MAIN_IMG,ADDR1,LATITUDE,LONGITUDE,LINK_DATA,READ_CNT,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_TOPIC,SECOND_TOPIC,FIRST_CLASS,SECOND_CLASS,SIDO_NAME,SIGUNGU_NAME,ADDR2,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,CONTENT_TYPE_ID,ID,FIRST_CATEGORY,SECOND_CATEGORY,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,TAGS_NAME,CONTENT_TYPE_NAME,CAT1,CAT1_NAME,CAT2,CAT2_NAME,CAT3,CAT3_NAME,ZIP_CODE,TEL,RECOMMEND_YN,NTCE_BGNDE,NTCE_ENDDE,WEBSITE,UPDATED_AT,COUNCIL_CD,COUNCIL_NM,ALIAS,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,CONTENT_TYPE", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"map" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"number", // set index name
|
||||
"number", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TAGS,TITLE,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,FIRST_TOPIC,SECOND_TOPIC,THEME_CD_EX,THEME_NM_EX,SERIES_CD_EX,SERIES_NM_EX",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,SIDO_NAME,SIGUNGU_NAME,LINK_DATA,FIRST_TOPIC,SECOND_TOPIC,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,TAGS,COUNCIL,KEYWORDS,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_CATEGORY,SECOND_CATEGORY,READ_CNT,CONTENT_ID,CONTENT_TYPE,ID,SEARCH_THEME_CD,SEARCH_THEME_NM,SEARCH_CLASS,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,SOJANG_COUNCIL_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,MEDIA_ID,ASSET_CLASS,ALIAS,SEARCH_AREA_COUNCIL,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,COUNCIL_NM_TOT,ASSET_TYPE,MAIN_IMG",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,FIRST_CLASS,SECOND_CLASS,THEME_CD,THEME_NM,SEARCH_THEME_CD,SEARCH_THEME_NM,SOJANG_COUNCIL,KEYWORDS,SIDO_NAME,SERIES_CD,SERIES_NM", // use check prefix query filed
|
||||
"GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END,READ_CNT", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"number" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"pick", // set index name
|
||||
"pick", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,SUMMARY,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,THEME,SERIES,COUNCIL,KEYWORDS_EX,TAGS,OCR_TEXT_TOT",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,TAGS,KEYWORDS,READ_CNT,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_CATEGORY,SECOND_CATEGORY,SEARCH_CLASS,AUTHOR,PUBLISHER,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,COUNCIL,SIDO_NAME,SIGUNGU_NAME,TRS_SIDO_NAME,TRS_SIGUNGU_NAME,FIRST_CLASS_NM,SECOND_CLASS_NM,SEARCH_AREA_COUNCIL,LINK_DATA,ASSETS_ID,MEDIA_ID,MAIN_IMG,MGNT_NO,ASSET_TYPE,THEME,SERIES,ORG_OPEN_AT,STRE_FILE_NAME,ALIAS,SUBTITLE,ADDITION,ORIGNL_FILE_NAME,FILE_SIZE,WIDTH,HEIGHT,IMG_ALT,MEDIA_TYPE,PLAYER_AT,PLAY_TIME,VOLUME,TOTAL_PAGE,ISBN,WEBSITE_NAME,LINK_USE_AT,MAKING_DATE,FILMING_LOCATION,SUBTITLE_AT,SUBTITLE_ORG_FILE_NAME,SUBTITLE_STRE_FILE_NAME,SUBTITLE_DESC,PROVIDER,SOURCE_AT,SOURCE,COPYRIGHT,RETENTION_PERIOD,COPYRIGHT_MGNT_DEPART,THIRD_COPYRIGHT,CCL_TYPE,UPDATED_AT,DELETED_AT,USE_AT,REMARKS_DESC,RECOMMEND_YN,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,COUNCIL_NM_TOT,OCR_TEXT_TOT",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,FIRST_CATEGORY,SECOND_CATEGORY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,MGNT_NO,KEYWORDS,SIDO_NAME,MEDIA_ID,ASSET_TYPE,ASSETS_ID", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"pick" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"reference", // set index name
|
||||
"reference", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"custom,rweight=0.7;dweight=0.2;fweight=0.1,0", // set sort field (field,order) multi sort '/'
|
||||
"TITLE/5,SUMMARY,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,THEME,SERIES,COUNCIL,KEYWORDS_EX,TAGS,OCR_TEXT_TOT",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,TAGS,KEYWORDS,READ_CNT,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_CATEGORY,SECOND_CATEGORY,SEARCH_CLASS,SEARCH_CATEGORY,AUTHOR,PUBLISHER,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,COUNCIL,SIDO_NAME,SIGUNGU_NAME,TRS_SIDO_NAME,TRS_SIGUNGU_NAME,FIRST_CLASS_NM,SECOND_CLASS_NM,SEARCH_AREA_COUNCIL,LINK_DATA,ASSETS_ID,MEDIA_ID,MAIN_IMG,MGNT_NO,ASSET_TYPE,THEME,SERIES,ORG_OPEN_AT,STRE_FILE_NAME,ALIAS,SUBTITLE,ADDITION,ORIGNL_FILE_NAME,FILE_SIZE,WIDTH,HEIGHT,IMG_ALT,MEDIA_TYPE,PLAYER_AT,PLAY_TIME,VOLUME,TOTAL_PAGE,ISBN,WEBSITE_NAME,LINK_USE_AT,MAKING_DATE,FILMING_LOCATION,SUBTITLE_AT,SUBTITLE_ORG_FILE_NAME,SUBTITLE_STRE_FILE_NAME,SUBTITLE_DESC,PROVIDER,SOURCE_AT,SOURCE,COPYRIGHT,RETENTION_PERIOD,COPYRIGHT_MGNT_DEPART,THIRD_COPYRIGHT,CCL_TYPE,UPDATED_AT,DELETED_AT,USE_AT,REMARKS_DESC,RECOMMEND_YN,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,OCR_TEXT_TOT,COUNCIL_NM_TOT,TABLE_OF_CONTENTS,ORG_OPEN_EXIST,MAIN_IMG_EXIST",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,FIRST_CATEGORY,SECOND_CATEGORY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,MGNT_NO,KEYWORDS,SIDO_NAME,MEDIA_ID,ASSET_TYPE,ASSETS_ID", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"reference" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"story", // set index name
|
||||
"story", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,SUMMARY,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_TOPIC,SECOND_TOPIC,THEME_CD_EX,THEME_NM_EX,SERIES_CD_EX,SERIES_NM_EX,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,KEYWORDS_EX,TAGS",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,SIDO_NAME,SIGUNGU_NAME,DONG_NAME1,AGE,TRS_AGE,LINK_DATA,FIRST_TOPIC,SECOND_TOPIC,TAGS,KEYWORDS,COUNCIL,READ_CNT,INTERFACE_ID,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END,ID,SEARCH_THEME_CD,SEARCH_THEME_NM,SEARCH_AREA_COUNCIL,MAIN_IMG,FIRST_CLASS,SECOND_CLASS,FIRST_CLASS_NM,SECOND_CLASS_NM,FIRST_CATEGORY,SECOND_CATEGORY,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,ALIAS,SOJANG_COUNCIL,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"THEME_CD,THEME_NM,TRS_AGE,SEARCH_THEME_CD,SEARCH_THEME_NM,SOJANG_COUNCIL,KEYWORDS,SERIES_CD,SERIES_NM,SECOND_CATEGORY,FIRST_CATEGORY", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"story" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"culturePost", // set index name
|
||||
"culturePost", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,SUMMARY,TAGS,KEYWORDS",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,TAGS,MAIN_IMG,ALIAS,KEYWORDS",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"", // use check prefix query filed
|
||||
"", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"culturePost" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"total", // set index name
|
||||
"total", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,TAGS_TITLE,SUMMARY,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,THEME_CD_EX,THEME_NM_EX,SERIES_CD_EX,SERIES_NM_EX,COUNCIL,KEYWORDS,CONTENT_TYPE_NAME,SIDO_NAME_EX,TAGS,NUMBER_TITLE,FIRST_TOPIC,SECOND_TOPIC",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,FIRST_CLASS,SECOND_CLASS,TAGS,READ_CNT,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_CATEGORY,SECOND_CATEGORY,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,SIDO_NAME,SOJANG_COUNCIL,LINK_DATA,MAIN_IMG,MGNT_NO,TAGS_TITLE,ALIAS,NUMBER_TITLE,SEARCH_THEME_CD,SEARCH_THEME_NM,NUMBER_SUMMARY,INTERFACE_ID,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,COUNCIL,KEYWORDS,CONTENT_TYPE_NAME,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_TOPIC,SECOND_TOPIC,ID,MEDIA_ID,ORG_OPEN_AT,ASSET_TYPE,ASSETS_ID,STRE_FILE_NAME,CONTENT_ID,CONT_TYPE",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,FIRST_CATEGORY,SECOND_CATEGORY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,MGNT_NO,SIDO_NAME,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,SEARCH_THEME_NM,SEARCH_THEME_CD", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"total" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"culturePostHot", // set index name
|
||||
"culturePostHot", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,SUMMARY,INTERFACE_ID,GENYEAR_SCH,TRS_AGE_EX,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_TOPIC,SECOND_TOPIC",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,LINK_DATA,TAGS,MAIN_IMG,READ_CNT,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_TOPIC,SECOND_TOPIC,ID,KEYWORDS,THEME_CD,THEME_NM,SERIES_CD,SERIES_NM,ALIAS,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,KEYWORDS", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"culturePostHot" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"toon", // set index name
|
||||
"toon", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"TITLE,SUMMARY,INTERFACE_ID,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,FIRST_CLASS_NM,SECOND_CLASS_NM,TAGS",// set search field
|
||||
"DOCID,DATE,TITLE,SUMMARY,FIRST_CLASS,SECOND_CLASS,SOJANG_COUNCIL,TAGS,KEYWORDS,READ_CNT,INTERFACE_ID,GENYEAR,TRS_AGE,CHRONOLOGICAL_START,CHRONOLOGICAL_END,FIRST_CATEGORY,SECOND_CATEGORY,SEARCH_CLASS,AUTHOR,PUBLISHER,FIRST_CATEGORY_NM,SECOND_CATEGORY_NM,SOJANG_COUNCIL_NM,SIDO_NAME,SIGUNGU_NAME,TRS_SIDO_NAME,TRS_SIGUNGU_NAME,FIRST_CLASS_NM,SECOND_CLASS_NM,SEARCH_AREA_COUNCIL,LINK_DATA,ASSETS_ID,MEDIA_ID,MAIN_IMG,MGNT_NO,ASSET_TYPE,THEME,SERIES,ORG_OPEN_AT,STRE_FILE_NAME,SUBTITLE,ADDITION,ORIGNL_FILE_NAME,FILE_SIZE,WIDTH,HEIGHT,IMG_ALT,MEDIA_TYPE,PLAYER_AT,PLAY_TIME,VOLUME,TOTAL_PAGE,ISBN,WEBSITE_NAME,LINK_USE_AT,MAKING_DATE,FILMING_LOCATION,SUBTITLE_AT,SUBTITLE_ORG_FILE_NAME,SUBTITLE_STRE_FILE_NAME,SUBTITLE_DESC,PROVIDER,SOURCE_AT,SOURCE,COPYRIGHT,RETENTION_PERIOD,COPYRIGHT_MGNT_DEPART,THIRD_COPYRIGHT,CCL_TYPE,UPDATED_AT,DELETED_AT,USE_AT,REMARKS_DESC,RECOMMEND_YN,GENYEAR_SCH,CHRONOLOGICAL_START_SCH,CHRONOLOGICAL_END_SCH",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"TRS_AGE,KEYWORDS", // use check prefix query filed
|
||||
"READ_CNT,GENYEAR,CHRONOLOGICAL_START,CHRONOLOGICAL_END", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"toon" // collection display name
|
||||
}
|
||||
,
|
||||
{
|
||||
"ocr", // set index name
|
||||
"ocr", // set collection name
|
||||
"0,3", // set pageinfo (start,count)
|
||||
"1,0,0,1,0", // set query analyzer (useKMA,isCase,useOriginal,useSynonym, duplcated detection)
|
||||
"RANK/DESC,DATE/DESC", // set sort field (field,order) multi sort '/'
|
||||
"basic,rpfmo,100", // set sort field (field,order) multi sort '/'
|
||||
"OCR_TEXT",// set search field
|
||||
"DOCID,ID,MEDIA_ID,FIRST_PAGE_NUM,LAST_PAGE_NUM,ORDER_NUM,OCR_TEXT,FILE_NAME,ALIAS",// set document field
|
||||
"", // set date range
|
||||
"", // set rank range
|
||||
"", // set prefix query, example: <fieldname:contains:value1>|<fieldname:contains:value2>/1, (fieldname:contains:value) and ' ', or '|', not '!' / operator (AND:1, OR:0)
|
||||
"", // set collection query (<fieldname:contains:value^weight | value^weight>/option...) and ' ', or '|'
|
||||
"", // set boost query (<fieldname:contains:value> | <field3:contains:value>...) and ' ', or '|'
|
||||
"", // set filter operation (<fieldname:operator:value>)
|
||||
"", // set groupby field(field, count)
|
||||
"", // set sort field group(field/order,field/order,...)
|
||||
"", // set categoryBoost(fieldname,matchType,boostID,boostKeyword)
|
||||
"", // set categoryGroupBy (fieldname:value)
|
||||
"", // set categoryQuery (fieldname:value)
|
||||
"", // set property group (fieldname,min,max, groupcount)
|
||||
"MEDIA_ID", // use check prefix query filed
|
||||
"ID", // set use check fast access field
|
||||
"", // set multigroupby field
|
||||
"", // set auth query (Auth Target Field, Auth Collection, Auth Reference Field, Authority Query)
|
||||
"", // set Duplicate Detection Criterion Field, RANK/DESC,DATE/DESC
|
||||
"ocr" // collection display name
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
1583
src/main/java/kccf/sch/common/WNCommon.java
Normal file
1583
src/main/java/kccf/sch/common/WNCommon.java
Normal file
File diff suppressed because it is too large
Load Diff
73
src/main/java/kccf/sch/common/WNDefine.java
Normal file
73
src/main/java/kccf/sch/common/WNDefine.java
Normal file
@ -0,0 +1,73 @@
|
||||
package kccf.sch.common;
|
||||
public class WNDefine {
|
||||
public final static int CONNECTION_TIMEOUT = 20000;
|
||||
public final static String CHARSET = "UTF-8";
|
||||
public final static int REALTIME_COUNT=100;
|
||||
public final static int PAGE_SCALE = 10; //view page list count
|
||||
|
||||
public final static int CONNECTION_KEEP = 0; //recevive mode
|
||||
public final static int CONNECTION_REUSE = 2;
|
||||
public final static int CONNECTION_CLOSE = 3;
|
||||
|
||||
public final static int ASC = 0; //order
|
||||
public final static int DESC = 1; //order
|
||||
|
||||
public final static int USE_KMA_OFFOFF = 0; //synonym, morpheme
|
||||
public final static int USE_KMA_ONON = 1;
|
||||
public final static int USE_KMA_ONOFF = 2;
|
||||
|
||||
public final static int USE_RESULT_STRING = 0; //result data type
|
||||
public final static int USE_RESULT_XML = 1;
|
||||
public final static int USE_RESULT_JSON = 2;
|
||||
public final static int USE_RESULT_DUPLICATE_STRING = 3; //uid result data type
|
||||
public final static int USE_RESULT_DUPLICATE_XML = 4;
|
||||
public final static int USE_RESULT_DUPLICATE_JSON = 5;
|
||||
|
||||
public final static int IS_CASE_ON = 1; //case on, off
|
||||
public final static int IS_CASE_OFF = 0;
|
||||
|
||||
public final static int HI_SUM_OFFOFF = 0; //summarizing, highlighting
|
||||
public final static int HI_SUM_OFFON = 1;
|
||||
public final static int HI_SUM_ONOFF = 2;
|
||||
public final static int HI_SUM_ONON = 3;
|
||||
|
||||
public final static int COMMON_OR_WHEN_NORESULT_OFF = 0;
|
||||
public final static int COMMON_OR_WHEN_NORESULT_ON = 1;
|
||||
|
||||
public final static int INDEX_NAME = 0;
|
||||
public final static int COLLECTION_NAME = 1;
|
||||
public final static int PAGE_INFO = 2;
|
||||
public final static int ANALYZER = 3;
|
||||
public final static int SORT_FIELD = 4;
|
||||
public final static int RANKING_OPTION = 5;
|
||||
public final static int SEARCH_FIELD = 6;
|
||||
public final static int RESULT_FIELD = 7;
|
||||
public final static int DATE_RANGE = 8;
|
||||
public final static int RANK_RANGE = 9;
|
||||
public final static int EXQUERY_FIELD = 10;
|
||||
public final static int COLLECTION_QUERY =11;
|
||||
public final static int BOOST_QUERY =12;
|
||||
public final static int FILTER_OPERATION = 13;
|
||||
public final static int GROUP_BY = 14;
|
||||
public final static int GROUP_SORT_FIELD = 15;
|
||||
public final static int CATEGORY_BOOST = 16;
|
||||
public final static int CATEGORY_GROUPBY = 17;
|
||||
public final static int CATEGORY_QUERY = 18;
|
||||
public final static int PROPERTY_GROUP = 19;
|
||||
public final static int PREFIX_FIELD = 20;
|
||||
public final static int FAST_ACCESS = 21;
|
||||
public final static int MULTI_GROUP_BY = 22;
|
||||
public final static int AUTH_QUERY = 23;
|
||||
public final static int DEDUP_SORT_FIELD = 24;
|
||||
public final static int COLLECTION_KOR = 25;
|
||||
|
||||
public final static int MERGE_COLLECTION_NAME = 0;
|
||||
public final static int MERGE_MAPPING_COLLECTION_NAME = 1;
|
||||
public final static int MERGE_PAGE_INFO = 2;
|
||||
public final static int MERGE_RESULT_FIELD = 3;
|
||||
public final static int MERGE_MAPPING_RESULT_FIELD = 4;
|
||||
public final static int MERGE_MULTI_GROUP_BY_FIELD = 5;
|
||||
public final static int MERGE_MAPPING_MULTI_GROUP_BY_FIELD = 6;
|
||||
public final static int MERGE_CATEGORY_GROUPBY_FIELD = 7;
|
||||
public final static int MERGE_MAPPING_CATEGORY_GROUPBY_FIELD = 8;
|
||||
}
|
||||
2443
src/main/java/kccf/sch/common/WNSearch.java
Normal file
2443
src/main/java/kccf/sch/common/WNSearch.java
Normal file
File diff suppressed because it is too large
Load Diff
338
src/main/java/kccf/sch/common/WNUtils.java
Normal file
338
src/main/java/kccf/sch/common/WNUtils.java
Normal file
@ -0,0 +1,338 @@
|
||||
package kccf.sch.common;
|
||||
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.FieldPosition;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class WNUtils {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WNUtils.class);
|
||||
/*
|
||||
* 문자셋 관련 설정
|
||||
*/
|
||||
final static String ENCODE_ORI = "EUC-KR";
|
||||
final static String ENCODE_NEW = "UTF-8";
|
||||
|
||||
/**
|
||||
* 문자 배열 값을 검색하여 키 값을 리턴
|
||||
* @param fieldName
|
||||
* @param value
|
||||
* @param operation
|
||||
* @return
|
||||
*/
|
||||
public static int findArrayValue(String find, String[] arr) {
|
||||
int findKey = -1;
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
if (find.equals(arr[i])){
|
||||
findKey = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return findKey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
* @param findStr
|
||||
* @param replaceStr
|
||||
* @return
|
||||
*/
|
||||
public static String replace(String s, String findStr, String replaceStr){
|
||||
int pos;
|
||||
int index = 0;
|
||||
|
||||
while ((pos = s.indexOf(findStr, index)) >= 0) {
|
||||
s = s.substring(0, pos) + replaceStr + s.substring(pos + findStr.length());
|
||||
index = pos + replaceStr.length();
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
* @return
|
||||
*/
|
||||
public static String trimDuplecateSpace(String s){
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for(int i=0; i<s.length(); i++){
|
||||
char c = s.charAt(i);
|
||||
if(i < s.length()-1) {
|
||||
if( c == ' ' && s.charAt(i+1)==' '){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
|
||||
public static String parseDate(String input, String inFormat, String outFormat) {
|
||||
String retStr = "";
|
||||
Date date = null;
|
||||
SimpleDateFormat formatter = null;
|
||||
try {
|
||||
date = (new SimpleDateFormat(inFormat)).parse(input.trim());
|
||||
} catch (ParseException e) {
|
||||
LOGGER.info("ParseException occurred");
|
||||
}
|
||||
formatter = new SimpleDateFormat(outFormat);
|
||||
retStr = formatter.format(date);
|
||||
return retStr;
|
||||
}
|
||||
|
||||
public static String getCurrentDate() {
|
||||
java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat
|
||||
("yyyy/MM/dd", java.util.Locale.KOREA);
|
||||
return dateFormat.format(new java.util.Date());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param strNum
|
||||
* @param def
|
||||
* @return
|
||||
*/
|
||||
public static int parseInt(String strNum, int def){
|
||||
if(strNum == null) return def;
|
||||
try{
|
||||
return Integer.parseInt(strNum);
|
||||
}catch(Exception e){
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* String의 값이 null일 경우 ""로 변환하여 리턴한다.
|
||||
* @param temp
|
||||
* @return
|
||||
*/
|
||||
public static String checkNull(String temp) {
|
||||
if (temp != null) {
|
||||
temp = temp.trim();
|
||||
} else {
|
||||
temp = "";
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1차원 배열의 값중 null인 값을 ""로 변환하여 리턴한다.
|
||||
* @param temp
|
||||
* @return
|
||||
*/
|
||||
public static String[] checkNull(String[] temp){
|
||||
for(int i=0; i<temp.length; i++) {
|
||||
temp[i] = checkNull(temp[i]);
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2차원 배열의 값중 null인 값을 ""로 변환하여 리턴한다.
|
||||
* @param temp
|
||||
* @return
|
||||
*/
|
||||
public static String[][] checkNull(String[][] temp) {
|
||||
for(int i=0; i<temp.length; i++) {
|
||||
temp[i][0] = checkNull(temp[i][0]);
|
||||
temp[i][1] = checkNull(temp[i][1]);
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 스트링을 format 에 맞게 변환을 한다.
|
||||
* convertFormat("1", "00") return "01" 로 입력 값을 리턴한다.
|
||||
* @param inputStr
|
||||
* @param format
|
||||
* @return String
|
||||
*/
|
||||
public static String convertFormat(String inputStr, String format){
|
||||
int _input = Integer.parseInt(inputStr);
|
||||
StringBuffer result = new StringBuffer();
|
||||
DecimalFormat df = new DecimalFormat(format);
|
||||
df.format( _input, result, new FieldPosition(1) );
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param str
|
||||
* @param outFormat
|
||||
* @return
|
||||
*/
|
||||
public static String numberFormat(String str, String outFormat) {
|
||||
return new DecimalFormat(outFormat).format(str);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param str
|
||||
* @param oriEncode
|
||||
* @param newEncode
|
||||
* @return
|
||||
*/
|
||||
public static String encoding(String str, String oriEncode, String newEncode) {
|
||||
str = checkNull(str);
|
||||
if(str.length() > 0) {
|
||||
try {
|
||||
str = new String(str.getBytes(oriEncode), newEncode);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
LOGGER.info("UnsupportedEncodingException occurred");
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 구분자를 가지고 있는 문자열을 구분자를 기준으로 나누어주는 메소드
|
||||
* @param splittee 구분자를 가진 문자열
|
||||
* @param splitChar 구분자
|
||||
* @return
|
||||
*/
|
||||
public static String[] split(String splittee, String splitChar){
|
||||
String taRetVal[] = null;
|
||||
StringTokenizer toTokenizer = null;
|
||||
int tnTokenCnt = 0;
|
||||
|
||||
try {
|
||||
toTokenizer = new StringTokenizer(splittee, splitChar);
|
||||
tnTokenCnt = toTokenizer.countTokens();
|
||||
taRetVal = new String[tnTokenCnt];
|
||||
|
||||
for(int i=0; i<tnTokenCnt; i++) {
|
||||
if(toTokenizer.hasMoreTokens()) taRetVal[i] = toTokenizer.nextToken();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
taRetVal = new String[0];
|
||||
}
|
||||
return taRetVal ;
|
||||
}
|
||||
|
||||
/**
|
||||
* String 을 받아 UTF-8 범위내 문자가 이닌경우 공백(0x0020) 으로 치환
|
||||
* @param str
|
||||
* @return String
|
||||
*/
|
||||
public static String validate(String str) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
||||
char ch;
|
||||
for(int i=0; i < str.length(); i++) {
|
||||
ch = str.charAt(i);
|
||||
if(Character.isLetterOrDigit(ch)) {
|
||||
} else {
|
||||
if(Character.isWhitespace(ch)) {
|
||||
} else {
|
||||
if(Character.isISOControl(ch)) {
|
||||
// UTF-8 에서 지원하지 않는 문자 제거
|
||||
ch = (char)0x0020;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buf.append(ch);
|
||||
}
|
||||
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* request null체크
|
||||
**/
|
||||
public String getCheckReq(javax.servlet.http.HttpServletRequest req, String parameter, String default_value) {
|
||||
String req_value = req.getParameter(parameter)!=null ? req.getParameter(parameter):default_value;
|
||||
return req_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* request Array null체크
|
||||
**/
|
||||
public String[] getCheckReqs(javax.servlet.http.HttpServletRequest req, String parameter, String[] default_value) {
|
||||
String[] req_value = req.getParameterValues(parameter);
|
||||
String[] tmp = null;
|
||||
int c = 0;
|
||||
if(req_value!=null) {
|
||||
tmp = new String[req_value.length];
|
||||
for(int i=0; i<req_value.length; i++) {
|
||||
tmp[c] = req_value[i];
|
||||
c++;
|
||||
}
|
||||
}
|
||||
req_value = req.getParameterValues(parameter)!=null ? tmp : default_value;
|
||||
return req_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* request null체크, uncoding
|
||||
**/
|
||||
public String getCheckReqUnocode(javax.servlet.http.HttpServletRequest req, String parameter, String default_value) {
|
||||
String req_value = req.getParameter(parameter)!=null ? encoding(req.getParameter(parameter), ENCODE_ORI, ENCODE_NEW):default_value;
|
||||
return req_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* request Array null체크, uncoding
|
||||
**/
|
||||
public String[] getCheckReqsUnocode(javax.servlet.http.HttpServletRequest req, String parameter, String[] default_value) {
|
||||
String[] req_value = req.getParameterValues(parameter);
|
||||
String[] tmp = null;
|
||||
int c = 0;
|
||||
if(req_value!=null) {
|
||||
tmp = new String[req_value.length];
|
||||
for(int i=0; i<req_value.length; i++) {
|
||||
tmp[c] = encoding(req_value[i], ENCODE_ORI, ENCODE_NEW);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
req_value = req.getParameterValues(parameter)!=null ? tmp : default_value;
|
||||
return req_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* request XSS 처리
|
||||
**/
|
||||
public static String checkReqXSS( String value, String defaultValue) {
|
||||
String reqValue = (value == null || value.equals("")) ? defaultValue : value;
|
||||
reqValue = reqValue.replaceAll("</?[a-zA-Z][0-9a-zA-Z가-\uD7A3ㄱ-ㅎ=/\"\'%;:,._()\\-# ]+>","");
|
||||
reqValue = reqValue.replaceAll(">","");
|
||||
reqValue = reqValue.replaceAll(">","");
|
||||
|
||||
//금지 문자열 리스트
|
||||
String blockchar[] = {"./", "..", "../", "..\\"};
|
||||
|
||||
// 금지할 문자열 포함 여부 체크
|
||||
for(int i=0; i<blockchar.length;i++) {
|
||||
if( reqValue.indexOf(blockchar[i]) != -1 ){
|
||||
reqValue = "";
|
||||
}
|
||||
}
|
||||
return reqValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* request XSS 처리
|
||||
**/
|
||||
public static String getCheckReqXSS(javax.servlet.http.HttpServletRequest req, String parameter, String default_value) {
|
||||
String req_value = (req.getParameter(parameter) == null || req.getParameter(parameter).equals("")) ? default_value : req.getParameter(parameter);
|
||||
req_value = req_value.replaceAll("</?[a-zA-Z][0-9a-zA-Z가-\uD7A3ㄱ-ㅎ=/\"\'%;:,._()\\-# ]+>","");
|
||||
req_value = req_value.replaceAll(">","");
|
||||
req_value = req_value.replaceAll(">","");
|
||||
return req_value;
|
||||
}
|
||||
}
|
||||
16
src/main/java/kccf/sch/service/ArkService.java
Normal file
16
src/main/java/kccf/sch/service/ArkService.java
Normal file
@ -0,0 +1,16 @@
|
||||
package kccf.sch.service;
|
||||
|
||||
|
||||
import kccf.sch.service.vo.ArkVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
|
||||
/**
|
||||
* @Class Name : SearchService.java
|
||||
* @Description : SearchService Class
|
||||
* @Modification Information
|
||||
*
|
||||
*/
|
||||
public interface ArkService {
|
||||
/** 자동완성 */
|
||||
public String getArk(ArkVO arkVo , Sf1VO sf1Vo )throws Exception;
|
||||
}
|
||||
10
src/main/java/kccf/sch/service/PopWordService.java
Normal file
10
src/main/java/kccf/sch/service/PopWordService.java
Normal file
@ -0,0 +1,10 @@
|
||||
package kccf.sch.service;
|
||||
|
||||
|
||||
import kccf.sch.service.vo.PopWordVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
|
||||
public interface PopWordService {
|
||||
/** 인기검색어 */
|
||||
String getPopWord(PopWordVO popWordVo , Sf1VO sf1Vo )throws Exception;
|
||||
}
|
||||
112
src/main/java/kccf/sch/service/SearchCollectionResult.java
Normal file
112
src/main/java/kccf/sch/service/SearchCollectionResult.java
Normal file
@ -0,0 +1,112 @@
|
||||
package kccf.sch.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import kccf.sch.service.vo.SearchCollectionVO;
|
||||
|
||||
|
||||
|
||||
public class SearchCollectionResult {
|
||||
/** 디버그 메세지 */
|
||||
private String debugStr = "";
|
||||
/** 엔진 에러 코드 */
|
||||
private int errorCode = 0;
|
||||
/** 컬렉션 리스트 */
|
||||
private ArrayList<SearchCollectionVO> collectionList = null;
|
||||
public String getDebugStr() {
|
||||
return debugStr;
|
||||
}
|
||||
public void setDebugStr(String debugStr) {
|
||||
this.debugStr = debugStr;
|
||||
}
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
public void setErrorCode(int errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
public ArrayList<SearchCollectionVO> getCollectionList() {
|
||||
ArrayList<SearchCollectionVO> collectionListRet = new ArrayList<SearchCollectionVO>();
|
||||
collectionListRet.addAll(collectionList);
|
||||
return collectionListRet;
|
||||
}
|
||||
public void setCollectionList(ArrayList<SearchCollectionVO> collectionList) {
|
||||
if(collectionList != null){
|
||||
this.collectionList = new ArrayList<SearchCollectionVO>();
|
||||
for(int i = 0; i < collectionList.size(); ++i){
|
||||
this.collectionList.add(collectionList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색 결과를 XML 형태로 제공(선언부)
|
||||
* @param charset xml 선언부 언어셋(euc-kr , UTF-8)
|
||||
* @return 검색 결과를 XML 형태 String 값
|
||||
*/
|
||||
public String toXml(String charset){
|
||||
String encoding = "UTF-8";
|
||||
if(null != charset){
|
||||
if(charset.toUpperCase().equals("EUC-KR")){
|
||||
encoding = charset;
|
||||
}
|
||||
}
|
||||
StringBuffer xmlBr = new StringBuffer(1024);
|
||||
xmlBr.append("<?xml version=\"1.0\" encoding=\""+encoding+"\"?>").append(System.getProperty("line.separator"));
|
||||
xmlBr.append("<wisenutSearch>").append(System.getProperty("line.separator"));
|
||||
xmlBr.append("<DebugStr><![CDATA[").append(getDebugStr()).append("]]></DebugStr>").append(System.getProperty("line.separator"));
|
||||
xmlBr.append("<CollectionList>").append(System.getProperty("line.separator"));
|
||||
ArrayList<SearchCollectionVO> collectionList = getCollectionList();
|
||||
int collectionListCount = collectionList.size();
|
||||
for(int i = 0 ; i < collectionListCount ; i++){
|
||||
SearchCollectionVO collVo = collectionList.get(i);
|
||||
xmlBr.append(collVo.getXml()).append(System.getProperty("line.separator"));
|
||||
}
|
||||
xmlBr.append("</CollectionList>").append(System.getProperty("line.separator"));
|
||||
xmlBr.append("</wisenutSearch>");
|
||||
return xmlBr.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색결과를 json 형태로 반환
|
||||
* @return 검색결과를 json 형태 String 값
|
||||
*/
|
||||
public String toJson(){
|
||||
StringBuffer jsonBr = new StringBuffer(1024);
|
||||
jsonBr.append("{\"wisenutSearch\":{");
|
||||
jsonBr.append("\"DebugStr\":").append("\"").append(getDebugStr()).append("\",");
|
||||
jsonBr.append("\"CollectionList\":");
|
||||
jsonBr.append("[");
|
||||
ArrayList<SearchCollectionVO> collectionList = getCollectionList();
|
||||
int collectionListCount = collectionList.size();
|
||||
for(int i = 0 ; i < collectionListCount ; i++){
|
||||
SearchCollectionVO collVo = collectionList.get(i);
|
||||
jsonBr.append(collVo.getJson());
|
||||
if(i != collectionListCount-1 ){
|
||||
jsonBr.append(",");
|
||||
}
|
||||
}
|
||||
jsonBr.append("]}}");
|
||||
return jsonBr.toString();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색결과 String 형태로 반환
|
||||
* @return 검색결과를 문자열 형태 String 값
|
||||
*/
|
||||
public String toStr(){
|
||||
StringBuffer br = new StringBuffer(1024);
|
||||
br.append("[DebugStr:").append(getDebugStr()).append(System.getProperty("line.separator"));
|
||||
ArrayList<SearchCollectionVO> collectionList = getCollectionList();
|
||||
int collectionListCount = collectionList.size();
|
||||
for(int i = 0 ; i < collectionListCount ; i++){
|
||||
SearchCollectionVO collVo = collectionList.get(i);
|
||||
br.append(collVo.getStr());
|
||||
}
|
||||
return br.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
18
src/main/java/kccf/sch/service/SearchService.java
Normal file
18
src/main/java/kccf/sch/service/SearchService.java
Normal file
@ -0,0 +1,18 @@
|
||||
package kccf.sch.service;
|
||||
|
||||
import kccf.sch.service.vo.SearchVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
|
||||
|
||||
|
||||
public interface SearchService {
|
||||
/** 검색결과 받기 */
|
||||
SearchCollectionResult getSearch(SearchVO searchVO , Sf1VO sf1Vo) throws Exception;
|
||||
|
||||
String getSearchEtc(SearchVO searchVO , Sf1VO sf1Vo) throws Exception;
|
||||
|
||||
int getSearch_All_cnt(SearchVO searchVO, Sf1VO sf1Vo) throws Exception;
|
||||
|
||||
SearchCollectionResult getSearch_ajax(SearchVO searchVO , Sf1VO sf1Vo) throws Exception;
|
||||
|
||||
}
|
||||
123
src/main/java/kccf/sch/service/impl/ArkServiceImpl.java
Normal file
123
src/main/java/kccf/sch/service/impl/ArkServiceImpl.java
Normal file
@ -0,0 +1,123 @@
|
||||
package kccf.sch.service.impl;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import kccf.sch.service.ArkService;
|
||||
import kccf.sch.service.vo.ArkVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
|
||||
@Service("ArkService")
|
||||
public class ArkServiceImpl extends EgovAbstractServiceImpl implements ArkService{
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ArkServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 자동완성 호출
|
||||
*/
|
||||
@Override
|
||||
public String getArk(ArkVO arkVo, Sf1VO sf1Vo) throws Exception {
|
||||
StringBuffer urlSb = new StringBuffer();
|
||||
urlSb.append("http://");
|
||||
urlSb.append(sf1Vo.getManagerIp()).append(":");
|
||||
urlSb.append(sf1Vo.getManagerPort());
|
||||
urlSb.append("/manager/WNRun.do?");
|
||||
|
||||
urlSb.append("target=").append(arkVo.getTarget());
|
||||
urlSb.append("&query=").append(URLEncoder.encode(arkVo.getQuery(), "UTF-8"));
|
||||
urlSb.append("&convert=").append(arkVo.getConvert());
|
||||
/*urlSb.append("&eq=").append(arkVo.getCharset());
|
||||
urlSb.append("&es=").append(arkVo.getCharset());*/
|
||||
|
||||
String url = urlSb.toString();
|
||||
if(arkVo.getDebugType().equals("Y")){
|
||||
LOGGER.info("[getArk() URL]["+url+"]");
|
||||
LOGGER.info("[getArk() sf1Vo.toString()]["+sf1Vo.toString()+"]");
|
||||
LOGGER.info("[getArk() arkVo.toString()]["+arkVo.toString()+"]");
|
||||
}
|
||||
return getHtmls(url, arkVo.getTimeOut() , arkVo.getDataType(), arkVo.getCharset());
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리도구 자동완성 URL 호출해야 해당 결과 담기
|
||||
* @param receiverURL 관리도구 URL 정보
|
||||
* @param parameter ark 파라미터값
|
||||
* @param timeout ark 연결 시간 고정으로 1000
|
||||
* @param datatype 관리도구 web화면 데이타 타입
|
||||
* @param charset 케릭터 타임
|
||||
* @return dataType 에 따른 자동완성 결과
|
||||
*/
|
||||
private String getHtmls(String receiverURL, int timeout, String datatype , String charset) {
|
||||
StringBuffer receiveMsg = new StringBuffer();
|
||||
BufferedReader in = null;
|
||||
int errorCode = 0;
|
||||
try {
|
||||
|
||||
// -- receive servlet connect
|
||||
URL servletUrl = new URL(receiverURL);
|
||||
HttpURLConnection uc = (HttpURLConnection)servletUrl.openConnection();
|
||||
uc.setReadTimeout(timeout);
|
||||
uc.setRequestMethod("GET");
|
||||
uc.setDoOutput(true);
|
||||
uc.setDoInput(true);
|
||||
uc.setUseCaches(false);
|
||||
uc.connect();
|
||||
// init
|
||||
errorCode = 0;
|
||||
//System.out.println("[URLConnection Response Code] " + uc.getResponseCode());
|
||||
// -- Network error check
|
||||
if (uc.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
||||
String currLine = new String();
|
||||
//UTF-8인 경우
|
||||
in = new BufferedReader(new InputStreamReader(uc.getInputStream(), "UTF-8"));
|
||||
while ((currLine = in.readLine()) != null) {
|
||||
receiveMsg.append(currLine).append("\r\n");
|
||||
}
|
||||
} else {
|
||||
errorCode = uc.getResponseCode();
|
||||
return receiveMsg.toString();
|
||||
}
|
||||
uc.disconnect();
|
||||
} catch(Exception ex) {
|
||||
receiveMsg.setLength(0);
|
||||
if(datatype.toLowerCase().equals("xml")){
|
||||
receiveMsg.append("<?xml version=\"1.0\" encoding=\""+charset+"\" ?>");
|
||||
receiveMsg.append("<Response>");
|
||||
receiveMsg.append("<Value>");
|
||||
receiveMsg.append("<Return>0</Return>");
|
||||
receiveMsg.append(" <ARKList>");
|
||||
receiveMsg.append("<TotalCount>0</TotalCount>");
|
||||
receiveMsg.append("</ARKList>");
|
||||
receiveMsg.append("<ARKRList>");
|
||||
receiveMsg.append(" <TotalCount>0</TotalCount>");
|
||||
receiveMsg.append("</ARKRList>");
|
||||
receiveMsg.append("</Value>");
|
||||
receiveMsg.append("</Response>");
|
||||
}else if(datatype.toLowerCase().equals("json")){
|
||||
receiveMsg.append("{\"responsestatus\":0,\"result\":[{\"totalcount\":0},{\"totalcount\":0}]}");
|
||||
}
|
||||
LOGGER.debug("[getHtmls() URL]["+ receiverURL +"]");
|
||||
LOGGER.debug("[getHtmls() error][errorCode:"+errorCode+"]["+ex+"]");
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.info("IOException occurred");
|
||||
}
|
||||
}
|
||||
}
|
||||
return receiveMsg.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
133
src/main/java/kccf/sch/service/impl/PopWordServiceImpl.java
Normal file
133
src/main/java/kccf/sch/service/impl/PopWordServiceImpl.java
Normal file
@ -0,0 +1,133 @@
|
||||
package kccf.sch.service.impl;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import kccf.sch.service.PopWordService;
|
||||
import kccf.sch.service.vo.PopWordVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
|
||||
@Service("PopwordService")
|
||||
public class PopWordServiceImpl extends EgovAbstractServiceImpl implements PopWordService{
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PopWordServiceImpl.class);
|
||||
/**
|
||||
* 인기검색어 호출
|
||||
*/
|
||||
@Override
|
||||
public String getPopWord(PopWordVO popWordVo, Sf1VO sf1Vo) throws Exception {
|
||||
StringBuffer urlSb = new StringBuffer();
|
||||
urlSb.append("http://");
|
||||
urlSb.append(sf1Vo.getManagerIp()).append(":");
|
||||
urlSb.append(sf1Vo.getManagerPort());
|
||||
urlSb.append("/manager/WNRun.do?");
|
||||
|
||||
urlSb.append("target=").append(popWordVo.getTarget());
|
||||
urlSb.append("&charset=").append(popWordVo.getCharset());
|
||||
urlSb.append("&range=").append(popWordVo.getRange());
|
||||
urlSb.append("&collection=").append(popWordVo.getCollection());
|
||||
urlSb.append("&datatype=").append(popWordVo.getDataType());
|
||||
|
||||
//urlSb.append("&convert=fw");
|
||||
|
||||
String url = urlSb.toString();
|
||||
if(popWordVo.getDebugType().equals("Y")){
|
||||
LOGGER.info("[getPopWord() URL]["+url+"]");
|
||||
LOGGER.info("[getPopWord() sf1Vo.toString()]["+sf1Vo.toString()+"]");
|
||||
LOGGER.info("[getPopWord() popWordVo.toString()]["+popWordVo.toString()+"]");
|
||||
}
|
||||
return getHtmls(url, popWordVo.getTimeOut() , popWordVo.getRange() , popWordVo.getDataType() , popWordVo.getCharset());
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리도구 자동완성 URL 호출해야 해당 결과 담기
|
||||
* @param receiverURL 호출 URL
|
||||
* @param timeout 연결시간
|
||||
* @param range 인기검색어 조회 범위설정[D:하루 ,W:주 ,M:월]
|
||||
* @param datatype 데이타 타입 [xml or json]
|
||||
* @param charset 인코딩 셋 [euc-kr or UTF-8]
|
||||
* @return
|
||||
*/
|
||||
public String getHtmls(String receiverURL, int timeout , String range , String datatype , String charset){
|
||||
StringBuffer receiveMsg = new StringBuffer();
|
||||
BufferedReader in = null;
|
||||
int errorCode = 0;
|
||||
try{
|
||||
|
||||
// -- receive servlet connect
|
||||
URL servletUrl = new URL(receiverURL);
|
||||
HttpURLConnection uc = (HttpURLConnection)servletUrl.openConnection();
|
||||
uc.setReadTimeout(timeout);
|
||||
uc.setRequestMethod("POST");
|
||||
uc.setDoOutput(true);
|
||||
uc.setDoInput(true);
|
||||
uc.setUseCaches(false);
|
||||
uc.connect();
|
||||
// init
|
||||
errorCode = 0;
|
||||
// -- Network error check
|
||||
if(uc.getResponseCode() == HttpURLConnection.HTTP_OK){
|
||||
String currLine = new String();
|
||||
//UTF-8인 경우
|
||||
in = new BufferedReader(new InputStreamReader(uc.getInputStream(), "UTF-8"));
|
||||
//BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
|
||||
while ((currLine = in.readLine()) != null){
|
||||
receiveMsg.append(currLine).append("\r\n");
|
||||
}
|
||||
}else{
|
||||
/*
|
||||
errorCode = uc.getResponseCode();
|
||||
return receiveMsg.toString();
|
||||
*/
|
||||
errorCode = uc.getResponseCode();
|
||||
receiveMsg.setLength(0);
|
||||
if(datatype.toLowerCase().equals("xml")){
|
||||
receiveMsg.append("<?xml version=\"1.0\" encoding=\""+charset+"\"?>").append("\r\n");
|
||||
receiveMsg.append("<Data>").append("\r\n");
|
||||
receiveMsg.append("<MakeTime>error:"+errorCode+"</MakeTime>").append("\r\n");
|
||||
receiveMsg.append("<Label id=\""+range+"\"></Label>").append("\r\n");
|
||||
receiveMsg.append("<Type id=\""+range+"\"></Type>").append("\r\n");
|
||||
receiveMsg.append("</Data>").append("\r\n");
|
||||
}else if(datatype.toLowerCase().equals("json")){
|
||||
receiveMsg.append("{\"Data\":{\"MakeTime\":\"error\",\"Query\":[{}],\"Type\":{\"content\":\""+errorCode+"\",\"id\":\""+range+"\"},\"Label\":{\"content\":\""+errorCode+"\",\"id\":\""+range+"\"}}}");
|
||||
}
|
||||
}
|
||||
uc.disconnect();
|
||||
}catch(Exception ex){
|
||||
receiveMsg.setLength(0);
|
||||
if(datatype.toLowerCase().equals("xml")){
|
||||
receiveMsg.append("<?xml version=\"1.0\" encoding=\""+charset+"\"?>").append("\r\n");
|
||||
receiveMsg.append("<Data>").append("\r\n");
|
||||
receiveMsg.append("<MakeTime>error</MakeTime>").append("\r\n");
|
||||
receiveMsg.append("<Label id=\""+range+"\">"+ex+"</Label>").append("\r\n");
|
||||
receiveMsg.append("<Type id=\""+range+"\"></Type>").append("\r\n");
|
||||
receiveMsg.append("</Data>").append("\r\n");
|
||||
}else if(datatype.toLowerCase().equals("json")){
|
||||
receiveMsg.append("{\"Data\":{\"MakeTime\":\"error\",\"Query\":[{}],\"Type\":{\"content\":\""+ex+"\",\"id\":\""+range+"\"},\"Label\":{\"content\":\""+ex+"\",\"id\":\""+range+"\"}}}");
|
||||
}
|
||||
LOGGER.debug("[getHtmls() URL]["+receiverURL+"]");
|
||||
LOGGER.debug("[getHtmls() error][errorCode:"+errorCode+"]["+ex+"]");
|
||||
}finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.info("IOException occurred");
|
||||
}
|
||||
}
|
||||
}
|
||||
return receiveMsg.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
2470
src/main/java/kccf/sch/service/impl/SearchServiceImpl.java
Normal file
2470
src/main/java/kccf/sch/service/impl/SearchServiceImpl.java
Normal file
File diff suppressed because it is too large
Load Diff
72
src/main/java/kccf/sch/service/vo/ArkVO.java
Normal file
72
src/main/java/kccf/sch/service/vo/ArkVO.java
Normal file
@ -0,0 +1,72 @@
|
||||
package kccf.sch.service.vo;
|
||||
|
||||
public class ArkVO {
|
||||
/** 키워드 */
|
||||
private String query = "";
|
||||
/** 자동완성 매칭방식 */
|
||||
private String convert = "";
|
||||
/** 자동완성 타겟 */
|
||||
private String target = "";
|
||||
/** 케릭터 셋 */
|
||||
private String charset = "";
|
||||
/** 데이타 타입 */
|
||||
private String dataType = "";
|
||||
/** 디버그 여부 */
|
||||
private String debugType = "N";
|
||||
/** 연결 시간 */
|
||||
private Integer timeOut = 3000;
|
||||
|
||||
public String getQuery() {
|
||||
return this.query;
|
||||
}
|
||||
public void setQuery(String query) {
|
||||
this.query = query;
|
||||
}
|
||||
public String getConvert() {
|
||||
return convert;
|
||||
}
|
||||
public void setConvert(String convert) {
|
||||
this.convert = convert;
|
||||
}
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
public String getCharset() {
|
||||
return charset;
|
||||
}
|
||||
public void setCharset(String charset) {
|
||||
this.charset = charset;
|
||||
}
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
public String getDebugType() {
|
||||
return debugType;
|
||||
}
|
||||
public void setDebugType(String debugType) {
|
||||
this.debugType = debugType;
|
||||
}
|
||||
public int getTimeOut() {
|
||||
return timeOut;
|
||||
}
|
||||
public void setTimeOut(Integer timeOut) {
|
||||
this.timeOut = timeOut;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ArkVO [query=" + getQuery() + ", convert=" + getConvert() + ", target="
|
||||
+ getTarget() + ", charset=" + getCharset() + ", dataType=" + getDataType()
|
||||
+ ", debugType=" + getDebugType() + ", timeOut=" + getTimeOut() + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
86
src/main/java/kccf/sch/service/vo/PopWordVO.java
Normal file
86
src/main/java/kccf/sch/service/vo/PopWordVO.java
Normal file
@ -0,0 +1,86 @@
|
||||
package kccf.sch.service.vo;
|
||||
|
||||
public class PopWordVO {
|
||||
/** 인기검색어 타겟 popword 고정 참조 */
|
||||
private String target = "popword";
|
||||
/** 인코딩 셋 */
|
||||
private String charset = "";
|
||||
/** 인기검색어 조회 범위설정 */
|
||||
private String range = "";
|
||||
/** collection 통계라벨ID */
|
||||
private String collection ="";
|
||||
/** 데이타 타입 */
|
||||
private String dataType = "";
|
||||
/** 인코딩 셋 */
|
||||
private String eq = "";
|
||||
/** 인코딩 셋 */
|
||||
private String es = "";
|
||||
/** 디버그메시지 */
|
||||
private String debugType ="N";
|
||||
/** 타임 아웃 */
|
||||
private Integer timeOut =1000;
|
||||
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
public String getCharset() {
|
||||
return charset;
|
||||
}
|
||||
public void setCharset(String charset) {
|
||||
this.charset = charset;
|
||||
}
|
||||
public String getRange() {
|
||||
return range;
|
||||
}
|
||||
public void setRange(String range) {
|
||||
this.range = range;
|
||||
}
|
||||
public String getCollection() {
|
||||
return collection;
|
||||
}
|
||||
public void setCollection(String collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
public String getDebugType() {
|
||||
return debugType;
|
||||
}
|
||||
public void setDebugType(String debugType) {
|
||||
this.debugType = debugType;
|
||||
}
|
||||
public int getTimeOut() {
|
||||
return timeOut;
|
||||
}
|
||||
public void setTimeOut(Integer timeOut) {
|
||||
this.timeOut = timeOut;
|
||||
}
|
||||
public String getEq() {
|
||||
return eq;
|
||||
}
|
||||
public void setEq(String eq) {
|
||||
this.eq = eq;
|
||||
}
|
||||
public String getEs() {
|
||||
return es;
|
||||
}
|
||||
public void setEs(String es) {
|
||||
this.es = es;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PopWordVO [target=" + getTarget() + ", charset=" + getCharset()
|
||||
+ ", range=" + getRange() + ", collection=" + getCollection()
|
||||
+ ", dataType=" + getDataType() + ", debugType=" + getDebugType()
|
||||
+ ", timeOut=" + getTimeOut() + ", eq=" + getEq() + ", es=" + getEs() + "]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
140
src/main/java/kccf/sch/service/vo/SearchCollectionVO.java
Normal file
140
src/main/java/kccf/sch/service/vo/SearchCollectionVO.java
Normal file
@ -0,0 +1,140 @@
|
||||
package kccf.sch.service.vo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 검색결과 컬렉션 VO
|
||||
*
|
||||
*/
|
||||
public class SearchCollectionVO {
|
||||
/** 컬렉션명*/
|
||||
private String CollectionName = "";
|
||||
/** 컬렉션의 총검색 건수 */
|
||||
private int totalCount = 0;
|
||||
/** 컬렉션의 반환되는 검색 건수 */
|
||||
private int resultCount = 0;
|
||||
/** 컬렉션의 검색결과 리스트 */
|
||||
private ArrayList<Map<Object ,Object>> searchResultList = null;
|
||||
|
||||
public String getCollectionName() {
|
||||
return CollectionName;
|
||||
}
|
||||
|
||||
public void setCollectionName(String collectionName) {
|
||||
CollectionName = collectionName;
|
||||
}
|
||||
|
||||
public int getTotalCount() {
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
public void setTotalCount(int totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
public int getResultCount() {
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public void setResultCount(int resultCount) {
|
||||
this.resultCount = resultCount;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SearchCollectionVO [CollectionName=" + CollectionName
|
||||
+ ", totalCount=" + totalCount + ", resultCount=" + resultCount
|
||||
+ ", searchResultList=" + searchResultList + "]";
|
||||
}
|
||||
|
||||
public ArrayList<Map<Object ,Object>> getSearchResultList() {
|
||||
ArrayList<Map<Object ,Object>> searchResultListRet = new ArrayList<Map<Object ,Object>>();
|
||||
searchResultListRet.addAll(searchResultList);
|
||||
return searchResultListRet;
|
||||
}
|
||||
|
||||
public void setSearchResultList(ArrayList<Map<Object ,Object>> searchResultList) {
|
||||
if(searchResultList != null){
|
||||
this.searchResultList = new ArrayList<Map<Object ,Object>>();
|
||||
for(int i = 0; i < searchResultList.size(); ++i){
|
||||
this.searchResultList.add(searchResultList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 컬렉션 단위의 xml 모양
|
||||
* @return XML 모양의 String 값
|
||||
* @see toXml() 에서 사용됨
|
||||
*/
|
||||
public String getXml(){
|
||||
StringBuffer xmlStr = new StringBuffer(1024);
|
||||
xmlStr.append("<collection collectionName=\""+getCollectionName()+"\">").append(System.getProperty("line.separator"));
|
||||
xmlStr.append("<totalCount><![CDATA["+ getTotalCount()+"]]></totalCount>").append(System.getProperty("line.separator"));
|
||||
xmlStr.append("<resultCount><![CDATA["+ getResultCount()+"]]></resultCount>").append(System.getProperty("line.separator"));
|
||||
xmlStr.append("<Rows>").append(System.getProperty("line.separator"));
|
||||
List<?> searchResultList = getSearchResultList();
|
||||
int searchResultListCount = searchResultList.size();
|
||||
|
||||
/*
|
||||
for(int i = 0 ; i < SearchResultListCount ; i++){
|
||||
AbstractSearchResult resultVo = this.SearchResultList.get(i);
|
||||
xmlStr.append(resultVo.getXml());
|
||||
}
|
||||
*/
|
||||
xmlStr.append("</Rows>").append(System.getProperty("line.separator"));
|
||||
xmlStr.append("</collection>");
|
||||
return xmlStr.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 컬렉션 단위의 json 모양
|
||||
* @return json 형태의 String 값
|
||||
* @see toJson() 에서 사용됨
|
||||
*/
|
||||
public String getJson(){
|
||||
StringBuffer jsonBr = new StringBuffer(1024);
|
||||
jsonBr.append("{\"collection\":");
|
||||
jsonBr.append("{");
|
||||
jsonBr.append("\"totalCount\":\""+ getTotalCount()+"\",");
|
||||
jsonBr.append("\"resultCount\":\""+ getResultCount()+"\",");
|
||||
jsonBr.append("\"itemList\":[");
|
||||
List<?> searchResultList = getSearchResultList();
|
||||
int searchResultListCount = searchResultList.size();
|
||||
for(int i = 0 ; i < searchResultListCount ; i++){
|
||||
/*
|
||||
AbstractSearchResult resultVo = SearchResultList.get(i);
|
||||
jsonBr.append(resultVo.getJson());
|
||||
if(i != SearchResultListCount-1 ){
|
||||
jsonBr.append(",");
|
||||
}
|
||||
*/
|
||||
}
|
||||
jsonBr.append("]");
|
||||
jsonBr.append(",\"collectionName\":\""+ getCollectionName()+"\"}");
|
||||
jsonBr.append("}");
|
||||
return jsonBr.toString();
|
||||
}
|
||||
/**
|
||||
* 컬렉션 단위의 str 모양
|
||||
* @return
|
||||
*/
|
||||
public String getStr(){
|
||||
StringBuffer br = new StringBuffer(1024);
|
||||
br.append("[collection][collectionName:").append(getCollectionName()).append("]").append(System.getProperty("line.separator"));
|
||||
br.append("[collection][totalCount:").append(getTotalCount()).append("]").append(System.getProperty("line.separator"));
|
||||
br.append("[collection][resultCount:").append(getResultCount()).append("]").append(System.getProperty("line.separator"));
|
||||
List<?> searchResultList = getSearchResultList();
|
||||
int searchResultListCount = searchResultList.size();
|
||||
for(int i = 0 ; i < searchResultListCount ; i++){
|
||||
/*
|
||||
AbstractSearchResult resultVo = SearchResultList.get(i);
|
||||
br.append("[").append(i).append("]").append(resultVo.getStr()).append(System.getProperty("line.separator"));
|
||||
*/
|
||||
}
|
||||
return br.toString();
|
||||
}
|
||||
}
|
||||
393
src/main/java/kccf/sch/service/vo/SearchVO.java
Normal file
393
src/main/java/kccf/sch/service/vo/SearchVO.java
Normal file
@ -0,0 +1,393 @@
|
||||
package kccf.sch.service.vo;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 이용문의 사용 VO
|
||||
* @Class Name : QnaVO.java
|
||||
* @author wisenut
|
||||
* @since 2018-09-12
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class SearchVO {
|
||||
|
||||
private String query ; //검색어
|
||||
|
||||
private String realQuery ; //검색어(최종)
|
||||
private String reQuery = ""; //결과내 재검색
|
||||
private String operator = ""; //검색 연산자
|
||||
|
||||
private String rt; //결과내재검색 체크
|
||||
|
||||
private String notQuery ; //제외하는 검색어
|
||||
private String andQuery ; //반드시 포함하는 검색어
|
||||
private String exactQuery ; //정확히 일치하는 검색어
|
||||
|
||||
private String sortField = ""; //정렬조건
|
||||
private String range = ""; //검색기간
|
||||
private int viewCount = 0; //출력갯수(통합)
|
||||
private String chkColls = ""; //상세검색 컬렉션 체크
|
||||
private String searchField = "" ; //검색필드
|
||||
|
||||
private int startCount = 1; //시작위치
|
||||
private String startDate = ""; //시작날짜
|
||||
private String endDate = ""; //끝날짜
|
||||
|
||||
private String collection = ""; //컬렉션이름
|
||||
private String debug = "N"; //디버그 Y/N
|
||||
|
||||
/**filter query**/
|
||||
private String chronological_start ; //연대 앞 기간
|
||||
private String chronological_end ; //연대 뒤 기간
|
||||
private String genyear_start ; //발행년대 앞 기간
|
||||
private String genyear_end ; //발행년대 뒤 기간
|
||||
|
||||
/**exquery**/
|
||||
private String trs_age; //시대
|
||||
private String mgnt_no ; //관리번호
|
||||
private String first_category ; //주제분야(대) 선택
|
||||
private String second_category ; //주제분야(소) 선택
|
||||
private String theme ; //문화테마(대) 선택
|
||||
private String series ; //문화테마(소) 선택
|
||||
|
||||
private String theme_cd ; //이야기자료 테마코드(대) 선택
|
||||
private String theme_nm ; //이야기자료 테마(대) 선택
|
||||
private String series_cd ; //이야기자료 시리즈코드(소) 선택
|
||||
private String series_nm ; //이야기자료 시리즈(소) 선택
|
||||
|
||||
private String first_class ; //자료유형(대) 선택
|
||||
private String second_class; //자료유형(소) 선택
|
||||
private String sido_name; //지역문화원(대) 선택 - 카테고리
|
||||
private String sojang_council ; //지역문화원(소) 선택 - 카테고리
|
||||
//String keywords = ""; //키워드
|
||||
|
||||
private String search_area_council_info ; //지역문화정보(지역)
|
||||
private String content_type ; //지역문화정보(유형)
|
||||
|
||||
private String filter_class ; //필터 더보기버튼 유지+depth1 open
|
||||
private String filter_sido ; //필터 더보기버튼 유지+depth1 open
|
||||
private String filter_thema ; //필터 더보기버튼 유지+depth1 open
|
||||
private String filter_category ; //필터 더보기버튼 유지+depth1 open
|
||||
private String filter_info_sido ; //필터 더보기버튼 유지
|
||||
private String filter_info_type ; //필터 더보기버튼 유지
|
||||
|
||||
private String filter_mylist; //검색결과 필터 순서 저장
|
||||
private String filter_info_mylist; //검색결과 필터 info 순서 저장
|
||||
|
||||
|
||||
public String getFilter_info_mylist() {
|
||||
return filter_info_mylist;
|
||||
}
|
||||
public void setFilter_info_mylist(String filter_info_mylist) {
|
||||
this.filter_info_mylist = filter_info_mylist;
|
||||
}
|
||||
public String getFilter_mylist() {
|
||||
return filter_mylist;
|
||||
}
|
||||
public void setFilter_mylist(String filter_mylist) {
|
||||
this.filter_mylist = filter_mylist;
|
||||
}
|
||||
public String getFilter_info_sido() {
|
||||
return filter_info_sido;
|
||||
}
|
||||
public void setFilter_info_sido(String filter_info_sido) {
|
||||
this.filter_info_sido = filter_info_sido;
|
||||
}
|
||||
public String getFilter_info_type() {
|
||||
return filter_info_type;
|
||||
}
|
||||
public void setFilter_info_type(String filter_info_type) {
|
||||
this.filter_info_type = filter_info_type;
|
||||
}
|
||||
public String getContent_type() {
|
||||
return content_type;
|
||||
}
|
||||
public void setContent_type(String content_type) {
|
||||
this.content_type = content_type;
|
||||
}
|
||||
public String getSearch_area_council_info() {
|
||||
return search_area_council_info;
|
||||
}
|
||||
public void setSearch_area_council_info(String search_area_council_info) {
|
||||
this.search_area_council_info = search_area_council_info;
|
||||
}
|
||||
public String getRt() {
|
||||
return rt;
|
||||
}
|
||||
public void setRt(String rt) {
|
||||
this.rt = rt;
|
||||
}
|
||||
public String getQuery() {
|
||||
return query;
|
||||
}
|
||||
public void setQuery(String query) {
|
||||
this.query = query;
|
||||
}
|
||||
public String getRealQuery() {
|
||||
return realQuery;
|
||||
}
|
||||
public void setRealQuery(String realQuery) {
|
||||
this.realQuery = realQuery;
|
||||
}
|
||||
public String getReQuery() {
|
||||
return reQuery;
|
||||
}
|
||||
public void setReQuery(String reQuery) {
|
||||
this.reQuery = reQuery;
|
||||
}
|
||||
|
||||
public String getSortField() {
|
||||
return sortField;
|
||||
}
|
||||
public void setSortField(String sortField) {
|
||||
this.sortField = sortField;
|
||||
}
|
||||
public String getRange() {
|
||||
return range;
|
||||
}
|
||||
public void setRange(String range) {
|
||||
this.range = range;
|
||||
}
|
||||
public int getViewCount() {
|
||||
return viewCount;
|
||||
}
|
||||
public void setViewCount(int viewCount) {
|
||||
this.viewCount = viewCount;
|
||||
}
|
||||
public String getChkColls() {
|
||||
return chkColls;
|
||||
}
|
||||
public void setChkColls(String chkColls) {
|
||||
this.chkColls = chkColls;
|
||||
}
|
||||
public String getSearchField() {
|
||||
return searchField;
|
||||
}
|
||||
public void setSearchField(String searchField) {
|
||||
this.searchField = searchField;
|
||||
}
|
||||
public int getStartCount() {
|
||||
return startCount;
|
||||
}
|
||||
public void setStartCount(int startCount) {
|
||||
this.startCount = startCount;
|
||||
}
|
||||
public String getCollection() {
|
||||
return collection;
|
||||
}
|
||||
public void setCollection(String collection) {
|
||||
this.collection = collection;
|
||||
}
|
||||
public String getDebug() {
|
||||
return debug;
|
||||
}
|
||||
public void setDebug(String debug) {
|
||||
this.debug = debug;
|
||||
}
|
||||
public String getChronological_start() {
|
||||
return chronological_start;
|
||||
}
|
||||
public void setChronological_start(String chronological_start) {
|
||||
this.chronological_start = chronological_start;
|
||||
}
|
||||
public String getChronological_end() {
|
||||
return chronological_end;
|
||||
}
|
||||
public void setChronological_end(String chronological_end) {
|
||||
this.chronological_end = chronological_end;
|
||||
}
|
||||
public String getGenyear_start() {
|
||||
return genyear_start;
|
||||
}
|
||||
public void setGenyear_start(String genyear_start) {
|
||||
this.genyear_start = genyear_start;
|
||||
}
|
||||
public String getGenyear_end() {
|
||||
return genyear_end;
|
||||
}
|
||||
public void setGenyear_end(String genyear_end) {
|
||||
this.genyear_end = genyear_end;
|
||||
}
|
||||
public String getTrs_age() {
|
||||
return trs_age;
|
||||
}
|
||||
public void setTrs_age(String trs_age) {
|
||||
this.trs_age = trs_age;
|
||||
}
|
||||
public String getMgnt_no() {
|
||||
return mgnt_no;
|
||||
}
|
||||
public void setMgnt_no(String mgnt_no) {
|
||||
this.mgnt_no = mgnt_no;
|
||||
}
|
||||
public String getFirst_category() {
|
||||
return first_category;
|
||||
}
|
||||
public void setFirst_category(String first_category) {
|
||||
this.first_category = first_category;
|
||||
}
|
||||
public String getSecond_category() {
|
||||
return second_category;
|
||||
}
|
||||
public void setSecond_category(String second_category) {
|
||||
this.second_category = second_category;
|
||||
}
|
||||
public String getTheme() {
|
||||
return theme;
|
||||
}
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
public String getSeries() {
|
||||
return series;
|
||||
}
|
||||
public void setSeries(String series) {
|
||||
this.series = series;
|
||||
}
|
||||
|
||||
public String getTheme_cd() {
|
||||
return theme_cd;
|
||||
}
|
||||
public void setTheme_cd(String theme_cd) {
|
||||
this.theme_cd = theme_cd;
|
||||
}
|
||||
public String getTheme_nm() {
|
||||
return theme_nm;
|
||||
}
|
||||
public void setTheme_nm(String theme_nm) {
|
||||
this.theme_nm = theme_nm;
|
||||
}
|
||||
public String getSeries_cd() {
|
||||
return series_cd;
|
||||
}
|
||||
public void setSeries_cd(String series_cd) {
|
||||
this.series_cd = series_cd;
|
||||
}
|
||||
public String getSeries_nm() {
|
||||
return series_nm;
|
||||
}
|
||||
public void setSeries_nm(String series_nm) {
|
||||
this.series_nm = series_nm;
|
||||
}
|
||||
public String getFirst_class() {
|
||||
return first_class;
|
||||
}
|
||||
public void setFirst_class(String first_class) {
|
||||
this.first_class = first_class;
|
||||
}
|
||||
public String getSecond_class() {
|
||||
return second_class;
|
||||
}
|
||||
public void setSecond_class(String second_class) {
|
||||
this.second_class = second_class;
|
||||
}
|
||||
public String getSido_name() {
|
||||
return sido_name;
|
||||
}
|
||||
public void setSido_name(String sido_name) {
|
||||
this.sido_name = sido_name;
|
||||
}
|
||||
public String getSojang_council() {
|
||||
return sojang_council;
|
||||
}
|
||||
public void setSojang_council(String sojang_council) {
|
||||
this.sojang_council = sojang_council;
|
||||
}
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
public void setOperator(String operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
public String getNotQuery() {
|
||||
return notQuery;
|
||||
}
|
||||
public void setNotQuery(String notQuery) {
|
||||
this.notQuery = notQuery;
|
||||
}
|
||||
public String getAndQuery() {
|
||||
return andQuery;
|
||||
}
|
||||
public void setAndQuery(String andQuery) {
|
||||
this.andQuery = andQuery;
|
||||
}
|
||||
public String getExactQuery() {
|
||||
return exactQuery;
|
||||
}
|
||||
public void setExactQuery(String exactQuery) {
|
||||
this.exactQuery = exactQuery;
|
||||
}
|
||||
public String getFilter_class() {
|
||||
return filter_class;
|
||||
}
|
||||
public void setFilter_class(String filter_class) {
|
||||
this.filter_class = filter_class;
|
||||
}
|
||||
public String getFilter_sido() {
|
||||
return filter_sido;
|
||||
}
|
||||
public void setFilter_sido(String filter_sido) {
|
||||
this.filter_sido = filter_sido;
|
||||
}
|
||||
public String getFilter_thema() {
|
||||
return filter_thema;
|
||||
}
|
||||
public void setFilter_thema(String filter_thema) {
|
||||
this.filter_thema = filter_thema;
|
||||
}
|
||||
public String getFilter_category() {
|
||||
return filter_category;
|
||||
}
|
||||
public void setFilter_category(String filter_category) {
|
||||
this.filter_category = filter_category;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SearchVO [query=" + query + ", realQuery=" + realQuery
|
||||
+ ", reQuery=" + reQuery + ", operator=" + operator + ", rt="
|
||||
+ rt + ", notQuery=" + notQuery + ", andQuery=" + andQuery
|
||||
+ ", exactQuery=" + exactQuery + ", sortField=" + sortField
|
||||
+ ", range=" + range + ", viewCount=" + viewCount
|
||||
+ ", chkColls=" + chkColls + ", searchField=" + searchField
|
||||
+ ", startCount=" + startCount + ", startDate=" + startDate
|
||||
+ ", endDate=" + endDate + ", collection=" + collection
|
||||
+ ", debug=" + debug + ", chronological_start="
|
||||
+ chronological_start + ", chronological_end="
|
||||
+ chronological_end + ", genyear_start=" + genyear_start
|
||||
+ ", genyear_end=" + genyear_end + ", trs_age=" + trs_age
|
||||
+ ", mgnt_no=" + mgnt_no + ", first_category=" + first_category
|
||||
+ ", second_category=" + second_category
|
||||
+ ", theme_cd=" + theme_cd
|
||||
+ ", theme_nm=" + theme_nm
|
||||
+ ", series_cd=" + series_cd
|
||||
+ ", series_nm=" + series_nm
|
||||
+ ", first_class=" + first_class
|
||||
+ ", second_class=" + second_class + ", sido_name=" + sido_name
|
||||
+ ", sojang_council=" + sojang_council
|
||||
+ ", search_area_council_info=" + search_area_council_info
|
||||
+ ", content_type=" + content_type + ", filter_class="
|
||||
+ filter_class + ", filter_sido=" + filter_sido
|
||||
+ ", filter_thema=" + filter_thema + ", filter_category="
|
||||
+ filter_category + ", filter_info_sido=" + filter_info_sido
|
||||
+ ", filter_info_type=" + filter_info_type + ", filter_mylist="
|
||||
+ filter_mylist + ", filter_info_mylist=" + filter_info_mylist
|
||||
+ "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
53
src/main/java/kccf/sch/service/vo/Sf1VO.java
Normal file
53
src/main/java/kccf/sch/service/vo/Sf1VO.java
Normal file
@ -0,0 +1,53 @@
|
||||
package kccf.sch.service.vo;
|
||||
|
||||
public class Sf1VO {
|
||||
/** 검색기 IP */
|
||||
private String searchIp = "";
|
||||
/** 검색기 PORT*/
|
||||
private Integer searchPort = 0;
|
||||
/** 검색 타임아웃 */
|
||||
private Integer searchTimeOut = 3000;
|
||||
/** */
|
||||
private String searchDebugType = "N";
|
||||
/** 관리도구 IP */
|
||||
private String managerIp;
|
||||
/** 관리도구 PORT */
|
||||
private Integer managerPort;
|
||||
|
||||
public String getSearchIp() {
|
||||
return searchIp;
|
||||
}
|
||||
public void setSearchIp(String searchIp) {
|
||||
this.searchIp = searchIp;
|
||||
}
|
||||
public Integer getSearchPort() {
|
||||
return searchPort;
|
||||
}
|
||||
public void setSearchPort(Integer searchPort) {
|
||||
this.searchPort = searchPort;
|
||||
}
|
||||
public Integer getSearchTimeOut() {
|
||||
return searchTimeOut;
|
||||
}
|
||||
public void setSearchTimeOut(Integer searchTimeOut) {
|
||||
this.searchTimeOut = searchTimeOut;
|
||||
}
|
||||
public String getSearchDebugType() {
|
||||
return searchDebugType;
|
||||
}
|
||||
public void setSearchDebugType(String searchDebugType) {
|
||||
this.searchDebugType = searchDebugType;
|
||||
}
|
||||
public String getManagerIp() {
|
||||
return managerIp;
|
||||
}
|
||||
public void setManagerIp(String managerIp) {
|
||||
this.managerIp = managerIp;
|
||||
}
|
||||
public Integer getManagerPort() {
|
||||
return managerPort;
|
||||
}
|
||||
public void setManagerPort(Integer managerPort) {
|
||||
this.managerPort = managerPort;
|
||||
}
|
||||
}
|
||||
842
src/main/java/kccf/sch/web/SearchController.java
Normal file
842
src/main/java/kccf/sch/web/SearchController.java
Normal file
@ -0,0 +1,842 @@
|
||||
package kccf.sch.web;
|
||||
|
||||
import static kccf.sch.common.WNDefine.CONNECTION_CLOSE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import kccf.res.service.ResourcesService;
|
||||
import kccf.sch.common.WNSearch;
|
||||
import kccf.sch.common.WNUtils;
|
||||
import kccf.sch.service.ArkService;
|
||||
import kccf.sch.service.PopWordService;
|
||||
import kccf.sch.service.SearchCollectionResult;
|
||||
import kccf.sch.service.SearchService;
|
||||
import kccf.sch.service.vo.ArkVO;
|
||||
import kccf.sch.service.vo.PopWordVO;
|
||||
import kccf.sch.service.vo.SearchCollectionVO;
|
||||
import kccf.sch.service.vo.SearchVO;
|
||||
import kccf.sch.service.vo.Sf1VO;
|
||||
import kccf.ton.service.LocalToonService;
|
||||
import nlib.cmm.service.NlibProperty;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import cmm.Constant;
|
||||
import cmm.service.CmmActivityHstVO;
|
||||
import cmm.service.CmmService;
|
||||
import cmm.util.CmmUtil;
|
||||
import cmm.util.DataMap;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import egovframework.com.cmm.ComDefaultCodeVO;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
//추가
|
||||
|
||||
@Controller
|
||||
public class SearchController {
|
||||
/** LOGGER */
|
||||
//@SuppressWarnings("unused")
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SearchController.class);
|
||||
|
||||
@Resource(name = "searchService")
|
||||
private SearchService searchService;
|
||||
|
||||
@Resource(name = "nlibProperty")
|
||||
protected NlibProperty nlibProperty;
|
||||
|
||||
@Resource(name="ArkService")
|
||||
private ArkService arkService;
|
||||
|
||||
@Resource(name="PopwordService")
|
||||
private PopWordService popWordService;
|
||||
|
||||
@Resource(name = "localToonService")
|
||||
private LocalToonService localToonService;
|
||||
|
||||
/** CmmService */
|
||||
@Resource(name = "cmmService")
|
||||
private CmmService cmmService;
|
||||
|
||||
/** resourcesService */
|
||||
@Resource(name = "resourcesService")
|
||||
private ResourcesService resourcesService;
|
||||
|
||||
/**SEARCHLIST**/
|
||||
@RequestMapping(value="/sch/totalSearchList.do")
|
||||
public String totalSearchList (
|
||||
@ModelAttribute("searchVO") SearchVO searchVO
|
||||
, String all_totalCount
|
||||
, String gubun
|
||||
, String gubun_ajax
|
||||
, ModelMap model
|
||||
, HttpServletRequest request
|
||||
, HttpServletResponse res
|
||||
|
||||
) throws Exception
|
||||
{
|
||||
try{
|
||||
LOGGER.debug("[PATH][/sch/totalSearchList.do][searchVO][{}]",searchVO.toString());
|
||||
//System.out.println("\n\n\n\n\n\n\n/*****************totalSearchList-searchVO.toString()********************/"+searchVO.toString());
|
||||
|
||||
// 검색관련 서버 설정
|
||||
String searchIp = nlibProperty.getString("search.searchIp");
|
||||
int searchPort = nlibProperty.getInt("search.searchPort");
|
||||
int searchTimeOut = nlibProperty.getInt("search.searchTimeOut");
|
||||
|
||||
Sf1VO sf1Vo = new Sf1VO();
|
||||
sf1Vo.setSearchIp(searchIp);
|
||||
sf1Vo.setSearchPort(searchPort);
|
||||
sf1Vo.setSearchTimeOut(searchTimeOut);
|
||||
|
||||
SearchCollectionResult collResult = searchService.getSearch(searchVO, sf1Vo);
|
||||
|
||||
if(gubun.equals("1")){ //&&(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals(""))
|
||||
all_totalCount = Integer.toString(searchService.getSearch_All_cnt(searchVO, sf1Vo));
|
||||
// all_totalCount = Integer.toString(collResult_all_cnt);
|
||||
// System.out.println("################################"+searchVO.getCollection()+"/"+all_totalCount+"/"+gubun);
|
||||
}else {
|
||||
all_totalCount = Integer.toString(searchService.getSearch_All_cnt(searchVO, sf1Vo)); //2019-11-27 gubun??
|
||||
// System.out.println("else ################################:"+searchVO.getCollection()+"/"+all_totalCount+"/"+gubun);
|
||||
}
|
||||
//System.out.println("\n\n\n\n\n################################gubun_ajax:"+searchVO.getCollection()+"/"+gubun_ajax);
|
||||
|
||||
// 결과
|
||||
SearchCollectionVO collInfo = new SearchCollectionVO();
|
||||
SearchCollectionVO collMap = new SearchCollectionVO();
|
||||
SearchCollectionVO collNumber = new SearchCollectionVO();
|
||||
SearchCollectionVO collPick = new SearchCollectionVO();
|
||||
SearchCollectionVO collReferecne = new SearchCollectionVO();
|
||||
SearchCollectionVO collStory = new SearchCollectionVO();
|
||||
SearchCollectionVO collCulturePost = new SearchCollectionVO();
|
||||
SearchCollectionVO collCulturePostHot = new SearchCollectionVO();
|
||||
SearchCollectionVO collTotal = new SearchCollectionVO();
|
||||
SearchCollectionVO collToon = new SearchCollectionVO();
|
||||
|
||||
|
||||
int totalCount = 0;
|
||||
int page_totalCount =0;
|
||||
|
||||
ArrayList<SearchCollectionVO> collList = collResult.getCollectionList();
|
||||
|
||||
int collListSize = collList.size();
|
||||
for(int i = 0 ; i < collListSize ; i++){
|
||||
SearchCollectionVO coll = collList.get(i);
|
||||
String collEn = coll.getCollectionName();
|
||||
|
||||
|
||||
|
||||
if(collEn.indexOf("culturePostHot") < 0 && collEn.indexOf("total") < 0 && collEn.indexOf("_cate") < 0){
|
||||
totalCount = totalCount + coll.getTotalCount();
|
||||
}
|
||||
|
||||
if( !searchVO.getCollection().equals("ALL") && searchVO.getCollection().indexOf("_Coll") >= 0){
|
||||
if(searchVO.getCollection().replace("_Coll", "").equals(collEn)){
|
||||
page_totalCount = coll.getTotalCount();
|
||||
}
|
||||
}
|
||||
|
||||
if(collEn.equals("info")){
|
||||
collInfo = coll;
|
||||
}
|
||||
else if(collEn.equals("map")){
|
||||
collMap = coll;
|
||||
}
|
||||
else if(collEn.equals("number")){
|
||||
collNumber = coll;
|
||||
}
|
||||
else if(collEn.equals("pick")){
|
||||
collPick = coll;
|
||||
|
||||
}
|
||||
else if(collEn.equals("reference")){
|
||||
collReferecne = coll;
|
||||
for(int j = 0 ; j < collReferecne.getSearchResultList().size() ; j++){
|
||||
Map<Object ,Object> mapResult = collReferecne.getSearchResultList().get(j);
|
||||
DataMap paramMap = new DataMap();
|
||||
paramMap.put("mId", mapResult.get("MEDIA_ID"));
|
||||
if(StringUtils.isNotEmpty(mapResult.get("MEDIA_ID").toString())){
|
||||
DataMap media = cmmService.selectCmmAmsAssetsMediaDetail(paramMap);
|
||||
String mediaId = media.getString("id");
|
||||
String mediaInterfaceId = media.getString("interfaceId");
|
||||
String url = "";
|
||||
if (StringUtils.isNotEmpty(mediaInterfaceId)) { // mediaInterfaceId가 존재할 경우만 URL 정보 생성
|
||||
if(media.get("assetType") != null){
|
||||
if(media.get("assetType").toString().equals("문서") ){
|
||||
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/npdfView.do?";
|
||||
url += "npdf="+Constant.UA_TYPE_R+mediaInterfaceId; // MEDIA 의 INTERFACE_ID 사용
|
||||
|
||||
}else if(media.get("assetType").toString().equals("링크")){
|
||||
url = media.get("linkData").toString();
|
||||
}else{
|
||||
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/lib/libraryDetail.do?contentId="+mediaId;
|
||||
url += "&rfType="+Constant.UA_TYPE_R; // 히스토리 등록 시 사용
|
||||
}
|
||||
}
|
||||
}
|
||||
mapResult.put("LINK_URL", url);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(collEn.equals("story")){
|
||||
collStory = coll;
|
||||
}
|
||||
else if(collEn.equals("culturePost")){
|
||||
collCulturePost = coll;
|
||||
}
|
||||
else if(collEn.equals("total")){
|
||||
collTotal = coll;
|
||||
}
|
||||
else if(collEn.equals("total_tags")){
|
||||
model.addAttribute("total_tags", coll);
|
||||
}
|
||||
else if(collEn.indexOf("_cate") >= 0){ //cate
|
||||
if(collEn.equals("first_class_cate")){
|
||||
model.addAttribute("first_class_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_class_cate")){
|
||||
model.addAttribute("second_class_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_council_cate")){
|
||||
model.addAttribute("first_council_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_council_cate")){
|
||||
model.addAttribute("second_council_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_category_cate")){
|
||||
model.addAttribute("first_category_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_category_cate")){
|
||||
model.addAttribute("second_category_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_theme_cate")){
|
||||
model.addAttribute("first_theme_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_theme_cate")){
|
||||
model.addAttribute("second_theme_cate", coll);
|
||||
}
|
||||
}
|
||||
else if(collEn.indexOf("culturePostHot") >= 0){ //cate
|
||||
if(collEn.equals("culturePostHot")){
|
||||
collCulturePostHot = coll;
|
||||
}
|
||||
else if(collEn.equals("culturePostHot_keywords")){
|
||||
model.addAttribute("culturePostHot_keywords", coll);
|
||||
}
|
||||
else if(collEn.equals("culturePostHot_tags")){
|
||||
model.addAttribute("culturePostHot_tags", coll);
|
||||
}
|
||||
}
|
||||
else if(collEn.indexOf("toon") >= 0){
|
||||
if(collEn.equals("toon")){
|
||||
collToon = coll;
|
||||
}
|
||||
else if(collEn.equals("toon_tags")){
|
||||
model.addAttribute("toon_tags", coll);
|
||||
}
|
||||
// 최근열람툰
|
||||
CmmActivityHstVO cmmActivityHstVO = new CmmActivityHstVO();
|
||||
cmmActivityHstVO.setTargetId(CmmUtil.getCookieId(request));
|
||||
cmmActivityHstVO.setUaType(Constant.UA_TYPE_W);
|
||||
cmmActivityHstVO.setActivityType(Constant.ACTIVITY_TYPE_O);
|
||||
cmmActivityHstVO.setContentType(Constant.CONTENT_TYPE_T);
|
||||
model.addAttribute("openPageList", localToonService.selectLocalToonOpenPageList(cmmActivityHstVO));
|
||||
model.addAttribute("openPageHotList", localToonService.selectLocalToonOpenPageHotList(cmmActivityHstVO));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// - 값 (검색엔진 오류 일때 0값 으로 )
|
||||
if(totalCount < 0){
|
||||
totalCount = 0;
|
||||
}
|
||||
model.addAttribute("totalCount",totalCount);
|
||||
model.addAttribute("info", collInfo);
|
||||
model.addAttribute("map", collMap);
|
||||
model.addAttribute("number", collNumber);
|
||||
model.addAttribute("pick", collPick);
|
||||
model.addAttribute("reference", collReferecne);
|
||||
model.addAttribute("story", collStory);
|
||||
model.addAttribute("culturePost", collCulturePost);
|
||||
model.addAttribute("culturePostHot", collCulturePostHot);
|
||||
model.addAttribute("total", collTotal);
|
||||
model.addAttribute("all_totalCount",all_totalCount);
|
||||
model.addAttribute("toon",collToon);
|
||||
|
||||
// 경로
|
||||
CmmUtil.setNfsPathModelMap(request,model);
|
||||
|
||||
// 페이징 관련
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getStartCount());
|
||||
if(searchVO.getCollection().indexOf("toon") >= 0){
|
||||
if(searchVO.getViewCount() == 10){
|
||||
paginationInfo.setRecordCountPerPage(12);
|
||||
}else{
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
|
||||
}
|
||||
}else{
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
|
||||
}
|
||||
paginationInfo.setPageSize((CmmUtil.isMobile(request)) ? 5 :10);
|
||||
//paginationInfo.setTotalRecordCount(totalCount);
|
||||
|
||||
paginationInfo.setTotalRecordCount(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("") ? totalCount :page_totalCount );
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
|
||||
//serviceVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
//serviceVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
//serviceVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
model.addAttribute("searchVO", searchVO);
|
||||
//System.out.println("\n\n\n\n\n\n\n/*****************totalSearchList-searchVO.toString()********************/"+searchVO.toString());
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String resultUrl ="";
|
||||
|
||||
|
||||
/*if(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("")){
|
||||
resultUrl = "kccf/sch/totalSearchList.kccf";
|
||||
}else if(searchVO.getCollection().equals("pick_Coll")){
|
||||
resultUrl = "kccf/sch/searchPickList.kccf";
|
||||
}else if(searchVO.getCollection().equals("culturePost_Coll")){
|
||||
resultUrl = "kccf/sch/searchCulturePostList.kccf";
|
||||
}else if(searchVO.getCollection().equals("number_Coll")){
|
||||
resultUrl = "kccf/sch/searchNumberList.kccf";
|
||||
}else if(searchVO.getCollection().equals("story_Coll")){
|
||||
resultUrl = "kccf/sch/searchStoryList.kccf";
|
||||
}else if(searchVO.getCollection().equals("reference_Coll")){
|
||||
resultUrl = "kccf/sch/searchReferenceList.kccf";
|
||||
}else if(searchVO.getCollection().equals("info_Coll")){
|
||||
resultUrl = "kccf/sch/searchInfoList.kccf";
|
||||
}*/
|
||||
|
||||
ComDefaultCodeVO CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS014);
|
||||
model.addAttribute("firstCategoryList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS015);
|
||||
model.addAttribute("secondCategoryList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS004);
|
||||
model.addAttribute("themaList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS005);
|
||||
model.addAttribute("seriesList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS012);
|
||||
model.addAttribute("firstClassList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS013);
|
||||
model.addAttribute("secondClassList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS016);
|
||||
model.addAttribute("contentTypeList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS018);
|
||||
model.addAttribute("couSidoList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
List<DataMap> councilList = resourcesService.selectCouncilList();
|
||||
model.addAttribute("councilList", councilList);
|
||||
|
||||
if(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("")){
|
||||
if(gubun_ajax != null && gubun_ajax.equals("2")){
|
||||
resultUrl = "kccf/sch/totalSearchListAjax";
|
||||
}else{
|
||||
resultUrl = "kccf/sch/totalSearchList.kccf";
|
||||
}
|
||||
|
||||
}else if(searchVO.getCollection().equals("pick_Coll")){
|
||||
resultUrl = "kccf/sch/searchPickListAjax";
|
||||
}else if(searchVO.getCollection().equals("culturePost_Coll")){
|
||||
resultUrl = "kccf/sch/searchCulturePostList";
|
||||
}else if(searchVO.getCollection().equals("number_Coll")){
|
||||
resultUrl = "kccf/sch/searchNumberListAjax";
|
||||
}else if(searchVO.getCollection().equals("story_Coll")){
|
||||
resultUrl = "kccf/sch/searchStoryListAjax";
|
||||
}else if(searchVO.getCollection().equals("reference_Coll")){
|
||||
resultUrl = "kccf/sch/searchReferenceListAjax";
|
||||
}else if(searchVO.getCollection().equals("info_Coll")){
|
||||
resultUrl = "kccf/sch/searchInfoListAjax";
|
||||
}else if(searchVO.getCollection().equals("toon_Coll")){
|
||||
resultUrl = "kccf/sch/searchToonListAjax";
|
||||
}
|
||||
|
||||
//System.out.println("\n\n\n\n\n################################gubun_ajax:"+searchVO.getCollection()+"/"+gubun_ajax+"/"+resultUrl);
|
||||
|
||||
// ams 서버 패스 정보
|
||||
CmmUtil.setAmsPathModelMap(request,model);
|
||||
searchVO.setQuery(searchVO.getQuery().replaceAll("\\\"", """));
|
||||
searchVO.setExactQuery(searchVO.getExactQuery().replaceAll("\\\"", """));
|
||||
|
||||
return resultUrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** POPWORD */
|
||||
@RequestMapping(value="/sch/popword.do")
|
||||
public String popword(@ModelAttribute("PopWordVO") PopWordVO popWordVo, ModelMap model) throws Exception {
|
||||
|
||||
String popWordStr = "";
|
||||
String managerIp = nlibProperty.getString("search.managerIp");
|
||||
int managerPort = nlibProperty.getInt("search.managerPort");
|
||||
|
||||
Sf1VO sf1Vo = new Sf1VO();
|
||||
sf1Vo.setManagerIp(managerIp);
|
||||
sf1Vo.setManagerPort(managerPort);
|
||||
|
||||
popWordStr = popWordService.getPopWord(popWordVo, sf1Vo);
|
||||
model.addAttribute("popWordStr", popWordStr);
|
||||
|
||||
return "kccf/sch/popword/popword.kccf-sch";
|
||||
}
|
||||
|
||||
|
||||
/** ARK */
|
||||
@RequestMapping(value="/sch/ark.do")
|
||||
public String ark(@ModelAttribute("ArkVO") ArkVO arkVO, ModelMap model) throws Exception {
|
||||
String arkStr = "";
|
||||
String managerIp = nlibProperty.getString("search.managerIp");
|
||||
int managerPort = nlibProperty.getInt("search.managerPort") ;
|
||||
|
||||
|
||||
Sf1VO sf1Vo = new Sf1VO();
|
||||
sf1Vo.setManagerIp(managerIp);
|
||||
sf1Vo.setManagerPort(managerPort);
|
||||
|
||||
arkStr = arkService.getArk(arkVO, sf1Vo);
|
||||
|
||||
model.addAttribute("arkStr", arkStr);
|
||||
|
||||
return "kccf/sch/ark/ark.kccf-sch";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value="/sch/totalSearchList_ajax.do")
|
||||
public String totalSearchList_ajax (
|
||||
@ModelAttribute("searchVO") SearchVO searchVO
|
||||
, String all_totalCount
|
||||
, String gubun
|
||||
, ModelMap model
|
||||
, HttpServletRequest request
|
||||
,HttpServletResponse res
|
||||
) throws Exception
|
||||
{
|
||||
try{
|
||||
LOGGER.debug("[PATH][/sch/totalSearchList.do][searchVO][{}]",searchVO.toString());
|
||||
//System.out.println("\n\n\n\n\n\n\n/*****************totalSearchList-searchVO.toString()********************/"+searchVO.toString());
|
||||
|
||||
// 검색관련 서버 설정
|
||||
String searchIp = nlibProperty.getString("search.searchIp");
|
||||
int searchPort = nlibProperty.getInt("search.searchPort");
|
||||
int searchTimeOut = nlibProperty.getInt("search.searchTimeOut");
|
||||
|
||||
Sf1VO sf1Vo = new Sf1VO();
|
||||
sf1Vo.setSearchIp(searchIp);
|
||||
sf1Vo.setSearchPort(searchPort);
|
||||
sf1Vo.setSearchTimeOut(searchTimeOut);
|
||||
|
||||
SearchCollectionResult collResult = searchService.getSearch(searchVO, sf1Vo);
|
||||
|
||||
if(gubun.equals("1")){ //&&(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals(""))
|
||||
all_totalCount = Integer.toString(searchService.getSearch_All_cnt(searchVO, sf1Vo));
|
||||
// all_totalCount = Integer.toString(collResult_all_cnt);
|
||||
// System.out.println("################################"+searchVO.getCollection()+"/"+all_totalCount+"/"+gubun);
|
||||
}else {
|
||||
all_totalCount = Integer.toString(searchService.getSearch_All_cnt(searchVO, sf1Vo)); //2019-11-27 gubun??
|
||||
// System.out.println("else ################################:"+searchVO.getCollection()+"/"+all_totalCount+"/"+gubun);
|
||||
}
|
||||
//System.out.println("\n\n\n\n\n################################gubun_ajax:"+searchVO.getCollection()+"/"+gubun_ajax);
|
||||
|
||||
// 결과
|
||||
SearchCollectionVO collInfo = new SearchCollectionVO();
|
||||
SearchCollectionVO collMap = new SearchCollectionVO();
|
||||
SearchCollectionVO collNumber = new SearchCollectionVO();
|
||||
SearchCollectionVO collPick = new SearchCollectionVO();
|
||||
SearchCollectionVO collReferecne = new SearchCollectionVO();
|
||||
SearchCollectionVO collStory = new SearchCollectionVO();
|
||||
SearchCollectionVO collCulturePost = new SearchCollectionVO();
|
||||
SearchCollectionVO collCulturePostHot = new SearchCollectionVO();
|
||||
SearchCollectionVO collTotal = new SearchCollectionVO();
|
||||
SearchCollectionVO collToon = new SearchCollectionVO();
|
||||
|
||||
|
||||
int totalCount = 0;
|
||||
int page_totalCount =0;
|
||||
|
||||
ArrayList<SearchCollectionVO> collList = collResult.getCollectionList();
|
||||
|
||||
int collListSize = collList.size();
|
||||
for(int i = 0 ; i < collListSize ; i++){
|
||||
SearchCollectionVO coll = collList.get(i);
|
||||
String collEn = coll.getCollectionName();
|
||||
|
||||
|
||||
|
||||
if(collEn.indexOf("culturePostHot") < 0 && collEn.indexOf("total") < 0 && collEn.indexOf("_cate") < 0){
|
||||
totalCount = totalCount + coll.getTotalCount();
|
||||
}
|
||||
|
||||
if( !searchVO.getCollection().equals("ALL") && searchVO.getCollection().indexOf("_Coll") >= 0){
|
||||
if(searchVO.getCollection().replace("_Coll", "").equals(collEn)){
|
||||
page_totalCount = coll.getTotalCount();
|
||||
}
|
||||
}
|
||||
|
||||
if(collEn.equals("info")){
|
||||
collInfo = coll;
|
||||
}
|
||||
else if(collEn.equals("map")){
|
||||
collMap = coll;
|
||||
}
|
||||
else if(collEn.equals("number")){
|
||||
collNumber = coll;
|
||||
}
|
||||
else if(collEn.equals("pick")){
|
||||
collPick = coll;
|
||||
|
||||
}
|
||||
else if(collEn.equals("reference")){
|
||||
collReferecne = coll;
|
||||
for(int j = 0 ; j < collReferecne.getSearchResultList().size() ; j++){
|
||||
Map<Object ,Object> mapResult = collReferecne.getSearchResultList().get(j);
|
||||
DataMap paramMap = new DataMap();
|
||||
paramMap.put("mId", mapResult.get("MEDIA_ID"));
|
||||
if(StringUtils.isNotEmpty(mapResult.get("MEDIA_ID").toString())){
|
||||
DataMap media = cmmService.selectCmmAmsAssetsMediaDetail(paramMap);
|
||||
String mediaId = media.getString("id");
|
||||
String mediaInterfaceId = media.getString("interfaceId");
|
||||
String url = "";
|
||||
if (StringUtils.isNotEmpty(mediaInterfaceId)) { // mediaInterfaceId가 존재할 경우만 URL 정보 생성
|
||||
if(media.get("assetType") != null){
|
||||
if(media.get("assetType").toString().equals("문서") ){
|
||||
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/npdfView.do?";
|
||||
url += "npdf="+Constant.UA_TYPE_R+mediaInterfaceId; // MEDIA 의 INTERFACE_ID 사용
|
||||
|
||||
}else if(media.get("assetType").toString().equals("링크")){
|
||||
url = media.get("linkData").toString();
|
||||
}else{
|
||||
url = CmmUtil.getPropertyStr(Constant.KCCF_HOME_KEY)+"/lib/libraryDetail.do?contentId="+mediaId;
|
||||
url += "&rfType="+Constant.UA_TYPE_R; // 히스토리 등록 시 사용
|
||||
}
|
||||
}
|
||||
}
|
||||
mapResult.put("LINK_URL", url);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(collEn.equals("story")){
|
||||
collStory = coll;
|
||||
}
|
||||
else if(collEn.equals("culturePost")){
|
||||
collCulturePost = coll;
|
||||
}
|
||||
else if(collEn.equals("total")){
|
||||
collTotal = coll;
|
||||
}
|
||||
else if(collEn.equals("total_tags")){
|
||||
model.addAttribute("total_tags", coll);
|
||||
}
|
||||
else if(collEn.indexOf("_cate") >= 0){ //cate
|
||||
if(collEn.equals("first_class_cate")){
|
||||
model.addAttribute("first_class_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_class_cate")){
|
||||
model.addAttribute("second_class_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_council_cate")){
|
||||
model.addAttribute("first_council_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_council_cate")){
|
||||
model.addAttribute("second_council_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_category_cate")){
|
||||
model.addAttribute("first_category_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_category_cate")){
|
||||
model.addAttribute("second_category_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("first_theme_cate")){
|
||||
model.addAttribute("first_theme_cate", coll);
|
||||
}
|
||||
else if(collEn.equals("second_theme_cate")){
|
||||
model.addAttribute("second_theme_cate", coll);
|
||||
}
|
||||
}
|
||||
else if(collEn.indexOf("culturePostHot") >= 0){ //cate
|
||||
if(collEn.equals("culturePostHot")){
|
||||
collCulturePostHot = coll;
|
||||
}
|
||||
else if(collEn.equals("culturePostHot_keywords")){
|
||||
model.addAttribute("culturePostHot_keywords", coll);
|
||||
}
|
||||
else if(collEn.equals("culturePostHot_tags")){
|
||||
model.addAttribute("culturePostHot_tags", coll);
|
||||
}
|
||||
}
|
||||
else if(collEn.indexOf("toon") >= 0){
|
||||
if(collEn.equals("toon")){
|
||||
collToon = coll;
|
||||
}
|
||||
else if(collEn.equals("toon_tags")){
|
||||
model.addAttribute("toon_tags", coll);
|
||||
}
|
||||
// 최근열람툰
|
||||
CmmActivityHstVO cmmActivityHstVO = new CmmActivityHstVO();
|
||||
cmmActivityHstVO.setTargetId(CmmUtil.getCookieId(request));
|
||||
cmmActivityHstVO.setUaType(Constant.UA_TYPE_W);
|
||||
cmmActivityHstVO.setActivityType(Constant.ACTIVITY_TYPE_O);
|
||||
cmmActivityHstVO.setContentType(Constant.CONTENT_TYPE_T);
|
||||
model.addAttribute("openPageList", localToonService.selectLocalToonOpenPageList(cmmActivityHstVO));
|
||||
model.addAttribute("openPageHotList", localToonService.selectLocalToonOpenPageHotList(cmmActivityHstVO));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// - 값 (검색엔진 오류 일때 0값 으로 )
|
||||
if(totalCount < 0){
|
||||
totalCount = 0;
|
||||
}
|
||||
model.addAttribute("totalCount",totalCount);
|
||||
model.addAttribute("info", collInfo);
|
||||
model.addAttribute("map", collMap);
|
||||
model.addAttribute("number", collNumber);
|
||||
model.addAttribute("pick", collPick);
|
||||
model.addAttribute("reference", collReferecne);
|
||||
model.addAttribute("story", collStory);
|
||||
model.addAttribute("culturePost", collCulturePost);
|
||||
model.addAttribute("culturePostHot", collCulturePostHot);
|
||||
model.addAttribute("total", collTotal);
|
||||
model.addAttribute("all_totalCount",all_totalCount);
|
||||
model.addAttribute("toon",collToon);
|
||||
|
||||
// 경로
|
||||
CmmUtil.setNfsPathModelMap(request,model);
|
||||
|
||||
// 페이징 관련
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getStartCount());
|
||||
if(searchVO.getCollection().indexOf("toon") >= 0){
|
||||
if(searchVO.getViewCount() == 10){
|
||||
paginationInfo.setRecordCountPerPage(12);
|
||||
}else{
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
|
||||
}
|
||||
}else{
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getViewCount());
|
||||
}
|
||||
paginationInfo.setPageSize((CmmUtil.isMobile(request)) ? 5 :10);
|
||||
//paginationInfo.setTotalRecordCount(totalCount);
|
||||
|
||||
paginationInfo.setTotalRecordCount(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("") ? totalCount :page_totalCount );
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
|
||||
//serviceVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
//serviceVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
//serviceVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
|
||||
model.addAttribute("searchVO", searchVO);
|
||||
//System.out.println("\n\n\n\n\n\n\n/*****************totalSearchList-searchVO.toString()********************/"+searchVO.toString());
|
||||
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String resultUrl ="";
|
||||
|
||||
|
||||
/*if(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("")){
|
||||
resultUrl = "kccf/sch/totalSearchList.kccf";
|
||||
}else if(searchVO.getCollection().equals("pick_Coll")){
|
||||
resultUrl = "kccf/sch/searchPickList.kccf";
|
||||
}else if(searchVO.getCollection().equals("culturePost_Coll")){
|
||||
resultUrl = "kccf/sch/searchCulturePostList.kccf";
|
||||
}else if(searchVO.getCollection().equals("number_Coll")){
|
||||
resultUrl = "kccf/sch/searchNumberList.kccf";
|
||||
}else if(searchVO.getCollection().equals("story_Coll")){
|
||||
resultUrl = "kccf/sch/searchStoryList.kccf";
|
||||
}else if(searchVO.getCollection().equals("reference_Coll")){
|
||||
resultUrl = "kccf/sch/searchReferenceList.kccf";
|
||||
}else if(searchVO.getCollection().equals("info_Coll")){
|
||||
resultUrl = "kccf/sch/searchInfoList.kccf";
|
||||
}*/
|
||||
|
||||
ComDefaultCodeVO CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS014);
|
||||
model.addAttribute("firstCategoryList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS015);
|
||||
model.addAttribute("secondCategoryList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS004);
|
||||
model.addAttribute("themaList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS005);
|
||||
model.addAttribute("seriesList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS012);
|
||||
model.addAttribute("firstClassList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS013);
|
||||
model.addAttribute("secondClassList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS016);
|
||||
model.addAttribute("contentTypeList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
CodeVO = new ComDefaultCodeVO();
|
||||
CodeVO.setCodeId(Constant.CODE_ID_FMS018);
|
||||
model.addAttribute("couSidoList", cmmUseService.selectCmmCodeDetail(CodeVO));
|
||||
|
||||
List<DataMap> councilList = resourcesService.selectCouncilList();
|
||||
model.addAttribute("councilList", councilList);
|
||||
|
||||
if(searchVO.getCollection().equals("ALL") || searchVO.getCollection().equals("")){
|
||||
resultUrl = "kccf/sch/totalSearchListAjax";
|
||||
}else if(searchVO.getCollection().equals("pick_Coll")){
|
||||
resultUrl = "kccf/sch/searchPickListAjax";
|
||||
}else if(searchVO.getCollection().equals("culturePost_Coll")){
|
||||
resultUrl = "kccf/sch/searchCulturePostList";
|
||||
}else if(searchVO.getCollection().equals("number_Coll")){
|
||||
resultUrl = "kccf/sch/searchNumberListAjax";
|
||||
}else if(searchVO.getCollection().equals("story_Coll")){
|
||||
resultUrl = "kccf/sch/searchStoryListAjax";
|
||||
}else if(searchVO.getCollection().equals("reference_Coll")){
|
||||
resultUrl = "kccf/sch/searchReferenceListAjax";
|
||||
}else if(searchVO.getCollection().equals("info_Coll")){
|
||||
resultUrl = "kccf/sch/searchInfoListAjax";
|
||||
}else if(searchVO.getCollection().equals("toon_Coll")){
|
||||
resultUrl = "kccf/sch/searchToonListAjax";
|
||||
}
|
||||
|
||||
//System.out.println("\n\n\n\n\n################################gubun_ajax:"+searchVO.getCollection()+"/"+gubun_ajax+"/"+resultUrl);
|
||||
|
||||
// ams 서버 패스 정보
|
||||
CmmUtil.setAmsPathModelMap(request,model);
|
||||
searchVO.setQuery(searchVO.getQuery().replaceAll("\\\"", """));
|
||||
searchVO.setExactQuery(searchVO.getExactQuery().replaceAll("\\\"", """));
|
||||
|
||||
return resultUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* OCR문서의 몇번째 문서인지 리턴하기 위한 api
|
||||
* reference.js 에서 function reference_viewOcr(mediaId, query)로 호출
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/sch/getOcrId.do")
|
||||
public String getOcrId (HttpServletRequest request, ModelMap model ) throws Exception {
|
||||
//디버깅 보기 설정
|
||||
boolean isDebug = false;
|
||||
String exquery = ""; // exquery 조건 필드
|
||||
String jsonStr = "";
|
||||
|
||||
int startCount = 0; //보여줄 페이지 번호
|
||||
String strOperation ="";
|
||||
|
||||
int viewResultCount = WNUtils.parseInt(WNUtils.getCheckReqXSS(request, "LISTCOUNT", "1"), 1); // 출력건수
|
||||
String sort = WNUtils.getCheckReqXSS(request, "SORT", "ID"); // 정렬방식
|
||||
String sortOrder = WNUtils.getCheckReqXSS(request, "SORTORDER", "ASC"); // 정렬방식
|
||||
String collection = WNUtils.getCheckReqXSS(request, "COLLECTION", "ocr"); // 컬랙션
|
||||
String media_id = WNUtils.getCheckReqXSS(request, "MEDIA_ID", ""); // 메뉴
|
||||
String query = WNUtils.getCheckReqXSS(request, "query", "");
|
||||
|
||||
String[] collections = null;
|
||||
if(collection.equals("ALL")) { //통합검색인 경우
|
||||
collections = new String[]{"info","map","number","pick","reference","story","culturePost","total","toon"}; //COLLECTIONS;
|
||||
} else { //개별검색인 경우
|
||||
collections = new String[] { collection };
|
||||
}
|
||||
|
||||
exquery += "<MEDIA_ID:contains:" + media_id + ">";
|
||||
|
||||
// 검색관련 서버 설정
|
||||
String searchIp = nlibProperty.getString("search.searchIp");
|
||||
int searchPort = nlibProperty.getInt("search.searchPort");
|
||||
int searchTimeOut = nlibProperty.getInt("search.searchTimeOut");
|
||||
|
||||
Sf1VO sf1Vo = new Sf1VO();
|
||||
sf1Vo.setSearchIp(searchIp);
|
||||
sf1Vo.setSearchPort(searchPort);
|
||||
sf1Vo.setSearchTimeOut(searchTimeOut);
|
||||
|
||||
WNSearch wnsearch = new WNSearch(isDebug, false, collections, null);
|
||||
// WNSearch wnsearch = new WNSearch(isDebug, false, collections, null, WNDefine.USE_RESULT_JSON);
|
||||
wnsearch.setSf1Vo(sf1Vo);
|
||||
wnsearch.set(query, "ALL", viewResultCount, startCount, sort, sortOrder, strOperation, exquery, "1970.01.01", WNUtils.getCurrentDate());
|
||||
wnsearch.search(query, false, CONNECTION_CLOSE, true, sf1Vo.getSearchIp(), sf1Vo.getSearchPort());
|
||||
String debugMsg = wnsearch.printDebug() != null ? wnsearch.printDebug().trim() : "";
|
||||
|
||||
int min = viewResultCount;
|
||||
if(wnsearch.getResultTotalCount("ocr") < viewResultCount){
|
||||
min = wnsearch.getResultTotalCount("ocr"); //가장 적은 수로 결과를 리턴
|
||||
}
|
||||
|
||||
|
||||
Gson gson = new Gson();
|
||||
JsonArray doc = new JsonArray();
|
||||
String[] fields = {"ID","MEDIA_ID","FIRST_PAGE_NUM","LAST_PAGE_NUM","ORDER_NUM","FILE_NAME"};
|
||||
for(int idx =0 ; idx < min; idx++){
|
||||
JsonObject obj = new JsonObject();
|
||||
for(String field : fields){
|
||||
obj.addProperty(field, wnsearch.getField("ocr", field, idx, false));
|
||||
}
|
||||
doc.add(obj);
|
||||
}
|
||||
|
||||
jsonStr = gson.toJson(doc);
|
||||
// jsonStr = wnsearch.getResultJson();
|
||||
|
||||
model.addAttribute("jsonStr", jsonStr);
|
||||
model.addAttribute("isDebug", isDebug); //디버그메시지출력여부
|
||||
model.addAttribute("debugMsg", debugMsg); //디버그 메시지 출력
|
||||
|
||||
|
||||
if ( wnsearch != null )
|
||||
wnsearch.closeServer();
|
||||
|
||||
return "kccf/sch/ocr/schOcrRetrunId.kccf-sch";
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,7 +8,6 @@ import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -20,17 +19,13 @@ import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
import nlib.bbs.service.BoardService;
|
||||
import nlib.cmm.NlibCommonController;
|
||||
import nlib.cmm.crypto.AriaCrypto;
|
||||
import nlib.cmm.crypto.NlibPasswordEncoder;
|
||||
import nlib.cmm.exception.ErrorMessage;
|
||||
import nlib.cmm.service.CodeService;
|
||||
import nlib.cmm.service.NlibProperty;
|
||||
import nlib.restful.service.DataApiReqVO;
|
||||
@ -407,7 +402,12 @@ public class BoardController extends NlibCommonController
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/selectQnA.do")
|
||||
public String selectQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
||||
public String selectQnA(HttpServletRequest req
|
||||
, Authentication authentication
|
||||
, @RequestParam Map<String, String> paramMap
|
||||
, ModelMap model) throws Exception {
|
||||
|
||||
addParamFromInputFlash(paramMap, req);
|
||||
|
||||
// 목록 이동시 전달할 매개변수
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
@ -481,7 +481,11 @@ public class BoardController extends NlibCommonController
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/insertQnA.do")
|
||||
public String insertQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
||||
public String insertQnA(HttpServletRequest req
|
||||
, Authentication authentication
|
||||
, @RequestParam Map<String, String> paramMap
|
||||
, RedirectAttributes redirectAttrs
|
||||
, ModelMap model) throws Exception {
|
||||
|
||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||
|
||||
@ -537,9 +541,9 @@ public class BoardController extends NlibCommonController
|
||||
// 처리결과 확인
|
||||
if(!resVO.isSuccess()) {
|
||||
message = resVO.getResultMessage();
|
||||
model.addAttribute("message", message);
|
||||
addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword");
|
||||
addParamsToModel(paramMap, model, null,
|
||||
redirectAttrs.addFlashAttribute("message", message);
|
||||
addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword");
|
||||
addParamsToRedirect(paramMap, redirectAttrs, null,
|
||||
"title,articlePassword,"
|
||||
+ "regDate, regUserName, "
|
||||
+ "email, contentQeust");
|
||||
@ -547,8 +551,8 @@ public class BoardController extends NlibCommonController
|
||||
return "redirect:/board/insertQnAForm.do";
|
||||
}
|
||||
|
||||
model.addAttribute("pageSize", paramMap.get("pageSize"));
|
||||
model.addAttribute("message", "성공적으로 등록되었습니다.");
|
||||
redirectAttrs.addFlashAttribute("pageSize", paramMap.get("pageSize"));
|
||||
redirectAttrs.addFlashAttribute("message", "성공적으로 등록되었습니다.");
|
||||
|
||||
return "redirect:/board/listQnAs.do";
|
||||
}
|
||||
@ -568,7 +572,12 @@ public class BoardController extends NlibCommonController
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/updateQnAForm.do")
|
||||
public String updateQnAForm(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
||||
public String updateQnAForm(HttpServletRequest req
|
||||
, Authentication authentication
|
||||
, @RequestParam Map<String, String> paramMap
|
||||
, ModelMap model
|
||||
, RedirectAttributes redirectAttrs
|
||||
) throws Exception {
|
||||
|
||||
// 목록 이동시 전달할 매개변수
|
||||
String searchKeyword = paramMap.get("searchKeyword");
|
||||
@ -586,9 +595,9 @@ public class BoardController extends NlibCommonController
|
||||
log.debug("updateQnAForm > articlePassword = " + articlePassword);
|
||||
|
||||
if(StringUtil.isEmpty(articlePassword)) {
|
||||
model.addAttribute("message", "비밀빈호가 올바르지 않습니다.(U1)");
|
||||
redirectAttrs.addFlashAttribute("message", "비밀빈호가 올바르지 않습니다.(U1)");
|
||||
|
||||
addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
||||
addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
||||
return "redirect:/board/selectQnA.do";
|
||||
}
|
||||
|
||||
@ -611,8 +620,8 @@ public class BoardController extends NlibCommonController
|
||||
log.debug("updateQnAForm > 입력받은 비밀번호를 SHA256 암호화한 값 : " + shaArticlePassword);
|
||||
|
||||
if(!shaArticlePassword.equals(article.get("articlePassword"))) {
|
||||
model.addAttribute("message", "비밀번호가 올바르지 않습니다.(U2)");
|
||||
addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
||||
redirectAttrs.addFlashAttribute("message", "비밀번호가 올바르지 않습니다.(U2)");
|
||||
addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
||||
return "redirect:/board/selectQnA.do";
|
||||
}
|
||||
|
||||
@ -646,7 +655,11 @@ public class BoardController extends NlibCommonController
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/board/updateQnA.do")
|
||||
public String updateQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
||||
public String updateQnA(HttpServletRequest req
|
||||
, Authentication authentication
|
||||
, @RequestParam Map<String, String> paramMap
|
||||
, RedirectAttributes redirectAttrs
|
||||
, ModelMap model) throws Exception {
|
||||
|
||||
log.debug("paramMap > " + paramMap);
|
||||
|
||||
@ -681,7 +694,8 @@ public class BoardController extends NlibCommonController
|
||||
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
||||
String oldArticlePassword = resVO.getInfoItem("articlePassword");
|
||||
if(checkArticlePassword == null || !checkArticlePassword.equals(oldArticlePassword)) {
|
||||
model.addAttribute("errorMessage", new ErrorMessage("ERR_BRD_UPDTQNA", "잘못된 접근입니다."));
|
||||
redirectAttrs.addFlashAttribute("errorCode", "ERR_BRD_UPDTQNA");
|
||||
redirectAttrs.addFlashAttribute("errorMessage", "잘못된 접근입니다.");
|
||||
return "redirect:/alert/showError.do";
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@ -215,4 +217,68 @@ public class NlibCommonController {
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
public RedirectAttributes addParamsToRedirect(Map<String, String> paramMap, RedirectAttributes redirectAttrs) {
|
||||
return addParamsToRedirect(paramMap, redirectAttrs, null, null);
|
||||
}
|
||||
public RedirectAttributes addParamsToRedirect(Map<String, String> paramMap
|
||||
, RedirectAttributes redirectAttrs
|
||||
, String upperMapName
|
||||
, String itemNames) {
|
||||
|
||||
|
||||
if(paramMap == null || paramMap.size() < 1) return redirectAttrs;
|
||||
if(redirectAttrs == null) return redirectAttrs;
|
||||
|
||||
String filter = null;
|
||||
if(StringUtil.isNotEmpty(itemNames)) {
|
||||
filter = "," + itemNames + ",";
|
||||
filter = filter.replaceAll(" ", "");
|
||||
}
|
||||
|
||||
boolean existUpperMap = StringUtil.isNotEmpty(upperMapName);
|
||||
Map<String, String> uppperMap = null;
|
||||
if(existUpperMap) uppperMap = new HashMap<String, String>();
|
||||
|
||||
for(String key : paramMap.keySet()) {
|
||||
|
||||
if(filter != null && !filter.contains("," + key + ",")) {
|
||||
continue;
|
||||
}
|
||||
if(existUpperMap) {
|
||||
uppperMap.put(key, paramMap.get(key));
|
||||
} else {
|
||||
redirectAttrs.addFlashAttribute(key, paramMap.get(key));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(existUpperMap) redirectAttrs.addFlashAttribute(upperMapName, uppperMap);
|
||||
|
||||
return redirectAttrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* paramMap에 이전 요청에서 전달할 때 추가한 POST방식의 매개변수값을 paramMap에 추가한다.
|
||||
*
|
||||
* @param paramMap
|
||||
* @param req
|
||||
*/
|
||||
public void addParamFromInputFlash(Map<String, String> paramMap, HttpServletRequest req) {
|
||||
if(req == null) return;
|
||||
|
||||
Map<String, String> inFlashMap = (Map<String, String>)RequestContextUtils.getInputFlashMap(req);
|
||||
if(inFlashMap == null || inFlashMap.size() < 1) return;
|
||||
|
||||
if(paramMap == null) paramMap = new HashMap<String, String>();
|
||||
|
||||
for(String key : inFlashMap.keySet()) {
|
||||
String value = inFlashMap.get(key);
|
||||
if(StringUtil.isNotEmpty(value)) {
|
||||
paramMap.put(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
package nlib.cmm.web;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@ -7,6 +11,7 @@ import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import nlib.cmm.NlibCommonController;
|
||||
import nlib.cmm.exception.ErrorMessage;
|
||||
|
||||
/**
|
||||
@ -32,7 +37,7 @@ import nlib.cmm.exception.ErrorMessage;
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class AlertController {
|
||||
public class AlertController extends NlibCommonController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SystemController.class);
|
||||
|
||||
@ -44,10 +49,12 @@ public class AlertController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping( {"/alert/showError.do"} )
|
||||
public String showError(@RequestParam ErrorMessage errorMessage, ModelMap model) {
|
||||
public String showError(HttpServletRequest req, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
||||
|
||||
model.addAttribute("code", errorMessage.getCode());
|
||||
model.addAttribute("message", errorMessage.getMessage());
|
||||
addParamFromInputFlash(paramMap, req);
|
||||
model.addAttribute("code", paramMap.get("errorCode"));
|
||||
model.addAttribute("message", paramMap.get("errorMessage"));
|
||||
model.addAttribute("goBackUrl", paramMap.get("goBackUrl"));
|
||||
|
||||
return "nlib/cmm/common";
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ function fn_update() {
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기존비밀번호</th>
|
||||
<td><input type="text" name="encArticlePassword" id="encArticlePassword" title="제목" value="${encArticlePassword}" size="100" maxlength="200" readonly /></td>
|
||||
<td><input type="text" name="encArticlePassword" id="encArticlePassword" title="제목" value="${encArticlePassword}" size="100" maxlength="200" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호<br/>(변경시 입력)</th>
|
||||
|
||||
BIN
src/main/webapp/WEB-INF/lib/lombok.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/lombok.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user