@Override public String getMetaId() { return isSetMetaId() ? metaId : ""; }
@Override public void unsetMetaId() { if (isSetMetaId()) { setMetaId(null); } }
@Override public void setAnnotation(Annotation annotation) { Annotation oldAnnotation = this.annotation; this.annotation = annotation; this.annotation.parent = this; if (isSetMetaId()) { this.annotation.setAbout('#' + getMetaId()); } firePropertyChange(TreeNodeChangeEvent.setAnnotation, oldAnnotation, this.annotation); }
@Override public int hashCode() { final int prime = 773; int hashCode = super.hashCode(); if (isSetMetaId()) { hashCode += prime * getMetaId().hashCode(); } if (isSetId()) { hashCode += prime * getId().hashCode(); } if (isSetName()) { hashCode += prime * getName().hashCode(); } if (isSetSBOTerm()) { hashCode += prime * getSBOTerm(); } if (elementNamespace != null) { hashCode = prime * hashCode + elementNamespace.hashCode(); } if (declaredNamespaces != null) { hashCode = prime * hashCode + declaredNamespaces.hashCode(); } // Notes, Annotation and extension SBasePlugins are taken into account in // AbstractTreeNode.hashCode() // as they are part of the children returned by #getChildAt(int i) return hashCode + prime * getLevelAndVersion().hashCode(); }
&& !isSetMetaId()) { SBMLDocument doc = getSBMLDocument(); if (doc != null) { if (isSetMetaId()) { attributes.put("metaid", getMetaId());
@Override public void setMetaId(String metaId) throws IllegalArgumentException { if (metaId != null) { if (isSetMetaId() && getMetaId().equals(metaId)) {
@Override public boolean hasValidAnnotation() { if (isSetAnnotation()) { if (isSetMetaId()) { Annotation annotation = getAnnotation(); if (!annotation.isSetAbout()) { /* * Ok, let's set this about tag silently because * when writing SBML, we would set this tag anyway. * This method just complains incorrectly set about * tags. */ annotation.setAbout('#' + getMetaId()); return true; } if (annotation.getAbout().equals('#' + getMetaId())) { return true; } } if (getAnnotation().isSetNonRDFannotation() && !getAnnotation().isSetRDFannotation()) { return true; } return false; } return true; }
equals &= sbase.isSetMetaId() == isSetMetaId(); if (equals && sbase.isSetMetaId()) { equals &= sbase.getMetaId().equals(getMetaId());