use of eu.esdihumboldt.hale.common.instance.model.MutableInstance in project hale by halestudio.
the class Retype method doStructuralRename.
private MutableInstance doStructuralRename(FamilyInstance source, TypeDefinition targetType, boolean ignoreNamespaces, boolean copyGeometries, TransformationLog log) {
// create a dummy child definition for the structural rename
PropertyDefinition dummyProp = new DefaultPropertyDefinition(new QName("dummyProp"), new DefaultTypeDefinition(new QName("dummyType")), targetType);
Object result = Rename.structuralRename(source, dummyProp, ignoreNamespaces, getInstanceFactory(), copyGeometries);
if (result instanceof MutableInstance) {
return ((MutableInstance) result);
} else {
log.error(log.createMessage("Structural rename in type transformation failed", null));
return null;
}
}
use of eu.esdihumboldt.hale.common.instance.model.MutableInstance in project hale by halestudio.
the class MetadataWorker method generate.
/**
* generates the data and puts it into a collection of instances
*
* @param instances the given instances
*/
public void generate(Collection<MutableInstance> instances) {
for (MutableInstance instance : instances) {
for (Entry<String, MetadataGenerator> entry : generators.entrySet()) {
Object[] data = entry.getValue().generate(instance);
instance.setMetaData(entry.getKey(), data);
}
}
}
Aggregations