Project

General

Profile

1
/*
2
 * ClientViewBeanInfo.java
3
 *
4
 * Created on June 25, 2007, 10:24 AM
5
 */
6

    
7
package edu.ucsb.nceas.metacat.clientview;
8

    
9
import java.beans.*;
10

    
11
/**
12
 * @author barteau
13
 */
14
public class ClientViewBeanInfo extends SimpleBeanInfo {
15
    
16
    // Bean descriptor//GEN-FIRST:BeanDescriptor
17
    /*lazy BeanDescriptor*/
18
    private static BeanDescriptor getBdescriptor(){
19
        BeanDescriptor beanDescriptor = new BeanDescriptor  ( edu.ucsb.nceas.metacat.clientview.ClientView.class , null ); // NOI18N
20
        beanDescriptor.setDisplayName ( "Client View" );
21
        beanDescriptor.setShortDescription ( "Client view bean" );//GEN-HEADEREND:BeanDescriptor
22
        
23
        // Here you can add code for customizing the BeanDescriptor.
24
        
25
        return beanDescriptor;     }//GEN-LAST:BeanDescriptor
26
    
27
    
28
    // Property identifiers//GEN-FIRST:Properties
29
    private static final int PROPERTY_action = 0;
30
    private static final int PROPERTY_anyfield = 1;
31
    private static final int PROPERTY_dataFileName = 2;
32
    private static final int PROPERTY_docId = 3;
33
    private static final int PROPERTY_message = 4;
34
    private static final int PROPERTY_metaFileName = 5;
35
    private static final int PROPERTY_organization = 6;
36
    private static final int PROPERTY_password = 7;
37
    private static final int PROPERTY_pathExpr = 8;
38
    private static final int PROPERTY_pathValue = 9;
39
    private static final int PROPERTY_publicAccess = 10;
40
    private static final int PROPERTY_qformat = 11;
41
    private static final int PROPERTY_returnfield = 12;
42
    private static final int PROPERTY_sessionid = 13;
43
    private static final int PROPERTY_username = 14;
44

    
45
    // Property array 
46
    /*lazy PropertyDescriptor*/
47
    private static PropertyDescriptor[] getPdescriptor(){
48
        PropertyDescriptor[] properties = new PropertyDescriptor[15];
49
    
50
        try {
51
            properties[PROPERTY_action] = new PropertyDescriptor ( "action", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getAction", "setAction" ); // NOI18N
52
            properties[PROPERTY_action].setDisplayName ( "Action" );
53
            properties[PROPERTY_action].setShortDescription ( "Server action" );
54
            properties[PROPERTY_anyfield] = new PropertyDescriptor ( "anyfield", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getAnyfield", "setAnyfield" ); // NOI18N
55
            properties[PROPERTY_anyfield].setDisplayName ( "Any Field" );
56
            properties[PROPERTY_anyfield].setShortDescription ( "Search any field for data" );
57
            properties[PROPERTY_dataFileName] = new IndexedPropertyDescriptor ( "dataFileName", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getDataFileName", "setDataFileName", "getDataFileName", "setDataFileName" ); // NOI18N
58
            properties[PROPERTY_dataFileName].setDisplayName ( "Data File" );
59
            properties[PROPERTY_dataFileName].setShortDescription ( "Data file name" );
60
            properties[PROPERTY_docId] = new PropertyDescriptor ( "docId", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getDocId", "setDocId" ); // NOI18N
61
            properties[PROPERTY_docId].setDisplayName ( "Doc ID" );
62
            properties[PROPERTY_docId].setShortDescription ( "Metacat Document Identifier" );
63
            properties[PROPERTY_message] = new IndexedPropertyDescriptor ( "message", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getMessage", "setMessage", "getMessage", "setMessage" ); // NOI18N
64
            properties[PROPERTY_message].setDisplayName ( "Message" );
65
            properties[PROPERTY_message].setShortDescription ( "Server messages" );
66
            properties[PROPERTY_metaFileName] = new PropertyDescriptor ( "metaFileName", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getMetaFileName", "setMetaFileName" ); // NOI18N
67
            properties[PROPERTY_metaFileName].setDisplayName ( "Metadata File" );
68
            properties[PROPERTY_metaFileName].setShortDescription ( "XML metadata file name" );
69
            properties[PROPERTY_organization] = new PropertyDescriptor ( "organization", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getOrganization", "setOrganization" ); // NOI18N
70
            properties[PROPERTY_organization].setDisplayName ( "Organization" );
71
            properties[PROPERTY_organization].setShortDescription ( "User's organization" );
72
            properties[PROPERTY_password] = new PropertyDescriptor ( "password", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getPassword", "setPassword" ); // NOI18N
73
            properties[PROPERTY_password].setDisplayName ( "Password" );
74
            properties[PROPERTY_password].setShortDescription ( "Metacat user password" );
75
            properties[PROPERTY_pathExpr] = new PropertyDescriptor ( "pathExpr", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getPathExpr", "setPathExpr" ); // NOI18N
76
            properties[PROPERTY_pathExpr].setDisplayName ( "Path Expression" );
77
            properties[PROPERTY_pathExpr].setShortDescription ( "Query path expression" );
78
            properties[PROPERTY_pathValue] = new PropertyDescriptor ( "pathValue", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getPathValue", "setPathValue" ); // NOI18N
79
            properties[PROPERTY_pathValue].setDisplayName ( "Path Value" );
80
            properties[PROPERTY_pathValue].setShortDescription ( "Query path comparison value" );
81
            properties[PROPERTY_publicAccess] = new PropertyDescriptor ( "publicAccess", edu.ucsb.nceas.metacat.clientview.ClientView.class, "isPublicAccess", "setPublicAccess" ); // NOI18N
82
            properties[PROPERTY_publicAccess].setDisplayName ( "Public Access" );
83
            properties[PROPERTY_publicAccess].setShortDescription ( "Grant public read access to data package" );
84
            properties[PROPERTY_qformat] = new PropertyDescriptor ( "qformat", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getQformat", "setQformat" ); // NOI18N
85
            properties[PROPERTY_qformat].setDisplayName ( "Format" );
86
            properties[PROPERTY_qformat].setShortDescription ( "Query format" );
87
            properties[PROPERTY_returnfield] = new PropertyDescriptor ( "returnfield", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getReturnfield", "setReturnfield" ); // NOI18N
88
            properties[PROPERTY_returnfield].setDisplayName ( "Return Field" );
89
            properties[PROPERTY_returnfield].setShortDescription ( "Query Return Field" );
90
            properties[PROPERTY_sessionid] = new PropertyDescriptor ( "sessionid", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getSessionid", "setSessionid" ); // NOI18N
91
            properties[PROPERTY_sessionid].setDisplayName ( "Sess ID" );
92
            properties[PROPERTY_sessionid].setShortDescription ( "Http Session Id" );
93
            properties[PROPERTY_username] = new PropertyDescriptor ( "username", edu.ucsb.nceas.metacat.clientview.ClientView.class, "getUsername", "setUsername" ); // NOI18N
94
            properties[PROPERTY_username].setDisplayName ( "User Name" );
95
            properties[PROPERTY_username].setShortDescription ( "Metacat user name" );
96
        }
97
        catch(IntrospectionException e) {
98
            e.printStackTrace();
99
        }//GEN-HEADEREND:Properties
100
        
101
                
102
        return properties;     }//GEN-LAST:Properties
103
    
104
    // EventSet identifiers//GEN-FIRST:Events
105

    
106
    // EventSet array
107
    /*lazy EventSetDescriptor*/
108
    private static EventSetDescriptor[] getEdescriptor(){
109
        EventSetDescriptor[] eventSets = new EventSetDescriptor[0];//GEN-HEADEREND:Events
110
        
111
        // Here you can add code for customizing the event sets array.
112
        
113
        return eventSets;     }//GEN-LAST:Events
114
    
115
    // Method identifiers//GEN-FIRST:Methods
116

    
117
    // Method array 
118
    /*lazy MethodDescriptor*/
119
    private static MethodDescriptor[] getMdescriptor(){
120
        MethodDescriptor[] methods = new MethodDescriptor[0];//GEN-HEADEREND:Methods
121
        
122
        // Here you can add code for customizing the methods array.
123
        
124
        return methods;     }//GEN-LAST:Methods
125
    
126
    
127
    private static final int defaultPropertyIndex = -1;//GEN-BEGIN:Idx
128
    private static final int defaultEventIndex = -1;//GEN-END:Idx
129
    
130
    
131
//GEN-FIRST:Superclass
132
    
133
    // Here you can add code for customizing the Superclass BeanInfo.
134
    
135
//GEN-LAST:Superclass
136
    
137
    /**
138
     * Gets the bean's <code>BeanDescriptor</code>s.
139
     *
140
     * @return BeanDescriptor describing the editable
141
     * properties of this bean.  May return null if the
142
     * information should be obtained by automatic analysis.
143
     */
144
    public BeanDescriptor getBeanDescriptor() {
145
        return getBdescriptor();
146
    }
147
    
148
    /**
149
     * Gets the bean's <code>PropertyDescriptor</code>s.
150
     *
151
     * @return An array of PropertyDescriptors describing the editable
152
     * properties supported by this bean.  May return null if the
153
     * information should be obtained by automatic analysis.
154
     * <p>
155
     * If a property is indexed, then its entry in the result array will
156
     * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
157
     * A client of getPropertyDescriptors can use "instanceof" to check
158
     * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
159
     */
160
    public PropertyDescriptor[] getPropertyDescriptors() {
161
        return getPdescriptor();
162
    }
163
    
164
    /**
165
     * Gets the bean's <code>EventSetDescriptor</code>s.
166
     *
167
     * @return  An array of EventSetDescriptors describing the kinds of
168
     * events fired by this bean.  May return null if the information
169
     * should be obtained by automatic analysis.
170
     */
171
    public EventSetDescriptor[] getEventSetDescriptors() {
172
        return getEdescriptor();
173
    }
174
    
175
    /**
176
     * Gets the bean's <code>MethodDescriptor</code>s.
177
     *
178
     * @return  An array of MethodDescriptors describing the methods
179
     * implemented by this bean.  May return null if the information
180
     * should be obtained by automatic analysis.
181
     */
182
    public MethodDescriptor[] getMethodDescriptors() {
183
        return getMdescriptor();
184
    }
185
    
186
    /**
187
     * A bean may have a "default" property that is the property that will
188
     * mostly commonly be initially chosen for update by human's who are
189
     * customizing the bean.
190
     * @return  Index of default property in the PropertyDescriptor array
191
     * 		returned by getPropertyDescriptors.
192
     * <P>	Returns -1 if there is no default property.
193
     */
194
    public int getDefaultPropertyIndex() {
195
        return defaultPropertyIndex;
196
    }
197
    
198
    /**
199
     * A bean may have a "default" event that is the event that will
200
     * mostly commonly be used by human's when using the bean.
201
     * @return Index of default event in the EventSetDescriptor array
202
     *		returned by getEventSetDescriptors.
203
     * <P>	Returns -1 if there is no default event.
204
     */
205
    public int getDefaultEventIndex() {
206
        return defaultEventIndex;
207
    }
208

    
209
    
210
}
211

    
(2-2/2)