use of org.eclipse.winery.repository.xml.converter.FromCanonical in project winery by eclipse.
the class XmlRepository method putDefinition.
@Override
public void putDefinition(RepositoryFileReference ref, org.eclipse.winery.model.tosca.TDefinitions content) throws IOException {
FromCanonical converter = new FromCanonical();
XTDefinitions definitions = converter.convert(content);
Path serializationTarget = ref2AbsolutePath(ref);
Files.createDirectories(serializationTarget.getParent());
try (OutputStream out = Files.newOutputStream(serializationTarget, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE)) {
serialize(definitions, out);
}
}
use of org.eclipse.winery.repository.xml.converter.FromCanonical in project winery by eclipse.
the class XmlRepository method serialize.
@Override
public void serialize(org.eclipse.winery.model.tosca.TDefinitions definitions, OutputStream target) throws IOException {
FromCanonical converter = new FromCanonical();
XTDefinitions implementedStandard = converter.convert(definitions);
serialize(implementedStandard, target);
}
Aggregations