Package net.sourceforge.squirrel_sql.fw.xml

Examples of net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader


  public static SquirrelPreferences load()
  {
    File prefsFile = new ApplicationFiles().getUserPreferencesFile();
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(prefsFile);
      Iterator it = doc.iterator();
      if (it.hasNext())
      {
        return (SquirrelPreferences)it.next();

      }
View Full Code Here


  @SuppressWarnings("unchecked")
  private void loadSQLHistory()
  {
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new ApplicationFiles().getUserSQLHistoryFile());
      Iterator it = doc.iterator();
      if (it.hasNext())
      {
        _sqlHistory = (SQLHistory) it.next();
      }
    }
View Full Code Here

  private void loadCellImportExportInfo()
  {
    CellImportExportInfoSaver saverInstance = null;
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new ApplicationFiles().getCellImportExportSelectionsFile());
      Iterator it = doc.iterator();
      if (it.hasNext())
      {
        saverInstance = (CellImportExportInfoSaver) it.next();
      }
    }
View Full Code Here

  private void loadEditWhereColsInfo()
  {

    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new ApplicationFiles().getEditWhereColsFile());
      Iterator it = doc.iterator();
      if (it.hasNext())
      {
        editWhereCols = (EditWhereCols) it.next();
        editWhereCols.setApplication(this);
      }
View Full Code Here

  private void loadDTProperties()
  {
    DTProperties saverInstance = null;
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new ApplicationFiles().getDTPropertiesFile());
      Iterator<Object> it = doc.iterator();
      if (it.hasNext())
      {
        saverInstance = (DTProperties) it.next();
        DTProperties x = saverInstance;
      }
View Full Code Here

    /**
     * Load from preferences file.
     */
    private void loadPrefs() {
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, _prefs.getClass().getClassLoader());
                       
            Iterator<Object> it = doc.iterator();
           
            if (it.hasNext()) {
                _prefs = (IQueryTokenizerPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
View Full Code Here

    boolean result = false;
    try
    {
      if (file.exists() && file.length() > 0)
      {
        XMLBeanReader rdr = new XMLBeanReader();
        rdr.load(file);
        AliasFolderState rootState = (AliasFolderState) rdr.iterator().next();
        applyAliasFolderState(root, rootState);
        result = true;
      }
    }
    catch (Exception e)
View Full Code Here

  protected void load() throws IOException
  {
    replacements.clear();
    try
    {
      final XMLBeanReader xmlin = new XMLBeanReader();

      if (replacementFile.exists())
      {
        xmlin.load(replacementFile, getClass().getClassLoader());
        for (final Object bean : xmlin)
        {
          if (bean instanceof Replacement)
          {
            replacements.add((Replacement) bean);
View Full Code Here

      File f = getGlobalPrefsFile();

      if (f.exists())
      {
        XMLBeanReader xbr = new XMLBeanReader();
        xbr.load(f, getClass().getClassLoader());

        for (Iterator<Object> i = xbr.iterator(); i.hasNext();)
        {
          OracleAliasPrefs buf = (OracleAliasPrefs) i.next();
          _oracleAliasPrefsByAliasIdentifier.put(buf.getAliasIdentifier(), buf);
        }
View Full Code Here

   */
  private void loadPrefs()
  {
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(new File(_userSettingsFolder, USER_PREFS_FILE_NAME),
                getClass().getClassLoader());
      final Iterator<?> it = doc.iterator();
      if (it.hasNext())
      {
        _prefs = (ExportConfigPreferences)it.next();
      }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.xml.XMLBeanReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.