Project

General

Profile

Revision 5cf8568b

ID5cf8568b6575f252af4a6cc732514fa8a6989b68
Parent 1abedc74
Child a84bf85f

Added by Andreas Kohlbecker over 8 years ago

controller method to find description elements by feature, a new property editor and some cleaning up controllers

View differences:

.gitattributes
1699 1699
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DerivedUnitFacadePortalController.java -text
1700 1700
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionController.java -text
1701 1701
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionListController.java -text
1702
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionListPortalController.java -text
1702 1703
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionPortalController.java -text
1703 1704
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/EventBaseController.java -text
1704 1705
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/FeatureListController.java -text
......
1839 1840
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/RankPropertyEditor.java -text
1840 1841
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/RectanglePropertyEditor.java -text
1841 1842
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/SetSpecEditor.java -text
1843
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/TermBasePropertyEditor.java -text
1842 1844
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/UUIDListPropertyEditor.java -text
1843 1845
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/UUIDPropertyEditor.java -text
1844 1846
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/UuidList.java -text
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionController.java
25 25
import org.springframework.web.bind.annotation.PathVariable;
26 26
import org.springframework.web.bind.annotation.RequestMapping;
27 27
import org.springframework.web.bind.annotation.RequestMethod;
28
import org.springframework.web.bind.annotation.RequestParam;
29 28
import org.springframework.web.servlet.ModelAndView;
30 29

  
31 30
import eu.etaxonomy.cdm.api.service.IDescriptionService;
......
42 41
import eu.etaxonomy.cdm.model.description.TaxonDescription;
43 42
import eu.etaxonomy.cdm.model.description.TextData;
44 43
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
45
import eu.etaxonomy.cdm.persistence.query.MatchMode;
46
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
47 44
import eu.etaxonomy.cdm.remote.editor.NamedAreaLevelPropertyEditor;
48 45
import eu.etaxonomy.cdm.remote.editor.UUIDListPropertyEditor;
49 46
import eu.etaxonomy.cdm.remote.editor.UuidList;
......
94 91
        this.service = service;
95 92
    }
96 93

  
97
    /**
98
     * @param request
99
     * @param response
100
     * @return
101
     * @throws IOException
102
     */
103
//    @RequestMapping(value = {"/featureTree/{uuid}"}, method = RequestMethod.GET)
104
//    public FeatureTree doGetFeatureTree(
105
//            @PathVariable("uuid") UUID uuid,
106
//            HttpServletRequest request,
107
//            HttpServletResponse response)throws IOException {
108
//        FeatureTree featureTree = getCdmBaseInstance(FeatureTree.class, featureTreeService, uuid, response, FEATURETREE_INIT_STRATEGY);
109
//        return featureTree;
110
//    }
94
    @RequestMapping(value = "hasStructuredData", method = RequestMethod.GET)
95
    public ModelAndView doHasStructuredData(
96
            @PathVariable("uuid") UUID uuid,
97
            HttpServletRequest request,
98
            HttpServletResponse response) throws IOException {
99
        logger.info("doHasStructuredData() - " + request.getRequestURI());
100

  
101
        ModelAndView mv = new ModelAndView();
102

  
103
        DescriptionBase description = service.load(uuid);
104

  
105
        if(!(description instanceof TaxonDescription)){
106
            HttpStatusMessage.UUID_REFERENCES_WRONG_TYPE.send(response);
107
            // will terminate thread
108
        }
109

  
110
        boolean hasStructuredData = service.hasStructuredData(description);
111

  
112
        mv.addObject(hasStructuredData);
113
        return mv;
114
    }
111 115

  
112 116
    @RequestMapping(value = "/descriptionElement/{descriptionelement_uuid}", method = RequestMethod.GET)
113 117
    public ModelAndView doGetDescriptionElement(
......
171 175
        return mv;
172 176
    }
173 177

  
174

  
175

  
176
    @RequestMapping(value = "/descriptionElement/find", method = RequestMethod.GET)
177
    public Pager<DescriptionElementBase> doFindDescriptionElements(
178
            @RequestParam(value = "query", required = true) String queryString,
179
            @RequestParam(value = "type", required = false) Class type,
180
            @RequestParam(value = "pageSize", required = false) Integer pageSize,
181
            @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
182
            @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
183
            HttpServletRequest request,
184
            HttpServletResponse response
185
            )
