/
IEnumerationProvider.java
74 lines (61 loc) · 2.75 KB
/
IEnumerationProvider.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// IEnumerationProvider.java
//
/*
OME Bio-Formats package for reading and converting biological file formats.
Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package loci.formats.enums;
import java.util.List;
import ome.xml.r201004.enums.Enumeration;
import ome.xml.r201004.enums.EnumerationException;
/**
* Interface for retrieving enumerations for an entity.
*
* <dl><dt><b>Source code:</b></dt>
* <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/bio-formats/src/loci/formats/enums/IEnumerationProvider.java">Trac</a>,
* <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/bio-formats/src/loci/formats/enums/IEnumerationProvider.java">SVN</a></dd></dl>
*/
public interface IEnumerationProvider {
/**
* Retrieve an enumeration for the specified entity and value.
* @return The enumeration corresponding to the given value, according to
* the latest OME-XML schema version. If no enumeration corresponds to the
* given value, null is returned.
*/
<T extends Enumeration> T getEnumeration(Class<T> type, String value)
throws EnumerationException;
/**
* Retrieve an enumeration for the specified entity and value.
* @return The enumeration corresponding to the given value, according to
* the given OME-XML schema version. If no enumeration corresponds to the
* given value, null is returned.
*/
<T extends Enumeration> T getEnumeration(Class<T> type, String value,
String schemaVersion) throws EnumerationException;
/**
* Retrieves all of the enumerations for the specified entity.
* @return The enumerations for the given entity, according to the latest
* OME-XML schema version.
*/
<T extends Enumeration> List<T> getEnumerations(Class<T> type)
throws EnumerationException;
/**
* Retrieves all of the enumerations for the specified entity.
* @return The enumerations for the given entity, according to the given
* OME-XML schema version.
*/
<T extends Enumeration> List<T> getEnumerations(Class<T> type,
String schemaVersion) throws EnumerationException;
}