ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder ATIModelBuilder.java
Date Thu, 13 Jun 2002 07:32:26 GMT
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 {@link org.apache.myrmidon.api.metadata.ModelElement}
   * tree from an XML source.
   *
   * @author <a href="mailto:peter@apache.org">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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message