Package nexj.core.util

Examples of nexj.core.util.SubstReader


    */
   protected void importData() throws Exception
   {
      String sDataURL = getRequiredProperty("data.url");
      URL url = (URLUtil.isURL(sDataURL)) ? new URL(sDataURL) : new File(sDataURL).toURL();
      Reader reader = new SubstReader(new InputStreamReader(new BufferedInputStream(URLUtil.openStream(url)), XMLUtil.ENCODING))
      {
         protected String getValue(String sName) throws IOException
         {
            return getRequiredProperty("param." + sName);
         }
View Full Code Here


    */
   public void validate(RelationalSchema schema, Table table) throws MetadataException
   {
      if (m_sSQL != null)
      {
         SubstReader reader = new SQLSubstReader(new StringReader(m_sSQL), schema, table)
         {
            protected StringBuffer appendConcatenate(StringBuffer buf, CharSequence[] argArray)
            {
               return buf;
            }

            protected StringBuffer appendTSExtract(StringBuffer buf, CharSequence sTS, byte nField)
            {
               return buf;
            }

            protected StringBuffer appendTSIncrement(
               StringBuffer buf, CharSequence sTS, CharSequence sDelta, byte nField)
            {
               return buf;
            }

            protected String getQuotedTableName(Table table)
            {
               return table.getQuotedName();
            }

            protected String getQuotedIndexName(Index index)
            {
               return null;
            }

            protected String getQuotedOwnerName()
            {
               return null;
            }

            protected String getQuotedRoleName()
            {
               return null;
            }

            protected boolean isColumnCaseInsensitive(Column column)
            {
               return false;
            }

            protected String getBinaryLiteral(String sHex)
            {
               Binary.parse(sHex);

               return null;
            }

            protected String getGUID()
            {
               return null;
            }

            protected String getNow()
            {
               return null;
            }

            protected String getSysPublicId()
            {
               return null;
            }

            protected String getSysUserId()
            {
               return null;
            }

            protected String getSysUserAlias()
            {
               return null;
            }
         };

         try
         {
            while (reader.read() >= 0) ;
         }
         catch (IOException e)
         {
            ObjUtil.rethrow(e);
         }
View Full Code Here

          * @return The input string with values from properties substituted.
          */
         protected static String replaceVariables(String sData, final Properties properties)
         {
            StringWriter writer = new StringWriter();
            Reader reader = new SubstReader(new StringReader(sData))
            {
               protected String getValue(String sName) throws IOException
               {
                  if (sName.startsWith("cygwin:"))
                  {
View Full Code Here

TOP

Related Classes of nexj.core.util.SubstReader

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.