コード例 #1
0
ファイル: Screen.java プロジェクト: Jondeen/bioformats
 public void addReagent(Reagent reagent) {
   reagent.setScreen(this);
   reagents.add(reagent);
 }
コード例 #2
0
ファイル: Screen.java プロジェクト: Jondeen/bioformats
  protected Element asXMLElement(Document document, Element Screen_element) {
    // Creating XML block for Screen

    if (Screen_element == null) {
      Screen_element = document.createElementNS(NAMESPACE, "Screen");
    }

    if (name != null) {
      // Attribute property Name
      Screen_element.setAttribute("Name", name.toString());
    }
    if (protocolDescription != null) {
      // Attribute property ProtocolDescription
      Screen_element.setAttribute("ProtocolDescription", protocolDescription.toString());
    }
    if (protocolIdentifier != null) {
      // Attribute property ProtocolIdentifier
      Screen_element.setAttribute("ProtocolIdentifier", protocolIdentifier.toString());
    }
    if (reagentSetDescription != null) {
      // Attribute property ReagentSetDescription
      Screen_element.setAttribute("ReagentSetDescription", reagentSetDescription.toString());
    }
    if (type != null) {
      // Attribute property Type
      Screen_element.setAttribute("Type", type.toString());
    }
    if (id != null) {
      // Attribute property ID
      Screen_element.setAttribute("ID", id.toString());
    }
    if (reagentSetIdentifier != null) {
      // Attribute property ReagentSetIdentifier
      Screen_element.setAttribute("ReagentSetIdentifier", reagentSetIdentifier.toString());
    }
    if (description != null) {
      // Element property Description which is not complex (has no
      // sub-elements)
      Element description_element = document.createElementNS(NAMESPACE, "Description");
      description_element.setTextContent(description.toString());
      Screen_element.appendChild(description_element);
    }
    if (reagents != null) {
      // Element property Reagent which is complex (has
      // sub-elements) and occurs more than once
      for (Reagent reagents_value : reagents) {
        Screen_element.appendChild(reagents_value.asXMLElement(document));
      }
    }
    if (plateLinks != null) {
      // Reference property PlateRef which occurs more than once
      for (Plate plateLinks_value : plateLinks) {
        PlateRef o = new PlateRef();
        o.setID(plateLinks_value.getID());
        Screen_element.appendChild(o.asXMLElement(document));
      }
    }
    if (annotationLinks != null) {
      // Reference property AnnotationRef which occurs more than once
      for (Annotation annotationLinks_value : annotationLinks) {
        AnnotationRef o = new AnnotationRef();
        o.setID(annotationLinks_value.getID());
        Screen_element.appendChild(o.asXMLElement(document));
      }
    }
    return super.asXMLElement(document, Screen_element);
  }
コード例 #3
0
ファイル: Screen.java プロジェクト: Jondeen/bioformats
 public Reagent setReagent(int index, Reagent reagent) {
   reagent.setScreen(this);
   return reagents.set(index, reagent);
 }