Project

General

Profile

Revision 5af794eb

ID5af794ebfc17d8f23f7fe4a33d6509c211972c5a
Parent f7d60a17
Child 4ebd1ae8

Added by Andreas Müller 10 months ago

cleanup and add CdmRegEx

View differences:

cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/CdmRegEx.java
1
/**
2
* Copyright (C) 2020 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.common;
10

  
11
/**
12
 * @author a.mueller
13
 * @since 20.01.2020
14
 */
15
public class CdmRegEx {
16

  
17
    public static String UUID_RE = "[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}";
18

  
19
}
cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/CdmUtils.java
58 58
    }
59 59

  
60 60
    /**
61
     * Returns the an InputStream for a read-only source
61
     * Returns an InputStream for a read-only source
62 62
     * @param resourceFileName the resources path within the classpath(!)
63 63
     * @return
64 64
     * @throws IOException
......
94 94
    }
95 95

  
96 96
    static public String readInputLine(String inputQuestion){
97
        try {
98 97

  
98
        try {
99 99
            System.out.print(inputQuestion);
100
            BufferedReader in = new BufferedReader( new java.io.InputStreamReader( System.in ));
100
            BufferedReader in = new BufferedReader( new InputStreamReader( System.in ));
101 101
            String input;
102 102
            input = in.readLine();
103 103
            return input;
......
107 107
        }
108 108
    }
109 109

  
110

  
111 110
    /**
112 111
     * Returns the trimmed value string if value is not <code>null</code>.
113 112
     * Returns the empty string if value is <code>null</code>.
cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/DocUtils.java
26 26
 * @author c.mathew
27 27
 * @since 01-Aug-2012
28 28
 */
29

  
30 29
public class DocUtils {
31 30

  
32 31
    /**
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/TaxonDescription.java
261 261
     */
262 262
    @Override
263 263
    public Object clone() {
264
        TaxonDescription result;
265
        result = (TaxonDescription)super.clone();
264
        TaxonDescription result = (TaxonDescription)super.clone();
266 265

  
267 266
        //scopes
268 267
        result.scopes = new HashSet<>();
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/TaxonNode.java
549 549
    @Override
550 550
    public boolean deleteChildNode(TaxonNode node) {
551 551
        boolean result = removeChildNode(node);
552
        Taxon taxon = HibernateProxyHelper.deproxy(node.getTaxon());
553
        node = HibernateProxyHelper.deproxy(node);
552
        Taxon taxon = deproxy(node.getTaxon());
553
        node = deproxy(node);
554 554
        node.setTaxon(null);
555 555

  
556 556
        ArrayList<TaxonNode> childNodes = new ArrayList<>(node.getChildNodes());
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
606 606
    @Transactional(readOnly = false)
607 607
    public DeleteResult deleteTaxonNode(UUID nodeUUID, TaxonDeletionConfigurator config) {
608 608

  
609
    	TaxonNode node = HibernateProxyHelper.deproxy(dao.load(nodeUUID), TaxonNode.class);
609
    	TaxonNode node = CdmBase.deproxy(dao.load(nodeUUID));
610 610
    	return deleteTaxonNode(node, config);
611 611
    }
612 612

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)