You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2025/02/06 22:30:32 UTC
(directory-ldap-api) 03/06: Fixed the schema converter javadoc warnings
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git
commit dfd1546e8ac92a5abd75a040eae6b018feca9f8f
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Feb 6 06:23:31 2025 +0100
Fixed the schema converter javadoc warnings
---
.../apache/directory/api/ldap/util/tree/DnNode.java | 2 ++
ldap/schema/converter/pom.xml | 10 ++++++++++
ldap/schema/converter/src/main/antlr/schemaConverter.g | 6 +++---
.../api/ldap/schema/converter/ObjectClassHolder.java | 11 +++++++++++
.../directory/api/ldap/schema/converter/Schema.java | 18 +++++++++++++++++-
.../api/ldap/schema/converter/SchemaElement.java | 14 ++++++++++++++
.../api/ldap/schema/converter/SchemaElementImpl.java | 8 ++++++++
.../api/ldap/schema/converter/SchemaParser.java | 6 +++---
8 files changed, 68 insertions(+), 7 deletions(-)
diff --git a/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java b/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
index 7ccc66407..4cf8b7336 100644
--- a/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
+++ b/ldap/extras/util/src/main/java/org/apache/directory/api/ldap/util/tree/DnNode.java
@@ -1073,6 +1073,8 @@ public class DnNode<N>
/**
+ * Get the Dn
+ *
* @return the dn
*/
public synchronized Dn getDn()
diff --git a/ldap/schema/converter/pom.xml b/ldap/schema/converter/pom.xml
index aa0e4ecad..62fbf842b 100644
--- a/ldap/schema/converter/pom.xml
+++ b/ldap/schema/converter/pom.xml
@@ -69,6 +69,16 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <sourceFileExcludes>
+ <sourceFileExclude>**/Antlr*</sourceFileExclude>
+ </sourceFileExcludes>
+ </configuration>
+ </plugin>
+
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
diff --git a/ldap/schema/converter/src/main/antlr/schemaConverter.g b/ldap/schema/converter/src/main/antlr/schemaConverter.g
index 679e3a096..44347d4c9 100644
--- a/ldap/schema/converter/src/main/antlr/schemaConverter.g
+++ b/ldap/schema/converter/src/main/antlr/schemaConverter.g
@@ -45,11 +45,11 @@ import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
}
-class antlrSchemaConverterLexer extends Lexer ;
+class AntlrSchemaConverterLexer extends Lexer ;
options {
k = 7 ;
- exportVocab=antlrSchema ;
+ exportVocab=AntlrSchema ;
charVocabulary = '\3'..'\377' ;
caseSensitive = false ;
defaultErrorHandler = false ;
@@ -109,7 +109,7 @@ SYNTAX
"syntax" WS NUMERICOID ( OPEN_BRACKET ( DIGIT )+ CLOSE_BRACKET )?
;
-class antlrSchemaConverterParser extends Parser ;
+class AntlrSchemaConverterParser extends Parser ;
options {
k = 5 ;
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/ObjectClassHolder.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/ObjectClassHolder.java
index d4357d2cc..b7d9637d2 100755
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/ObjectClassHolder.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/ObjectClassHolder.java
@@ -66,6 +66,7 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
* Get the list of superior for this objectClass
+ *
* @return A list of all inherited objectClasses
*/
public List<String> getSuperiors()
@@ -76,6 +77,7 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
* Set the list of inherited objectClasses
+ *
* @param superiors The list of inherited objectClasses
*/
public void setSuperiors( List<String> superiors )
@@ -85,6 +87,8 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
+ * Get the list of ObjectClass MUST attributes
+ *
* @return The list of mandatory attributes
*/
public List<String> getMust()
@@ -95,6 +99,7 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
* Set the list of mandatory attributes
+ *
* @param must The list of mandatory attributes
*/
public void setMust( List<String> must )
@@ -104,6 +109,8 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
+ * Get the list of optional attributes
+ *
* @return The list of optional attributes
*/
public List<String> getMay()
@@ -114,6 +121,7 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
* Set the list of optional attributes
+ *
* @param may The list of optional attributes
*/
public void setMay( List<String> may )
@@ -123,6 +131,8 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
+ * Get th eObjectClass type
+ *
* @return The objectClass type
*/
public ObjectClassTypeEnum getClassType()
@@ -133,6 +143,7 @@ public class ObjectClassHolder extends SchemaElementImpl
/**
* Set the objectClass type.
+ *
* @param classType The objectClass type.
*/
public void setClassType( ObjectClassTypeEnum classType )
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/Schema.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/Schema.java
index 9c19a7d09..f1219eccf 100644
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/Schema.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/Schema.java
@@ -42,7 +42,15 @@ public class Schema
/** The writer where we dump the ldif lines */
private Writer out;
-
+ /**
+ * Default construtor
+ */
+ public Schema()
+ {
+ // Nothing to do
+ }
+
+
/**
* Set the schema name to parse. This name is the prefix of the
* schema file, which postfix is '.schema'.
@@ -58,6 +66,8 @@ public class Schema
/**
+ * Get the schema name
+ *
* @return The schema name.
*/
public String getName()
@@ -68,6 +78,7 @@ public class Schema
/**
* Set the inputStream mapped on the schema file
+ *
* @param in The InputStream mapped on the schema file
*/
public void setInput( InputStream in )
@@ -77,6 +88,8 @@ public class Schema
/**
+ * Get the inputSteam mapped on the schema file
+ *
* @return The InputStream mapped on the schema file
*/
public InputStream getInput()
@@ -86,6 +99,8 @@ public class Schema
/**
+ * Get the writer in which the ldif lines will be dumped
+ *
* @return The writer in which the ldif lines will be dumped
*/
public Writer getOutput()
@@ -96,6 +111,7 @@ public class Schema
/**
* Set a writer to dump the ldif files
+ *
* @param out The writer
*/
public void setOutput( Writer out )
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElement.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElement.java
index 6ed70d1fc..7bf1a5849 100644
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElement.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElement.java
@@ -51,12 +51,16 @@ public interface SchemaElement
/**
+ * Get the Schema Element OID
+ *
* @return the schema element's OID
*/
String getOid();
/**
+ * Get the dschema element description
+ *
* @return Return the schema element description
*/
String getDescription();
@@ -64,12 +68,15 @@ public interface SchemaElement
/**
* Set the schema element's description
+ *
* @param description The schema element's description
*/
void setDescription( String description );
/**
+ * Get the list of possible names
+ *
* @return The list of names for the schemaElement
*/
List<String> getNames();
@@ -77,18 +84,23 @@ public interface SchemaElement
/**
* Set a list of names for a schemaElement
+ *
* @param names The list of names of this schemaElement
*/
void setNames( List<String> names );
/**
+ * Get the list of extensions
+ *
* @return The list of extensions for the schemaElement
*/
Map<String, List<String>> getExtensions();
/**
+ * Get the extension associated to a key
+ *
* @param key the Extension key
* @return The list of a values for a given extension
*/
@@ -97,6 +109,7 @@ public interface SchemaElement
/**
* Set a list of extensions for a schemaElement
+ *
* @param extensions The list of extensions of this schemaElement
*/
void setExtensions( Map<String, List<String>> extensions );
@@ -105,6 +118,7 @@ public interface SchemaElement
/**
* Generate a String representation of this schemaElement, formated
* as a ldif string
+ *
* @param schemaName The schema from which is extracted this schemaElement
* @return A string representing the schemaElement as a Ldif formated String
* @throws org.apache.directory.api.ldap.model.exception.LdapException If any error occurs.
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElementImpl.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElementImpl.java
index be745386d..4f860e20a 100644
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElementImpl.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaElementImpl.java
@@ -58,6 +58,14 @@ public abstract class SchemaElementImpl implements SchemaElement
/** The optional list of extensions */
protected Map<String, List<String>> extensions = new HashMap<>();
+ /**
+ * Default constructor
+ */
+ public SchemaElementImpl()
+ {
+ // Nothing to do
+ }
+
/**
* {@inheritDoc}
diff --git a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaParser.java b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaParser.java
index af259f418..5e149cd34 100755
--- a/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaParser.java
+++ b/ldap/schema/converter/src/main/java/org/apache/directory/api/ldap/schema/converter/SchemaParser.java
@@ -47,7 +47,7 @@ import antlr.TokenStreamException;
public class SchemaParser
{
/** The antlr generated parser */
- private antlrSchemaConverterParser parser = null;
+ private AntlrSchemaConverterParser parser = null;
/** A pipe into the parser */
private PipedOutputStream parserIn = null;
@@ -83,8 +83,8 @@ public class SchemaParser
parserIn = new PipedOutputStream();
PipedInputStream in = new PipedInputStream();
parserIn.connect( in );
- antlrSchemaConverterLexer lexer = new antlrSchemaConverterLexer( in );
- parser = new antlrSchemaConverterParser( lexer );
+ AntlrSchemaConverterLexer lexer = new AntlrSchemaConverterLexer( in );
+ parser = new AntlrSchemaConverterParser( lexer );
}