List of usage examples for java.util Vector Vector
public Vector()
From source file:com.cloudbase.datacommands.CBDataAggregationCommandGroup.java
public CBDataAggregationCommandGroup() { this.idFields = new Vector(); this.groupFields = new Hashtable(); this.setCommandType(CBDataAggregationCommandType.CBDataAggregationGroup); }
From source file:core.reporting.ImportFromFile.java
public ImportFromFile(Record rmod, String coldeff) { super("title_imporFromfile"); this.recordModel = rmod; this.columnModelDef = coldeff; this.tempBuffer = new Vector<Record>(); this.saveAction = new SaveAction(this); saveAction.setEnabled(false);/*from w ww. j av a 2s.com*/ this.refreshAction = new TAbstractAction(TAbstractAction.TABLE_SCOPE) { @Override public void actionPerformed(ActionEvent arg0) { validateCSVFile(); } }; refreshAction.setIcon("RefreshAction"); refreshAction.setToolTip("ttaction.RefreshAction"); setToolBar(false, new NativeFileChooser(NativeFileChooser.OPEN_STYLE, this), refreshAction, saveAction); putClientProperty(TConstants.JTABLE_AUTO_RESIZE_MODE, JTable.AUTO_RESIZE_OFF); addPropertyChangeListener(this); String fldl = "<ol>"; File f = TResourceUtils.getFile(columnModelDef + ".csv"); try { BufferedReader br = new BufferedReader(new FileReader(f)); String lin = br.readLine(); while ((lin = br.readLine()) != null) { fldl += "<li>" + lin.split("[,]")[0]; } fldl += "</ol>"; setMessage("inputfile.msg01", fldl); setView(TABLE_VIEW); setVisibleToolBar(true); } catch (Exception e) { setMessage("inputfile.msg06", f); SystemLog.logException(e); } }
From source file:com.github.tncardoso.kloutapi.KloutParser.java
/** * Parse user show response and return klout user objects. * /*from ww w . jav a 2s . co m*/ * @param json * content to be parsed * @return list containing klout users * @throws JSONException * @throws KloutException */ public static List<KloutUser> show(String json) throws JSONException, KloutException { JSONObject respJson = new JSONObject(json); int status = respJson.getInt("status"); if (status != 200) { throw new KloutException("Status error: " + status); } List<KloutUser> ret = new Vector<KloutUser>(); JSONArray usersScore = respJson.getJSONArray("users"); for (int i = 0; i < usersScore.length(); i++) { JSONObject cUser = usersScore.getJSONObject(i); KloutUser ku = new KloutUser(); ku.setTwitterId(cUser.getString("twitter_id")); ku.setTwitterScreenName(cUser.getString("twitter_screen_name")); JSONObject score = cUser.getJSONObject("score"); ku.setKscore(score.getDouble("kscore")); ku.setSlope(score.getDouble("slope")); ku.setDescription(score.getString("description")); ku.setKclassId(score.getInt("kclass_id")); ku.setKclass(score.getString("kclass")); ku.setKclassDescription(score.getString("kclass_description")); ku.setKscoreDescription(score.getString("kscore_description")); ku.setNetworkScore(score.getDouble("network_score")); ku.setAmplificationScore(score.getDouble("amplification_score")); ku.setTrueReach(score.getInt("true_reach")); ku.setDelta1day(score.getDouble("delta_1day")); ku.setDelta5day(score.getDouble("delta_5day")); ret.add(ku); } return ret; }
From source file:de.betterform.xml.xforms.model.constraints.DependencyGraph.java
/** * Creates a new DependencyGraph object. */ public DependencyGraph() { this.vertices = new Vector(); }
From source file:com.redhat.rhn.frontend.servlets.test.CreateRedirectURITest.java
protected void setUp() throws Exception { super.setUp(); mockRequest = mock(HttpServletRequest.class); mockRequest.stubs().method("getParameterNames").will(returnValue(new Vector<String>().elements())); mockRequest.stubs().method("getRequestURI").will(returnValue("/YourRhn.do")); }
From source file:Accounts.java
private void loadAccounts() { Vector v = new Vector(); try {//from w w w. j a v a 2 s .c o m Statement statement = connection.createStatement(); ResultSet rs = statement.executeQuery("SELECT acc_id FROM acc_acc"); while (rs.next()) { v.addElement(rs.getString("acc_id")); } rs.close(); } catch (SQLException e) { displaySQLErrors(e); } accountNumberList.setListData(v); }
From source file:de.betterform.connector.http.ssl.BetterFORMKeyStoreManager.java
private void initBetterFORMKeyStoreManager() throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException { this.customX509KeyManagers = new Vector<X509KeyManager>(); this.javaDefaultKeyManager = getJavaDefaultKeyManager(); }
From source file:fr.univrouen.poste.web.admin.CurrentSessionsController.java
@RequestMapping public String getCurrentSessions(Model uiModel) throws IOException { List<String> sessions = new Vector<String>(); List<Object> principals = sessionRegistry.getAllPrincipals(); for (Object p : principals) { if (p instanceof User) { sessions.add(((User) p).getUsername()); }// w w w . j ava 2s . co m } uiModel.addAttribute("sessions", sessions); return "admin/currentsessions"; }
From source file:com.orange.atk.graphAnalyser.GraphMarker.java
public GraphMarker(XYPlot xyplot, Vector<Action> Vectaction, Paint color) { if (Vectaction == null) this.Vectaction = new Vector<Action>(); else/*from w ww . j a v a 2 s .c om*/ this.Vectaction = Vectaction; this.color = color; this.xyplot = xyplot; }
From source file:com.nokia.example.musicexplorer.data.model.AlbumModel.java
/** * Constructs an AlbumModel based on the given JSONObject. * * @param album//from w w w . ja v a 2 s .c o m * @throws JSONException */ public AlbumModel(JSONObject album) throws JSONException { super(album); try { byVariousArtists = album.getBoolean("variousartists"); } catch (JSONException e) { L.e("Could not determine if album is from various artists.", "", e); } this.tracks = new Vector(); }