Package nexj.core.util

Examples of nexj.core.util.LookupDeque


   public void resolveInheritance(MessagePart baseMessagePart)
   {
      if (baseMessagePart instanceof CompositeMessagePartInstance)
      {
         CompositeMessagePartInstance baseMessagePartComp = (CompositeMessagePartInstance)baseMessagePart;
         LookupDeque orderedPartSet = new LinkedHashTab(m_partList.size());

         for (int i = 0; i < m_partList.size(); i++)
         {
            MessagePart part = (MessagePart)m_partList.get(i);

            orderedPartSet.put(part.getName(), part);
         }

         int nSize = baseMessagePartComp.m_partList.size();
         Lookup oldPartMap = m_partMap;

         m_partList = new ArrayList(nSize + m_partList.size());
         m_partMap = new HashTab(nSize);

         // Add parts defined in the base message.
         for (int i = 0; i < nSize; i++)
         {
            MessagePart baseMessageChildPart = (MessagePart)baseMessagePartComp.m_partList.get(i);
            MessagePart childPart = (MessagePart)oldPartMap.get(baseMessageChildPart.getName());

            if (childPart == null)
            {
               addPart(baseMessageChildPart.copy(this));
            }
            else
            {
               orderedPartSet.remove(childPart.getName());
               addPart(childPart);
               childPart.resolveInheritance(baseMessageChildPart);
            }
         }

         // Add parts defined in the derived message.
         for (Iterator itr = orderedPartSet.valueIterator(); itr.hasNext(); )
         {
            addPart((MessagePart)itr.next());
         }

         // Inherit the mapping
View Full Code Here


      }

      if (xmlMapping instanceof RootXMLMessagePartMapping)
      {
         RootXMLMessagePartMapping rootMapping = (RootXMLMessagePartMapping)xmlMapping;
         LookupDeque schemaResourceMap = rootMapping.getSchemaResourceMap();

         if (schemaResourceMap != null && message.getMetadata() instanceof XMLMetadata)
         {
            XMLMetadata xmlMetadata = (XMLMetadata)message.getMetadata();
            XMLMetadataHelper helper = xmlMetadata.getHelper();
            StringBuilder buf = new StringBuilder();
            boolean bAppended = false;

            for (Lookup.Iterator itr = schemaResourceMap.iterator(); itr.hasNext(); )
            {
               String sSource = (String)itr.next();
               String sSchemaExternalForm = ((URL)itr.getValue()).toExternalForm();
               String sResourceName = parseResource(helper.getBaseURL(), sSchemaExternalForm);
View Full Code Here

TOP

Related Classes of nexj.core.util.LookupDeque

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.