Skip to Content.
Sympa Menu

notify-dpml - r1216 - in trunk/main: depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks metro/builder/src/main/net/dpml/metro/builder metro/builder/src/test/net/dpml/metro/builder metro/model/src/main/net/dpml/metro/data metro/model/src/main/net/dpml/metro/info metro/model/src/test/net/dpml/metro/data/test metro/model/src/test/net/dpml/metro/info/test metro/runtime/src/main/net/dpml/metro/runtime metro/state/api/src/main/net/dpml/state metro/state/impl/src/main/net/dpml/state/impl metro/state/impl/src/test/net/dpml/state metro/state/impl/src/test/net/dpml/state/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http station/api/src/ma! in/net/dpml/station/info station/api/src/test/net/dpml/station/info station/builder/src/main/net/dpml/station/builder station/server/src/main/net/dpml/station/server station/server/src/test/net/dpml/station/server transit/console/src/main/net/dpml/transit/console transit/core/src/main/net/dpml/lang transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit transit/core/src/main/net/dpml/transit/info transit/core/src/main/net/dpml/transit/util transit/core/src/test/net/dpml/part transit/core/src/test/net/dpml/transit/info transit/core/src/test/net/dpml/transit/test transit/tools/src/main/net/dpml/transit/tools

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1216 - in trunk/main: depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks metro/builder/src/main/net/dpml/metro/builder metro/builder/src/test/net/dpml/metro/builder metro/model/src/main/net/dpml/metro/data metro/model/src/main/net/dpml/metro/info metro/model/src/test/net/dpml/metro/data/test metro/model/src/test/net/dpml/metro/info/test metro/runtime/src/main/net/dpml/metro/runtime metro/state/api/src/main/net/dpml/state metro/state/impl/src/main/net/dpml/state/impl metro/state/impl/src/test/net/dpml/state metro/state/impl/src/test/net/dpml/state/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http station/api/src/ma! in/net/dpml/station/info station/api/src/test/net/dpml/station/info station/builder/src/main/net/dpml/station/builder station/server/src/main/net/dpml/station/server station/server/src/test/net/dpml/station/server transit/console/src/main/net/dpml/transit/console transit/core/src/main/net/dpml/lang transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit transit/core/src/main/net/dpml/transit/info transit/core/src/main/net/dpml/transit/util transit/core/src/test/net/dpml/part transit/core/src/test/net/dpml/transit/info transit/core/src/test/net/dpml/transit/test transit/tools/src/main/net/dpml/transit/tools
  • Date: Sat, 18 Mar 2006 21:36:07 +0100

Author: mcconnell
Date: 2006-03-18 21:35:20 +0100 (Sat, 18 Mar 2006)
New Revision: 1216

Modified:
trunk/main/depot/library/src/main/net/dpml/library/TypeBuilder.java
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultLibrary.java
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java

trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultTypeBuilder.java
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java

trunk/main/depot/library/src/main/net/dpml/library/info/ImportDirective.java

trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java

trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
trunk/main/depot/library/src/main/net/dpml/library/info/TypeDirective.java

trunk/main/depot/library/src/test/net/dpml/library/impl/AbstractTestCase.java
trunk/main/depot/library/src/test/net/dpml/library/impl/ExportTestCase.java
trunk/main/depot/library/src/test/net/dpml/library/impl/XMLTestCase.java

trunk/main/depot/library/src/test/net/dpml/library/info/AbstractTestCase.java

trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java

trunk/main/depot/library/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java

trunk/main/depot/library/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/PluginProcess.java

trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/ModuleTask.java
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java

trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentBuilder.java

trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyBuilder.java

trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyWriter.java

trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentWriter.java
trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeBuilder.java
trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeWriter.java

trunk/main/metro/builder/src/test/net/dpml/metro/builder/LookupTestCase.java

trunk/main/metro/builder/src/test/net/dpml/metro/builder/MinimalTestCase.java
trunk/main/metro/builder/src/test/net/dpml/metro/builder/PartsTestCase.java
trunk/main/metro/builder/src/test/net/dpml/metro/builder/TypesTestCase.java

trunk/main/metro/model/src/main/net/dpml/metro/data/DeploymentDirective.java
trunk/main/metro/model/src/main/net/dpml/metro/data/LookupDirective.java
trunk/main/metro/model/src/main/net/dpml/metro/info/Type.java

trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java

trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java

trunk/main/metro/model/src/test/net/dpml/metro/info/test/AbstractEncodingTestCase.java

trunk/main/metro/model/src/test/net/dpml/metro/info/test/EntryDescriptorTestCase.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
trunk/main/metro/state/api/src/main/net/dpml/state/Trigger.java

trunk/main/metro/state/impl/src/main/net/dpml/state/impl/DefaultStateMachine.java
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateBuilder.java
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateWriter.java
trunk/main/metro/state/impl/src/test/net/dpml/state/EmptyTestCase.java
trunk/main/metro/state/impl/src/test/net/dpml/state/TransitionTestCase.java

trunk/main/metro/state/impl/src/test/net/dpml/state/test/AbstractEncodingTestCase.java

trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/CatalogTask.java

trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypesTask.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletEntry.java

trunk/main/station/api/src/main/net/dpml/station/info/RegistryDescriptor.java
trunk/main/station/api/src/test/net/dpml/station/info/AbstractTestCase.java

trunk/main/station/api/src/test/net/dpml/station/info/ApplicationXMLTestCase.java

trunk/main/station/api/src/test/net/dpml/station/info/RegistryXMLTestCase.java

trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryBuilder.java

trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryWriter.java

trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java

trunk/main/station/server/src/test/net/dpml/station/server/RemoteApplicationRegistryTestCase.java

trunk/main/transit/console/src/main/net/dpml/transit/console/TransitConsoleHandler.java
trunk/main/transit/core/src/main/net/dpml/lang/Builder.java
trunk/main/transit/core/src/main/net/dpml/lang/BuilderException.java
trunk/main/transit/core/src/main/net/dpml/lang/Classpath.java
trunk/main/transit/core/src/main/net/dpml/lang/Construct.java
trunk/main/transit/core/src/main/net/dpml/lang/DefaultType.java
trunk/main/transit/core/src/main/net/dpml/lang/Type.java
trunk/main/transit/core/src/main/net/dpml/part/AbstractBuilder.java
trunk/main/transit/core/src/main/net/dpml/part/DOM3DocumentBuilder.java
trunk/main/transit/core/src/main/net/dpml/part/DOMInput.java
trunk/main/transit/core/src/main/net/dpml/part/Info.java
trunk/main/transit/core/src/main/net/dpml/part/Part.java
trunk/main/transit/core/src/main/net/dpml/part/PartBuilder.java
trunk/main/transit/core/src/main/net/dpml/part/PartDirective.java
trunk/main/transit/core/src/main/net/dpml/part/PartHandler.java
trunk/main/transit/core/src/main/net/dpml/part/PartHandlerFactory.java
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyBuilder.java
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyWriter.java
trunk/main/transit/core/src/main/net/dpml/part/PartWriter.java
trunk/main/transit/core/src/main/net/dpml/part/Plugin.java
trunk/main/transit/core/src/main/net/dpml/part/Resource.java
trunk/main/transit/core/src/main/net/dpml/part/StandardPartHandler.java
trunk/main/transit/core/src/main/net/dpml/part/Strategy.java
trunk/main/transit/core/src/main/net/dpml/part/StrategyBuilder.java

trunk/main/transit/core/src/main/net/dpml/part/UnresolvableHandlerException.java
trunk/main/transit/core/src/main/net/dpml/part/ValueBuilder.java
trunk/main/transit/core/src/main/net/dpml/part/ValueWriter.java
trunk/main/transit/core/src/main/net/dpml/transit/DefaultTransitModel.java
trunk/main/transit/core/src/main/net/dpml/transit/SaxMonitor.java
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
trunk/main/transit/core/src/main/net/dpml/transit/TransitBuilder.java
trunk/main/transit/core/src/main/net/dpml/transit/info/LayoutDirective.java
trunk/main/transit/core/src/main/net/dpml/transit/util/ElementHelper.java
trunk/main/transit/core/src/test/net/dpml/part/PartTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/info/AbstractTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/info/CodeBaseDirectiveTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/info/ContentDirectiveTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/info/LayoutDirectiveTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/info/ValueDirectiveTestCase.java

trunk/main/transit/core/src/test/net/dpml/transit/test/AbstractEncodingTestCase.java
trunk/main/transit/tools/src/main/net/dpml/transit/tools/PluginTask.java
Log:
checkstyle cleanup

Modified: trunk/main/depot/library/src/main/net/dpml/library/TypeBuilder.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/TypeBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/depot/library/src/main/net/dpml/library/TypeBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,24 +18,28 @@

package net.dpml.library;

-import java.io.IOException;
-import java.io.Writer;
-
-import org.w3c.dom.Element;
-
import net.dpml.lang.Type;
-import net.dpml.lang.Builder;

import net.dpml.library.info.TypeDirective;

/**
- * Construct an Strategy instance from a DOM Element.
+ * Interface implemented by type datastructure builders.
*/
-public interface TypeBuilder //extends Builder
+public interface TypeBuilder
{
+ /**
+ * Return the id of the type produced by the builder.
+ * @return the type id
+ */
String getID();

- Type buildType( ClassLoader classoader, TypeDirective type ) throws
Exception;
-
- //void write( Writer writer, TypeDirective type ) throws IOException;
+ /**
+ * Construct a type instance using a supplied classloader and type
+ * production directive.
+ * @param classloader the base classloader
+ * @param type the type production directive
+ * @return the type instance
+ * @exception Exception if an error occurs
+ */
+ Type buildType( ClassLoader classloader, TypeDirective type ) throws
Exception;
}

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultLibrary.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultLibrary.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultLibrary.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell
+ * Copyright 2005-2006 Stephen J. McConnell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,10 +20,8 @@

import java.io.File;
import java.io.FileNotFoundException;
-import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Properties;
import java.util.Hashtable;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultModule.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell
+ * Copyright 2005-2006 Stephen J. McConnell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,8 +39,6 @@

import net.dpml.lang.Category;

-import net.dpml.lang.Type;
-
/**
* A Module is a collection of resources. It serves to establish a
* namespace and a framework for sharing properties and characteristics

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
===================================================================
--- trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultType.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -46,7 +46,8 @@

/**
* Creation of a new DefaultType.
- * @param message the exception message
+ * @param resource the enclosing resource
+ * @param directive the type production directive
*/
DefaultType( DefaultResource resource, TypeDirective directive )
{
@@ -56,16 +57,28 @@
m_directive = directive;
}

+ /**
+ * Get the type identifier.
+ * @return the type id
+ */
public String getID()
{
return m_directive.getID();
}

+ /**
+ * Get the type alias flag.
+ * @return the type alias flag
+ */
public boolean getAlias()
{
return m_directive.getAlias();
}

