Changeset 3917


Ignore:
Timestamp:
04/11/08 15:56:39 (12 years ago)
Author:
curtis
Message:

A bunch of work on the loci.formats.meta autogenerator. Not finished yet.

Location:
trunk/loci/formats/auto
Files:
3 added
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/auto/AggregateMetadata.vm

    r3605 r3917  
    9494 
    9595  // - Entity counting - 
    96 #foreach ($entity in $entities) 
    97 #if ($entity.countable()) 
     96#foreach ($entity in $q.entities()) 
     97#set ($dummy = $q.setEntity($entity)) 
     98#if ($q.countable()) 
    9899 
    99   /* @see MetadataRetrieve#get$entity.name()Count($entity.indicesList(true, false, false)) */ 
    100   public int get$entity.name()Count($entity.indicesList(true, true, false)) { 
     100  /* @see MetadataRetrieve#get${entity}Count($q.indicesList(true, false, false)) */ 
     101  public int get${entity}Count($q.indicesList(true, true, false)) { 
    101102    for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
    102103      Object o = iter.next(); 
    103104      if (o instanceof MetadataRetrieve) { 
    104105        MetadataRetrieve retrieve = (MetadataRetrieve) o; 
    105         int result = retrieve.get$entity.name()Count($entity.indicesList(false, true, false)); 
     106        int result = retrieve.get${entity}Count($q.indicesList(false, true, false)); 
    106107        if (result >= 0) return result; 
    107108      } 
     
    113114 
    114115  // - Entity retrieval - 
    115 #foreach ($entity in $entities) 
     116#foreach ($entity in $q.entities()) 
     117#set ($dummy = $q.setEntity($entity)) 
    116118 
    117   /* @see MetadataRetrieve#get$entity.name()($entity.indicesList(true, false)) */ 
    118   public Object get$entity.name()($entity.indicesList(true, true)) { 
     119  // - $entity property retrieval - 
     120#foreach ($prop in $q.props()) 
     121#set ($dummy = $q.setProperty($prop)) 
     122 
     123  /* @see MetadataRetrieve#get$entity$prop($q.indicesList(true, false)) */ 
     124  public $q.type() get$entity$prop($q.indicesList(true, true)) { 
    119125    for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
    120126      Object o = iter.next(); 
    121127      if (o instanceof MetadataRetrieve) { 
    122128        MetadataRetrieve retrieve = (MetadataRetrieve) o; 
    123         Object result = retrieve.get$entity.name()($entity.indicesList(false, true)); 
    124         if (result != null) return result; 
    125       } 
    126     } 
    127     return null; 
    128   } 
    129 #end##foreach $entity 
    130 #foreach ($entity in $entities) 
    131  
    132   // - $entity.name() property retrieval - 
    133 #foreach ($prop in $entity.props()) 
    134  
    135   /* @see MetadataRetrieve#get$entity.name()$prop.name()($entity.indicesList(true, false)) */ 
    136   public $prop.type(true) get$entity.name()$prop.name()($entity.indicesList(true, true)) { 
    137     for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
    138       Object o = iter.next(); 
    139       if (o instanceof MetadataRetrieve) { 
    140         MetadataRetrieve retrieve = (MetadataRetrieve) o; 
    141         $prop.type(true) result = retrieve.get$entity.name()$prop.name()($entity.indicesList(false, true)); 
     129        $q.type() result = retrieve.get$entity$prop($q.indicesList(false, true)); 
    142130        if (result != null) return result; 
    143131      } 
     
    177165      "Use getDelegates() and setRoot()."); 
    178166  } 
    179 #foreach ($entity in $entities) 
     167#foreach ($entity in $q.entities()) 
     168#set ($dummy = $q.setEntity($entity)) 
    180169 
    181   // - $entity.name() property storage - 
    182 #foreach ($prop in $entity.props()) 
     170  // - $entity property storage - 
     171#foreach ($prop in $q.props()) 
     172#set ($dummy = $q.setProperty($prop)) 
    183173 
    184   /* @see MetadataStore#set$entity.name()$prop.name()($prop.type(true), $entity.indicesList(true, false)) */ 
    185   public void set$entity.name()$prop.name()($prop.type(true) $prop.varName(), $entity.indicesList(true, true)) { 
     174  /* @see MetadataStore#set$entity$prop($q.type(), $q.indicesList(true, false)) */ 
     175  public void set$entity$prop($q.type() $q.var($prop), $q.indicesList(true, true)) { 
    186176    for (Iterator iter = delegates.iterator(); iter.hasNext();) { 
    187177      Object o = iter.next(); 
    188178      if (o instanceof MetadataStore) { 
    189179        MetadataStore store = (MetadataStore) o; 
    190         store.set$entity.name()$prop.name()($prop.varName(), $entity.indicesList(false, true)); 
     180        store.set$entity$prop($q.var($prop), $q.indicesList(false, true)); 
    191181      } 
    192182    } 
  • trunk/loci/formats/auto/DummyMetadata.vm

    r3605 r3917  
    5050 
    5151  // - Entity counting - 
    52 #foreach ($entity in $entities) 
    53 #if ($entity.countable()) 
     52#foreach ($entity in $q.entities()) 
     53#set ($dummy = $q.setEntity($entity)) 
     54#if ($q.countable()) 
    5455 
    55   /* @see MetadataRetrieve#get$entity.name()Count($entity.indicesList(true, false, false)) */ 
    56   public int get$entity.name()Count($entity.indicesList(true, true, false)) { 
     56  /* @see MetadataRetrieve#get${entity}Count($q.indicesList(true, false, false)) */ 
     57  public int get${entity}Count($q.indicesList(true, true, false)) { 
    5758    return -1; 
    5859  } 
     
    6162 
    6263  // - Entity retrieval - 
    63 #foreach ($entity in $entities) 
     64#foreach ($entity in $q.entities()) 
     65#set ($dummy = $q.setEntity($entity)) 
    6466 
    65   /* @see MetadataRetrieve#get$entity.name()($entity.indicesList(true, false)) */ 
    66   public Object get$entity.name()($entity.indicesList(true, true)) { 
    67     return null; 
    68   } 
    69 #end##foreach $entity 
    70 #foreach ($entity in $entities) 
     67  // - $entity property retrieval - 
    7168 
    72   // - $entity.name() property retrieval - 
    73  
    74 #foreach ($prop in $entity.props()) 
    75   /* @see MetadataRetrieve#get$entity.name()$prop.name()($entity.indicesList(true, false)) */ 
    76   public $prop.type(true) get$entity.name()$prop.name()($entity.indicesList(true, true)) { 
     69#foreach ($prop in $q.props()) 
     70#set ($dummy = $q.setProperty($prop)) 
     71  /* @see MetadataRetrieve#get$entity$prop($q.indicesList(true, false)) */ 
     72  public $q.type() get$entity$prop($q.indicesList(true, true)) { 
    7773    return null; 
    7874  } 
     
    9288  } 
    9389 
    94 #foreach ($entity in $entities) 
     90#foreach ($entity in $q.entities()) 
     91#set ($dummy = $q.setEntity($entity)) 
    9592 
    96   // - $entity.name() property storage - 
    97 #foreach ($prop in $entity.props()) 
     93  // - $entity property storage - 
     94#foreach ($prop in $q.props()) 
     95#set ($dummy = $q.setProperty($prop)) 
    9896 
    99   /* @see MetadataStore#set$entity.name()$prop.name()($prop.type(true), $entity.indicesList(true, false)) */ 
    100   public void set$entity.name()$prop.name()($prop.type(true) $prop.varName(), $entity.indicesList(true, true)) { 
     97  /* @see MetadataStore#set$entity$prop($q.type(), $q.indicesList(true, false)) */ 
     98  public void set$entity$prop($q.type() $q.var($prop), $q.indicesList(true, true)) { 
    10199  } 
    102100#end##foreach $prop 
  • trunk/loci/formats/auto/Entity.java

    r3605 r3917  
    2525package loci.formats.auto; 
    2626 
    27 import java.util.*; 
     27import java.util.Hashtable; 
    2828 
    2929/** 
    30  * CTR TODO Entity javadoc. 
     30 * An entity is an object that contains a bundle of {@link Property} objects. 
     31 * It has a list of default attributes (key/value pairs), 
     32 * as well as a list of version overrides for those attributes. 
     33 * 
     34 * @see {EntityList} 
    3135 * 
    3236 * <dl><dt><b>Source code:</b></dt> 
     
    3640 * @author Curtis Rueden ctrueden at wisc.edu 
    3741 */ 
    38 public class Entity implements Comparable { 
     42public class Entity { 
    3943 
    4044  // -- Fields -- 
    4145 
    42   /** Whether a count method should be created for the entity. */ 
    43   private boolean countable; 
     46  /** The entity's attributes. */ 
     47  protected Hashtable<String, String> attrs; 
    4448 
    45   /** Name of the entity. */ 
    46   private String name; 
     49  /** The entity's properties. */ 
     50  protected Hashtable<String, Property> props = 
     51    new Hashtable<String, Property>(); 
    4752 
    48   /** Sentence fragment description of the entity. */ 
    49   private String desc; 
    50  
    51   /** Extra sentences to tack on to the Javadoc description. */ 
    52   private String extra; 
    53  
    54   /** 
    55    * List of node paths for the entity. 
    56    * Keys are version strings, values are path strings. 
    57    */ 
    58   private Hashtable paths = new Hashtable(); 
    59  
    60   /** List of properties associated with the entity. */ 
    61   private Vector props = new Vector(); 
    62  
    63   /** List of properties corresponding to needed indices for a node. */ 
    64   private Vector indices = new Vector(); 
     53  /** The entity's version overrides. */ 
     54  protected Hashtable<String, Hashtable<String, String>> versions = 
     55    new Hashtable<String, Hashtable<String, String>>(); 
    6556 
    6657  // -- Constructor -- 
    6758 
    68   public Entity(String name, String desc, String extra) { 
    69     countable = name.endsWith("+"); 
    70     if (countable) name = name.substring(0, name.length() - 1); 
    71     this.name = name; 
    72     this.desc = desc; 
    73     this.extra = extra; 
    74   } 
    75  
    76   // -- Entity API methods -- 
    77  
    78   public boolean countable() { return countable; } 
    79  
    80   public String name() { return name; } 
    81  
    82   /** Javadoc for this entity's MetadataStore setter methods. */ 
    83   public String doc() { 
    84     StringBuffer sb = new StringBuffer(); 
    85     sb.append(desc); 
    86     sb.append("."); 
    87     if (!"-".equals(extra)) { 
    88       sb.append(" "); 
    89       sb.append(extra); 
    90     } 
    91     return sb.toString(); 
    92   } 
    93  
    94   public Hashtable paths() { return paths; } 
    95  
    96   public String path(String version) { 
    97     String s = (String) paths.get(version); 
    98     return s == null ? (String) paths.get("Default") : s; 
    99   } 
    100  
    101   public String[] pathNodes(String version) { 
    102     return path(version).split("\\/"); 
    103   } 
    104  
    105   public String last(String version) { 
    106     String path = path(version); 
    107     int first = path.lastIndexOf("/") + 1; 
    108     return path.substring(first).replaceAll("[@\\!\\+]", ""); 
    109   } 
    110  
    111   public String lastVar(String version) { 
    112     return toVarName(last(version)); 
    113   } 
    114  
    115   public Vector props() { return props; } 
    116  
    117   public Vector indices() { return indices; } 
    118  
    119   public String indicesList(boolean doTypes, boolean doVars) { 
    120     return indicesList(doTypes, doVars, true); 
    121   } 
    122  
    123   public String indicesList(boolean doTypes, boolean doVars, boolean doLast) { 
    124     StringBuffer sb = new StringBuffer(); 
    125     int size = indices.size(); 
    126     if (!doLast) size--; 
    127     for (int i=0; i<size; i++) { 
    128       Property p = (Property) indices.get(i); 
    129       if (i > 0) sb.append(", "); 
    130       if (doTypes) sb.append(p.type(true)); 
    131       if (doTypes && doVars) sb.append(" "); 
    132       if (doVars) sb.append(p.varName()); 
    133     } 
    134     return sb.toString(); 
    135   } 
    136  
    137   /** Adds a path override for a particular metadata version. */ 
    138   public void addPath(String version, String path) { 
    139     paths.put(version, path); 
    140     if (version.equals("Default")) { 
    141       // compute indices 
    142       StringTokenizer st = new StringTokenizer(path, "/"); 
    143       int tokens = st.countTokens(); 
    144       for (int i=0; i<tokens; i++) { 
    145         String t = st.nextToken(); 
    146         if (t.endsWith("+")) { 
    147           t = t.substring(t.startsWith("@") ? 1 : 0, t.length() - 1); 
    148           Property p = new Property(t + "Index", 
    149             "int", "index of the " + t, this, true); 
    150           indices.add(p); 
    151         } 
    152       } 
    153     } 
    154   } 
    155  
    156   /** Converts name in CamelCase to variable in variableCase. */ 
    157   public String toVarName(String s) { 
    158     // NB: This method could be static, but is an instance method 
    159     // to make it easier for Velocity templates to reference it. 
    160     char[] c = s.toCharArray(); 
    161     for (int i=0; i<c.length; i++) { 
    162       if (c[i] >= 'A' && c[i] <= 'Z') c[i] += 'a' - 'A'; 
    163       else { 
    164         if (i > 1) c[i - 1] += 'A' - 'a'; // keep last character capitalized 
    165         break; 
    166       } 
    167     } 
    168     return new String(c).replaceAll("[@!+%]", ""); 
    169   } 
    170  
    171   // -- Internal Entity API methods -- 
    172  
    173   /** Adds a property associated with this entity. */ 
    174   protected void addProperty(Property prop) { 
    175     props.add(prop); 
    176   } 
    177  
    178   // -- Comparable API methods -- 
    179  
    180   /** Enables sorting by indices. */ 
    181   public int compareTo(Object o) { 
    182     Entity e = (Entity) o; 
    183     int isize = indices.size(); 
    184     int jsize = e.indices.size(); 
    185     int minSize = isize < jsize ? isize : jsize; 
    186     for (int i=0; i<minSize; i++) { 
    187       Property pi = (Property) indices.get(i); 
    188       Property pj = (Property) e.indices.get(i); 
    189       int rval = pi.name().compareTo(pj.name()); 
    190       if (rval != 0) return rval; 
    191     } 
    192     if (isize < jsize) return -1; 
    193     if (jsize < isize) return 1; 
    194     return 0; 
     59  /** Creates a new entity with the given attributes. */ 
     60  public Entity(Hashtable<String, String> attrs) { 
     61    this.attrs = attrs; 
    19562  } 
    19663 
  • trunk/loci/formats/auto/FilterMetadata.vm

    r3617 r3917  
    4444 * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/loci/formats/meta/FilterMetadata.java">SVN</a></dd></dl> 
    4545 * 
     46 * @author Melissa Linkert linkert at wisc.edu 
     47 * @author Curtis Rueden ctrueden at wisc.edu 
    4648 */ 
    4749public class FilterMetadata implements MetadataStore { 
     
    4951  // -- Fields -- 
    5052 
    51   private MetadataStore delegate; 
     53  private MetadataStore store; 
    5254  private boolean filter; 
    5355 
    5456  // -- Constructor -- 
    5557 
    56   public FilterMetadata(MetadataStore delegate, boolean filter) { 
    57     this.delegate = delegate; 
     58  public FilterMetadata(MetadataStore store, boolean filter) { 
     59    this.store = store; 
    5860    this.filter = filter; 
    5961  } 
     
    6264 
    6365  public void createRoot() { 
    64     delegate.createRoot(); 
     66    store.createRoot(); 
    6567  } 
    6668 
    6769  public Object getRoot() { 
    68     return delegate.getRoot(); 
     70    return store.getRoot(); 
    6971  } 
    7072 
    7173  public void setRoot(Object root) { 
    72     delegate.setRoot(root); 
     74    store.setRoot(root); 
    7375  } 
    7476 
    75 #foreach ($entity in $entities) 
     77#foreach ($entity in $q.entities()) 
     78#set ($dummy = $q.setEntity($entity)) 
    7679 
    77   // -- $entity.name() property storage - 
    78 #foreach ($prop in $entity.props()) 
     80  // -- $entity property storage - 
     81#foreach ($prop in $q.props()) 
     82#set ($dummy = $q.setProperty($prop)) 
    7983 
    80   /* @see MetadataStore#set$entity.name()$prop.name()($prop.type(true), $entity.indicesList(true, false)) */ 
    81   public void set$entity.name()$prop.name()($prop.type(true) $prop.varName(), $entity.indicesList(true, true)) { 
    82 #if ($prop.type(true) == "String") 
    83     String temp = filter ? DataTools.sanitize($prop.varName()) : $prop.varName(); 
    84     delegate.set$entity.name()$prop.name()(temp, $entity.indicesList(false, true)); 
     84  /* @see MetadataStore#set$entity$prop($q.type(), $q.indicesList(true, false)) */ 
     85  public void set$entity$prop($q.type() $q.var($prop), $q.indicesList(true, true)) { 
     86#if ($q.type() == "String") 
     87    String value = filter ? DataTools.sanitize($q.var($prop)) : $q.var($prop); 
     88    store.set$entity$prop(value, $q.indicesList(false, true)); 
    8589#else 
    86     delegate.set$entity.name()$prop.name()($prop.varName(), $entity.indicesList(false, true)); 
     90    store.set$entity$prop($q.var($prop), $q.indicesList(false, true)); 
    8791#end 
    8892  } 
  • trunk/loci/formats/auto/MetadataAutogen.java

    r3617 r3917  
    4444public class MetadataAutogen { 
    4545 
    46   // -- Constants -- 
    47  
    48   /** Path to versions definition file. */ 
    49   public static final String VERSION_SRC = "MetadataAutogenVersions.txt"; 
    50  
    51   /** Path to entities definition file. */ 
    52   public static final String ENTITY_SRC = "MetadataAutogenEntities.txt"; 
    53  
    5446  // -- Main method -- 
    5547 
     
    7769    context.put("timestamp", dateFmt.format(date) + " " + timeFmt.format(date)); 
    7870 
    79     // parse versions file 
    80     Hashtable versions = parseVersions(); 
    81  
    82     // parse entities file 
    83     Vector entities = parseEntities(); 
    84     context.put("entities", entities); 
     71    // parse entity list 
     72    MetaEntityList entityList = new MetaEntityList(); 
     73    context.put("q", entityList); 
    8574 
    8675    // generate base metadata classes 
     
    9584    processTemplate(ve, context, 
    9685      "AggregateMetadata.vm", "meta/AggregateMetadata.java"); 
    97     context.put("convertMetadataBody", generateConvertMetadata(entities)); 
     86    context.put("convertMetadataBody", generateConvertMetadata(entityList)); 
    9887    processTemplate(ve, context, 
    9988      "MetadataConverter.vm", "meta/MetadataConverter.java"); 
    10089 
    10190    // generate version-specific OME-XML metadata implementations 
    102     Enumeration versionKeys = versions.keys(); 
    103     while (versionKeys.hasMoreElements()) { 
    104       String versionKey = (String) versionKeys.nextElement(); 
    105  
    106       // first entity with each distinct path end node for this version 
    107       HashSet nodes = new HashSet(); 
    108       Vector unique = new Vector(); 
    109       for (int i=0; i<entities.size(); i++) { 
    110         Entity entity = (Entity) entities.get(i); 
    111         String last = entity.last(versionKey); 
    112         if (nodes.contains(last) || last.equals("-")) continue; 
    113         nodes.add(last); 
    114         unique.add(entity); 
    115       } 
    116       context.put("unique", unique); 
    117  
    118       Hashtable vars = (Hashtable) versions.get(versionKey); 
    119       // update context 
    120       context.put("versionKey", versionKey); 
    121       Enumeration varKeys = vars.keys(); 
    122       while (varKeys.hasMoreElements()) { 
    123         String name = (String) varKeys.nextElement(); 
    124         String value = (String) vars.get(name); 
    125         context.put(name, value); 
    126       } 
    127       processTemplate(ve, context, 
    128         "OMEXMLMetadata.vm", "ome/OMEXML" + versionKey + "Metadata.java"); 
     91    for (String versionKey : entityList.versions()) { 
     92      entityList.setVersion(versionKey); 
     93      processTemplate(ve, context, "OMEXMLMetadata.vm", 
     94        "ome/OMEXML" + versionKey + "Metadata.java"); 
    12995    } 
    13096  } 
     
    147113  } 
    148114 
    149   private static Hashtable parseVersions() throws IOException { 
    150     System.out.println("Reading " + VERSION_SRC + ":"); 
    151     Hashtable versions = new Hashtable(); 
    152  
    153     String versionKey = null; 
    154     Hashtable vars = null; 
    155     BufferedReader in = new BufferedReader(new InputStreamReader( 
    156       MetadataAutogen.class.getResourceAsStream(VERSION_SRC))); 
    157     while (true) { 
    158       String line = in.readLine(); 
    159       if (line == null) break; 
    160       line = line.trim(); 
    161  
    162       if (line.startsWith("#")) continue; // comment 
    163       if (line.equals("")) continue; // blank line 
    164  
    165       if (line.startsWith("[")) { 
    166         // version header 
    167         if (versionKey != null) versions.put(versionKey, vars); 
    168         if (line.startsWith("[-")) break; 
    169         versionKey = line.substring(1, line.length() - 1); 
    170         vars = new Hashtable(); 
    171         System.out.println("\t" + versionKey); 
    172         continue; 
    173       } 
    174       int equals = line.indexOf("="); 
    175       String key = line.substring(0, equals).trim(); 
    176       String val = line.substring(equals + 1).trim(); 
    177       vars.put(key, val); 
    178     } 
    179     in.close(); 
    180     return versions; 
    181   } 
    182  
    183   public static Vector parseEntities() throws IOException { 
    184     System.out.println("Reading " + ENTITY_SRC + ":"); 
    185     Vector entities = new Vector(); 
    186     Entity entity = null; 
    187     Property prop = null; 
    188     BufferedReader in = new BufferedReader(new InputStreamReader( 
    189       MetadataAutogen.class.getResourceAsStream(ENTITY_SRC))); 
    190     while (true) { 
    191       String line = in.readLine(); 
    192       if (line == null) break; 
    193       line = line.trim(); 
    194  
    195       if (line.startsWith("#")) continue; // comment 
    196       if (line.equals("")) continue; // blank line 
    197  
    198       if (line.startsWith("[")) { 
    199         // entity header 
    200         if (entity != null) entities.add(entity); 
    201         if (line.startsWith("[-")) break; 
    202         String name = line.substring(1, line.length() - 1); 
    203         String desc = in.readLine(); 
    204         String extra = in.readLine(); 
    205         entity = new Entity(name, desc, extra); 
    206         System.out.println("\t" + entity.name()); 
    207         continue; 
    208       } 
    209  
    210       if (line.startsWith("*")) { 
    211         int colon = line.indexOf(":"); 
    212         if (colon < 0) { 
    213           System.err.println("Warning: invalid line: " + line); 
    214           continue; 
    215         } 
    216         String versionKey = line.substring(1, colon).trim(); 
    217         String propName = line.substring(colon + 1).trim(); 
    218         prop.addMappedName(versionKey, propName); 
    219         continue; 
    220       } 
    221  
    222       int colon = line.indexOf(":"); 
    223       if (colon >= 0) { 
    224         // path to XML element for a particular schema version 
    225         String versionKey = line.substring(0, colon).trim(); 
    226         String path = line.substring(colon + 1).trim(); 
    227         entity.addPath(versionKey, path); 
    228         continue; 
    229       } 
    230  
    231       StringTokenizer st = new StringTokenizer(line); 
    232       int tokens = st.countTokens(); 
    233       if (tokens < 2) { 
    234         // unknown line type 
    235         System.err.println("Warning: invalid line: " + line); 
    236         continue; 
    237       } 
    238  
    239       // property 
    240       String propType = st.nextToken(); 
    241       String propName = st.nextToken(); 
    242       StringBuffer sb = new StringBuffer(); 
    243       if (st.hasMoreTokens()) sb.append(st.nextToken()); 
    244       while (st.hasMoreTokens()) { 
    245         sb.append(" "); 
    246         sb.append(st.nextToken()); 
    247       } 
    248       String propDoc = sb.toString(); 
    249       prop = new Property(propName, propType, propDoc, entity, false); 
    250     } 
    251     in.close(); 
    252     return entities; 
    253   } 
    254  
    255   private static String generateConvertMetadata(Vector entities) { 
    256     ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
    257     PrintWriter out = new PrintWriter(new OutputStreamWriter(baos)); 
     115  private static String generateConvertMetadata(MetaEntityList q) { 
     116    StringWriter sw = new StringWriter(); 
     117    PrintWriter out = new PrintWriter(sw); 
    258118    final int indent = 2; 
    259119 
    260     Collections.sort(entities); 
     120    Vector<String> entities = q.entities(); 
    261121 
    262122    StringBuffer spaces = new StringBuffer(); 
    263     Vector lastIndices = new Vector(); 
     123    Vector<String> lastIndices = new Vector<String>(); 
    264124 
    265     for (int i=0; i<entities.size(); i++) { 
    266       Entity e = (Entity) entities.get(i); 
    267       Vector indices = e.indices(); 
     125    for (String entity : entities) { 
     126      q.setEntity(entity); 
     127 
     128      Vector<String> indices = q.indices(); 
    268129 
    269130      // find deepest common element 
    270131      int depth = 0; 
     132 
    271133      for (int j=0; j<indices.size(); j++) { 
    272134        if (j >= lastIndices.size()) break; 
    273         Property lastP = (Property) lastIndices.get(j); 
    274         Property thisP = (Property) indices.get(j); 
    275         if (!lastP.name().equals(thisP.name())) break; 
     135        String lastIndex = lastIndices.get(j); 
     136        String thisIndex = indices.get(j); 
     137        if (!lastIndex.equals(thisIndex)) break; 
    276138        depth++; 
    277139      } 
     
    287149      // start new for loops 
    288150      for (int j=depth; j<indices.size(); j++) { 
    289         Property prop = (Property) indices.get(j); 
     151        String index = indices.get(j); 
    290152        spaces.setLength(0); 
    291153        for (int k=0; k<j+indent; k++) spaces.append("  "); 
    292         String iVar = prop.varName(); 
    293         String countVar = prop.varName().replaceFirst("Index$", "Count"); 
    294         out.println(spaces + "int " + countVar + " = " + "src.get" + 
    295           prop.name().replaceFirst("Index$", "Count") + "(" + 
    296           e.indicesList(false, true, false) + ");"); 
     154        String iVar = q.var(index + "Index"); 
     155        String countVar = iVar.replaceFirst("Index$", "Count"); 
     156        out.println(spaces + "int " + countVar + " = " + 
     157          "src.get" + index + "Count" + "(" + 
     158          q.indicesList(false, true, false) + ");"); 
    297159        out.println(spaces + "for (int " + iVar + "=0; " + 
    298160          iVar + "<" + countVar + "; " + iVar + "++) {"); 
     
    301163 
    302164      // set properties 
    303       Vector props = e.props(); 
    304       for (int j=0; j<props.size(); j++) { 
    305         Property prop = (Property) props.get(j); 
    306         String methodName = e.name() + prop.name(); 
    307         String iList = e.indicesList(false, true); 
     165      Vector<String> props = q.props(); 
     166      for (String prop : props) { 
     167        String methodName = entity + prop; 
     168        String iList = q.indicesList(false, true); 
    308169        out.println(spaces + "  dest.set" + methodName + 
    309170          "(src.get" + methodName + "(" + iList + "), " + iList + ");"); 
     
    320181 
    321182    out.close(); 
    322     return baos.toString(); 
     183    return sw.toString(); 
    323184  } 
    324185 
  • trunk/loci/formats/auto/MetadataRetrieve.vm

    r3605 r3917  
    4646 
    4747  // - Entity counting - 
    48 #foreach ($entity in $entities) 
    49 #if ($entity.countable()) 
     48#foreach ($entity in $q.entities()) 
     49#set ($dummy = $q.setEntity($entity)) 
     50#if ($q.countable()) 
    5051 
    51   int get$entity.name()Count($entity.indicesList(true, true, false)); 
     52  int get${entity}Count($q.indicesList(true, true, false)); 
    5253#end###if countable 
    5354#end##foreach $entity 
    5455 
    5556  // - Entity retrieval - 
    56 #foreach ($entity in $entities) 
     57#foreach ($entity in $q.entities()) 
     58#set ($dummy = $q.setEntity($entity)) 
     59 
     60  // - $entity property retrieval - 
     61#foreach ($prop in $q.props()) 
     62#set ($dummy = $q.setProperty($prop)) 
    5763 
    5864  /** 
    59    * Gets an object representing a particular $entity.name(), for use with certain methods of {@link MetadataStore}. 
     65   * For a particular $entity, gets $q.doc() 
     66#foreach ($index in $q.indices()) 
     67   * @param $q.var("${index}Index") index of the $index 
     68#end##foreach $index 
    6069   */ 
    61   Object get$entity.name()($entity.indicesList(true, true)); 
    62 #end##foreach $entity 
    63 #foreach ($entity in $entities) 
    64  
    65   // - $entity.name() property retrieval - 
    66 #foreach ($prop in $entity.props()) 
    67  
    68   /** 
    69    * Gets $prop.desc() for a particular $entity.name() object. 
    70 #foreach ($prop in $entity.indices()) 
    71    * @param $prop.varName() $prop.desc() 
    72 #end 
    73    */ 
    74   $prop.type(true) get$entity.name()$prop.name()($entity.indicesList(true, true)); 
     70  $q.type() get$entity$prop($q.indicesList(true, true)); 
    7571#end 
    7672#end 
  • trunk/loci/formats/auto/MetadataStore.vm

    r3605 r3917  
    5555 
    5656  void setRoot(Object root); 
    57 #foreach ($entity in $entities) 
     57#foreach ($entity in $q.entities()) 
     58#set ($dummy = $q.setEntity($entity)) 
    5859 
    59   // - $entity.name() property storage - 
    60 #foreach ($prop in $entity.props()) 
     60  // - $entity property storage - 
     61#foreach ($prop in $q.props()) 
     62#set ($dummy = $q.setProperty($prop)) 
    6163 
    6264  /** 
    63    * Sets the $prop.name() property for $entity.doc() 
    64    * @param $prop.varName() $prop.desc() 
    65 #foreach ($indexProp in $entity.indices()) 
    66    * @param $indexProp.varName() $indexProp.desc() 
    67 #end##foreach $indexProp 
     65   * For a particular $entity, sets $q.doc() 
     66   * @param $q.var($prop) $q.description() 
     67#foreach ($index in $q.indices()) 
     68   * @param $q.var("${index}Index") index of the $index 
     69#end##foreach $index 
    6870   */ 
    69   void set$entity.name()$prop.name()($prop.type(true) $prop.varName(), $entity.indicesList(true, true)); 
     71  void set$entity$prop($q.type() $q.var($prop), $q.indicesList(true, true)); 
    7072#end##foreach $prop 
    7173#end##foreach $entity 
  • trunk/loci/formats/auto/OMEXMLMetadata.vm

    r3605 r3917  
    3333package loci.formats.ome; 
    3434 
    35 #if ($legacy == "true") 
     35#if ($q.legacy()) 
    3636import $basePackage.*; 
    37 #end##$legacy 
    38 import $basePackage.$subPackage.*; 
     37#end##if legacy 
     38import $q.basePackage().$q.subPackage().*; 
    3939import java.util.List; 
    4040import loci.formats.LogTools; 
     
    4242/** 
    4343 * A metadata store implementation for constructing and manipulating OME-XML 
    44  * DOMs for the $version version of OME-XML. It requires the 
    45  * $basePackage package to compile (part of ome-java.jar). 
     44 * DOMs for the $q.version() version of OME-XML. It requires the 
     45 * $q.basePackage() package to compile (part of ome-java.jar). 
    4646 * 
    4747 * <dl><dt><b>Source code:</b></dt> 
    48  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/loci/formats/ome/$id">Trac</a>, 
    49  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/loci/formats/ome/$id">SVN</a></dd></dl> 
     48 * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/loci/formats/ome/$q.id()">Trac</a>, 
     49 * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/loci/formats/ome/$q.id()">SVN</a></dd></dl> 
    5050 * 
    5151 * @author Curtis Rueden ctrueden at wisc.edu 
    5252 * @author Melissa Linkert linkert at wisc.edu 
    5353 */ 
    54 public class $class extends OMEXMLMetadata { 
     54public class $q.className() extends OMEXMLMetadata { 
    5555 
    5656  // -- OMEXMLMetadata API methods -- 
     
    5959  public String dumpXML() { 
    6060    if (root == null) return null; 
    61 #if ($legacy == "true") 
     61#if ($q.legacy()) 
    6262    try { return ((OMENode) root).writeOME(false); } 
    6363    catch (javax.xml.transform.TransformerException exc) { 
     
    8080    } 
    8181    return null; 
    82 #end##if $legacy 
     82#end##if legacy 
    8383  } 
    8484 
     
    8686 
    8787  // - Entity counting - 
    88 #foreach ($entity in $entities) 
     88#foreach ($entity in $q.entities()) 
     89#set ($dummy = $q.setEntity($entity)) 
    8990#if ($entity.countable()) 
    90 #set ($last = $entity.last($versionKey)) 
     91#set ($last = $q.last()) 
    9192 
    9293  /* @see loci.formats.meta.MetadataRetrieve#get$entity.name()Count($entity.indicesList(true, false, false)) */ 
    9394  public int get$entity.name()Count($entity.indicesList(true, true, false)) { 
    94 #if ($last == "-") 
     95    return 0;//TEMP! 
     96#if ($q.path() == "-") 
    9597    // NB: $entity.name() unsupported for schema version $version 
    9698    return -1; 
    9799#else 
    98100    for (int i=0; i<Integer.MAX_VALUE; i++) { 
    99       if (get$entity.name()($entity.indicesList(false, true).replaceFirst("[a-zA-Z_0-9]+$", "i")) == null) return i; 
     101      if (get$entity($q.indicesList(false, true).replaceFirst("[a-zA-Z_0-9]+$", "i")) == null) return i; 
    100102    } 
    101103    return -1; 
     
    106108 
    107109  // - Entity retrieval - 
    108 #foreach ($entity in $entities) 
    109 #set ($last = $entity.last($versionKey)) 
    110  
    111   /* @see loci.formats.meta.MetadataRetrieve#get$entity.name()($entity.indicesList(true, false)) */ 
    112   public Object get$entity.name()($entity.indicesList(true, true)) { 
    113 #if ($last == "-") 
    114     // NB: $entity.name() unsupported for schema version $version 
    115     return null; 
    116 #else 
    117     return get${last}Node($entity.indicesList(false, true), false); 
    118 #end##if "-" 
    119   } 
    120 #end##foreach $entity 
    121 #foreach ($entity in $entities) 
    122 #set ($last = $entity.last($versionKey)) 
    123 #set ($lastVar = $entity.lastVar($versionKey)) 
    124  
    125   // - $entity.name() property retrieval - 
     110#foreach ($entity in $q.entities()) 
     111#set ($dummy = $q.setEntity($entity)) 
     112#set ($last = $q.last()) 
     113#set ($lastVar = $q.var($last)) 
     114 
     115  // - $entity property retrieval - 
    126116#foreach ($prop in $entity.props()) 
    127 #set ($mappedName = $prop.mappedName($versionKey)) 
     117#set ($dummy = $q.setProperty($prop)) 
     118  CTR START HERE 
     119#set ($mappedName = $q.Name($versionKey)) 
    128120#set ($convert = $mappedName.endsWith("%")) 
    129121#set ($mappedName = $mappedName.replaceAll("%", "")) 
  • trunk/loci/formats/auto/Property.java

    r3737 r3917  
    2828 
    2929/** 
    30  * CTR TODO Property javadoc. 
     30 * A property is an object that belongs to a particular {@link Entity}. 
     31 * It has a list of default attributes (key/value pairs), 
     32 * as well as a list of version overrides for those attributes. 
     33 * 
     34 * @see {EntityList} 
    3135 * 
    3236 * <dl><dt><b>Source code:</b></dt> 
     
    4044  // -- Fields -- 
    4145 
    42   private String name; 
    43   private String type; 
    44   private String desc; 
    45   private Entity entity; 
    46   private String prefix; 
    47   private String varName; 
     46  /** The property's attributes. */ 
     47  protected Hashtable<String, String> attrs; 
    4848 
    49   private Hashtable nameMap; 
     49  /** The property's version overrides. */ 
     50  protected Hashtable<String, Hashtable<String, String>> versions = 
     51    new Hashtable<String, Hashtable<String, String>>(); 
    5052 
    5153  // -- Constructor -- 
    5254 
    53   public Property(String name, String type, String desc, 
    54     Entity entity, boolean index) 
    55   { 
    56     this.name = name; 
    57     this.type = type; 
    58     this.desc = desc; 
    59     this.entity = entity; 
    60     if (!index) entity.addProperty(this); 
    61  
    62     nameMap = new Hashtable(); 
    63  
    64     // strip off any lower case prefix 
    65     int prefixIndex = getPrefixIndex(name); 
    66     if (prefixIndex > 0) { 
    67       prefix = name.substring(0, prefixIndex); 
    68       name = name.substring(prefixIndex); 
    69     } 
    70     else prefix = "get"; 
    71  
    72     varName = entity.toVarName(name); 
    73   } 
    74  
    75   // -- Property API methods -- 
    76  
    77   public String name() { return name; } 
    78  
    79   public String mappedName(String version) { 
    80     String mapped = (String) nameMap.get(version); 
    81     if (mapped == null) return name; 
    82     // strip off any lower case prefix 
    83     int prefixIndex = getPrefixIndex(mapped); 
    84     return mapped.substring(prefixIndex); 
    85   } 
    86  
    87   public String desc() { return desc; } 
    88  
    89   public String type() { return type(false); } 
    90  
    91   public String type(boolean safe) { 
    92     return safe && isNode() ? "Object" : type; 
    93   } 
    94  
    95   public String prefix() { return prefix; } 
    96  
    97   public String mappedPrefix(String version) { 
    98     String mapped = (String) nameMap.get(version); 
    99     if (mapped == null) return prefix; 
    100     int prefixIndex = getPrefixIndex(mapped); 
    101     return prefixIndex > 0 ? mapped.substring(0, prefixIndex) : "get"; 
    102   } 
    103  
    104   public String varName() { return varName; } 
    105  
    106   public String varName(boolean safe) { 
    107     return safe && isNode() ? "(" + type + ") " + varName : varName; 
    108   } 
    109  
    110   public boolean isNode() { return type.endsWith("Node"); } 
    111  
    112   public void addMappedName(String version, String name) { 
    113     nameMap.put(version, name); 
    114   } 
    115  
    116   // -- Object API methods -- 
    117  
    118   public String toString() { return name; } 
    119  
    120   // -- Helper methods -- 
    121  
    122   protected int getPrefixIndex(String s) { 
    123     char[] c = s.toCharArray(); 
    124     int i = 0; 
    125     while (i < c.length && c[i] >= 'a' && c[i] <= 'z') i++; 
    126     return i; 
     55  /** Creates a new property with the given attributes. */ 
     56  public Property(Hashtable<String, String> attrs) { 
     57    this.attrs = attrs; 
    12758  } 
    12859 
  • trunk/loci/formats/auto/entities.txt

    r3840 r3917  
    11# 
    2 # MetadataAutogenEntities.txt 
     2# entities.txt 
    33# 
    44 
     
    2121# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2222 
    23 # Add new metadata entity and property definitions to this file. 
     23# This file enumerates the metadata entity and property definitions for the 
     24# loci.formats.meta package, and loci.formats.ome.OMEXML*Metadata classes. 
    2425 
    2526# Path key and syntax notes: 
    26 # 1) Entities ending in plus (+) have an associated counter method. 
    27 # 2) Elements ending in plus (+) have maxOccurs > 1 and generate an index 
    28 #    parameter to allow differentiation between them. 
    29 # 3) Elements beginning with at (@) are not direct children of the previous 
    30 #    element, but instead reference the parent via an ID reference. 
    31 # 4) Elements beginning with at-bang (@!) also use a parent reference but 
     27# 
     28# 1) Path elements ending in plus (+) have maxOccurs > 1 and generate an 
     29#    index parameter to allow differentiation between them. 
     30# 
     31# 2) Path elements beginning with at (@) are not direct children of the 
     32#    previous element, but instead reference the parent via an ID reference. 
     33# 
     34# 3) Path elements beginning with at-bang (@!) also use a parent reference but 
    3235#    the API is slightly different -- e.g., for a LightSource accessing a 
    3336#    child Laser, the method is lightSource.getLaserListByLightSource() 
    3437#    rather than lightSource.getLaserList(). 
    35 # 5) Overridden attributes ending in percent (%) indicate a type conflict 
    36 #    that must be resolved by calling type conversion methods from the  
    37 #    OMEXMLMetadata superclass. 
    38 # 6) Attributes starting with small case indicate a method prefix other than 
    39 #    "get" -- e.g., "isTunable" overrides default "getTunable" method name. 
    40  
    4138 
    4239### Entities for 5D Image information ### 
    4340 
    44 [Image+] 
    45 an image in the metadata store with a particular index 
    46 - 
    47 Default: Image+ 
    48 String NodeID        TODO 
    49 String Name          the full name of the image 
    50 String CreationDate  the creation date of the image 
    51 *2003FC: Created 
    52 String Description   the full description of the image 
    53  
    54 [Pixels+] 
    55 a pixels set in the metadata store with a particular image and pixels index 
    56 - 
    57 Default: Image+/Pixels+ 
    58 2003FC: Image+/CA/Pixels+ 
    59 String NodeID          TODO 
    60 Integer SizeX          size of an individual plane or section's X axis (width) 
    61 Integer SizeY          size of an individual plane of section's Y axis (height) 
    62 Integer SizeZ          number of optical sections per stack 
    63 Integer SizeC          number of channels per timepoint 
    64 Integer SizeT          number of timepoints 
    65 String PixelType       the pixel type 
    66 Boolean BigEndian      if the pixels set is big endian or not 
    67 *2003FC: isBigEndian 
    68 String DimensionOrder  the dimension order of the pixels set 
     41## Image ## 
     42 
     43[Image] 
     44countable = true 
     45path = Image+ 
     46description = an image in the metadata store 
     47 
     48[Image ID] 
     49type = String 
     50getter = getNodeID 
     51setter = setNodeID 
     52description = TODO 
     53 
     54[Image Name] 
     55type = String 
     56description = the full name of the image 
     57 
     58[Image CreationDate] 
     59type = String 
     60description = the creation date of the image 
     61 
     62[Image CreationDate 2003FC] 
     63getter = getCreated 
     64setter = setCreated 
     65 
     66[Image Description] 
     67type = String 
     68description = the full description of the image 
     69 
     70## Pixels ## 
     71 
     72[Pixels] 
     73countable = true 
     74path = Image+/Pixels+ 
     75description = A pixels set in the metadata store. 
     76 
     77[Pixels 2003FC] 
     78path = Image+/CA/Pixels+ 
     79 
     80[Pixels ID] 
     81type = String 
     82getter = getNodeID 
     83setter = getNodeID 
     84description = TODO 
     85 
     86[Pixels SizeX] 
     87type = Integer 
     88description = The size of an individual plane or section's X axis (width). 
     89 
     90[Pixels SizeY] 
     91type = Integer 
     92description = The size of an individual plane or section's Y axis (height). 
     93 
     94[Pixels SizeZ] 
     95type = Integer 
     96description = number of optical sections per stack 
     97 
     98[Pixels SizeC] 
     99type = Integer 
     100description = number of channels per timepoint 
     101 
     102[Pixels SizeT] 
     103type = Integer 
     104description = number of timepoints 
     105 
     106[Pixels PixelType] 
     107type = String 
     108description = the pixel type 
     109 
     110[Pixels BigEndian] 
     111type = Boolean 
     112description = endianness of the pixels set 
     113 
     114[Pixels BigEndian 2003FC] 
     115getter = isBigEndian 
     116 
     117[Pixels DimensionOrder] 
     118type = String 
     119description = the dimension order of the pixels set 
     120 
     121## Dimensions ## 
    69122 
    70123[Dimensions] 
    71 a set of pixel dimensions in the metadata store with a particular index 
    72 Unless both values are non-null, the MetadataStore should assume physicalSizeX equals physicalSizeY (i.e., should populate the null field with the other field's value). # TODO Does Bio-Formats still rely on this requirement? 
    73 Default: Image+/Pixels+ 
    74 2003FC: Image+/CA/Dimensions 
    75 Float PhysicalSizeX    size of an individual pixel's X axis in microns 
    76 *2003FC: PixelSizeX 
    77 Float PhysicalSizeY    size of an individual pixel's Y axis in microns 
    78 *2003FC: PixelSizeY 
    79 Float PhysicalSizeZ    size of an individual pixel's Z axis in microns 
    80 *2003FC: PixelSizeZ 
    81 Float TimeIncrement    distance between adjacent time points in seconds 
    82 *2003FC: PixelSizeT 
    83 Integer WaveStart      starting wavelength in nanometers 
    84 *2003FC: - 
    85 Integer WaveIncrement  distance between adjacent wavelengths in nanometers 
    86 *2003FC: PixelSizeC% 
     124path = Image+/Pixels+ 
     125description = a set of pixel dimensions in the metadata store \ 
     126              with a particular index 
     127#notes = Unless both values are non-null, the MetadataStore should assume \ 
     128#        physicalSizeX equals physicalSizeY (i.e., should populate the null \ 
     129#        field with the other field's value). 
     130# TODO Does Bio-Formats still rely on the above requirement? 
     131 
     132[Dimensions 2003FC] 
     133path = Image+/CA/Dimensions 
     134 
     135[Dimensions PhysicalSizeX] 
     136type = Float 
     137description = the size of an individual pixel's X axis in microns 
     138 
     139[Dimensions PhysicalSizeX 2003FC] 
     140getter = getPixelSizeX 
     141setter = setPixelSizeX 
     142 
     143[Dimensions PhysicalSizeY] 
     144type = Float 
     145description = the size of an individual pixel's Y axis in microns 
     146 
     147[Dimensions PhysicalSizeY 2003FC] 
     148getter = getPixelSizeY 
     149setter = setPixelSizeY 
     150 
     151[Dimensions PhysicalSizeZ] 
     152type = Float 
     153description = the size of an individual pixel's Z axis in microns 
     154 
     155[Dimensions PhysicalSizeZ 2003FC] 
     156getter = getPixelSizeZ 
     157setter = setPixelSizeZ 
     158 
     159[Dimensions TimeIncrement] 
     160type = Float 
     161description = the distance between adjacent time points in seconds 
     162 
     163[Dimensions TimeIncrement 2003FC] 
     164getter = getPixelSizeT 
     165setter = setPixelSizeT 
     166 
     167[Dimensions WaveStart] 
     168type = Integer 
     169description = the starting wavelength in nanometers 
     170 
     171[Dimensions WaveStart 2003FC] 
     172path = - 
     173 
     174[Dimensions WaveIncrement] 
     175type = Integer 
     176description = the distance between adjacent wavelengths in nanometers 
     177 
     178[Dimensions WaveIncrement 2003FC] 
     179type = Float 
     180getter = getPixelSizeC 
     181setter = setPixelSizeC 
     182 
     183## ImagingEnvironment ## 
    87184 
    88185[ImagingEnvironment] 
    89 the imaging environment for a particular image 
    90 - 
    91 Default: Image+/ImagingEnvironment 
    92 2003FC: Image+/CA/ImagingEnvironment 
    93 Float Temperature  TODO 
    94 Float AirPressure  TODO 
    95 Float Humidity     TODO 
    96 Float CO2Percent   TODO 
    97  
    98 [Plane+] 
    99 the plane information for a specific X-Y plane (section) within a particular pixels set 
    100 - 
    101 Default: Image+/Pixels+/Plane+ 
    102 2003FC: - 
    103 Integer TheZ        the optical section index 
    104 Integer TheC        the channel index 
    105 Integer TheT        the timepoint 
     186path = Image+/ImagingEnvironment 
     187description = the imaging environment for a particular image 
     188 
     189[ImagingEnvironment 2003FC] 
     190path = Image+/CA/ImagingEnvironment 
     191 
     192[ImagingEnvironment Temperature] 
     193type = Float 
     194description = TODO 
     195 
     196[ImagingEnvironment AirPressure] 
     197type = Float 
     198description = TODO 
     199 
     200[ImagingEnvironment Humidity] 
     201type = Float 
     202description = TODO 
     203 
     204[ImagingEnvironment CO2Percent] 
     205type = Float 
     206description = TODO 
     207 
     208## Plane ## 
     209 
     210[Plane] 
     211countable = true 
     212path = Image+/Pixels+/Plane+ 
     213description = the plane information for a specific X-Y plane (section) \ 
     214              within a particular pixels set 
     215 
     216[Plane 2003FC] 
     217path = - 
     218 
     219[Plane TheZ] 
     220type = Integer 
     221description = the optical section index 
     222 
     223[Plane TheC] 
     224type = Integer 
     225description = the channel index 
     226 
     227[Plane TheT] 
     228type = Integer 
     229description = the timepoint 
     230 
     231## PlaneTiming ## 
    106232 
    107233[PlaneTiming] 
    108 the timing information for a specific X-Y plane (section) within a particular pixels set 
    109 - 
    110 Default: Image+/Pixels+/Plane+/PlaneTiming 
    111 2003FC: - 
    112 Float DeltaT        the time in seconds since the beginning of the experiment 
    113 Float ExposureTime  the exposure time in seconds 
     234path = Image+/Pixels+/Plane+/PlaneTiming 
     235description = the timing information for a specific X-Y plane (section) \ 
     236              within a particular pixels set 
     237 
     238[PlaneTiming 2003FC] 
     239path = - 
     240 
     241[PlaneTiming DeltaT] 
     242type = Float 
     243description = the time in seconds since the beginning of the experiment 
     244 
     245[PlaneTiming ExposureTime] 
     246type = Float 
     247description = the exposure time in seconds 
     248 
     249## StagePosition ## 
    114250 
    115251[StagePosition] 
    116 the stage position for a specific X-Y plane (section) within a particular pixels set 
    117 - 
    118 Default: Image+/Pixels+/Plane+/StagePosition 
    119 2003FC: - 
    120 Float PositionX  the X coordinate of the stage position 
    121 Float PositionY  the Y coordinate of the stage position 
    122 Float PositionZ  the Z coordinate of the stage position 
    123  
     252path = Image+/Pixels+/Plane+/StagePosition 
     253description = the stage position for a specific X-Y plane (section) \ 
     254              within a particular pixels set 
     255 
     256[StagePosition 2003FC] 
     257path = - 
     258 
     259[StagePosition PositionX] 
     260type = Float 
     261description = the X coordinate of the stage position 
     262 
     263[StagePosition PositionY] 
     264type = Float 
     265description = the Y coordinate of the stage position 
     266 
     267[StagePosition PositionZ] 
     268type = Float 
     269description = the Z coordinate of the stage position 
    124270 
    125271### Entities for channel information for a particular Image ### 
    126272 
    127 [LogicalChannel+] 
    128 a logical channel and physical channel in the metadata store for a particular pixels 
    129 - 
    130 Default: Image+/LogicalChannel+ 
    131 2003FC: Image+/CA/LogicalChannel+ 
    132 String NodeID                          TODO 
    133 String Name                            the logical channel's name 
    134 Integer SamplesPerPixel                TODO 
    135 String IlluminationType                the illumination type 
    136 Integer PinholeSize                    the size of the pinhole 
    137 String PhotometricInterpretation       the photometric interpretation type 
    138 String Mode                            the acquisition mode 
    139 String ContrastMethod                  the constrast method name 
    140 Integer ExWave                         the excitation wavelength 
    141 *2003FC: ExcitationWavelength 
    142 Integer EmWave                         the emission wavelength 
    143 *2003FC: EmissionWavelength 
    144 String Fluor                           the fluorescence type 
    145 Float NdFilter                         the neutral-density filter value 
    146 *2003FC: NDFilter 
    147 Integer PockelCellSetting              TODO 
    148 *2003FC: - 
    149  
    150 [ChannelComponent+] 
    151 a channel component describes how each channel in the pixel array relates to the logical channels 
    152 - 
    153 Default: Image+/LogicalChannel+/ChannelComponent+ 
    154 2003FC: Image+/CA/LogicalChannel+/@PixelChannelComponent+ 
    155 Integer Index       the index into the channel dimension of the 5-D pixel array 
    156 String ColorDomain  which color channel this ChannelComponent belongs to (for example, 'R' for an 'RGB' PhotometricInterpretation) 
    157 # FIXME xsd-fu needs to include get/setPixels methods in ChannelComponentNode 
    158 #PixelsNode Pixels   the pixels to which this channel component corresponds 
     273## LogicalChannel ## 
     274 
     275[LogicalChannel] 
     276countable = true 
     277path = Image+/LogicalChannel+ 
     278description = a logical channel and physical channel in the metadata store \ 
     279              for a particular pixels set 
     280 
     281[LogicalChannel 2003FC] 
     282path = Image+/CA/LogicalChannel+ 
     283 
     284[LogicalChannel ID] 
     285type = String 
     286getter = getNodeID 
     287setter = setNodeID 
     288description = TODO 
     289 
     290[LogicalChannel Name] 
     291type = String 
     292description = the logical channel's name 
     293 
     294[LogicalChannel SamplesPerPixel] 
     295type = Integer 
     296description = TODO 
     297 
     298[LogicalChannel IlluminationType] 
     299type = String 
     300description = the illumination type 
     301 
     302[LogicalChannel PinholeSize] 
     303type = Integer 
     304description = the size of the pinhole 
     305 
     306[LogicalChannel PhotometricInterpretation] 
     307type = String 
     308description = the photometric interpretation type 
     309 
     310[LogicalChannel Mode] 
     311type = String 
     312description = the acquisition mode 
     313 
     314[LogicalChannel ContrastMethod] 
     315type = String 
     316description = the constrast method name 
     317 
     318[LogicalChannel ExWave] 
     319type = Integer 
     320description = the excitation wavelength 
     321 
     322[LogicalChannel ExWave 2003FC] 
     323getter = getExcitationWavelength 
     324setter = setExcitationWavelength 
     325 
     326[LogicalChannel EmWave] 
     327type = Integer 
     328description = the emission wavelength 
     329 
     330[LogicalChannel EmWave 2003FC] 
     331getter = getEmissionWavelength 
     332setter = setEmissionWavelength 
     333 
     334[LogicalChannel Fluor] 
     335type = String 
     336description = the fluorescence type 
     337 
     338[LogicalChannel NdFilter] 
     339type = Float 
     340description = the neutral-density filter value 
     341 
     342[LogicalChannel NdFilter 2003FC] 
     343getter = getNDFilter 
     344setter = setNDFilter 
     345 
     346[LogicalChannel PockelCellSetting] 
     347type = Integer 
     348description = TODO 
     349 
     350[LogicalChannel PockelCellSetting 2003FC] 
     351path = - 
     352 
     353## ChannelComponent ## 
     354 
     355[ChannelComponent] 
     356countable = true 
     357path = Image+/LogicalChannel+/ChannelComponent+ 
     358description = a channel component describes how each channel \ 
     359              in the pixel array relates to the logical channels 
     360 
     361[ChannelComponent 2003FC] 
     362path = Image+/CA/LogicalChannel+/@PixelChannelComponent+ 
     363 
     364[ChannelComponent Index] 
     365type = Integer 
     366description = the index into the channel dimension of the 5-D pixel array 
     367 
     368[ChannelComponent ColorDomain] 
     369type = String 
     370description = which color channel this ChannelComponent belongs to \ 
     371              (for example, 'R' for an 'RGB' PhotometricInterpretation) 
     372 
     373# FIXME xsd-fu needs to include get/setPixels methods in ChannelComponentNode? 
     374#[ChannelComponent Pixels] 
     375#type = String 
     376#description = the pixels to which this channel component corresponds 
     377 
     378## DisplayOptions ## 
    159379 
    160380[DisplayOptions] 
    161 various display options for a particular pixels set 
    162 - 
    163 Default: Image+/DisplayOptions 
    164 2003FC: Image+/CA/DisplayOptions 
    165 String NodeID      TODO 
     381path = Image+/DisplayOptions 
     382description = various display options for a particular pixels set 
     383 
     384[DisplayOptions 2003FC] 
     385path = Image+/CA/DisplayOptions 
     386 
     387[DisplayOptions ID] 
     388type = String 
     389getter = getNodeID 
     390setter = setNodeID 
     391description = TODO 
     392 
    166393# FIXME xsd-fu needs to include get/setPixels methods in DisplayOptionsNode 
    167 #PixelsNode Pixels  the pixels to which these display options correspond 
    168 Float Zoom         zoom factor for use in the display (NOT THE LENS ZOOM) 
     394#[DisplayOptions Pixels] 
     395#type = String 
     396#description = the pixels to which these display options correspond 
     397 
     398[DisplayOptions Zoom] 
     399type = Float 
     400description = zoom factor for use in the display (NOT THE LENS ZOOM) 
     401 
     402## RedChannel ## 
    169403 
    170404# FIXME xsd-fu needs to include RedChannelNode (extension of ChannelSpecNode) 
    171405#[RedChannel] 
    172 #information about the red channel for a particular image 
    173 #- 
    174 #Default: Image+/DisplayOptions/RedChannel 
    175 ## FIXME the 2003FC path below will cause compilation errors because RedChannel is not of type RedChannelNode, but DisplayChannelNode; need a notation to specify the distinction between node type and method getter name 
    176 #2003FC: Image+/CA/DisplayOptions/RedChannel 
    177 #Integer ChannelNumber  TODO 
    178 #Float WhiteLevel       TODO 
    179 #Float BlackLevel       TODO 
    180 #Float Gamma            TODO 
     406#path = Image+/DisplayOptions/RedChannel 
     407#description = information about the red channel for a particular image 
     408# 
     409# FIXME the 2003FC path below will cause compilation errors because RedChannel 
     410# is not of type RedChannelNode, but DisplayChannelNode; need a notation to 
     411# specify the distinction between node type and method getter name 
     412#[RedChannel 2003FC] 
     413#path = Image+/CA/DisplayOptions/RedChannel 
     414# 
     415#[RedChannel ChannelNumber] 
     416#type = Integer 
     417#description = TODO 
     418# 
     419#[RedChannel WhiteLevel] 
     420#type = Float 
     421#description = TODO 
     422# 
     423#[RedChannel BlackLevel] 
     424#type = Float 
     425#description = TODO 
     426# 
     427#[RedChannel Gamma] 
     428#type = Float 
     429#description = TODO 
     430 
     431## RedChannelToggle ## 
    181432 
    182433# FIXME xsd-fu needs to include RedChannelNode (extension of ChannelSpecNode) 
    183434#[RedChannelToggle] 
    184 #visibility toggle for a particular image's red channel 
    185 #- 
    186 #Default: Image+/DisplayOptions/RedChannel 
    187 #2003FC: Image+/CA/DisplayOptions 
    188 ## FIXME this attribute really is called "isOn"; needs to be addressed somehow 
    189 #Boolean isOn  indicator for whether red channel is active in the display 
    190 #*2003FC: isRedChannelOn 
     435#description = visibility toggle for a particular image's red channel 
     436#path = Image+/DisplayOptions/RedChannel 
     437# 
     438#[RedChannelToggle 2003FC] 
     439#path = Image+/CA/DisplayOptions 
     440# 
     441#[RedChannelToggle Enabled] 
     442#type = Boolean 
     443#getter = getisOn 
     444#setter = setisOn 
     445#description = indicator for whether red channel is active in the display 
     446# 
     447#[RedChannelToggle Enabled 2003FC 
     448#getter = isRedChannelOn 
     449#setter = setRedChannelOn 
     450 
     451## GreenChannel ## 
    191452 
    192453# FIXME xsd-fu needs to include GreenChannelNode (extension of ChannelSpecNode) 
    193454#[GreenChannel] 
    194 #information about the green channel for a particular image 
    195 #- 
    196 #Default: Image+/DisplayOptions/GreenChannel 
    197 ## FIXME the 2003FC path below will cause compilation errors because GreenChannel is not of type GreenChannelNode, but DisplayChannelNode; need a notation to specify the distinction between node type and method getter name 
    198 #2003FC: Image+/CA/DisplayOptions/GreenChannel 
    199 #Integer ChannelNumber  TODO 
    200 #Float WhiteLevel       TODO 
    201 #Float BlackLevel       TODO 
    202 #Float Gamma            TODO 
     455#path = Image+/DisplayOptions/GreenChannel 
     456#description = information about the green channel for a particular image 
     457# 
     458# FIXME the 2003FC path below will cause compilation errors because GreenChannel 
     459# is not of type GreenChannelNode, but DisplayChannelNode; need a notation to 
     460# specify the distinction between node type and method getter name 
     461#[GreenChannel 2003FC] 
     462#path = Image+/CA/DisplayOptions/GreenChannel 
     463# 
     464#[GreenChannel ChannelNumber] 
     465#type = Integer 
     466#description = TODO 
     467# 
     468#[GreenChannel WhiteLevel] 
     469#type = Float 
     470#description = TODO 
     471# 
     472#[GreenChannel BlackLevel] 
     473#type = Float 
     474#description = TODO 
     475# 
     476#[GreenChannel Gamma] 
     477#type = Float 
     478#description = TODO 
     479 
     480## GreenChannelToggle ## 
    203481 
    204482# FIXME xsd-fu needs to include GreenChannelNode (extension of ChannelSpecNode) 
    205483#[GreenChannelToggle] 
    206 #visibility toggle for a particular image's green channel 
    207 #- 
    208 #Default: Image+/DisplayOptions/GreenChannel 
    209 #2003FC: Image+/CA/DisplayOptions 
    210 ## FIXME this attribute really is called "isOn"; needs to be addressed somehow 
    211 #Boolean isOn  indicator for whether green channel is active in the display 
    212 #*2003FC: isGreenChannelOn 
     484#description = visibility toggle for a particular image's green channel 
     485#path = Image+/DisplayOptions/GreenChannel 
     486# 
     487#[GreenChannelToggle 2003FC] 
     488#path = Image+/CA/DisplayOptions 
     489# 
     490#[GreenChannelToggle Enabled] 
     491#type = Boolean 
     492#getter = getisOn 
     493#setter = setisOn 
     494#description = indicator for whether Green channel is active in the display 
     495# 
     496#[GreenChannelToggle Enabled 2003FC 
     497#getter = isGreenChannelOn 
     498#setter = setGreenChannelOn 
     499 
     500## BlueChannel ## 
    213501 
    214502# FIXME xsd-fu needs to include BlueChannelNode (extension of ChannelSpecNode) 
    215503#[BlueChannel] 
    216 #information about the blue channel for a particular image 
    217 #- 
    218 #Default: Image+/DisplayOptions/BlueChannel 
    219 ## FIXME the 2003FC path below will cause compilation errors because BlueChannel is not of type BlueChannelNode, but DisplayChannelNode; need a notation to specify the distinction between node type and method getter name 
    220 #2003FC: Image+/CA/DisplayOptions/BlueChannel 
    221 #Integer ChannelNumber  TODO 
    222 #Float WhiteLevel       TODO 
    223 #Float BlackLevel       TODO 
    224 #Float Gamma            TODO 
     504#path = Image+/DisplayOptions/BlueChannel 
     505#description = information about the blue channel for a particular image 
     506# 
     507# FIXME the 2003FC path below will cause compilation errors because BlueChannel 
     508# is not of type BlueChannelNode, but DisplayChannelNode; need a notation to 
     509# specify the distinction between node type and method getter name 
     510#[BlueChannel 2003FC] 
     511#path = Image+/CA/DisplayOptions/BlueChannel 
     512# 
     513#[BlueChannel ChannelNumber] 
     514#type = Integer 
     515#description = TODO 
     516# 
     517#[BlueChannel WhiteLevel] 
     518#type = Float 
     519#description = TODO 
     520# 
     521#[BlueChannel BlackLevel] 
     522#type = Float 
     523#description = TODO 
     524# 
     525#[BlueChannel Gamma] 
     526#type = Float 
     527#description = TODO 
     528 
     529## BlueChannelToggle ## 
    225530 
    226531# FIXME xsd-fu needs to include BlueChannelNode (extension of ChannelSpecNode) 
    227532#[BlueChannelToggle] 
    228 #visibility toggle for a particular image's blue channel 
    229 #- 
    230 #Default: Image+/DisplayOptions/BlueChannel 
    231 #2003FC: Image+/CA/DisplayOptions 
    232 ## FIXME this attribute really is called "isOn"; needs to be addressed somehow 
    233 #Boolean isOn  indicator for whether blue channel is active in the display 
    234 #*2003FC: isBlueChannelOn 
     533#description = visibility toggle for a particular image's blue channel 
     534#path = Image+/DisplayOptions/BlueChannel 
     535# 
     536#[BlueChannelToggle 2003FC] 
     537#path = Image+/CA/DisplayOptions 
     538# 
     539#[BlueChannelToggle Enabled] 
     540#type = Boolean 
     541#getter = getisOn 
     542#setter = setisOn 
     543#description = indicator for whether red channel is active in the display 
     544# 
     545#[BlueChannelToggle Enabled 2003FC 
     546#getter = isBlueChannelOn 
     547#setter = setBlueChannelOn 
     548 
     549## GreyChannel ## 
    235550 
    236551# FIXME xsd-fu needs to include GreyChannelNode 
    237552#[GreyChannel] 
    238 #information about the grey channel for a particular image 
    239 #- 
    240 #Default: Image+/DisplayOptions/GreyChannel 
    241 ## FIXME the 2003FC path below will cause compilation errors because GreyChannel is not of type GreyChannelNode, but DisplayChannelNode; need a notation to specify the distinction between node type and method getter name 
    242 #2003FC: Image+/CA/DisplayOptions/GreyChannel 
    243 #Integer ChannelNumber  TODO 
    244 #Float WhiteLevel       TODO 
    245 #Float BlackLevel       TODO 
    246 #Float Gamma            TODO 
     553#path = Image+/DisplayOptions/GreyChannel 
     554#description = information about the grey channel for a particular image 
     555# 
     556# FIXME the 2003FC path below will cause compilation errors because 
     557# GreyChannel is not of type GreyChannelNode, but DisplayChannelNode; need a 
     558# notation to specify the distinction between node type and method getter name 
     559#[GreyChannel 2003FC] 
     560#path = Image+/CA/DisplayOptions/GreyChannel 
     561# 
     562#[GreyChannel ChannelNumber] 
     563#type = Integer 
     564#description = TODO 
     565# 
     566#[GreyChannel WhiteLevel] 
     567#type = Float 
     568#description = TODO 
     569# 
     570#[GreyChannel BlackLevel] 
     571#type = Float 
     572#description = TODO 
     573# 
     574#[GreyChannel Gamma] 
     575#type = Float 
     576#description = TODO 
     577 
     578## GreyChannelMap ## 
    247579 
    248580# FIXME xsd-fu needs to include GreyChannelNode 
    249581#[GreyChannelMap] 
    250 #color map setting for a particular image's grey channel 
    251 #- 
    252 #Default: Image+/DisplayOptions/GreyChannel 
    253 #2003FC: Image+/CA/DisplayOptions 
    254 #String ColorMap     TODO 
    255 ## FIXME need to implement this conversion method in OMEXMLNode 
    256 #*2003FC: isDisplayRGB% 
     582#path = Image+/DisplayOptions/GreyChannel 
     583#description = color map setting for a particular image's grey channel 
     584# 
     585#[GreyChannelMap 2003FC] 
     586#path = Image+/CA/DisplayOptions 
     587# 
     588#[GreyChannelMap ColorMap] 
     589#type = String 
     590#description = TODO 
     591# 
     592# FIXME need to implement this conversion method in OMEXMLNode 
     593#[GreyChannelMap ColorMap 2003FC] 
     594#type = Boolean 
     595#getter = isDisplayRGB 
     596#setter = setDisplayRGB 
     597 
     598## DisplayOptionsProjection ## 
    257599 
    258600[DisplayOptionsProjection] 
    259 maximum intensity projection-related display options for a particular pixels set 
    260 - 
    261 Default: Image+/DisplayOptions/Projection 
    262 2003FC: Image+/CA/DisplayOptions 
    263 Integer ZStart  the first focal plane to include in the maximum intensity projection 
    264 Integer ZStop   the last focal plane to include in the maximum intensity projection 
     601path = Image+/DisplayOptions/Projection 
     602description = maximum intensity projection-related display options \ 
     603              for a particular image 
     604 
     605[DisplayOptionsProjection 2003FC] 
     606path = Image+/CA/DisplayOptions 
     607 
     608[DisplayOptionsProjection ZStart] 
     609type = Integer 
     610description = the first focal plane to include \ 
     611              in the maximum intensity projection 
     612 
     613[DisplayOptionsProjection ZStop] 
     614type = Integer 
     615description = the last focal plane to include \ 
     616              in the maximum intensity projection 
     617 
     618## DisplayOptionsTime ## 
    265619 
    266620[DisplayOptionsTime] 
    267 time range-related display options for a particular pixels set 
    268 - 
    269 Default: Image+/DisplayOptions/Time 
    270 2003FC: Image+/CA/DisplayOptions 
    271 Integer TStart  the first time point to include in the animation 
    272 Integer TStop   the last time point to include in the animation 
    273  
    274 [ROI+] 
    275 a 5D bounding box region of interest in the metadata store with a particular index 
    276 - 
    277 Default: Image+/DisplayOptions/ROI+ 
    278 2003FC: Image+/CA/DisplayOptions/@DisplayROI+ 
    279 String NodeID  TODO 
    280 Integer X0     the starting X coordinate 
    281 Integer Y0     the starting Y coordinate 
    282 Integer X1     the ending X coordinate 
    283 Integer Y1     the ending Y coordinate 
    284 Integer Z0     the starting Z coordinate 
    285 Integer Z1     the ending Z coordinate 
    286 Integer T0     the starting timepoint 
    287 Integer T1     the ending timepoint 
    288  
     621path = Image+/DisplayOptions/Time 
     622description = time range-related display options for a particular image 
     623 
     624[DisplayOptionsTime 2003FC] 
     625path = Image+/CA/DisplayOptions 
     626 
     627[DisplayOptionsTime TStart] 
     628type = Integer 
     629description = the first time point to include in the animation 
     630 
     631[DisplayOptionsTime TStop] 
     632type = Integer 
     633description = the last time point to include in the animation 
     634 
     635## ROI ## 
     636 
     637[ROI] 
     638countable = true 
     639path = Image+/DisplayOptions/ROI+ 
     640description = a 5D bounding box region of interest in the metadata store \ 
     641              with a particular index 
     642 
     643[ROI 2003FC] 
     644path = Image+/CA/DisplayOptions/@DisplayROI+ 
     645 
     646[ROI ID] 
     647type = String 
     648getter = getNodeID 
     649setter = setNodeID 
     650description = TODO 
     651 
     652[ROI X0] 
     653type = Integer 
     654description = the starting X coordinate 
     655 
     656[ROI Y0] 
     657type = Integer 
     658description = the starting Y coordinate 
     659 
     660[ROI X1] 
     661type = Integer 
     662description = the ending X coordinate 
     663 
     664[ROI Y1] 
     665type = Integer 
     666description = the ending Y coordinate 
     667 
     668[ROI Z0] 
     669type = Integer 
     670description = the starting Z coordinate 
     671 
     672[ROI Z1] 
     673type = Integer 
     674description = the ending Z coordinate 
     675 
     676[ROI T0] 
     677type = Integer 
     678description = the starting timepoint 
     679 
     680[ROI T1] 
     681type = Integer 
     682description = the ending timepoint 
    289683 
    290684### Entities for Instrument settings for a particular Image ### 
    291685 
     686## DetectorSettings ## 
     687 
    292688[DetectorSettings] 
    293 the detector associated with a particular logical channel 
    294 - 
    295 Default: Image+/LogicalChannel+/DetectorRef 
    296 2003FC: Image+/CA/LogicalChannel+ 
    297 DetectorNode Detector   the detector associated with this channel 
    298 Float Offset            the detector offset 
    299 *2003FC: DetectorOffset 
    300 Float Gain              the detector gain 
    301 *2003FC: DetectorGain 
     689path = Image+/LogicalChannel+/DetectorRef 
     690description = the detector associated with a particular logical channel 
     691 
     692[DetectorSettings 2003FC] 
     693path = Image+/CA/LogicalChannel+ 
     694 
     695[DetectorSettings Detector] 
     696type = String 
     697# TODO 
     698description = the detector associated with this channel 
     699 
     700[DetectorSettings Offset] 
     701type = Float 
     702description = the detector offset 
     703 
     704[DetectorSettings Offset 2003FC] 
     705getter = getDetectorOffset 
     706setter = setDetectorOffset 
     707 
     708[DetectorSettings Gain] 
     709type = Float 
     710description = the detector gain 
     711 
     712[DetectorSettings Gain 2003FC] 
     713getter = getDetectorGain 
     714setter = setDetectorGain 
     715 
     716## LightSourceSettings ## 
    302717 
    303718[LightSourceSettings] 
    304 the light source associated with a particular logical channel 
    305 - 
    306 Default: Image+/LogicalChannel+/LightSourceRef 
    307 2003FC: Image+/CA/LogicalChannel+ 
    308 LightSourceNode LightSource  the primary light source 
    309 Float Attenuation            the primary light source attenuation 
    310 *2003FC: LightAttenuation 
    311 Integer Wavelength           the primary light source wavelength 
    312 *2003FC: LightWavelength 
    313  
     719path = Image+/LogicalChannel+/LightSourceRef 
     720description = the light source associated with a particular logical channel 
     721 
     722[LightSourceSettings 2003FC] 
     723path = Image+/CA/LogicalChannel+ 
     724 
     725[LightSourceSettings LightSource] 
     726type = String 
     727# TODO 
     728description = the primary light source 
     729 
     730[LightSourceSettings Attenuation] 
     731type = Float 
     732description = the primary light source attenuation 
     733 
     734[LightSourceSettings Attenuation 2003FC] 
     735getter = getLightAttenuation 
     736setter = setLightAttenuation 
     737 
     738[LightSourceSettings Wavelength] 
     739type = Integer 
     740description = the primary light source wavelength 
     741 
     742[LightSourceSettings Wavelength 2003FC] 
     743getter = getLightWavelength 
     744setter = setLightWavelength 
    314745 
    315746### Entities for other Image-specific information ### 
    316747 
     748## StageLabel ## 
     749 
    317750[StageLabel] 
    318 a stage label in the metadata store with a particular index 
    319 - 
    320 Default: Image+/StageLabel 
    321 2003FC: Image+/CA/StageLabel 
    322 String Name  a name for the stage label 
    323 Float X      x coordinate of the stage 
    324 Float Y      y coordinate of the stage 
    325 Float Z      z coordinate of the stage 
    326  
     751path = Image+/StageLabel 
     752description = a stage label in the metadata store with a particular index 
     753 
     754[StageLabel 2003FC] 
     755path = Image+/CA/StageLabel 
     756 
     757[StageLabel Name] 
     758type = String 
     759description = a name for the stage label 
     760 
     761[StageLabel X] 
     762type = Float 
     763description = the x coordinate of the stage 
     764 
     765[StageLabel Y] 
     766type = Float 
     767description = the y coordinate of the stage 
     768 
     769[StageLabel Z] 
     770type = Float 
     771description = the z coordinate of the stage 
    327772 
    328773### Entities for Instrument hardware -- these DO NOT vary by Image ### 
    329774 
    330 [Instrument+] 
    331 an instrument in the metadata store with a particular index 
    332 - 
    333 Default: Instrument+ 
    334 2003FC: CA/Instrument+ 
    335 String NodeID  TODO 
    336  
    337 [LightSource+] 
    338 a light source for a particular instrument 
    339 - 
    340 Default: Instrument+/LightSource+ 
    341 2003FC: CA/Instrument+/@LightSource+ 
    342 String NodeID        TODO 
    343 String Manufacturer  TODO 
    344 String Model         TODO 
    345 String SerialNumber  TODO 
     775## Instrument ## 
     776 
     777[Instrument] 
     778countable = true 
     779path = Instrument+ 
     780description = an instrument in the metadata store with a particular index 
     781 
     782[Instrument 2003FC] 
     783path = CA/Instrument+ 
     784 
     785[Instrument ID] 
     786type = String 
     787getter = getNodeID 
     788setter = setNodeID 
     789description = TODO 
     790 
     791## LightSource ## 
     792 
     793[LightSource] 
     794countable = true 
     795path = Instrument+/LightSource+ 
     796description = a light source for a particular instrument 
     797 
     798[LightSource 2003FC] 
     799path = CA/Instrument+/@LightSource+ 
     800 
     801[LightSource ID] 
     802type = String 
     803getter = getNodeID 
     804setter = setNodeID 
     805description = TODO 
     806 
     807[LightSource Manufacturer] 
     808type = String 
     809description = TODO 
     810 
     811[LightSource Model] 
     812type = String 
     813description = TODO 
     814 
     815[LightSource SerialNumber] 
     816type = String 
     817description = TODO 
     818 
     819## Laser ## 
    346820 
    347821[Laser] 
    348 a laser for a particular instrument 
    349 - 
    350 Default: Instrument+/LightSource+/Laser 
    351 2003FC: CA/Instrument+/@LightSource+/@!Laser 
    352 String Type                      TODO 
    353 String LaserMedium               TODO 
    354 *2003FC: Medium 
    355 Integer Wavelength               TODO 
    356 Integer FrequencyMultiplication  TODO 
    357 *2003FC: isFrequencyDoubled% 
    358 Boolean Tuneable                 TODO 
    359 *2003FC: isTunable 
    360 String Pulse                     TODO 
    361 #Float Power                      TODO 
    362 #*200706: - 
     822path = Instrument+/LightSource+/Laser 
     823description = a laser for a particular instrument 
     824 
     825[Laser 2003FC] 
     826path = CA/Instrument+/@LightSource+/@!Laser 
     827 
     828[Laser Type] 
     829type = String 
     830description = TODO 
     831 
     832[Laser LaserMedium] 
     833type = String 
     834description = TODO 
     835 
     836[Laser LaserMedium 2003FC] 
     837getter = getMedium 
     838setter = setMedium 
     839 
     840[Laser Wavelength] 
     841type = Integer 
     842description = TODO 
     843 
     844[Laser FrequencyMultiplication] 
     845type = Integer 
     846description = TODO 
     847 
     848[Laser FrequencyMultiplication 2003FC] 
     849type = Boolean 
     850getter = isFrequencyDoubled 
     851setter = setFrequencyDoubled 
     852 
     853[Laser Tuneable] 
     854type = Boolean 
     855description = TODO 
     856 
     857[Laser Tuneable 2003FC] 
     858getter = isTunable 
     859setter = setTunable 
     860 
     861[Laser Pulse] 
     862type = String 
     863description = TODO 
     864 
     865## Filament ## 
    363866 
    364867[Filament] 
    365 a filament for a particular instrument 
    366 - 
    367 Default: Instrument+/LightSource+/Filament 
    368 2003FC: CA/Instrument+/@LightSource+/@Filament 
    369 String Type  TODO 
    370 Float Power  TODO 
     868path = Instrument+/LightSource+/Filament 
     869description = a filament for a particular instrument 
     870 
     871[Filament 2003FC] 
     872path = CA/Instrument+/@LightSource+/@Filament 
     873 
     874[Filament Type] 
     875type = String 
     876description = TODO 
     877 
     878[Filament Power] 
     879type = Float 
     880description = TODO 
     881 
     882## Arc ## 
    371883 
    372884[Arc] 
    373 an arc for a particular instrument 
    374 - 
    375 Default: Instrument+/LightSource+/Arc 
    376 2003FC: CA/Instrument+/@LightSource+/@Arc 
    377 String Type  TODO 
    378 Float Power  TODO 
    379  
    380 [Detector+] 
    381 a detector for a particular instrument 
    382 - 
    383 Default: Instrument+/Detector+ 
    384 2003FC: CA/Instrument+/@Detector+ 
    385 String NodeID        TODO 
    386 String Manufacturer  TODO 
    387 String Model         TODO 
    388 String SerialNumber  TODO 
    389 String Type          TODO 
    390 Float Gain           TODO 
    391 Float Voltage        TODO 
    392 Float Offset         TODO 
    393  
    394 [Objective+] 
    395 an objective for a particular instrument 
    396 - 
    397 Default: Instrument+/Objective+ 
    398 2003FC: CA/Instrument+/@Objective+ 
    399 String NodeID                  TODO 
    400 String Manufacturer            TODO 
    401 String Model                   TODO 
    402 String SerialNumber            TODO 
    403 String Correction              TODO 
    404 *2003FC: - 
    405 String Immersion               TODO 
    406 *2003FC: - 
    407 Float LensNA                   TODO 
    408 Integer NominalMagnification   TODO 
    409 *2003FC: - 
    410 Float CalibratedMagnification  TODO 
    411 *2003FC: Magnification 
    412 Float WorkingDistance          TODO 
    413 *2003FC: - 
     885path = Instrument+/LightSource+/Arc 
     886description = an arc for a particular instrument 
     887 
     888[Arc 2003FC] 
     889path = CA/Instrument+/@LightSource+/@Arc 
     890 
     891[Arc Type] 
     892type = String 
     893description = TODO 
     894 
     895[Arc Power] 
     896type = Float 
     897description = TODO 
     898 
     899## Detector ## 
     900 
     901[Detector] 
     902countable = true 
     903path = Instrument+/Detector+ 
     904description = a detector for a particular instrument 
     905 
     906[Detector 2003FC] 
     907path = CA/Instrument+/@Detector+ 
     908 
     909[Detector ID] 
     910type = String 
     911getter = getNodeID 
     912setter = setNodeID 
     913description = TODO 
     914 
     915[Detector Manufacturer] 
     916type = String 
     917description = TODO 
     918 
     919[Detector Model] 
     920type = String 
     921description = TODO 
     922 
     923[Detector SerialNumber] 
     924type = String 
     925description = TODO 
     926 
     927[Detector Type] 
     928type = String 
     929description = TODO 
     930 
     931[Detector Gain] 
     932type = Float 
     933description = TODO 
     934 
     935[Detector Voltage] 
     936type = Float 
     937description = TODO 
     938 
     939[Detector Offset] 
     940type = Float 
     941description = TODO 
     942 
     943## Objective ## 
     944 
     945[Objective] 
     946countable = true 
     947path = Instrument+/Objective+ 
     948description = an objective for a particular instrument 
     949 
     950[Objective 2003FC] 
     951path = CA/Instrument+/@Objective+ 
     952 
     953[Objective ID] 
     954type = String 
     955getter = getNodeID 
     956setter = setNodeID 
     957description = TODO 
     958 
     959[Objective Manufacturer] 
     960type = String 
     961description = TODO 
     962 
     963[Objective Model] 
     964type = String 
     965description = TODO 
     966 
     967[Objective SerialNumber] 
     968type = String 
     969description = TODO 
     970 
     971[Objective Correction] 
     972type = String 
     973description = TODO 
     974 
     975[Objective Correction 2003FC] 
     976path = - 
     977 
     978[Objective Immersion] 
     979type = String 
     980description = TODO 
     981 
     982[Objective Immersion 2003FC] 
     983path = - 
     984 
     985[Objective LensNA] 
     986type = Float 
     987description = TODO 
     988 
     989[Objective NominalMagnification] 
     990type = Integer 
     991description = TODO 
     992 
     993[Objective NominalMagnification 2003FC] 
     994path = - 
     995 
     996[Objective CalibratedMagnification] 
     997type = Float 
     998description = TODO 
     999 
     1000[Objective CalibratedMagnification 2003FC] 
     1001getter = getMagnification 
     1002setter = setMagnification 
     1003 
     1004[Objective WorkingDistance] 
     1005type = Float 
     1006description = TODO 
     1007 
     1008[Objective WorkingDistance 2003FC] 
     1009path = - 
    4141010 
    4151011#TODO figure out how to reconcile the two filter models 
     
    4211017#http://openmicroscopy.org/api/xml/OME/ome-instrument.html 
    4221018 
     1019## ExcitationFilter ## 
     1020 
    4231021#[ExcitationFilter] 
    424 #an excitation filter for a particular instrument 
    425 #- 
    426 #Default: ? 
    427 #2003FC: CA/ExcitationFilter+ 
    428 #String Manufacturer  TODO 
    429 #String Model         TODO 
    430 #String LotNumber     TODO 
    431 #String Type          TODO 
     1022#path = ? 
     1023#description = an excitation filter for a particular instrument 
     1024# 
     1025#[ExcitationFilter 2003FC] 
     1026#path = CA/ExcitationFilter+ 
     1027# 
     1028#[ExcitationFilter Manufacturer] 
     1029#type = String 
     1030#description = TODO 
     1031# 
     1032#[ExcitationFilter Model] 
     1033#type = String 
     1034#description = TODO 
     1035# 
     1036#[ExcitationFilter LotNumber] 
     1037#type = String 
     1038#description = TODO 
     1039# 
     1040#[ExcitationFilter Type] 
     1041#type = String 
     1042#description = TODO 
     1043 
     1044## Dichroic ## 
    4321045 
    4331046#[Dichroic] 
    434 #a dichroic for a particular instrument 
    435 #- 
    436 #Default: ? 
    437 #2003FC: CA/Dichroic+ 
    438 #String Manufacturer  TODO 
    439 #String Model         TODO 
    440 #String LotNumber     TODO 
     1047#path = ? 
     1048#description = a dichroic for a particular instrument 
     1049# 
     1050#[Dichroic 2003FC] 
     1051#path = CA/Dichroic+ 
     1052# 
     1053#[Dichroic Manufacturer] 
     1054#type = String 
     1055#description = TODO 
     1056# 
     1057#[Dichroic Model] 
     1058#type = String 
     1059#description = TODO 
     1060# 
     1061#[Dichroic LotNumber] 
     1062#type = String 
     1063#description = TODO 
     1064 
     1065## EmissionFilter ## 
    4411066 
    4421067#[EmissionFilter] 
    443 #an emission filter for a particular instrument 
    444 #- 
    445 #Default: ? 
    446 #2003FC: CA/EmissionFilter+ 
    447 #String Manufacturer  TODO 
    448 #String Model         TODO 
    449 #String LotNumber     TODO 
    450 #String Type          TODO 
     1068#path = ? 
     1069#description = an emission filter for a particular instrument 
     1070# 
     1071#[EmissionFilter 2003FC] 
     1072#path = CA/EmissionFilter+ 
     1073# 
     1074#[EmissionFilter Manufacturer] 
     1075#type = String 
     1076#description = TODO 
     1077# 
     1078#[EmissionFilter Model] 
     1079#type = String 
     1080#description = TODO 
     1081# 
     1082#[EmissionFilter LotNumber] 
     1083#type = String 
     1084#description = TODO 
     1085# 
     1086#[EmissionFilter Type] 
     1087#type = String 
     1088#description = TODO 
     1089 
     1090## FilterSet ## 
    4511091 
    4521092#[FilterSet] 
    453 #a filter set for a particular instrument 
    454 #- 
    455 #Default: ? 
    456 #2003FC: CA/FilterSet+ 
    457 #String Manufacturer  TODO 
    458 #String Model         TODO 
    459 #String LotNumber     TODO 
    460  
    461 [OTF+] 
    462 an optical transfer function for a particular instrument 
    463 - 
    464 Default: Instrument+/OTF+ 
    465 2003FC: CA/Instrument+/@OTF+ 
    466 String NodeID                TODO 
    467 Integer SizeX                TODO 
    468 Integer SizeY                TODO 
    469 String PixelType             TODO 
    470 #String Path                  TODO 
    471 #*200706: - 
    472 Boolean OpticalAxisAveraged  TODO 
    473 *2003FC: isOpticalAxisAverage 
    474  
     1093#path = ? 
     1094#description = a filter set for a particular instrument 
     1095# 
     1096#[FilterSet 2003FC] 
     1097#path = CA/FilterSet+ 
     1098# 
     1099#[FilterSet Manufacturer] 
     1100#type = String 
     1101#description = TODO 
     1102# 
     1103#[FilterSet Model] 
     1104#type = String 
     1105#description = TODO 
     1106# 
     1107#[FilterSet LotNumber] 
     1108#type = String 
     1109#description = TODO 
     1110 
     1111## OTF ## 
     1112 
     1113[OTF] 
     1114countable = true 
     1115path = Instrument+/OTF+ 
     1116description = an optical transfer function for a particular instrument 
     1117 
     1118[OTF 2003FC] 
     1119path = CA/Instrument+/@OTF+ 
     1120 
     1121[OTF ID] 
     1122type = String 
     1123getter = getNodeID 
     1124setter = setNodeID 
     1125description = TODO 
     1126 
     1127[OTF SizeX] 
     1128type = Integer 
     1129description = TODO 
     1130 
     1131[OTF SizeY] 
     1132type = Integer 
     1133description = TODO 
     1134 
     1135[OTF PixelType] 
     1136type = String 
     1137description = TODO 
     1138 
     1139[OTF OpticalAxisAveraged] 
     1140type = Boolean 
     1141description = TODO 
     1142 
     1143[OTF OpticalAxisAveraged 2003FC] 
     1144getter = isOpticalAxisAverage 
     1145setter = setOpticalAxisAverage 
    4751146 
    4761147### Entities for Experimenter details ### 
    4771148 
    478 [Experimenter+] 
    479 an experimenter in the metadata store with a particular index 
    480 - 
    481 Default: Experimenter+ 
    482 2003FC: CA/Experimenter+ 
    483 String NodeID         TODO 
    484 String FirstName      the first name of the experimenter 
    485 String LastName       the last name of the experimenter 
    486 String Email          the e-mail address of the experimenter 
    487 String Institution    the institution to which the experimenter belongs 
    488 #String DataDirectory  the fully qualified path to the experimenter's data 
    489 #*200706: - 
    490  
    491 [-] 
     1149## Experimenter ## 
     1150 
     1151[Experimenter] 
     1152countable = true 
     1153path = Experimenter+ 
     1154description = an experimenter in the metadata store with a particular index 
     1155 
     1156[Experimenter 2003FC] 
     1157path = CA/Experimenter+ 
     1158 
     1159[Experimenter ID] 
     1160type = String 
     1161getter = getNodeID 
     1162setter = setNodeID 
     1163description = TODO 
     1164 
     1165[Experimenter FirstName] 
     1166type = String 
     1167description = the first name of the experimenter 
     1168 
     1169[Experimenter LastName] 
     1170type = String 
     1171description = the last name of the experimenter 
     1172 
     1173[Experimenter Email] 
     1174type = String 
     1175description = the e-mail address of the experimenter 
     1176 
     1177[Experimenter Institution] 
     1178type = String 
     1179description = the institution to which the experimenter belongs 
  • trunk/loci/formats/auto/versions.txt

    r3840 r3917  
    11# 
    2 # MetadataAutogenVersions.txt 
     2# versions.txt 
    33# 
    44 
     
    2424 
    2525#[200802] 
    26 #class = OMEXML200802Metadata 
     26#className = OMEXML200802Metadata 
    2727#id = OMEXML200802Metadata.java 
    2828#basePackage = ome.xml.r200802 
     
    3232 
    3333[200706] 
    34 class = OMEXML200706Metadata 
     34className = OMEXML200706Metadata 
    3535id = OMEXML200706Metadata.java 
    3636basePackage = ome.xml.r200706 
     
    4040 
    4141[2003FC] 
    42 class = OMEXML2003FCMetadata 
     42className = OMEXML2003FCMetadata 
    4343id = OMEXML2003FCMetadata.java 
    4444basePackage = org.openmicroscopy.xml 
     
    4646version = 2003-FC 
    4747legacy = true 
    48  
    49 [-] 
Note: See TracChangeset for help on using the changeset viewer.