Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.WrappedException


            try {
              Map nsMap = getAllNamespacesForElement(serviceRefElement);
              ExtensibilityElement extensibilityElement=deserializer.unmarshall(ExtensibleElement.class,qname,childElement,process,nsMap,extensionRegistry,resource.getURI());
              serviceRef.setValue(extensibilityElement);
            } catch (WSDLException e) {
              throw new WrappedException(e);
            }
          } else {
            ServiceReferenceDeserializer referenceDeserializer = extensionRegistry.getServiceReferenceDeserializer(serviceRef.getReferenceScheme());
            if (referenceDeserializer != null) {
              Object serviceReference = referenceDeserializer.unmarshall(childElement, process);
View Full Code Here


            Map nsMap = getAllNamespacesForElement(element);
            //ExtensibilityElement extensibilityElement=deserializer.unmarshall(ExtensibleElement.class,qname,childElement,process,nsMap,extensionRegistry,resource.getURI());
            ExtensibilityElement extensibilityElement=deserializer.unmarshall(extensibleElement.getClass(),qname,childElement,process,nsMap,extensionRegistry,resource.getURI());
            extensibleElement.addExtensibilityElement(extensibilityElement);
          } catch (WSDLException e) {
            throw new WrappedException(e);
          }
        }
      } else if (node.getNodeType()==Node.ATTRIBUTE_NODE) {
        // If the attribute is not actually in the file, ignore it.
        // (default attributes added by the schema parser, cause some problems for us)
        if ((node instanceof Attr) && ((Attr)node).getSpecified()) {
          // Handle extensibility attribute
          QName qname=new QName(node.getNamespaceURI(),"extensibilityAttributes");
          BPELExtensionDeserializer deserializer=null;
          try {
            deserializer=(BPELExtensionDeserializer)extensionRegistry.queryDeserializer(ExtensibleElement.class,qname);
          } catch (WSDLException e) {}
          if (deserializer!=null) {
           
            // Create a temp element to host the extensibility attribute
                      //
                      // This turns something that looks like this:
                      //   <bpws:X someNS:Y="Z"/>
                      // into something that looks like this:
                      //   <someNS:extensibilityAttributes xmlns:someNS="http://the.namespace" Y="Z"/>
                     
            Element tempElement=element.getOwnerDocument().createElementNS(node.getNamespaceURI(), node.getPrefix() + ":extensibilityAttributes");
                      tempElement.setAttribute(BPELUtils.ATTR_XMLNS + ":" + node.getPrefix(), node.getNamespaceURI());
            tempElement.setAttribute(node.getLocalName(), node.getNodeValue());
           
            // Deserialize the temp DOM element and add the new Extensibility element to the parent
            // ExtensibleElement
            try {
              Map nsMap = getAllNamespacesForElement(element);
              ExtensibilityElement extensibilityElement=deserializer.unmarshall(ExtensibleElement.class,qname,tempElement,process,nsMap,extensionRegistry,resource.getURI());
              if (extensibilityElement!=null)
                extensibleElement.addExtensibilityElement(extensibilityElement);
            } catch (WSDLException e) {
              throw new WrappedException(e);
            }
          }
        }
      }
    }
View Full Code Here

        URI uri = URI.createURI(url.toString());
        Resource resource = new EcoreResourceFactoryImpl().createResource(uri);
        try {
            resource.load(null);
        } catch (IOException exception) {
            throw new WrappedException(exception);
        }
        initializeFromLoadedEPackage(this, (EPackage) resource.getContents().get(0));
        createResource(eNS_URI);
    }
View Full Code Here

      {
        position = Integer.parseInt(uriFragmentRootSegment);
      }
      catch (NumberFormatException exception)
      {
        throw new WrappedException(exception);
      }
    }

    List<EObject> contents = getContents();
    if (position < contents.size() && position >= 0)
View Full Code Here

            baseURL = new URL(DOT.resolve(URI.createURI(pluginPropertiesURL.toString())).toString());
          }
        }
        catch (IOException exception)
        {
          throw new WrappedException(exception);
        }
      }
      else
      {
        baseURL = getPrimaryResourceLocator().getBaseURL();
View Full Code Here

        {
          result = doGetImage(key);
        }
        catch (MalformedURLException exception)
        {
          throw new WrappedException(exception);
        }
        catch (IOException exception)
        {
          result = delegatedGetImage(key);
        }
View Full Code Here

      {
        position = Integer.parseInt(uriFragmentRootSegment);
      }
      catch (NumberFormatException exception)
      {
        throw new WrappedException(exception);
      }
    }

    List<EObject> contents = getContents();
    if (position < contents.size() && position >= 0)
View Full Code Here

          }
        }
        catch (RuntimeException nestedException)
        {
          CommonPlugin.INSTANCE.log
            (new WrappedException
              (CommonPlugin.INSTANCE.getString("_UI_IgnoreException_exception"), nestedException).fillInStackTrace());
        }

        throw exception;
      }
View Full Code Here

          }
        }
        catch (RuntimeException nestedException)
        {
          CommonPlugin.INSTANCE.log
            (new WrappedException
              (CommonPlugin.INSTANCE.getString("_UI_IgnoreException_exception"), nestedException).fillInStackTrace());
        }


        throw exception;
View Full Code Here

          }
        }
        catch (RuntimeException nestedException)
        {
          CommonPlugin.INSTANCE.log
            (new WrappedException
              (CommonPlugin.INSTANCE.getString("_UI_IgnoreException_exception"), nestedException).fillInStackTrace());
        }

        throw exception;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.WrappedException

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.