186
             throws IOException {
187

  
188
        logger.info("doFindDescriptionElements : " + request.getRequestURI() + "?" + request.getQueryString() );
189

  
190
        PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
191
        pagerParams.normalizeAndValidate(response);
192

  
193
        Pager<DescriptionElementBase> pager = service.searchElements(type, queryString, pageSize, pageNumber, null, getInitializationStrategy());
194

  
195
        return pager;
196
    }
197

  
198 178
    /*
199 179
    @RequestMapping(value = "{uuid_list}/namedAreaTree", method = RequestMethod.GET)
200 180
    public NamedAreaTree doGetOrderedDistributions(
......
250 230
        return mv;
251 231
    }
252 232

  
253
    @RequestMapping(value = "/description/{uuid}/hasStructuredData", method = RequestMethod.GET)
254
    public ModelAndView doHasStructuredData(
255
            @PathVariable("uuid") UUID uuid,
256
            HttpServletRequest request,
257
            HttpServletResponse response) throws IOException {
258
        logger.info("doHasStructuredData() - " + request.getRequestURI());
259

  
260
        ModelAndView mv = new ModelAndView();
261

  
262
        DescriptionBase description = service.load(uuid);
263

  
264
        if(!(description instanceof TaxonDescription)){
265
            HttpStatusMessage.UUID_REFERENCES_WRONG_TYPE.send(response);
266
            // will terminate thread
267
        }
268

  
269
        boolean hasStructuredData = service.hasStructuredData(description);
270

  
271
        mv.addObject(hasStructuredData);
272

  
273
        return mv;
274
    }
275

  
276 233
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionListController.java
11 11

  
12 12
import java.io.IOException;
13 13
import java.util.Arrays;
14
import java.util.HashSet;
14 15
import java.util.List;
16
import java.util.Set;
15 17
import java.util.UUID;
16 18

  
17 19
import javax.servlet.http.HttpServletRequest;
......
19 21

  
20 22
import org.springframework.beans.factory.annotation.Autowired;
21 23
import org.springframework.stereotype.Controller;
24
import org.springframework.web.bind.WebDataBinder;
25
import org.springframework.web.bind.annotation.InitBinder;
22 26
import org.springframework.web.bind.annotation.RequestMapping;
23 27
import org.springframework.web.bind.annotation.RequestMethod;
24 28
import org.springframework.web.bind.annotation.RequestParam;
......
30 34
import eu.etaxonomy.cdm.api.service.description.TransmissionEngineDistribution.AggregationMode;
31 35
import eu.etaxonomy.cdm.api.service.pager.Pager;
32 36
import eu.etaxonomy.cdm.model.description.DescriptionBase;
37
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
38
import eu.etaxonomy.cdm.model.description.Feature;
33 39
import eu.etaxonomy.cdm.model.location.NamedArea;
34 40
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
35 41
import eu.etaxonomy.cdm.model.location.NamedAreaType;
36 42
import eu.etaxonomy.cdm.model.name.Rank;
43
import eu.etaxonomy.cdm.persistence.query.MatchMode;
37 44
import eu.etaxonomy.cdm.persistence.query.OrderHint;
45
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
38 46
import eu.etaxonomy.cdm.remote.controller.util.ProgressMonitorUtil;
47
import eu.etaxonomy.cdm.remote.editor.TermBasePropertyEditor;
39 48

  
40 49
/**
41 50
 * TODO write controller documentation
......
75 84
        this.service = service;
76 85
    }
77 86

  
87
    @InitBinder
88
    @Override
89
    public void initBinder(WebDataBinder binder) {
90
        super.initBinder(binder);
91
        binder.registerCustomEditor(Feature.class, new TermBasePropertyEditor<Feature>(termService));
92
    }
93

  
94

  
78 95
    @RequestMapping(value = { "accumulateDistributions" }, method = RequestMethod.GET)
79 96
    public ModelAndView doAccumulateDistributions(
80 97
            @RequestParam(value= "mode", required = true) final AggregationMode mode,
......
116 133
        // send redirect "see other"
117 134
        return progressUtil.respondWithMonitor(frontendBaseUrl, request, response, processLabel, transmissionEngineMonitorUuid);
118 135
    }
136

  
137
    /**
138
    *
139
    * @param queryString
140
    * @param type
141
    * @param pageSize
142
    * @param pageNumber
143
    * @param matchMode
144
    * @param request
145
    * @param response
146
    * @return
147
    * @throws IOException
148
    */
149
   @RequestMapping(value = "/descriptionElement/find", method = RequestMethod.GET)
