[dna-commits] DNA SVN: r334 - in trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java: annotationmetadata and 6 other directories.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Thu Jul 3 07:12:35 EDT 2008


Author: spagop
Date: 2008-07-03 07:12:35 -0400 (Thu, 03 Jul 2008)
New Revision: 334

Added:
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/AnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportOnDemandMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/InterfaceMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavaMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavadocMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MarkerAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/NormalAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PackageMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleImportMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleMemberAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java
Removed:
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/AnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/MarkerAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/NormalAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/SingleMemberAnnotationMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/fieldmetadata/FieldMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportOnDemandMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/SingleImportMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/javadocmetadata/JavadocMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/packagemetadata/PackageMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/ClassMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/InterfaceMetadata.java
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/TypeMetadata.java
Modified:
   trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadataSequencer.java
Log:
move some related metadata impl. into the metadata package and enhance the java metadata impl.

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.ImportDeclaration;
-import org.eclipse.jdt.core.dom.MarkerAnnotation;
-import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jdt.core.dom.PackageDeclaration;
-import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.jboss.dna.sequencer.java.annotationmetadata.MarkerAnnotationMetadata;
-import org.jboss.dna.sequencer.java.annotationmetadata.NormalAnnotationMetadata;
-import org.jboss.dna.sequencer.java.annotationmetadata.SingleMemberAnnotationMetadata;
-import org.jboss.dna.sequencer.java.importmetadata.ImportMetadata;
-import org.jboss.dna.sequencer.java.importmetadata.ImportOnDemandMetadata;
-import org.jboss.dna.sequencer.java.importmetadata.SingleImportMetadata;
-import org.jboss.dna.sequencer.java.packagemetadata.PackageMetadata;
-import org.jboss.dna.sequencer.java.typemetadata.ClassMetadata;
-import org.jboss.dna.sequencer.java.typemetadata.InterfaceMetadata;
-import org.jboss.dna.sequencer.java.typemetadata.TypeMetadata;
-
-/**
- * @author Serge Pagop
- */
-public abstract class AbstractJavaMetadata {
-
-    /**
-     * Create a set of <code>ImportMetadata</code> of a compilation unit.
-     * 
-     * @param unit - the compilation unit.
-     * @return all static import declarations from the compilation unit.
-     */
-    @SuppressWarnings( "unchecked" )
-    protected List<ImportMetadata> createImportMetadata( CompilationUnit unit ) {
-        List<ImportMetadata> metadata = new ArrayList<ImportMetadata>();
-        List<ImportDeclaration> imports = unit.imports();
-        if (!imports.isEmpty()) {
-            for (ImportDeclaration importDeclaration : imports) {
-                if (importDeclaration.isOnDemand()) {
-                    // typeImportOnDemand and staticImportOnDemand
-                    ImportOnDemandMetadata onDemandMetadata = new ImportOnDemandMetadata();
-                    onDemandMetadata.setName(JavaMetadataUtil.getName(importDeclaration.getName()));
-                    metadata.add(onDemandMetadata);
-                } else {
-                    // singleTypeImport and singleStaticImport
-                    SingleImportMetadata singleImportMetadata = new SingleImportMetadata();
-                    singleImportMetadata.setName(JavaMetadataUtil.getName(importDeclaration.getName()));
-                    metadata.add(singleImportMetadata);
-                }
-
-            }
-        }
-        return metadata;
-    }
-
-    /**
-     * Create a <code>PackageMetadata</code> of a compilation unit.
-     * 
-     * @param unit - the compilation unit.
-     * @return the package meta data of a compilation unit.
-     */
-    @SuppressWarnings( "unchecked" )
-    protected PackageMetadata createPackageMetadata( CompilationUnit unit ) {
-        PackageMetadata packageMetadata = null;
-        List<Annotation> annotations = null;
-        PackageDeclaration packageDeclaration = unit.getPackage();
-        if (packageDeclaration != null) {
-            annotations = packageDeclaration.annotations();
-            packageMetadata = new PackageMetadata();
-            packageMetadata.setName(JavaMetadataUtil.getName(unit.getPackage().getName()));
-            if (!annotations.isEmpty()) {
-                for (Object object : annotations) {
-
-                    if (object instanceof NormalAnnotation) {
-                        NormalAnnotation normalAnnotation = (NormalAnnotation)object;
-                        NormalAnnotationMetadata normalAnnotationMetadata = new NormalAnnotationMetadata();
-                        normalAnnotationMetadata.setName(JavaMetadataUtil.getName(normalAnnotation.getTypeName()));
-                        normalAnnotationMetadata.setNormal(Boolean.TRUE);
-                        packageMetadata.getAnnotationMetada().add(normalAnnotationMetadata);
-                    }
-                    if (object instanceof MarkerAnnotation) {
-                        MarkerAnnotation markerAnnotation = (MarkerAnnotation)object;
-                        MarkerAnnotationMetadata markerAnnotationMetadata = new MarkerAnnotationMetadata();
-                        markerAnnotationMetadata.setName(JavaMetadataUtil.getName(markerAnnotation.getTypeName()));
-                        markerAnnotationMetadata.setMarker(Boolean.TRUE);
-                        packageMetadata.getAnnotationMetada().add(markerAnnotationMetadata);
-                    }
-                    if (object instanceof SingleMemberAnnotation) {
-                        SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation)object;
-                        SingleMemberAnnotationMetadata singleMemberAnnotationMetadata = new SingleMemberAnnotationMetadata();
-                        singleMemberAnnotationMetadata.setName(JavaMetadataUtil.getName(singleMemberAnnotation.getTypeName()));
-                        singleMemberAnnotationMetadata.setSingle(Boolean.TRUE);
-                        packageMetadata.getAnnotationMetada().add(singleMemberAnnotationMetadata);
-
-                    }
-                }
-            }
-        }
-        return packageMetadata;
-    }
-
-    /**
-     * Create a list with all top level types of a compilation unit.
-     * 
-     * @param unit - the compilation unit.
-     * @return meta data for types in this compilation unit.
-     */
-    @SuppressWarnings( "unchecked" )
-    protected List<TypeMetadata> createTypeMetadata( CompilationUnit unit ) {
-        List<TypeMetadata> metadata = new ArrayList<TypeMetadata>();
-        List<TypeDeclaration> topLevelType = unit.types();
-        for (TypeDeclaration typeDeclaration : topLevelType) {
-            if (typeDeclaration.isInterface()) {
-                // is an interface top level type
-                InterfaceMetadata interfaceMetadata = new InterfaceMetadata();
-                interfaceMetadata.setName(JavaMetadataUtil.getName(typeDeclaration.getName()));
-                metadata.add(interfaceMetadata);
-            } else {
-                // is a class top level type
-                ClassMetadata classMetadata = new ClassMetadata();
-                classMetadata.setName(JavaMetadataUtil.getName(typeDeclaration.getName()));
-                metadata.add(classMetadata);
-            }
-        }
-        return metadata;
-    }
-}

