Changeset 7058 for TI01-discovery-API


Ignore:
Timestamp:
23/06/10 11:12:24 (9 years ago)
Author:
mnagni
Message:

Added the AvailableDataFormats? to the TermTarget?
Medin Discovery Service version 1.1.15

Location:
TI01-discovery-API/trunk/MEDINDiscoveryService
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-API/trunk/MEDINDiscoveryService/pom.xml

    r7033 r7058  
    44        <groupId>ndg.services.discovery</groupId> 
    55        <artifactId>MedinDiscoveryService</artifactId> 
    6         <version>1.1.14</version> 
     6        <version>1.1.15</version> 
    77        <packaging>aar</packaging> 
    88 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/DiscoveryServiceMEDINSkeleton.java

    r7005 r7058  
    288288        } 
    289289 
    290         /** 
    291          * Prepare an INSERT sql statement taking variables from available 
    292          * ndg.services.discovery.medin.generated.SearchType 
    293          *  
    294          * @param requestContent 
    295          *            - ndg.services.discovery.medin.generated.SearchType 
    296          *  
    297          * @return String : sql insert statement 
    298          */ 
    299         /* 
    300          * public static String 
    301          * recordSearchParamsToLog(ndg.services.discovery.medin.generated.SearchType 
    302          * requestContentToLog, Integer numHits, String thisSessionID) { 
    303          *  
    304          * //extract from request content 
    305          * logger.info("Constructing search DB logger sql update from requestContent" 
    306          * ); 
    307          *  
    308          * //TODO: get originator IP and originating PORTAL IP 
    309          *  
    310          * //concatenate all scope into single comma separated string String 
    311          * scopeString = ""; if (requestContentToLog.sizeOfScopeArray() > 0) { for 
    312          * (int i = 0; i < requestContentToLog.sizeOfScopeArray(); i++) { if (i == 
    313          * 0){ scopeString = (requestContentToLog.getScopeArray(i).toString()); } 
    314          * elsenull; 
    315          *  
    316          * myResult = { scopeString = scopeString + "," + 
    317          * (requestContentToLog.getScopeArray(i).toString()); } } } else { 
    318          * scopeString = "null"; } 
    319          *  
    320          * //check whether text term, spatial and temporal operators are available.. 
    321          * String searchTxtTerm = ""; if 
    322          * (Utilities.isStringDefined(requestContentToLog.getTerm())){ searchTxtTerm 
    323          * = "'" + requestContentToLog.getTerm() + "'"; } else { searchTxtTerm = 
    324          * "null"; } 
    325          *  
    326          * String dateRangeStart = ""; String dateRangeEnd = ""; if 
    327          * (requestContentToLog.isSetDateRange()) { dateRangeStart = "'" + 
    328          * requestContentToLog.getDateRange().getDateRangeStart().toString() + "'"; 
    329          * dateRangeEnd = "'" + 
    330          * requestContentToLog.getDateRange().getDateRangeEnd().toString() + "'"; } 
    331          * else { dateRangeStart = "null"; dateRangeEnd = "null"; } 
    332          *  
    333          * String boundingBoxAsPolyString = ""; if 
    334          * (requestContentToLog.isSetBoundingBox()) { boundingBoxAsPolyString = "'" 
    335          * + requestContentToLog.getBoundingBox().getLimitWest() + " " + 
    336          * requestContentToLog.getBoundingBox().getLimitNorth() + "," + 
    337          * requestContentToLog.getBoundingBox().getLimitEast() + " " + 
    338          * requestContentToLog.getBoundingBox().getLimitNorth() + "," + 
    339          * requestContentToLog.getBoundingBox().getLimitEast() + " " + 
    340          * requestContentToLog.getBoundingBox().getLimitSouth() + "," + 
    341          * requestContentToLog.getBoundingBox().getLimitWest() + " " + 
    342          * requestContentToLog.getBoundingBox().getLimitSouth() + "," + 
    343          * requestContentToLog.getBoundingBox().getLimitWest() + " " + 
    344          * requestContentToLog.getBoundingBox().getLimitNorth() + "'"; 
    345          *  
    346          * } else { boundingBoxAsPolyString = "null"; } 
    347          *  
    348          * String statementStringBuild = 
    349          * "insert into discoverySearchLogging(session_ID,search_term,start_time,end_time,date_of_search,scope,originator_IP,portal_IP,geographicExtent_As_Text, number_results_returned) " 
    350          * + "values (" + "'" + thisSessionID + "'" + "," + searchTxtTerm + "," + 
    351          * dateRangeStart + "," + dateRangeEnd + "," + "'" + Utilities.nowDateTime() 
    352          * + "'" + "," + "'" + scopeString + "'" + "," + "'originatorIP'" + "," + 
    353          * "'portalIP'" + "," + boundingBoxAsPolyString + "," + "'" + 
    354          * numHits.toString() + "'" + ");"; 
    355          *  
    356          * return statementStringBuild; 
    357          *  
    358          * return ""; } 
    359          */ 
    360  
    361290        private void processResult(List<OriginalDocument> results, Documents documents, RecordDetail type, 
    362291                        OrderByType[] orderBy) { 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/medin/DiscoveryDictionary.java

    r6874 r7058  
    5656                PublicAccessLimits("limitations_public_access_ts_vector", "PublicAccessLimits", true), 
    5757                DataOriginator("data_originator_tsvector", "DataOriginator", true), 
    58                 DataFormat("original_format_name", "DataFormat", false);                 
     58                DataFormat("original_format_name", "DataFormat", false),                 
     59                AvailableDataFormats("data_formats", "AvailableDataFormats", false); 
    5960                 
    6061                private final String fieldName; 
     
    279280        } 
    280281         
     282        /** 
     283         * Maps the db table to {@link OriginalDocument} class. 
     284         **/ 
    281285        public static enum OriginalDocumentToTable { 
    282286                DocumentId("original_document_id", "originalDocumentId"), 
     
    306310                HarvestCount("harvest_count", "harvestCount"), 
    307311                ResultsetCount("resultset_count", "resultsetCount"), 
    308                 AccessCount("access_count", "accessCount"); 
     312                AccessCount("access_count", "accessCount"), 
     313                AvailableDataFormats("data_formats", "dataFormats"); 
    309314                 
    310315                private final String fieldName; 
     
    435440                if (label != null) { 
    436441                        for (TermTarget item : TermTarget.values()) { 
    437                                 if(label.trim().equals(item.fieldLabel())) {file:///home/users/mnagni/workspace/MARINDiscoveryService/target/MedinDiscoveryService-0.0.1-SNAPSHOT.aar 
     442                                if(label.trim().equals(item.fieldLabel())) { 
    438443                                        type = item; 
    439444                                        break; 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/jpa/OriginalDocument.java

    r6767 r7058  
    8585        private Integer scn; 
    8686         
     87        private String dataFormats; 
     88         
     89        private String dataFormatsTsVector;      
     90         
    8791        private List<TemporalType> temporalType = new ArrayList<TemporalType>(); 
    8892         
     
    387391        public void setScn(Integer scn) { 
    388392                this.scn = scn; 
     393        } 
     394         
     395        public String getDataFormats() { 
     396                return dataFormats; 
     397        } 
     398 
     399        public void setDataFormats(String dataFormats) { 
     400                this.dataFormats = dataFormats; 
     401        } 
     402         
     403        public String getDataFormatsTsVector() { 
     404                return dataFormatsTsVector; 
     405        } 
     406 
     407        public void setDataFormatsTsVector(String dataFormatsTsVector) { 
     408                this.dataFormatsTsVector = dataFormatsTsVector; 
    389409        } 
    390410 
Note: See TracChangeset for help on using the changeset viewer.