MCPcopy Create free account
hub / github.com/GateNLP/gate-core / SerialDatastoreViewer

Class SerialDatastoreViewer

src/main/java/gate/gui/SerialDatastoreViewer.java:60–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58import javax.swing.tree.TreePath;
59
60@SuppressWarnings("serial")
61@CreoleResource(name = "Serial Datastore Viewer", guiType = GuiType.LARGE,
62 resourceDisplayed = "gate.persist.SerialDataStore", mainViewer = true)
63public class SerialDatastoreViewer extends JScrollPane implements
64 VisualResource,
65 DatastoreListener {
66
67 public SerialDatastoreViewer() {
68 }
69
70 @Override
71 public void cleanup() {
72 datastore.removeDatastoreListener(this);
73 myHandle = null;
74 datastore = null;
75 }
76
77 /** Accessor for features. */
78 @Override
79 public FeatureMap getFeatures() {
80 return features;
81 }// getFeatures()
82
83 /** Mutator for features */
84 @Override
85 public void setFeatures(FeatureMap features) {
86 this.features = features;
87 }// setFeatures()
88
89 // Parameters utility methods
90 /**
91 * Gets the value of a parameter of this resource.
92 *
93 * @param paramaterName the name of the parameter
94 * @return the current value of the parameter
95 */
96 @Override
97 public Object getParameterValue(String paramaterName)
98 throws ResourceInstantiationException {
99 return AbstractResource.getParameterValue(this, paramaterName);
100 }
101
102 /**
103 * Sets the value for a specified parameter.
104 *
105 * @param paramaterName the name for the parameteer
106 * @param parameterValue the value the parameter will receive
107 */
108 @Override
109 public void setParameterValue(String paramaterName, Object parameterValue)
110 throws ResourceInstantiationException {
111 // get the beaninfo for the resource bean, excluding data about
112 // Object
113 BeanInfo resBeanInf = null;
114 try {
115 resBeanInf = Introspector.getBeanInfo(this.getClass(), Object.class);
116 }
117 catch(Exception e) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected