Package nexj.core.meta

Examples of nexj.core.meta.MetadataCompoundValidationException


    */
   public void start() throws MetadataException
   {
      // Validate the initial state

      MetadataCompoundValidationException eh = null;

      // ensure SQL Objects that were deleted in the upgrade steps still exist in initial schema
      for (Lookup.Iterator itr = m_objectMap.iterator(); itr.hasNext();)
      {
         try
View Full Code Here


   /**
    * @see nexj.core.meta.upgrade.UpgradeState#end()
    */
   public void end() throws MetadataException
   {
      MetadataCompoundValidationException eh = null;

      // Validate the final state

      // there should be no unsupported adapters left at the end of an upgrade (algorithm error)
      for (Iterator itr = m_adapterMap.valueIterator(); itr.hasNext();)
View Full Code Here

      if (e instanceof MetadataCompoundValidationException &&
         ((MetadataCompoundValidationException)e).getExceptionCount() != 0)
      {
         if (e != m_exception)
         {
            MetadataCompoundValidationException x = (MetadataCompoundValidationException)e;

            for (Iterator itr = x.getExceptionIterator(); itr.hasNext();)
            {
               addException((UncheckedException)itr.next());
            }
         }
      }
View Full Code Here

    * @param txfIterator An iterator over the set of transformations for which
    * inheritance resolution shall be performed.
    */
   public static void resolveInheritance(Iterator txfIterator)
   {
      MetadataCompoundValidationException comp = null;
      Holder circularTxfSet = new IdentityHashHolder();
      Holder resolvedTxfSet = new IdentityHashHolder();

      while (txfIterator.hasNext())
      {
         Transformation transformation = (Transformation)txfIterator.next();

         circularTxfSet.add(transformation);

         if (transformation.m_base == null)
         {
            try
            {
               transformation.resolveInheritance(resolvedTxfSet);
            }
            catch (UncheckedException ex)
            {
               if (comp == null)
               {
                  comp = new MetadataCompoundValidationException();
               }

               transformation.addException(comp, ex);
            }
         }
      }

      // Inheritance cycles have no transformation where m_base == null, so they are never resolved.
      if (circularTxfSet.size() != resolvedTxfSet.size())
      {
         circularTxfSet.removeAll(resolvedTxfSet);

         if (comp == null)
         {
            comp = new MetadataCompoundValidationException();
         }

         // Add an error marker for every transformation in the cycle(s).
         for (Iterator itr = circularTxfSet.iterator(); itr.hasNext(); )
         {
View Full Code Here

    * @param sortedMessageList The list to populate with messages in the
    * order they are resolved. Can be null.
    */
   public static void resolveInheritance(Iterator msgIterator, List sortedMessageList)
   {
      MetadataCompoundValidationException comp = null;
      Holder circularMessageSet = new IdentityHashHolder();
      Holder resolvedMessageSet = new IdentityHashHolder();

      while (msgIterator.hasNext())
      {
         Message message = (Message)msgIterator.next();

         circularMessageSet.add(message);

         // Process inheritance starting on the root messages.
         if (message.m_base == null)
         {
            try
            {
               message.resolveInheritance(resolvedMessageSet, sortedMessageList);
            }
            catch (UncheckedException ex)
            {
               if (comp == null)
               {
                  comp = new MetadataCompoundValidationException();
               }

               message.addException(comp, ex);
            }
         }
      }

      // Inheritance cycles have no message where m_base == null, so they are never resolved.
      if (circularMessageSet.size() != resolvedMessageSet.size())
      {
         circularMessageSet.removeAll(resolvedMessageSet);

         if (comp == null)
         {
            comp = new MetadataCompoundValidationException();
         }

         for (Iterator itr = circularMessageSet.iterator(); itr.hasNext(); )
         {
            Message circularMessage = (Message)itr.next();
View Full Code Here

TOP

Related Classes of nexj.core.meta.MetadataCompoundValidationException

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.