Package com.jigen.xsd

Examples of com.jigen.xsd.JigenDocument


    return f.isAbsolute() ? f : new File(jigenFile.getParent() + File.separator + file);
  }

  static public JigenDocument createEmptyJigenDocument()
  {
      JigenDocument document = JigenDocument.Factory.newInstance();
     
      com.jigen.xsd.JigenDocument.Jigen jigen = document.addNewJigen();
     
      com.jigen.xsd.Product     product     = jigen.addNewProduct();
      com.jigen.xsd.Environment environment = jigen.addNewEnvironment();
     
      product.setName("");
View Full Code Here


      ArrayList<XmlError> errorList = new ArrayList<XmlError>();

      validateOptions.setLoadLineNumbers();
      validateOptions.setErrorListener(errorList);
     
      JigenDocument document = JigenDocument.Factory.parse(jigenFile, validateOptions);
   
    if (!document.validate(validateOptions))
    {
      for (XmlError error : errorList)
        System.err.println("Message: " + error.getMessage() + " (" + jigenFile + ":" + error.getLine() + ")");
     
      throw new XmlException("Error validatinng jigen XML file: " + errorList);
View Full Code Here

    runtimePanel.loadJigenEnvironment(jigen.getEnvironment());
  }

  public JigenDocument getJigenDocument() throws InvalidJigenException
  {
    JigenDocument document = XmlReader.createEmptyJigenDocument();
   
    Jigen jigen = document.getJigen();
   
    jigen.setProduct    (productPanel.getJigenProduct());
    jigen.setEnvironment(runtimePanel.getJigenEnvironment());

    return document;
View Full Code Here

      ArrayList<XmlError> errorList = new ArrayList<XmlError>();

      validateOptions.setLoadLineNumbers();
      validateOptions.setErrorListener(errorList);
     
      JigenDocument document;
     
    try
    {
      document = JigenDocument.Factory.parse(xmlEditor.getText(), validateOptions);
     
      if (!document.validate(validateOptions))
        throw new InvalidJigenException(null, errorList);
    }
    catch (XmlException e)
    {
      throw new InvalidJigenException(e, errorList);
View Full Code Here

   
    tabbedPane.addChangeListener(new ChangeListener()
    {
      public void stateChanged(ChangeEvent e)
      {
        JigenDocument document;
       
        try
        {
          if (tabbedPane.getSelectedComponent() == visualEditorPanel)
            document = xmlEditorPanel.getJigenDocument();
          else if (tabbedPane.getSelectedComponent() == xmlEditorPanel)
            document = visualEditorPanel.getJigenDocument();
          else
            throw new AssertionError();
        }
        catch(InvalidJigenException ex)
        {
          tabbedPane.removeChangeListener(this);

          if (tabbedPane.getSelectedComponent() == visualEditorPanel)
            tabbedPane.setSelectedComponent(xmlEditorPanel);
          else if (tabbedPane.getSelectedComponent() == xmlEditorPanel)
            tabbedPane.setSelectedComponent(visualEditorPanel);
          else
            throw new AssertionError();

          tabbedPane.addChangeListener(this);

          new ErrorDetailsDialog(ex).openDialog();
         
          return;
        }

        if (tabbedPane.getSelectedComponent() == visualEditorPanel)
          visualEditorPanel.setJigenDocument(document);
        else if (tabbedPane.getSelectedComponent() == xmlEditorPanel)
          xmlEditorPanel.setJigenDocument(document);
        else
          throw new AssertionError();
      }
    });
   
    createInstallerButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        final JigenDocument document;
       
        try
        {
          if (tabbedPane.getSelectedComponent() == xmlEditorPanel)
            document = xmlEditorPanel.getJigenDocument();
View Full Code Here

TOP

Related Classes of com.jigen.xsd.JigenDocument

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.