• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/trunk/components/common/src/ome/api/ITypes.java

Revision 2217, 3.9 kB (checked in by ola, 9 months ago)

r2213

  • Property svn:keywords set to
    Date
    Revision
    Id
    URL
Line 
1/*
2 * ome.api.ITypes
3 *
4 *   Copyright 2006 University of Dundee. All rights reserved.
5 *   Use is subject to license terms supplied in LICENSE.txt
6 */
7
8package ome.api;
9
10// Java imports
11import java.util.List;
12import java.util.Map;
13
14import ome.annotations.NotNull;
15import ome.annotations.Validate;
16import ome.conditions.ApiUsageException;
17import ome.model.IAnnotated;
18import ome.model.IEnum;
19
20/**
21 * Access to reflective type information. Also provides simplified access to
22 * special types like enumerations.
23 *
24 * @author Josh Moore &nbsp;&nbsp;&nbsp;&nbsp; <a
25 *         href="mailto:josh.moore@gmx.de">josh.moore@gmx.de</a>
26 * @version 3.0 <small> (<b>Internal version:</b> $$) </small>
27 * @since OMERO3
28 */
29
30public interface ITypes extends ServiceInterface {
31
32    /**
33     * Returns a list of classes which implement {@link IAnnotated}. These can
34     * be used in combination with {@link ome.api.Search}.
35     *
36     * @return
37     */
38    List<Class<IAnnotated>> getAnnotationTypes();
39
40    <T extends IEnum> T createEnumeration(T newEnum);
41
42    <T extends IEnum> List<T> allEnumerations(Class<T> k);
43
44    /**
45     * lookup an enumeration value. As with the get-methods of {@link IQuery}
46     * queries returning no results will through an exception.
47     *
48     * @param <T>
49     *            The type of the enumeration. Must extend {@link IEnum}
50     * @param k
51     *            An enumeration class which should be searched.
52     * @param string
53     *            The value for which an enumeration should be found.
54     * @return A managed enumeration. Never null.
55     * @throws ApiUsageException
56     *             if {@link IEnum} is not found.
57     */
58    <T extends IEnum> T getEnumeration(Class<T> k, String string);
59
60    /**
61     * updates enumeration value specified by object
62     *
63     * @param <T>
64     *            The type of the enumeration. Must extend {@link IEnum}
65     * @param oEnum
66     *            An enumeration object which should be searched.
67     * @return A managed enumeration. Never null.
68     */
69    <T extends IEnum> T updateEnumeration(@NotNull
70    T oEnum);
71
72    /**
73     * updates enumeration value specified by object
74     *
75     * @param <T>
76     *            The type of the enumeration. Must extend {@link IEnum}
77     * @param listEnum
78     *            An enumeration collection of objects which should be searched.
79     * @return A managed enumeration. Never null.
80     */
81    <T extends IEnum> void updateEnumerations(@NotNull
82    @Validate(IEnum.class)
83    List<T> listEnum);
84
85    /**
86     * deletes enumeration value specified by object
87     *
88     * @param <T>
89     *            The type of the enumeration. Must extend {@link IEnum}
90     * @param oEnum
91     *            An enumeration object which should be searched.
92     */
93    <T extends IEnum> void deleteEnumeration(@NotNull
94    T oEnum);
95
96    /**
97     * Gets all original values.
98     *
99     * @param <T>
100     *            The type of the enumeration. Must extend {@link IEnum}
101     * @return A list of managed enumerations.
102     * @throws RuntimeException
103     *             if xml parsing failure.
104     */
105    <T extends IEnum> List<T> getOriginalEnumerations();
106
107    <T extends IEnum> void resetEnumerations(Class<T> klass);
108
109    /**
110     * Gets all metadata classes which are IEnum type.
111     *
112     * @param <T>
113     *            The type of the enumeration. Must extend {@link IEnum}
114     * @return list of Class of T extends IEnum
115     * @throws RuntimeException
116     *             if Class not found.
117     */
118    <T extends IEnum> List<Class<T>> getEnumerationTypes();
119
120    /**
121     * Gets all metadata classes which are IEnum type with contained objects.
122     *
123     * @param <T>
124     *            The type of the enumeration. Must extend {@link IEnum}
125     * @return list of Class of T extends IEnum
126     * @throws RuntimeException
127     *             if xml parsing failure.
128     */
129    <T extends IEnum> Map<Class<T>, List<T>> getEnumerationsWithEntries();
130
131}
Note: See TracBrowser for help on using the browser.

Download in other formats:

  • Plain Text
  • Original Format

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/