150
   public Pager<DescriptionElementBase> doFindDescriptionElements(
151
           @RequestParam(value = "query", required = true) String queryString,
152
           @RequestParam(value = "type", required = false) Class<? extends DescriptionElementBase> type,
153
           @RequestParam(value = "pageSize", required = false) Integer pageSize,
154
           @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
155
           @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
156
           HttpServletRequest request,
157
           HttpServletResponse response
158
           )
159
            throws IOException {
160

  
161
       logger.info("doFindDescriptionElements : " + request.getRequestURI() + "?" + request.getQueryString() );
162

  
163
       PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
164
       pagerParams.normalizeAndValidate(response);
165

  
166
       Pager<DescriptionElementBase> pager = service.searchElements(type, queryString, pageSize, pageNumber, null, getInitializationStrategy());
167

  
168
       return pager;
169
   }
170

  
171
   @RequestMapping(value = "/descriptionElement", method = RequestMethod.GET)
172
   public Pager<DescriptionElementBase> doPageDescriptionElementsByFeature(
173
           @RequestParam(value = "feature", required = true) Feature feature,
174
           @RequestParam(value = "type", required = false) Class<? extends DescriptionElementBase> type,
175
           @RequestParam(value = "pageSize", required = false) Integer pageSize,
176
           @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
177
           HttpServletRequest request,
178
           HttpServletResponse response
179
           )
180
            throws IOException {
181

  
182
       logger.info("doPageDescriptionElementsByFeature : " + request.getRequestURI() + "?" + request.getQueryString() );
183

  
184
       PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
185
       pagerParams.normalizeAndValidate(response);
186

  
187
       Set<Feature> features = new HashSet<Feature>(1);
188
       features.add(feature);
189

  
190
       Pager<DescriptionElementBase> pager = service.getDescriptionElements(null, features, type, pagerParams.getPageSize(), pagerParams.getPageIndex(), getInitializationStrategy());
191

  
192
       return pager;
193
   }
119 194
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionListPortalController.java
1
// $Id$
2
/**
3
 * Copyright (C) 2009 EDIT 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
7
 * 1.1 See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9

  
10
package eu.etaxonomy.cdm.remote.controller;
11

  
12
import java.io.IOException;
13
import java.util.Arrays;
14
import java.util.HashSet;
15
import java.util.List;
16
import java.util.Set;
17

  
18
import javax.servlet.http.HttpServletRequest;
19
import javax.servlet.http.HttpServletResponse;
20

  
21
import org.springframework.beans.factory.annotation.Autowired;
22
import org.springframework.stereotype.Controller;
23
import org.springframework.web.bind.WebDataBinder;
24
import org.springframework.web.bind.annotation.InitBinder;
25
import org.springframework.web.bind.annotation.RequestMapping;
26
import org.springframework.web.bind.annotation.RequestMethod;
27
import org.springframework.web.bind.annotation.RequestParam;
28

  
29
import eu.etaxonomy.cdm.api.service.IDescriptionService;
30
import eu.etaxonomy.cdm.api.service.ITermService;
31
import eu.etaxonomy.cdm.api.service.pager.Pager;
32
import eu.etaxonomy.cdm.model.description.DescriptionBase;
33
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
34
import eu.etaxonomy.cdm.model.description.Feature;
35
import eu.etaxonomy.cdm.persistence.query.MatchMode;
36
import eu.etaxonomy.cdm.remote.controller.util.PagerParameters;
37
import eu.etaxonomy.cdm.remote.editor.TermBasePropertyEditor;
38

  
39
/**
40
 * IMPORTANT:
41
 *
42
 * This controller is mostly a 1:1 copy of the DescriptionListController
43
 * and this provides identical end points which only differ in the depth of the
44
 * object graphs returned.
45
 * An exception is the doAccumulateDistributions() method, which is not repeated
46
 * here
47
 *
48
 * @author a.kohlbecker
49
 * @date Jun 25, 2013
50
 *
51
 */
