| | 791 | protected void mapBiopax(PathwayElement o, Element e) throws ConverterException |
| | 792 | { |
| | 793 | //this method clones all content, |
| | 794 | //getContent will leave them attached to the parent, which we don't want |
| | 795 | //We can safely remove them, since the JDOM element isn't used anymore after this method |
| | 796 | Element root = new Element("RDF", GpmlFormat.RDF); |
| | 797 | root.addNamespaceDeclaration(GpmlFormat.RDFS); |
| | 798 | root.addNamespaceDeclaration(GpmlFormat.RDF); |
| | 799 | root.addNamespaceDeclaration(GpmlFormat.OWL); |
| | 800 | root.addNamespaceDeclaration(GpmlFormat.BIOPAX); |
| | 801 | root.setAttribute(new Attribute("base", getGpmlNamespace().getURI() + "#", Namespace.XML_NAMESPACE)); |
| | 802 | //Element owl = new Element("Ontology", OWL); |
| | 803 | //owl.setAttribute(new Attribute("about", "", RDF)); |
| | 804 | //Element imp = new Element("imports", OWL); |
| | 805 | //imp.setAttribute(new Attribute("resource", BIOPAX.getURI(), RDF)); |
| | 806 | //owl.addContent(imp); |
| | 807 | //root.addContent(owl); |
| | 808 | |
| | 809 | root.addContent(e.cloneContent()); |
| | 810 | Document bp = new Document(root); |
| | 811 | |
| | 812 | o.setBiopax(bp); |
| | 813 | } |
| | 814 | |