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_contentStandard = 2;
32
    private static final int PROPERTY_dataFileName = 3;
33
    private static final int PROPERTY_docId = 4;
34
    private static final int PROPERTY_message = 5;
35
    private static final int PROPERTY_metaFileName = 6;
36
    private static final int PROPERTY_organization = 7;
37
    private static final int PROPERTY_password = 8;
38
    private static final int PROPERTY_pathExpr = 9;
39
    private static final int PROPERTY_pathValue = 10;
40
    private static final int PROPERTY_publicAccess = 11;
41
    private static final int PROPERTY_qformat = 12;
42
    private static final int PROPERTY_returnfield = 13;
43
    private static final int PROPERTY_sessionid = 14;
44
    private static final int PROPERTY_username = 15;
45

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

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

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

    
213
    
214
}
215

    
(4-4/5)