id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
48,500 | restfb/restfb | src/main/java/com/restfb/JsonHelper.java | JsonHelper.getLongFrom | public Long getLongFrom(JsonValue json) {
if (json.isNumber()) {
return json.asLong();
} else {
return Long.valueOf(json.asString());
}
} | java | public Long getLongFrom(JsonValue json) {
if (json.isNumber()) {
return json.asLong();
} else {
return Long.valueOf(json.asString());
}
} | [
"public",
"Long",
"getLongFrom",
"(",
"JsonValue",
"json",
")",
"{",
"if",
"(",
"json",
".",
"isNumber",
"(",
")",
")",
"{",
"return",
"json",
".",
"asLong",
"(",
")",
";",
"}",
"else",
"{",
"return",
"Long",
".",
"valueOf",
"(",
"json",
".",
"asSt... | convert jsonvalue to a Long
@param json
@return | [
"convert",
"jsonvalue",
"to",
"a",
"Long"
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/JsonHelper.java#L148-L154 |
48,501 | restfb/restfb | src/main/java/com/restfb/JsonHelper.java | JsonHelper.getBigDecimalFrom | public BigDecimal getBigDecimalFrom(JsonValue json) {
if (json.isString()) {
return new BigDecimal(json.asString());
} else {
return new BigDecimal(json.toString());
}
} | java | public BigDecimal getBigDecimalFrom(JsonValue json) {
if (json.isString()) {
return new BigDecimal(json.asString());
} else {
return new BigDecimal(json.toString());
}
} | [
"public",
"BigDecimal",
"getBigDecimalFrom",
"(",
"JsonValue",
"json",
")",
"{",
"if",
"(",
"json",
".",
"isString",
"(",
")",
")",
"{",
"return",
"new",
"BigDecimal",
"(",
"json",
".",
"asString",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"new",... | convert jsonvalue to a BigDecimal
@param json
@return | [
"convert",
"jsonvalue",
"to",
"a",
"BigDecimal"
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/JsonHelper.java#L162-L168 |
48,502 | restfb/restfb | src/main/lombok/com/restfb/types/Reactions.java | Reactions.fillTotalCount | private void fillTotalCount(JsonObject summary) {
if (totalCount == 0 && summary != null && summary.get("total_count") != null) {
totalCount = summary.getLong("total_count", totalCount);
}
} | java | private void fillTotalCount(JsonObject summary) {
if (totalCount == 0 && summary != null && summary.get("total_count") != null) {
totalCount = summary.getLong("total_count", totalCount);
}
} | [
"private",
"void",
"fillTotalCount",
"(",
"JsonObject",
"summary",
")",
"{",
"if",
"(",
"totalCount",
"==",
"0",
"&&",
"summary",
"!=",
"null",
"&&",
"summary",
".",
"get",
"(",
"\"total_count\"",
")",
"!=",
"null",
")",
"{",
"totalCount",
"=",
"summary",
... | add change count value, if summary is set and count is empty | [
"add",
"change",
"count",
"value",
"if",
"summary",
"is",
"set",
"and",
"count",
"is",
"empty"
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/lombok/com/restfb/types/Reactions.java#L106-L110 |
48,503 | restfb/restfb | src/main/java/com/restfb/DefaultWebRequestor.java | DefaultWebRequestor.createFormFieldName | protected String createFormFieldName(BinaryAttachment binaryAttachment) {
if (binaryAttachment.getFieldName() != null) {
return binaryAttachment.getFieldName();
}
String name = binaryAttachment.getFilename();
int fileExtensionIndex = name.lastIndexOf('.');
return fileExtensionIndex > 0 ? name... | java | protected String createFormFieldName(BinaryAttachment binaryAttachment) {
if (binaryAttachment.getFieldName() != null) {
return binaryAttachment.getFieldName();
}
String name = binaryAttachment.getFilename();
int fileExtensionIndex = name.lastIndexOf('.');
return fileExtensionIndex > 0 ? name... | [
"protected",
"String",
"createFormFieldName",
"(",
"BinaryAttachment",
"binaryAttachment",
")",
"{",
"if",
"(",
"binaryAttachment",
".",
"getFieldName",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"binaryAttachment",
".",
"getFieldName",
"(",
")",
";",
"}",
"Str... | Creates the form field name for the binary attachment filename by stripping off the file extension - for example,
the filename "test.png" would return "test".
@param binaryAttachment
The binary attachment for which to create the form field name.
@return The form field name for the given binary attachment. | [
"Creates",
"the",
"form",
"field",
"name",
"for",
"the",
"binary",
"attachment",
"filename",
"by",
"stripping",
"off",
"the",
"file",
"extension",
"-",
"for",
"example",
"the",
"filename",
"test",
".",
"png",
"would",
"return",
"test",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/DefaultWebRequestor.java#L281-L289 |
48,504 | restfb/restfb | src/main/lombok/com/restfb/types/webhook/messaging/MessagingItem.java | MessagingItem.getItem | public InnerMessagingItem getItem() {
if (optin != null) {
return optin;
}
if (postback != null) {
return postback;
}
if (delivery != null) {
return delivery;
}
if (read != null) {
return read;
}
if (accountLinking != null) {
return accountLinking;
... | java | public InnerMessagingItem getItem() {
if (optin != null) {
return optin;
}
if (postback != null) {
return postback;
}
if (delivery != null) {
return delivery;
}
if (read != null) {
return read;
}
if (accountLinking != null) {
return accountLinking;
... | [
"public",
"InnerMessagingItem",
"getItem",
"(",
")",
"{",
"if",
"(",
"optin",
"!=",
"null",
")",
"{",
"return",
"optin",
";",
"}",
"if",
"(",
"postback",
"!=",
"null",
")",
"{",
"return",
"postback",
";",
"}",
"if",
"(",
"delivery",
"!=",
"null",
")"... | generic access to the inner item.
depending on the inner elements the corresponding element is returned. So you can get an {@link OptinItem},
{@link PostbackItem}, {@link DeliveryItem}, {@link AccountLinkingItem} or {@link MessageItem}
@return the inner item. | [
"generic",
"access",
"to",
"the",
"inner",
"item",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/lombok/com/restfb/types/webhook/messaging/MessagingItem.java#L137-L195 |
48,505 | restfb/restfb | src/main/lombok/com/restfb/types/webhook/messaging/AppRoles.java | AppRoles.getRoles | public List<String> getRoles(String appId) {
if (roles.containsKey(appId)) {
return Collections.unmodifiableList(roles.get(appId));
} else {
return null;
}
} | java | public List<String> getRoles(String appId) {
if (roles.containsKey(appId)) {
return Collections.unmodifiableList(roles.get(appId));
} else {
return null;
}
} | [
"public",
"List",
"<",
"String",
">",
"getRoles",
"(",
"String",
"appId",
")",
"{",
"if",
"(",
"roles",
".",
"containsKey",
"(",
"appId",
")",
")",
"{",
"return",
"Collections",
".",
"unmodifiableList",
"(",
"roles",
".",
"get",
"(",
"appId",
")",
")",... | get the roles to the given app id
@param appId
@return List of app roles | [
"get",
"the",
"roles",
"to",
"the",
"given",
"app",
"id"
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/lombok/com/restfb/types/webhook/messaging/AppRoles.java#L50-L56 |
48,506 | restfb/restfb | src/main/java/com/restfb/exception/generator/DefaultFacebookExceptionGenerator.java | DefaultFacebookExceptionGenerator.skipResponseStatusExceptionParsing | protected void skipResponseStatusExceptionParsing(String json) throws ResponseErrorJsonParsingException {
// If this is not an object, it's not an error response.
if (!json.startsWith("{")) {
throw new ResponseErrorJsonParsingException();
}
int subStrEnd = Math.min(50, json.length());
if (!js... | java | protected void skipResponseStatusExceptionParsing(String json) throws ResponseErrorJsonParsingException {
// If this is not an object, it's not an error response.
if (!json.startsWith("{")) {
throw new ResponseErrorJsonParsingException();
}
int subStrEnd = Math.min(50, json.length());
if (!js... | [
"protected",
"void",
"skipResponseStatusExceptionParsing",
"(",
"String",
"json",
")",
"throws",
"ResponseErrorJsonParsingException",
"{",
"// If this is not an object, it's not an error response.",
"if",
"(",
"!",
"json",
".",
"startsWith",
"(",
"\"{\"",
")",
")",
"{",
"... | checks if a string may be a json and contains a error string somewhere, this is used for speedup the error parsing
@param json | [
"checks",
"if",
"a",
"string",
"may",
"be",
"a",
"json",
"and",
"contains",
"a",
"error",
"string",
"somewhere",
"this",
"is",
"used",
"for",
"speedup",
"the",
"error",
"parsing"
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/exception/generator/DefaultFacebookExceptionGenerator.java#L124-L134 |
48,507 | restfb/restfb | src/main/lombok/com/restfb/BinaryAttachment.java | BinaryAttachment.getData | public InputStream getData() {
if (data != null) {
return new ByteArrayInputStream(data);
} else if (dataStream != null) {
return dataStream;
} else {
throw new IllegalStateException("Either the byte[] or the stream mustn't be null at this point.");
}
} | java | public InputStream getData() {
if (data != null) {
return new ByteArrayInputStream(data);
} else if (dataStream != null) {
return dataStream;
} else {
throw new IllegalStateException("Either the byte[] or the stream mustn't be null at this point.");
}
} | [
"public",
"InputStream",
"getData",
"(",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"return",
"new",
"ByteArrayInputStream",
"(",
"data",
")",
";",
"}",
"else",
"if",
"(",
"dataStream",
"!=",
"null",
")",
"{",
"return",
"dataStream",
";",
"}"... | The attachment's data.
@return The attachment's data. | [
"The",
"attachment",
"s",
"data",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/lombok/com/restfb/BinaryAttachment.java#L398-L406 |
48,508 | restfb/restfb | src/main/lombok/com/restfb/BinaryAttachment.java | BinaryAttachment.getContentType | public String getContentType() {
if (contentType != null) {
return contentType;
}
if (dataStream != null) {
try {
contentType = URLConnection.guessContentTypeFromStream(dataStream);
} catch (IOException ioe) {
// ignore exception
}
}
if (data != null) {
... | java | public String getContentType() {
if (contentType != null) {
return contentType;
}
if (dataStream != null) {
try {
contentType = URLConnection.guessContentTypeFromStream(dataStream);
} catch (IOException ioe) {
// ignore exception
}
}
if (data != null) {
... | [
"public",
"String",
"getContentType",
"(",
")",
"{",
"if",
"(",
"contentType",
"!=",
"null",
")",
"{",
"return",
"contentType",
";",
"}",
"if",
"(",
"dataStream",
"!=",
"null",
")",
"{",
"try",
"{",
"contentType",
"=",
"URLConnection",
".",
"guessContentTy... | return the given content type or try to guess from stream or file name. Depending of the available data.
@return the content type | [
"return",
"the",
"given",
"content",
"type",
"or",
"try",
"to",
"guess",
"from",
"stream",
"or",
"file",
"name",
".",
"Depending",
"of",
"the",
"available",
"data",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/lombok/com/restfb/BinaryAttachment.java#L413-L436 |
48,509 | restfb/restfb | src/main/java/com/restfb/DefaultJsonMapper.java | DefaultJsonMapper.logMultipleMappingFailedForField | protected void logMultipleMappingFailedForField(String facebookFieldName,
FieldWithAnnotation<Facebook> fieldWithAnnotation, String json) {
if (!MAPPER_LOGGER.isTraceEnabled()) {
return;
}
Field field = fieldWithAnnotation.getField();
MAPPER_LOGGER.trace(
"Could not map '{}' to {}. {... | java | protected void logMultipleMappingFailedForField(String facebookFieldName,
FieldWithAnnotation<Facebook> fieldWithAnnotation, String json) {
if (!MAPPER_LOGGER.isTraceEnabled()) {
return;
}
Field field = fieldWithAnnotation.getField();
MAPPER_LOGGER.trace(
"Could not map '{}' to {}. {... | [
"protected",
"void",
"logMultipleMappingFailedForField",
"(",
"String",
"facebookFieldName",
",",
"FieldWithAnnotation",
"<",
"Facebook",
">",
"fieldWithAnnotation",
",",
"String",
"json",
")",
"{",
"if",
"(",
"!",
"MAPPER_LOGGER",
".",
"isTraceEnabled",
"(",
")",
"... | Dumps out a log message when one of a multiple-mapped Facebook field name JSON-to-Java mapping operation fails.
@param facebookFieldName
The Facebook field name.
@param fieldWithAnnotation
The Java field to map to and its annotation.
@param json
The JSON that failed to map to the Java field. | [
"Dumps",
"out",
"a",
"log",
"message",
"when",
"one",
"of",
"a",
"multiple",
"-",
"mapped",
"Facebook",
"field",
"name",
"JSON",
"-",
"to",
"-",
"Java",
"mapping",
"operation",
"fails",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/DefaultJsonMapper.java#L297-L310 |
48,510 | restfb/restfb | src/main/java/com/restfb/DefaultJsonMapper.java | DefaultJsonMapper.facebookFieldNamesWithMultipleMappings | protected Set<String> facebookFieldNamesWithMultipleMappings(
List<FieldWithAnnotation<Facebook>> fieldsWithAnnotation) {
Map<String, Integer> facebookFieldsNamesWithOccurrenceCount = new HashMap<>();
Set<String> facebookFieldNamesWithMultipleMappings = new HashSet<>();
// Get a count of Facebook fie... | java | protected Set<String> facebookFieldNamesWithMultipleMappings(
List<FieldWithAnnotation<Facebook>> fieldsWithAnnotation) {
Map<String, Integer> facebookFieldsNamesWithOccurrenceCount = new HashMap<>();
Set<String> facebookFieldNamesWithMultipleMappings = new HashSet<>();
// Get a count of Facebook fie... | [
"protected",
"Set",
"<",
"String",
">",
"facebookFieldNamesWithMultipleMappings",
"(",
"List",
"<",
"FieldWithAnnotation",
"<",
"Facebook",
">",
">",
"fieldsWithAnnotation",
")",
"{",
"Map",
"<",
"String",
",",
"Integer",
">",
"facebookFieldsNamesWithOccurrenceCount",
... | Finds any Facebook JSON fields that are mapped to more than 1 Java field.
@param fieldsWithAnnotation
Java fields annotated with the {@code Facebook} annotation.
@return Any Facebook JSON fields that are mapped to more than 1 Java field. | [
"Finds",
"any",
"Facebook",
"JSON",
"fields",
"that",
"are",
"mapped",
"to",
"more",
"than",
"1",
"Java",
"field",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/DefaultJsonMapper.java#L343-L366 |
48,511 | restfb/restfb | src/main/java/com/restfb/util/ObjectUtil.java | ObjectUtil.isEmptyCollectionOrMap | public static boolean isEmptyCollectionOrMap(Object obj) {
if (obj instanceof Collection) {
return ((Collection) obj).isEmpty();
}
return (obj instanceof Map && ((Map) obj).isEmpty());
} | java | public static boolean isEmptyCollectionOrMap(Object obj) {
if (obj instanceof Collection) {
return ((Collection) obj).isEmpty();
}
return (obj instanceof Map && ((Map) obj).isEmpty());
} | [
"public",
"static",
"boolean",
"isEmptyCollectionOrMap",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Collection",
")",
"{",
"return",
"(",
"(",
"Collection",
")",
"obj",
")",
".",
"isEmpty",
"(",
")",
";",
"}",
"return",
"(",
"obj",
... | Checks is the object is a empty 'collection' or 'map'.
@param obj
the object that is checked
@return {@code true} if the given object is a empty collection or an empty map, {@code false} otherwise | [
"Checks",
"is",
"the",
"object",
"is",
"a",
"empty",
"collection",
"or",
"map",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/ObjectUtil.java#L59-L65 |
48,512 | restfb/restfb | src/main/java/com/restfb/logging/RestFBLogger.java | RestFBLogger.getLoggerInstance | public static RestFBLogger getLoggerInstance(String logCategory) {
Object obj;
Class[] ctrTypes = new Class[] { String.class };
Object[] ctrArgs = new Object[] { logCategory };
try {
Constructor loggerClassConstructor = usedLoggerClass.getConstructor(ctrTypes);
obj = loggerClassConstructor.n... | java | public static RestFBLogger getLoggerInstance(String logCategory) {
Object obj;
Class[] ctrTypes = new Class[] { String.class };
Object[] ctrArgs = new Object[] { logCategory };
try {
Constructor loggerClassConstructor = usedLoggerClass.getConstructor(ctrTypes);
obj = loggerClassConstructor.n... | [
"public",
"static",
"RestFBLogger",
"getLoggerInstance",
"(",
"String",
"logCategory",
")",
"{",
"Object",
"obj",
";",
"Class",
"[",
"]",
"ctrTypes",
"=",
"new",
"Class",
"[",
"]",
"{",
"String",
".",
"class",
"}",
";",
"Object",
"[",
"]",
"ctrArgs",
"="... | returns the instance of the logger that belongs to the category.
@param logCategory
the category of the logger
@return a instance of the logger | [
"returns",
"the",
"instance",
"of",
"the",
"logger",
"that",
"belongs",
"to",
"the",
"category",
"."
] | fb77ba5486d1339e7deb81b9830670fa209b1047 | https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/logging/RestFBLogger.java#L88-L100 |
48,513 | jpmml/jpmml-evaluator | pmml-evaluator/src/main/java/org/jpmml/evaluator/LevenshteinDistanceUtil.java | LevenshteinDistanceUtil.limitedCompare | static int limitedCompare(CharSequence left, CharSequence right, final boolean caseSensitive, final int threshold) { // NOPMD
if (left == null || right == null) {
throw new IllegalArgumentException("Strings must not be null");
}
if (threshold < 0) {
throw new IllegalArgumentException("Threshold must not be ... | java | static int limitedCompare(CharSequence left, CharSequence right, final boolean caseSensitive, final int threshold) { // NOPMD
if (left == null || right == null) {
throw new IllegalArgumentException("Strings must not be null");
}
if (threshold < 0) {
throw new IllegalArgumentException("Threshold must not be ... | [
"static",
"int",
"limitedCompare",
"(",
"CharSequence",
"left",
",",
"CharSequence",
"right",
",",
"final",
"boolean",
"caseSensitive",
",",
"final",
"int",
"threshold",
")",
"{",
"// NOPMD",
"if",
"(",
"left",
"==",
"null",
"||",
"right",
"==",
"null",
")",... | Find the Levenshtein distance between two CharSequences if it's less than or
equal to a given threshold.
<p>
This implementation follows from Algorithms on Strings, Trees and
Sequences by Dan Gusfield and Chas Emerick's implementation of the
Levenshtein distance algorithm from <a
href="http://www.merriampark.com/ld.ht... | [
"Find",
"the",
"Levenshtein",
"distance",
"between",
"two",
"CharSequences",
"if",
"it",
"s",
"less",
"than",
"or",
"equal",
"to",
"a",
"given",
"threshold",
"."
] | ac8a48775877b6fa9dbc5f259871f3278489cc61 | https://github.com/jpmml/jpmml-evaluator/blob/ac8a48775877b6fa9dbc5f259871f3278489cc61/pmml-evaluator/src/main/java/org/jpmml/evaluator/LevenshteinDistanceUtil.java#L57-L197 |
48,514 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/ConrefPushParser.java | ConrefPushParser.updateList | private void updateList(final File filename) {
try {
final URI reletivePath = toURI(filename.getAbsolutePath().substring(new File(normalize(tempDir.toString())).getPath().length() + 1));
final FileInfo f = job.getOrCreateFileInfo(reletivePath);
if (hasConref) {
... | java | private void updateList(final File filename) {
try {
final URI reletivePath = toURI(filename.getAbsolutePath().substring(new File(normalize(tempDir.toString())).getPath().length() + 1));
final FileInfo f = job.getOrCreateFileInfo(reletivePath);
if (hasConref) {
... | [
"private",
"void",
"updateList",
"(",
"final",
"File",
"filename",
")",
"{",
"try",
"{",
"final",
"URI",
"reletivePath",
"=",
"toURI",
"(",
"filename",
".",
"getAbsolutePath",
"(",
")",
".",
"substring",
"(",
"new",
"File",
"(",
"normalize",
"(",
"tempDir"... | Update conref list in job configuration and in conref list file.
@param filename filename | [
"Update",
"conref",
"list",
"in",
"job",
"configuration",
"and",
"in",
"conref",
"list",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ConrefPushParser.java#L171-L187 |
48,515 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/PluginRequirement.java | PluginRequirement.addPlugins | public void addPlugins(final String s) {
final StringTokenizer t = new StringTokenizer(s, REQUIREMENT_SEPARATOR);
while (t.hasMoreTokens()) {
plugins.add(t.nextToken());
}
} | java | public void addPlugins(final String s) {
final StringTokenizer t = new StringTokenizer(s, REQUIREMENT_SEPARATOR);
while (t.hasMoreTokens()) {
plugins.add(t.nextToken());
}
} | [
"public",
"void",
"addPlugins",
"(",
"final",
"String",
"s",
")",
"{",
"final",
"StringTokenizer",
"t",
"=",
"new",
"StringTokenizer",
"(",
"s",
",",
"REQUIREMENT_SEPARATOR",
")",
";",
"while",
"(",
"t",
".",
"hasMoreTokens",
"(",
")",
")",
"{",
"plugins",... | Add plugins.
@param s plugins name | [
"Add",
"plugins",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/PluginRequirement.java#L34-L39 |
48,516 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/DitaValReader.java | DitaValReader.refineAction | private void refineAction(final Action action, final FilterKey key) {
if (key.value != null && bindingMap != null && !bindingMap.isEmpty()) {
final Map<String, Set<Element>> schemeMap = bindingMap.get(key.attribute);
if (schemeMap != null && !schemeMap.isEmpty()) {
for (f... | java | private void refineAction(final Action action, final FilterKey key) {
if (key.value != null && bindingMap != null && !bindingMap.isEmpty()) {
final Map<String, Set<Element>> schemeMap = bindingMap.get(key.attribute);
if (schemeMap != null && !schemeMap.isEmpty()) {
for (f... | [
"private",
"void",
"refineAction",
"(",
"final",
"Action",
"action",
",",
"final",
"FilterKey",
"key",
")",
"{",
"if",
"(",
"key",
".",
"value",
"!=",
"null",
"&&",
"bindingMap",
"!=",
"null",
"&&",
"!",
"bindingMap",
".",
"isEmpty",
"(",
")",
")",
"{"... | Refine action key with information from subject schemes. | [
"Refine",
"action",
"key",
"with",
"information",
"from",
"subject",
"schemes",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/DitaValReader.java#L295-L309 |
48,517 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/DitaValReader.java | DitaValReader.insertAction | private void insertAction(final Element subTree, final QName attName, final Action action) {
if (subTree == null || action == null) {
return;
}
final LinkedList<Element> queue = new LinkedList<>();
// Skip the sub-tree root because it has been added already.
NodeLis... | java | private void insertAction(final Element subTree, final QName attName, final Action action) {
if (subTree == null || action == null) {
return;
}
final LinkedList<Element> queue = new LinkedList<>();
// Skip the sub-tree root because it has been added already.
NodeLis... | [
"private",
"void",
"insertAction",
"(",
"final",
"Element",
"subTree",
",",
"final",
"QName",
"attName",
",",
"final",
"Action",
"action",
")",
"{",
"if",
"(",
"subTree",
"==",
"null",
"||",
"action",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
... | Insert subject scheme based action into filetermap if key not present in the map
@param subTree subject scheme definition element
@param attName attribute name
@param action action to insert | [
"Insert",
"subject",
"scheme",
"based",
"action",
"into",
"filetermap",
"if",
"key",
"not",
"present",
"in",
"the",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/DitaValReader.java#L318-L351 |
48,518 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/DitaValReader.java | DitaValReader.searchForKey | private Element searchForKey(final Element root, final String keyValue) {
if (root == null || keyValue == null) {
return null;
}
final LinkedList<Element> queue = new LinkedList<>();
queue.add(root);
while (!queue.isEmpty()) {
final Element node = queue.re... | java | private Element searchForKey(final Element root, final String keyValue) {
if (root == null || keyValue == null) {
return null;
}
final LinkedList<Element> queue = new LinkedList<>();
queue.add(root);
while (!queue.isEmpty()) {
final Element node = queue.re... | [
"private",
"Element",
"searchForKey",
"(",
"final",
"Element",
"root",
",",
"final",
"String",
"keyValue",
")",
"{",
"if",
"(",
"root",
"==",
"null",
"||",
"keyValue",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"LinkedList",
"<",
"Eleme... | Search subject scheme elements for a given key
@param root subject scheme element tree to search through
@param keyValue key to locate
@return element that matches the key, otherwise {@code null} | [
"Search",
"subject",
"scheme",
"elements",
"for",
"a",
"given",
"key"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/DitaValReader.java#L359-L381 |
48,519 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/DitaValReader.java | DitaValReader.insertAction | private void insertAction(final Action action, final FilterKey key) {
if (filterMap.get(key) == null) {
filterMap.put(key, action);
} else {
logger.info(MessageUtils.getMessage("DOTJ007I", key.toString()).toString());
}
} | java | private void insertAction(final Action action, final FilterKey key) {
if (filterMap.get(key) == null) {
filterMap.put(key, action);
} else {
logger.info(MessageUtils.getMessage("DOTJ007I", key.toString()).toString());
}
} | [
"private",
"void",
"insertAction",
"(",
"final",
"Action",
"action",
",",
"final",
"FilterKey",
"key",
")",
"{",
"if",
"(",
"filterMap",
".",
"get",
"(",
"key",
")",
"==",
"null",
")",
"{",
"filterMap",
".",
"put",
"(",
"key",
",",
"action",
")",
";"... | Insert action into filetermap if key not present in the map | [
"Insert",
"action",
"into",
"filetermap",
"if",
"key",
"not",
"present",
"in",
"the",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/DitaValReader.java#L387-L393 |
48,520 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/DebugAndFilterModule.java | DebugAndFilterModule.outputSubjectScheme | private void outputSubjectScheme() throws DITAOTException {
try {
final Map<URI, Set<URI>> graph = SubjectSchemeReader.readMapFromXML(new File(job.tempDir, FILE_NAME_SUBJECT_RELATION));
final Queue<URI> queue = new LinkedList<>(graph.keySet());
final Set<URI> visitedSet = ne... | java | private void outputSubjectScheme() throws DITAOTException {
try {
final Map<URI, Set<URI>> graph = SubjectSchemeReader.readMapFromXML(new File(job.tempDir, FILE_NAME_SUBJECT_RELATION));
final Queue<URI> queue = new LinkedList<>(graph.keySet());
final Set<URI> visitedSet = ne... | [
"private",
"void",
"outputSubjectScheme",
"(",
")",
"throws",
"DITAOTException",
"{",
"try",
"{",
"final",
"Map",
"<",
"URI",
",",
"Set",
"<",
"URI",
">",
">",
"graph",
"=",
"SubjectSchemeReader",
".",
"readMapFromXML",
"(",
"new",
"File",
"(",
"job",
".",... | Output subject schema file.
@throws DITAOTException if generation files | [
"Output",
"subject",
"schema",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L318-L365 |
48,521 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/DebugAndFilterModule.java | DebugAndFilterModule.generateScheme | private void generateScheme(final File filename, final Document root) throws DITAOTException {
final File p = filename.getParentFile();
if (!p.exists() && !p.mkdirs()) {
throw new DITAOTException("Failed to make directory " + p.getAbsolutePath());
}
Result res = null;
... | java | private void generateScheme(final File filename, final Document root) throws DITAOTException {
final File p = filename.getParentFile();
if (!p.exists() && !p.mkdirs()) {
throw new DITAOTException("Failed to make directory " + p.getAbsolutePath());
}
Result res = null;
... | [
"private",
"void",
"generateScheme",
"(",
"final",
"File",
"filename",
",",
"final",
"Document",
"root",
")",
"throws",
"DITAOTException",
"{",
"final",
"File",
"p",
"=",
"filename",
".",
"getParentFile",
"(",
")",
";",
"if",
"(",
"!",
"p",
".",
"exists",
... | Serialize subject scheme file.
@param filename output filepath
@param root subject scheme document
@throws DITAOTException if generation fails | [
"Serialize",
"subject",
"scheme",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L477-L501 |
48,522 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/DebugAndFilterModule.java | DebugAndFilterModule.getPathtoProject | public static File getPathtoProject(final File filename, final File traceFilename, final File inputMap, final Job job) {
if (job.getGeneratecopyouter() != Job.Generate.OLDSOLUTION) {
if (isOutFile(traceFilename, inputMap)) {
return toFile(getRelativePathFromOut(traceFilename.getAbsol... | java | public static File getPathtoProject(final File filename, final File traceFilename, final File inputMap, final Job job) {
if (job.getGeneratecopyouter() != Job.Generate.OLDSOLUTION) {
if (isOutFile(traceFilename, inputMap)) {
return toFile(getRelativePathFromOut(traceFilename.getAbsol... | [
"public",
"static",
"File",
"getPathtoProject",
"(",
"final",
"File",
"filename",
",",
"final",
"File",
"traceFilename",
",",
"final",
"File",
"inputMap",
",",
"final",
"Job",
"job",
")",
"{",
"if",
"(",
"job",
".",
"getGeneratecopyouter",
"(",
")",
"!=",
... | Get path to base directory
@param filename relative input file path from base directory
@param traceFilename absolute input file
@param inputMap absolute path to start file
@return path to base directory, {@code null} if not available | [
"Get",
"path",
"to",
"base",
"directory"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L511-L521 |
48,523 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/DebugAndFilterModule.java | DebugAndFilterModule.getRelativePathFromOut | private static String getRelativePathFromOut(final File overflowingFile, final Job job) {
final URI relativePath = URLUtils.getRelativePath(job.getInputFile(), overflowingFile.toURI());
final File outputDir = job.getOutputDir().getAbsoluteFile();
final File outputPathName = new File(outputDir, "... | java | private static String getRelativePathFromOut(final File overflowingFile, final Job job) {
final URI relativePath = URLUtils.getRelativePath(job.getInputFile(), overflowingFile.toURI());
final File outputDir = job.getOutputDir().getAbsoluteFile();
final File outputPathName = new File(outputDir, "... | [
"private",
"static",
"String",
"getRelativePathFromOut",
"(",
"final",
"File",
"overflowingFile",
",",
"final",
"Job",
"job",
")",
"{",
"final",
"URI",
"relativePath",
"=",
"URLUtils",
".",
"getRelativePath",
"(",
"job",
".",
"getInputFile",
"(",
")",
",",
"ov... | Just for the overflowing files.
@param overflowingFile overflowingFile
@return relative system path to out which ends in {@link java.io.File#separator File.separator} | [
"Just",
"for",
"the",
"overflowing",
"files",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/DebugAndFilterModule.java#L527-L538 |
48,524 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/MoveMetaModule.java | MoveMetaModule.execute | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
final Collection<FileInfo> fis = job.getFileInfo(fi -> fi.isInput);
if (!fis.isEmpty()) {
final Map<URI, Map<String, Element>> mapSet = getMapMetadata(fis);
pushMetadat... | java | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
final Collection<FileInfo> fis = job.getFileInfo(fi -> fi.isInput);
if (!fis.isEmpty()) {
final Map<URI, Map<String, Element>> mapSet = getMapMetadata(fis);
pushMetadat... | [
"@",
"Override",
"public",
"AbstractPipelineOutput",
"execute",
"(",
"final",
"AbstractPipelineInput",
"input",
")",
"throws",
"DITAOTException",
"{",
"final",
"Collection",
"<",
"FileInfo",
">",
"fis",
"=",
"job",
".",
"getFileInfo",
"(",
"fi",
"->",
"fi",
".",... | Entry point of MoveMetaModule.
@param input Input parameters and resources.
@return null
@throws DITAOTException exception | [
"Entry",
"point",
"of",
"MoveMetaModule",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/MoveMetaModule.java#L59-L69 |
48,525 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/MoveMetaModule.java | MoveMetaModule.pushMetadata | private void pushMetadata(final Map<URI, Map<String, Element>> mapSet) {
if (!mapSet.isEmpty()) {
//process map first
final DitaMapMetaWriter mapInserter = new DitaMapMetaWriter();
mapInserter.setLogger(logger);
mapInserter.setJob(job);
for (final Entr... | java | private void pushMetadata(final Map<URI, Map<String, Element>> mapSet) {
if (!mapSet.isEmpty()) {
//process map first
final DitaMapMetaWriter mapInserter = new DitaMapMetaWriter();
mapInserter.setLogger(logger);
mapInserter.setJob(job);
for (final Entr... | [
"private",
"void",
"pushMetadata",
"(",
"final",
"Map",
"<",
"URI",
",",
"Map",
"<",
"String",
",",
"Element",
">",
">",
"mapSet",
")",
"{",
"if",
"(",
"!",
"mapSet",
".",
"isEmpty",
"(",
")",
")",
"{",
"//process map first",
"final",
"DitaMapMetaWriter"... | Push information from topicmeta in the map into the corresponding topics and maps. | [
"Push",
"information",
"from",
"topicmeta",
"in",
"the",
"map",
"into",
"the",
"corresponding",
"topics",
"and",
"maps",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/MoveMetaModule.java#L146-L198 |
48,526 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/MoveMetaModule.java | MoveMetaModule.getMapMetadata | private Map<URI, Map<String, Element>> getMapMetadata(final Collection<FileInfo> fis) {
final MapMetaReader metaReader = new MapMetaReader();
metaReader.setLogger(logger);
metaReader.setJob(job);
for (final FileInfo f : fis) {
final File mapFile = new File(job.tempDir, f.file... | java | private Map<URI, Map<String, Element>> getMapMetadata(final Collection<FileInfo> fis) {
final MapMetaReader metaReader = new MapMetaReader();
metaReader.setLogger(logger);
metaReader.setJob(job);
for (final FileInfo f : fis) {
final File mapFile = new File(job.tempDir, f.file... | [
"private",
"Map",
"<",
"URI",
",",
"Map",
"<",
"String",
",",
"Element",
">",
">",
"getMapMetadata",
"(",
"final",
"Collection",
"<",
"FileInfo",
">",
"fis",
")",
"{",
"final",
"MapMetaReader",
"metaReader",
"=",
"new",
"MapMetaReader",
"(",
")",
";",
"m... | Read metadata from topicmeta elements in maps. | [
"Read",
"metadata",
"from",
"topicmeta",
"elements",
"in",
"maps",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/MoveMetaModule.java#L203-L213 |
48,527 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/ConkeyrefFilter.java | ConkeyrefFilter.getRelativePath | private URI getRelativePath(final URI href) {
final URI keyValue;
final URI inputMap = job.getFileInfo(fi -> fi.isInput).stream()
.map(fi -> fi.uri)
.findFirst()
.orElse(null);
if (inputMap != null) {
final URI tmpMap = job.tempDirURI.r... | java | private URI getRelativePath(final URI href) {
final URI keyValue;
final URI inputMap = job.getFileInfo(fi -> fi.isInput).stream()
.map(fi -> fi.uri)
.findFirst()
.orElse(null);
if (inputMap != null) {
final URI tmpMap = job.tempDirURI.r... | [
"private",
"URI",
"getRelativePath",
"(",
"final",
"URI",
"href",
")",
"{",
"final",
"URI",
"keyValue",
";",
"final",
"URI",
"inputMap",
"=",
"job",
".",
"getFileInfo",
"(",
"fi",
"->",
"fi",
".",
"isInput",
")",
".",
"stream",
"(",
")",
".",
"map",
... | Update href URI.
@param href href URI
@return updated href URI | [
"Update",
"href",
"URI",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ConkeyrefFilter.java#L92-L105 |
48,528 | dita-ot/dita-ot | src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/ant/CheckLang.java | CheckLang.setActiveProjectProperty | private void setActiveProjectProperty(final String propertyName, final String propertyValue) {
final Project activeProject = getProject();
if (activeProject != null) {
activeProject.setProperty(propertyName, propertyValue);
}
} | java | private void setActiveProjectProperty(final String propertyName, final String propertyValue) {
final Project activeProject = getProject();
if (activeProject != null) {
activeProject.setProperty(propertyName, propertyValue);
}
} | [
"private",
"void",
"setActiveProjectProperty",
"(",
"final",
"String",
"propertyName",
",",
"final",
"String",
"propertyValue",
")",
"{",
"final",
"Project",
"activeProject",
"=",
"getProject",
"(",
")",
";",
"if",
"(",
"activeProject",
"!=",
"null",
")",
"{",
... | Sets property in active ant project with name specified inpropertyName,
and value specified in propertyValue parameter | [
"Sets",
"property",
"in",
"active",
"ant",
"project",
"with",
"name",
"specified",
"inpropertyName",
"and",
"value",
"specified",
"in",
"propertyValue",
"parameter"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/ant/CheckLang.java#L123-L128 |
48,529 | dita-ot/dita-ot | src/main/java/org/dita/dost/ant/DITAOTEchoTask.java | DITAOTEchoTask.readParamValues | private String[] readParamValues() throws BuildException {
final ArrayList<String> prop = new ArrayList<>();
for (final ParamElem p : params) {
if (!p.isValid()) {
throw new BuildException("Incomplete parameter");
}
if (isValid(getProject(), getLocatio... | java | private String[] readParamValues() throws BuildException {
final ArrayList<String> prop = new ArrayList<>();
for (final ParamElem p : params) {
if (!p.isValid()) {
throw new BuildException("Incomplete parameter");
}
if (isValid(getProject(), getLocatio... | [
"private",
"String",
"[",
"]",
"readParamValues",
"(",
")",
"throws",
"BuildException",
"{",
"final",
"ArrayList",
"<",
"String",
">",
"prop",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"ParamElem",
"p",
":",
"params",
")",
"{",
... | Read parameter values to an array.
@return parameter values where array index corresponds to parameter name | [
"Read",
"parameter",
"values",
"to",
"an",
"array",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/DITAOTEchoTask.java#L87-L105 |
48,530 | dita-ot/dita-ot | src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java | EclipseIndexWriter.getIndexFileName | @Override
public String getIndexFileName(final String outputFileRoot) {
final File indexDir = new File(outputFileRoot).getParentFile();
setFilePath(indexDir.getAbsolutePath());
return new File(indexDir, "index.xml").getAbsolutePath();
} | java | @Override
public String getIndexFileName(final String outputFileRoot) {
final File indexDir = new File(outputFileRoot).getParentFile();
setFilePath(indexDir.getAbsolutePath());
return new File(indexDir, "index.xml").getAbsolutePath();
} | [
"@",
"Override",
"public",
"String",
"getIndexFileName",
"(",
"final",
"String",
"outputFileRoot",
")",
"{",
"final",
"File",
"indexDir",
"=",
"new",
"File",
"(",
"outputFileRoot",
")",
".",
"getParentFile",
"(",
")",
";",
"setFilePath",
"(",
"indexDir",
".",
... | Get index file name.
@param outputFileRoot root path
@return index file name | [
"Get",
"index",
"file",
"name",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java#L162-L167 |
48,531 | dita-ot/dita-ot | src/main/java/org/dita/dost/ant/IntegratorTask.java | IntegratorTask.setDitadir | @Deprecated
public void setDitadir(final File ditaDir) {
if (!ditaDir.isAbsolute()) {
throw new IllegalArgumentException("ditadir attribute value must be an absolute path: " + ditaDir);
}
this.ditaDir = ditaDir;
} | java | @Deprecated
public void setDitadir(final File ditaDir) {
if (!ditaDir.isAbsolute()) {
throw new IllegalArgumentException("ditadir attribute value must be an absolute path: " + ditaDir);
}
this.ditaDir = ditaDir;
} | [
"@",
"Deprecated",
"public",
"void",
"setDitadir",
"(",
"final",
"File",
"ditaDir",
")",
"{",
"if",
"(",
"!",
"ditaDir",
".",
"isAbsolute",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"ditadir attribute value must be an absolute path: \"",... | Set the ditaDir.
@param ditaDir ditaDir | [
"Set",
"the",
"ditaDir",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/IntegratorTask.java#L48-L54 |
48,532 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/SeparateChunkTopicParser.java | SeparateChunkTopicParser.getTopicDoc | private Element getTopicDoc(final URI absolutePathToFile) {
final DocumentBuilder builder = getDocumentBuilder();
try {
final Document doc = builder.parse(absolutePathToFile.toString());
return doc.getDocumentElement();
} catch (final SAXException | IOException e) {
... | java | private Element getTopicDoc(final URI absolutePathToFile) {
final DocumentBuilder builder = getDocumentBuilder();
try {
final Document doc = builder.parse(absolutePathToFile.toString());
return doc.getDocumentElement();
} catch (final SAXException | IOException e) {
... | [
"private",
"Element",
"getTopicDoc",
"(",
"final",
"URI",
"absolutePathToFile",
")",
"{",
"final",
"DocumentBuilder",
"builder",
"=",
"getDocumentBuilder",
"(",
")",
";",
"try",
"{",
"final",
"Document",
"doc",
"=",
"builder",
".",
"parse",
"(",
"absolutePathToF... | get the document node of a topic file.
@param absolutePathToFile topic file
@return element. | [
"get",
"the",
"document",
"node",
"of",
"a",
"topic",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/SeparateChunkTopicParser.java#L260-L269 |
48,533 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.addSubTerm | public void addSubTerm(final IndexTerm term) {
int i = 0;
final int subTermNum = subTerms.size();
if (IndexTermPrefix.SEE != term.getTermPrefix() && IndexTermPrefix.SEE_ALSO != term.getTermPrefix()) {
//if the term is not "index-see" or "index-see-also"
leaf = false;
... | java | public void addSubTerm(final IndexTerm term) {
int i = 0;
final int subTermNum = subTerms.size();
if (IndexTermPrefix.SEE != term.getTermPrefix() && IndexTermPrefix.SEE_ALSO != term.getTermPrefix()) {
//if the term is not "index-see" or "index-see-also"
leaf = false;
... | [
"public",
"void",
"addSubTerm",
"(",
"final",
"IndexTerm",
"term",
")",
"{",
"int",
"i",
"=",
"0",
";",
"final",
"int",
"subTermNum",
"=",
"subTerms",
".",
"size",
"(",
")",
";",
"if",
"(",
"IndexTermPrefix",
".",
"SEE",
"!=",
"term",
".",
"getTermPref... | Add a sub term into the sub term list.
@param term index term to be added | [
"Add",
"a",
"sub",
"term",
"into",
"the",
"sub",
"term",
"list",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L183-L211 |
48,534 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.addSubTerms | public void addSubTerms(final List<IndexTerm> terms) {
int subTermsNum;
if (terms == null) {
return;
}
subTermsNum = terms.size();
for (int i = 0; i < subTermsNum; i++) {
addSubTerm(terms.get(i));
}
} | java | public void addSubTerms(final List<IndexTerm> terms) {
int subTermsNum;
if (terms == null) {
return;
}
subTermsNum = terms.size();
for (int i = 0; i < subTermsNum; i++) {
addSubTerm(terms.get(i));
}
} | [
"public",
"void",
"addSubTerms",
"(",
"final",
"List",
"<",
"IndexTerm",
">",
"terms",
")",
"{",
"int",
"subTermsNum",
";",
"if",
"(",
"terms",
"==",
"null",
")",
"{",
"return",
";",
"}",
"subTermsNum",
"=",
"terms",
".",
"size",
"(",
")",
";",
"for"... | Add all the sub terms in the list.
@param terms terms list | [
"Add",
"all",
"the",
"sub",
"terms",
"in",
"the",
"list",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L218-L228 |
48,535 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.sortSubTerms | public void sortSubTerms() {
final int subTermNum = subTerms.size();
if (subTerms != null && subTermNum > 0) {
Collections.sort(subTerms);
for (final IndexTerm subTerm : subTerms) {
subTerm.sortSubTerms();
}
}
} | java | public void sortSubTerms() {
final int subTermNum = subTerms.size();
if (subTerms != null && subTermNum > 0) {
Collections.sort(subTerms);
for (final IndexTerm subTerm : subTerms) {
subTerm.sortSubTerms();
}
}
} | [
"public",
"void",
"sortSubTerms",
"(",
")",
"{",
"final",
"int",
"subTermNum",
"=",
"subTerms",
".",
"size",
"(",
")",
";",
"if",
"(",
"subTerms",
"!=",
"null",
"&&",
"subTermNum",
">",
"0",
")",
"{",
"Collections",
".",
"sort",
"(",
"subTerms",
")",
... | Sort all the subterms iteratively. | [
"Sort",
"all",
"the",
"subterms",
"iteratively",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L278-L287 |
48,536 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.compareTo | @Override
public int compareTo(final IndexTerm obj) {
return DITAOTCollator.getInstance(termLocale).compare(termKey, obj.getTermKey());
} | java | @Override
public int compareTo(final IndexTerm obj) {
return DITAOTCollator.getInstance(termLocale).compare(termKey, obj.getTermKey());
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"final",
"IndexTerm",
"obj",
")",
"{",
"return",
"DITAOTCollator",
".",
"getInstance",
"(",
"termLocale",
")",
".",
"compare",
"(",
"termKey",
",",
"obj",
".",
"getTermKey",
"(",
")",
")",
";",
"}"
] | Compare the given indexterm with current term.
@param obj object to compare with
@return int | [
"Compare",
"the",
"given",
"indexterm",
"with",
"current",
"term",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L295-L298 |
48,537 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.addTargets | public void addTargets(final List<IndexTermTarget> targets) {
int targetNum;
if (targets == null) {
return;
}
targetNum = targets.size();
for (int i = 0; i < targetNum; i++) {
addTarget(targets.get(i));
}
} | java | public void addTargets(final List<IndexTermTarget> targets) {
int targetNum;
if (targets == null) {
return;
}
targetNum = targets.size();
for (int i = 0; i < targetNum; i++) {
addTarget(targets.get(i));
}
} | [
"public",
"void",
"addTargets",
"(",
"final",
"List",
"<",
"IndexTermTarget",
">",
"targets",
")",
"{",
"int",
"targetNum",
";",
"if",
"(",
"targets",
"==",
"null",
")",
"{",
"return",
";",
"}",
"targetNum",
"=",
"targets",
".",
"size",
"(",
")",
";",
... | Add all the indexterm targets in the list.
@param targets list of targets | [
"Add",
"all",
"the",
"indexterm",
"targets",
"in",
"the",
"list",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L325-L336 |
48,538 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.getTermFullName | public String getTermFullName() {
if (termPrefix == null) {
return termName;
} else {
if (termLocale == null) {
return termPrefix.message + STRING_BLANK + termName;
} else {
final String key = "IndexTerm." + termPrefix.message.toLowerCa... | java | public String getTermFullName() {
if (termPrefix == null) {
return termName;
} else {
if (termLocale == null) {
return termPrefix.message + STRING_BLANK + termName;
} else {
final String key = "IndexTerm." + termPrefix.message.toLowerCa... | [
"public",
"String",
"getTermFullName",
"(",
")",
"{",
"if",
"(",
"termPrefix",
"==",
"null",
")",
"{",
"return",
"termName",
";",
"}",
"else",
"{",
"if",
"(",
"termLocale",
"==",
"null",
")",
"{",
"return",
"termPrefix",
".",
"message",
"+",
"STRING_BLAN... | Get the full term, with any prefix.
@return full term with prefix | [
"Get",
"the",
"full",
"term",
"with",
"any",
"prefix",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L377-L393 |
48,539 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTerm.java | IndexTerm.updateSubTerm | public void updateSubTerm() {
if (subTerms.size() == 1) {
// if there is only one subterm, it is necessary to update
final IndexTerm term = subTerms.get(0); // get the only subterm
if (term.getTermPrefix() == IndexTermPrefix.SEE) {
//if the only subterm is ind... | java | public void updateSubTerm() {
if (subTerms.size() == 1) {
// if there is only one subterm, it is necessary to update
final IndexTerm term = subTerms.get(0); // get the only subterm
if (term.getTermPrefix() == IndexTermPrefix.SEE) {
//if the only subterm is ind... | [
"public",
"void",
"updateSubTerm",
"(",
")",
"{",
"if",
"(",
"subTerms",
".",
"size",
"(",
")",
"==",
"1",
")",
"{",
"// if there is only one subterm, it is necessary to update",
"final",
"IndexTerm",
"term",
"=",
"subTerms",
".",
"get",
"(",
"0",
")",
";",
... | Update the sub-term prefix from "See also" to "See" if there is only one sub-term. | [
"Update",
"the",
"sub",
"-",
"term",
"prefix",
"from",
"See",
"also",
"to",
"See",
"if",
"there",
"is",
"only",
"one",
"sub",
"-",
"term",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTerm.java#L398-L408 |
48,540 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.read | public void read(final URI filename, final Document doc) {
currentFile = filename;
rootScope = null;
// TODO: use KeyScope implementation that retains order
KeyScope keyScope = readScopes(doc);
keyScope = cascadeChildKeys(keyScope);
// TODO: determine effective key defini... | java | public void read(final URI filename, final Document doc) {
currentFile = filename;
rootScope = null;
// TODO: use KeyScope implementation that retains order
KeyScope keyScope = readScopes(doc);
keyScope = cascadeChildKeys(keyScope);
// TODO: determine effective key defini... | [
"public",
"void",
"read",
"(",
"final",
"URI",
"filename",
",",
"final",
"Document",
"doc",
")",
"{",
"currentFile",
"=",
"filename",
";",
"rootScope",
"=",
"null",
";",
"// TODO: use KeyScope implementation that retains order",
"KeyScope",
"keyScope",
"=",
"readSco... | Read key definitions
@param filename absolute URI to DITA map with key definitions
@param doc key definition DITA map | [
"Read",
"key",
"definitions"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L100-L109 |
48,541 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.readScopes | private KeyScope readScopes(final Document doc) {
final List<KeyScope> scopes = readScopes(doc.getDocumentElement());
if (scopes.size() == 1 && scopes.get(0).name == null) {
return scopes.get(0);
} else {
return new KeyScope("#root", null, Collections.emptyMap(), scopes);... | java | private KeyScope readScopes(final Document doc) {
final List<KeyScope> scopes = readScopes(doc.getDocumentElement());
if (scopes.size() == 1 && scopes.get(0).name == null) {
return scopes.get(0);
} else {
return new KeyScope("#root", null, Collections.emptyMap(), scopes);... | [
"private",
"KeyScope",
"readScopes",
"(",
"final",
"Document",
"doc",
")",
"{",
"final",
"List",
"<",
"KeyScope",
">",
"scopes",
"=",
"readScopes",
"(",
"doc",
".",
"getDocumentElement",
"(",
")",
")",
";",
"if",
"(",
"scopes",
".",
"size",
"(",
")",
"... | Read keys scopes in map. | [
"Read",
"keys",
"scopes",
"in",
"map",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L112-L119 |
48,542 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.readScope | private void readScope(final Element scope, final Map<String, KeyDef> keyDefs) {
final List<Element> maps = new ArrayList<>();
maps.add(scope);
for (final Element child: getChildElements(scope)) {
collectMaps(child, maps);
}
for (final Element map: maps) {
... | java | private void readScope(final Element scope, final Map<String, KeyDef> keyDefs) {
final List<Element> maps = new ArrayList<>();
maps.add(scope);
for (final Element child: getChildElements(scope)) {
collectMaps(child, maps);
}
for (final Element map: maps) {
... | [
"private",
"void",
"readScope",
"(",
"final",
"Element",
"scope",
",",
"final",
"Map",
"<",
"String",
",",
"KeyDef",
">",
"keyDefs",
")",
"{",
"final",
"List",
"<",
"Element",
">",
"maps",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"maps",
".",
"a... | Read key definitions from a key scope. | [
"Read",
"key",
"definitions",
"from",
"a",
"key",
"scope",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L170-L179 |
48,543 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.readMap | private void readMap(final Element map, final Map<String, KeyDef> keyDefs) {
readKeyDefinition(map, keyDefs);
for (final Element elem: getChildElements(map)) {
if (!(SUBMAP.matches(elem) || elem.getAttributeNode(ATTRIBUTE_NAME_KEYSCOPE) != null)) {
readMap(elem, keyDefs);
... | java | private void readMap(final Element map, final Map<String, KeyDef> keyDefs) {
readKeyDefinition(map, keyDefs);
for (final Element elem: getChildElements(map)) {
if (!(SUBMAP.matches(elem) || elem.getAttributeNode(ATTRIBUTE_NAME_KEYSCOPE) != null)) {
readMap(elem, keyDefs);
... | [
"private",
"void",
"readMap",
"(",
"final",
"Element",
"map",
",",
"final",
"Map",
"<",
"String",
",",
"KeyDef",
">",
"keyDefs",
")",
"{",
"readKeyDefinition",
"(",
"map",
",",
"keyDefs",
")",
";",
"for",
"(",
"final",
"Element",
"elem",
":",
"getChildEl... | Recursively read key definitions from a single map fragment. | [
"Recursively",
"read",
"key",
"definitions",
"from",
"a",
"single",
"map",
"fragment",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L195-L202 |
48,544 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.cascadeChildKeys | private KeyScope cascadeChildKeys(final KeyScope rootScope) {
final Map<String, KeyDef> res = new HashMap<>(rootScope.keyDefinition);
cascadeChildKeys(rootScope, res, "");
return new KeyScope(rootScope.id, rootScope.name, res, new ArrayList<>(rootScope.childScopes));
} | java | private KeyScope cascadeChildKeys(final KeyScope rootScope) {
final Map<String, KeyDef> res = new HashMap<>(rootScope.keyDefinition);
cascadeChildKeys(rootScope, res, "");
return new KeyScope(rootScope.id, rootScope.name, res, new ArrayList<>(rootScope.childScopes));
} | [
"private",
"KeyScope",
"cascadeChildKeys",
"(",
"final",
"KeyScope",
"rootScope",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"KeyDef",
">",
"res",
"=",
"new",
"HashMap",
"<>",
"(",
"rootScope",
".",
"keyDefinition",
")",
";",
"cascadeChildKeys",
"(",
"roo... | Cascade child keys with prefixes to parent key scopes. | [
"Cascade",
"child",
"keys",
"with",
"prefixes",
"to",
"parent",
"key",
"scopes",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L226-L230 |
48,545 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/KeyrefReader.java | KeyrefReader.resolveIntermediate | private KeyScope resolveIntermediate(final KeyScope scope) {
final Map<String, KeyDef> keys = new HashMap<>(scope.keyDefinition);
for (final Map.Entry<String, KeyDef> e: scope.keyDefinition.entrySet()) {
final KeyDef res = resolveIntermediate(scope, e.getValue(), Collections.singletonList(e.... | java | private KeyScope resolveIntermediate(final KeyScope scope) {
final Map<String, KeyDef> keys = new HashMap<>(scope.keyDefinition);
for (final Map.Entry<String, KeyDef> e: scope.keyDefinition.entrySet()) {
final KeyDef res = resolveIntermediate(scope, e.getValue(), Collections.singletonList(e.... | [
"private",
"KeyScope",
"resolveIntermediate",
"(",
"final",
"KeyScope",
"scope",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"KeyDef",
">",
"keys",
"=",
"new",
"HashMap",
"<>",
"(",
"scope",
".",
"keyDefinition",
")",
";",
"for",
"(",
"final",
"Map",
"... | Resolve intermediate key references. | [
"Resolve",
"intermediate",
"key",
"references",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/KeyrefReader.java#L271-L283 |
48,546 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ConrefPushReader.java | ConrefPushReader.replaceContent | private DocumentFragment replaceContent(final DocumentFragment pushcontent) {
final NodeList children = pushcontent.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node child = children.item(i);
switch (child.getNodeType()) {
case Node.ELEMENT_... | java | private DocumentFragment replaceContent(final DocumentFragment pushcontent) {
final NodeList children = pushcontent.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node child = children.item(i);
switch (child.getNodeType()) {
case Node.ELEMENT_... | [
"private",
"DocumentFragment",
"replaceContent",
"(",
"final",
"DocumentFragment",
"pushcontent",
")",
"{",
"final",
"NodeList",
"children",
"=",
"pushcontent",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
... | Rewrite link attributes. | [
"Rewrite",
"link",
"attributes",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ConrefPushReader.java#L224-L240 |
48,547 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/DitamapIndexTermReader.java | DitamapIndexTermReader.needPushTerm | private boolean needPushTerm() {
if (elementStack.empty()) {
return false;
}
if (elementStack.peek() instanceof TopicrefElement) {
// for dita files the indexterm has been moved to its <prolog>
// therefore we don't need to collect these terms again.
... | java | private boolean needPushTerm() {
if (elementStack.empty()) {
return false;
}
if (elementStack.peek() instanceof TopicrefElement) {
// for dita files the indexterm has been moved to its <prolog>
// therefore we don't need to collect these terms again.
... | [
"private",
"boolean",
"needPushTerm",
"(",
")",
"{",
"if",
"(",
"elementStack",
".",
"empty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"elementStack",
".",
"peek",
"(",
")",
"instanceof",
"TopicrefElement",
")",
"{",
"// for dita files t... | Check element stack for the root topicref or indexterm element. | [
"Check",
"element",
"stack",
"for",
"the",
"root",
"topicref",
"or",
"indexterm",
"element",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/DitamapIndexTermReader.java#L338-L353 |
48,548 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/DitaClass.java | DitaClass.matches | public boolean matches(final Node node) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
return matches(((Element) node).getAttribute(ATTRIBUTE_NAME_CLASS));
}
return false;
} | java | public boolean matches(final Node node) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
return matches(((Element) node).getAttribute(ATTRIBUTE_NAME_CLASS));
}
return false;
} | [
"public",
"boolean",
"matches",
"(",
"final",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getNodeType",
"(",
")",
"==",
"Node",
".",
"ELEMENT_NODE",
")",
"{",
"return",
"matches",
"(",
"(",
"(",
"Element",
")",
"node",
")",
".",
"getAttribute",
... | Test if given DITA class string matches this DITA class.
@param node DOM DITA element
@return {@code true} if given node is an Element and its class matches this class, otherwise {@code false} | [
"Test",
"if",
"given",
"DITA",
"class",
"string",
"matches",
"this",
"DITA",
"class",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/DitaClass.java#L175-L180 |
48,549 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.execute | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input)
throws DITAOTException {
if (fileInfoFilter == null) {
fileInfoFilter = f -> f.format == null || f.format.equals(ATTR_FORMAT_VALUE_DITA) || f.format.equals(ATTR_FORMAT_VALUE_DITAMAP);
}
... | java | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input)
throws DITAOTException {
if (fileInfoFilter == null) {
fileInfoFilter = f -> f.format == null || f.format.equals(ATTR_FORMAT_VALUE_DITA) || f.format.equals(ATTR_FORMAT_VALUE_DITAMAP);
}
... | [
"@",
"Override",
"public",
"AbstractPipelineOutput",
"execute",
"(",
"final",
"AbstractPipelineInput",
"input",
")",
"throws",
"DITAOTException",
"{",
"if",
"(",
"fileInfoFilter",
"==",
"null",
")",
"{",
"fileInfoFilter",
"=",
"f",
"->",
"f",
".",
"format",
"=="... | Entry point of KeyrefModule.
@param input Input parameters and resources.
@return null
@throws DITAOTException exception | [
"Entry",
"point",
"of",
"KeyrefModule",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L85-L148 |
48,550 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.collectProcessingTopics | private List<ResolveTask> collectProcessingTopics(final Collection<FileInfo> fis, final KeyScope rootScope, final Document doc) {
final List<ResolveTask> res = new ArrayList<>();
final FileInfo input = job.getFileInfo(fi -> fi.isInput).iterator().next();
res.add(new ResolveTask(rootScope, input,... | java | private List<ResolveTask> collectProcessingTopics(final Collection<FileInfo> fis, final KeyScope rootScope, final Document doc) {
final List<ResolveTask> res = new ArrayList<>();
final FileInfo input = job.getFileInfo(fi -> fi.isInput).iterator().next();
res.add(new ResolveTask(rootScope, input,... | [
"private",
"List",
"<",
"ResolveTask",
">",
"collectProcessingTopics",
"(",
"final",
"Collection",
"<",
"FileInfo",
">",
"fis",
",",
"final",
"KeyScope",
"rootScope",
",",
"final",
"Document",
"doc",
")",
"{",
"final",
"List",
"<",
"ResolveTask",
">",
"res",
... | Collect topics for key reference processing and modify map to reflect new file names. | [
"Collect",
"topics",
"for",
"key",
"reference",
"processing",
"and",
"modify",
"map",
"to",
"reflect",
"new",
"file",
"names",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L155-L176 |
48,551 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.removeDuplicateResolveTargets | private List<ResolveTask> removeDuplicateResolveTargets(List<ResolveTask> renames) {
return renames.stream()
.collect(Collectors.groupingBy(
rt -> rt.scope,
Collectors.toMap(
rt -> rt.in.uri,
... | java | private List<ResolveTask> removeDuplicateResolveTargets(List<ResolveTask> renames) {
return renames.stream()
.collect(Collectors.groupingBy(
rt -> rt.scope,
Collectors.toMap(
rt -> rt.in.uri,
... | [
"private",
"List",
"<",
"ResolveTask",
">",
"removeDuplicateResolveTargets",
"(",
"List",
"<",
"ResolveTask",
">",
"renames",
")",
"{",
"return",
"renames",
".",
"stream",
"(",
")",
".",
"collect",
"(",
"Collectors",
".",
"groupingBy",
"(",
"rt",
"->",
"rt",... | Remove duplicate sources within the same scope | [
"Remove",
"duplicate",
"sources",
"within",
"the",
"same",
"scope"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L179-L191 |
48,552 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.adjustResourceRenames | List<ResolveTask> adjustResourceRenames(final List<ResolveTask> renames) {
final Map<KeyScope, List<ResolveTask>> scopes = renames.stream().collect(Collectors.groupingBy(rt -> rt.scope));
final List<ResolveTask> res = new ArrayList<>();
for (final Map.Entry<KeyScope, List<ResolveTask>> group : ... | java | List<ResolveTask> adjustResourceRenames(final List<ResolveTask> renames) {
final Map<KeyScope, List<ResolveTask>> scopes = renames.stream().collect(Collectors.groupingBy(rt -> rt.scope));
final List<ResolveTask> res = new ArrayList<>();
for (final Map.Entry<KeyScope, List<ResolveTask>> group : ... | [
"List",
"<",
"ResolveTask",
">",
"adjustResourceRenames",
"(",
"final",
"List",
"<",
"ResolveTask",
">",
"renames",
")",
"{",
"final",
"Map",
"<",
"KeyScope",
",",
"List",
"<",
"ResolveTask",
">",
">",
"scopes",
"=",
"renames",
".",
"stream",
"(",
")",
"... | Adjust key targets per rewrites | [
"Adjust",
"key",
"targets",
"per",
"rewrites"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L194-L213 |
48,553 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.walkMap | void walkMap(final Element elem, final KeyScope scope, final List<ResolveTask> res) {
List<KeyScope> ss = Collections.singletonList(scope);
if (elem.getAttributeNode(ATTRIBUTE_NAME_KEYSCOPE) != null) {
ss = new ArrayList<>();
for (final String keyscope: elem.getAttribute(ATTRIBUT... | java | void walkMap(final Element elem, final KeyScope scope, final List<ResolveTask> res) {
List<KeyScope> ss = Collections.singletonList(scope);
if (elem.getAttributeNode(ATTRIBUTE_NAME_KEYSCOPE) != null) {
ss = new ArrayList<>();
for (final String keyscope: elem.getAttribute(ATTRIBUT... | [
"void",
"walkMap",
"(",
"final",
"Element",
"elem",
",",
"final",
"KeyScope",
"scope",
",",
"final",
"List",
"<",
"ResolveTask",
">",
"res",
")",
"{",
"List",
"<",
"KeyScope",
">",
"ss",
"=",
"Collections",
".",
"singletonList",
"(",
"scope",
")",
";",
... | Recursively walk map and process topics that have keyrefs. | [
"Recursively",
"walk",
"map",
"and",
"process",
"topics",
"that",
"have",
"keyrefs",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L249-L295 |
48,554 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.processTopic | private ResolveTask processTopic(final FileInfo f, final KeyScope scope, final boolean isResourceOnly) {
final int increment = isResourceOnly ? 0 : 1;
final Integer used = usage.containsKey(f.uri) ? usage.get(f.uri) + increment : increment;
usage.put(f.uri, used);
if (used > 1) {
... | java | private ResolveTask processTopic(final FileInfo f, final KeyScope scope, final boolean isResourceOnly) {
final int increment = isResourceOnly ? 0 : 1;
final Integer used = usage.containsKey(f.uri) ? usage.get(f.uri) + increment : increment;
usage.put(f.uri, used);
if (used > 1) {
... | [
"private",
"ResolveTask",
"processTopic",
"(",
"final",
"FileInfo",
"f",
",",
"final",
"KeyScope",
"scope",
",",
"final",
"boolean",
"isResourceOnly",
")",
"{",
"final",
"int",
"increment",
"=",
"isResourceOnly",
"?",
"0",
":",
"1",
";",
"final",
"Integer",
... | Determine how topic is processed for key reference processing.
@return key reference processing | [
"Determine",
"how",
"topic",
"is",
"processed",
"for",
"key",
"reference",
"processing",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L316-L334 |
48,555 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.processFile | private void processFile(final ResolveTask r) {
final List<XMLFilter> filters = new ArrayList<>();
final ConkeyrefFilter conkeyrefFilter = new ConkeyrefFilter();
conkeyrefFilter.setLogger(logger);
conkeyrefFilter.setJob(job);
conkeyrefFilter.setKeyDefinitions(r.scope);
c... | java | private void processFile(final ResolveTask r) {
final List<XMLFilter> filters = new ArrayList<>();
final ConkeyrefFilter conkeyrefFilter = new ConkeyrefFilter();
conkeyrefFilter.setLogger(logger);
conkeyrefFilter.setJob(job);
conkeyrefFilter.setKeyDefinitions(r.scope);
c... | [
"private",
"void",
"processFile",
"(",
"final",
"ResolveTask",
"r",
")",
"{",
"final",
"List",
"<",
"XMLFilter",
">",
"filters",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"final",
"ConkeyrefFilter",
"conkeyrefFilter",
"=",
"new",
"ConkeyrefFilter",
"(",
... | Process key references in a topic. Topic is stored with a new name if it's
been processed before. | [
"Process",
"key",
"references",
"in",
"a",
"topic",
".",
"Topic",
"is",
"stored",
"with",
"a",
"new",
"name",
"if",
"it",
"s",
"been",
"processed",
"before",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L340-L377 |
48,556 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/KeyrefModule.java | KeyrefModule.writeKeyDefinition | private void writeKeyDefinition(final Map<String, KeyDef> keydefs) {
try {
KeyDef.writeKeydef(new File(job.tempDir, KEYDEF_LIST_FILE), keydefs.values());
} catch (final DITAOTException e) {
logger.error("Failed to write key definition file: " + e.getMessage(), e);
}
} | java | private void writeKeyDefinition(final Map<String, KeyDef> keydefs) {
try {
KeyDef.writeKeydef(new File(job.tempDir, KEYDEF_LIST_FILE), keydefs.values());
} catch (final DITAOTException e) {
logger.error("Failed to write key definition file: " + e.getMessage(), e);
}
} | [
"private",
"void",
"writeKeyDefinition",
"(",
"final",
"Map",
"<",
"String",
",",
"KeyDef",
">",
"keydefs",
")",
"{",
"try",
"{",
"KeyDef",
".",
"writeKeydef",
"(",
"new",
"File",
"(",
"job",
".",
"tempDir",
",",
"KEYDEF_LIST_FILE",
")",
",",
"keydefs",
... | Add key definition to job configuration
@param keydefs key defintions to add | [
"Add",
"key",
"definition",
"to",
"job",
"configuration"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L384-L390 |
48,557 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/ArgumentParser.java | ArgumentParser.getPluginArguments | public synchronized Map<String, Argument> getPluginArguments() {
if (PLUGIN_ARGUMENTS == null) {
final List<Element> params = toList(Plugins.getPluginConfiguration().getElementsByTagName("param"));
PLUGIN_ARGUMENTS = params.stream()
.map(ArgumentParser::getArgument)
... | java | public synchronized Map<String, Argument> getPluginArguments() {
if (PLUGIN_ARGUMENTS == null) {
final List<Element> params = toList(Plugins.getPluginConfiguration().getElementsByTagName("param"));
PLUGIN_ARGUMENTS = params.stream()
.map(ArgumentParser::getArgument)
... | [
"public",
"synchronized",
"Map",
"<",
"String",
",",
"Argument",
">",
"getPluginArguments",
"(",
")",
"{",
"if",
"(",
"PLUGIN_ARGUMENTS",
"==",
"null",
")",
"{",
"final",
"List",
"<",
"Element",
">",
"params",
"=",
"toList",
"(",
"Plugins",
".",
"getPlugin... | Lazy load parameters | [
"Lazy",
"load",
"parameters"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/ArgumentParser.java#L84-L95 |
48,558 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/ArgumentParser.java | ArgumentParser.handleArgDefine | private Map<String, Object> handleArgDefine(final String arg, final Deque<String> args) {
/*
* Interestingly enough, we get to here when a user uses -Dname=value.
* However, in some cases, the OS goes ahead and parses this out to args
* {"-Dname", "value"} so instead of parsing on "="... | java | private Map<String, Object> handleArgDefine(final String arg, final Deque<String> args) {
/*
* Interestingly enough, we get to here when a user uses -Dname=value.
* However, in some cases, the OS goes ahead and parses this out to args
* {"-Dname", "value"} so instead of parsing on "="... | [
"private",
"Map",
"<",
"String",
",",
"Object",
">",
"handleArgDefine",
"(",
"final",
"String",
"arg",
",",
"final",
"Deque",
"<",
"String",
">",
"args",
")",
"{",
"/*\n * Interestingly enough, we get to here when a user uses -Dname=value.\n * However, in so... | Handler -D argument | [
"Handler",
"-",
"D",
"argument"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/ArgumentParser.java#L451-L470 |
48,559 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/ArgumentParser.java | ArgumentParser.handleArgInput | private void handleArgInput(final String arg, final Deque<String> args, final Argument argument) {
final Map.Entry<String, String> entry = parse(arg, args);
if (entry.getValue() == null) {
throw new BuildException("Missing value for input " + entry.getKey());
}
inputs.add(arg... | java | private void handleArgInput(final String arg, final Deque<String> args, final Argument argument) {
final Map.Entry<String, String> entry = parse(arg, args);
if (entry.getValue() == null) {
throw new BuildException("Missing value for input " + entry.getKey());
}
inputs.add(arg... | [
"private",
"void",
"handleArgInput",
"(",
"final",
"String",
"arg",
",",
"final",
"Deque",
"<",
"String",
">",
"args",
",",
"final",
"Argument",
"argument",
")",
"{",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
"=",
"parse",... | Handler input argument | [
"Handler",
"input",
"argument"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/ArgumentParser.java#L488-L494 |
48,560 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/ArgumentParser.java | ArgumentParser.handleParameterArg | private Map<String, Object> handleParameterArg(final String arg, final Deque<String> args, final Argument argument) {
final Map.Entry<String, String> entry = parse(arg, args);
if (entry.getValue() == null) {
throw new BuildException("Missing value for property " + entry.getKey());
}
... | java | private Map<String, Object> handleParameterArg(final String arg, final Deque<String> args, final Argument argument) {
final Map.Entry<String, String> entry = parse(arg, args);
if (entry.getValue() == null) {
throw new BuildException("Missing value for property " + entry.getKey());
}
... | [
"private",
"Map",
"<",
"String",
",",
"Object",
">",
"handleParameterArg",
"(",
"final",
"String",
"arg",
",",
"final",
"Deque",
"<",
"String",
">",
"args",
",",
"final",
"Argument",
"argument",
")",
"{",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",... | Handler parameter argument | [
"Handler",
"parameter",
"argument"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/ArgumentParser.java#L499-L505 |
48,561 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/ArgumentParser.java | ArgumentParser.getArgumentName | private String getArgumentName(final String arg) {
int pos = arg.indexOf("=");
if (pos == -1) {
pos = arg.indexOf(":");
}
return arg.substring(0, pos != -1 ? pos : arg.length());
} | java | private String getArgumentName(final String arg) {
int pos = arg.indexOf("=");
if (pos == -1) {
pos = arg.indexOf(":");
}
return arg.substring(0, pos != -1 ? pos : arg.length());
} | [
"private",
"String",
"getArgumentName",
"(",
"final",
"String",
"arg",
")",
"{",
"int",
"pos",
"=",
"arg",
".",
"indexOf",
"(",
"\"=\"",
")",
";",
"if",
"(",
"pos",
"==",
"-",
"1",
")",
"{",
"pos",
"=",
"arg",
".",
"indexOf",
"(",
"\":\"",
")",
"... | Get argument name | [
"Get",
"argument",
"name"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/ArgumentParser.java#L510-L516 |
48,562 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/ExportAnchorsFilter.java | ExportAnchorsFilter.setCurrentFile | public void setCurrentFile(final URI currentFile) {
assert currentFile.isAbsolute();
super.setCurrentFile(currentFile);
currentDir = currentFile.resolve(".");
} | java | public void setCurrentFile(final URI currentFile) {
assert currentFile.isAbsolute();
super.setCurrentFile(currentFile);
currentDir = currentFile.resolve(".");
} | [
"public",
"void",
"setCurrentFile",
"(",
"final",
"URI",
"currentFile",
")",
"{",
"assert",
"currentFile",
".",
"isAbsolute",
"(",
")",
";",
"super",
".",
"setCurrentFile",
"(",
"currentFile",
")",
";",
"currentDir",
"=",
"currentFile",
".",
"resolve",
"(",
... | Set current file absolute path
@param currentFile absolute path to current file | [
"Set",
"current",
"file",
"absolute",
"path"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ExportAnchorsFilter.java#L68-L72 |
48,563 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/ExportAnchorsFilter.java | ExportAnchorsFilter.parseAttribute | private void parseAttribute(final Attributes atts) {
final URI attrValue = toURI(atts.getValue(ATTRIBUTE_NAME_HREF));
if (attrValue == null) {
return;
}
final String attrScope = atts.getValue(ATTRIBUTE_NAME_SCOPE);
if (isExternal(attrValue, attrScope)) {
... | java | private void parseAttribute(final Attributes atts) {
final URI attrValue = toURI(atts.getValue(ATTRIBUTE_NAME_HREF));
if (attrValue == null) {
return;
}
final String attrScope = atts.getValue(ATTRIBUTE_NAME_SCOPE);
if (isExternal(attrValue, attrScope)) {
... | [
"private",
"void",
"parseAttribute",
"(",
"final",
"Attributes",
"atts",
")",
"{",
"final",
"URI",
"attrValue",
"=",
"toURI",
"(",
"atts",
".",
"getValue",
"(",
"ATTRIBUTE_NAME_HREF",
")",
")",
";",
"if",
"(",
"attrValue",
"==",
"null",
")",
"{",
"return",... | Parse the href attribute for needed information.
@param atts attributes to process | [
"Parse",
"the",
"href",
"attribute",
"for",
"needed",
"information",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ExportAnchorsFilter.java#L164-L191 |
48,564 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.processParseResult | private void processParseResult(final URI currentFile) {
// Category non-copyto result and update uplevels accordingly
for (final Reference file: listFilter.getNonCopytoResult()) {
categorizeReferenceFile(file);
updateUplevels(file.filename);
}
for (final Map.Entr... | java | private void processParseResult(final URI currentFile) {
// Category non-copyto result and update uplevels accordingly
for (final Reference file: listFilter.getNonCopytoResult()) {
categorizeReferenceFile(file);
updateUplevels(file.filename);
}
for (final Map.Entr... | [
"private",
"void",
"processParseResult",
"(",
"final",
"URI",
"currentFile",
")",
"{",
"// Category non-copyto result and update uplevels accordingly",
"for",
"(",
"final",
"Reference",
"file",
":",
"listFilter",
".",
"getNonCopytoResult",
"(",
")",
")",
"{",
"categoriz... | Process results from parsing a single topic or map
@param currentFile absolute URI processes files | [
"Process",
"results",
"from",
"parsing",
"a",
"single",
"topic",
"or",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L459-L509 |
48,565 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.categorizeReferenceFile | private void categorizeReferenceFile(final Reference file) {
// avoid files referred by coderef being added into wait list
if (listFilter.getCoderefTargets().contains(file.filename)) {
return;
}
if (isFormatDita(file.format) && listFilter.isDitaTopic() &&
!job... | java | private void categorizeReferenceFile(final Reference file) {
// avoid files referred by coderef being added into wait list
if (listFilter.getCoderefTargets().contains(file.filename)) {
return;
}
if (isFormatDita(file.format) && listFilter.isDitaTopic() &&
!job... | [
"private",
"void",
"categorizeReferenceFile",
"(",
"final",
"Reference",
"file",
")",
"{",
"// avoid files referred by coderef being added into wait list",
"if",
"(",
"listFilter",
".",
"getCoderefTargets",
"(",
")",
".",
"contains",
"(",
"file",
".",
"filename",
")",
... | Categorize file.
@param file file system path with optional format | [
"Categorize",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L556-L577 |
48,566 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.getLevelsPath | private String getLevelsPath(final URI rootTemp) {
final int u = rootTemp.toString().split(URI_SEPARATOR).length - 1;
if (u == 0) {
return "";
}
final StringBuilder buff = new StringBuilder();
for (int current = u; current > 0; current--) {
buff.append("..... | java | private String getLevelsPath(final URI rootTemp) {
final int u = rootTemp.toString().split(URI_SEPARATOR).length - 1;
if (u == 0) {
return "";
}
final StringBuilder buff = new StringBuilder();
for (int current = u; current > 0; current--) {
buff.append("..... | [
"private",
"String",
"getLevelsPath",
"(",
"final",
"URI",
"rootTemp",
")",
"{",
"final",
"int",
"u",
"=",
"rootTemp",
".",
"toString",
"(",
")",
".",
"split",
"(",
"URI_SEPARATOR",
")",
".",
"length",
"-",
"1",
";",
"if",
"(",
"u",
"==",
"0",
")",
... | Get up-levels absolute path.
@param rootTemp relative URI for temporary root file
@return path to up-level, e.g. {@code ../../}, may be empty string | [
"Get",
"up",
"-",
"levels",
"absolute",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L630-L640 |
48,567 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.filterConflictingCopyTo | private Map<URI, URI> filterConflictingCopyTo( final Map<URI, URI> copyTo, final Collection<FileInfo> fileInfos) {
final Set<URI> fileinfoTargets = fileInfos.stream()
.filter(fi -> fi.src.equals(fi.result))
.map(fi -> fi.result)
.collect(Collectors.toSet());
... | java | private Map<URI, URI> filterConflictingCopyTo( final Map<URI, URI> copyTo, final Collection<FileInfo> fileInfos) {
final Set<URI> fileinfoTargets = fileInfos.stream()
.filter(fi -> fi.src.equals(fi.result))
.map(fi -> fi.result)
.collect(Collectors.toSet());
... | [
"private",
"Map",
"<",
"URI",
",",
"URI",
">",
"filterConflictingCopyTo",
"(",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"copyTo",
",",
"final",
"Collection",
"<",
"FileInfo",
">",
"fileInfos",
")",
"{",
"final",
"Set",
"<",
"URI",
">",
"fileinfoTarge... | Filter copy-to where target is used directly. | [
"Filter",
"copy",
"-",
"to",
"where",
"target",
"is",
"used",
"directly",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L849-L857 |
48,568 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.writeListFile | private void writeListFile(final File inputfile, final String relativeRootFile) {
try (Writer bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(inputfile)))) {
bufferedWriter.write(relativeRootFile);
bufferedWriter.flush();
} catch (final IOException... | java | private void writeListFile(final File inputfile, final String relativeRootFile) {
try (Writer bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(inputfile)))) {
bufferedWriter.write(relativeRootFile);
bufferedWriter.flush();
} catch (final IOException... | [
"private",
"void",
"writeListFile",
"(",
"final",
"File",
"inputfile",
",",
"final",
"String",
"relativeRootFile",
")",
"{",
"try",
"(",
"Writer",
"bufferedWriter",
"=",
"new",
"BufferedWriter",
"(",
"new",
"OutputStreamWriter",
"(",
"new",
"FileOutputStream",
"("... | Write list file.
@param inputfile output list file
@param relativeRootFile list value | [
"Write",
"list",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L864-L871 |
48,569 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.getPrefix | private String getPrefix(final File relativeRootFile) {
String res;
final File p = relativeRootFile.getParentFile();
if (p != null) {
res = p.toString() + File.separator;
} else {
res = "";
}
return res;
} | java | private String getPrefix(final File relativeRootFile) {
String res;
final File p = relativeRootFile.getParentFile();
if (p != null) {
res = p.toString() + File.separator;
} else {
res = "";
}
return res;
} | [
"private",
"String",
"getPrefix",
"(",
"final",
"File",
"relativeRootFile",
")",
"{",
"String",
"res",
";",
"final",
"File",
"p",
"=",
"relativeRootFile",
".",
"getParentFile",
"(",
")",
";",
"if",
"(",
"p",
"!=",
"null",
")",
"{",
"res",
"=",
"p",
"."... | Prefix path.
@param relativeRootFile relative path for root temporary file
@return either an empty string or a path which ends in {@link java.io.File#separator File.separator} | [
"Prefix",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L879-L888 |
48,570 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.addMapFilePrefix | private Map<URI, Set<URI>> addMapFilePrefix(final Map<URI, Set<URI>> map) {
final Map<URI, Set<URI>> res = new HashMap<>();
for (final Map.Entry<URI, Set<URI>> e: map.entrySet()) {
final URI key = e.getKey();
final Set<URI> newSet = new HashSet<>(e.getValue().size());
... | java | private Map<URI, Set<URI>> addMapFilePrefix(final Map<URI, Set<URI>> map) {
final Map<URI, Set<URI>> res = new HashMap<>();
for (final Map.Entry<URI, Set<URI>> e: map.entrySet()) {
final URI key = e.getKey();
final Set<URI> newSet = new HashSet<>(e.getValue().size());
... | [
"private",
"Map",
"<",
"URI",
",",
"Set",
"<",
"URI",
">",
">",
"addMapFilePrefix",
"(",
"final",
"Map",
"<",
"URI",
",",
"Set",
"<",
"URI",
">",
">",
"map",
")",
"{",
"final",
"Map",
"<",
"URI",
",",
"Set",
"<",
"URI",
">",
">",
"res",
"=",
... | Convert absolute paths to relative temporary directory paths
@return map with relative keys and values | [
"Convert",
"absolute",
"paths",
"to",
"relative",
"temporary",
"directory",
"paths"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L909-L920 |
48,571 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.addFilePrefix | private Map<URI, URI> addFilePrefix(final Map<URI, URI> set) {
final Map<URI, URI> newSet = new HashMap<>();
for (final Map.Entry<URI, URI> file: set.entrySet()) {
final URI key = tempFileNameScheme.generateTempFileName(file.getKey());
final URI value = tempFileNameScheme.generat... | java | private Map<URI, URI> addFilePrefix(final Map<URI, URI> set) {
final Map<URI, URI> newSet = new HashMap<>();
for (final Map.Entry<URI, URI> file: set.entrySet()) {
final URI key = tempFileNameScheme.generateTempFileName(file.getKey());
final URI value = tempFileNameScheme.generat... | [
"private",
"Map",
"<",
"URI",
",",
"URI",
">",
"addFilePrefix",
"(",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"set",
")",
"{",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"newSet",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"f... | Add file prefix. For absolute paths the prefix is not added.
@param set file paths
@return file paths with prefix | [
"Add",
"file",
"prefix",
".",
"For",
"absolute",
"paths",
"the",
"prefix",
"is",
"not",
"added",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L928-L936 |
48,572 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java | GenMapAndTopicListModule.addFlagImagesSetToProperties | private void addFlagImagesSetToProperties(final Job prop, final Set<URI> set) {
final Set<URI> newSet = new LinkedHashSet<>(128);
for (final URI file: set) {
// assert file.isAbsolute();
if (file.isAbsolute()) {
// no need to append relative path before absolute pa... | java | private void addFlagImagesSetToProperties(final Job prop, final Set<URI> set) {
final Set<URI> newSet = new LinkedHashSet<>(128);
for (final URI file: set) {
// assert file.isAbsolute();
if (file.isAbsolute()) {
// no need to append relative path before absolute pa... | [
"private",
"void",
"addFlagImagesSetToProperties",
"(",
"final",
"Job",
"prop",
",",
"final",
"Set",
"<",
"URI",
">",
"set",
")",
"{",
"final",
"Set",
"<",
"URI",
">",
"newSet",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
"128",
")",
";",
"for",
"(",
"fina... | add FlagImangesSet to Properties, which needn't to change the dir level,
just ouput to the ouput dir.
@param prop job configuration
@param set absolute flag image files | [
"add",
"FlagImangesSet",
"to",
"Properties",
"which",
"needn",
"t",
"to",
"change",
"the",
"dir",
"level",
"just",
"ouput",
"to",
"the",
"ouput",
"dir",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/GenMapAndTopicListModule.java#L954-L986 |
48,573 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/SourceReaderModule.java | SourceReaderModule.getXmlReader | XMLReader getXmlReader(final String format) throws SAXException {
if (format == null || format.equals(ATTR_FORMAT_VALUE_DITA)) {
return reader;
}
for (final Map.Entry<String, String> e : parserMap.entrySet()) {
if (format.equals(e.getKey())) {
try {
... | java | XMLReader getXmlReader(final String format) throws SAXException {
if (format == null || format.equals(ATTR_FORMAT_VALUE_DITA)) {
return reader;
}
for (final Map.Entry<String, String> e : parserMap.entrySet()) {
if (format.equals(e.getKey())) {
try {
... | [
"XMLReader",
"getXmlReader",
"(",
"final",
"String",
"format",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"format",
"==",
"null",
"||",
"format",
".",
"equals",
"(",
"ATTR_FORMAT_VALUE_DITA",
")",
")",
"{",
"return",
"reader",
";",
"}",
"for",
"(",
"fi... | Get reader for input format
@param format input document format
@return reader for given format
@throws SAXException if creating reader failed | [
"Get",
"reader",
"for",
"input",
"format"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/SourceReaderModule.java#L60-L84 |
48,574 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/SourceReaderModule.java | SourceReaderModule.initXmlReader | void initXmlReader() throws SAXException {
if (parserMap.containsKey(ATTR_FORMAT_VALUE_DITA)) {
reader = XMLReaderFactory.createXMLReader(parserMap.get(ATTR_FORMAT_VALUE_DITA));
final Map<String, Boolean> features = parserFeatures.getOrDefault(ATTR_FORMAT_VALUE_DITA, emptyMap());
... | java | void initXmlReader() throws SAXException {
if (parserMap.containsKey(ATTR_FORMAT_VALUE_DITA)) {
reader = XMLReaderFactory.createXMLReader(parserMap.get(ATTR_FORMAT_VALUE_DITA));
final Map<String, Boolean> features = parserFeatures.getOrDefault(ATTR_FORMAT_VALUE_DITA, emptyMap());
... | [
"void",
"initXmlReader",
"(",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"parserMap",
".",
"containsKey",
"(",
"ATTR_FORMAT_VALUE_DITA",
")",
")",
"{",
"reader",
"=",
"XMLReaderFactory",
".",
"createXMLReader",
"(",
"parserMap",
".",
"get",
"(",
"ATTR_FORMAT... | XML reader used for pipeline parsing DITA documents.
@throws SAXException if parser configuration failed | [
"XML",
"reader",
"used",
"for",
"pipeline",
"parsing",
"DITA",
"documents",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/SourceReaderModule.java#L91-L129 |
48,575 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/PluginParser.java | PluginParser.migrate | private Element migrate(Element root) {
if (root.getAttributeNode(PLUGIN_VERSION_ATTR) == null) {
final List<Element> features = toList(root.getElementsByTagName(FEATURE_ELEM));
final String version = features.stream()
.filter(elem -> elem.getAttribute(FEATURE_ID_ATTR... | java | private Element migrate(Element root) {
if (root.getAttributeNode(PLUGIN_VERSION_ATTR) == null) {
final List<Element> features = toList(root.getElementsByTagName(FEATURE_ELEM));
final String version = features.stream()
.filter(elem -> elem.getAttribute(FEATURE_ID_ATTR... | [
"private",
"Element",
"migrate",
"(",
"Element",
"root",
")",
"{",
"if",
"(",
"root",
".",
"getAttributeNode",
"(",
"PLUGIN_VERSION_ATTR",
")",
"==",
"null",
")",
"{",
"final",
"List",
"<",
"Element",
">",
"features",
"=",
"toList",
"(",
"root",
".",
"ge... | Migrate from deprecated plugin format to new format | [
"Migrate",
"from",
"deprecated",
"plugin",
"format",
"to",
"new",
"format"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/PluginParser.java#L128-L139 |
48,576 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/PluginParser.java | PluginParser.addExtensionPoint | private void addExtensionPoint(final Element elem) {
final String id = elem.getAttribute(EXTENSION_POINT_ID_ATTR);
if (id == null) {
throw new IllegalArgumentException(EXTENSION_POINT_ID_ATTR + " attribute not set on extension-point");
}
final String name = elem.getAttribute(... | java | private void addExtensionPoint(final Element elem) {
final String id = elem.getAttribute(EXTENSION_POINT_ID_ATTR);
if (id == null) {
throw new IllegalArgumentException(EXTENSION_POINT_ID_ATTR + " attribute not set on extension-point");
}
final String name = elem.getAttribute(... | [
"private",
"void",
"addExtensionPoint",
"(",
"final",
"Element",
"elem",
")",
"{",
"final",
"String",
"id",
"=",
"elem",
".",
"getAttribute",
"(",
"EXTENSION_POINT_ID_ATTR",
")",
";",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentE... | Add extension point.
@param elem extension point element attributes
@throws IllegalArgumentException if extension ID is {@code null} | [
"Add",
"extension",
"point",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/PluginParser.java#L158-L165 |
48,577 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/DitaLinksWriter.java | DitaLinksWriter.domToSax | private void domToSax(final Node root) throws SAXException {
try {
final Result result = new SAXResult(new FilterHandler(getContentHandler()));
final NodeList children = root.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node links = ... | java | private void domToSax(final Node root) throws SAXException {
try {
final Result result = new SAXResult(new FilterHandler(getContentHandler()));
final NodeList children = root.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node links = ... | [
"private",
"void",
"domToSax",
"(",
"final",
"Node",
"root",
")",
"throws",
"SAXException",
"{",
"try",
"{",
"final",
"Result",
"result",
"=",
"new",
"SAXResult",
"(",
"new",
"FilterHandler",
"(",
"getContentHandler",
"(",
")",
")",
")",
";",
"final",
"Nod... | DOM to SAX conversion methods | [
"DOM",
"to",
"SAX",
"conversion",
"methods"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/DitaLinksWriter.java#L161-L173 |
48,578 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java | RelaxNGDefaultsComponent.onStartElement | private void onStartElement(QName name, XMLAttributes atts) {
if (detecting) {
detecting = false;
loadDefaults();
}
if (defaults != null) {
checkAndAddDefaults(name, atts);
}
} | java | private void onStartElement(QName name, XMLAttributes atts) {
if (detecting) {
detecting = false;
loadDefaults();
}
if (defaults != null) {
checkAndAddDefaults(name, atts);
}
} | [
"private",
"void",
"onStartElement",
"(",
"QName",
"name",
",",
"XMLAttributes",
"atts",
")",
"{",
"if",
"(",
"detecting",
")",
"{",
"detecting",
"=",
"false",
";",
"loadDefaults",
"(",
")",
";",
"}",
"if",
"(",
"defaults",
"!=",
"null",
")",
"{",
"che... | On start element
@param name The element name
@param atts The attributes | [
"On",
"start",
"element"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java#L220-L228 |
48,579 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java | RelaxNGDefaultsComponent.nullOrValue | private boolean nullOrValue(String test, String value) {
if (test == null)
return true;
if (test.equals(value))
return true;
return false;
} | java | private boolean nullOrValue(String test, String value) {
if (test == null)
return true;
if (test.equals(value))
return true;
return false;
} | [
"private",
"boolean",
"nullOrValue",
"(",
"String",
"test",
",",
"String",
"value",
")",
"{",
"if",
"(",
"test",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"test",
".",
"equals",
"(",
"value",
")",
")",
"return",
"true",
";",
"return",
"fal... | Test if a string is either null or equal to a certain value
@param test The string to test
@param value The value to compare to
@return <code>true</code> if a string is either null or equal to a certain value | [
"Test",
"if",
"a",
"string",
"is",
"either",
"null",
"or",
"equal",
"to",
"a",
"certain",
"value"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java#L489-L495 |
48,580 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java | RelaxNGDefaultsComponent.getFromPIDataPseudoAttribute | private String getFromPIDataPseudoAttribute(String data, String name,
boolean unescapeValue) {
int pos = 0;
while (pos <= data.length() - 4) { // minimum length of x=""
int nextQuote = -1;
for (int q = pos; q < data.length(); q++) {
if (data.charAt(q) == '"' || data.charAt(q) == '\'') ... | java | private String getFromPIDataPseudoAttribute(String data, String name,
boolean unescapeValue) {
int pos = 0;
while (pos <= data.length() - 4) { // minimum length of x=""
int nextQuote = -1;
for (int q = pos; q < data.length(); q++) {
if (data.charAt(q) == '"' || data.charAt(q) == '\'') ... | [
"private",
"String",
"getFromPIDataPseudoAttribute",
"(",
"String",
"data",
",",
"String",
"name",
",",
"boolean",
"unescapeValue",
")",
"{",
"int",
"pos",
"=",
"0",
";",
"while",
"(",
"pos",
"<=",
"data",
".",
"length",
"(",
")",
"-",
"4",
")",
"{",
"... | This method is copied from com.icl.saxon.ProcInstParser and used in the
PIFinder.
Get a pseudo-attribute. This is useful only if the processing instruction
data part uses pseudo-attribute syntax, which it does not have to. This
syntax is as described in the W3C Recommendation
"Associating Style Sheets with XML Documen... | [
"This",
"method",
"is",
"copied",
"from",
"com",
".",
"icl",
".",
"saxon",
".",
"ProcInstParser",
"and",
"used",
"in",
"the",
"PIFinder",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java#L514-L556 |
48,581 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java | RelaxNGDefaultsComponent.unescape | private String unescape(String value) {
if (value.indexOf('&') < 0) {
return value;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
if (c == '&') {
if (i + 2 < value.length() && value.charAt(i + 1) == '#') {
... | java | private String unescape(String value) {
if (value.indexOf('&') < 0) {
return value;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
if (c == '&') {
if (i + 2 < value.length() && value.charAt(i + 1) == '#') {
... | [
"private",
"String",
"unescape",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"value",
".",
"indexOf",
"(",
"'",
"'",
")",
"<",
"0",
")",
"{",
"return",
"value",
";",
"}",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(... | This method is copied from com.icl.saxon.ProcInstParser and used in the
PIFinder
Interpret character references and built-in entity references | [
"This",
"method",
"is",
"copied",
"from",
"com",
".",
"icl",
".",
"saxon",
".",
"ProcInstParser",
"and",
"used",
"in",
"the",
"PIFinder"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java#L564-L629 |
48,582 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java | RelaxNGDefaultsComponent.setProperty | public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
// Xerces properties
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length()
- Constants.XERCES_PROPERTY_PREFIX.length();
if (suffixLength... | java | public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
// Xerces properties
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length()
- Constants.XERCES_PROPERTY_PREFIX.length();
if (suffixLength... | [
"public",
"void",
"setProperty",
"(",
"String",
"propertyId",
",",
"Object",
"value",
")",
"throws",
"XMLConfigurationException",
"{",
"// Xerces properties",
"if",
"(",
"propertyId",
".",
"startsWith",
"(",
"Constants",
".",
"XERCES_PROPERTY_PREFIX",
")",
")",
"{",... | Sets the value of a property during parsing. | [
"Sets",
"the",
"value",
"of",
"a",
"property",
"during",
"parsing",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxNGDefaultsComponent.java#L786-L802 |
48,583 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.write | @Override
public void write(final File filename) throws DITAOTException {
assert filename.isAbsolute();
super.write(new File(currentFile));
} | java | @Override
public void write(final File filename) throws DITAOTException {
assert filename.isAbsolute();
super.write(new File(currentFile));
} | [
"@",
"Override",
"public",
"void",
"write",
"(",
"final",
"File",
"filename",
")",
"throws",
"DITAOTException",
"{",
"assert",
"filename",
".",
"isAbsolute",
"(",
")",
";",
"super",
".",
"write",
"(",
"new",
"File",
"(",
"currentFile",
")",
")",
";",
"}"... | Process key references.
@param filename file to process
@throws DITAOTException if key reference resolution failed | [
"Process",
"key",
"references",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L211-L215 |
48,584 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.writeAlt | private void writeAlt(Element srcElem) throws SAXException {
final AttributesImpl atts = new AttributesImpl();
XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_CLASS, TOPIC_ALT.toString());
getContentHandler().startElement(NULL_NS_URI, TOPIC_ALT.localName, TOPIC_ALT.localName, atts);
domT... | java | private void writeAlt(Element srcElem) throws SAXException {
final AttributesImpl atts = new AttributesImpl();
XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_CLASS, TOPIC_ALT.toString());
getContentHandler().startElement(NULL_NS_URI, TOPIC_ALT.localName, TOPIC_ALT.localName, atts);
domT... | [
"private",
"void",
"writeAlt",
"(",
"Element",
"srcElem",
")",
"throws",
"SAXException",
"{",
"final",
"AttributesImpl",
"atts",
"=",
"new",
"AttributesImpl",
"(",
")",
";",
"XMLUtils",
".",
"addOrSetAttribute",
"(",
"atts",
",",
"ATTRIBUTE_NAME_CLASS",
",",
"TO... | Write alt element
@param srcElem element content | [
"Write",
"alt",
"element"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L428-L434 |
48,585 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.fallbackToNavtitleOrHref | private boolean fallbackToNavtitleOrHref(final Element elem) {
final String hrefValue = elem.getAttribute(ATTRIBUTE_NAME_HREF);
final String locktitleValue = elem.getAttribute(ATTRIBUTE_NAME_LOCKTITLE);
return ((ATTRIBUTE_NAME_LOCKTITLE_VALUE_YES.equals(locktitleValue)) ||
("".eq... | java | private boolean fallbackToNavtitleOrHref(final Element elem) {
final String hrefValue = elem.getAttribute(ATTRIBUTE_NAME_HREF);
final String locktitleValue = elem.getAttribute(ATTRIBUTE_NAME_LOCKTITLE);
return ((ATTRIBUTE_NAME_LOCKTITLE_VALUE_YES.equals(locktitleValue)) ||
("".eq... | [
"private",
"boolean",
"fallbackToNavtitleOrHref",
"(",
"final",
"Element",
"elem",
")",
"{",
"final",
"String",
"hrefValue",
"=",
"elem",
".",
"getAttribute",
"(",
"ATTRIBUTE_NAME_HREF",
")",
";",
"final",
"String",
"locktitleValue",
"=",
"elem",
".",
"getAttribut... | Return true when keyref text resolution should use navtitle as a final fallback.
@param elem Key definition element | [
"Return",
"true",
"when",
"keyref",
"text",
"resolution",
"should",
"use",
"navtitle",
"as",
"a",
"final",
"fallback",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L656-L662 |
48,586 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.domToSax | private void domToSax(final Element elem, final boolean retainElements, final boolean swapMapClass) throws SAXException {
if (retainElements) {
final AttributesImpl atts = new AttributesImpl();
final NamedNodeMap attrs = elem.getAttributes();
for (int i = 0; i < attrs.getLeng... | java | private void domToSax(final Element elem, final boolean retainElements, final boolean swapMapClass) throws SAXException {
if (retainElements) {
final AttributesImpl atts = new AttributesImpl();
final NamedNodeMap attrs = elem.getAttributes();
for (int i = 0; i < attrs.getLeng... | [
"private",
"void",
"domToSax",
"(",
"final",
"Element",
"elem",
",",
"final",
"boolean",
"retainElements",
",",
"final",
"boolean",
"swapMapClass",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"retainElements",
")",
"{",
"final",
"AttributesImpl",
"atts",
"=",... | Serialize DOM node into a SAX stream.
@param elem element to serialize
@param retainElements {@code true} to serialize elements, {@code false} to only serialize text nodes.
@param swapMapClass {@code true} to change map/ to topic/ in common class attributes, {@code false} to leave as is | [
"Serialize",
"DOM",
"node",
"into",
"a",
"SAX",
"stream",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L681-L714 |
48,587 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.changeclassValue | private String changeclassValue(final String classValue) {
final DitaClass cls = new DitaClass(classValue);
if (cls.equals(MAP_LINKTEXT)) {
return TOPIC_LINKTEXT.toString();
} else if (cls.equals(MAP_SEARCHTITLE)) {
return TOPIC_SEARCHTITLE.toString();
} else if (... | java | private String changeclassValue(final String classValue) {
final DitaClass cls = new DitaClass(classValue);
if (cls.equals(MAP_LINKTEXT)) {
return TOPIC_LINKTEXT.toString();
} else if (cls.equals(MAP_SEARCHTITLE)) {
return TOPIC_SEARCHTITLE.toString();
} else if (... | [
"private",
"String",
"changeclassValue",
"(",
"final",
"String",
"classValue",
")",
"{",
"final",
"DitaClass",
"cls",
"=",
"new",
"DitaClass",
"(",
"classValue",
")",
";",
"if",
"(",
"cls",
".",
"equals",
"(",
"MAP_LINKTEXT",
")",
")",
"{",
"return",
"TOPI... | Change map type to topic type. | [
"Change",
"map",
"type",
"to",
"topic",
"type",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L719-L730 |
48,588 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.normalizeHrefValue | private static URI normalizeHrefValue(final URI keyName, final String tail) {
if (keyName.getFragment() == null) {
return toURI(keyName + tail.replaceAll(SLASH, SHARP));
}
return toURI(keyName + tail);
} | java | private static URI normalizeHrefValue(final URI keyName, final String tail) {
if (keyName.getFragment() == null) {
return toURI(keyName + tail.replaceAll(SLASH, SHARP));
}
return toURI(keyName + tail);
} | [
"private",
"static",
"URI",
"normalizeHrefValue",
"(",
"final",
"URI",
"keyName",
",",
"final",
"String",
"tail",
")",
"{",
"if",
"(",
"keyName",
".",
"getFragment",
"(",
")",
"==",
"null",
")",
"{",
"return",
"toURI",
"(",
"keyName",
"+",
"tail",
".",
... | change elementId into topicId if there is no topicId in key definition. | [
"change",
"elementId",
"into",
"topicId",
"if",
"there",
"is",
"no",
"topicId",
"in",
"key",
"definition",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L735-L740 |
48,589 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/KeyrefPaser.java | KeyrefPaser.normalizeHrefValue | private static URI normalizeHrefValue(final URI fileName, final String tail, final String topicId) {
//Insert first topic id only when topicid is not set in keydef
//and keyref has elementid
if (fileName.getFragment() == null && !"".equals(tail)) {
return setFragment(fileName, topicI... | java | private static URI normalizeHrefValue(final URI fileName, final String tail, final String topicId) {
//Insert first topic id only when topicid is not set in keydef
//and keyref has elementid
if (fileName.getFragment() == null && !"".equals(tail)) {
return setFragment(fileName, topicI... | [
"private",
"static",
"URI",
"normalizeHrefValue",
"(",
"final",
"URI",
"fileName",
",",
"final",
"String",
"tail",
",",
"final",
"String",
"topicId",
")",
"{",
"//Insert first topic id only when topicid is not set in keydef",
"//and keyref has elementid",
"if",
"(",
"file... | Insert topic id into href | [
"Insert",
"topic",
"id",
"into",
"href"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L752-L759 |
48,590 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/CoderefResolver.java | CoderefResolver.getRange | private Range getRange(final URI uri) {
int start = 0;
int end = Integer.MAX_VALUE;
String startId = null;
String endId = null;
final String fragment = uri.getFragment();
if (fragment != null) {
// RFC 5147
final Matcher m = Pattern.compile("^line... | java | private Range getRange(final URI uri) {
int start = 0;
int end = Integer.MAX_VALUE;
String startId = null;
String endId = null;
final String fragment = uri.getFragment();
if (fragment != null) {
// RFC 5147
final Matcher m = Pattern.compile("^line... | [
"private",
"Range",
"getRange",
"(",
"final",
"URI",
"uri",
")",
"{",
"int",
"start",
"=",
"0",
";",
"int",
"end",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"String",
"startId",
"=",
"null",
";",
"String",
"endId",
"=",
"null",
";",
"final",
"String",
"... | Factory method for Range implementation | [
"Factory",
"method",
"for",
"Range",
"implementation"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/CoderefResolver.java#L150-L197 |
48,591 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/CoderefResolver.java | CoderefResolver.getCharset | private Charset getCharset(final String value) {
Charset c = null;
if (value != null) {
final String[] tokens = value.trim().split("[;=]");
if (tokens.length >= 3 && tokens[1].trim().equals("charset")) {
try {
c = Charset.forName(tokens[2].trim... | java | private Charset getCharset(final String value) {
Charset c = null;
if (value != null) {
final String[] tokens = value.trim().split("[;=]");
if (tokens.length >= 3 && tokens[1].trim().equals("charset")) {
try {
c = Charset.forName(tokens[2].trim... | [
"private",
"Charset",
"getCharset",
"(",
"final",
"String",
"value",
")",
"{",
"Charset",
"c",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"final",
"String",
"[",
"]",
"tokens",
"=",
"value",
".",
"trim",
"(",
")",
".",
"split",
"... | Get code file charset.
@param value format attribute value, may be {@code null}
@return charset if set, otherwise default charset | [
"Get",
"code",
"file",
"charset",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/CoderefResolver.java#L311-L332 |
48,592 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FilterUtils.java | FilterUtils.needExclude | public boolean needExclude(final Attributes atts, final QName[][] extProps) {
if (filterMap.isEmpty()) {
return false;
}
for (final QName attr: filterAttributes) {
final String value = atts.getValue(attr.getNamespaceURI(), attr.getLocalPart());
if (value != n... | java | public boolean needExclude(final Attributes atts, final QName[][] extProps) {
if (filterMap.isEmpty()) {
return false;
}
for (final QName attr: filterAttributes) {
final String value = atts.getValue(attr.getNamespaceURI(), attr.getLocalPart());
if (value != n... | [
"public",
"boolean",
"needExclude",
"(",
"final",
"Attributes",
"atts",
",",
"final",
"QName",
"[",
"]",
"[",
"]",
"extProps",
")",
"{",
"if",
"(",
"filterMap",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"final",
"QN... | Check if the given Attributes need to be excluded.
@param atts attributes
@param extProps {@code props} attribute specializations
@return {@code true} if any profiling attribute was excluded, otherwise {@code false} | [
"Check",
"if",
"the",
"given",
"Attributes",
"need",
"to",
"be",
"excluded",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FilterUtils.java#L289-L327 |
48,593 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FilterUtils.java | FilterUtils.getLabelValue | private String getLabelValue(final QName propName, final String attrPropsValue) {
if (attrPropsValue != null) {
int propStart = -1;
if (attrPropsValue.startsWith(propName + "(") || attrPropsValue.contains(" " + propName + "(")) {
propStart = attrPropsValue.indexOf(propNam... | java | private String getLabelValue(final QName propName, final String attrPropsValue) {
if (attrPropsValue != null) {
int propStart = -1;
if (attrPropsValue.startsWith(propName + "(") || attrPropsValue.contains(" " + propName + "(")) {
propStart = attrPropsValue.indexOf(propNam... | [
"private",
"String",
"getLabelValue",
"(",
"final",
"QName",
"propName",
",",
"final",
"String",
"attrPropsValue",
")",
"{",
"if",
"(",
"attrPropsValue",
"!=",
"null",
")",
"{",
"int",
"propStart",
"=",
"-",
"1",
";",
"if",
"(",
"attrPropsValue",
".",
"sta... | Get labelled props value.
@param propName attribute name
@param attrPropsValue attribute value
@return props value, {@code null} if not available | [
"Get",
"labelled",
"props",
"value",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FilterUtils.java#L373-L388 |
48,594 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FilterUtils.java | FilterUtils.checkRuleMapping | private void checkRuleMapping(final QName attName, final List<String> attValue) {
if (attValue == null || attValue.isEmpty()) {
return;
}
for (final String attSubValue: attValue) {
final FilterKey filterKey = new FilterKey(attName, attSubValue);
final Action f... | java | private void checkRuleMapping(final QName attName, final List<String> attValue) {
if (attValue == null || attValue.isEmpty()) {
return;
}
for (final String attSubValue: attValue) {
final FilterKey filterKey = new FilterKey(attName, attSubValue);
final Action f... | [
"private",
"void",
"checkRuleMapping",
"(",
"final",
"QName",
"attName",
",",
"final",
"List",
"<",
"String",
">",
"attValue",
")",
"{",
"if",
"(",
"attValue",
"==",
"null",
"||",
"attValue",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"for... | Check if attribute value has mapping in filter configuration and throw messages.
@param attName attribute name
@param attValue attribute value | [
"Check",
"if",
"attribute",
"value",
"has",
"mapping",
"in",
"filter",
"configuration",
"and",
"throw",
"messages",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FilterUtils.java#L467-L480 |
48,595 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FilterUtils.java | FilterUtils.refine | private FilterUtils refine(final Map<QName, Map<String, Set<Element>>> bindingMap) {
if (bindingMap != null && !bindingMap.isEmpty()) {
final Map<FilterKey, Action> buf = new HashMap<>(filterMap);
for (final Map.Entry<FilterKey, Action> e: filterMap.entrySet()) {
refineAc... | java | private FilterUtils refine(final Map<QName, Map<String, Set<Element>>> bindingMap) {
if (bindingMap != null && !bindingMap.isEmpty()) {
final Map<FilterKey, Action> buf = new HashMap<>(filterMap);
for (final Map.Entry<FilterKey, Action> e: filterMap.entrySet()) {
refineAc... | [
"private",
"FilterUtils",
"refine",
"(",
"final",
"Map",
"<",
"QName",
",",
"Map",
"<",
"String",
",",
"Set",
"<",
"Element",
">",
">",
">",
"bindingMap",
")",
"{",
"if",
"(",
"bindingMap",
"!=",
"null",
"&&",
"!",
"bindingMap",
".",
"isEmpty",
"(",
... | Refine filter with subject scheme.
@param bindingMap subject scheme bindings, {@code Map<AttName, Map<ElemName, Set<Element>>>}
@return new filter with subject scheme information | [
"Refine",
"filter",
"with",
"subject",
"scheme",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FilterUtils.java#L569-L582 |
48,596 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/CopyToReader.java | CopyToReader.isFormatDita | public static boolean isFormatDita(final String attrFormat) {
if (attrFormat == null || attrFormat.equals(ATTR_FORMAT_VALUE_DITA)) {
return true;
}
for (final String f : ditaFormat) {
if (f.equals(attrFormat)) {
return true;
}
}
... | java | public static boolean isFormatDita(final String attrFormat) {
if (attrFormat == null || attrFormat.equals(ATTR_FORMAT_VALUE_DITA)) {
return true;
}
for (final String f : ditaFormat) {
if (f.equals(attrFormat)) {
return true;
}
}
... | [
"public",
"static",
"boolean",
"isFormatDita",
"(",
"final",
"String",
"attrFormat",
")",
"{",
"if",
"(",
"attrFormat",
"==",
"null",
"||",
"attrFormat",
".",
"equals",
"(",
"ATTR_FORMAT_VALUE_DITA",
")",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"... | Check if format is DITA topic.
@param attrFormat format attribute value, may be {@code null}
@return {@code true} if DITA topic, otherwise {@code false} | [
"Check",
"if",
"format",
"is",
"DITA",
"topic",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/CopyToReader.java#L198-L208 |
48,597 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/DefaultLogger.java | DefaultLogger.buildFinished | @Override
public void buildFinished(final BuildEvent event) {
final Throwable error = event.getException();
final StringBuilder message = new StringBuilder();
if (error == null) {
// message.append(StringUtils.LINE_SEP);
// message.append(getBuildSuccessfulMessage());... | java | @Override
public void buildFinished(final BuildEvent event) {
final Throwable error = event.getException();
final StringBuilder message = new StringBuilder();
if (error == null) {
// message.append(StringUtils.LINE_SEP);
// message.append(getBuildSuccessfulMessage());... | [
"@",
"Override",
"public",
"void",
"buildFinished",
"(",
"final",
"BuildEvent",
"event",
")",
"{",
"final",
"Throwable",
"error",
"=",
"event",
".",
"getException",
"(",
")",
";",
"final",
"StringBuilder",
"message",
"=",
"new",
"StringBuilder",
"(",
")",
";... | Prints whether the build succeeded or failed, any errors the occurred
during the build, and how long the build took.
@param event An event with any relevant extra information. Must not be
<code>null</code>. | [
"Prints",
"whether",
"the",
"build",
"succeeded",
"or",
"failed",
"any",
"errors",
"the",
"occurred",
"during",
"the",
"build",
"and",
"how",
"long",
"the",
"build",
"took",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/DefaultLogger.java#L180-L205 |
48,598 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/DefaultLogger.java | DefaultLogger.targetStarted | @Override
public void targetStarted(final BuildEvent event) {
if (Project.MSG_INFO <= msgOutputLevel && !event.getTarget().getName().equals("")) {
final String msg = StringUtils.LINE_SEP + event.getTarget().getName() + ":";
printMessage(msg, out, event.getPriority());
log... | java | @Override
public void targetStarted(final BuildEvent event) {
if (Project.MSG_INFO <= msgOutputLevel && !event.getTarget().getName().equals("")) {
final String msg = StringUtils.LINE_SEP + event.getTarget().getName() + ":";
printMessage(msg, out, event.getPriority());
log... | [
"@",
"Override",
"public",
"void",
"targetStarted",
"(",
"final",
"BuildEvent",
"event",
")",
"{",
"if",
"(",
"Project",
".",
"MSG_INFO",
"<=",
"msgOutputLevel",
"&&",
"!",
"event",
".",
"getTarget",
"(",
")",
".",
"getName",
"(",
")",
".",
"equals",
"("... | Logs a message to say that the target has started if this logger allows
information-level messages.
@param event An event with any relevant extra information. Must not be
<code>null</code>. | [
"Logs",
"a",
"message",
"to",
"say",
"that",
"the",
"target",
"has",
"started",
"if",
"this",
"logger",
"allows",
"information",
"-",
"level",
"messages",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/DefaultLogger.java#L234-L241 |
48,599 | dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/DefaultLogger.java | DefaultLogger.messageLogged | @Override
public void messageLogged(final BuildEvent event) {
final int priority = event.getPriority();
// Filter out messages based on priority
if (priority <= msgOutputLevel) {
final StringBuilder message = new StringBuilder();
if (event.getTask() != null && !emacs... | java | @Override
public void messageLogged(final BuildEvent event) {
final int priority = event.getPriority();
// Filter out messages based on priority
if (priority <= msgOutputLevel) {
final StringBuilder message = new StringBuilder();
if (event.getTask() != null && !emacs... | [
"@",
"Override",
"public",
"void",
"messageLogged",
"(",
"final",
"BuildEvent",
"event",
")",
"{",
"final",
"int",
"priority",
"=",
"event",
".",
"getPriority",
"(",
")",
";",
"// Filter out messages based on priority",
"if",
"(",
"priority",
"<=",
"msgOutputLevel... | Logs a message, if the priority is suitable. In non-emacs mode, task
level messages are prefixed by the task name which is right-justified.
@param event A BuildEvent containing message information. Must not be
<code>null</code>. | [
"Logs",
"a",
"message",
"if",
"the",
"priority",
"is",
"suitable",
".",
"In",
"non",
"-",
"emacs",
"mode",
"task",
"level",
"messages",
"are",
"prefixed",
"by",
"the",
"task",
"name",
"which",
"is",
"right",
"-",
"justified",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/DefaultLogger.java#L277-L340 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.