52
@Controller
53
@RequestMapping(value = {"/portal/description"})
54
public class DescriptionListPortalController extends IdentifiableListController<DescriptionBase, IDescriptionService> {
55

  
56
    protected static final List<String> DESCRIPTION_INIT_STRATEGY = Arrays.asList(new String []{
57
            "$",
58
            "elements.$",
59
            "elements.sources.citation.authorTeam.$",
60
            "elements.sources.nameUsedInSource.originalNameString",
61
            "elements.area.level",
62
            "elements.modifyingText",
63
            "elements.states.*",
64
            "elements.media",
65
    });
66

  
67

  
68
    public DescriptionListPortalController() {
69
        super();
70
        setInitializationStrategy(DESCRIPTION_INIT_STRATEGY);
71
    }
72

  
73

  
74
    @Autowired
75
    private ITermService termService;
76

  
77
    /* (non-Javadoc)
78
     * @see eu.etaxonomy.cdm.remote.controller.BaseListController#setService(eu.etaxonomy.cdm.api.service.IService)
79
     */
80
    @Override
81
    @Autowired
82
    public void setService(IDescriptionService service) {
83
        this.service = service;
84
    }
85

  
86
    @InitBinder
87
    @Override
88
    public void initBinder(WebDataBinder binder) {
89
        super.initBinder(binder);
90
        binder.registerCustomEditor(Feature.class, new TermBasePropertyEditor<Feature>(termService));
91
    }
92

  
93
    /**
94
    *
95
    * @param queryString
96
    * @param type
97
    * @param pageSize
98
    * @param pageNumber
99
    * @param matchMode
100
    * @param request
101
    * @param response
102
    * @return
103
    * @throws IOException
104
    */
105
   @RequestMapping(value = "/portal/descriptionElement/find", method = RequestMethod.GET)
106
   public Pager<DescriptionElementBase> doFindDescriptionElements(
107
           @RequestParam(value = "query", required = true) String queryString,
108
           @RequestParam(value = "type", required = false) Class<? extends DescriptionElementBase> type,
109
           @RequestParam(value = "pageSize", required = false) Integer pageSize,
110
           @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
111
           @RequestParam(value = "matchMode", required = false) MatchMode matchMode,
112
           HttpServletRequest request,
113
           HttpServletResponse response
114
           )
115
            throws IOException {
116

  
117
       logger.info("doFindDescriptionElements : " + request.getRequestURI() + "?" + request.getQueryString() );
118

  
119
       PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
120
       pagerParams.normalizeAndValidate(response);
121

  
122
       Pager<DescriptionElementBase> pager = service.searchElements(type, queryString, pageSize, pageNumber, null, getInitializationStrategy());
123

  
124
       return pager;
125
   }
126

  
127
   @RequestMapping(value = "/portal/descriptionElement", method = RequestMethod.GET)
128
   public Pager<DescriptionElementBase> doPageDescriptionElementsByFeature(
129
           @RequestParam(value = "feature", required = true) Feature feature,
130
           @RequestParam(value = "type", required = false) Class<? extends DescriptionElementBase> type,
131
           @RequestParam(value = "pageSize", required = false) Integer pageSize,
132
           @RequestParam(value = "pageNumber", required = false) Integer pageNumber,
133
           HttpServletRequest request,
134
           HttpServletResponse response
135
           )
136
            throws IOException {
137

  
138
       logger.info("doPageDescriptionElementsByFeature : " + request.getRequestURI() + "?" + request.getQueryString() );
139

  
140
       PagerParameters pagerParams = new PagerParameters(pageSize, pageNumber);
141
       pagerParams.normalizeAndValidate(response);
142

  
143
       Set<Feature> features = new HashSet<Feature>(1);
144
       features.add(feature);
145

  
146
       Pager<DescriptionElementBase> pager = service.getDescriptionElements(null, features, type, pagerParams.getPageSize(), pagerParams.getPageIndex(), getInitializationStrategy());
147

  
148
       return pager;
149
   }
150
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/DescriptionPortalController.java
43 43
import eu.etaxonomy.cdm.remote.editor.UuidList;
44 44

  
45 45
/**
46
 * TODO write controller documentation
46
 * IMPORTANT:
47
 *
48
 * This controller is mostly a 1:1 copy of the DescriptionController
49
 * and this provides identical end points which only differ in the depth of the
50
 * object graphs returned.
47 51
 *
48 52
 * @author a.kohlbecker
49
 * @date 24.03.2009
53
 * @date Jun 25, 2013
54
 *
50 55
 */
51

  
52 56
@Controller
53 57
@RequestMapping(value = {
54 58
            "/portal/description/{uuid}",
......
56 60
            "/portal/descriptionElement/{descriptionelement_uuid}"})
57 61
public class DescriptionPortalController extends BaseController<DescriptionBase, IDescriptionService>
58 62
{
59
    private static final List<String> DESCRIPTIONS_DISTRIBUTION_INIT_STRATEGY = Arrays.asList(new String []{
60
            "elements.sources.citation.$",
61
            "elements.area.$",
62
            });
63 63

  
64 64
    protected static final List<String> DESCRIPTION_INIT_STRATEGY = Arrays.asList(new String []{
65 65
            "$",
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/CdmTypePropertyEditor.java
13 13
import java.beans.PropertyEditorSupport;
14 14

  
15 15
import org.apache.log4j.Logger;
16
import org.springframework.stereotype.Component;
17 16

  
18 17
/**
19 18
 * @author a.kohlbecker
20 19
 * @date 30.06.2009
21 20
 */
22
@Component
23 21
public class CdmTypePropertyEditor extends PropertyEditorSupport  {
24 22

  
25 23
    public static final Logger logger = Logger.getLogger(CdmTypePropertyEditor.class);
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/NamedAreaLevelPropertyEditor.java
2 2

  
3 3
import java.beans.PropertyEditorSupport;
4 4

  
5
import org.springframework.stereotype.Component;
6

  
7 5
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
8 6

  
9 7
/**
10 8
 * @author f.revilla
11 9
 * @date 09.06.2010
12 10
 */
13
@Component
14 11
public class NamedAreaLevelPropertyEditor extends PropertyEditorSupport {
15
	public void setAsText(String text) {
12
	@Override
13
    public void setAsText(String text) {
16 14
		NamedAreaLevel value = new NamedAreaLevel();
17 15
		if (NamedAreaLevel.isTDWG_LEVEL1(text)) {
18 16
			value = NamedAreaLevel.TDWG_LEVEL1();
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/NamedAreaPropertyEditor.java
1 1
// $Id: NamedAreaPropertyEditor.java 8450 2010-03-19 15:12:17Z a.kohlbecker $
2 2
/**
3 3
 * Copyright (C) 2009 EDIT
4
 * European Distributed Institute of Taxonomy 
4
 * European Distributed Institute of Taxonomy
5 5
 * http://www.e-taxonomy.eu
6
 * 
6
 *
7 7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 8
 * See LICENSE.TXT at the top of this package for the full license terms.
9 9
 */
......
12 12

  
13 13
import java.beans.PropertyEditorSupport;
14 14

  
15
import org.springframework.stereotype.Component;
16

  
17 15
import eu.etaxonomy.cdm.model.location.TdwgArea;
18 16

  
19 17
/**
......
21 19
 * @date 30.06.2009
22 20
 * TODO only TDWG areas supported for now
23 21
 */
24
@Component
25 22
public class NamedAreaPropertyEditor extends PropertyEditorSupport  {
26
	
27
	public void setAsText(String text) {
28
			setValue(TdwgArea.getAreaByTdwgAbbreviation(text));  	
23

  
24
	@Override
25
    public void setAsText(String text) {
26
			setValue(TdwgArea.getAreaByTdwgAbbreviation(text));
29 27
	}
30 28
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/editor/TermBasePropertyEditor.java
1
/**
2
 * Copyright (C) 2013 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.remote.editor;
10

  
11
import java.beans.PropertyEditorSupport;
12
import java.util.UUID;
13

  
14
import eu.etaxonomy.cdm.api.service.ITermService;
15
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
16

  
17
/**
18
 * @author a.kohlbecker
19
 * @date Jun 25, 2013
20
 *
21
 */
22
public class TermBasePropertyEditor<T extends DefinedTermBase<?>> extends PropertyEditorSupport {
23

  
24
    private final ITermService termService;
25

  
26
    public TermBasePropertyEditor(ITermService termService){
27
        super();
28
        this.termService = termService;
29
    }
30

  
31
    @SuppressWarnings("unchecked")
32
    @Override
33
    public void setAsText(String text) {
34

  
35
        T term = null;
36
        // 1. try treating as UUID
37
        try {
38
            UUID uuid = UUID.fromString(text);
39
            term = (T) termService.load(uuid);
40
        } catch (Exception e1) {
41
         // 1. try treating as ID
42
            try {
43
                int id = Integer.parseInt(text);
44
                term = (T) termService.find(id);
45
            } catch (Exception e2) {
46
                /* IGNORE */
47
            }
48
        }
49

  
50
        if(term == null){
51
            throw new java.lang.IllegalArgumentException("No TermBase instance found for the supplied identifier " + text);
52
        }
53

  
54
        setValue(term);
55
    }
56

  
57
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)