Package org.dom4j

Examples of org.dom4j.DocumentException


  }

  public ConsoleConfigXml( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( "Invalid root element." );
    }
    document = doc;
  }
View Full Code Here


  }

  public SystemActionsXml( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( Messages.getInstance().getErrorString( "PentahoXml.ERROR_0001_INVALID_ROOT_ELEMENT" ) ); //$NON-NLS-1$
    }
    document = doc;
  }
View Full Code Here

  }

  public HibernateSettingsXml( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( Messages.getInstance().getErrorString(
          "HibernateSettingsXml.ERROR_0001_INVALID_ROOT_ELEMENT" ) ); //$NON-NLS-1$
    }
    document = doc;
  }
View Full Code Here

  }

  public WebXml( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( "Invalid root element." ); //$NON-NLS-1$
    }
    document = doc;
  }
View Full Code Here

  }

  public void setDocument( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT ) ) {
      throw new DocumentException( Messages.getInstance().getErrorString(
          "PentahoObjectsConfig.ERROR_0001_INVALID_ROOT_ELEMENT" ) ); //$NON-NLS-1$
    }
    document = doc;
  }
View Full Code Here

  }

  public SpringSecurityHibernateConfig( Document doc ) throws DocumentException {
    Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( Messages.getInstance().getErrorString( "PentahoXml.ERROR_0001_INVALID_ROOT_ELEMENT" ) ); //$NON-NLS-1$
    }
    document = doc;
  }
View Full Code Here

  }

  private void loadFromConfigurationDocument( final Document doc ) throws DocumentException {
    final Element rootElement = doc.getRootElement();
    if ( ( rootElement != null ) && !doc.getRootElement().getName().equals( ROOT_ELEMENT ) ) {
      throw new DocumentException( messages.getErrorString( "EmailConfigurationXml.ERROR_0002_INVALID_ROOT_ELEMENT" ) ); //$NON-NLS-1$
    }

    setSmtpHost( getStringValue( doc, SMTP_HOST_XPATH ) );
    setSmtpPort( getIntegerPortValue( doc, SMTP_PORT_XPATH ) );
    setSmtpProtocol( getStringValue( doc, SMTP_PROTOCOL_XPATH ) );
View Full Code Here

                writer.close();
                return resultStream.toString(outputEncoding);
            }
            else
            {
                throw new DocumentException("Payload is not valid XML");
            }
        }
        catch (Exception e)
        {
            throw new TransformerException(this, e);
View Full Code Here

            s.addTransition(t);
         }
      }

      if( resolveFailed.length() > 0 )
         throw new DocumentException("Failed to resolve transition targets: "+resolveFailed);

      StateMachine sm = new StateMachine(states, startState, description);
      return sm;
   }
View Full Code Here

                source.setSystemId(sb.toString());
            }

            return read(source);
        } catch (FileNotFoundException e) {
            throw new DocumentException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.dom4j.DocumentException

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.