XMLNode(XMLInputStream stream) : this(libsbmlPINVOKE.new_XMLNode__SWIG_14(XMLInputStream.getCPtr(stream)), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } }
static ModelHistory parseRDFAnnotation(XMLNode annotation, string metaId, XMLInputStream stream) { IntPtr cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_0(XMLNode.getCPtr(annotation), metaId, XMLInputStream.getCPtr(stream)); ModelHistory ret = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false); return(ret); }
void logError(XMLInputStream stream, XMLToken element, int code) { libsbmlPINVOKE.ASTBase_logError__SWIG_1(swigCPtr, XMLInputStream.getCPtr(stream), XMLToken.getCPtr(element), code); if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } }
void addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes, XMLInputStream stream) { libsbmlPINVOKE.ASTBase_addExpectedAttributes(swigCPtr, SWIGTYPE_p_ExpectedAttributes.getCPtr(attributes), XMLInputStream.getCPtr(stream)); if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } }
bool read(XMLInputStream stream, string reqd_prefix, XMLToken currentElement) { bool ret = libsbmlPINVOKE.ASTBasePlugin_read(swigCPtr, XMLInputStream.getCPtr(stream), reqd_prefix, XMLToken.getCPtr(currentElement)); if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
bool read(XMLInputStream stream) { bool ret = libsbmlPINVOKE.ASTBase_read__SWIG_1(swigCPtr, XMLInputStream.getCPtr(stream)); if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static HandleRef getCPtrAndDisown(XMLInputStream obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return(ptr); }
internal static HandleRef getCPtr(XMLInputStream obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static HandleRef getCPtr(XMLInputStream obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
/** */ /* libsbml-internal */ public bool read(XMLInputStream stream, string reqd_prefix, XMLToken currentElement) { bool ret = libsbmlPINVOKE.ASTBasePlugin_read(swigCPtr, XMLInputStream.getCPtr(stream), reqd_prefix, XMLToken.getCPtr(currentElement)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); return ret; }
/** */ /* libsbml-internal */ public new void addExpectedAttributes(SWIGTYPE_p_ExpectedAttributes attributes, XMLInputStream stream) { libsbmlPINVOKE.ASTBase_addExpectedAttributes(swigCPtr, SWIGTYPE_p_ExpectedAttributes.getCPtr(attributes), XMLInputStream.getCPtr(stream)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); }
public static void parseRDFAnnotation(XMLNode annotation, CVTermList CVTerms, string metaId, XMLInputStream stream) { libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_4(XMLNode.getCPtr(annotation), CVTermList.getCPtr(CVTerms), metaId, XMLInputStream.getCPtr(stream)); }
/** * Parses an annotation into a ModelHistory class instance. * * This is used to take an annotation that has been read into an SBML * model, identify the RDF elements representing model history * information, and create a list of corresponding CVTerm objects. * * @param annotation XMLNode containing the annotation. * @param stream optional XMLInputStream that facilitates error logging * @param metaId optional metaId, if set only the rdf annotation for this metaId will be returned. * * @if notclike @note Because this is a @em static method, the non-C++ * language interfaces for libSBML will contain two variants. One will * be a static method on the class (i.e., RDFAnnotationParser), and the * other will be a standalone top-level function with the name * RDFAnnotationParser_parseRDFAnnotation(). They are functionally * identical. @endif * * @return a pointer to the ModelHistory created. */ public static ModelHistory parseRDFAnnotation(XMLNode annotation, string metaId, XMLInputStream stream) { IntPtr cPtr = libsbmlPINVOKE.RDFAnnotationParser_parseRDFAnnotation__SWIG_0(XMLNode.getCPtr(annotation), metaId, XMLInputStream.getCPtr(stream)); ModelHistory ret = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false); return ret; }
public void test_RDFAnnotation_testMissingAbout() { string withAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + " <annotation>\n" + " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" + " <rdf:Description rdf:about=\"#_000004\">\n" + " <bqbiol:is>\n" + " <rdf:Bag>\n" + " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" + " </rdf:Bag>\n" + " </bqbiol:is>\n" + " </rdf:Description>\n" + " </rdf:RDF>\n" + " </annotation>"; string emptyAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + " <annotation>\n" + " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" + " <rdf:Description rdf:about=\"\">\n" + " <bqbiol:is>\n" + " <rdf:Bag>\n" + " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" + " </rdf:Bag>\n" + " </bqbiol:is>\n" + " </rdf:Description>\n" + " </rdf:RDF>\n" + " </annotation>"; string noAbout = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + " <annotation>\n" + " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n" + " <rdf:Description>\n" + " <bqbiol:is>\n" + " <rdf:Bag>\n" + " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n" + " </rdf:Bag>\n" + " </bqbiol:is>\n" + " </rdf:Description>\n" + " </rdf:RDF>\n" + " </annotation>"; CVTermList cvTerms = new CVTermList(); XMLInputStream stream = new XMLInputStream ( withAbout,false ); XMLNode node = new XMLNode ( stream ); RDFAnnotationParser.parseRDFAnnotation(node,cvTerms); assertTrue( cvTerms.getSize() == 1 ); cvTerms = new CVTermList(); RDFAnnotationParser.parseRDFAnnotation(node,cvTerms ); assertTrue( cvTerms.getSize() == 1 ); cvTerms = null; cvTerms = null; cvTerms = new CVTermList(); XMLInputStream stream1 = new XMLInputStream ( emptyAbout,false ); XMLNode node1 = new XMLNode ( stream1 ); RDFAnnotationParser.parseRDFAnnotation(node1,cvTerms); assertTrue( cvTerms.getSize() == 0 ); cvTerms = null; cvTerms = null; cvTerms = new CVTermList(); XMLInputStream stream2 = new XMLInputStream ( noAbout,false ); XMLNode node2 = new XMLNode ( stream2 ); RDFAnnotationParser.parseRDFAnnotation(node2,cvTerms); assertTrue( cvTerms.getSize() == 0 ); cvTerms = null; cvTerms = null; }
internal static HandleRef getCPtrAndDisown(XMLInputStream obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return ptr; }
/** */ /* libsbml-internal */ public new void logError(XMLInputStream stream, XMLToken element, int code) { libsbmlPINVOKE.ASTBase_logError__SWIG_1(swigCPtr, XMLInputStream.getCPtr(stream), XMLToken.getCPtr(element), code); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); }
/** */ /* libsbml-internal */ public new bool read(XMLInputStream stream) { bool ret = libsbmlPINVOKE.ASTBase_read__SWIG_1(swigCPtr, XMLInputStream.getCPtr(stream)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); return ret; }
bool readAttributes(XMLAttributes attributes, SWIGTYPE_p_ExpectedAttributes expectedAttributes, XMLInputStream stream, XMLToken element) { bool ret = libsbmlPINVOKE.ASTBase_readAttributes(swigCPtr, XMLAttributes.getCPtr(attributes), SWIGTYPE_p_ExpectedAttributes.getCPtr(expectedAttributes), XMLInputStream.getCPtr(stream), XMLToken.getCPtr(element)); if (libsbmlPINVOKE.SWIGPendingException.Pending) { throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/** */ /* libsbml-internal */ public new bool readAttributes(XMLAttributes attributes, SWIGTYPE_p_ExpectedAttributes expectedAttributes, XMLInputStream stream, XMLToken element) { bool ret = libsbmlPINVOKE.ASTBase_readAttributes(swigCPtr, XMLAttributes.getCPtr(attributes), SWIGTYPE_p_ExpectedAttributes.getCPtr(expectedAttributes), XMLInputStream.getCPtr(stream), XMLToken.getCPtr(element)); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); return ret; }
/** * Creates a new XMLNode by reading XMLTokens from stream. * * The stream must be positioned on a start element * (<code>stream.peek().isStart() == true</code>) and will be read until * the matching end element is found. * * @param stream XMLInputStream from which XMLNode is to be created. */ /* libsbml-internal */ public XMLNode(XMLInputStream stream) : this(libsbmlPINVOKE.new_XMLNode__SWIG_14(XMLInputStream.getCPtr(stream)), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); }
/** */ /* libsbml-internal */ public bool read(XMLInputStream stream, string reqd_prefix) { bool ret = libsbmlPINVOKE.ASTNode_read__SWIG_0(swigCPtr, XMLInputStream.getCPtr(stream), reqd_prefix); if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); return ret; }