Examples of XMLBeanReader


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

  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

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

    /**
     * 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

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

    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

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

  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

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

      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

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());
      final Iterator<?> it = doc.iterator();
      if (it.hasNext())
      {
        _prefs = (ExportConfigPreferences)it.next();
      }
    }
View Full Code Here

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

   */
  private void loadOldPrefs(File oldPrefsFile) throws XMLException
  {
    try
    {
      XMLBeanReader doc = new XMLBeanReader();
      doc.load(oldPrefsFile, getClass().getClassLoader());
      Iterator<?> it = doc.iterator();
      if (it.hasNext())
      {
        _lafPrefs = (LAFPreferences) it.next();
      }
    }
View Full Code Here

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

   protected void load() throws IOException
   {

      try
      {
         XMLBeanReader xmlin = new XMLBeanReader();

         if (bookmarkFile.exists())
         {
            xmlin.load(bookmarkFile, getClass().getClassLoader());
            for (Iterator<?> i = xmlin.iterator(); i.hasNext();)
            {
               Object bean = i.next();
               if (bean instanceof Bookmark)
               {
                  add((Bookmark) bean);
View Full Code Here

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

  {
    try
    {
      if(getScriptPropertiesFile().exists())
      {
        XMLBeanReader br = new XMLBeanReader();
        br.load(getScriptPropertiesFile(), this.getClass().getClassLoader());
        return (ScriptProps) br.iterator().next();
      }
      else
      {
        return null;
      }
View Full Code Here

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

   public void initialize()
   {
      try
      {
         XMLBeanReader reader = HibernateUtil.createHibernateConfigsReader(_plugin);

         if (reader == null)
         {
            return;
         }
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.