Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2116 - in development/main/metro/composition: api/src/main/net/dpml/composition/data impl/src/main/net/dpml/composition/data/builder impl/src/main/net/dpml/composition/model/impl

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2116 - in development/main/metro/composition: api/src/main/net/dpml/composition/data impl/src/main/net/dpml/composition/data/builder impl/src/main/net/dpml/composition/model/impl
  • Date: Tue, 22 Mar 2005 11:23:01 -0500

Author: mcconnell AT dpml.net
Date: Tue Mar 22 11:23:00 2005
New Revision: 2116

Added:

development/main/metro/composition/api/src/main/net/dpml/composition/data/CompositionDirective.java
- copied, changed from r2111,
development/main/metro/composition/api/src/main/net/dpml/composition/data/BlockCompositionDirective.java
Removed:

development/main/metro/composition/api/src/main/net/dpml/composition/data/BlockCompositionDirective.java
Modified:

development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLContainmentProfileCreator.java

development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModel.java
Log:
cleaning up some class naming

Copied:
development/main/metro/composition/api/src/main/net/dpml/composition/data/CompositionDirective.java
(from r2111,
development/main/metro/composition/api/src/main/net/dpml/composition/data/BlockCompositionDirective.java)
==============================================================================
---
development/main/metro/composition/api/src/main/net/dpml/composition/data/BlockCompositionDirective.java
(original)
+++
development/main/metro/composition/api/src/main/net/dpml/composition/data/CompositionDirective.java
Tue Mar 22 11:23:00 2005
@@ -18,24 +18,24 @@

package net.dpml.composition.data;

-import net.dpml.lang.NullArgumentException;
+import java.net.URI;

-import net.dpml.transit.artifact.Artifact;
+import net.dpml.lang.NullArgumentException;

/**
- * A block reference directive contains an identifier and verion of
- * a local resource to be included by reference into
- * a container.
+ * The CompositionDirective describes the addition of a block to containment
profile
+ * it is declared within.
+ *
*
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
* @version $Id$
*/
-public class BlockCompositionDirective extends DeploymentProfile
+public class CompositionDirective extends DeploymentProfile
{
/**
- * The version identifier.
+ * The uri identifying a block to include.
*/
- private final Artifact m_artifact;
+ private final URI m_uri;

/**
* Nested targets.
@@ -46,32 +46,32 @@
* Creation of a new resource directive.
* @param name the name to assign to the container
* established by the composition directive
- * @param artifact an artifact from which a block
+ * @param uri an artifact uri from which a block
* description can be resolved
*/
- public BlockCompositionDirective(
- final String name, Artifact artifact )
+ public CompositionDirective(
+ final String name, URI uri )
{
- this( name, artifact, new TargetDirective[0] );
+ this( name, uri, new TargetDirective[0] );
}

/**
* Creation of a new resource directive.
* @param name the name to assign to the container
* established by the composition directive
- * @param artifact an artifact from which a block
+ * @param uri an artifact uri from which a block
* description can be resolved
*/
- public BlockCompositionDirective(
- final String name, Artifact artifact, TargetDirective[] targets )
+ public CompositionDirective(
+ final String name, URI uri, TargetDirective[] targets )
throws NullArgumentException
{
super( name, DeploymentProfile.ENABLED, Mode.EXPLICIT, null );
- if( artifact == null )
+ if( uri == null )
{
- throw new NullArgumentException( "artifact" );
+ throw new NullArgumentException( "uri" );
}
- m_artifact = artifact;
+ m_uri = uri;
m_targets = targets;
}

@@ -79,9 +79,9 @@
* Return the artifact reference.
* @return the artifact
*/
- public Artifact getArtifact()
+ public URI getURI()
{
- return m_artifact;
+ return m_uri;
}

/**

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLContainmentProfileCreator.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLContainmentProfileCreator.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/data/builder/XMLContainmentProfileCreator.java
Tue Mar 22 11:23:00 2005
@@ -17,9 +17,10 @@

package net.dpml.composition.data.builder;

+import java.net.URI;
import java.util.ArrayList;

-import net.dpml.composition.data.BlockCompositionDirective;
+import net.dpml.composition.data.CompositionDirective;
import net.dpml.composition.data.ClasspathDirective;
import net.dpml.composition.data.ContainmentProfile;
import net.dpml.composition.data.DeploymentProfile;
@@ -31,12 +32,16 @@
import net.dpml.composition.data.ServiceDirective;
import net.dpml.composition.data.TargetDirective;
import net.dpml.composition.data.Targets;
+
import net.dpml.configuration.Configuration;
import net.dpml.configuration.ConfigurationException;
import net.dpml.configuration.impl.ConfigurationUtil;
+
import net.dpml.logging.data.CategoriesDirective;
+
import net.dpml.meta.info.ServiceDescriptor;
import net.dpml.meta.info.builder.impl.XMLTypeCreator;
+
import net.dpml.transit.artifact.Artifact;


@@ -454,8 +459,9 @@
{
String spec = config.getAttribute( "uri" );
Artifact artifact = createArtifact( spec );
+ URI uri = artifact.toURI();
TargetDirective[] targets = createTargetDirectives( config );
- return new BlockCompositionDirective( name, artifact, targets );
+ return new CompositionDirective( name, uri, targets );
}
else
{

Modified:
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModel.java
==============================================================================
---
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModel.java
(original)
+++
development/main/metro/composition/impl/src/main/net/dpml/composition/model/impl/DefaultContainmentModel.java
Tue Mar 22 11:23:00 2005
@@ -23,6 +23,7 @@
import java.io.InputStream;

import java.net.MalformedURLException;
+import java.net.URI;
import java.net.URL;
import java.net.URLConnection;

@@ -31,7 +32,7 @@
import java.util.LinkedList;
import java.util.List;

-import net.dpml.composition.data.BlockCompositionDirective;
+import net.dpml.composition.data.CompositionDirective;
import net.dpml.composition.data.ComponentProfile;
import net.dpml.composition.data.ContainmentProfile;
import net.dpml.composition.data.DeploymentProfile;
@@ -636,9 +637,9 @@
createComponentProfile( (NamedComponentProfile) profile );
model = createComponentModel( deployment );
}
- else if( profile instanceof BlockCompositionDirective )
+ else if( profile instanceof CompositionDirective )
{
- BlockCompositionDirective directive =
(BlockCompositionDirective) profile;
+ CompositionDirective directive = (CompositionDirective) profile;
model = createContainmentModel( directive );
}
else
@@ -1016,13 +1017,14 @@
* @return the containment model established by the include
*/
private ContainmentModel createContainmentModel(
- BlockCompositionDirective directive ) throws ModelException
+ CompositionDirective directive ) throws ModelException
{
final String name = directive.getName();
ContainmentModel model;
try
{
- Artifact artifact = directive.getArtifact();
+ URI uri = directive.getURI();
+ Artifact artifact = Artifact.createArtifact( uri );
final URL url = artifact.toURL();
model = createContainmentModel( name, url );
}



  • svn commit: r2116 - in development/main/metro/composition: api/src/main/net/dpml/composition/data impl/src/main/net/dpml/composition/data/builder impl/src/main/net/dpml/composition/model/impl, mcconnell, 03/21/2005

Archive powered by MHonArc 2.6.24.

Top of Page