+ /**
+ * Get the type specific datastructure.
+ * @return the datastructure
+ */
public Object getData()
{
Element element = m_directive.getElement();

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultTypeBuilder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultTypeBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/DefaultTypeBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,10 +18,6 @@

package net.dpml.library.impl;

-import java.io.Writer;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
import java.util.Properties;
import java.util.Map;

@@ -31,13 +27,9 @@

import net.dpml.transit.util.ElementHelper;

-import net.dpml.part.AbstractBuilder;
-import net.dpml.lang.Builder;
-import net.dpml.part.Strategy;
import net.dpml.lang.BuilderException;
-import net.dpml.part.PartStrategyBuilder;
+import net.dpml.part.AbstractBuilder;

-import org.w3c.dom.TypeInfo;
import org.w3c.dom.Element;

/**
@@ -57,84 +49,41 @@
super( map );
}

+ /**
+ * Return the id of the type produced by the builder. The method
+ * always throws an UnsupportedOperationException as the default
+ * builder handles generic type production where the type id is
+ * declared within supplied type derectives.
+ *
+ * @return the type id
+ */
public String getID()
{
throw new UnsupportedOperationException( "getID" );
}

- //public Object build( ClassLoader classloader, Element element ) throws
Exception
- //{
- // return buildType( classloader, element );
- //}
-
+ /**
+ * Construct a type instance using a supplied classloader and type
+ * production directive.
+ * @param classloader the base classloader
+ * @param type the type production directive
+ * @return the type instance
+ * @exception Exception if a type instance creation error occurs
+ */
public Type buildType( ClassLoader classloader, TypeDirective type )
throws Exception
{
throw new UnsupportedOperationException( "buildType" );
}

- /*
- public TypeDirective buildType( ClassLoader classloader, TypeDirective
type ) throws Exception
- {
- Element element = type.getElement();
- TypeInfo info = element.getSchemaTypeInfo();
- String namespace = info.getTypeNamespace();
- if( null == namespace )
- {
- throw new NullPointerException( "namespace" );
- }
- String typeName = info.getTypeName();
- if( info.isDerivedFrom( COMMON_XSD_URI, "AbstractType",
TypeInfo.DERIVATION_EXTENSION ) )
- {
- final boolean alias = getAliasFlag( element );
- if( MODULE_XSD_URI.equals( namespace ) )
- {
- if( "GenericType".equals( typeName ) )
- {
- final String id = getID( element );
- final Properties properties = getProperties( element );
- return new TypeDirective( id, alias, properties );
- }
- else
- {
- System.out.println( "# UNRECOGNIZED MODULE TYPE" );
- final String error =
- "Element namespace is recognized as within the module
definition "
- + " however the type identifier is not recognized."
- + "\nNamespace: "
- + namespace
- + "\nType Name: "
- + info.getTypeName();
- throw new BuilderException( element, error );
- }
- }
- else if( info.isDerivedFrom( PART_XSD_URI, "StrategyType",
TypeInfo.DERIVATION_EXTENSION ) )
- {
- return new TypeDirective( "part", alias, element );
- }
- else
- {
- System.out.println( "# UNRECOGNIZED TYPE" );
- final String error =
- "Element is recognized as an AbstractType however the type
id is not resolvable."
- + "\nNamespace: "
- + namespace
- + "\nElement Name (from Schema Info): "
- + info.getTypeName();
- throw new BuilderException( element, error );
- }
- }
- else
- {
- System.out.println( "# INVALID ELEMENT" );
- final String error =
- "Element is not derivived from AbstractType defined under the
common namespace."
- + "\nNamespace: " + namespace
- + "\nElement Name (from Schema Info): " + info.getTypeName();
- throw new BuilderException( element, error );
- }
- }
+ /**
+ * Return the id of the type to be produced given a DOM element. The
+ * implementation assumes that the supplied element will expose an id
+ * attribute contining the type identifier. If no such attribute exists
+ * a runtime exception will be thrown.
+ *
+ * @param element the DOM element
+ * @return the type id
*/
-
protected String getID( Element element )
{
final String id = ElementHelper.getAttribute( element, "id" );
@@ -142,7 +91,7 @@
{
final String error =
"Missing type 'id'.";
- throw new IllegalArgumentException( error );
+ throw new BuilderException( element, error );
}
else
{
@@ -150,11 +99,27 @@
}
}

+ /**
+ * Return the alias production flag.
+ * The implementation assumes that the supplied element may expose an
alias
+ * attribute contining the flag boolean status. If no such attribute
exists
+ * 'false' is returned otherwise the attribute value as a boolean will be
+ * returned.
+ *
+ * @param element the DOM element
+ * @return the type id
+ */
protected boolean getAliasFlag( Element element )
{
return ElementHelper.getBooleanAttribute( element, "alias", false );
}

+ /**
+ * Return a properties instance populated with any property assertions
contained
+ * as nested <property> elements within the supplied element.
+ * @param element the DOM element representing the type production
assertion
+ * @return the properties
+ */
protected Properties getProperties( Element element )
{
Properties properties = new Properties();

Modified:
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/impl/LibraryBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,28 +19,19 @@
package net.dpml.library.impl;

import java.io.File;
-import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.FileNotFoundException;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Properties;
-import java.util.Hashtable;
import java.util.Map;
-import java.beans.XMLDecoder;

import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;

-import net.dpml.lang.Type;
-
import net.dpml.library.info.LibraryDirective;
import net.dpml.library.info.ImportDirective;
import net.dpml.library.info.IncludeDirective;
@@ -54,28 +45,19 @@

import net.dpml.library.TypeBuilder;

-import net.dpml.part.PartStrategyBuilder;
-import net.dpml.part.PartBuilder;
import net.dpml.part.AbstractBuilder;

-import net.dpml.transit.Artifact;
import net.dpml.transit.Repository;
import net.dpml.transit.Transit;
import net.dpml.transit.util.ElementHelper;
-import net.dpml.transit.util.ExceptionHelper;

import net.dpml.lang.Category;
import net.dpml.lang.BuilderException;

import net.dpml.part.DOM3DocumentBuilder;

-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
import org.w3c.dom.Element;
import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
import org.w3c.dom.TypeInfo;

/**
@@ -90,9 +72,8 @@
private static final String MODULE_XSD_URI = "@MODULE-XSD-URI@";
private static final String COMMON_XSD_URI = "@COMMON-XSD-URI@";

- public static final String XML_HEADER =
+ private static final String XML_HEADER =
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
-
private static final String LIBRARY_ELEMENT_NAME = "library";
private static final String IMPORTS_ELEMENT_NAME = "imports";
private static final String IMPORT_ELEMENT_NAME = "import";
@@ -108,11 +89,18 @@

private DOM3DocumentBuilder m_builder = new DOM3DocumentBuilder();

+ /**
+ * Creation of a new library builder.
+ */
public LibraryBuilder()
{
this( null );
}

+ /**
+ * Creation of a new library builder.
+ * @param map a map of namespace uri to associated builder plugin uri
+ */
public LibraryBuilder( Map map )
{
super( map );
@@ -163,6 +151,12 @@
}
}

+ /**
+ * Construct a resource directive from source.
+ * @param uri the source uri
+ * @return the resource directive
+ * @exception IOException if an IO exception occurs
+ */
public ResourceDirective buildResource( URI uri ) throws IOException
{
try
@@ -195,7 +189,7 @@
*
* @param module the moudle directive to externalize
* @param output the output stream
- * @exception Exception if an error occurs during module externalization
+ * @exception IOException if an error occurs during module externalization
*/
public void export( final ModuleDirective module, final OutputStream
output ) throws IOException
{
@@ -274,7 +268,7 @@
* @param base the base directory
* @param element the module element
* @return the library directive
- * @exception IOException if an IO exception occurs
+ * @exception Exception if an exception occurs
*/
private LibraryDirective buildLibraryDirective( File base, Element
element ) throws Exception
{
@@ -345,10 +339,10 @@
}

/**
- * Build a module directive an XML file.
+ * Build a resource directive from an XML file.
* @param source the XML source
* @param path the relative path
- * @return the module directive
+ * @return the resource directive
* @exception IOException if an IO exception occurs
*/
public ResourceDirective buildResourceDirective( File source, String
path ) throws IOException
@@ -375,7 +369,7 @@
final String basedir = path;
final Element root = getRootElement( source );
final String tag = root.getTagName();
- if( "module".equals( tag ) || "project".equals( tag ) ||
"resource".equals( tag ))
+ if( "module".equals( tag ) || "project".equals( tag ) ||
"resource".equals( tag ) )
{
return buildResourceDirectiveFromElement( parent, root,
basedir );
}
@@ -397,10 +391,11 @@


/**
- * Build a module using an XML element.
+ * Build a resource using an XML element.
* @param base the base directory
* @param element the module element
* @param offset the imported file directory offset
+ * @param Exception if an error occurs
*/
private ResourceDirective buildResourceDirectiveFromElement(
File base, Element element, String offset ) throws Exception
@@ -1085,7 +1080,7 @@
{
writer.write( ">" );
writeProperties( writer, props, lead + " ",
false );
- writer.write( "\n" + lead + " </include>");
+ writer.write( "\n" + lead + " </include>" );
}
else
{
@@ -1117,6 +1112,11 @@
}
}

+ /**
+ * Return the id attribute of the supplied element.
+ * @param element the DOM element
+ * @return the id value
+ */
protected String getID( Element element )
{
final String id = ElementHelper.getAttribute( element, "id" );
@@ -1124,7 +1124,7 @@
{
final String error =
"Missing type 'id'.";
- throw new IllegalArgumentException( error );
+ throw new BuilderException( element, error );
}
else
{
@@ -1132,11 +1132,22 @@
}
}

+ /**
+ * Return the alias attribute of the supplied element.
+ * @param element the DOM element
+ * @return the alias production flag value
+ */
protected boolean getAliasFlag( Element element )
{
return ElementHelper.getBooleanAttribute( element, "alias", false );
}

+ /**
+ * Return properties declared within the supplied element as immediate
+ * child <property> elements.
+ * @param element the enclosing DOM element
+ * @return the resolved properties instance
+ */
protected Properties getProperties( Element element )
{
Properties properties = new Properties();

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/ImportDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/ImportDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/ImportDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,11 +18,6 @@

package net.dpml.library.info;

-import java.beans.Expression;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-import java.beans.SimpleBeanInfo;
-import java.beans.Encoder;
import java.util.Properties;

import net.dpml.lang.Enum;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/IncludeDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,11 +18,6 @@

package net.dpml.library.info;

-import java.beans.Expression;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-import java.beans.SimpleBeanInfo;
-import java.beans.Encoder;
import java.util.Properties;

import net.dpml.lang.Category;

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/ResourceDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,11 +20,6 @@

import java.util.Arrays;
import java.util.ArrayList;
-import java.beans.Expression;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-import java.beans.SimpleBeanInfo;
-import java.beans.Encoder;
import java.util.Properties;

import net.dpml.lang.Enum;
@@ -71,7 +66,10 @@
{
this(
name, version, Classifier.ANONYMOUS, null,
- new TypeDirective[]{ new TypeDirective( type ) },
+ new TypeDirective[]
+ {
+ new TypeDirective( type )
+ },
new DependencyDirective[0],
properties );
}

Modified:
trunk/main/depot/library/src/main/net/dpml/library/info/TypeDirective.java
===================================================================
---
trunk/main/depot/library/src/main/net/dpml/library/info/TypeDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/main/net/dpml/library/info/TypeDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,12 +22,6 @@

import org.w3c.dom.Element;

-import net.dpml.lang.Type;
-
-import net.dpml.lang.Builder;
-import net.dpml.part.AbstractBuilder;
-import net.dpml.lang.BuilderException;
-
/**
* The ModuleDirective class describes a module data-structure.
*

Modified:
trunk/main/depot/library/src/test/net/dpml/library/impl/AbstractTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/impl/AbstractTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/impl/AbstractTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell
+ * Copyright 2005-2006 Stephen J. McConnell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,13 +23,6 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;

import junit.framework.TestCase;


Modified:
trunk/main/depot/library/src/test/net/dpml/library/impl/ExportTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/impl/ExportTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/impl/ExportTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -23,14 +23,10 @@
import java.util.Arrays;

import net.dpml.library.Module;
-import net.dpml.library.Resource;
import net.dpml.library.info.ModuleDirective;
import net.dpml.library.info.ResourceDirective;
-import net.dpml.library.info.DependencyDirective;
import net.dpml.library.info.TypeDirective;

-import net.dpml.lang.Type;
-
/**
* Test DefaultLibrary implementation.
*
@@ -41,6 +37,7 @@
{
/**
* Test library properties.
+ * @exception Exception if an error occurs during test execution
*/
public void testExport() throws Exception
{

Modified:
trunk/main/depot/library/src/test/net/dpml/library/impl/XMLTestCase.java
===================================================================
--- trunk/main/depot/library/src/test/net/dpml/library/impl/XMLTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/depot/library/src/test/net/dpml/library/impl/XMLTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,27 +19,15 @@
package net.dpml.library.impl;

import java.io.File;
-import java.io.FileOutputStream;
-import java.net.URI;
-import java.net.URL;
-import java.util.Map;
-import java.util.Hashtable;

-import net.dpml.library.impl.LibraryBuilder;
import net.dpml.library.info.LibraryDirective;
import net.dpml.library.info.ModuleDirective;
import net.dpml.library.info.ResourceDirective;
import net.dpml.library.info.TypeDirective;

-import net.dpml.lang.Type;
-
import junit.framework.TestCase;

-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.DocumentType;

-
/**
* Library XML test case.
*
@@ -57,6 +45,7 @@

/**
* Setup the library directive builder.
+ * @exception Exception if an error occurs during test execution
*/
public void setUp() throws Exception
{
@@ -65,6 +54,7 @@

/**
* Test an empty library definition.
+ * @exception Exception if an error occurs during test execution
*/
public void testEmptyLibrary() throws Exception
{
@@ -76,6 +66,7 @@

/**
* Test a library definition containing just properties.
+ * @exception Exception if an error occurs during test execution
*/
public void testLibraryWithProperties() throws Exception
{
@@ -87,6 +78,7 @@

/**
* Test a library definition containing just a few imports.
+ * @exception Exception if an error occurs during test execution
*/
public void testLibraryWithImports() throws Exception
{
@@ -98,6 +90,7 @@

/**
* Test a library definition containing just a modules imports.
+ * @exception Exception if an error occurs during test execution
*/
public void testLibraryWithModules() throws Exception
{
@@ -109,6 +102,7 @@

/**
* Test a direct module name.
+ * @exception Exception if an error occurs during test execution
*/
public void testModuleName() throws Exception
{
@@ -121,6 +115,7 @@

/**
* Test a direct module basedir.
+ * @exception Exception if an error occurs during test execution
*/
public void testModuleBasedir() throws Exception
{
@@ -133,6 +128,7 @@

/**
* Test the properties within a module.
+ * @exception Exception if an error occurs during test execution
*/
public void testModuleProperties() throws Exception
{
@@ -144,6 +140,7 @@

/**
* Test the import of a module into the <modules> element.
+ * @exception Exception if an error occurs during test execution
*/
public void testModuleImport() throws Exception
{
@@ -154,6 +151,7 @@

/**
* Test the import of a module into the <modules> element.
+ * @exception Exception if an error occurs during test execution
*/
public void testNestedModuleImport() throws Exception
{
@@ -175,6 +173,7 @@

/**
* Test the import of a module into the <modules> element.
+ * @exception Exception if an error occurs during test execution
*/
public void testResourceStatement() throws Exception
{

Modified:
trunk/main/depot/library/src/test/net/dpml/library/info/AbstractTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/info/AbstractTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/info/AbstractTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,14 +22,6 @@
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
import java.util.Properties;

import junit.framework.TestCase;

Modified:
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,10 +19,7 @@
package net.dpml.library.info;

import net.dpml.library.info.ResourceDirective.Classifier;
-import net.dpml.library.info.TypeDirective;

-import net.dpml.lang.Type;
-
/**
* The ModuleDirective class describes a module data-structure.
*

Modified:
trunk/main/depot/library/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,10 +19,7 @@
package net.dpml.library.info;

import net.dpml.library.info.ResourceDirective.Classifier;
-import net.dpml.library.info.TypeDirective;

-import net.dpml.lang.Type;
-
/**
* The ModuleDirective class describes a module data-structure.
*

Modified:
trunk/main/depot/library/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/library/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.library.info;

-import net.dpml.library.info.TypeDirective;
-
/**
* The ModuleDirective class describes a module data-structure.
*

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
===================================================================
--- trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/depot/tools/builder/src/main/net/dpml/tools/model/Context.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -24,8 +24,6 @@
import net.dpml.library.Library;
import net.dpml.library.Resource;

-import net.dpml.lang.Type;
-
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Path;


Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/PluginProcess.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/PluginProcess.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/process/PluginProcess.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,34 +18,9 @@

package net.dpml.tools.process;

-import java.io.File;
-import java.io.OutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.Properties;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.dpml.lang.Classpath;
-import net.dpml.lang.Category;
-
-import net.dpml.transit.Artifact;
-import net.dpml.transit.Transit;
-import net.dpml.lang.Logger;
import net.dpml.transit.util.ExceptionHelper;

-import net.dpml.part.Part;
-import net.dpml.part.Strategy;
-import net.dpml.part.Info;
-import net.dpml.part.PartBuilder;
-
-import net.dpml.lang.Type;
-import net.dpml.library.info.Scope;
-import net.dpml.library.Resource;
-
import net.dpml.tools.tasks.PartTask;
-import net.dpml.tools.model.Context;

import org.apache.tools.ant.Project;
import org.apache.tools.ant.Target;

Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/ModuleTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/ModuleTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/ModuleTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,11 +18,8 @@

package net.dpml.tools.tasks;

-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;

import net.dpml.tools.model.Context;


Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PartTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -23,17 +23,12 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URI;
-import java.util.Properties;
import java.util.ArrayList;
import java.util.List;

import net.dpml.lang.Classpath;
import net.dpml.lang.Category;

-import net.dpml.transit.Artifact;
-import net.dpml.transit.Transit;
-import net.dpml.lang.Logger;
-
import net.dpml.part.Part;
import net.dpml.part.Strategy;
import net.dpml.part.Info;
@@ -47,8 +42,6 @@
import net.dpml.tools.model.Context;

import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildException;

/**
@@ -85,6 +78,10 @@

private Strategy m_strategy;

+ /**
+ * Set the build strategy.
+ * @param strategy the build strategy
+ */
public void setStrategy( Strategy strategy )
{
m_strategy = strategy;
@@ -113,6 +110,9 @@
m_output = file;
}

+ /**
+ * Task execution.
+ */
public void execute()
{
Resource resource = getResource();
@@ -121,6 +121,12 @@
writePart( part );
}

+ /**
+ * Construct a part using the supplied resource and strategy.
+ * @param resource the resource
+ * @param strategy the strategy
+ * @return the part
+ */
public Part buildPart( Resource resource, Strategy strategy )
{
try
@@ -137,6 +143,10 @@
}
}

+ /**
+ * Externalize the part as a deliverable.
+ * @param part the part to be externalized as XML
+ */
public void writePart( Part part )
{
File file = getOutputFile();
@@ -223,6 +233,11 @@
return resource.getProperty( PLUGIN_DESCRIPTION_KEY );
}

+ /**
+ * Construct the strategy given the supplied resource.
+ * @param resource the resource
+ * @return the strategy
+ */
protected Strategy getStrategy( Resource resource )
{
if( null == m_strategy )
@@ -266,6 +281,12 @@
}
}

+ /**
+ * Construct the classpath for the supplied resource.
+ * @param resource the resource
+ * @return the classpath
+ * @exception IOException is an IO error occurs
+ */
protected Classpath getClasspath( Resource resource ) throws IOException
{
URI[] sysUris = getURIs( resource, Category.SYSTEM );
@@ -330,40 +351,6 @@
}
}

- /*
- private PluginFactory getPluginFactory( String spec ) throws Exception
- {
- if( null == spec )
- {
- return FACTORY;
- }
- else
- {
- URI uri = new URI( spec );
- ClassLoader classloader = Plugin.class.getClassLoader();
- Object[] args = new Object[0];
- Object instance =
- Transit.getInstance().getRepository().getPlugin( classloader,
uri, args );
- if( instance instanceof PluginFactory )
- {
- return (PluginFactory) instance;
- }
- else
- {
- final String error =
- "Plugin factory artifact argument ["
- + spec
- + "] established an instance of ["
- + instance.getClass().getName()
- + "] which is not assignable to "
- + PluginFactory.class.getName()
- + ".";
- throw new IllegalArgumentException( error );
- }
- }
- }
- */
-
/**
* Get the project definition.
* @param project the project
@@ -381,5 +368,4 @@
context.getPath( Scope.TEST ); // triggers path initialization
return context;
}
-
}

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentBuilder.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,27 +18,11 @@

package net.dpml.metro.builder;

-import java.io.File;
import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;

-import javax.xml.XMLConstants;
-
-import net.dpml.state.State;
-import net.dpml.state.Action;
-import net.dpml.state.Trigger.TriggerEvent;
-import net.dpml.state.StateBuilderRuntimeException;
-
import net.dpml.part.DOM3DocumentBuilder;
import net.dpml.lang.BuilderException;
-import net.dpml.part.PartDirective;
import net.dpml.component.ActivationPolicy;

import net.dpml.metro.data.ContextDirective;
@@ -51,17 +35,12 @@
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Priority;
-import net.dpml.metro.info.Type;

import net.dpml.transit.util.ElementHelper;
import net.dpml.lang.Value;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
-import org.w3c.dom.TypeInfo;

/**
* Construct a state graph.
@@ -72,10 +51,16 @@

private static final String SCHEMA_URN = "@COMPONENT-XSD-URI@";

- private static DOM3DocumentBuilder BUILDER = new DOM3DocumentBuilder();
+ private static final DOM3DocumentBuilder BUILDER = new
DOM3DocumentBuilder();

- private static TypeBuilder TYPE_BUILDER = new TypeBuilder();
+ private static final TypeBuilder TYPE_BUILDER = new TypeBuilder();

+ /**
+ * Construct a component directive using the supplied uri.
+ * @param uri the part uri
+ * @return the component directive
+ * @exception IOException if an error occurs during directive creation
+ */
public ComponentDirective loadComponentDirective( URI uri ) throws
IOException
{
if( null == uri )
@@ -99,6 +84,12 @@
}
}

+ /**
+ * Construct a component directive using the supplied DOM element.
+ * @param root the element representing the component directive definition
+ * @return the component directive
+ * @exception Exception if an error occurs during directive creation
+ */
public ComponentDirective buildComponent( Element root ) throws Exception
{
if( null == root )
@@ -277,6 +268,11 @@
}
}

+ /**
+ * Build a value directive using a supplied DOM element.
+ * @param element the DOM element
+ * @return the value directive
+ */
protected ValueDirective buildValueDirective( Element element )
{
String classname = ElementHelper.getAttribute( element, "class" );

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyBuilder.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,14 +19,11 @@
package net.dpml.metro.builder;

import java.net.URI;
-import java.io.Writer;
-import java.io.IOException;
import java.util.Map;

import net.dpml.metro.data.ComponentDirective;

import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
import net.dpml.transit.util.ElementHelper;

import net.dpml.part.Strategy;
@@ -49,11 +46,18 @@
*/
public class ComponentStrategyBuilder extends ComponentStrategyWriter
implements StrategyBuilder, Builder
{
+ /**
+ * Creation of a new component strategy builder.
+ */
public ComponentStrategyBuilder()
{
super( null );
}

+ /**
+ * Creation of a new component strategy builder.
+ * @param map namespace to builder uri map
+ */
public ComponentStrategyBuilder( Map map )
{
super( map );
@@ -61,7 +65,8 @@

/**
* Constructs a component deployment strategy.
- *
+ * @param classloader the base classloader
+ * @param element the DOM element
* @return the deployment strategy
* @exception Exception if an error occurs
*/
@@ -71,9 +76,10 @@
}

/**
- * Constructs a component deployment strategy.
- *
- * @return the deployment strategy
+ * Constructs a type definition.
+ * @param classloader the base classloader
+ * @param element the DOM element
+ * @return the component part strategy
* @exception Exception if an error occurs
*/
public Type buildType( ClassLoader classloader, Element element ) throws
Exception
@@ -85,7 +91,8 @@

/**
* Constructs a component deployment strategy.
- *
+ * @param classloader the base classloader
+ * @param element the DOM element
* @return the deployment strategy
* @exception Exception if an error occurs
*/

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyWriter.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentStrategyWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,38 +19,16 @@
package net.dpml.metro.builder;

import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
import java.io.Writer;
-import java.net.URL;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.util.Map;

import javax.xml.XMLConstants;

-import net.dpml.metro.data.ContextDirective;
-import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.CategoriesDirective;
import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.PartReference;

-import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
-import net.dpml.transit.util.ElementHelper;
-
import net.dpml.part.Strategy;
-import net.dpml.part.StrategyBuilder;
-import net.dpml.part.PartDirective;
-import net.dpml.lang.BuilderException;
import net.dpml.part.ValueBuilder;
-import net.dpml.lang.Type;

-import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;
-
/**
* Component part handler.
*
@@ -59,18 +37,16 @@
*/
public class ComponentStrategyWriter extends ValueBuilder
{
- final String CONTROLLER_URI = "@CONTROLLER-URI@";
- final String BUILDER_URI = "@BUILDER-URI@";
- final String COMPONENT_XSD_URI = "@COMPONENT-XSD-URI@";
+ static final String CONTROLLER_URI = "@CONTROLLER-URI@";
+ static final String BUILDER_URI = "@BUILDER-URI@";

+ private static final String COMPONENT_XSD_URI = "@COMPONENT-XSD-URI@";
private static final String XML_HEADER =
"<?xml version=\"1.0\"?>";
-
private static final String TYPE_SCHEMA_URN = "@TYPE-XSD-URI@";
private static final String STATE_SCHEMA_URN = "@STATE-XSD-URI@";
private static final String PART_SCHEMA_URN = "@PART-XSD-URI@";
private static final String COMPONENT_SCHEMA_URN = "@COMPONENT-XSD-URI@";
-
private static final String PARTIAL_COMPONENT_HEADER =
"<component xmlns=\""
+ COMPONENT_SCHEMA_URN
@@ -85,13 +61,24 @@
+ COMPONENT_SCHEMA_URN
+ "\"";

- final ComponentBuilder BUILDER = new ComponentBuilder();
+ static final ComponentBuilder BUILDER = new ComponentBuilder();

+ /**
+ * Creation of a new component strategy writer.
+ * @param map the namespace to builder uri map
+ */
public ComponentStrategyWriter( Map map )
{
super( map );
}

+ /**
+ * Write a component strategy to an output stream writer.
+ * @param writer the output stream writer
+ * @param strategy the strategy instance
+ * @param pad the character offset to apply
+ * @exception IOException if an IO error occurs
+ */
public void writeStrategy(
Writer writer, Strategy strategy, String pad ) throws IOException
{

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentWriter.java
===================================================================
---
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/main/net/dpml/metro/builder/ComponentWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,17 +22,18 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
-import java.net.URL;
-import java.net.URI;
-import java.net.URISyntaxException;

import javax.xml.XMLConstants;

+import net.dpml.component.ActivationPolicy;
+import net.dpml.component.Directive;
+
+import net.dpml.lang.Value;
+
import net.dpml.metro.data.ContextDirective;
import net.dpml.metro.data.CategoryDirective;
import net.dpml.metro.data.CategoriesDirective;
import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.data.LookupDirective;
import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.info.LifestylePolicy;
@@ -40,23 +41,8 @@
import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Priority;

-import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
-import net.dpml.transit.util.ElementHelper;
-
-import net.dpml.part.Strategy;
-import net.dpml.part.StrategyBuilder;
-import net.dpml.part.PartDirective;
-import net.dpml.lang.BuilderException;
import net.dpml.part.PartBuilder;
-import net.dpml.lang.Type;

-import net.dpml.component.ActivationPolicy;
-import net.dpml.component.Directive;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;
-
/**
* Component part handler.
*
@@ -65,17 +51,13 @@
*/
public class ComponentWriter extends PartBuilder
{
- private final String CONTROLLER_URI = "@CONTROLLER-URI@";
- private final String BUILDER_URI = "@BUILDER-URI@";
-
- private static final String XML_HEADER =
- "<?xml version=\"1.0\"?>";
-
+ private static final String CONTROLLER_URI = "@CONTROLLER-URI@";
+ private static final String BUILDER_URI = "@BUILDER-URI@";
+ private static final String XML_HEADER = "<?xml version=\"1.0\"?>";
private static final String TYPE_SCHEMA_URN = "@TYPE-XSD-URI@";
private static final String STATE_SCHEMA_URN = "@STATE-XSD-URI@";
private static final String PART_SCHEMA_URN = "@PART-XSD-URI@";
private static final String COMPONENT_SCHEMA_URN = "@COMPONENT-XSD-URI@";
-
private static final String PARTIAL_COMPONENT_HEADER =
"<component xmlns=\""
+ COMPONENT_SCHEMA_URN
@@ -90,6 +72,12 @@
+ COMPONENT_SCHEMA_URN
+ "\"";

+ /**
+ * Export a component directive to an output stream as XML.
+ * @param directive the component directive
+ * @param output the output stream
+ * @exception IOException if an IO error occurs
+ */
public void export( ComponentDirective directive, OutputStream output )
throws IOException
{
final Writer writer = new OutputStreamWriter( output );
@@ -106,12 +94,27 @@
output.close();
}

+ /**
+ * Export a component directive to an output stream as XML.
+ * @param writer the print writer
+ * @param directive the component directive
+ * @param pad character offset
+ * @exception IOException if an IO error occurs
+ */
public void writeComponent(
Writer writer, ComponentDirective directive, String pad ) throws
IOException
{
writeTaggedComponent( writer, directive, null, pad );
}

+ /**
+ * Export a tagged component directive to an output stream as XML.
+ * @param writer the print writer
+ * @param directive the component directive
+ * @param key the key identifying the component
+ * @param pad character offset
+ * @exception IOException if an IO error occurs
+ */
public void writeTaggedComponent(
Writer writer, ComponentDirective directive, String key, String pad )
throws IOException
{
@@ -234,13 +237,9 @@
{
return true;
}
- else if( "".equals( value ) )
- {
- return true;
- }
else
{
- return false;
+ return "".equals( value );
}
}

@@ -295,6 +294,13 @@
}
}

+ /**
+ * Write a collection of part references.
+ * @param writer the writer
+ * @param parts the part refernece array
+ * @param pad the offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeParts(
Writer writer, PartReference[] parts, String pad ) throws IOException
{
@@ -404,6 +410,14 @@
}
}

+ /**
+ * Write a context entry.
+ * @param writer the writer
+ * @param key the entry key
+ * @param value the value directive
+ * @param pad the offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeEntry( Writer writer, String key, ValueDirective
value, String pad ) throws IOException
{
String target = value.getTargetExpression();

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeBuilder.java
===================================================================
--- trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,14 +19,11 @@
package net.dpml.metro.builder;

import java.io.IOException;
-import java.io.OutputStream;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;

-import javax.xml.XMLConstants;
-
import net.dpml.metro.info.Type;
import net.dpml.metro.info.InfoDescriptor;
import net.dpml.metro.info.ContextDescriptor;
@@ -34,7 +31,6 @@
import net.dpml.metro.info.ServiceDescriptor;
import net.dpml.metro.info.EntryDescriptor;
import net.dpml.metro.info.PartReference;
-import net.dpml.metro.info.Descriptor;
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.info.LifestylePolicy;
import net.dpml.metro.info.ThreadSafePolicy;
@@ -44,8 +40,8 @@
import net.dpml.lang.Version;

import net.dpml.lang.BuilderException;
+
import net.dpml.part.DOM3DocumentBuilder;
-import net.dpml.part.ValueBuilder;

import net.dpml.state.State;
import net.dpml.state.impl.StateBuilder;
@@ -54,7 +50,6 @@
import net.dpml.transit.util.ElementHelper;

import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;
import org.w3c.dom.Document;


@@ -68,8 +63,14 @@
{
private static final StateBuilder STATE_BUILDER = new StateBuilder();

- private static DOM3DocumentBuilder BUILDER = new DOM3DocumentBuilder();
+ private static final DOM3DocumentBuilder BUILDER = new
DOM3DocumentBuilder();

+ /**
+ * Load a type.
+ * @param subject the component implementation class
+ * @return the component type descriptor
+ * @exception IOException if an error occurs reading the type definition
+ */
public Type loadType( Class subject ) throws IOException
{
String classname = subject.getName();
@@ -100,6 +101,12 @@
}
}

+ /**
+ * Load a type.
+ * @param uri the component type source uri
+ * @return the component type descriptor
+ * @exception IOException if an error occurs reading the type definition
+ */
public Type loadType( URI uri ) throws IOException
{
try

Modified:
trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeWriter.java
===================================================================
--- trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/builder/src/main/net/dpml/metro/builder/TypeWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,9 +22,6 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
-import java.net.URL;
-import java.net.URI;
-import java.net.URISyntaxException;

import javax.xml.XMLConstants;

@@ -40,14 +37,8 @@
import net.dpml.state.State;
import net.dpml.state.impl.StateBuilder;

-import net.dpml.part.DOM3DocumentBuilder;
import net.dpml.part.ValueWriter;

-import org.w3c.dom.Element;
-import org.w3c.dom.TypeInfo;
-import org.w3c.dom.Document;
-
-
/**
* Type builder.
*
@@ -84,6 +75,12 @@

private static final String FOOTER = "</type>";

+ /**
+ * Write the supplied type to an output stream.
+ * @param type the type descriptor
+ * @param output the output stream
+ * @exception IOException if an IO error occurs
+ */
public void export( Type type, OutputStream output ) throws IOException
{
final Writer writer = new OutputStreamWriter( output );

Modified:
trunk/main/metro/builder/src/test/net/dpml/metro/builder/LookupTestCase.java
===================================================================
---
trunk/main/metro/builder/src/test/net/dpml/metro/builder/LookupTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/test/net/dpml/metro/builder/LookupTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,14 +19,9 @@
package net.dpml.metro.builder;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

import net.dpml.component.Directive;
-import net.dpml.lang.Value;

import net.dpml.metro.info.PartReference;
import net.dpml.metro.data.ContextDirective;

Modified:
trunk/main/metro/builder/src/test/net/dpml/metro/builder/MinimalTestCase.java
===================================================================
---
trunk/main/metro/builder/src/test/net/dpml/metro/builder/MinimalTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/test/net/dpml/metro/builder/MinimalTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,14 +19,8 @@
package net.dpml.metro.builder;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

-import net.dpml.part.Strategy;
-
import net.dpml.metro.data.ComponentDirective;

import junit.framework.TestCase;
@@ -49,10 +43,6 @@
m_builder = new ComponentBuilder();
}

- public void testNothing()
- {
- }
-
/**
* List the state graph.
* @exception Exception if an error occurs

Modified:
trunk/main/metro/builder/src/test/net/dpml/metro/builder/PartsTestCase.java
===================================================================
---
trunk/main/metro/builder/src/test/net/dpml/metro/builder/PartsTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/test/net/dpml/metro/builder/PartsTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell.
+ * Copyright 2005-2006 Stephen J. McConnell.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,10 +19,6 @@
package net.dpml.metro.builder;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

import net.dpml.component.Directive;

Modified:
trunk/main/metro/builder/src/test/net/dpml/metro/builder/TypesTestCase.java
===================================================================
---
trunk/main/metro/builder/src/test/net/dpml/metro/builder/TypesTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/builder/src/test/net/dpml/metro/builder/TypesTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell.
+ * Copyright 2005-2006 Stephen J. McConnell.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,18 +19,11 @@
package net.dpml.metro.builder;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

-import net.dpml.part.Strategy;
-
import net.dpml.metro.info.Type;
import net.dpml.metro.info.ContextDescriptor;
import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.metro.info.PartReference;

import junit.framework.TestCase;


Modified:
trunk/main/metro/model/src/main/net/dpml/metro/data/DeploymentDirective.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/data/DeploymentDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/model/src/main/net/dpml/metro/data/DeploymentDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -201,7 +201,7 @@
}
else
{
- return m_categories.equals(
profile.getCategoriesDirective() ) ;
+ return m_categories.equals(
profile.getCategoriesDirective() );
}
}
else

Modified:
trunk/main/metro/model/src/main/net/dpml/metro/data/LookupDirective.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/data/LookupDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/model/src/main/net/dpml/metro/data/LookupDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.metro.data;

-import java.net.URI;
-
import net.dpml.component.Directive;

/**

Modified: trunk/main/metro/model/src/main/net/dpml/metro/info/Type.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/info/Type.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/model/src/main/net/dpml/metro/info/Type.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,19 +19,7 @@

package net.dpml.metro.info;

-import java.beans.Encoder;
-import java.beans.XMLEncoder;
-import java.beans.XMLDecoder;
-import java.beans.ExceptionListener;
-import java.beans.Expression;
-import java.beans.DefaultPersistenceDelegate;
import java.io.Serializable;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URL;

import net.dpml.state.State;

@@ -303,6 +291,11 @@
return hash;
}

+ /**
+ * Utility operation to construct a default type given a supplied class.
+ * @param clazz the component implementation class
+ * @return the defalt type descriptor for the class
+ */
public static Type createType( Class clazz )
{
final InfoDescriptor info = new InfoDescriptor( "object",
clazz.getName() );

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,27 +18,13 @@

package net.dpml.metro.data.test;

-import java.io.File;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.Encoder;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
-import java.beans.Expression;
-import java.beans.DefaultPersistenceDelegate;
-import java.net.URI;

import junit.framework.TestCase;

-import net.dpml.metro.data.ComponentDirective;
-
/**
* AbstractEncodingTestCase.
*

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.metro.data.test;

-import java.net.URI;
-
import net.dpml.metro.data.ComponentDirective;
import net.dpml.metro.data.CategoriesDirective;
import net.dpml.metro.data.CategoryDirective;
@@ -36,8 +34,6 @@

import net.dpml.component.ActivationPolicy;

-import net.dpml.lang.Category;
-
/**
* ComponentDirectiveTestCase
*

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/info/test/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/info/test/AbstractEncodingTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/model/src/test/net/dpml/metro/info/test/AbstractEncodingTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,19 +18,6 @@

package net.dpml.metro.info.test;

-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.Encoder;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
-import java.beans.Expression;
-import java.beans.DefaultPersistenceDelegate;
-import java.net.URI;
-
import junit.framework.TestCase;

/**

Modified:
trunk/main/metro/model/src/test/net/dpml/metro/info/test/EntryDescriptorTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/info/test/EntryDescriptorTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/model/src/test/net/dpml/metro/info/test/EntryDescriptorTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -21,14 +21,9 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;

import junit.framework.TestCase;


Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/ComponentController.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,33 +20,15 @@

import java.io.File;
import java.io.IOException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.rmi.RemoteException;
import java.util.Map;
-import java.util.ArrayList;

-import net.dpml.metro.info.Type;
-import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.metro.info.ServiceDescriptor;
-import net.dpml.metro.data.LookupDirective;
-import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.ComponentModel;
-import net.dpml.metro.ContextModel;
-import net.dpml.metro.PartsManager;
-import net.dpml.metro.builder.TypeBuilder;
-
import net.dpml.configuration.Configuration;

-import net.dpml.logging.Logger;
-
-import net.dpml.parameters.Parameters;
-
import net.dpml.component.Directive;
import net.dpml.component.ControlException;
import net.dpml.component.Component;
@@ -54,13 +36,24 @@
import net.dpml.component.ServiceNotFoundException;

import net.dpml.lang.Version;
-import net.dpml.lang.Category;
import net.dpml.lang.Classpath;
import net.dpml.lang.UnknownKeyException;
-
import net.dpml.lang.Value;

+import net.dpml.logging.Logger;

+import net.dpml.metro.info.Type;
+import net.dpml.metro.info.EntryDescriptor;
+import net.dpml.metro.info.ServiceDescriptor;
+import net.dpml.metro.data.LookupDirective;
+import net.dpml.metro.data.ComponentDirective;
+import net.dpml.metro.ComponentModel;
+import net.dpml.metro.ContextModel;
+import net.dpml.metro.PartsManager;
+import net.dpml.metro.builder.TypeBuilder;
+
+import net.dpml.parameters.Parameters;
+
/**
* The ComponentController class is a controller of a component instance.
*
@@ -664,56 +657,6 @@
+ "].";
throw new ControllerException( error, ee );
}
-
- /*
- URI uri = ref.getURI();
- String scheme = uri.getScheme();
- if( "service".equals( scheme ) || "lookup".equals(
scheme ) )
- {
- String spec = uri.getSchemeSpecificPart();
- ServiceDescriptor request = new ServiceDescriptor(
spec );
- DefaultService service = loadService( handler,
request );
-
- try
- {
- return executeLookup( handler, service );
- }
- catch( Exception ee )
- {
- final String error =
- "Unable to resolve a service provider for the
class ["
- + request.getClassname()
- + "] requested in component ["
- + handler.getPath()
- + "] under the context key ["
- + key
- + "].";
- throw new ControllerException( error, ee );
- }
- }
- else if( "registry".equals( scheme ) )
- {
- try
- {
- return uri.toURL().getContent();
- }
- catch( Exception ee )
- {
- final String error =
- "Unable to dereference rmi registry reference."
- + "\nHandler: " + handler
- + "\nKey: " + key
- + "\nURI: " + uri;
- throw new ControllerException( error, ee );
- }
- }
- else
- {
- final String error =
- "Service lookup scheme [" + scheme + "] not
recognized.";
- throw new ControllerException( error );
- }
- */
}
else
{

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/CompositionController.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.Map;
import java.util.Hashtable;
-import java.lang.reflect.InvocationTargetException;

import net.dpml.logging.Logger;

@@ -36,7 +35,6 @@

import net.dpml.component.Controller;
import net.dpml.component.ControlException;
-import net.dpml.component.DelegationException;
import net.dpml.component.Directive;
import net.dpml.component.ControllerContext;
import net.dpml.component.ControllerContextListener;
@@ -46,7 +44,6 @@

import net.dpml.part.Part;
import net.dpml.part.PartBuilder;
-import net.dpml.part.PartHandler;
import net.dpml.part.StandardPartHandler;
import net.dpml.part.Strategy;

@@ -139,6 +136,7 @@
* Build a classloader stack.
* @param anchor the anchor classloader to server as the classloader
chain root
* @param classpath the part classpath definition
+ * @return the new classloader
* @exception IOException if an IO error occurs during classpath
evaluation
*/
public ClassLoader getClassLoader( ClassLoader anchor, Classpath
classpath ) throws IOException
@@ -152,6 +150,7 @@
* @param classpath the part classpath definition
* @param data the part deployment data
* @param args supplimentary arguments
+ * @return the instantiated service
* @exception Exception if a deployment error occurs
*/
public Object getInstance(

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -57,7 +57,6 @@
import net.dpml.component.Service;
import net.dpml.component.ModelListener;
import net.dpml.component.ModelEvent;
-import net.dpml.component.Model;

import net.dpml.lang.Version;
import net.dpml.lang.Classpath;

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -44,7 +44,6 @@
import net.dpml.component.ControlException;
import net.dpml.component.ModelListener;
import net.dpml.component.ModelEvent;
-import net.dpml.component.Model;

import net.dpml.configuration.Configuration;
import net.dpml.configuration.Configurable;

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -41,7 +41,6 @@
import net.dpml.component.ModelException;
import net.dpml.component.ModelListener;
import net.dpml.component.ModelEvent;
-import net.dpml.component.Model;

import net.dpml.lang.UnknownKeyException;


Modified: trunk/main/metro/state/api/src/main/net/dpml/state/Trigger.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/Trigger.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/Trigger.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,12 +18,6 @@

package net.dpml.state;

-import java.beans.Expression;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-import java.beans.SimpleBeanInfo;
-import java.beans.Encoder;
-
/**
* Interface describing a condition within which an action may be invoked.
*

Modified:
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/DefaultStateMachine.java
===================================================================
---
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/DefaultStateMachine.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/DefaultStateMachine.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -23,7 +23,6 @@
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
-import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.util.ArrayList;
@@ -34,7 +33,6 @@
import net.dpml.state.Transition;
import net.dpml.state.Operation;
import net.dpml.state.Interface;
-import net.dpml.state.StateBuilderRuntimeException;
import net.dpml.state.Trigger;
import net.dpml.state.Trigger.TriggerEvent;
import net.dpml.state.Action;

Modified:
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateBuilder.java
===================================================================
---
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,16 +18,8 @@

package net.dpml.state.impl;

-import java.io.File;
import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;

import javax.xml.XMLConstants;

@@ -42,10 +34,6 @@

import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
-import org.w3c.dom.TypeInfo;

/**
* Construct a state graph.
@@ -67,8 +55,15 @@

private static final String STATE_FOOTER = "</state>";

- private static DOM3DocumentBuilder BUILDER = new DOM3DocumentBuilder();
+ private static final DOM3DocumentBuilder BUILDER = new
DOM3DocumentBuilder();

+ /**
+ * Load a state graph.
+ * @param uri the graph uri
+ * @return the constructed state graph
+ * @exception IOException if an IO error occurs while reading the
+ * graph data
+ */
public State loadState( URI uri ) throws IOException
{
if( null == uri )
@@ -92,6 +87,11 @@
}
}

+ /**
+ * Build a state graph.
+ * @param element a DOM element representing the root of the state graph
+ * @return the constructed state
+ */
public State buildStateGraph( Element element )
{
if( null == element )

Modified:
trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateWriter.java
===================================================================
--- trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/state/impl/src/main/net/dpml/state/impl/StateWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,41 +18,21 @@

package net.dpml.state.impl;

-import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;

import javax.xml.XMLConstants;

import net.dpml.state.State;
import net.dpml.state.Action;
import net.dpml.state.Trigger.TriggerEvent;
-import net.dpml.state.StateBuilderRuntimeException;
-
-import net.dpml.part.DOM3DocumentBuilder;
-
-import net.dpml.transit.util.ElementHelper;
-
import net.dpml.state.Trigger;
-import net.dpml.state.State;
import net.dpml.state.Transition;
import net.dpml.state.Operation;
import net.dpml.state.Interface;

-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
-import org.w3c.dom.TypeInfo;
-
/**
* Construct a state graph.
*/
@@ -98,6 +78,13 @@
output.close();
}

+ /**
+ * Write the state.
+ * @param writer the stream writer
+ * @param state the state to externalize
+ * @param pad the pad offset
+ * @exception IOException if an IO error occurs
+ */
public void writeState( Writer writer, State state, String pad ) throws
IOException
{
if( isEmpty( state ) )

Modified:
trunk/main/metro/state/impl/src/test/net/dpml/state/EmptyTestCase.java
===================================================================
--- trunk/main/metro/state/impl/src/test/net/dpml/state/EmptyTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/state/impl/src/test/net/dpml/state/EmptyTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,23 +19,12 @@
package net.dpml.state;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

-import net.dpml.state.State;
-import net.dpml.state.Transition;
-import net.dpml.state.Operation;
-import net.dpml.state.Interface;
-import net.dpml.state.Trigger;
-import net.dpml.state.Action;
+import net.dpml.state.impl.StateBuilder;

import junit.framework.TestCase;

-import net.dpml.state.impl.StateBuilder;
-
/**
* Default state machine test-case.
*

Modified:
trunk/main/metro/state/impl/src/test/net/dpml/state/TransitionTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/TransitionTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/state/impl/src/test/net/dpml/state/TransitionTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,23 +19,12 @@
package net.dpml.state;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.util.ArrayList;
-import java.util.List;
import java.net.URI;

-import net.dpml.state.State;
-import net.dpml.state.Transition;
-import net.dpml.state.Operation;
-import net.dpml.state.Interface;
-import net.dpml.state.Trigger;
-import net.dpml.state.Action;
+import net.dpml.state.impl.StateBuilder;

import junit.framework.TestCase;

-import net.dpml.state.impl.StateBuilder;
-
/**
* Default state machine test-case.
*

Modified:
trunk/main/metro/state/impl/src/test/net/dpml/state/test/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/AbstractEncodingTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/state/impl/src/test/net/dpml/state/test/AbstractEncodingTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,20 +18,10 @@

package net.dpml.state.test;

-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
-import java.beans.Encoder;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
-import java.beans.Expression;
-import java.beans.DefaultPersistenceDelegate;
-import java.net.URI;

import junit.framework.TestCase;


Modified:
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,8 +19,6 @@
package net.dpml.state.test;

import java.io.File;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
import java.util.ArrayList;
import java.util.List;


Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/CatalogTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/CatalogTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/CatalogTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -21,8 +21,6 @@
import java.io.File;
import java.io.FileFilter;
import java.io.FileWriter;
-import java.io.InputStream;
-import java.io.FileInputStream;
import java.io.IOException;
import java.net.URI;
import java.util.List;

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
===================================================================
---
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ComponentBuilderTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.Properties;

import net.dpml.component.Directive;
import net.dpml.metro.data.ComponentDirective;
@@ -45,12 +44,9 @@
import net.dpml.parameters.Parameters;

import net.dpml.component.ActivationPolicy;
-import net.dpml.part.Part;
-import net.dpml.part.PartBuilder;
import net.dpml.part.Strategy;
import net.dpml.part.PartDirective;

-import net.dpml.tools.tasks.GenericTask;
import net.dpml.tools.tasks.PartTask;

import org.apache.tools.ant.BuildException;
@@ -99,6 +95,10 @@
m_key = key;
}

+ /**
+ * Set the alias production flag value.
+ * @param alias true if alias production is requested
+ */
public void setAlias( boolean alias )
{
m_alias = alias;

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,7 +19,6 @@
package net.dpml.metro.tools;

import java.io.File;
-import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
@@ -36,7 +35,6 @@
import net.dpml.state.Transition;
import net.dpml.state.impl.StateBuilder;
import net.dpml.state.impl.DefaultState;
-import net.dpml.state.impl.DefaultStateMachine;

import org.apache.tools.ant.Project;
import org.apache.tools.ant.BuildException;

Modified: trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,7 +19,6 @@
package net.dpml.metro.tools;

import java.io.File;
-import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

@@ -27,7 +26,6 @@

import net.dpml.state.State;
import net.dpml.state.impl.StateBuilder;
-import net.dpml.state.impl.DefaultState;

import org.apache.tools.ant.BuildException;


Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -23,7 +23,6 @@
import java.io.InputStream;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.net.URI;
@@ -47,7 +46,6 @@

import net.dpml.state.State;
import net.dpml.state.impl.DefaultState;
-import net.dpml.state.impl.DefaultStateMachine;
import net.dpml.state.impl.StateBuilder;

import net.dpml.library.info.Scope;

Modified: trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypesTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypesTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypesTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,7 +20,6 @@

import java.io.File;
import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.util.LinkedList;

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -15,15 +15,8 @@
*/
package net.dpml.http;

-import java.util.ArrayList;
-
import net.dpml.logging.Logger;

-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.ConfigurationException;
-
-import org.mortbay.jetty.Handler;
-
/**
* Servlet context handler.
*/

Modified: trunk/main/planet/http/impl/src/main/net/dpml/http/ServletEntry.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ServletEntry.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ServletEntry.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -15,9 +15,6 @@
*/
package net.dpml.http;

-import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.jetty.servlet.ServletMapping;
-
/**
* A ServletEntry maintains a mapping between a servlet name and a relative
path.
*/

Modified:
trunk/main/station/api/src/main/net/dpml/station/info/RegistryDescriptor.java
===================================================================
---
trunk/main/station/api/src/main/net/dpml/station/info/RegistryDescriptor.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/api/src/main/net/dpml/station/info/RegistryDescriptor.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,9 +20,6 @@

import java.io.Serializable;
import java.net.URI;
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
import java.util.Arrays;

/**

Modified:
trunk/main/station/api/src/test/net/dpml/station/info/AbstractTestCase.java
===================================================================
---
trunk/main/station/api/src/test/net/dpml/station/info/AbstractTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/api/src/test/net/dpml/station/info/AbstractTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,14 +22,6 @@
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
import java.util.Properties;

import junit.framework.TestCase;

Modified:
trunk/main/station/api/src/test/net/dpml/station/info/ApplicationXMLTestCase.java
===================================================================
---
trunk/main/station/api/src/test/net/dpml/station/info/ApplicationXMLTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/api/src/test/net/dpml/station/info/ApplicationXMLTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -36,6 +36,10 @@
*/
public final class ApplicationXMLTestCase extends TestCase
{
+ /**
+ * Validate the application.xml example.
+ * @exception Exception if an unexpected test error occurs
+ */
public void testExample1() throws Exception
{
Element element = getRootElement( "application.xml" );

Modified:
trunk/main/station/api/src/test/net/dpml/station/info/RegistryXMLTestCase.java
===================================================================
---
trunk/main/station/api/src/test/net/dpml/station/info/RegistryXMLTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/api/src/test/net/dpml/station/info/RegistryXMLTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -23,7 +23,6 @@
import junit.framework.TestCase;

import net.dpml.part.DOM3DocumentBuilder;
-import net.dpml.transit.util.ElementHelper;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -36,6 +35,10 @@
*/
public final class RegistryXMLTestCase extends TestCase
{
+ /**
+ * Validate the registry.xml example.
+ * @exception Exception if an unexpected test error occurs
+ */
public void testRegistryXML() throws Exception
{
Element element = getRootElement( "registry.xml" );

Modified:
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryBuilder.java
===================================================================
---
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -48,6 +48,12 @@
private static final DOM3DocumentBuilder DOCUMENT_BUILDER =
new DOM3DocumentBuilder();

+ /**
+ * Build a registry descriptior from a uri.
+ * @param uri the uri to the descriptor XML document
+ * @return the registry descriptor
+ * @exception Exception if an error occurs
+ */
public Object build( URI uri ) throws Exception
{
Document document = DOCUMENT_BUILDER.parse( uri );
@@ -55,6 +61,13 @@
return build( null, root );
}

+ /**
+ * Build a registry descriptior from a DOM element.
+ * @param classloader the base classloader
+ * @param element the element representing the root registry
+ * @return the registry descriptor
+ * @exception Exception if an error occurs
+ */
public Object build( ClassLoader classloader, Element element ) throws
Exception
{
String tag = element.getTagName();
@@ -193,6 +206,11 @@
}
}

+ /**
+ * Construct a value directive array.
+ * @param elements the array of DOM elements representing value directive
assertions
+ * @return the array of value directives
+ */
protected ValueDirective[] buildValueDirectives( Element[] elements )
{
ValueDirective[] values = new ValueDirective[ elements.length ];
@@ -203,6 +221,11 @@
return values;
}

+ /**
+ * Construct a single value directive.
+ * @param element the DOM element representing the value directive
assertions
+ * @return the value directive
+ */
protected ValueDirective buildValueDirective( Element element )
{
String classname = ElementHelper.getAttribute( element, "class" );

Modified:
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryWriter.java
===================================================================
---
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/builder/src/main/net/dpml/station/builder/RegistryWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,7 +18,6 @@

package net.dpml.station.builder;

-import java.net.URI;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
@@ -30,17 +29,8 @@
import net.dpml.station.info.ApplicationDescriptor;
import net.dpml.station.info.StartupPolicy;

-import net.dpml.part.DOM3DocumentBuilder;
-
-import net.dpml.lang.BuilderException;
-import net.dpml.lang.Builder;
-
import net.dpml.lang.ValueDirective;
-import net.dpml.transit.util.ElementHelper;

-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
/**
* Test example application sources.
*
@@ -151,6 +141,13 @@
}
}

+ /**
+ * Write a value directive array.
+ * @param writer the stream writer
+ * @param values the array of value directives
+ * @param pad character offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeValueDirectives( Writer writer, ValueDirective[]
values, String pad ) throws IOException
{
for( int i=0; i<values.length; i++ )
@@ -160,6 +157,13 @@
}
}

+ /**
+ * Write a single value directive.
+ * @param writer the stream writer
+ * @param value the value directive
+ * @param pad character offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeValueDirective( Writer writer, ValueDirective value,
String pad ) throws IOException
{
String method = value.getMethodName();

Modified:
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -28,33 +28,26 @@
import java.io.File;
import java.io.IOException;
import java.io.FileInputStream;
-import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileOutputStream;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;

+import net.dpml.lang.Logger;
+import net.dpml.lang.UnknownKeyException;
+import net.dpml.lang.DuplicateKeyException;
+
import net.dpml.station.ApplicationRegistry;
import net.dpml.station.RegistryEvent;
import net.dpml.station.RegistryListener;
import net.dpml.station.builder.RegistryBuilder;
import net.dpml.station.builder.RegistryWriter;
-import net.dpml.station.info.StartupPolicy;
import net.dpml.station.info.ApplicationDescriptor;
import net.dpml.station.info.RegistryDescriptor;
import net.dpml.station.info.RegistryDescriptor.Entry;
import net.dpml.station.info.ApplicationRegistryRuntimeException;

import net.dpml.transit.util.StreamUtils;
-import net.dpml.lang.Logger;

-import net.dpml.lang.UnknownKeyException;
-import net.dpml.lang.DuplicateKeyException;
-
/**
* Implements of the application registry within which a set of application
profiles
* are maintained.
@@ -71,7 +64,7 @@
* Creation of a new application registry model.
* @param logger the assigned logging channel
* @param url storage location
- * @exception IOException if a I/O error occurs
+ * @exception Exception if an error occurs
*/
public RemoteApplicationRegistry( Logger logger, URL url ) throws
Exception
{
@@ -273,89 +266,10 @@
OutputStream dest = m_url.openConnection().getOutputStream();
StreamUtils.copyStream( input, dest, true );
getLogger().debug( "updated registry: " + m_url );
-
- /*
- ClassLoader current =
Thread.currentThread().getContextClassLoader();
- ClassLoader context = StartupPolicy.class.getClassLoader();
- Thread.currentThread().setContextClassLoader( context );
- File file = File.createTempFile( "dpml-station", ".xml" );
- FileOutputStream output = new FileOutputStream( file );
- Entry[] entries = getEntries();
-
- RegistryDescriptor descriptor = new RegistryDescriptor( entries
);
- BufferedOutputStream buffer = new BufferedOutputStream( output );
- XMLEncoder encoder = new XMLEncoder( buffer );
- encoder.setExceptionListener( new RegistryEncoderListener() );
- try
- {
- encoder.writeObject( descriptor );
- }
- catch( Throwable e )
- {
- final String error =
- "Encoding error.\n"
- + context.toString();
- getLogger().error( error, e );
- IOException exception = new IOException( error );
- exception.initCause( e );
- throw exception;
- }
- finally
- {
- encoder.close();
- Thread.currentThread().setContextClassLoader( current );
- }
-
- FileInputStream input = new FileInputStream( file );
- OutputStream dest = m_url.openConnection().getOutputStream();
- StreamUtils.copyStream( input, dest, true );
- getLogger().debug( "updated registry: " + m_url );
- */
}
}

/**
- * Encoding exception listener.
- */
- private final class RegistryEncoderListener implements ExceptionListener
- {
- /**
- * Catch an encoding exception.
- * @param e the encoding exception
- */
- public void exceptionThrown( Exception e )
- {
- Throwable cause = e.getCause();
- if( e instanceof EncodingRuntimeException )
- {
- throw (EncodingRuntimeException) e;
- }
- final String error =
- "An unexpected error occured while attempting to encode the
registry."
- + "\nTarget URL: " + m_url
- + "\nCause: " + e.getClass().getName()
- + "\nMessage: " + e.getMessage();
- throw new EncodingRuntimeException( error, e );
- }
- }
-
- /**
- * EncodingRuntimeException.
- */
- private static class EncodingRuntimeException extends RuntimeException
- {
- /**
- * Creation of a new <tt>EncodingRuntimeException</tt>.
- * @param message the exception message
- * @param cause the causal exception
- */
- public EncodingRuntimeException( String message, Throwable cause )
- {
- super( message, cause );
- }
- }
-
- /**
* Add a depot content change listener.
* @param listener the registry change listener to add
*/

Modified:
trunk/main/station/server/src/test/net/dpml/station/server/RemoteApplicationRegistryTestCase.java
===================================================================
---
trunk/main/station/server/src/test/net/dpml/station/server/RemoteApplicationRegistryTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/station/server/src/test/net/dpml/station/server/RemoteApplicationRegistryTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -29,16 +29,16 @@
import net.dpml.station.RegistryListener;
import net.dpml.station.RegistryEvent;

-import net.dpml.transit.Artifact;
-import net.dpml.transit.Transit;
import net.dpml.lang.Logger;
import net.dpml.lang.ValueDirective;
-import net.dpml.transit.monitor.LoggingAdapter;
-
import net.dpml.lang.UnknownKeyException;
import net.dpml.lang.DuplicateKeyException;

+import net.dpml.transit.Artifact;
+import net.dpml.transit.monitor.LoggingAdapter;

+
+
/**
* The RemoteApplicationRegistryTestCase class validates the application
registry
* implementation.

Modified:
trunk/main/transit/console/src/main/net/dpml/transit/console/TransitConsoleHandler.java
===================================================================
---
trunk/main/transit/console/src/main/net/dpml/transit/console/TransitConsoleHandler.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/console/src/main/net/dpml/transit/console/TransitConsoleHandler.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,14 +18,8 @@

package net.dpml.transit.console;

-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
import java.io.IOException;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
import java.io.OutputStream;
-import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.lang.reflect.InvocationTargetException;
@@ -50,8 +44,11 @@
import net.dpml.cli.validation.URLValidator;
import net.dpml.cli.validation.NumberValidator;

-import net.dpml.transit.Artifact;
import net.dpml.lang.Logger;
+import net.dpml.lang.UnknownKeyException;
+import net.dpml.lang.ValueDirective;
+
+import net.dpml.transit.Artifact;
import net.dpml.transit.Transit;
import net.dpml.transit.TransitBuilder;
import net.dpml.transit.RepositoryException;
@@ -62,10 +59,8 @@
import net.dpml.transit.info.HostDirective;
import net.dpml.transit.info.LayoutDirective;
import net.dpml.transit.info.ContentDirective;
-import net.dpml.lang.ValueDirective;
import net.dpml.transit.util.ExceptionHelper;

-import net.dpml.lang.UnknownKeyException;

/**
* Transit Plugin that provides support for the configuration of the Transit
subsystem.

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Builder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Builder.java 2006-03-18
16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Builder.java 2006-03-18
20:35:20 UTC (rev 1216)
@@ -25,5 +25,12 @@
*/
public interface Builder
{
- Object build( ClassLoader classoader, Element element ) throws Exception;
+ /**
+ * Create an object using a supplied classloader and DOM element.
+ * @param classloader the base classloader
+ * @param element the DOM element
+ * @return an object
+ * @exception Exception if an error occurs
+ */
+ Object build( ClassLoader classloader, Element element ) throws
Exception;
}

Modified: trunk/main/transit/core/src/main/net/dpml/lang/BuilderException.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/BuilderException.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/BuilderException.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -21,26 +21,48 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;

+/**
+ * Exception related to data construction from a DOM element.
+ */
public class BuilderException extends RuntimeException
{
private final Element m_element;

+ /**
+ * Create a new vuilder exception instance.
+ * @param element the element representing the source of the error
+ * @param message the exception message
+ */
public BuilderException( Element element, String message )
{
this( element, message, null );
}

+ /**
+ * Create a new vuilder exception instance.
+ * @param element the element representing the source of the error
+ * @param message the exception message
+ * @param cause the causal exception
+ */
public BuilderException( Element element, String message, Throwable
cause )
{
super( message, cause );
m_element = element;
}

+ /**
+ * Get the element that is the subject of this exception.
+ * @return the subject element
+ */
public Element getElement()
{
return m_element;
}

+ /**
+ * Return a string representation of the exception.
+ * @return the string value
+ */
public String getMessage()
{
try

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Classpath.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Classpath.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Classpath.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,8 +22,6 @@
import java.io.Serializable;
import java.util.Arrays;

-import net.dpml.lang.Category;
-
/**
* A Plugin class contains immutable data about a plugin based on a
descriptor resolved
* from a 'plugin' artifact.

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Construct.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Construct.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Construct.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -26,10 +26,6 @@
import java.util.Arrays;
import java.util.Map;

-import net.dpml.part.Strategy;
-import net.dpml.part.PartDirective;
-import net.dpml.part.AbstractBuilder;
-
import net.dpml.transit.util.PropertyResolver;

/**

Modified: trunk/main/transit/core/src/main/net/dpml/lang/DefaultType.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/DefaultType.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/DefaultType.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,15 +18,6 @@

package net.dpml.lang;

-import java.io.Writer;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
-import java.util.Map;
-
-import org.w3c.dom.TypeInfo;
-import org.w3c.dom.Element;
-
/**
* Utility used to build a plugin strategy from a DOM element.
*
@@ -40,6 +31,12 @@
private final boolean m_alias;
private final Object m_data;

+ /**
+ * Creation of a new generic type production handler.
+ * @param type the type id
+ * @param alias the alias flag
+ * @param data associated type datastructure
+ */
public DefaultType( String type, boolean alias, Object data )
{
m_type = type;
@@ -47,16 +44,28 @@
m_data = data;
}

+ /**
+ * Return the type production id.
+ * @return the type id
+ */
public String getID()
{
return m_type;
}

+ /**
+ * Return the type production alias flag value.
+ * @return the alias flag
+ */
public boolean getAlias()
{
return m_alias;
}

+ /**
+ * Return the type production datatype.
+ * @return the datatytpe
+ */
public Object getData()
{
return m_data;

Modified: trunk/main/transit/core/src/main/net/dpml/lang/Type.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/lang/Type.java 2006-03-18
16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/lang/Type.java 2006-03-18
20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.lang;

-import org.w3c.dom.Element;
-
/**
* Declaration of a type production.
*
@@ -28,10 +26,22 @@
*/
public interface Type
{
+ /**
+ * Return the type production id.
+ * @return the type id
+ */
String getID();

+ /**
+ * Return the type production alias flag value.
+ * @return the alias flag
+ */
boolean getAlias();

+ /**
+ * Return the type production datatype.
+ * @return the datatytpe
+ */
Object getData();

}

Modified: trunk/main/transit/core/src/main/net/dpml/part/AbstractBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/AbstractBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/AbstractBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,38 +18,18 @@

package net.dpml.part;

-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
import java.util.Map;
import java.util.Hashtable;

-import javax.xml.XMLConstants;
-
-import net.dpml.lang.Category;
-import net.dpml.lang.Classpath;
import net.dpml.lang.Builder;
import net.dpml.lang.BuilderException;
-import net.dpml.lang.Type;

import net.dpml.transit.Artifact;
import net.dpml.transit.Transit;
import net.dpml.transit.Repository;
-import net.dpml.transit.util.ElementHelper;
-import net.dpml.transit.artifact.ArtifactNotFoundException;

-import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
import org.w3c.dom.TypeInfo;

/**
@@ -63,6 +43,10 @@

private final Map m_map; // maps namespace uris to builders

+ /**
+ * Creation of a new abstract builder.
+ * @param map the naespace to builder uri map
+ */
public AbstractBuilder( Map map )
{
if( null == map )
@@ -79,16 +63,32 @@
}
}

+ /**
+ * Return the namespace to builder uri map.
+ * @return the map
+ */
protected Map getMap()
{
return m_map;
}

+ /**
+ * Get the builder based on the namespace declared by the supplied
element.
+ * @param element the DOM element
+ * @return the builder
+ * @exception Exception if an eror occurs
+ */
public Builder getBuilder( Element element ) throws Exception
{
return loadBuilder( element );
}

+ /**
+ * Get a strategy builder based on the namespace declared by the supplied
element.
+ * @param element the DOM element
+ * @return the strategy builder
+ * @exception Exception if an eror occurs
+ */
protected StrategyBuilder getStrategyBuilder( Element element ) throws
Exception
{
Builder builder = loadBuilder( element );
@@ -108,6 +108,12 @@
}
}

+ /**
+ * Get a strategy builder based on the namespace declared by the supplied
element.
+ * @param element the DOM element
+ * @return the strategy builder
+ * @exception Exception if an eror occurs
+ */
protected Builder loadBuilder( Element element ) throws Exception
{
URI uri = getBuilderURI( element );
@@ -127,6 +133,15 @@
return new DelegatingBuilder( uri );
}

+ /**
+ * Internal utility to load a builder using the supplied uri and
validation
+ * that the object established from the uri is type assignable to the
supplied class.
+ *
+ * @param uri the builder part uri
+ * @param clazz the class to test the resolved instance for assignability
+ * @return the object assignable to the supplied class
+ * @exception Exception if an eror occurs
+ */
protected Object loadObjectFromURI( URI uri, Class clazz ) throws
Exception
{
if( LOCAL_URI.equals( uri ) )
@@ -162,6 +177,13 @@
}
}

+ /**
+ * Resolve the builder uri from a supplied element.
+ *
+ * @param element the DOM element
+ * @return the builder uri
+ * @exception Exception if an eror occurs
+ */
protected URI getBuilderURI( Element element ) throws Exception
{
TypeInfo info = element.getSchemaTypeInfo();
@@ -191,17 +213,30 @@
}
}
}
-
+
+ /**
+ * Delegating builder that defers resolution until required.
+ */
private class DelegatingBuilder implements Builder
{
private final URI m_uri;
private Object m_delegate = null;

+ /**
+ * Creation of a new delegating builder instance.
+ * @param uri the uri of the builder that operations will be
delegated to
+ */
DelegatingBuilder( URI uri )
{
m_uri = uri;
}

+ /**
+ * Delegating implementation of the generic element build operation.
+ * @param classloader the base classloader
+ * @param element the subject element
+ * @return the resulting object
+ */
public Object build( ClassLoader classloader, Element element )
throws Exception
{
Object delegate = getDelegate();

Modified:
trunk/main/transit/core/src/main/net/dpml/part/DOM3DocumentBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/DOM3DocumentBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/DOM3DocumentBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,14 +18,11 @@

package net.dpml.part;

-import java.lang.reflect.Method;
import java.net.URI;
import java.net.URL;
import java.net.URISyntaxException;
-import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Map;
-import java.io.Reader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
@@ -33,56 +30,53 @@
import java.io.FileNotFoundException;

import javax.xml.XMLConstants;
-import javax.xml.validation.Validator;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;

-import net.dpml.lang.Logger;
import net.dpml.transit.Artifact;
import net.dpml.transit.util.ExceptionHelper;

-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
import org.w3c.dom.DOMError;
import org.w3c.dom.DOMLocator;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;
import org.w3c.dom.DOMErrorHandler;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.Document;
-import org.w3c.dom.Node;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSOutput;
import org.w3c.dom.ls.LSParser;
-import org.w3c.dom.ls.LSParserFilter;
import org.w3c.dom.ls.LSSerializer;
import org.w3c.dom.ls.LSResourceResolver;
import org.w3c.dom.ls.LSInput;

+/**
+ * Utility class that creates a schema validating DOM3 parser.
+ */
public class DOM3DocumentBuilder
{
private final Map m_map;

+ /**
+ * Creation of a new DOM3 document builder.
+ */
public DOM3DocumentBuilder()
{
this( new Hashtable() );
}

+ /**
+ * Creation of a new DOM3 document builder.
+ * @param map namespace to builder uri map
+ */
public DOM3DocumentBuilder( Map map )
{
m_map = map;
}

+ /**
+ * Parse an xml schema document.
+ * @param uri the document uri
+ * @return the validated document
+ * @exception IOException if an IO error occurs
+ */
public Document parse( URI uri ) throws IOException
{
if( null == uri )
@@ -129,6 +123,12 @@
}
}

+ /**
+ * Write a document to an output stream.
+ * @param doc the document to write
+ * @param output the output stream
+ * @exception Exception if an error occurs
+ */
public void write( Document doc, OutputStream output ) throws Exception
{
DOMImplementationRegistry registry =
@@ -147,16 +147,33 @@
domWriter.write( doc, lsOut );
}

+ /**
+ * Utility class to handle namespace uri resolves.
+ */
private static class InternalResourceResolver implements
LSResourceResolver
{
private final Map m_map;

+ /**
+ * Creation of a new InternalResourceResolver.
+ * @param map the namespace to builder map
+ */
InternalResourceResolver( Map map )
{
m_map = map;
}

- public LSInput resolveResource( String type, String namespace,
String publicId, String systemId, String base )
+ /**
+ * Resolve an LS input.
+ * @param type the node type
+ * @param namespace the node naespace
+ * @param publicId the public id
+ * @param systemId the system id
+ * @param base the base value
+ * @return the LS input instance
+ */
+ public LSInput resolveResource(
+ String type, String namespace, String publicId, String systemId,
String base )
{
if( XMLConstants.W3C_XML_SCHEMA_NS_URI.equals( type ) )
{
@@ -201,10 +218,16 @@
}
}

-
-
+ /**
+ * Internal error handler with lots of room for improvement.
+ */
private static final class InternalErrorHandler implements
DOMErrorHandler
{
+ /**
+ * Handle the supplied error.
+ * @param error the error
+ * @return a boolean value
+ */
public boolean handleError( DOMError error )
{
DOMLocator locator = error.getLocation();
@@ -216,26 +239,21 @@
uri = "";
}
String position = "[" + line + ":" + column + "] " + uri + ", ";
- Node node = locator.getRelatedNode();
- if( null != node )
- {
- System.out.println( "# NODE: " + node );
- }
String message = error.getMessage();
short severity = error.getSeverity();
if( severity == DOMError.SEVERITY_ERROR )
{
- System.out.println("[ERROR]: " + position + message );
+ System.out.println( "[ERROR]: " + position + message );
final String notice = "DOM3 Validation Error: " + position +
message;
throw new RuntimeException( notice );
}
else if( severity == DOMError.SEVERITY_WARNING )
{
- System.out.println("[WARNING]: " + position + message );
+ System.out.println( "[WARNING]: " + position + message );
}
else
{
- System.out.println("[FATAL]: " + position + message );
+ System.out.println( "[FATAL]: " + position + message );
}
return true;
}

Modified: trunk/main/transit/core/src/main/net/dpml/part/DOMInput.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/DOMInput.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/DOMInput.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -1,15 +1,17 @@
/*
- * Copyright 2001, 2002,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
+ * Copyright 2006 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@@ -49,8 +51,7 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-
-public class DOMInput implements LSInput
+class DOMInput implements LSInput
{
private String m_publicId = null;
private String m_systemId = null;

Modified: trunk/main/transit/core/src/main/net/dpml/part/Info.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Info.java 2006-03-18
16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/Info.java 2006-03-18
20:35:20 UTC (rev 1216)
@@ -19,7 +19,6 @@
package net.dpml.part;

import java.io.Serializable;
-import java.net.URI;

/**
* Part info description.
@@ -32,6 +31,11 @@
private final String m_title;
private final String m_description;

+ /**
+ * Creation of a new part info descriptor.
+ * @param title the title of the part
+ * @param description the part description
+ */
public Info( String title, String description )
{
if( null == title )
@@ -72,6 +76,11 @@
return m_description;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -96,6 +105,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_title.hashCode();

Modified: trunk/main/transit/core/src/main/net/dpml/part/Part.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Part.java 2006-03-18
16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/Part.java 2006-03-18
20:35:20 UTC (rev 1216)
@@ -19,22 +19,27 @@
package net.dpml.part;

import java.io.Serializable;
-import java.net.URI;

import net.dpml.lang.Classpath;

/**
- * Interface implemented by part handlers.
+ * Part datastructure.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public class Part implements Serializable
+public final class Part implements Serializable
{
private final Info m_info;
private final Strategy m_strategy;
private final Classpath m_classpath;

+ /**
+ * Creation of a new part datastructure.
+ * @param info the info descriptor
+ * @param strategy the part deployment strategy
+ * @param classpath the part classpath definition
+ */
public Part( Info info, Strategy strategy, Classpath classpath )
{
if( null == info )
@@ -84,6 +89,11 @@
return m_classpath;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -112,6 +122,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_info.hashCode();

Modified: trunk/main/transit/core/src/main/net/dpml/part/PartBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,37 +18,20 @@

package net.dpml.part;

-import java.io.File;
import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
import java.util.Map;

-import javax.xml.XMLConstants;
-
-import net.dpml.lang.Category;
import net.dpml.lang.Classpath;
import net.dpml.lang.Builder;
import net.dpml.lang.BuilderException;

-import net.dpml.transit.Artifact;
import net.dpml.transit.Transit;
import net.dpml.transit.Repository;
import net.dpml.transit.util.ElementHelper;
-import net.dpml.transit.artifact.ArtifactNotFoundException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
-import org.w3c.dom.TypeInfo;

/**
* Construct a part.
@@ -58,22 +41,42 @@
private static final DOM3DocumentBuilder BUILDER =
new DOM3DocumentBuilder();

+ /**
+ * Creation of a new part builder.
+ */
public PartBuilder()
{
this( null );
}

+ /**
+ * Creation of a new part builder.
+ * @param map the namespace to part build uri map
+ */
public PartBuilder( Map map )
{
super( map );
}

+ /**
+ * Load a part from a uri.
+ * @param uri the part uri
+ * @return the part definition
+ * @exception IOException if an IO error occurs
+ */
public Part loadPart( URI uri ) throws IOException
{
ClassLoader base = Part.class.getClassLoader();
return loadPart( base, uri );
}

+ /**
+ * Load a part from a uri.
+ * @param base the base classloader
+ * @param uri the part uri
+ * @return the part definition
+ * @exception IOException if an IO error occurs
+ */
public Part loadPart( ClassLoader base, URI uri ) throws IOException
{
if( null == uri )
@@ -104,11 +107,25 @@
}
}

+ /**
+ * Resolve a part from a DOM element.
+ * @param classloader the classloader
+ * @param element the dom element
+ * @return the part definition
+ * @exception Exception if an error occurs
+ */
public Object build( ClassLoader classloader, Element element ) throws
Exception
{
return buildPart( classloader, element );
}

+ /**
+ * Resolve a part from a DOM element.
+ * @param base the classloader
+ * @param root the dom element
+ * @return the part definition
+ * @exception Exception if an error occurs
+ */
public Part buildPart( ClassLoader base, Element root ) throws Exception
{
if( null == root )
@@ -146,8 +163,6 @@
"Object returned from builder is not a strategy instance.";
throw new BuilderException( strategy, error );
}
- //StrategyBuilder builder = getStrategyBuilder( strategy );
- //return builder.buildStrategy( loader, strategy );
}

private ClassLoader createClassLoader(
@@ -166,6 +181,12 @@
return new Info( title, description );
}

+ /**
+ * Construct the classpath defintion.
+ * @param root the element containing a 'classpath' element.
+ * @return the classpath defintion
+ * @exception Exception if an error occurs
+ */
protected Classpath getClasspath( Element root ) throws Exception
{
Element classpath = ElementHelper.getChild( root, "classpath" );

Modified: trunk/main/transit/core/src/main/net/dpml/part/PartDirective.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -34,11 +34,20 @@
private final URI m_uri;
private final Value[] m_params;

+ /**
+ * Creation of a new part creation directive.
+ * @param uri the part uri
+ */
public PartDirective( URI uri )
{
this( uri, null );
}

+ /**
+ * Creation of a new part creation directive.
+ * @param uri the part uri
+ * @param params an array of value arguments
+ */
public PartDirective( URI uri, Value[] params )
{
if( null == uri )
@@ -74,6 +83,11 @@
return m_params;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -98,6 +112,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_uri.hashCode();

Modified: trunk/main/transit/core/src/main/net/dpml/part/PartHandler.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartHandler.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartHandler.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -19,13 +19,15 @@
package net.dpml.part;

import java.io.IOException;
-import java.io.OutputStream;

import net.dpml.lang.Classpath;

/**
* Interface implemented by part runtime handlers. Handler are identified
* by the uri returned from <tt>Part.getStrategy().getControllerURI()</tt>.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
*/
public interface PartHandler
{
@@ -33,6 +35,7 @@
* Build a classloader stack.
* @param anchor the anchor classloader to server as the classloader
chain root
* @param classpath the part classpath definition
+ * @return the new classloader
* @exception IOException if an IO error occurs during classpath
evaluation
*/
ClassLoader getClassLoader( ClassLoader anchor, Classpath classpath )
throws IOException;
@@ -43,6 +46,7 @@
* @param classpath the part classpath
* @param data the part deployment data
* @param args supplimentary arguments
+ * @return the resolved instance
* @exception Exception if a deployment error occurs
*/
Object getInstance( ClassLoader anchor, Classpath classpath, Object
data, Object[] args ) throws Exception;

Modified:
trunk/main/transit/core/src/main/net/dpml/part/PartHandlerFactory.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartHandlerFactory.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartHandlerFactory.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,16 +18,9 @@

package net.dpml.part;

-import java.io.IOException;
import java.net.URI;
import java.util.Hashtable;

-import net.dpml.lang.Classpath;
-
-import net.dpml.part.PartHandler;
-import net.dpml.part.StandardPartHandler;
-import net.dpml.part.PartDirective;
-
import net.dpml.transit.Transit;
import net.dpml.transit.Repository;
import net.dpml.lang.Value;
@@ -36,8 +29,10 @@

/**
* Factory used to locate part handlers.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
*/
-public class PartHandlerFactory
+public final class PartHandlerFactory
{
private static final StandardPartHandler HANDLER = new
StandardPartHandler();

@@ -45,6 +40,10 @@

private static final PartHandlerFactory FACTORY = new
PartHandlerFactory();

+ /**
+ * Return the singleton part handler factory.
+ * @return the factory instance
+ */
public static PartHandlerFactory getInstance()
{
return FACTORY;
@@ -57,6 +56,7 @@
/**
* Locate or resolve a part handler.
* @param uri the part uri
+ * @return the part handler
* @exception Exception if an error occurs during handler resolution
*/
public PartHandler getPartHandler( URI uri ) throws Exception
@@ -68,6 +68,7 @@
/**
* Locate or resolve a part handler.
* @param directive the part instantiation directive
+ * @return the part handler
* @exception Exception if an error occurs during handler resolution
*/
public PartHandler getPartHandler( PartDirective directive ) throws
Exception
@@ -82,6 +83,7 @@
* Locate or resolve a part handler.
* @param uri the part uri
* @param args part instantiation arguments
+ * @return the part handler
* @exception Exception if an error occurs during handler resolution
*/
public PartHandler getPartHandler( URI uri, Object[] args ) throws
Exception

Modified:
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartStrategyBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartStrategyBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,21 +18,13 @@

package net.dpml.part;

-import java.io.Writer;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
import java.util.Map;

import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
-import net.dpml.transit.util.ElementHelper;
-
-import net.dpml.lang.Type;
-//import net.dpml.lang.TypeBuilder;
import net.dpml.lang.Builder;
-import net.dpml.lang.DefaultType;

+import net.dpml.transit.util.ElementHelper;
+
import org.w3c.dom.TypeInfo;
import org.w3c.dom.Element;

@@ -42,69 +34,56 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public class PartStrategyBuilder extends PartStrategyWriter implements
Builder, StrategyBuilder //, TypeBuilder
+public class PartStrategyBuilder extends PartStrategyWriter implements
Builder, StrategyBuilder
{
private static final PartDirective TRANSIT_DIRECTIVE =
new PartDirective( AbstractBuilder.LOCAL_URI );

+ /**
+ * Creation of a new part strategy builder.
+ */
public PartStrategyBuilder()
{
this( null );
}

+ /**
+ * Creation of a new part strategy builder.
+ * @param map the namespace to part builder uri mapping
+ */
public PartStrategyBuilder( Map map )
{
super( map );
}

+ /**
+ * Return the production type identifier.
+ * @return the constant "part" id
+ */
public String getID()
{
return "part";
}

- public void writeStrategy( Writer writer, Strategy strategy, String pad
) throws IOException
- {
- Object data = strategy.getDeploymentData();
- if( data instanceof Plugin )
- {
- Plugin plugin = (Plugin) data;
- String classname = plugin.getClassname();
- writer.write( "\n <strategy xsi:type=\"plugin\" class=\"" );
- writer.write( classname );
- writer.write( "\"/>" );
- }
- else if( data instanceof Resource )
- {
- Resource resource = (Resource) data;
- String urn = resource.getURN();
- String path = resource.getPath();
- writer.write( "\n <strategy xsi:type=\"resource\"" );
- writer.write( " urn=\"" + urn );
- writer.write( "\" path=\"" + path );
- writer.write( "\"/>" );
- }
- else
- {
- final String error =
- "Unsupported strategy datatype: " + data.getClass().getName();
- throw new IllegalArgumentException( error );
- }
- }
-
- /*
- public Type buildType( ClassLoader classloader, Element element ) throws
Exception
- {
- boolean alias = ElementHelper.getBooleanAttribute( element, "alias",
false );
- Strategy strategy = buildStrategy( classloader, element );
- return new DefaultType( "part", alias, strategy );
- }
+ /**
+ * Build a strategy from a supplied DOM element.
+ * @param classloader the classloader
+ * @param element the strategy element
+ * @return the resolve instance
+ * @exception Exception if an error occurs
*/
-
public Object build( ClassLoader classloader, Element element ) throws
Exception
{
return buildStrategy( classloader, element );
}

+ /**
+ * Build a strategy from a supplied DOM element.
+ * @param classloader the classloader
+ * @param element the strategy element
+ * @return the resolve strategy
+ * @exception Exception if an error occurs
+ */
public Strategy buildStrategy( ClassLoader classloader, Element element
) throws Exception
{
TypeInfo info = element.getSchemaTypeInfo();

Modified:
trunk/main/transit/core/src/main/net/dpml/part/PartStrategyWriter.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartStrategyWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartStrategyWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,17 +20,10 @@

import java.io.Writer;
import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
import java.util.Map;

import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
-import net.dpml.transit.util.ElementHelper;

-import org.w3c.dom.TypeInfo;
-import org.w3c.dom.Element;
-
/**
* Utility used to build a plugin strategy from a DOM element.
*
@@ -39,13 +32,35 @@
*/
public class PartStrategyWriter extends ValueBuilder
{
+ /**
+ * Creation of a new part strategy writer.
+ * @param map the map of namespace to builder uris
+ */
public PartStrategyWriter( Map map )
{
super( map );
}

+ /**
+ * Externalize a strategy.
+ * @param writer the output stream writer
+ * @param strategy the strategy
+ * @exception IOException if an IO error occurs
+ */
public void write( Writer writer, Strategy strategy ) throws IOException
{
+ writeStrategy( writer, strategy, "" );
+ }
+
+ /**
+ * Externalize a strategy.
+ * @param writer the output stream writer
+ * @param strategy the strategy
+ * @param pad the character offset
+ * @exception IOException if an IO error occurs
+ */
+ public void writeStrategy( Writer writer, Strategy strategy, String pad
) throws IOException
+ {
Object data = strategy.getDeploymentData();
if( data instanceof Plugin )
{

Modified: trunk/main/transit/core/src/main/net/dpml/part/PartWriter.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/PartWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/PartWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,16 +18,11 @@

package net.dpml.part;

-import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.io.OutputStreamWriter;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
import java.util.Map;

import javax.xml.XMLConstants;
@@ -35,21 +30,8 @@
import net.dpml.lang.Category;
import net.dpml.lang.Classpath;

-import net.dpml.transit.Artifact;
-import net.dpml.transit.Transit;
-import net.dpml.transit.Repository;
-import net.dpml.transit.util.ElementHelper;
-import net.dpml.transit.artifact.ArtifactNotFoundException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Attr;
-import org.w3c.dom.TypeInfo;
-
/**
- * Construct a part.
+ * Part externalization to XML.
*/
public class PartWriter extends ValueBuilder
{
@@ -68,6 +50,10 @@

private static final String PART_FOOTER = "</part>";

+ /**
+ * Creation of a new part writer.
+ * @param map the map of namespace to builder uris
+ */
public PartWriter( Map map )
{
super( map );
@@ -77,6 +63,7 @@
* Externalize the part to XML.
* @param part the part to externalize
* @param output the output stream
+ * @param pad the character offset
* @exception IOException if an IO error occurs
*/
public void writePart( Part part, OutputStream output, String pad )
throws IOException
@@ -114,6 +101,13 @@
}
}

+ /**
+ * Write the strategy by delegating to a strategy writer.
+ * @param writer the output stream writer
+ * @param strategy the strategy
+ * @param pad the character offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeStrategy( Writer writer, Strategy strategy, String
pad ) throws IOException
{
URI uri = strategy.getBuilderURI();

Modified: trunk/main/transit/core/src/main/net/dpml/part/Plugin.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Plugin.java 2006-03-18
16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/Plugin.java 2006-03-18
20:35:20 UTC (rev 1216)
@@ -23,11 +23,21 @@

import net.dpml.lang.Value;

+/**
+ * Plugin part strategy implementation datatype.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
public class Plugin implements Serializable
{
private final String m_classname;
private final Value[] m_params;

+ /**
+ * Creation of an new plugin datatype.
+ * @param classname the target class
+ * @param params an array of default value arguments
+ */
public Plugin( String classname, Value[] params )
{
if( null == classname )
@@ -42,16 +52,29 @@
m_params = params;
}

+ /**
+ * Get the target classname.
+ * @return the cloassname
+ */
public String getClassname()
{
return m_classname;
}

+ /**
+ * Get the array of default constructor values.
+ * @return the value array
+ */
public Value[] getValues()
{
return m_params;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -77,6 +100,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_classname.hashCode();

Modified: trunk/main/transit/core/src/main/net/dpml/part/Resource.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Resource.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/Resource.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,11 +20,21 @@

import java.io.Serializable;

+/**
+ * Resource part strategy implementation datatype.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
public class Resource implements Serializable
{
private final String m_urn;
private final String m_path;

+ /**
+ * Creation of resource datatype.
+ * @param urn the resource urn
+ * @param path the resource path
+ */
public Resource( String urn, String path )
{
if( null == urn )
@@ -39,16 +49,29 @@
m_path = path;
}

+ /**
+ * Get the resource urn.
+ * @return the urn
+ */
public String getURN()
{
return m_urn;
}

+ /**
+ * Get the resource path.
+ * @return the path
+ */
public String getPath()
{
return m_path;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -73,6 +96,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_urn.hashCode();

Modified:
trunk/main/transit/core/src/main/net/dpml/part/StandardPartHandler.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/StandardPartHandler.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/StandardPartHandler.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,23 +18,16 @@

package net.dpml.part;

-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
import java.io.IOException;

-import net.dpml.lang.Category;
import net.dpml.lang.Classpath;
import net.dpml.lang.Construct;
import net.dpml.lang.Value;

-import net.dpml.transit.Artifact;
-import net.dpml.transit.StandardClassLoader;
import net.dpml.transit.Transit;

/**
- * Construct a part.
+ * Handle part related functions.
*/
public class StandardPartHandler implements PartHandler
{
@@ -42,6 +35,8 @@
* Build a classloader stack.
* @param anchor the anchor classloader to server as the classloader
chain root
* @param classpath the part classpath definition
+ * @return the resolved classloader
+ * @exception IOException if an IO error occurs
*/
public ClassLoader getClassLoader( ClassLoader anchor, Classpath
classpath ) throws IOException
{
@@ -54,6 +49,7 @@
* @param classpath the part classpath
* @param data the part deployment data
* @param args supplimentary arguments
+ * @return the resolved instance
* @exception Exception if a deployment error occurs
*/
public Object getInstance( ClassLoader anchor, Classpath classpath,
Object data, Object[] args ) throws Exception

Modified: trunk/main/transit/core/src/main/net/dpml/part/Strategy.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/Strategy.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/Strategy.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -27,7 +27,7 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public class Strategy
+public final class Strategy
{
private final PartDirective m_controller;
private final Serializable m_data;
@@ -74,6 +74,7 @@

/**
* Return the datatype id.
+ * @return the constant 'part' type identifier
*/
public String getID()
{
@@ -82,6 +83,7 @@

/**
* Return the datatype id.
+ * @return the alias flag value
*/
public boolean getAlias()
{
@@ -90,7 +92,6 @@

/**
* Get the strategy builder uri.
- *
* @return the builder uri
*/
public URI getBuilderURI()
@@ -100,7 +101,6 @@

/**
* Get the controller deployment directive.
- *
* @return the deployment controller uri
*/
public PartDirective getPartDirective()
@@ -110,7 +110,6 @@

/**
* Get the deployment data.
- *
* @return the deployment datastructure
*/
public Object getDeploymentData()
@@ -118,6 +117,11 @@
return m_data;
}

+ /**
+ * Test if this instance is equal to the supplied instance.
+ * @param other the other instance
+ * @return the equality status
+ */
public boolean equals( Object other )
{
if( null == other )
@@ -146,6 +150,10 @@
}
}

+ /**
+ * Get the hashcode for this instance.
+ * @return the hash value
+ */
public int hashCode()
{
int hash = m_builder.hashCode();

Modified: trunk/main/transit/core/src/main/net/dpml/part/StrategyBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/StrategyBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/StrategyBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -25,10 +25,27 @@

/**
* Construct an Strategy instance from a DOM Element.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
*/
public interface StrategyBuilder
{
+ /**
+ * Build a strategy from a supplied DOM element.
+ * @param classloader the classloader
+ * @param element the strategy element
+ * @return the resolved strategy
+ * @exception Exception if an error occurs
+ */
Strategy buildStrategy( ClassLoader classloader, Element element )
throws Exception;

+ /**
+ * Externalize a strategy.
+ * @param writer the output stream writer
+ * @param strategy the strategy
+ * @param pad the character offset
+ * @exception IOException if an IO error occurs
+ */
void writeStrategy( Writer writer, Strategy strategy, String pad )
throws IOException;
}

Modified:
trunk/main/transit/core/src/main/net/dpml/part/UnresolvableHandlerException.java
===================================================================
---
trunk/main/transit/core/src/main/net/dpml/part/UnresolvableHandlerException.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/main/net/dpml/part/UnresolvableHandlerException.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,8 +22,19 @@

import net.dpml.transit.artifact.ArtifactNotFoundException;

+/**
+ * Exception throw when a request for a part handler is not resolvable.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
public class UnresolvableHandlerException extends ArtifactNotFoundException
{
+ /**
+ * Creation of a new exception instance.
+ * @param message the message
+ * @param uri the target uri
+ */
public UnresolvableHandlerException( String message, URI uri )
{
super( message, uri );

Modified: trunk/main/transit/core/src/main/net/dpml/part/ValueBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/ValueBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/ValueBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,17 +18,12 @@

package net.dpml.part;

-import java.io.Writer;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
import java.util.Map;

import net.dpml.lang.Value;
import net.dpml.lang.Construct;
import net.dpml.transit.util.ElementHelper;

-import org.w3c.dom.TypeInfo;
import org.w3c.dom.Element;

/**
@@ -39,16 +34,20 @@
*/
public class ValueBuilder extends ValueWriter
{
- //public ValueBuilder()
- //{
- // this( null );
- //}
-
+ /**
+ * Creation of a new value builder.
+ * @param map the namespace to part builder uri mapping
+ */
public ValueBuilder( Map map )
{
super( map );
}

+ /**
+ * Build an array of values for the supplied element array.
+ * @param elements the elements
+ * @return the resolved values
+ */
protected Value[] buildValues( Element[] elements )
{
Value[] values = new Value[ elements.length ];
@@ -59,6 +58,11 @@
return values;
}

+ /**
+ * Build a single value instance from a supplied element.
+ * @param element the element
+ * @return the resolved value
+ */
protected Value buildValue( Element element )
{
String classname = ElementHelper.getAttribute( element, "class" );

Modified: trunk/main/transit/core/src/main/net/dpml/part/ValueWriter.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/part/ValueWriter.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/part/ValueWriter.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,17 +20,11 @@

import java.io.Writer;
import java.io.IOException;
-import java.io.Serializable;
-import java.net.URI;
import java.util.Map;

import net.dpml.lang.Value;
import net.dpml.lang.Construct;
-import net.dpml.transit.util.ElementHelper;

-import org.w3c.dom.TypeInfo;
-import org.w3c.dom.Element;
-
/**
* Utility used to build a plugin strategy from a DOM element.
*
@@ -39,16 +33,30 @@
*/
public class ValueWriter extends AbstractBuilder
{
+ /**
+ * Creation of a new value writer.
+ */
public ValueWriter()
{
this( null );
}

+ /**
+ * Creation of a new value writer.
+ * @param map the namespace to part builder uri mapping
+ */
public ValueWriter( Map map )
{
super( map );
}

+ /**
+ * Write an array of values to XML.
+ * @param writer the output stream writer
+ * @param values the value array
+ * @param pad the character offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeValues( Writer writer, Value[] values, String pad )
throws IOException
{
for( int i=0; i<values.length; i++ )
@@ -58,6 +66,14 @@
}
}

+
+ /**
+ * Write a value to XML.
+ * @param writer the output stream writer
+ * @param value the value
+ * @param pad the character offset
+ * @exception IOException if an IO error occurs
+ */
protected void writeValue( Writer writer, Value value, String pad )
throws IOException
{
if( value instanceof Construct )
@@ -96,8 +112,8 @@
{
final String error =
"Value class ["
- + value.getClass().getName() +
- "] not supported.";
+ + value.getClass().getName()
+ + "] not supported.";
throw new IOException( error );
}
}

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/DefaultTransitModel.java
===================================================================
---
trunk/main/transit/core/src/main/net/dpml/transit/DefaultTransitModel.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/main/net/dpml/transit/DefaultTransitModel.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,17 +18,13 @@

package net.dpml.transit;

+import java.io.File;
+import java.net.URL;
+import java.net.URI;
import java.rmi.RemoteException;
import java.rmi.NoSuchObjectException;
import java.rmi.server.UnicastRemoteObject;
import java.util.EventObject;
-import java.beans.XMLDecoder;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.File;
-import java.net.URL;
-import java.net.URI;
import java.util.EventListener;

import net.dpml.transit.info.CacheDirective;

Modified: trunk/main/transit/core/src/main/net/dpml/transit/SaxMonitor.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/SaxMonitor.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/transit/SaxMonitor.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.transit;

-import java.net.URL;
-
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,20 +20,16 @@
package net.dpml.transit;

import java.io.IOException;
-import java.io.InputStream;
import java.beans.Expression;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.net.URL;
-import java.net.URLConnection;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Iterator;
-import java.util.Properties;

-import net.dpml.transit.artifact.ArtifactNotFoundException;
import net.dpml.transit.monitor.RepositoryMonitorRouter;

import net.dpml.lang.Classpath;

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/TransitBuilder.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/TransitBuilder.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/transit/TransitBuilder.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,7 +18,6 @@

package net.dpml.transit;

-import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.io.InputStream;
@@ -26,7 +25,6 @@
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
-import java.util.Properties;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -38,17 +36,13 @@
import net.dpml.transit.info.ProxyDirective;
import net.dpml.transit.info.LayoutDirective;

-import net.dpml.lang.Value;
import net.dpml.lang.ValueDirective;
import net.dpml.lang.Logger;

import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;

import org.w3c.dom.Element;
import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;

/**
* Utility class supporting the reading of Transit XML configurations.
@@ -58,21 +52,20 @@
*/
public class TransitBuilder
{
- public static final String XML_HEADER =
+ private static final String XML_HEADER =
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";

- public static final String NAME = "transit";
+ private static final String NAME = "transit";

- public static final String PUBLIC_ID =
+ private static final String PUBLIC_ID =
"-//DPML//DTD Transit Configuration Version 1.0//EN";

- public static final String SYSTEM_ID =
+ private static final String SYSTEM_ID =
"http://download.dpml.net/dtds/transit_1_0.dtd";;

- public static final String RESOURCE =
+ private static final String RESOURCE =
"net/dpml/transit/transit_1_0.dtd";

-
private static final String DOCTYPE =
"\n<!DOCTYPE "
+ NAME
@@ -82,7 +75,6 @@
+ SYSTEM_ID
+ "\" >";

-
private static final DTD[] DTDS = new DTD[]
{
new DTD(
@@ -96,6 +88,10 @@

private Logger m_logger;

+ /**
+ * Creation of a new transit configuration builder.
+ * @param logger the assigned logging channel
+ */
public TransitBuilder( Logger logger )
{
m_logger = logger;
@@ -104,7 +100,7 @@
/**
* Construct a transit configuration from a supplied uri.
* @param url the configuration url
- * @return the configuration
+ * @return the transit configuration
* @exception Exception if an error occurs during configuration loading
*/
public TransitDirective load( final URL url ) throws Exception

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/info/LayoutDirective.java
===================================================================
---
trunk/main/transit/core/src/main/net/dpml/transit/info/LayoutDirective.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/main/net/dpml/transit/info/LayoutDirective.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,7 +20,6 @@

import java.net.URISyntaxException;

-import net.dpml.lang.AbstractDirective;
import net.dpml.lang.ValueDirective;

/**

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/util/ElementHelper.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/util/ElementHelper.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/main/net/dpml/transit/util/ElementHelper.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -143,7 +143,7 @@
}
Element[] children = getChildren( root );
final ArrayList result = new ArrayList();
- for( int i=0; i<children.length ; i++ )
+ for( int i=0; i<children.length; i++ )
{
final Element child = children[i];
if( name.equals( child.getTagName() ) )

Modified: trunk/main/transit/core/src/test/net/dpml/part/PartTestCase.java
===================================================================
--- trunk/main/transit/core/src/test/net/dpml/part/PartTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/core/src/test/net/dpml/part/PartTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,24 +20,9 @@

import java.io.File;
import java.io.FileOutputStream;
-import java.net.URI;
-import java.net.URL;

-import net.dpml.part.Part;
-import net.dpml.part.Strategy;
-import net.dpml.part.PartDirective;
-import net.dpml.part.PartBuilder;
-import net.dpml.part.UnresolvableHandlerException;
-import net.dpml.part.PartHandlerFactory;
-import net.dpml.part.PartHandler;
-
import junit.framework.TestCase;

-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.DocumentType;
-
-
/**
* Plugin test case.
*
@@ -55,6 +40,7 @@

/**
* Test the demo class.
+ * @exception Exception if a error occurs during test execution
*/
public void setUp() throws Exception
{
@@ -63,6 +49,7 @@

/**
* Test the demo class.
+ * @exception Exception if a error occurs during test execution
*/
public void testPlugin() throws Exception
{
@@ -71,6 +58,7 @@

/**
* Test the demo class.
+ * @exception Exception if a error occurs during test execution
*/
public void testResource() throws Exception
{

Modified:
trunk/main/transit/core/src/test/net/dpml/transit/info/AbstractTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/AbstractTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/info/AbstractTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -22,14 +22,6 @@
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedInputStream;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.beans.ExceptionListener;
import java.util.Properties;

import junit.framework.TestCase;

Modified:
trunk/main/transit/core/src/test/net/dpml/transit/info/CodeBaseDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/CodeBaseDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/info/CodeBaseDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,8 +20,6 @@

import java.net.URI;

-import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
import net.dpml.lang.ValueDirective;

/**

Modified:
trunk/main/transit/core/src/test/net/dpml/transit/info/ContentDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/ContentDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/info/ContentDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.transit.info;

-import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
import net.dpml.lang.ValueDirective;

/**

Modified:
trunk/main/transit/core/src/test/net/dpml/transit/info/LayoutDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/LayoutDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/info/LayoutDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -18,8 +18,6 @@

package net.dpml.transit.info;

-import net.dpml.lang.Value;
-import net.dpml.lang.Construct;
import net.dpml.lang.ValueDirective;

/**

Modified:
trunk/main/transit/core/src/test/net/dpml/transit/info/ValueDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/ValueDirectiveTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/info/ValueDirectiveTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -20,7 +20,6 @@

import java.io.File;

-import net.dpml.lang.Value;
import net.dpml.lang.Construct;
import net.dpml.lang.ValueDirective;


Modified:
trunk/main/transit/core/src/test/net/dpml/transit/test/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/test/AbstractEncodingTestCase.java
2006-03-18 16:18:57 UTC (rev 1215)
+++
trunk/main/transit/core/src/test/net/dpml/transit/test/AbstractEncodingTestCase.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -36,7 +36,6 @@
/**
* Utility operation to encode and decode an supplied object using an
intermidiate file.
* @param object the object to enciode
- * @param filename the intermidiate filename resolved relative to the
target/test directory
* @return the result of decoding the encoded structure
* @exception Exception if an error occurs
*/

Modified:
trunk/main/transit/tools/src/main/net/dpml/transit/tools/PluginTask.java
===================================================================
--- trunk/main/transit/tools/src/main/net/dpml/transit/tools/PluginTask.java
2006-03-18 16:18:57 UTC (rev 1215)
+++ trunk/main/transit/tools/src/main/net/dpml/transit/tools/PluginTask.java
2006-03-18 20:35:20 UTC (rev 1216)
@@ -29,9 +29,7 @@
import net.dpml.transit.Repository;
import net.dpml.transit.util.ElementHelper;

-//import net.dpml.lang.Plugin;
import net.dpml.part.Part;
-import net.dpml.part.Plugin;
import net.dpml.part.Resource;

import org.apache.tools.ant.BuildException;




  • r1216 - in trunk/main: depot/library/src/main/net/dpml/library depot/library/src/main/net/dpml/library/impl depot/library/src/main/net/dpml/library/info depot/library/src/test/net/dpml/library/impl depot/library/src/test/net/dpml/library/info depot/tools/builder/src/main/net/dpml/tools/model depot/tools/builder/src/main/net/dpml/tools/process depot/tools/builder/src/main/net/dpml/tools/tasks metro/builder/src/main/net/dpml/metro/builder metro/builder/src/test/net/dpml/metro/builder metro/model/src/main/net/dpml/metro/data metro/model/src/main/net/dpml/metro/info metro/model/src/test/net/dpml/metro/data/test metro/model/src/test/net/dpml/metro/info/test metro/runtime/src/main/net/dpml/metro/runtime metro/state/api/src/main/net/dpml/state metro/state/impl/src/main/net/dpml/state/impl metro/state/impl/src/test/net/dpml/state metro/state/impl/src/test/net/dpml/state/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http station/api/src/ma! in/net/dpml/station/info station/api/src/test/net/dpml/station/info station/builder/src/main/net/dpml/station/builder station/server/src/main/net/dpml/station/server station/server/src/test/net/dpml/station/server transit/console/src/main/net/dpml/transit/console transit/core/src/main/net/dpml/lang transit/core/src/main/net/dpml/part transit/core/src/main/net/dpml/transit transit/core/src/main/net/dpml/transit/info transit/core/src/main/net/dpml/transit/util transit/core/src/test/net/dpml/part transit/core/src/test/net/dpml/transit/info transit/core/src/test/net/dpml/transit/test transit/tools/src/main/net/dpml/transit/tools, mcconnell at BerliOS, 03/18/2006

Archive powered by MHonArc 2.6.24.

Top of Page