Changeset 5418


Ignore:
Timestamp:
08/27/09 15:11:39 (11 years ago)
Author:
curtis
Message:
  • Rename bio-formats-auto package to autogen.
  • Clean up IniParser a little bit.
Location:
trunk
Files:
2 added
24 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r5415 r5418  
    4343    License:       GPL 
    4444 
    45 Bio-Formats code generator 
    46     Code that generates the Bio-Formats metadata API, related documentation and 
    47     Ice bindings 
    48     -=- 
    49     JAR file:      bio-formats-auto.jar 
    50     Path:          components/bio-formats-auto 
     45LOCI autogen 
     46    Package for generating other code, including the Bio-Formats metadata API, 
     47    related documentation, Ice bindings, and Bio-Formats C++ bindings headers 
     48    -=- 
     49    JAR file:      loci-autogen.jar 
     50    Path:          components/autogen 
    5151    Project deps:  LOCI Common, Bio-Formats 
    5252    Library deps:  Apache Velocity 
     
    449449    depends="copy-jars, jar-common, jar-ome-xml, 
    450450      jar-jai, jar-poi-loci, jar-mdbtools, 
    451       jar-formats, jar-formats-auto, jar-formats-ice, 
     451      jar-formats, jar-autogen, jar-formats-ice, 
    452452      jar-loci-plugins, jar-ome-io, jar-ome-plugins, 
    453453      jar-visbio, jar-slim, jar-flow, 
     
    460460    depends="clean-common, clean-ome-xml, 
    461461      clean-jai, clean-poi-loci, clean-mdbtools, 
    462       clean-formats, clean-formats-auto, clean-formats-ice, 
     462      clean-formats, clean-autogen, clean-formats-ice, 
    463463      clean-loci-plugins, clean-ome-io, clean-ome-plugins, 
    464464      clean-visbio, clean-slim, clean-flow, 
     
    609609  </target> 
    610610 
    611   <!-- Bio-Formats code generator --> 
    612  
    613   <target name="compile-formats-auto" 
     611  <!-- LOCI autogen --> 
     612 
     613  <target name="compile-autogen" 
    614614    depends="compile-common, compile-formats" 
    615     description="compile classes for Bio-Formats code gen"> 
    616     <ant dir="components/bio-formats-auto" target="formats-auto.compile"/> 
    617   </target> 
    618  
    619   <target name="jar-formats-auto" 
     615    description="compile classes for LOCI autogen"> 
     616    <ant dir="components/autogen" target="autogen.compile"/> 
     617  </target> 
     618 
     619  <target name="jar-autogen" 
    620620    depends="jar-common, jar-formats" 
    621     description="generate JAR file for Bio-Formats code gen"> 
    622     <ant dir="components/bio-formats-auto" target="formats-auto.jar"/> 
    623   </target> 
    624  
    625   <target name="clean-formats-auto" 
     621    description="generate JAR file for LOCI autogen"> 
     622    <ant dir="components/autogen" target="autogen.jar"/> 
     623  </target> 
     624 
     625  <target name="clean-autogen" 
    626626    depends="clean-common, clean-formats" 
    627     description="remove build files for Bio-Formats code gen"> 
    628     <ant dir="components/bio-formats-auto" target="formats-auto.clean"/> 
     627    description="remove build files for LOCI autogen"> 
     628    <ant dir="components/autogen" target="autogen.clean"/> 
    629629  </target> 
    630630 
  • trunk/components/autogen/.project

    r4609 r5418  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<projectDescription> 
    3         <name>bio-formats-auto</name> 
     3        <name>autogen</name> 
    44        <comment></comment> 
    55        <projects> 
  • trunk/components/autogen/build.properties

    r5240 r5418  
    33# 
    44 
    5 # Ant properties file for Bio-Formats code generator. 
     5# Ant properties file for LOCI code generators. 
    66# Download Apache Ant from http://ant.apache.org/. 
    77# Type "ant -p" for a list of targets. 
    88 
    9 component.jar            = bio-formats-auto.jar 
     9component.jar            = loci-autogen.jar 
    1010component.classpath      = ${artifact.dir}/loci-common.jar:\ 
    1111                           ${artifact.dir}/bio-formats.jar:\ 
  • trunk/components/autogen/build.xml

    r5314 r5418  
    22build.xml 
    33 
    4 Ant build file for Bio-Formats code generator. 
     4Ant build file for LOCI code generators. 
    55Download Apache Ant from http://ant.apache.org/. 
    66Type "ant -p" for a list of targets. 
    77--> 
    88 
    9 <project name="formats-auto" default="jar" basedir="."> 
     9<project name="autogen" default="jar" basedir="."> 
    1010  <description> 
    11     Build file for Bio-Formats code generator 
     11    Build file for LOCI code generators 
    1212  </description> 
    1313  <property file="base.properties"/> 
  • trunk/components/autogen/src/Entity.java

    r5059 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/EntityList.java

    r5093 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
     
    2828import java.util.Vector; 
    2929 
     30import loci.common.IniList; 
    3031import loci.common.IniParser; 
     32import loci.common.IniTable; 
    3133 
    3234/** 
     
    150152    System.out.println("Parsing configuration data"); 
    151153    IniParser parser = new IniParser(); 
    152     Vector<HashMap<String, String>> versionList = 
    153       parser.parseINI(versionPath, EntityList.class); 
    154     Vector<HashMap<String, String>> entityList = 
    155       parser.parseINI(entityPath, EntityList.class); 
     154    IniList versionList = parser.parseINI(versionPath, EntityList.class); 
     155    IniList entityList = parser.parseINI(entityPath, EntityList.class); 
    156156 
    157157    // convert unprocessed INI-style config data into 
     
    160160    // process list of versions 
    161161    for (HashMap<String, String> attrs : versionList) { 
    162       String name = attrs.get(IniParser.HEADER_KEY); 
     162      String name = attrs.get(IniTable.HEADER_KEY); 
    163163      versions.put(name, attrs); 
    164164    } 
     
    167167    entities = new HashMap<String, Entity>(); 
    168168    for (HashMap<String, String> attrs : entityList) { 
    169       String name = attrs.get(IniParser.HEADER_KEY); 
     169      String name = attrs.get(IniTable.HEADER_KEY); 
    170170      if (DEBUG) debug("-- Parsing entry '" + name + "' --"); 
    171171 
     
    190190            throw new IOException("bad entity name '" + t1 + "'"); 
    191191          } 
    192           attrs.put(IniParser.HEADER_KEY, t2); 
     192          attrs.put(IniTable.HEADER_KEY, t2); 
    193193          if (DEBUG) debug("Reset header value to '" + t2 + "'"); 
    194194          HashMap<String, String> version = versions.get(t2); 
     
    225225              t2 + "' for entity '" + t1 + "'"); 
    226226          } 
    227           attrs.put(IniParser.HEADER_KEY, t2); 
     227          attrs.put(IniTable.HEADER_KEY, t2); 
    228228          if (DEBUG) debug("Reset header value to '" + t2 + "'"); 
    229229          prop.versions.put(t3, attrs); 
     
    296296 
    297297  /** Gets the attribute value for the header key. */ 
    298   public String name() { return value(IniParser.HEADER_KEY); } 
     298  public String name() { return value(IniTable.HEADER_KEY); } 
    299299 
    300300  /** 
  • trunk/components/autogen/src/JaceHeaderAutogen.java

    r5334 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/MetaEntityList.java

    r5093 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/MetaSupportAutogen.java

    r5240 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/MetaSupportList.java

    r5093 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
     
    2828import java.util.Vector; 
    2929 
     30import loci.common.IniList; 
    3031import loci.common.IniParser; 
     32import loci.common.IniTable; 
    3133import loci.common.ReflectException; 
    3234import loci.common.ReflectedUniverse; 
     
    100102    // parse INI data 
    101103    IniParser parser = new IniParser(); 
    102     Vector<HashMap<String, String>> groupsList = 
    103       parser.parseINI(groupsPath, MetaSupportList.class); 
    104     Vector<HashMap<String, String>> supportList = 
    105       parser.parseINI(supportPath, MetaSupportList.class); 
     104    IniList groupsList = parser.parseINI(groupsPath, MetaSupportList.class); 
     105    IniList supportList = parser.parseINI(supportPath, MetaSupportList.class); 
    106106 
    107107    // convert unprocessed INI-style config data into data structures 
     
    123123    // process list of supported metadata properties 
    124124    for (HashMap<String, String> propHash : supportList) { 
    125       String handler = propHash.get(IniParser.HEADER_KEY); 
    126       propHash.remove(IniParser.HEADER_KEY); 
     125      String handler = propHash.get(IniTable.HEADER_KEY); 
     126      propHash.remove(IniTable.HEADER_KEY); 
    127127      supported.put(handler, propHash); 
    128128    } 
  • trunk/components/autogen/src/MetadataAutogen.java

    r5093 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/Property.java

    r5059 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/SourceList.java

    r5240 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/VelocityTools.java

    r5093 r5418  
    44 
    55/* 
    6 OME Bio-Formats package for reading and converting biological file formats. 
     6LOCI autogen package for programmatically generating source code. 
    77Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    88 
  • trunk/components/autogen/src/entities.txt

    r5411 r5418  
    33# 
    44 
    5 # OME Bio-Formats package for reading and converting biological file formats. 
     5# LOCI autogen package for programmatically generating source code. 
    66# Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    77# 
  • trunk/components/autogen/src/meta-groups.txt

    r4953 r5418  
    33# 
    44 
    5 # OME Bio-Formats package for reading and converting biological file formats. 
     5# LOCI autogen package for programmatically generating source code. 
    66# Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    77# 
  • trunk/components/autogen/src/meta-support.txt

    r5346 r5418  
    33# 
    44 
    5 # OME Bio-Formats package for reading and converting biological file formats. 
     5# LOCI autogen package for programmatically generating source code. 
    66# Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    77# 
  • trunk/components/autogen/src/package.html

    r3345 r5418  
    11<html><body> 
    2 Package containing code for autogenerating other Bio-Formats code. 
     2LOCI autogen package for programmatically generating source code. 
    33</body></html> 
  • trunk/components/autogen/src/versions.txt

    r4953 r5418  
    33# 
    44 
    5 # OME Bio-Formats package for reading and converting biological file formats. 
     5# LOCI autogen package for programmatically generating source code. 
    66# Copyright (C) 2005-@year@ UW-Madison LOCI and Glencoe Software, Inc. 
    77# 
  • trunk/components/bio-formats/src/loci/formats/gui/AWTImageTools.java

    r5343 r5418  
    7070 * 
    7171 * Much code was stolen and adapted from 
    72  * <a href="http://forum.java.sun.com/thread.jspa?threadID=522483">DrLaszloJamf's posts</a> 
     72 * <a href="http://forum.java.sun.com/thread.jspa?threadID=522483"> 
     73 * DrLaszloJamf's posts</a> 
    7374 * on the Java forums. 
    7475 * 
  • trunk/components/bio-formats/src/loci/formats/tiff/TiffParser.java

    r5354 r5418  
    5252  /** Input source from which to parse TIFF data. */ 
    5353  protected RandomAccessInputStream in; 
    54    
     54 
    5555  /** Cached tile buffer to avoid re-allocations when reading tiles. */ 
    5656  private byte[] cachedTileBuffer; 
     
    593593      cachedTileBuffer = new byte[bufferSize]; 
    594594    } 
    595      
     595 
    596596    for (int row=0; row<numTileRows; row++) { 
    597597      for (int col=0; col<numTileCols; col++) { 
     
    750750      return; 
    751751    } 
    752      
     752 
    753753    for (int j=0; j<sampleCount; j++) { 
    754754      for (int i=0; i<nChannels; i++) { 
  • trunk/components/common/src/loci/common/IniParser.java

    r5093 r5418  
    2727import java.io.IOException; 
    2828import java.io.InputStreamReader; 
    29 import java.util.HashMap; 
    30 import java.util.Vector; 
    3129 
    3230/** 
     
    4240public class IniParser { 
    4341 
    44   // -- Constants -- 
    45  
    46   /** Key to use for storing header value (in brackets). */ 
    47   public static final String HEADER_KEY = "header"; 
    48  
    4942  // -- IniParser API methods -- 
    5043 
    5144  /** Parses the INI-style configuration data from the given resource. */ 
    52   public Vector<HashMap<String, String>> parseINI(String path) 
     45  public IniList parseINI(String path) 
    5346    throws IOException 
    5447  { 
     
    6053   * using the given class to find the resource. 
    6154   */ 
    62   public Vector<HashMap<String, String>> parseINI(String path, Class c) 
     55  public IniList parseINI(String path, Class c) 
    6356    throws IOException 
    6457  { 
     
    6760 
    6861  /** Parses the INI-style configuration data from the given input stream. */ 
    69   public Vector<HashMap<String, String>> parseINI(BufferedReader in) 
     62  public IniList parseINI(BufferedReader in) 
    7063    throws IOException 
    7164  { 
    72     Vector<HashMap<String, String>> list = 
    73       new Vector<HashMap<String, String>>(); 
    74     HashMap<String, String> attrs = null; 
     65    IniList list = new IniList(); 
     66    IniTable attrs = null; 
    7567    int no = 1; 
    7668    StringBuffer sb = new StringBuffer(); 
     
    8880      if (line.startsWith("[")) { 
    8981        // section header 
    90         attrs = new HashMap<String, String>(); 
     82        attrs = new IniTable(); 
    9183        list.add(attrs); 
    9284 
     
    9688        String header = line.substring(1, end); 
    9789 
    98         attrs.put(HEADER_KEY, header); 
     90        attrs.put(IniTable.HEADER_KEY, header); 
    9991        no += num; 
    10092        continue; 
  • trunk/components/loci-plugins/src/loci/plugins/prefs/Option.java

    r5133 r5418  
    2626package loci.plugins.prefs; 
    2727 
    28 import loci.common.IniParser; 
     28import loci.common.IniTable; 
    2929 
    3030/** 
     
    4343 
    4444  /** INI key indicating option's key. */ 
    45   public static final String INI_KEY = IniParser.HEADER_KEY; 
     45  public static final String INI_KEY = IniTable.HEADER_KEY; 
    4646 
    4747  /** INI key indicating whether option should be saved to prefs file. */ 
  • trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java

    r5136 r5418  
    3030import java.util.Vector; 
    3131 
     32import loci.common.IniList; 
    3233import loci.common.IniParser; 
     34import loci.common.IniTable; 
    3335 
    3436/** 
     
    6365  } 
    6466 
    65   public OptionsList(Vector<HashMap<String, String>> ini) { 
     67  public OptionsList(IniList ini) { 
    6668    options = new HashMap<String, Option>(); 
    67     for (HashMap<String, String> entry : ini) { 
     69    for (IniTable entry : ini) { 
    6870      String type = entry.get(INI_TYPE); 
    6971      Option o; 
Note: See TracChangeset for help on using the changeset viewer.