public boolean linkPlate(Plate o) { o.linkScreen(this); if (!plateLinks.contains(o)) { return plateLinks.add(o); } return false; }
public boolean link(Reference reference, OMEModelObject o) { boolean wasHandledBySuperClass = super.link(reference, o); if (wasHandledBySuperClass) { return true; } if (reference instanceof PlateRef) { Plate o_casted = (Plate) o; o_casted.linkScreen(this); if (!plateLinks.contains(o_casted)) { plateLinks.add(o_casted); } return true; } if (reference instanceof AnnotationRef) { Annotation o_casted = (Annotation) o; o_casted.linkScreen(this); if (!annotationLinks.contains(o_casted)) { annotationLinks.add(o_casted); } return true; } LOGGER.debug("Unable to handle reference of type: {}", reference.getClass()); return false; }
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); }
public boolean unlinkPlate(Plate o) { o.unlinkScreen(this); return plateLinks.remove(o); }
protected Element asXMLElement(Document document, Element OME_element) { // Creating XML block for OME if (OME_element == null) { OME_element = document.createElementNS(NAMESPACE, "OME"); } if (uuid != null) { // Attribute property UUID OME_element.setAttribute("UUID", uuid.toString()); } if (creator != null) { // Attribute property Creator OME_element.setAttribute("Creator", creator.toString()); } if (projects != null) { // Element property Project which is complex (has // sub-elements) and occurs more than once for (Project projects_value : projects) { OME_element.appendChild(projects_value.asXMLElement(document)); } } if (datasets != null) { // Element property Dataset which is complex (has // sub-elements) and occurs more than once for (Dataset datasets_value : datasets) { OME_element.appendChild(datasets_value.asXMLElement(document)); } } if (experiments != null) { // Element property Experiment which is complex (has // sub-elements) and occurs more than once for (Experiment experiments_value : experiments) { OME_element.appendChild(experiments_value.asXMLElement(document)); } } if (plates != null) { // Element property Plate which is complex (has // sub-elements) and occurs more than once for (Plate plates_value : plates) { OME_element.appendChild(plates_value.asXMLElement(document)); } } if (screens != null) { // Element property Screen which is complex (has // sub-elements) and occurs more than once for (Screen screens_value : screens) { OME_element.appendChild(screens_value.asXMLElement(document)); } } if (experimenters != null) { // Element property Experimenter which is complex (has // sub-elements) and occurs more than once for (Experimenter experimenters_value : experimenters) { OME_element.appendChild(experimenters_value.asXMLElement(document)); } } if (experimenterGroups != null) { // Element property ExperimenterGroup which is complex (has // sub-elements) and occurs more than once for (ExperimenterGroup experimenterGroups_value : experimenterGroups) { OME_element.appendChild(experimenterGroups_value.asXMLElement(document)); } } if (instruments != null) { // Element property Instrument which is complex (has // sub-elements) and occurs more than once for (Instrument instruments_value : instruments) { OME_element.appendChild(instruments_value.asXMLElement(document)); } } if (images != null) { // Element property Image which is complex (has // sub-elements) and occurs more than once for (Image images_value : images) { OME_element.appendChild(images_value.asXMLElement(document)); } } if (structuredAnnotations != null) { // Element property StructuredAnnotations which is complex (has // sub-elements) OME_element.appendChild(structuredAnnotations.asXMLElement(document)); } if (roIs != null) { // Element property ROI which is complex (has // sub-elements) and occurs more than once for (ROI roIs_value : roIs) { OME_element.appendChild(roIs_value.asXMLElement(document)); } } if (binaryOnly != null) { // Element property BinaryOnly which is complex (has // sub-elements) OME_element.appendChild(binaryOnly.asXMLElement(document)); } return super.asXMLElement(document, OME_element); }