private void loadConf(GDataConf conf) throws SLIB_Ex_Critic { String header = (String) conf.getParameter("header"); if (header == null || Util.stringToBoolean(header) == true) { skipHeader = true; } logger.info("Skipping header " + skipHeader); String separator = (String) conf.getParameter("separator"); if (separator == null) { pattern = Pattern.compile("\\t"); } else { pattern = Pattern.compile(separator); } HashMap<Integer, CSV_Mapping> mappingsLocal = (HashMap<Integer, CSV_Mapping>) conf.getParameter("mappings"); HashMap<Integer, CSV_StatementTemplate> statementTemplatesLocal = (HashMap<Integer, CSV_StatementTemplate>) conf.getParameter("statementTemplates"); if (mappingsLocal != null) { this.mappings.putAll(mappingsLocal); } if (statementTemplatesLocal != null) { this.statementTemplates.putAll(statementTemplatesLocal); } if (this.mappings.isEmpty()) { throw new SLIB_Ex_Critic("Please specify a mapping for CSV loader"); } if (this.statementTemplates.isEmpty()) { throw new SLIB_Ex_Critic("Please specify a statement template for CSV loader"); } }
private void loadConf(GDataConf conf) throws SLIB_Ex_Critic { String header = (String) conf.getParameter("header"); if (header == null || Util.stringToBoolean(header) == true) { skipHeader = true; } logger.info("Skipping header " + skipHeader); String separator = (String) conf.getParameter("separator"); if (separator == null) { pattern = Pattern.compile("\\t"); } else { pattern = Pattern.compile(separator); } HashMap<Integer, CSV_Mapping> mappingsLocal = (HashMap<Integer, CSV_Mapping>) conf.getParameter("mappings"); HashMap<Integer, CSV_StatementTemplate> statementTemplatesLocal = (HashMap<Integer, CSV_StatementTemplate>) conf.getParameter("statementTemplates"); if (mappingsLocal != null) { this.mappings.putAll(mappingsLocal); } if (statementTemplatesLocal != null) { this.statementTemplates.putAll(statementTemplatesLocal); } if (this.mappings.isEmpty()) { throw new SLIB_Ex_Critic("Please specify a mapping for CSV loader"); } if (this.statementTemplates.isEmpty()) { throw new SLIB_Ex_Critic("Please specify a statement template for CSV loader"); } }
private void loadConf(GDataConf conf) throws SLIB_Ex_Critic { String header = (String) conf.getParameter(PARAM_HEADER); String prefixSubjectParam = (String) conf.getParameter(PARAM_PREFIX_SUBJECT); String prefixObjectParam = (String) conf.getParameter(PARAM_PREFIX_OBJECT); String predicateParam = (String) conf.getParameter(PARAM_PREDICATE);
private void loadConf(GDataConf conf) throws SLIB_Ex_Critic { String header = (String) conf.getParameter(PARAM_HEADER); String prefixSubjectParam = (String) conf.getParameter(PARAM_PREFIX_SUBJECT); String prefixObjectParam = (String) conf.getParameter(PARAM_PREFIX_OBJECT); String predicateParam = (String) conf.getParameter(PARAM_PREDICATE);
@Override public void populate(GDataConf conf, G g) throws SLIB_Exception { String defaultNamespaceVal = (String) conf.getParameter("default-namespace"); if (defaultNamespaceVal == null) { defaultNamespace = g.getURI().getNamespace(); logger.info("OBO loader set default-namespace " + defaultNamespace); } else { defaultNamespace = defaultNamespaceVal; } init(g, conf.getLoc(), defaultNamespace); logger.info("-------------------------------------"); logger.info("Loading OBO specification from:" + filepath); logger.info("-------------------------------------"); loadOboSpec(); logger.info("OBO specification loaded."); logger.info("-------------------------------------"); }
@Override public void populate(GDataConf conf, G g) throws SLIB_Exception { String defaultNamespaceVal = (String) conf.getParameter("default-namespace"); if (defaultNamespaceVal == null) { defaultNamespace = g.getURI().getNamespace(); logger.info("OBO loader set default-namespace " + defaultNamespace); } else { defaultNamespace = defaultNamespaceVal; } init(g, conf.getLoc(), defaultNamespace); logger.info("-------------------------------------"); logger.info("Loading OBO specification from:" + filepath); logger.info("-------------------------------------"); loadOboSpec(); logger.info("OBO specification loaded."); logger.info("-------------------------------------"); }
String concept_file = (String) conf.getParameter(ARG_CONCEPT_FILE); String relationship_file = (String) conf.getParameter(ARG_RELATIONSHIP_FILE); String prefix = (String) conf.getParameter(ARG_PREFIX); String load_inactive_concepts = conf.getParameter(ARG_LOAD_INACTIVE_CONCEPTS).toString(); String load_inactive_relationships = conf.getParameter(ARG_LOAD_INACTIVE_RELATIONSHIPS).toString();
String concept_file = (String) conf.getParameter(ARG_CONCEPT_FILE); String relationship_file = (String) conf.getParameter(ARG_RELATIONSHIP_FILE); String prefix = (String) conf.getParameter(ARG_PREFIX); String load_inactive_concepts = conf.getParameter(ARG_LOAD_INACTIVE_CONCEPTS).toString(); String load_inactive_relationships = conf.getParameter(ARG_LOAD_INACTIVE_RELATIONSHIPS).toString();
if (conf.getParameter("prefix") != null) { uriPrefix = (String) conf.getParameter("prefix");
if (conf.getParameter("prefix") != null) { uriPrefix = (String) conf.getParameter("prefix");
if (conf.getParameter("prefix") != null) { uriPrefix = (String) conf.getParameter("prefix");
private void process(GDataConf conf) throws SLIB_Ex_Critic { prefixUriInstance = (String) conf.getParameter("prefix"); if (prefixUriInstance == null) { prefixUriInstance = graph.getURI().getNamespace(); String filtersAsStrings = (String) conf.getParameter("filters");
private void process(GDataConf conf) throws SLIB_Ex_Critic { prefixUriInstance = (String) conf.getParameter("prefix"); if (prefixUriInstance == null) { prefixUriInstance = graph.getURI().getNamespace(); String filtersAsStrings = (String) conf.getParameter("filters");
default_namespace = (String) conf.getParameter(ARG_PREFIX);
default_namespace = (String) conf.getParameter(ARG_PREFIX);