You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2006/12/27 16:11:35 UTC
svn commit: r490510 - in
/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2:
Dsmlv2Parser.java engine/Dsmlv2Engine.java
Author: pamarcelot
Date: Wed Dec 27 07:11:35 2006
New Revision: 490510
URL: http://svn.apache.org/viewvc?view=rev&rev=490510
Log:
Updating javadoc on DSMLv2 Parser.
Modified:
directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java
directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java
Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java?view=diff&rev=490510&r1=490509&r2=490510
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java Wed Dec 27 07:11:35 2006
@@ -34,11 +34,21 @@
import org.xmlpull.v1.XmlPullParserFactory;
+/**
+ * The DSMLv2 Parser can be used to parse a request in DSMLv2 format.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
public class Dsmlv2Parser
{
private Dsmlv2Container container;
-
+ /**
+ * Creates a new instance of Dsmlv2Parser.
+ *
+ * @throws XmlPullParserException
+ */
public Dsmlv2Parser() throws XmlPullParserException
{
this.container = new Dsmlv2Container();
@@ -53,6 +63,14 @@
}
+ /**
+ * Sets the input file the parser is going to process
+ *
+ * @param fileName
+ * The name of the file to parse
+ * @throws FileNotFoundException
+ * @throws XmlPullParserException
+ */
public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
{
Reader reader = new FileReader( fileName );
@@ -60,18 +78,39 @@
}
+ /**
+ * Sets the input stream the parser is going to process.
+ *
+ * @param inputStream
+ * contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
+ * @param inputEncoding
+ * if not null it MUST be used as encoding for inputStream
+ * @throws XmlPullParserException
+ */
public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
{
container.getParser().setInput( inputStream, inputEncoding );
}
+ /**
+ * Sets the String the parser is going to parse
+ *
+ * @param str
+ * the String to parse
+ * @throws XmlPullParserException
+ */
public void setInput( String str ) throws XmlPullParserException
{
container.getParser().setInput( new StringReader( str ) );
}
+ /**
+ * Launches the parsing on the input
+ *
+ * @throws Exception
+ */
public void parse() throws Exception
{
Dsmlv2Grammar grammar = Dsmlv2Grammar.getInstance();
@@ -80,6 +119,11 @@
}
+ /**
+ * Parses the initial Batch Request
+ *
+ * @throws XmlPullParserException
+ */
public void parseBatchRequest() throws XmlPullParserException
{
XmlPullParser xpp = container.getParser();
@@ -117,6 +161,15 @@
}
+ /**
+ * Processes the parsing for a given Tag
+ *
+ * @param container
+ * the parser container
+ * @param tagType
+ * the Tag
+ * @throws XmlPullParserException
+ */
private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
{
XmlPullParser xpp = container.getParser();
@@ -142,6 +195,12 @@
}
+ /**
+ * Gets the parsed BatchRequest.
+ *
+ * @return
+ * the parsed BatchRequest
+ */
public BatchRequest getBatchRequest()
{
return container.getBatchRequest();
@@ -214,6 +273,11 @@
}
+ /**
+ * Parses all the requests until the end of the document
+ *
+ * @throws Exception
+ */
public void parseAllRequests() throws Exception
{
while ( getNextRequest() != null )
Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java?view=diff&rev=490510&r1=490509&r2=490510
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java Wed Dec 27 07:11:35 2006
@@ -81,7 +81,7 @@
/**
- * This is the DSMLv2Engine. It can be use to execute operations on a LDAP Server and get the results of these operations.
+ * This is the DSMLv2Engine. It can be used to execute operations on a LDAP Server and get the results of these operations.
* The format used for request and responses is the DSMLv2 format.
*/
public class Dsmlv2Engine