Mercurial > hg > STI-GWT
view src/econnect/wp3_3/client/core/DataSet.java @ 28:6ec1ab4f897a
Added .toString() to force String output, otherwise this can lead to Type Exceptions (e.g. when an int is returned).
author | Sebastian Kruse <skruse@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 28 Nov 2012 16:56:38 +0100 |
parents | cf06b77a8bbd |
children | 8b58d9bc0bb6 |
line wrap: on
line source
package econnect.wp3_3.client.core; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsArray; /** * Implementation of the wrapper for the DataSet class of the STI JavaScript source */ public class DataSet extends JavaScriptObject { protected DataSet(){ } /** * Initializes a DataSet element * * @param term the term identifier for this data set * @return a DataSet object */ public static native DataSet createDataSet( String term ) /*-{ return new $wnd.DataSet( [], term, 0 ); }-*/; /** * Getter for the term identifier of the DataSet * * @return the term identifier of data set */ public final native String getTermIdentifier() /*-{ return this.termIdentifier; }-*/; public final native String getSource() /*-{ return this.source.toString(); }-*/; /** * Adds an object to this DataSet * * @param object the data object to add */ public final native void addObject( DataObject object ) /*-{ this.objects.push(object); }-*/; /** * Getter for the Array of DataObjects of this DataSet * * @return the array of data objects */ public final native JsArray<DataObject> getObjects() /*-{ return this.objects; }-*/; }