@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(); }
logger.debug(format( "Some annotations would get lost because there was no metaid defined on {0}. To avoid this, an automatic metaid ''{0}'' has been generated.", getElementName(), getMetaId())); getAnnotation().setAbout('#' + getMetaId()); } else { logger.warn(format( attributes.put("metaid", getMetaId());
@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; }
@Override public void setMetaId(String metaId) throws IllegalArgumentException { if (metaId != null) { if (isSetMetaId() && getMetaId().equals(metaId)) {
equals &= sbase.isSetMetaId() == isSetMetaId(); if (equals && sbase.isSetMetaId()) { equals &= sbase.getMetaId().equals(getMetaId());