assert factory != null;
// GLOBAL PROPERTIES
for(PropertyType prop : model.getPropertyTypes())
{
IThingWriter propWriter;
try
{
propWriter = factory.getWriter(prop);
assert propWriter != null;
}
catch(UnsupportedThingException ex)
{
ThingWriteException ex2 = new ThingWriteException(ex);
if(context.getBreakOnError()) { throw ex2; }
_logger.error(ex2);
continue;
}
propWriter.write(out, context, prop);
}
// COMPONENTS
// Components output their own properties
for(ComponentType comp : model.getComponentTypes())
{
IThingWriter compWriter;
try
{
compWriter = factory.getWriter(comp);
assert compWriter != null;
}
catch(UnsupportedThingException ex)
{
ThingWriteException ex2 = new ThingWriteException(ex);
if(context.getBreakOnError()) { throw ex2; }
_logger.error(ex2);
continue;
}
compWriter.write(out, context, comp);
}
}