donaldp 2002/06/13 00:32:26
Added: container/src/java/org/apache/myrmidon/components/builder
ATIModelBuilder.java
Log:
Maybe it will allow me to commit it in this package?
Revision Changes Path
1.1
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/ATIModelBuilder.java
Index: ATIModelBuilder.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.components.builder;
import org.apache.myrmidon.api.metadata.ModelElement;
import org.apache.myrmidon.api.metadata.ModelException;
import org.apache.myrmidon.components.builder.DefaultModelBuilder;
import org.apache.myrmidon.components.builder.TransformingModelBuilder;
import org.apache.myrmidon.components.builder.ati.XMLBuilderUtil;
import org.apache.myrmidon.interfaces.builder.ModelBuilder;
/**
* A simple ModelBuilder that will build a [EMAIL PROTECTED]
org.apache.myrmidon.api.metadata.ModelElement}
* tree from an XML source.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*
* @ant.type type="model-builder" name="ati"
*/
public class ATIModelBuilder
implements ModelBuilder
{
public ModelElement build( final String systemID )
throws ModelException
{
final String stylesheet =
XMLBuilderUtil.determineStylesheet( systemID );
ModelBuilder builder;
if( null != stylesheet )
{
builder = new TransformingModelBuilder( stylesheet );
}
else
{
builder = new DefaultModelBuilder();
}
return builder.build( systemID );
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>