use of org.pentaho.metaverse.api.MetaverseException in project pentaho-metaverse by pentaho.
the class ExternalResourceStepAnalyzer method customAnalyze.
@Override
protected void customAnalyze(T meta, IMetaverseNode node) throws MetaverseAnalyzerException {
// handle all of the external resources
if (getExternalResourceConsumer() != null) {
IAnalysisContext context = getDescriptor().getContext();
Collection<IExternalResourceInfo> resources = getExternalResourceConsumer().getResources(meta, context);
for (IExternalResourceInfo resource : resources) {
try {
if (resource.isInput()) {
String label = DictionaryConst.LINK_READBY;
IMetaverseNode resourceNode = createResourceNode(resource);
getMetaverseBuilder().addNode(resourceNode);
getMetaverseBuilder().addLink(resourceNode, label, node);
}
if (resource.isOutput()) {
String label = DictionaryConst.LINK_WRITESTO;
IMetaverseNode resourceNode = createResourceNode(resource);
getMetaverseBuilder().addNode(resourceNode);
getMetaverseBuilder().addLink(node, label, resourceNode);
}
} catch (MetaverseException e) {
LOGGER.warn(e.getLocalizedMessage());
LOGGER.debug(Messages.getString("ERROR.ErrorDuringAnalysisStackTrace"), e);
}
}
}
}
Aggregations