use of org.talend.designer.core.model.utils.emf.talendfile.util.TalendFileResourceImpl in project tdi-studio-se by Talend.
the class MetadataEmfFactory method getOutputStream.
@SuppressWarnings("unchecked")
public OutputStream getOutputStream() throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
//$NON-NLS-1$
URI uri = URI.createURI("");
Resource res = new TalendFileResourceImpl(uri);
res.getContents().add(metadataType);
res.save(out, null);
return out;
}
use of org.talend.designer.core.model.utils.emf.talendfile.util.TalendFileResourceImpl in project tdi-studio-se by Talend.
the class MetadataEmfFactory method setInputStream.
public void setInputStream(final InputStream istream) throws IOException {
//$NON-NLS-1$
URI uri = URI.createURI("");
TalendFilePackage.eINSTANCE.getNsURI();
Resource res = new TalendFileResourceImpl(uri);
res.load(istream, null);
setMetadataType((MetadataType) res.getContents().get(0));
}
Aggregations