Package org.apache.directory.api.dsmlv2

Examples of org.apache.directory.api.dsmlv2.Dsmlv2Parser


     * @return the XML response in DSMLv2 Format
     * @throws XmlPullParserException if an error occurs in the parser
     */
    public String processDSML( String dsmlInput ) throws XmlPullParserException
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInput( dsmlInput );

        return processDSML();
    }
View Full Code Here


     * @throws XmlPullParserException if an error occurs in the parser
     * @throws FileNotFoundException if the file does not exist
     */
    public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInputFile( fileName );

        return processDSML();
    }
View Full Code Here

     * @param respStream the output stream to which response will be written, skipped if null
     * @throws Exception If the processing fails
     */
    public void processDSMLFile( File file, OutputStream respStream ) throws Exception
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInputFile( file.getAbsolutePath() );

        processDSML( respStream );
    }
View Full Code Here

     * @param out the output stream to which DSML response will be written
     * @throws Exception If the processing fails
     */
    public void processDSML( InputStream inputStream, String inputEncoding, OutputStream out ) throws Exception
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInput( inputStream, inputEncoding );
        processDSML( out );
    }
View Full Code Here

     * @return the XML response in DSMLv2 Format
     * @throws XmlPullParserException if an error occurs in the parser
     */
    public String processDSML( String dsmlInput ) throws XmlPullParserException
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInput( dsmlInput );

        return processDSML();
    }
View Full Code Here

     * @throws XmlPullParserException if an error occurs in the parser
     * @throws FileNotFoundException if the file does not exist
     */
    public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInputFile( fileName );

        return processDSML();
    }
View Full Code Here

     * @param respStream the output stream to which response will be written, skipped if null
     * @throws Exception If the processing fails
     */
    public void processDSMLFile( File file, OutputStream respStream ) throws Exception
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInputFile( file.getAbsolutePath() );

        processDSML( respStream );
    }
View Full Code Here

     * @param out the output stream to which DSML response will be written
     * @throws Exception If the processing fails
     */
    public void processDSML( InputStream inputStream, String inputEncoding, OutputStream out ) throws Exception
    {
        parser = new Dsmlv2Parser( grammar );
        parser.setInput( inputStream, inputEncoding );
        processDSML( out );
    }
View Full Code Here

    private Dsmlv2Grammar grammar = new Dsmlv2Grammar();


    public Dsmlv2Parser newParser() throws Exception
    {
        return new Dsmlv2Parser( grammar );
    }
View Full Code Here

     */
    public void testParsingFail( Class<?> testClass, String filename )
    {
        try
        {
            Dsmlv2Parser parser = new Dsmlv2Parser( grammar );

            parser.setInput( testClass.getResource( filename ).openStream(), "UTF-8" );

            parser.parse();
        }
        catch ( XmlPullParserException e )
        {
            assertTrue( e.getMessage(), true );
            return;
View Full Code Here

TOP

Related Classes of org.apache.directory.api.dsmlv2.Dsmlv2Parser

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.