RDFXMLSerializer { public void profileDoc(OutputStream outputStream, Profile pf, URI path) throws JAXBException, WriterException { ProfileDocument doc = makeProfile(pf, path); URI wfUri = uriTools.relativeUriForBean(pf, wfBundle); doc.setBase(uriTools.relativePath(path, wfUri).toASCIIString()); JAXBElement<RDF> element = rdfObjectFactory.createRDF(doc); getMarshaller().marshal(element, outputStream); seeAlsoUris.put(pf, path); } RDFXMLSerializer();  RDFXMLSerializer(WorkflowBundle wfBundle); void annotation(final Annotation ann); JAXBContext getJaxbContext(); Marshaller getMarshaller(); WorkflowBundle getWfBundle(); boolean isUsingSchema(); void profileDoc(OutputStream outputStream, Profile pf, URI path); void setJaxbContext(JAXBContext jaxbContext); void setUsingSchema(boolean usingSchema); void setWfBundle(WorkflowBundle wfBundle); void workflowBundleDoc(OutputStream outputStream, URI path); void workflowDoc(OutputStream outputStream, Workflow wf, URI path);  }
@Test public void profile() throws Exception { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); serializer.profileDoc(outStream, workflowBundle.getMainProfile(), URI.create(TAVERNAWORKBENCH_RDF)); Document doc = parseXml(outStream); Element root = doc.getRootElement(); checkRoot(root); checkProfileDocument(root, true); }