Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2334 - development/main/magic/core/src/main/net/dpml/magic/builder

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2334 - development/main/magic/core/src/main/net/dpml/magic/builder
  • Date: Wed, 20 Apr 2005 16:09:44 -0400

Author: niclas AT hedhman.org
Date: Wed Apr 20 16:09:43 2005
New Revision: 2334

Modified:

development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
Log:
Breaking apart to aid in debugging.

Modified:
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/builder/XMLDefinitionBuilder.java
Wed Apr 20 16:09:43 2005
@@ -31,7 +31,7 @@
/**
* Definition of a project.
*
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
* @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
*/
public class XMLDefinitionBuilder
@@ -84,8 +84,8 @@

boolean external = isExternal( element );

- final Info info =
- createInfo( home, ElementHelper.getChild( element, "info" ),
external );
+ final Element infoElement = ElementHelper.getChild( element,
"info" );
+ final Info info = createInfo( home, infoElement, external );
final String key = getDefinitionKey( element, info );

final String path = element.getAttribute( "basedir" );
@@ -93,17 +93,14 @@

final String file = getBuildFile( element );

- final ResourceRef[] resources =
- createResourceRefs(
- ElementHelper.getChild( element, "dependencies" ) );
-
- final ResourceRef[] plugins =
- createPluginRefs(
- ElementHelper.getChild( element, "plugins" ) );
-
- final ResourceRef[] parts =
- createResourceRefs(
- ElementHelper.getChild( element, "parts" ) );
+ final Element dependenciesElement = ElementHelper.getChild(
element, "dependenciesElement" );
+ final ResourceRef[] resources = createResourceRefs(
dependenciesElement );
+
+ final Element pluginsElement = ElementHelper.getChild( element,
"plugins" );
+ final ResourceRef[] plugins = createPluginRefs( pluginsElement );
+
+ final Element partsElement = ElementHelper.getChild( element,
"parts" );
+ final ResourceRef[] parts = createResourceRefs( partsElement );

return new Definition(
home, key, basedir, file, path, info, resources, plugins,
parts, uri );
@@ -257,15 +254,14 @@
}
else
{
- final String status =
- ElementHelper.getValue(
- ElementHelper.getChild( info, "status" ) );
+ final Element statusElement = ElementHelper.getChild( info,
"status" );
+ final String status = ElementHelper.getValue( statusElement );
return Info.SNAPSHOT.equalsIgnoreCase( status );
}
}

private static ResourceRef[] createResourceRefs( final Element element )
- throws BuildException
+ throws BuildException
{
final Element[] children = ElementHelper.getChildren( element,
"include" );
final ResourceRef[] refs = new ResourceRef[ children.length ];



  • svn commit: r2334 - development/main/magic/core/src/main/net/dpml/magic/builder, niclas, 04/20/2005

Archive powered by MHonArc 2.6.24.

Top of Page