/** * Calls the Cloudera Navigator Mapper to map Lineage entities to Cloudera Navigator entities and * writes them to Cloudera Navigator using NavigatorPlugin. * * @param dieOnError throw or not a RuntimeException on error */ public void sendToLineageProvider(Boolean dieOnError) { try { // Start by writing the datasets ResultSet results = this.plugin.write(this.datasets); if (results.hasErrors()) { throw new RuntimeException(results.toString()); } // Create Cloudera navigator mapper EntityMapper tem = new EntityMapper(this.inputNavigatorNodes, this.jobName + this.projectName); tem.addTag(this.jobName); if (LOG.isDebugEnabled()) { for (NavigatorNode nn : this.inputNavigatorNodes) { LOG.debug(nn); } } // Map Lineage nodes to Cloudera navigator entities List<Entity> entities = tem.map(); LOG.debug(tem.toString()); // Write the rest of the entities (processing components) results = this.plugin.write(entities); if (results.hasErrors()) { throw new RuntimeException(results.toString()); } } catch (RuntimeException e) { if (dieOnError) { throw e; } else { LOG.error(e); } } }
private Node<OWLObjectPropertyExpression> toObjectPropertyNode(Set<ATermAppl> terms) { return NodeFactory.getOWLObjectPropertyNode(OP_MAPPER.map(terms)); }
private Set<OWLLiteral> toLiteralSet(Collection<ATermAppl> terms) { return LIT_MAPPER.map(terms); }
private Node<OWLNamedIndividual> toIndividualNode(Set<ATermAppl> terms) { return NodeFactory.getOWLNamedIndividualNode(IND_MAPPER.map(terms)); }
private Node<OWLDataProperty> toDataPropertyNode(Set<ATermAppl> terms) { return NodeFactory.getOWLDataPropertyNode(DP_MAPPER.map(terms)); }
private Node<OWLClass> toClassNode(Set<ATermAppl> terms) { return NodeFactory.getOWLClassNode(CLASS_MAPPER.map(terms)); }