DataMedia sourceDataMedia = new DataMedia();
DataMedia targetDataMedia = new DataMedia();
dataMediaPairInfo.setProperties(dataMediaPair);
// filter解析
ExtensionDataType filterType = ExtensionDataType.valueOf(dataMediaPairInfo.getField("filterType").getStringValue());
ExtensionData filterData = new ExtensionData();
filterData.setExtensionDataType(filterType);
if (filterType.isClazz()) {
filterData.setClazzPath(dataMediaPairInfo.getField("filterText").getStringValue());
} else if (filterType.isSource()) {
filterData.setSourceText(dataMediaPairInfo.getField("filterText").getStringValue());
}
dataMediaPair.setFilterData(filterData);
// fileresovler解析
ExtensionDataType resolverType = ExtensionDataType.valueOf(dataMediaPairInfo.getField("resolverType").getStringValue());
ExtensionData resolverData = new ExtensionData();
resolverData.setExtensionDataType(resolverType);
if (resolverType.isClazz()) {
resolverData.setClazzPath(dataMediaPairInfo.getField("resolverText").getStringValue());
} else if (resolverType.isSource()) {
resolverData.setSourceText(dataMediaPairInfo.getField("resolverText").getStringValue());
}
dataMediaPair.setResolverData(resolverData);
sourceDataMedia.setId(dataMediaPairInfo.getField("sourceDataMediaId").getLongValue());
dataMediaPair.setSource(sourceDataMedia);