/** * Set the result as DocumentURI key. * * @param uri Source string of document URI. * @param line Line number in the source if applicable; -1 otherwise. * @param col Column number in the source if applicable; -1 otherwise. * * @return true if key indicates the record is to be skipped; false * otherwise. */ protected void setSkipKey(int line, int col, String reason) { if (key == null) { key = new DocumentURIWithSourceInfo("", srcId, subId, line, col); } else { key.setUri(""); key.setSrcId(srcId); key.setSubId(subId); key.setColNumber(col); key.setLineNumber(line); } key.setSkipReason(reason); if (LOG.isTraceEnabled()) { LOG.trace("Set key: " + key); } }
/** * Set the result as * DocumentURI key. * * @param uri Source string of document URI. * @param line Line number in the source if applicable; -1 otherwise. * @param col Column number in the source if applicable; -1 otherwise. * @param reason Reason for skipping. * * @return true if key indicates the record is to be skipped; false * otherwise. */ protected void setSkipKey(String sub, int line, int col, String reason) { if (srcId == null) { srcId = split.getPath().toString(); } if (key == null) { key = new DocumentURIWithSourceInfo("", srcId, sub, line, col); } else { key.setUri(""); key.setSrcId(srcId); key.setSubId(sub); key.setColNumber(col); key.setLineNumber(line); } key.setSkipReason(reason); if (LOG.isDebugEnabled()) { LOG.debug("Set key: " + key); } }
key.setSkipReason("empty uri value"); key.setUri(uri); key.setSrcId(srcId); key.setSubId(subId);
/** * Apply URI prefix and suffix configuration options and set the result as * DocumentURI key. * * @param uri Source string of document URI. * @param sub Sub-entry of the source of the document origin. * @param line Line number in the source if applicable; -1 otherwise. * @param col Column number in the source if applicable; -1 otherwise. */ protected void setKey(String uri, String sub, int line, int col) { if (srcId == null) { srcId = split.getPath().toString(); } // apply prefix and suffix for URI uri = URIUtil.applyUriReplace(uri, conf); uri = URIUtil.applyPrefixSuffix(uri, conf); if (key == null) { key = new DocumentURIWithSourceInfo(uri, srcId, sub, line, col); } else { key.setSkipReason(""); key.setUri(uri); key.setSrcId(srcId); key.setSubId(sub); key.setColNumber(col); key.setLineNumber(line); } }