Changeset 638

Show
Ignore:
Timestamp:
16-04-12 14:23:17 (2 years ago)
Author:
rob.hooft@…
Message:
  • More final variables
Location:
trunk/code/conceptwiki
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/code/conceptwiki/common/common-api/src/main/java/nl/nbic/conceptwiki/common/impl/ConceptImpl.java

    r525 r638  
    276276         * @return  the builder instance this method was called on. 
    277277         */ 
    278         public Builder deleted(boolean isDeleted) { 
     278        public Builder deleted(final boolean isDeleted) { 
    279279            this.deleted = isDeleted; 
    280280            return this; 
  • trunk/code/conceptwiki/exports/exports-mapping-uri/src/main/java/nl/nbic/conceptwiki/exports/uri_mapping/URIMapping.java

    r489 r638  
    2929     * @param args the command line arguments 
    3030     */ 
    31     public static void main(String[] args) { 
    32         ApplicationContext ctx = new ClassPathXmlApplicationContext(CONTEXT_CONFIGURATION); 
    33         URIMapping mapping = ctx.getBean(URIMapping.class); 
     31    public static void main(final String[] args) { 
     32        final ApplicationContext ctx = new ClassPathXmlApplicationContext(CONTEXT_CONFIGURATION); 
     33        final URIMapping mapping = ctx.getBean(URIMapping.class); 
    3434        mapping.run(); 
    3535    } 
  • trunk/code/conceptwiki/imports/imports-chemspider/src/main/java/nl/nbic/conceptwiki/imports/chemspider/ChemSpiderImport.java

    r636 r638  
    290290         
    291291        final ChemspiderEntry entry = entries.get(st.getSubject()); 
    292         String objectValue = st.getObject().stringValue(); 
     292        final String objectValue = st.getObject().stringValue(); 
    293293         
    294294        switch (ChemspiderPredicate.valueOf(st.getPredicate().getLocalName().toUpperCase())) { 
  • trunk/code/conceptwiki/imports/imports-common/src/main/java/nl/nbic/conceptwiki/imports/common/AbstractImportProducer.java

    r513 r638  
    4646        jms.send(new MessageCreator() { 
    4747 
    48             public Message createMessage(Session session) throws JMSException { 
     48            public Message createMessage(final Session session) throws JMSException { 
    4949                final Message msg = converter.toMessage(payload, session); 
    5050                msg.setJMSType(type.toString()); 
  • trunk/code/conceptwiki/imports/imports-common/src/main/java/nl/nbic/conceptwiki/imports/common/ConceptWikiConsumer.java

    r513 r638  
    5353 
    5454    @Override 
    55     public void onMessage(Message msg) { 
     55    public void onMessage(final Message msg) { 
    5656        try { 
    5757            System.err.println("onMessage"); 
    5858            Concept receivedConcept; 
    5959            Concept existingConcept; 
    60             MessageType type = MessageType.valueOf(msg.getJMSType()); 
     60            final MessageType type = MessageType.valueOf(msg.getJMSType()); 
    6161            switch (type) { 
    6262                case CREATE_OR_UPDATE: 
     
    8787                    throw new UnsupportedOperationException("Not supported yet."); 
    8888            } 
    89         } catch (JMSException ex) { 
     89        } catch (final JMSException ex) { 
    9090            // Log the error 
    9191            // TODO decide on further handling. 
     
    9898     * @param branch the Branch. 
    9999     */ 
    100     private synchronized void setBranch(Branch branch) { 
     100    private synchronized void setBranch(final Branch branch) { 
    101101        this.branch = branch; 
    102102    } 
  • trunk/code/conceptwiki/imports/imports-umls/src/main/java/nl/nbic/conceptwiki/imports/umls/UMLSImport.java

    r628 r638  
    424424                // addLabel 
    425425                // API already :-) 
    426                 Set<Concept> sources = Sets.newHashSet(); 
     426                final Set<Concept> sources = Sets.newHashSet(); 
    427427                sources.add(conceptsUMLSSources.get(sourceName));                
    428428                //FIXME: enable the following code to run the complete UMLS import 
     
    462462            } 
    463463 
    464             Concept umlsConcept = getUMLSConcept(thisCUI); 
     464            final Concept umlsConcept = getUMLSConcept(thisCUI); 
    465465             
    466466            if (umlsConcept != null) { 
     
    495495                        .notations(notations).urls(urls).build(); 
    496496                                 
    497                 Concept newUmlsConcept = conceptService.createConcept(concept, 
     497                final Concept newUmlsConcept = conceptService.createConcept(concept, 
    498498                        nlmBranch.getId()); 
    499499            } 
     
    546546                        getUMLSConcept(cui); 
    547547                 
    548                 Set<Concept> sources = Sets.newHashSet(); 
     548                final Set<Concept> sources = Sets.newHashSet(); 
    549549                sources.add(conceptsUMLSSources.get(sourceName)); 
    550550                 
     
    820820 
    821821            while (counter < cocCount) { 
    822                 Transaction tx = graphTemplate.getGraphDb().beginTx(); 
     822                final Transaction tx = graphTemplate.getGraphDb().beginTx(); 
    823823                LOGGER.info("counter: {}", counter); 
    824824 
     
    973973                        "SELECT ui, sty_rl, def FROM SRDEF WHERE rt='STY'"); 
    974974        // Create the source of UMLS Semantic Network Semantic Types concept 
    975         Set<Concept> sources = Sets.newHashSet(); 
     975        final Set<Concept> sources = Sets.newHashSet(); 
    976976        sources.add(collectionConceptUMLSSemanticNetworkSemanticTypes); 
    977977 
     
    11101110         
    11111111        for (String tui: conceptsSemanticNetworkNodeTypesWithID.keySet()) { 
    1112             Concept snNodeConcept = conceptsSemanticNetworkNodeTypesWithID.get(tui); 
     1112            final Concept snNodeConcept = conceptsSemanticNetworkNodeTypesWithID.get(tui); 
    11131113            tagStorageService.createTag(snNodeConcept.getUuid()); 
    11141114        } 
    11151115         
    11161116        for (String tui: conceptsSemanticNetworkRelationTypesWithID.keySet()) { 
    1117             Concept snRelationConcept = conceptsSemanticNetworkRelationTypesWithID.get(tui); 
     1117            final Concept snRelationConcept = conceptsSemanticNetworkRelationTypesWithID.get(tui); 
    11181118            tagStorageService.createTag(snRelationConcept.getUuid()); 
    11191119        } 
     
    12231223        final Transaction tx = graphTemplate.getGraphDb().beginTx(); 
    12241224         
    1225         Concept result = getOrCreateConceptWithOnePreferredLabel(preferredLabelEng); 
     1225        final Concept result = getOrCreateConceptWithOnePreferredLabel(preferredLabelEng); 
    12261226        tagStorageService.createTag(result.getUuid()); 
    12271227         
     
    12381238     */ 
    12391239    private Concept getUMLSConcept(final String umlsID) { 
    1240         List<Concept> resultConcepts = conceptService.getConceptsByNotation(umlsID, QueryScopeImpl.LITE_SCOPE, 10); 
     1240        final List<Concept> resultConcepts = conceptService.getConceptsByNotation(umlsID, QueryScopeImpl.LITE_SCOPE, 10); 
    12411241        if (resultConcepts.isEmpty()) { 
    12421242            return null; 
  • trunk/code/conceptwiki/imports/imports-umls/src/main/java/nl/nbic/conceptwiki/imports/umls/UMLSLanguageMapper.java

    r439 r638  
    3131    public UMLSLanguageMapper() { 
    3232 
    33         ApplicationContext applicationContext = new ClassPathXmlApplicationContext( 
     33        final ApplicationContext applicationContext = new ClassPathXmlApplicationContext( 
    3434                "/nl/nbic/conceptwiki/imports/imports-umls-context.xml"); 
    3535 
     
    7070     * @return The corresponding <code>Language</code> object. 
    7171     */ 
    72     public Language getLanguageImpl(String UMLSLatCode) { 
     72    public Language getLanguageImpl(final String UMLSLatCode) { 
    7373        return languageMapperForUMLSLat.get(UMLSLatCode); 
    7474    } 
  • trunk/code/conceptwiki/storage/storage-neo4j/src/main/java/nl/nbic/conceptwiki/storage/neo4j/impl/ConceptStorageServiceImpl.java

    r634 r638  
    277277    @Override 
    278278    public List<Concept> getConceptsByLabel(final String text, final QueryScope scope, final int limit, 
    279                                             final Language language, int branchId) { 
     279                                            final Language language, final int branchId) { 
    280280        final Node node = labelStorageService.getLabel(new LabelImpl(LabelType.HIDDEN, text, language)); 
    281281         
  • trunk/code/conceptwiki/storage/storage-solr/src/main/java/nl/nbic/conceptwiki/storage/solr/impl/ConceptSearchServiceImpl.java

    r632 r638  
    139139            // TODO evaluate the use of a explicit commit vs. an (server side) autocommit strategy   
    140140            solrServer.commit(); 
    141         } catch (SolrServerException e) { 
     141        } catch (final SolrServerException e) { 
    142142            logger.warn("{}", e.getLocalizedMessage()); 
    143         } catch (IOException e) { 
     143        } catch (final IOException e) { 
    144144            logger.warn("{}", e.getLocalizedMessage()); 
    145145        }