/** * method to get the parent column in a join condition * * @param myModel * - the Model of mappings * @param predobjNode * - the pred obj node containing the join condition * @return the parent column condition as a string */ public String getParentColumn(Model myModel, Resource predobjNode) { // process OBJECTMAP Model m = myModel.filter(predobjNode, R2RMLVocabulary.objectMap, null); if (!m.isEmpty()) { Resource object = m.objectResource(); // look for joincondition declaration m = myModel.filter(object, R2RMLVocabulary.joinCondition, null); if (!m.isEmpty()) { Resource objectt = m.objectResource(); // look for parent declaration m = myModel.filter(objectt, R2RMLVocabulary.parent, null); if (!m.isEmpty()) { return trimTo1(m.objectString()); } } } return null; }
/** * method to get the child column in a join condition * * @param myModel * - the Model of mappings * @param predobjNode * - the pred obj node containing the join condition * @return the child column condition as a string */ public String getChildColumn(Model myModel, Resource predobjNode) { // process OBJECTMAP Model m = myModel.filter(predobjNode, R2RMLVocabulary.objectMap, null); if (!m.isEmpty()) { Resource object = m.objectResource(); // look for joincondition declaration m = myModel.filter(object, R2RMLVocabulary.joinCondition, null); if (!m.isEmpty()) { Resource objectt = m.objectResource(); // look for child declaration m = myModel.filter(objectt, R2RMLVocabulary.child, null); if (!m.isEmpty()) { return trimTo1(m.objectString()); } } } return null; }