Examples of Xmldriver


Examples of org.openbp.common.io.xml.XMLDriver

   * @param itemDescriptorResource Resource that identifies the item descriptor file
   * @return The new item or null (error messages go to the message container)
   */
  protected Item readItemDescriptor(Model model, ItemTypeDescriptor itd, Resource itemDescriptorResource)
  {
    XMLDriver driver = XMLDriver.getInstance();

    Item item = null;

    // Deserialize item descriptor file
    try
    {
      if (itd.isContainedItem())
      {
        // Item is wrapped by a container class in its xml file
        ItemContainer container = (ItemContainer) driver.deserializeResource(ItemContainer.class, itemDescriptorResource);
        item = container.getItem();
      }
      else
      {
        item = (Item) driver.deserializeResource(itd.getItemClass(), itemDescriptorResource);
      }
    }
    catch (XMLDriverException pe)
    {
      getMsgContainer().addMsg(model, "Error reading component descriptor file $0 in model manager $1.", new Object[]
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.