Added: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/AbstractJavaMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,190 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.jboss.dna.sequencer.java.metadata.ClassMetadata;
+import org.jboss.dna.sequencer.java.metadata.ImportMetadata;
+import org.jboss.dna.sequencer.java.metadata.ImportOnDemandMetadata;
+import org.jboss.dna.sequencer.java.metadata.InterfaceMetadata;
+import org.jboss.dna.sequencer.java.metadata.MarkerAnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.NormalAnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.PackageMetadata;
+import org.jboss.dna.sequencer.java.metadata.SingleImportMetadata;
+import org.jboss.dna.sequencer.java.metadata.SingleMemberAnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.TypeMetadata;
+
+/**
+ * Abstract definition of a <tt>JavaMetadata<tt>. This class exposes some useful methods, that can
+ * be used to create meta data of a compilation unit. Methods can also separately be used.
+ *  
+ * @author Serge Pagop
+ */
+public abstract class AbstractJavaMetadata {
+
+    /**
+     * Create a set of <code>ImportMetadata</code> of a compilation unit.
+     * 
+     * @param unit - the compilation unit.
+     * @return all static import declarations from the compilation unit.
+     */
+    @SuppressWarnings( "unchecked" )
+    protected List<ImportMetadata> createImportMetadata( CompilationUnit unit ) {
+        List<ImportMetadata> metadata = new ArrayList<ImportMetadata>();
+        List<ImportDeclaration> imports = unit.imports();
+        if (!imports.isEmpty()) {
+            for (ImportDeclaration importDeclaration : imports) {
+                if (importDeclaration.isOnDemand()) {
+                    // typeImportOnDemand and staticImportOnDemand
+                    ImportOnDemandMetadata onDemandMetadata = new ImportOnDemandMetadata();
+                    onDemandMetadata.setName(JavaMetadataUtil.getName(importDeclaration.getName()));
+                    metadata.add(onDemandMetadata);
+                } else {
+                    // singleTypeImport and singleStaticImport
+                    SingleImportMetadata singleImportMetadata = new SingleImportMetadata();
+                    singleImportMetadata.setName(JavaMetadataUtil.getName(importDeclaration.getName()));
+                    metadata.add(singleImportMetadata);
+                }
+
+            }
+        }
+        return metadata;
+    }
+
+    /**
+     * Create a <code>PackageMetadata</code> of a compilation unit.
+     * 
+     * @param unit - the compilation unit.
+     * @return the package meta data of a compilation unit.
+     */
+    @SuppressWarnings( "unchecked" )
+    protected PackageMetadata createPackageMetadata( CompilationUnit unit ) {
+        PackageMetadata packageMetadata = null;
+        List<Annotation> annotations = null;
+        PackageDeclaration packageDeclaration = unit.getPackage();
+        if (packageDeclaration != null) {
+            annotations = packageDeclaration.annotations();
+            packageMetadata = new PackageMetadata();
+            packageMetadata.setName(JavaMetadataUtil.getName(unit.getPackage().getName()));
+            if (!annotations.isEmpty()) {
+                for (Object object : annotations) {
+
+                    if (object instanceof NormalAnnotation) {
+                        NormalAnnotation normalAnnotation = (NormalAnnotation)object;
+                        NormalAnnotationMetadata normalAnnotationMetadata = new NormalAnnotationMetadata();
+                        normalAnnotationMetadata.setName(JavaMetadataUtil.getName(normalAnnotation.getTypeName()));
+                        normalAnnotationMetadata.setNormal(Boolean.TRUE);
+                        packageMetadata.getAnnotationMetada().add(normalAnnotationMetadata);
+                    }
+                    if (object instanceof MarkerAnnotation) {
+                        MarkerAnnotation markerAnnotation = (MarkerAnnotation)object;
+                        MarkerAnnotationMetadata markerAnnotationMetadata = new MarkerAnnotationMetadata();
+                        markerAnnotationMetadata.setName(JavaMetadataUtil.getName(markerAnnotation.getTypeName()));
+                        markerAnnotationMetadata.setMarker(Boolean.TRUE);
+                        packageMetadata.getAnnotationMetada().add(markerAnnotationMetadata);
+                    }
+                    if (object instanceof SingleMemberAnnotation) {
+                        SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation)object;
+                        SingleMemberAnnotationMetadata singleMemberAnnotationMetadata = new SingleMemberAnnotationMetadata();
+                        singleMemberAnnotationMetadata.setName(JavaMetadataUtil.getName(singleMemberAnnotation.getTypeName()));
+                        singleMemberAnnotationMetadata.setSingle(Boolean.TRUE);
+                        packageMetadata.getAnnotationMetada().add(singleMemberAnnotationMetadata);
+
+                    }
+                }
+            }
+        }
+        return packageMetadata;
+    }
+
+    /**
+     * Create a list with all top level types of a compilation unit.
+     * 
+     * @param unit - the compilation unit.
+     * @return meta data for types in this compilation unit.
+     */
+    @SuppressWarnings( "unchecked" )
+    protected List<TypeMetadata> createTypeMetadata( CompilationUnit unit ) {
+        List<TypeMetadata> metadata = new ArrayList<TypeMetadata>();
+        List<AbstractTypeDeclaration> topLevelType = unit.types();
+        for (AbstractTypeDeclaration abstractTypeDeclaration : topLevelType) {
+
+            // process TypeDeclaration (class, interface)
+            if (abstractTypeDeclaration instanceof TypeDeclaration) {
+                TypeDeclaration typeDeclaration = (TypeDeclaration)abstractTypeDeclaration;
+                if (typeDeclaration.isInterface()) {
+
+                    // is an interface top level type
+                    InterfaceMetadata interfaceMetadata = new InterfaceMetadata();
+                    interfaceMetadata.setName(JavaMetadataUtil.getName(typeDeclaration.getName()));
+                    metadata.add(interfaceMetadata);
+                } else {
+                    // is a class top level type
+                    ClassMetadata classMetadata = new ClassMetadata();
+                    classMetadata.setName(JavaMetadataUtil.getName(typeDeclaration.getName()));
+                    List modifiers = typeDeclaration.modifiers();
+                    for (Object object : modifiers) {
+                        if (object instanceof Modifier) {
+                            Modifier modifier = (Modifier)object;
+                            if (modifier.isPublic()) {
+                                classMetadata.getModifiers().put(TypeMetadata.PUBLIC_MODIFIER, modifier.getKeyword().toString());
+                            }
+                        }
+                        if (object instanceof MarkerAnnotation) {
+                            MarkerAnnotation marker = (MarkerAnnotation)object;
+                            MarkerAnnotationMetadata markerAnnotationMetadata = new MarkerAnnotationMetadata();
+                            markerAnnotationMetadata.setName(JavaMetadataUtil.getName(marker.getTypeName()));
+                            classMetadata.getAnnotationMetadata().add(markerAnnotationMetadata);
+                        }
+                    }
+                    metadata.add(classMetadata);
+                }
+            }
+
+            // process EnumDeclaration
+            if (abstractTypeDeclaration instanceof EnumDeclaration) {
+                EnumDeclaration enumDeclaration = (EnumDeclaration)abstractTypeDeclaration;
+                // TODO get infos from enum declaration and create a enum meta data object.
+            }
+
+            // process annotationTypeDeclaration
+            if (abstractTypeDeclaration instanceof AnnotationTypeDeclaration) {
+                AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration)abstractTypeDeclaration;
+                // TODO get infos from annotation type declaration and create a annotation meta data object.
+            }
+        }
+        return metadata;
+    }
+}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java;
-
-import java.io.InputStream;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.jboss.dna.common.monitor.ProgressMonitor;
-import org.jboss.dna.sequencer.java.importmetadata.ImportMetadata;
-import org.jboss.dna.sequencer.java.packagemetadata.PackageMetadata;
-
-/**
- * @author Serge Pagop
- */
-public class JavaMetadata extends AbstractJavaMetadata {
-    
-    /** The package representation of a compilation unit. */
-    private PackageMetadata packageMetadata;
-    
-    /** All the import declarations of a compilation unit. */
-    private List<ImportMetadata> importMetadata;
-    
-    /** variables */
-    
-    /** methods */
-
-    private JavaMetadata() {
-    }
-
-    /**
-     * Creates a new instance of <code>JavaMetadata</code>, that will be used to get informations of a compilation unit.
-     * 
-     * @param inputStream - the <code>InputStream</code> in our case a <code>FileInputStream</code> of the java file.
-     * @param length - the length of the java file.
-     * @param encoding - the encoding that can be used.
-     * @param progressMonitor - The basic <code>ProgressMonitor</code> that facilitates the updating and monitoring of progress
-     *        towards the completion of an activity.
-     * @return the new instace of <code>JavaMetadata</code>
-     * @see java.io.File#length()
-     */
-    public static JavaMetadata instance( InputStream inputStream,
-                                         long length,
-                                         String encoding,
-                                         ProgressMonitor progressMonitor ) {
-
-        JavaMetadata javaMetadata = new JavaMetadata();
-        char[] source = null;
-        try {
-            source = JavaMetadataUtil.getJavaSourceFromTheInputStream(inputStream, length, encoding);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-
-        CompilationUnit unit = (CompilationUnit)CompilationUnitParser.runJLS3Conversion(source, true);
-        if (unit != null) {
-            javaMetadata.packageMetadata = javaMetadata.createPackageMetadata(unit);
-            javaMetadata.importMetadata = javaMetadata.createImportMetadata(unit);
-        }
-
-        return javaMetadata;
-    }
-
-    /**
-     * Gets the <code>PackageMetadata</code>.
-     * 
-     * @return the PackageMetadata or null if there is not package declaration for the unit.
-     */
-    public final PackageMetadata getPackageMetadata() {
-        return packageMetadata;
-    }
-
-    /**
-     * Gets a list of <code>ImportMetadata</code>.
-     * 
-     * @return all the importMetadata of this unit if there is one.
-     */
-    public List<ImportMetadata> getImportMetadata() {
-        return importMetadata;
-    }
-}

Modified: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadataSequencer.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadataSequencer.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadataSequencer.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -26,11 +26,12 @@
 import java.util.List;
 import org.apache.commons.lang.StringUtils;
 import org.jboss.dna.common.monitor.ProgressMonitor;
-import org.jboss.dna.sequencer.java.annotationmetadata.AnnotationMetadata;
-import org.jboss.dna.sequencer.java.annotationmetadata.MarkerAnnotationMetadata;
-import org.jboss.dna.sequencer.java.annotationmetadata.NormalAnnotationMetadata;
-import org.jboss.dna.sequencer.java.annotationmetadata.SingleMemberAnnotationMetadata;
-import org.jboss.dna.sequencer.java.packagemetadata.PackageMetadata;
+import org.jboss.dna.sequencer.java.metadata.AnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.JavaMetadata;
+import org.jboss.dna.sequencer.java.metadata.MarkerAnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.NormalAnnotationMetadata;
+import org.jboss.dna.sequencer.java.metadata.PackageMetadata;
+import org.jboss.dna.sequencer.java.metadata.SingleMemberAnnotationMetadata;
 import org.jboss.dna.spi.graph.NameFactory;
 import org.jboss.dna.spi.graph.Path;
 import org.jboss.dna.spi.graph.PathFactory;
@@ -138,7 +139,6 @@
                                                                                 + JAVA_ANNOTATION_DECLARATION_CHILD_NODE + SLASH
                                                                                 + JAVA_ANNOTATION_TYPE_CHILD_NODE + SLASH
                                                                                 + JAVA_MARKER_ANNOTATION_CHILD_NODE);
