/** * * @return */ public XMLNode getXMLNode() { return getNonRDFannotation(); }
/** * Checks if the non RDF part of the Annotation is initialized. * * <p>An Annotation is initialized if * there is some non RDF annotation * <p> * * @return {@code true} if the non RDF part of the Annotation is initialized. */ public boolean isSetNonRDFannotation() { if ((getNonRDFannotation() == null)) { return false; } return true; }
@Override public int hashCode() { final int prime = 809; int hashCode = super.hashCode(); if (isSetNonRDFannotation()) { hashCode += prime * getNonRDFannotation().hashCode(); } if (isSetAbout()) { hashCode += prime * about.hashCode(); } return hashCode; }
xmlNode = parentSBMLElement.getAnnotation().getNonRDFannotation(); XMLNode xmlNode = ((Annotation) contextObject).getNonRDFannotation(); xmlNode.addChild(textNode);
/** * Checks if the {@link Annotation} is initialized. * * <p>An {@link Annotation} is initialized if * at least one of the following is true: * <ul> * <li> there is some non RDF annotation * <li> one or more {@link CVTerm} are defined * <li> there is an history defined. * </ul> * * @return {@code true} if the Annotation is initialized */ public boolean isSetAnnotation() { if ((getNonRDFannotation() == null) && getListOfCVTerms().isEmpty() && !isSetHistory()) { return false; } else if ((getNonRDFannotation() == null) && !isSetHistory() && !getListOfCVTerms().isEmpty()) { for (int i = 0; i < getListOfCVTerms().size(); i++) { if ((getCVTerm(i) != null) && getCVTerm(i).getResourceCount() > 0) { return true; } } } return true; }
/** * Returns true if the SBML RDF block is recognized as valid or partially valid. <p>Additional elements are allowed but * what is defined in the SBML specifications should be there as well. It means that the * RDF element needs to have the color {@link NODE_COLOR#GREEN} or {@link NODE_COLOR#ORANGE}. * * @param contextObject - the {@link SBase} where we want to check the {@link Annotation}. * @return true if the SBML RDF block is recognized as valid or partially valid.. */ private boolean isValidSBMLRDF(SBase contextObject) { if (!contextObject.isSetAnnotation()) { return false; } XMLNode annotationXMLNode = contextObject.getAnnotation().getNonRDFannotation(); NODE_COLOR rdfColor = isValidRDF(annotationXMLNode); return rdfColor.equals(NODE_COLOR.GREEN) || rdfColor.equals(NODE_COLOR.ORANGE); }
System.out.println("Model NoRDFAnnotation String = \n@" + testDocument.getModel().getAnnotation().getNonRDFannotation() + "@");
annotation.getNonRDFannotation().addChild(xmlNode);
@Override public boolean equals(Object object) { boolean equals = super.equals(object); if (equals) { Annotation annotation = (Annotation) object; equals &= isSetNonRDFannotation() == annotation.isSetNonRDFannotation(); if (equals && isSetNonRDFannotation()) { equals &= nonRDFannotation.equals(annotation.getNonRDFannotation()); } equals &= isSetAbout() == annotation.isSetAbout(); if (equals && isSetAbout()) { equals &= getAbout().equals(annotation.getAbout()); } } return equals; }
XMLNode annotation = constraint.getAnnotation().getNonRDFannotation(); if (annotation != null) { return annotation;
XMLNode annotationXMLNode = contextObject.getAnnotation().getNonRDFannotation(); XMLNode rdfNode = annotationXMLNode.getChildElement("RDF", Annotation.URI_RDF_SYNTAX_NS);