Changeset 8822


Ignore:
Timestamp:
31/10/13 16:39:41 (6 years ago)
Author:
mnagni
Message:

Complete - # 22442: Debug MEDIN DWS SOAP response
 http://team.ceda.ac.uk/trac/ceda/ticket/22442

Location:
mauRepo/revitalizationProject/branches/MEDIN/dpws
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/.project

    r8070 r8822  
    1818                        </arguments> 
    1919                </buildCommand> 
     20                <buildCommand> 
     21                        <name>org.hibernate.eclipse.console.hibernateBuilder</name> 
     22                        <arguments> 
     23                        </arguments> 
     24                </buildCommand> 
    2025        </buildSpec> 
    2126        <natures> 
    2227                <nature>org.eclipse.jdt.core.javanature</nature> 
    2328                <nature>org.eclipse.m2e.core.maven2Nature</nature> 
     29                <nature>org.hibernate.eclipse.console.hibernateNature</nature> 
    2430        </natures> 
    2531</projectDescription> 
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/src/main/java/ndg/services/revitalization/ejb/discovery/DiscoveryService.java

    r8173 r8822  
    131131         
    132132        @Override 
    133         public List<OriginalDocument> presentDocuments(DoPresentType presentType) throws NdgExecutionException {         
     133        public Summary presentDocuments(DoPresentType presentType) throws NdgExecutionException {        
    134134                Connection conn = null; 
    135135                try { 
     
    150150         */ 
    151151        @Override 
    152         public List<OriginalDocument> searchDocuments(DoSearchType searchType) throws NdgExecutionException { 
     152        public Summary searchDocuments(DoSearchType searchType) throws NdgExecutionException { 
    153153                Connection conn = null; 
    154154                try { 
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/src/main/java/ndg/services/revitalization/ejb/discovery/PresentHelper.java

    r8172 r8822  
    6363        } 
    6464 
    65         public List<OriginalDocument> doPresent(DoPresentType presentType) throws NdgSQLException, AssembleQueryException, ResourceNotAvailable { 
     65        public Summary doPresent(DoPresentType presentType) throws NdgSQLException, AssembleQueryException, ResourceNotAvailable { 
    6666                List<String> documentsId = new ArrayList<String>(); 
    6767                for (SimpleDocument doc : presentType.getDocuments()) { 
     
    252252         * @throws NdgException 
    253253         */ 
    254         public List<OriginalDocument> doPresent(List<String> documentsId, RetrieveCriteriaType type) 
     254        public Summary doPresent(List<String> documentsId, RetrieveCriteriaType type) 
    255255                        throws NdgSQLException, AssembleQueryException, ResourceNotAvailable { 
    256256                if (documentsId == null || documentsId.size() == 0) { 
    257                         return new ArrayList<OriginalDocument>(); 
     257                        return new Summary(); 
    258258                }                        
    259259                this.documentsId = documentsId; 
     
    275275                        fillSpatialTemporalData(searchResult); 
    276276                } 
    277                 return searchResult; 
     277                return new Summary(searchResult, searchResult.size()); 
    278278        } 
    279279 
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/src/main/java/ndg/services/revitalization/ejb/discovery/SearchHelper.java

    r8173 r8822  
    7979         *             if cannot access to the database 
    8080         */ 
    81         public List<OriginalDocument> doSearch() throws NdgException, ResourceNotAvailable { 
    82                 List<OriginalDocument> searchResult = null; 
    83                 searchResult = searchDocuments(searchType); 
     81        public Summary doSearch() throws NdgException, ResourceNotAvailable { 
     82                Summary ret = searchDocuments(searchType); 
    8483                if (conn != null) { 
    8584                        try { 
     
    9190                        } 
    9291                } 
    93                 return searchResult; 
     92                return ret; 
    9493        }        
    9594         
     
    103102         *             if an error during the database access 
    104103         **/ 
    105         private List<OriginalDocument> searchDocuments(DoSearchType doSearchType) throws NdgExecutionException, AssembleQueryException, NdgSQLException, ResourceNotAvailable { 
    106                 List<OriginalDocument> res = new ArrayList<OriginalDocument>();          
     104        private Summary searchDocuments(DoSearchType doSearchType) throws NdgExecutionException, AssembleQueryException, NdgSQLException, ResourceNotAvailable {                 
    107105                List<String> toFilter = executeSearch(conn, assembleSearch(doSearchType)); 
    108106 
     
    123121                        toFilter = toFilter.subList((int) start - 1, (int) howMany);             
    124122                        PresentHelper present = new PresentHelper(conn);         
    125                         res = present.doPresent(toFilter, doSearchType.getRetrieveCriteria());                   
     123                        Summary res = present.doPresent(toFilter, doSearchType.getRetrieveCriteria());                   
    126124 
    127125                return res; 
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/src/main/java/ndg/services/revitalization/ejb/interfaces/DiscoveryServiceLocal.java

    r8173 r8822  
    3232 
    3333import javax.ejb.Local; 
    34 import javax.persistence.NoResultException; 
    3534 
    3635import ndg.common.exception.NdgExecutionException; 
    3736import ndg.services.jpa.ListNames; 
    3837import ndg.services.jpa.ListNamesItem; 
    39 import ndg.services.jpa.OriginalDocument; 
     38import ndg.services.revitalization.ejb.discovery.Summary; 
    4039import ndg.services.schemas.revitalization.discovery.DoPresentType; 
    4140import ndg.services.schemas.revitalization.discovery.DoSearchType; 
     
    4847public interface DiscoveryServiceLocal { 
    4948 
    50         public List<OriginalDocument> presentDocuments(DoPresentType presentType) throws NdgExecutionException; 
     49        public Summary presentDocuments(DoPresentType presentType) throws NdgExecutionException; 
    5150         
    52         public List<OriginalDocument> searchDocuments(DoSearchType searchType) throws NdgExecutionException; 
     51        public Summary searchDocuments(DoSearchType searchType) throws NdgExecutionException; 
    5352         
    5453        public List<ListNames> getAllNamesList(); 
  • mauRepo/revitalizationProject/branches/MEDIN/dpws/src/main/java/ndg/services/revitalization/ejb/interfaces/DiscoveryServiceRemote.java

    r8173 r8822  
    3232 
    3333import javax.ejb.Remote; 
    34 import javax.persistence.NoResultException; 
    3534 
    3635import ndg.common.exception.NdgExecutionException; 
    3736import ndg.services.jpa.ListNames; 
    3837import ndg.services.jpa.ListNamesItem; 
    39 import ndg.services.jpa.OriginalDocument; 
     38import ndg.services.revitalization.ejb.discovery.Summary; 
    4039import ndg.services.schemas.revitalization.discovery.DoPresentType; 
    4140import ndg.services.schemas.revitalization.discovery.DoSearchType; 
     
    4847public interface DiscoveryServiceRemote { 
    4948 
    50         public List<OriginalDocument> presentDocuments(DoPresentType presentType) throws NdgExecutionException; 
     49        public Summary presentDocuments(DoPresentType presentType) throws NdgExecutionException; 
    5150         
    52         public List<OriginalDocument> searchDocuments(DoSearchType searchType) throws NdgExecutionException; 
     51        public Summary searchDocuments(DoSearchType searchType) throws NdgExecutionException; 
    5352 
    5453        public List<ListNames> getAllNamesList(); 
Note: See TracChangeset for help on using the changeset viewer.