Package org.apache.tuscany.sdo.util.metadata

Examples of org.apache.tuscany.sdo.util.metadata.JavaMetaData


  {
    try
    {
      for (Iterator iter = getJavaMetaData().iterator(); iter.hasNext();)
      {
        JavaMetaData metadata = (JavaMetaData)iter.next();
        String factoryInterface = metadata.getFactoryInterface();
        if (factoryInterface != null)
        {
          Class factoryInterfaceClass = classLoader.loadClass(factoryInterface);
          SDOUtil.registerStaticTypes(factoryInterfaceClass);
        }
        else
        {
          String typeInterface = metadata.getTypeInterface();
          Class typeInterfaceClass = classLoader.loadClass(typeInterface);
          // TODO: introspect and register the type
        }
      }

      XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper);
      for (Iterator iter = getXsdMetaData().iterator(); iter.hasNext();)
      {
        XSDMetaData metadata = (XSDMetaData)iter.next();
        URL url = getClass().getResource(metadata.getLocation());
        InputStream inputStream = url.openStream();
        xsdHelper.define(inputStream, url.toString());
      }

      XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper);
      for (Iterator iter = getTypeMetaData().iterator(); iter.hasNext();)
      {
        TypeMetaData metadata = (TypeMetaData)iter.next();
        URL url = getClass().getResource(metadata.getLocation());
        InputStream inputStream = url.openStream();
        XMLDocument xmlDocument = xmlHelper.load(inputStream);
        Types types = (Types)xmlDocument.getRootObject();
        typeHelper.define(types.getTypeList());
      }
View Full Code Here


  {
    try
    {
      for (Iterator iter = getJavaMetaData().iterator(); iter.hasNext();)
      {
        JavaMetaData metadata = (JavaMetaData)iter.next();
        String factoryInterface = metadata.getFactoryInterface();
        if (factoryInterface != null)
        {
          Class factoryInterfaceClass = classLoader.loadClass(factoryInterface);
          SDOUtil.registerStaticTypes(factoryInterfaceClass);
        }
        else
        {
          String typeInterface = metadata.getTypeInterface();
          Class typeInterfaceClass = classLoader.loadClass(typeInterface);
          // TODO: introspect and register the type
        }
      }

      XSDHelper xsdHelper = SDOUtil.createXSDHelper(typeHelper);
      for (Iterator iter = getXsdMetaData().iterator(); iter.hasNext();)
      {
        XSDMetaData metadata = (XSDMetaData)iter.next();
        URL url = getClass().getResource(metadata.getLocation());
        InputStream inputStream = url.openStream();
        xsdHelper.define(inputStream, url.toString());
      }

      XMLHelper xmlHelper = SDOUtil.createXMLHelper(typeHelper);
      for (Iterator iter = getTypeMetaData().iterator(); iter.hasNext();)
      {
        TypeMetaData metadata = (TypeMetaData)iter.next();
        URL url = getClass().getResource(metadata.getLocation());
        InputStream inputStream = url.openStream();
        XMLDocument xmlDocument = xmlHelper.load(inputStream);
        Types types = (Types)xmlDocument.getRootObject();
        typeHelper.define(types.getTypeList());
      }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sdo.util.metadata.JavaMetaData

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.