@Override public CVTerm getCVTerm(int index) { if (isSetAnnotation()) { return annotation.getCVTerm(index); } throw new IndexOutOfBoundsException(format( resourceBundle.getString("AbstractSBase.getCVTerm"), index)); }
@Override public boolean isSetHistory() { if (isSetAnnotation()) { return annotation.isSetHistory(); } return false; }
/** * Returns the {@link Annotation} of this SBML object as a {@link String}. * * @return the {@link Annotation} of this SBML object as a {@link String} or * an empty {@link String} if there are no {@link Annotation}. * @throws XMLStreamException if there is a problem writing the annotation to XML. */ @Override public String getAnnotationString() throws XMLStreamException { // return isSetAnnotation() ? (new SBMLWriter()).writeAnnotation(this) : ""; return isSetAnnotation() ? annotation.getFullAnnotationString() : ""; }
@Override public void unsetAnnotation() { if (isSetAnnotation()) { Annotation oldAnnotation = annotation; annotation = null; firePropertyChange(TreeNodeChangeEvent.annotation, oldAnnotation, annotation); } }
@Override public int getCVTermCount() { return isSetAnnotation() ? annotation.getListOfCVTerms().size() : 0; }
@Override public int getChildCount() { int count = 0; if (isSetNotes()) { count++; } if (isSetAnnotation()) { count++; } for (SBasePlugin sbasePlugin : extensions.values()) { count += sbasePlugin.getChildCount(); } return count; }
@Override public Annotation getAnnotation() { if (!isSetAnnotation()) { setAnnotation(new Annotation()); } return annotation; }
@Override public void unsetCVTerms() { if (isSetAnnotation() && getAnnotation().isSetListOfCVTerms()) { annotation.unsetCVTerms(); } }
if (isSetAnnotation()) { if (childIndex == pos) { return getAnnotation();
if (isSetAnnotation() && getAnnotation().isSetRDFannotation() && !isSetMetaId()) { SBMLDocument doc = getSBMLDocument();
@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; }