-                            System.out.println("markerAnnotationChildNode: " + markerAnnotationChildNode.getString());
                             output.setProperty(markerAnnotationChildNode,
                                                nameFactory.create(JAVA_ANNOTATION_TYPE_NAME),
                                                markerAnnotationMetadata.getName());

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/AnnotationMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/AnnotationMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/AnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.annotationmetadata;
-
-/**
- * @author Serge Pagop
- */
-public abstract class AnnotationMetadata {
-    
-    private String name;
-
-    /**
-     * @return name
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @param name Sets name to the specified value.
-     */
-    public void setName( String name ) {
-        this.name = name;
-    }
-    
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/MarkerAnnotationMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/MarkerAnnotationMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/MarkerAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.annotationmetadata;
-
-
-/**
- * 
- */
-public class MarkerAnnotationMetadata extends AnnotationMetadata {
-    private boolean marker;
-
-    /**
-     * @return marker
-     */
-    public boolean isMarker() {
-        return marker;
-    }
-
-    /**
-     * @param marker Sets marker to the specified value.
-     */
-    public void setMarker( boolean marker ) {
-        this.marker = marker;
-    }
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/NormalAnnotationMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/NormalAnnotationMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/NormalAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.annotationmetadata;
-
-
-/**
- * 
- */
-public class NormalAnnotationMetadata extends AnnotationMetadata {
-    private  boolean normal;
-
-    /**
-     * @return normal
-     */
-    public boolean isNormal() {
-        return normal;
-    }
-
-    /**
-     * @param normal Sets normal to the specified value.
-     */
-    public void setNormal( boolean normal ) {
-        this.normal = normal;
-    }
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/SingleMemberAnnotationMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/SingleMemberAnnotationMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/SingleMemberAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.annotationmetadata;
-
-
-/**
- * 
- */
-public class SingleMemberAnnotationMetadata extends AnnotationMetadata {
-    private boolean single;
-
-    /**
-     * @return single
-     */
-    public boolean isSingle() {
-        return single;
-    }
-
-    /**
-     * @param single Sets single to the specified value.
-     */
-    public void setSingle( boolean single ) {
-        this.single = single;
-    }
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/fieldmetadata/FieldMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/fieldmetadata/FieldMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/fieldmetadata/FieldMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.fieldmetadata;
-
-/**
- * @author Serge Pagop
- */
-public class FieldMetadata {
-    
-    /** The name */
-    private String name;
-
-    /**
-     * @return name
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @param name Sets name to the specified value.
-     */
-    public void setName( String name ) {
-        this.name = name;
-    }
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.importmetadata;
-
-/**
- * @author Serge Pagop
- */
-public abstract class ImportMetadata {
-
-    private String name;
-
-    public String getName() {
-        return this.name;
-    }
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-    protected abstract boolean isOnDemand();
-
-    protected abstract boolean isSingle();
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportOnDemandMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportOnDemandMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportOnDemandMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.importmetadata;
-
-
-/**
- * @author Serge Pagop
- */
-public class ImportOnDemandMetadata extends ImportMetadata {
-
-    /**
-     * {@inheritDoc}
-     *
-     * @see org.jboss.dna.sequencer.java.importmetadata.ImportMetadata#isOnDemand()
-     */
-    @Override
-    protected boolean isOnDemand() {
-        return true;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @see org.jboss.dna.sequencer.java.importmetadata.ImportMetadata#isSingle()
-     */
-    @Override
-    protected boolean isSingle() {
-        return false;
-    }
-    
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/SingleImportMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/SingleImportMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/SingleImportMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.importmetadata;
-
-
-/**
- * Serge Pagop
- */
-public class SingleImportMetadata extends ImportMetadata {
-
-    /**
-     * {@inheritDoc}
-     *
-     * @see org.jboss.dna.sequencer.java.importmetadata.ImportMetadata#isOnDemand()
-     */
-    @Override
-    protected boolean isOnDemand() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @see org.jboss.dna.sequencer.java.importmetadata.ImportMetadata#isSingle()
-     */
-    @Override
-    protected boolean isSingle() {
-        return true;
-    }
-
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/javadocmetadata/JavadocMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/javadocmetadata/JavadocMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/javadocmetadata/JavadocMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.javadocmetadata;
-
-/**
- * 
- */
-public class JavadocMetadata {
-
-}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/AnnotationMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/AnnotationMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/AnnotationMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/AnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * @author Serge Pagop
+ */
+public abstract class AnnotationMetadata {
+    
+    private String name;
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name Sets name to the specified value.
+     */
+    public void setName( String name ) {
+        this.name = name;
+    }
+    
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/ClassMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ClassMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * @author Serge Pagop
+ */
+public class ClassMetadata extends TypeMetadata {
+
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java (from rev 327, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/fieldmetadata/FieldMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/FieldMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * @author Serge Pagop
+ */
+public class FieldMetadata {
+    
+    /** The name */
+    private String name;
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name Sets name to the specified value.
+     */
+    public void setName( String name ) {
+        this.name = name;
+    }
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * @author Serge Pagop
+ */
+public abstract class ImportMetadata {
+
+    private String name;
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+    protected abstract boolean isOnDemand();
+
+    protected abstract boolean isSingle();
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportOnDemandMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/ImportOnDemandMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportOnDemandMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/ImportOnDemandMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+
+/**
+ * @author Serge Pagop
+ */
+public class ImportOnDemandMetadata extends ImportMetadata {
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see org.jboss.dna.sequencer.java.metadata.ImportMetadata#isOnDemand()
+     */
+    @Override
+    protected boolean isOnDemand() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see org.jboss.dna.sequencer.java.metadata.ImportMetadata#isSingle()
+     */
+    @Override
+    protected boolean isSingle() {
+        return false;
+    }
+    
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/InterfaceMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/InterfaceMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/InterfaceMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/InterfaceMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * @author Serge Pagop
+ */
+public class InterfaceMetadata extends TypeMetadata {
+
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavaMetadata.java (from rev 326, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/JavaMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavaMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavaMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+import java.io.InputStream;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.jboss.dna.common.monitor.ProgressMonitor;
+import org.jboss.dna.sequencer.java.AbstractJavaMetadata;
+import org.jboss.dna.sequencer.java.CompilationUnitParser;
+import org.jboss.dna.sequencer.java.JavaMetadataUtil;
+
+/**
+ * @author Serge Pagop
+ */
+public class JavaMetadata extends AbstractJavaMetadata {
+    
+    /** The package representation of a compilation unit. */
+    private PackageMetadata packageMetadata;
+    
+    /** All the import declarations of a compilation unit. */
+    private List<ImportMetadata> importMetadata;
+    
+    /** variables */
+    
+    /** methods */
+
+    private JavaMetadata() {
+    }
+
+    /**
+     * Creates a new instance of <code>JavaMetadata</code>, that will be used to get informations of a compilation unit.
+     * 
+     * @param inputStream - the <code>InputStream</code> in our case a <code>FileInputStream</code> of the java file.
+     * @param length - the length of the java file.
+     * @param encoding - the encoding that can be used.
+     * @param progressMonitor - The basic <code>ProgressMonitor</code> that facilitates the updating and monitoring of progress
+     *        towards the completion of an activity.
+     * @return the new instace of <code>JavaMetadata</code>
+     * @see java.io.File#length()
+     */
+    public static JavaMetadata instance( InputStream inputStream,
+                                         long length,
+                                         String encoding,
+                                         ProgressMonitor progressMonitor ) {
+
+        JavaMetadata javaMetadata = new JavaMetadata();
+        char[] source = null;
+        try {
+            source = JavaMetadataUtil.getJavaSourceFromTheInputStream(inputStream, length, encoding);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+
+        CompilationUnit unit = (CompilationUnit)CompilationUnitParser.runJLS3Conversion(source, true);
+        if (unit != null) {
+            javaMetadata.packageMetadata = javaMetadata.createPackageMetadata(unit);
+            javaMetadata.importMetadata = javaMetadata.createImportMetadata(unit);
+        }
+
+        return javaMetadata;
+    }
+
+    /**
+     * Gets the <code>PackageMetadata</code>.
+     * 
+     * @return the PackageMetadata or null if there is not package declaration for the unit.
+     */
+    public final PackageMetadata getPackageMetadata() {
+        return packageMetadata;
+    }
+
+    /**
+     * Gets a list of <code>ImportMetadata</code>.
+     * 
+     * @return all the importMetadata of this unit if there is one.
+     */
+    public List<ImportMetadata> getImportMetadata() {
+        return importMetadata;
+    }
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavadocMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/javadocmetadata/JavadocMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavadocMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/JavadocMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+/**
+ * 
+ */
+public class JavadocMetadata {
+
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MarkerAnnotationMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/MarkerAnnotationMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MarkerAnnotationMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/MarkerAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+
+/**
+ * 
+ */
+public class MarkerAnnotationMetadata extends AnnotationMetadata {
+    private boolean marker;
+
+    /**
+     * @return marker
+     */
+    public boolean isMarker() {
+        return marker;
+    }
+
+    /**
+     * @param marker Sets marker to the specified value.
+     */
+    public void setMarker( boolean marker ) {
+        this.marker = marker;
+    }
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/NormalAnnotationMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/NormalAnnotationMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/NormalAnnotationMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/NormalAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+
+/**
+ * 
+ */
+public class NormalAnnotationMetadata extends AnnotationMetadata {
+    private  boolean normal;
+
+    /**
+     * @return normal
+     */
+    public boolean isNormal() {
+        return normal;
+    }
+
+    /**
+     * @param normal Sets normal to the specified value.
+     */
+    public void setNormal( boolean normal ) {
+        this.normal = normal;
+    }
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PackageMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/packagemetadata/PackageMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PackageMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/PackageMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Package meta data.
+ * 
+ * @author Serge Pagop.
+ */
+public class PackageMetadata {
+    private JavadocMetadata javadocMetadata;
+    private List<AnnotationMetadata> annotationMetada = new ArrayList<AnnotationMetadata>();
+    private String name;
+
+    // No-Arg
+    public PackageMetadata() {
+    }
+
+    public PackageMetadata( String name ) {
+        this.name = name;
+    }
+
+    public void setName( String name ) {
+        this.name = name;
+
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * @return annotationMetada
+     */
+    public List<AnnotationMetadata> getAnnotationMetada() {
+        return annotationMetada;
+    }
+
+    /**
+     * @param annotationMetada Sets annotationMetada to the specified value.
+     */
+    public void setAnnotationMetada( List<AnnotationMetadata> annotationMetada ) {
+        this.annotationMetada = annotationMetada;
+    }
+
+    /**
+     * @return javadocMetadata
+     */
+    public JavadocMetadata getJavadocMetadata() {
+        return javadocMetadata;
+    }
+
+    /**
+     * @param javadocMetadata Sets javadocMetadata to the specified value.
+     */
+    public void setJavadocMetadata( JavadocMetadata javadocMetadata ) {
+        this.javadocMetadata = javadocMetadata;
+    }
+
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleImportMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/importmetadata/SingleImportMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleImportMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleImportMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+
+/**
+ * Serge Pagop
+ */
+public class SingleImportMetadata extends ImportMetadata {
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see org.jboss.dna.sequencer.java.metadata.ImportMetadata#isOnDemand()
+     */
+    @Override
+    protected boolean isOnDemand() {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @see org.jboss.dna.sequencer.java.metadata.ImportMetadata#isSingle()
+     */
+    @Override
+    protected boolean isSingle() {
+        return true;
+    }
+
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleMemberAnnotationMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/annotationmetadata/SingleMemberAnnotationMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleMemberAnnotationMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/SingleMemberAnnotationMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+
+/**
+ * 
+ */
+public class SingleMemberAnnotationMetadata extends AnnotationMetadata {
+    private boolean single;
+
+    /**
+     * @return single
+     */
+    public boolean isSingle() {
+        return single;
+    }
+
+    /**
+     * @param single Sets single to the specified value.
+     */
+    public void setSingle( boolean single ) {
+        this.single = single;
+    }
+}

Copied: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java (from rev 325, trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/TypeMetadata.java)
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java	                        (rev 0)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/metadata/TypeMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.sequencer.java.metadata;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Exposes meta data of a top level type.
+ * 
+ * @author Serge Pagop
+ */
+public class TypeMetadata {
+    
+    public static final int PUBLIC_MODIFIER = 0;
+    
+    /** The name. */
+    private String name;
+
+    /** All modifiers of a top level type */
+    private Map<Integer, String> modifiers = new HashMap<Integer, String>();
+
+    /** All annotations of the type meta data */
+    private List<AnnotationMetadata> annotationMetadata = new ArrayList<AnnotationMetadata>();
+
+    /**
+     * Get the name.
+     * 
+     * @return the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set the name.
+     * 
+     * @param name Sets name to the specified value.
+     */
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+    /**
+     * @return annotationMetadata
+     */
+    public List<AnnotationMetadata> getAnnotationMetadata() {
+        return annotationMetadata;
+    }
+
+    /**
+     * @param annotationMetadata Sets annotationMetadata to the specified value.
+     */
+    public void setAnnotationMetadata( List<AnnotationMetadata> annotationMetadata ) {
+        this.annotationMetadata = annotationMetadata;
+    }
+
+    /**
+     * @return modifiers
+     */
+    public Map<Integer, String> getModifiers() {
+        return modifiers;
+    }
+
+    /**
+     * @param modifiers Sets modifiers to the specified value.
+     */
+    public void setModifiers( Map<Integer, String> modifiers ) {
+        this.modifiers = modifiers;
+    }
+
+}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/packagemetadata/PackageMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/packagemetadata/PackageMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/packagemetadata/PackageMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.packagemetadata;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.dna.sequencer.java.annotationmetadata.AnnotationMetadata;
-import org.jboss.dna.sequencer.java.javadocmetadata.JavadocMetadata;
-
-/**
- * Package meta data.
- * 
- * @author Serge Pagop.
- */
-public class PackageMetadata {
-    private JavadocMetadata javadocMetadata;
-    private List<AnnotationMetadata> annotationMetada = new ArrayList<AnnotationMetadata>();
-    private String name;
-
-    // No-Arg
-    public PackageMetadata() {
-    }
-
-    public PackageMetadata( String name ) {
-        this.name = name;
-    }
-
-    public void setName( String name ) {
-        this.name = name;
-
-    }
-
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * @return annotationMetada
-     */
-    public List<AnnotationMetadata> getAnnotationMetada() {
-        return annotationMetada;
-    }
-
-    /**
-     * @param annotationMetada Sets annotationMetada to the specified value.
-     */
-    public void setAnnotationMetada( List<AnnotationMetadata> annotationMetada ) {
-        this.annotationMetada = annotationMetada;
-    }
-
-    /**
-     * @return javadocMetadata
-     */
-    public JavadocMetadata getJavadocMetadata() {
-        return javadocMetadata;
-    }
-
-    /**
-     * @param javadocMetadata Sets javadocMetadata to the specified value.
-     */
-    public void setJavadocMetadata( JavadocMetadata javadocMetadata ) {
-        this.javadocMetadata = javadocMetadata;
-    }
-
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/ClassMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/ClassMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/ClassMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.typemetadata;
-
-/**
- * @author Serge Pagop
- */
-public class ClassMetadata extends TypeMetadata {
-
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/InterfaceMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/InterfaceMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/InterfaceMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.typemetadata;
-
-/**
- * @author Serge Pagop
- */
-public class InterfaceMetadata extends TypeMetadata {
-
-}

Deleted: trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/TypeMetadata.java
===================================================================
--- trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/TypeMetadata.java	2008-07-02 01:10:12 UTC (rev 333)
+++ trunk/sequencers/dna-sequencer-java/src/main/java/org/jboss/dna/sequencer/java/typemetadata/TypeMetadata.java	2008-07-03 11:12:35 UTC (rev 334)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.dna.sequencer.java.typemetadata;
-
-/**
- * @author Serge Pagop
- */
-public class TypeMetadata {
-
-    /** The name. */
-    private String name;
-
-    /**
-     * Get the name.
-     * 
-     * @return the name.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Set the name.
-     * 
-     * @param name Sets name to the specified value.
-     */
-    public void setName( String name ) {
-        this.name = name;
-    }
-}




More information about the dna-commits mailing list