Examples of XMLBeanReader


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

         LoggerController.createLogger(HibernateUtil.class);

   public static XMLBeanReader createHibernateConfigsReader(HibernatePlugin plugin)
         throws IOException, XMLException
   {
      XMLBeanReader reader = new XMLBeanReader();
      File pluginUserSettingsFolder = plugin.getPluginUserSettingsFolder();


      File xmlFile = getXmlFile(pluginUserSettingsFolder);


      if (false == xmlFile.exists())
      {
         return null;
      }

      reader.load(xmlFile, plugin.getClass().getClassLoader());
      return reader;
   }
View Full Code Here

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

   private void loadConfigsFromXml()
      throws IOException, XMLException
   {

      XMLBeanReader reader = HibernateUtil.createHibernateConfigsReader(_plugin);

      if (null != reader)
      {
         loadConfigs(reader, Preferences.userRoot().get(PREF_KEY_LAST_SELECTED_CONFIG, null));
      }
View Full Code Here

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

         File f = new File(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME);

         if(f.exists())
         {
            XMLBeanReader br = new XMLBeanReader();
            br.load(userSettingsFolder + File.separator + FORMAT_XML_FILE_NAME, this.getClass().getClassLoader());

            Vector<FormatXmlBean> buf = new Vector<FormatXmlBean>();

            for(Iterator<?> i=br.iterator(); i.hasNext();)
            {
               buf.add((FormatXmlBean)i.next());
            }

            _formats = buf.toArray(new FormatXmlBean[buf.size()]);
View Full Code Here

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

     * Load from preferences file.
     */
    private static void loadPrefs() {
        File prefFile = null;
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, DBCopyPreferenceBean.class.getClassLoader());
           
            Iterator<Object> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (DBCopyPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + "("+prefFile.getAbsolutePath()+
View Full Code Here

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

    {
      _newSessionPrefs = new CodeCompletionPreferences();
      File prefsFile = new File(getPluginUserSettingsFolder(), PREFS_FILE_NAME);
      if(prefsFile.exists())
      {
        XMLBeanReader reader = new XMLBeanReader();
        reader.load(prefsFile, getClass().getClassLoader());

        Iterator<?> it = reader.iterator();

        if (it.hasNext())
        {
          _newSessionPrefs = (CodeCompletionPreferences) it.next();
        }
View Full Code Here

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

   public GraphControllerXmlBean read()
   {
      try
      {
         XMLBeanReader br = new XMLBeanReader();
         br.load(_graphFile, this.getClass().getClassLoader());
         return (GraphControllerXmlBean) br.iterator().next();
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here

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

    /**
     * Load from preferences file.
     */
    private static void loadPrefs() {
        try {
            XMLBeanReader doc = new XMLBeanReader();
           
            File prefFile = PreferenceUtil.getPreferenceFileToReadFrom(plugin);
           
            doc.load(prefFile, SQLScriptPreferenceBean.class.getClassLoader());           

            Iterator<?> it = doc.iterator();
            if (it.hasNext()) {
                _prefs = (SQLScriptPreferenceBean)it.next();
            }
        } catch (FileNotFoundException ignore) {
            s_log.info(USER_PREFS_FILE_NAME + " not found - will be created");
View Full Code Here

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

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

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

      String filename = getSessionPreferencesFilename(beanType);
      if (filename.length() == 0) {
        return getEmptyPreferencesBean(beanType);
      }
        try {
            XMLBeanReader reader = new XMLBeanReader();
            File file = new File(userSettingsFolder, filename);
            reader.load(file, getSessionPreferencesClassloader(beanType));
           
            Iterator<Object> it = reader.iterator();
            if (it.hasNext()) {
              prefBean = (IFirebirdManagerSessionPreferencesBean)it.next();
            }
        } catch (FileNotFoundException eNotFound) {
            log.info(filename + " not found. It will be created!");
View Full Code Here

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

   */
  private void loadPrefs()
  {
    try
    {
      final XMLBeanReader doc = new XMLBeanReader();
      final File file = new File(_userSettingsFolder,
          IConstants.USER_PREFS_FILE_NAME);
      doc.load(file, getClass().getClassLoader());

      Iterator<?> it = doc.iterator();

      if (it.hasNext())
      {
        _newSessionPrefs = (SyntaxPreferences)it.next();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.