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,700 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.extractUser | private static String extractUser(String userInfo) {
if (userInfo == null) {
return null;
}
int index = userInfo.lastIndexOf(':');
if (index == -1) {
return userInfo;
} else {
return userInfo.substring(0, index);
}
} | java | private static String extractUser(String userInfo) {
if (userInfo == null) {
return null;
}
int index = userInfo.lastIndexOf(':');
if (index == -1) {
return userInfo;
} else {
return userInfo.substring(0, index);
}
} | [
"private",
"static",
"String",
"extractUser",
"(",
"String",
"userInfo",
")",
"{",
"if",
"(",
"userInfo",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"index",
"=",
"userInfo",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"in... | Gets the user from an userInfo string obtained from the starting URL. Used
only by the constructor.
@param userInfo
userInfo, taken from the URL.
@return The user. | [
"Gets",
"the",
"user",
"from",
"an",
"userInfo",
"string",
"obtained",
"from",
"the",
"starting",
"URL",
".",
"Used",
"only",
"by",
"the",
"constructor",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L318-L329 |
48,701 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.extractPassword | private static String extractPassword(String userInfo) {
if (userInfo == null) {
return null;
}
String password = "";
int index = userInfo.lastIndexOf(':');
if (index != -1 && index < userInfo.length() - 1) {
// Extract password from the URL.
password = userInfo.substring(index + 1... | java | private static String extractPassword(String userInfo) {
if (userInfo == null) {
return null;
}
String password = "";
int index = userInfo.lastIndexOf(':');
if (index != -1 && index < userInfo.length() - 1) {
// Extract password from the URL.
password = userInfo.substring(index + 1... | [
"private",
"static",
"String",
"extractPassword",
"(",
"String",
"userInfo",
")",
"{",
"if",
"(",
"userInfo",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"password",
"=",
"\"\"",
";",
"int",
"index",
"=",
"userInfo",
".",
"lastIndexOf",
... | Gets the password from an user info string obtained from the starting URL.
@param userInfo
userInfo, taken from the URL. If no user info specified returning
null. If user info not null but no password after ":" then
returning empty, (we have a user so the default pass for him is
empty string). See bug 6086.
@return T... | [
"Gets",
"the",
"password",
"from",
"an",
"user",
"info",
"string",
"obtained",
"from",
"the",
"starting",
"URL",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L342-L353 |
48,702 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.clearUserInfo | private static URL clearUserInfo(String systemID) {
try {
URL url = new URL(systemID);
// Do not clear user info on "file" urls 'cause on Windows the drive will
// have no ":"...
if (!"file".equals(url.getProtocol())) {
return attachUserInfo(url, null, null);
}
return url... | java | private static URL clearUserInfo(String systemID) {
try {
URL url = new URL(systemID);
// Do not clear user info on "file" urls 'cause on Windows the drive will
// have no ":"...
if (!"file".equals(url.getProtocol())) {
return attachUserInfo(url, null, null);
}
return url... | [
"private",
"static",
"URL",
"clearUserInfo",
"(",
"String",
"systemID",
")",
"{",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
"systemID",
")",
";",
"// Do not clear user info on \"file\" urls 'cause on Windows the drive will",
"// have no \":\"...",
"if",
"(",
"... | Clears the user info from an url.
@param systemID
the url to be cleaned.
@return the cleaned url, or null if the argument is not an URL. | [
"Clears",
"the",
"user",
"info",
"from",
"an",
"url",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L362-L374 |
48,703 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.attachUserInfo | private static URL attachUserInfo(URL url, String user, char[] password)
throws MalformedURLException {
if (url == null) {
return null;
}
if ((url.getAuthority() == null || "".equals(url.getAuthority()))
&& !"jar".equals(url.getProtocol())) {
return url;
}
StringBuilder bu... | java | private static URL attachUserInfo(URL url, String user, char[] password)
throws MalformedURLException {
if (url == null) {
return null;
}
if ((url.getAuthority() == null || "".equals(url.getAuthority()))
&& !"jar".equals(url.getProtocol())) {
return url;
}
StringBuilder bu... | [
"private",
"static",
"URL",
"attachUserInfo",
"(",
"URL",
"url",
",",
"String",
"user",
",",
"char",
"[",
"]",
"password",
")",
"throws",
"MalformedURLException",
"{",
"if",
"(",
"url",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"("... | Build the URL from the data obtained from the user.
@param url
The URL to be transformed.
@param user
The user name.
@param password
The password.
@return The URL with userInfo.
@exception MalformedURLException
Exception thrown if the URL is malformed. | [
"Build",
"the",
"URL",
"from",
"the",
"data",
"obtained",
"from",
"the",
"user",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L389-L439 |
48,704 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.correctUser | private static String correctUser(String user) {
if (user != null && user.trim().length() > 0
&& (false || user.indexOf('%') == -1)) {
String escaped = escapeSpecialAsciiAndNonAscii(user);
StringBuilder totalEscaped = new StringBuilder();
for (int i = 0; i < escaped.length(); i++) {
... | java | private static String correctUser(String user) {
if (user != null && user.trim().length() > 0
&& (false || user.indexOf('%') == -1)) {
String escaped = escapeSpecialAsciiAndNonAscii(user);
StringBuilder totalEscaped = new StringBuilder();
for (int i = 0; i < escaped.length(); i++) {
... | [
"private",
"static",
"String",
"correctUser",
"(",
"String",
"user",
")",
"{",
"if",
"(",
"user",
"!=",
"null",
"&&",
"user",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
"&&",
"(",
"false",
"||",
"user",
".",
"indexOf",
"(",
"'",
"'... | Escape the specified user.
@param user
The user name to correct.
@return The escaped user. | [
"Escape",
"the",
"specified",
"user",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L448-L465 |
48,705 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/Util.java | Util.correctPassword | private static char[] correctPassword(char[] password) {
if (password != null && new String(password).indexOf('%') == -1) {
String escaped = escapeSpecialAsciiAndNonAscii(new String(password));
StringBuilder totalEscaped = new StringBuilder();
for (int i = 0; i < escaped.length(); i++) {
c... | java | private static char[] correctPassword(char[] password) {
if (password != null && new String(password).indexOf('%') == -1) {
String escaped = escapeSpecialAsciiAndNonAscii(new String(password));
StringBuilder totalEscaped = new StringBuilder();
for (int i = 0; i < escaped.length(); i++) {
c... | [
"private",
"static",
"char",
"[",
"]",
"correctPassword",
"(",
"char",
"[",
"]",
"password",
")",
"{",
"if",
"(",
"password",
"!=",
"null",
"&&",
"new",
"String",
"(",
"password",
")",
".",
"indexOf",
"(",
"'",
"'",
")",
"==",
"-",
"1",
")",
"{",
... | Escape the specified password.
@param password
The password to be corrected.
@return The escaped password. | [
"Escape",
"the",
"specified",
"password",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/Util.java#L475-L491 |
48,706 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.read | private void read() throws IOException {
lastModified = jobFile.lastModified();
if (jobFile.exists()) {
try (final InputStream in = new FileInputStream(jobFile)) {
final XMLReader parser = XMLUtils.getXMLReader();
parser.setContentHandler(new JobHandler(prop, ... | java | private void read() throws IOException {
lastModified = jobFile.lastModified();
if (jobFile.exists()) {
try (final InputStream in = new FileInputStream(jobFile)) {
final XMLReader parser = XMLUtils.getXMLReader();
parser.setContentHandler(new JobHandler(prop, ... | [
"private",
"void",
"read",
"(",
")",
"throws",
"IOException",
"{",
"lastModified",
"=",
"jobFile",
".",
"lastModified",
"(",
")",
";",
"if",
"(",
"jobFile",
".",
"exists",
"(",
")",
")",
"{",
"try",
"(",
"final",
"InputStream",
"in",
"=",
"new",
"FileI... | Read temporary configuration files. If configuration files are not found,
assume an empty job object is being created.
@throws IOException if reading configuration files failed
@throws IllegalStateException if configuration files are missing | [
"Read",
"temporary",
"configuration",
"files",
".",
"If",
"configuration",
"files",
"are",
"not",
"found",
"assume",
"an",
"empty",
"job",
"object",
"is",
"being",
"created",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L168-L185 |
48,707 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getProperties | public Map<String, String> getProperties() {
final Map<String, String> res = new HashMap<>();
for (final Map.Entry<String, Object> e: prop.entrySet()) {
if (e.getValue() instanceof String) {
res.put(e.getKey(), (String) e.getValue());
}
}
return Co... | java | public Map<String, String> getProperties() {
final Map<String, String> res = new HashMap<>();
for (final Map.Entry<String, Object> e: prop.entrySet()) {
if (e.getValue() instanceof String) {
res.put(e.getKey(), (String) e.getValue());
}
}
return Co... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getProperties",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"res",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",
... | Get a map of string properties.
@return map of properties, may be an empty map | [
"Get",
"a",
"map",
"of",
"string",
"properties",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L426-L434 |
48,708 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.setProperty | public Object setProperty(final String key, final String value) {
return prop.put(key, value);
} | java | public Object setProperty(final String key, final String value) {
return prop.put(key, value);
} | [
"public",
"Object",
"setProperty",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
")",
"{",
"return",
"prop",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Set property value.
@param key property key
@param value property value
@return the previous value of the specified key in this property list, or {@code null} if it did not have one | [
"Set",
"property",
"value",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L443-L445 |
48,709 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getInputMap | public URI getInputMap() {
// return toURI(getProperty(INPUT_DITAMAP_URI));
return files.values().stream()
.filter(fi -> fi.isInput)
.map(fi -> getInputDir().relativize(fi.src))
.findAny()
.orElse(null);
} | java | public URI getInputMap() {
// return toURI(getProperty(INPUT_DITAMAP_URI));
return files.values().stream()
.filter(fi -> fi.isInput)
.map(fi -> getInputDir().relativize(fi.src))
.findAny()
.orElse(null);
} | [
"public",
"URI",
"getInputMap",
"(",
")",
"{",
"// return toURI(getProperty(INPUT_DITAMAP_URI));",
"return",
"files",
".",
"values",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"fi",
"->",
"fi",
".",
"isInput",
")",
".",
"map",
"(",
"fi",
... | Get input file
@return input file path relative to input directory, {@code null} if not set | [
"Get",
"input",
"file"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L452-L459 |
48,710 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.setInputMap | public void setInputMap(final URI map) {
assert !map.isAbsolute();
setProperty(INPUT_DITAMAP_URI, map.toString());
// Deprecated since 2.2
setProperty(INPUT_DITAMAP, toFile(map).getPath());
} | java | public void setInputMap(final URI map) {
assert !map.isAbsolute();
setProperty(INPUT_DITAMAP_URI, map.toString());
// Deprecated since 2.2
setProperty(INPUT_DITAMAP, toFile(map).getPath());
} | [
"public",
"void",
"setInputMap",
"(",
"final",
"URI",
"map",
")",
"{",
"assert",
"!",
"map",
".",
"isAbsolute",
"(",
")",
";",
"setProperty",
"(",
"INPUT_DITAMAP_URI",
",",
"map",
".",
"toString",
"(",
")",
")",
";",
"// Deprecated since 2.2",
"setProperty",... | set input file
@param map input file path relative to input directory | [
"set",
"input",
"file"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L466-L471 |
48,711 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.setInputDir | public void setInputDir(final URI dir) {
assert dir.isAbsolute();
setProperty(INPUT_DIR_URI, dir.toString());
// Deprecated since 2.2
if (dir.getScheme().equals("file")) {
setProperty(INPUT_DIR, new File(dir).getAbsolutePath());
}
} | java | public void setInputDir(final URI dir) {
assert dir.isAbsolute();
setProperty(INPUT_DIR_URI, dir.toString());
// Deprecated since 2.2
if (dir.getScheme().equals("file")) {
setProperty(INPUT_DIR, new File(dir).getAbsolutePath());
}
} | [
"public",
"void",
"setInputDir",
"(",
"final",
"URI",
"dir",
")",
"{",
"assert",
"dir",
".",
"isAbsolute",
"(",
")",
";",
"setProperty",
"(",
"INPUT_DIR_URI",
",",
"dir",
".",
"toString",
"(",
")",
")",
";",
"// Deprecated since 2.2",
"if",
"(",
"dir",
"... | Set input directory
@param dir absolute input directory path | [
"Set",
"input",
"directory"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L486-L493 |
48,712 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getFileInfoMap | public Map<File, FileInfo> getFileInfoMap() {
final Map<File, FileInfo> ret = new HashMap<>();
for (final Map.Entry<URI, FileInfo> e: files.entrySet()) {
ret.put(e.getValue().file, e.getValue());
}
return Collections.unmodifiableMap(ret);
} | java | public Map<File, FileInfo> getFileInfoMap() {
final Map<File, FileInfo> ret = new HashMap<>();
for (final Map.Entry<URI, FileInfo> e: files.entrySet()) {
ret.put(e.getValue().file, e.getValue());
}
return Collections.unmodifiableMap(ret);
} | [
"public",
"Map",
"<",
"File",
",",
"FileInfo",
">",
"getFileInfoMap",
"(",
")",
"{",
"final",
"Map",
"<",
"File",
",",
"FileInfo",
">",
"ret",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"URI",
",",
... | Get all file info objects as a map
@return map of file info objects, where the key is the {@link FileInfo#file} value. May be empty | [
"Get",
"all",
"file",
"info",
"objects",
"as",
"a",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L500-L506 |
48,713 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getFileInfo | public Collection<FileInfo> getFileInfo(final Predicate<FileInfo> filter) {
return files.values().stream()
.filter(filter)
.collect(Collectors.toList());
} | java | public Collection<FileInfo> getFileInfo(final Predicate<FileInfo> filter) {
return files.values().stream()
.filter(filter)
.collect(Collectors.toList());
} | [
"public",
"Collection",
"<",
"FileInfo",
">",
"getFileInfo",
"(",
"final",
"Predicate",
"<",
"FileInfo",
">",
"filter",
")",
"{",
"return",
"files",
".",
"values",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"filter",
")",
".",
"collect",
"(... | Get file info objects that pass the filter
@param filter filter file info object must pass
@return collection of file info objects that pass the filter, may be empty | [
"Get",
"file",
"info",
"objects",
"that",
"pass",
"the",
"filter"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L523-L527 |
48,714 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getFileInfo | public FileInfo getFileInfo(final URI file) {
if (file == null) {
return null;
} else if (files.containsKey(file)) {
return files.get(file);
} else if (file.isAbsolute() && file.toString().startsWith(tempDirURI.toString())) {
final URI relative = getRelativePa... | java | public FileInfo getFileInfo(final URI file) {
if (file == null) {
return null;
} else if (files.containsKey(file)) {
return files.get(file);
} else if (file.isAbsolute() && file.toString().startsWith(tempDirURI.toString())) {
final URI relative = getRelativePa... | [
"public",
"FileInfo",
"getFileInfo",
"(",
"final",
"URI",
"file",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"files",
".",
"containsKey",
"(",
"file",
")",
")",
"{",
"return",
"files",
".",
"... | Get file info object
@param file file URI
@return file info object, {@code null} if not found | [
"Get",
"file",
"info",
"object"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L535-L549 |
48,715 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getOrCreateFileInfo | public FileInfo getOrCreateFileInfo(final URI file) {
assert file.getFragment() == null;
URI f = file.normalize();
if (f.isAbsolute()) {
f = tempDirURI.relativize(f);
}
FileInfo i = getFileInfo(file);
if (i == null) {
i = new FileInfo(f);
... | java | public FileInfo getOrCreateFileInfo(final URI file) {
assert file.getFragment() == null;
URI f = file.normalize();
if (f.isAbsolute()) {
f = tempDirURI.relativize(f);
}
FileInfo i = getFileInfo(file);
if (i == null) {
i = new FileInfo(f);
... | [
"public",
"FileInfo",
"getOrCreateFileInfo",
"(",
"final",
"URI",
"file",
")",
"{",
"assert",
"file",
".",
"getFragment",
"(",
")",
"==",
"null",
";",
"URI",
"f",
"=",
"file",
".",
"normalize",
"(",
")",
";",
"if",
"(",
"f",
".",
"isAbsolute",
"(",
"... | Get or create FileInfo for given path.
@param file relative URI to temporary directory
@return created or existing file info object | [
"Get",
"or",
"create",
"FileInfo",
"for",
"given",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L556-L568 |
48,716 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.setOutterControl | public void setOutterControl(final String control) {
prop.put(PROPERTY_OUTER_CONTROL, OutterControl.valueOf(control.toUpperCase()).toString());
} | java | public void setOutterControl(final String control) {
prop.put(PROPERTY_OUTER_CONTROL, OutterControl.valueOf(control.toUpperCase()).toString());
} | [
"public",
"void",
"setOutterControl",
"(",
"final",
"String",
"control",
")",
"{",
"prop",
".",
"put",
"(",
"PROPERTY_OUTER_CONTROL",
",",
"OutterControl",
".",
"valueOf",
"(",
"control",
".",
"toUpperCase",
"(",
")",
")",
".",
"toString",
"(",
")",
")",
"... | Set the outercontrol.
@param control control | [
"Set",
"the",
"outercontrol",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L874-L876 |
48,717 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.crawlTopics | public boolean crawlTopics() {
if (prop.get(PROPERTY_LINK_CRAWLER) == null) {
return true;
}
return prop.get(PROPERTY_LINK_CRAWLER).toString().equals(ANT_INVOKER_EXT_PARAM_CRAWL_VALUE_TOPIC);
} | java | public boolean crawlTopics() {
if (prop.get(PROPERTY_LINK_CRAWLER) == null) {
return true;
}
return prop.get(PROPERTY_LINK_CRAWLER).toString().equals(ANT_INVOKER_EXT_PARAM_CRAWL_VALUE_TOPIC);
} | [
"public",
"boolean",
"crawlTopics",
"(",
")",
"{",
"if",
"(",
"prop",
".",
"get",
"(",
"PROPERTY_LINK_CRAWLER",
")",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"return",
"prop",
".",
"get",
"(",
"PROPERTY_LINK_CRAWLER",
")",
".",
"toString",
"("... | Retrieve the link crawling behaviour.
@return {@code true} if crawl links in topics, {@code false} if only crawl links in maps | [
"Retrieve",
"the",
"link",
"crawling",
"behaviour",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L890-L895 |
48,718 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getOutputDir | public File getOutputDir() {
if (prop.containsKey(PROPERTY_OUTPUT_DIR)) {
return new File(prop.get(PROPERTY_OUTPUT_DIR).toString());
}
return null;
} | java | public File getOutputDir() {
if (prop.containsKey(PROPERTY_OUTPUT_DIR)) {
return new File(prop.get(PROPERTY_OUTPUT_DIR).toString());
}
return null;
} | [
"public",
"File",
"getOutputDir",
"(",
")",
"{",
"if",
"(",
"prop",
".",
"containsKey",
"(",
"PROPERTY_OUTPUT_DIR",
")",
")",
"{",
"return",
"new",
"File",
"(",
"prop",
".",
"get",
"(",
"PROPERTY_OUTPUT_DIR",
")",
".",
"toString",
"(",
")",
")",
";",
"... | Get output dir.
@return absolute output dir | [
"Get",
"output",
"dir",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L939-L944 |
48,719 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getInputFile | public URI getInputFile() {
// if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) {
// return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString());
// }
// return null;
return files.values().stream()
.filter(fi -> fi.isInput)
.map(fi -> fi.src)
... | java | public URI getInputFile() {
// if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) {
// return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString());
// }
// return null;
return files.values().stream()
.filter(fi -> fi.isInput)
.map(fi -> fi.src)
... | [
"public",
"URI",
"getInputFile",
"(",
")",
"{",
"// if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) {",
"// return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString());",
"// }",
"// return null;",
"return",
"files",
".",
"values",
"(",
")",
".",
"stream... | Get input file path.
@return absolute input file path, {@code null} if not set | [
"Get",
"input",
"file",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L958-L969 |
48,720 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.setInputFile | public void setInputFile(final URI inputFile) {
assert inputFile.isAbsolute();
prop.put(PROPERTY_INPUT_MAP_URI, inputFile.toString());
// Deprecated since 2.1
if (inputFile.getScheme().equals("file")) {
prop.put(PROPERTY_INPUT_MAP, new File(inputFile).getAbsolutePath());
... | java | public void setInputFile(final URI inputFile) {
assert inputFile.isAbsolute();
prop.put(PROPERTY_INPUT_MAP_URI, inputFile.toString());
// Deprecated since 2.1
if (inputFile.getScheme().equals("file")) {
prop.put(PROPERTY_INPUT_MAP, new File(inputFile).getAbsolutePath());
... | [
"public",
"void",
"setInputFile",
"(",
"final",
"URI",
"inputFile",
")",
"{",
"assert",
"inputFile",
".",
"isAbsolute",
"(",
")",
";",
"prop",
".",
"put",
"(",
"PROPERTY_INPUT_MAP_URI",
",",
"inputFile",
".",
"toString",
"(",
")",
")",
";",
"// Deprecated si... | Set input map path.
@param inputFile absolute input map path | [
"Set",
"input",
"map",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L975-L982 |
48,721 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/Job.java | Job.getTempFileNameScheme | public TempFileNameScheme getTempFileNameScheme() {
final TempFileNameScheme tempFileNameScheme;
try {
final String cls = Optional
.ofNullable(getProperty("temp-file-name-scheme"))
.orElse(configuration.get("temp-file-name-scheme"));
tempFi... | java | public TempFileNameScheme getTempFileNameScheme() {
final TempFileNameScheme tempFileNameScheme;
try {
final String cls = Optional
.ofNullable(getProperty("temp-file-name-scheme"))
.orElse(configuration.get("temp-file-name-scheme"));
tempFi... | [
"public",
"TempFileNameScheme",
"getTempFileNameScheme",
"(",
")",
"{",
"final",
"TempFileNameScheme",
"tempFileNameScheme",
";",
"try",
"{",
"final",
"String",
"cls",
"=",
"Optional",
".",
"ofNullable",
"(",
"getProperty",
"(",
"\"temp-file-name-scheme\"",
")",
")",
... | Get temporary file name generator. | [
"Get",
"temporary",
"file",
"name",
"generator",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/Job.java#L987-L999 |
48,722 | dita-ot/dita-ot | src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/util/IndexStringProcessor.java | IndexStringProcessor.processIndexString | public static IndexEntry[] processIndexString(final String theIndexMarkerString, final List<Node> contents) {
final IndexEntryImpl indexEntry = createIndexEntry(theIndexMarkerString, contents, null, false);
final StringBuffer referenceIDBuf = new StringBuffer();
referenceIDBuf.append(indexEntry.... | java | public static IndexEntry[] processIndexString(final String theIndexMarkerString, final List<Node> contents) {
final IndexEntryImpl indexEntry = createIndexEntry(theIndexMarkerString, contents, null, false);
final StringBuffer referenceIDBuf = new StringBuffer();
referenceIDBuf.append(indexEntry.... | [
"public",
"static",
"IndexEntry",
"[",
"]",
"processIndexString",
"(",
"final",
"String",
"theIndexMarkerString",
",",
"final",
"List",
"<",
"Node",
">",
"contents",
")",
"{",
"final",
"IndexEntryImpl",
"indexEntry",
"=",
"createIndexEntry",
"(",
"theIndexMarkerStri... | Parse the index marker string and create IndexEntry object from one.
@param theIndexMarkerString index marker string
@param contents IndexPreprocessorTask instance
@return IndexEntry objects created from the index string | [
"Parse",
"the",
"index",
"marker",
"string",
"and",
"create",
"IndexEntry",
"object",
"from",
"one",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/util/IndexStringProcessor.java#L53-L61 |
48,723 | dita-ot/dita-ot | src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/util/IndexStringProcessor.java | IndexStringProcessor.normalizeTextValue | public static String normalizeTextValue(final String theString) {
if (null != theString && theString.length() > 0) {
return theString.replaceAll("[\\s\\n]+", " ").trim();
}
return theString;
} | java | public static String normalizeTextValue(final String theString) {
if (null != theString && theString.length() > 0) {
return theString.replaceAll("[\\s\\n]+", " ").trim();
}
return theString;
} | [
"public",
"static",
"String",
"normalizeTextValue",
"(",
"final",
"String",
"theString",
")",
"{",
"if",
"(",
"null",
"!=",
"theString",
"&&",
"theString",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"return",
"theString",
".",
"replaceAll",
"(",
"\"[\\\\... | Method equals to the normalize-space xslt function
@param theString string to normalize
@return normalized string | [
"Method",
"equals",
"to",
"the",
"normalize",
"-",
"space",
"xslt",
"function"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/index2/util/IndexStringProcessor.java#L70-L75 |
48,724 | dita-ot/dita-ot | src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java | ExtensibleAntInvoker.setTempdir | public void setTempdir(final File tempdir) {
this.tempDir = tempdir.getAbsoluteFile();
attrs.put(ANT_INVOKER_PARAM_TEMPDIR, tempdir.getAbsolutePath());
} | java | public void setTempdir(final File tempdir) {
this.tempDir = tempdir.getAbsoluteFile();
attrs.put(ANT_INVOKER_PARAM_TEMPDIR, tempdir.getAbsolutePath());
} | [
"public",
"void",
"setTempdir",
"(",
"final",
"File",
"tempdir",
")",
"{",
"this",
".",
"tempDir",
"=",
"tempdir",
".",
"getAbsoluteFile",
"(",
")",
";",
"attrs",
".",
"put",
"(",
"ANT_INVOKER_PARAM_TEMPDIR",
",",
"tempdir",
".",
"getAbsolutePath",
"(",
")",... | Set temporary directory.
@param tempdir temporary directory | [
"Set",
"temporary",
"directory",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java#L102-L105 |
48,725 | dita-ot/dita-ot | src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java | ExtensibleAntInvoker.execute | @Override
public void execute() throws BuildException {
initialize();
final Job job = getJob(tempDir, getProject());
try {
for (final ModuleElem m : modules) {
m.setProject(getProject());
m.setLocation(getLocation());
final Pipelin... | java | @Override
public void execute() throws BuildException {
initialize();
final Job job = getJob(tempDir, getProject());
try {
for (final ModuleElem m : modules) {
m.setProject(getProject());
m.setLocation(getLocation());
final Pipelin... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"throws",
"BuildException",
"{",
"initialize",
"(",
")",
";",
"final",
"Job",
"job",
"=",
"getJob",
"(",
"tempDir",
",",
"getProject",
"(",
")",
")",
";",
"try",
"{",
"for",
"(",
"final",
"ModuleE... | Execution point of this invoker.
@throws BuildException exception | [
"Execution",
"point",
"of",
"this",
"invoker",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java#L165-L189 |
48,726 | dita-ot/dita-ot | src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java | ExtensibleAntInvoker.getJob | public static Job getJob(final File tempDir, final Project project) {
Job job = project.getReference(ANT_REFERENCE_JOB);
if (job != null && job.isStale()) {
project.log("Reload stale job configuration reference", Project.MSG_VERBOSE);
job = null;
}
if (job == null... | java | public static Job getJob(final File tempDir, final Project project) {
Job job = project.getReference(ANT_REFERENCE_JOB);
if (job != null && job.isStale()) {
project.log("Reload stale job configuration reference", Project.MSG_VERBOSE);
job = null;
}
if (job == null... | [
"public",
"static",
"Job",
"getJob",
"(",
"final",
"File",
"tempDir",
",",
"final",
"Project",
"project",
")",
"{",
"Job",
"job",
"=",
"project",
".",
"getReference",
"(",
"ANT_REFERENCE_JOB",
")",
";",
"if",
"(",
"job",
"!=",
"null",
"&&",
"job",
".",
... | Get job configuration from Ant project reference or create new.
@param tempDir configuration directory
@param project Ant project
@return job configuration | [
"Get",
"job",
"configuration",
"from",
"Ant",
"project",
"reference",
"or",
"create",
"new",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java#L292-L307 |
48,727 | dita-ot/dita-ot | src/main/java/org/dita/dost/log/MessageUtils.java | MessageUtils.getMessage | public static MessageBean getMessage(final String id, final String... params) {
if (!msgs.containsKey(id)) {
throw new IllegalArgumentException("Message for ID '" + id + "' not found");
}
final String msg = MessageFormat.format(msgs.getString(id), (Object[]) params);
MessageB... | java | public static MessageBean getMessage(final String id, final String... params) {
if (!msgs.containsKey(id)) {
throw new IllegalArgumentException("Message for ID '" + id + "' not found");
}
final String msg = MessageFormat.format(msgs.getString(id), (Object[]) params);
MessageB... | [
"public",
"static",
"MessageBean",
"getMessage",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"...",
"params",
")",
"{",
"if",
"(",
"!",
"msgs",
".",
"containsKey",
"(",
"id",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Mess... | Get the message respond to the given id with all of the parameters
are replaced by those in the given 'prop', if no message found,
an empty message with this id will be returned.
@param id id
@param params message parameters
@return MessageBean | [
"Get",
"the",
"message",
"respond",
"to",
"the",
"given",
"id",
"with",
"all",
"of",
"the",
"parameters",
"are",
"replaced",
"by",
"those",
"in",
"the",
"given",
"prop",
"if",
"no",
"message",
"found",
"an",
"empty",
"message",
"with",
"this",
"id",
"wil... | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/log/MessageUtils.java#L57-L81 |
48,728 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/RelaxDefaultsParserConfiguration.java | RelaxDefaultsParserConfiguration.insertRelaxDefaultsComponent | protected void insertRelaxDefaultsComponent() {
if (fRelaxDefaults == null) {
fRelaxDefaults = new RelaxNGDefaultsComponent(resolver);
addCommonComponent(fRelaxDefaults);
fRelaxDefaults.reset(this);
}
XMLDocumentSource prev = fLastComponent;
fLastComponent = fRelaxDefaults;
... | java | protected void insertRelaxDefaultsComponent() {
if (fRelaxDefaults == null) {
fRelaxDefaults = new RelaxNGDefaultsComponent(resolver);
addCommonComponent(fRelaxDefaults);
fRelaxDefaults.reset(this);
}
XMLDocumentSource prev = fLastComponent;
fLastComponent = fRelaxDefaults;
... | [
"protected",
"void",
"insertRelaxDefaultsComponent",
"(",
")",
"{",
"if",
"(",
"fRelaxDefaults",
"==",
"null",
")",
"{",
"fRelaxDefaults",
"=",
"new",
"RelaxNGDefaultsComponent",
"(",
"resolver",
")",
";",
"addCommonComponent",
"(",
"fRelaxDefaults",
")",
";",
"fR... | Insert the Relax NG defaults component | [
"Insert",
"the",
"Relax",
"NG",
"defaults",
"component"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/RelaxDefaultsParserConfiguration.java#L135-L151 |
48,729 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/IndexTermReader.java | IndexTermReader.reset | public void reset() {
targetFile = null;
title = null;
defaultTitle = null;
inTitleElement = false;
termStack.clear();
topicIdStack.clear();
indexTermSpecList.clear();
indexSeeSpecList.clear();
indexSeeAlsoSpecList.clear();
indexSortAsSpecL... | java | public void reset() {
targetFile = null;
title = null;
defaultTitle = null;
inTitleElement = false;
termStack.clear();
topicIdStack.clear();
indexTermSpecList.clear();
indexSeeSpecList.clear();
indexSeeAlsoSpecList.clear();
indexSortAsSpecL... | [
"public",
"void",
"reset",
"(",
")",
"{",
"targetFile",
"=",
"null",
";",
"title",
"=",
"null",
";",
"defaultTitle",
"=",
"null",
";",
"inTitleElement",
"=",
"false",
";",
"termStack",
".",
"clear",
"(",
")",
";",
"topicIdStack",
".",
"clear",
"(",
")"... | Reset the reader. | [
"Reset",
"the",
"reader",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L110-L126 |
48,730 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/IndexTermReader.java | IndexTermReader.genTarget | private IndexTermTarget genTarget() {
final IndexTermTarget target = new IndexTermTarget();
String fragment;
if (topicIdStack.peek() == null) {
fragment = null;
} else {
fragment = topicIdStack.peek();
}
if (title != null) {
target.se... | java | private IndexTermTarget genTarget() {
final IndexTermTarget target = new IndexTermTarget();
String fragment;
if (topicIdStack.peek() == null) {
fragment = null;
} else {
fragment = topicIdStack.peek();
}
if (title != null) {
target.se... | [
"private",
"IndexTermTarget",
"genTarget",
"(",
")",
"{",
"final",
"IndexTermTarget",
"target",
"=",
"new",
"IndexTermTarget",
"(",
")",
";",
"String",
"fragment",
";",
"if",
"(",
"topicIdStack",
".",
"peek",
"(",
")",
"==",
"null",
")",
"{",
"fragment",
"... | This method is used to create a target which refers to current topic.
@return instance of IndexTermTarget created | [
"This",
"method",
"is",
"used",
"to",
"create",
"a",
"target",
"which",
"refers",
"to",
"current",
"topic",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L266-L287 |
48,731 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/IndexTermReader.java | IndexTermReader.updateIndexTermTargetName | private void updateIndexTermTargetName() {
if (defaultTitle == null) {
defaultTitle = targetFile;
}
for (final IndexTerm indexterm : indexTermList) {
updateIndexTermTargetName(indexterm);
}
} | java | private void updateIndexTermTargetName() {
if (defaultTitle == null) {
defaultTitle = targetFile;
}
for (final IndexTerm indexterm : indexTermList) {
updateIndexTermTargetName(indexterm);
}
} | [
"private",
"void",
"updateIndexTermTargetName",
"(",
")",
"{",
"if",
"(",
"defaultTitle",
"==",
"null",
")",
"{",
"defaultTitle",
"=",
"targetFile",
";",
"}",
"for",
"(",
"final",
"IndexTerm",
"indexterm",
":",
"indexTermList",
")",
"{",
"updateIndexTermTargetNa... | Update the target name of constructed IndexTerm recursively | [
"Update",
"the",
"target",
"name",
"of",
"constructed",
"IndexTerm",
"recursively"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L463-L470 |
48,732 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/IndexTermReader.java | IndexTermReader.updateIndexTermTargetName | private void updateIndexTermTargetName(final IndexTerm indexterm) {
final int targetSize = indexterm.getTargetList().size();
final int subtermSize = indexterm.getSubTerms().size();
for (int i = 0; i<targetSize; i++) {
final IndexTermTarget target = indexterm.getTargetList().get(i);
... | java | private void updateIndexTermTargetName(final IndexTerm indexterm) {
final int targetSize = indexterm.getTargetList().size();
final int subtermSize = indexterm.getSubTerms().size();
for (int i = 0; i<targetSize; i++) {
final IndexTermTarget target = indexterm.getTargetList().get(i);
... | [
"private",
"void",
"updateIndexTermTargetName",
"(",
"final",
"IndexTerm",
"indexterm",
")",
"{",
"final",
"int",
"targetSize",
"=",
"indexterm",
".",
"getTargetList",
"(",
")",
".",
"size",
"(",
")",
";",
"final",
"int",
"subtermSize",
"=",
"indexterm",
".",
... | Update the target name of each IndexTerm, recursively. | [
"Update",
"the",
"target",
"name",
"of",
"each",
"IndexTerm",
"recursively",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L475-L497 |
48,733 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/IndexTermReader.java | IndexTermReader.trimSpaceAtStart | private static String trimSpaceAtStart(final String temp, final String termName) {
if (termName != null && termName.charAt(termName.length() - 1) == ' ') {
if (temp.charAt(0) == ' ') {
return temp.substring(1);
}
}
return temp;
} | java | private static String trimSpaceAtStart(final String temp, final String termName) {
if (termName != null && termName.charAt(termName.length() - 1) == ' ') {
if (temp.charAt(0) == ' ') {
return temp.substring(1);
}
}
return temp;
} | [
"private",
"static",
"String",
"trimSpaceAtStart",
"(",
"final",
"String",
"temp",
",",
"final",
"String",
"termName",
")",
"{",
"if",
"(",
"termName",
"!=",
"null",
"&&",
"termName",
".",
"charAt",
"(",
"termName",
".",
"length",
"(",
")",
"-",
"1",
")"... | Trim whitespace from start of the string. If last character of termName and
first character of temp is a space character, remove leading string from temp
@return trimmed temp value | [
"Trim",
"whitespace",
"from",
"start",
"of",
"the",
"string",
".",
"If",
"last",
"character",
"of",
"termName",
"and",
"first",
"character",
"of",
"temp",
"is",
"a",
"space",
"character",
"remove",
"leading",
"string",
"from",
"temp"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/IndexTermReader.java#L505-L512 |
48,734 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/ChunkModule.java | ChunkModule.execute | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
final String transtype = input.getAttribute(ANT_INVOKER_EXT_PARAM_TRANSTYPE);
// change to xml property
final ChunkMapReader mapReader = new ChunkMapReader();
mapReader.setLogg... | java | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
final String transtype = input.getAttribute(ANT_INVOKER_EXT_PARAM_TRANSTYPE);
// change to xml property
final ChunkMapReader mapReader = new ChunkMapReader();
mapReader.setLogg... | [
"@",
"Override",
"public",
"AbstractPipelineOutput",
"execute",
"(",
"final",
"AbstractPipelineInput",
"input",
")",
"throws",
"DITAOTException",
"{",
"final",
"String",
"transtype",
"=",
"input",
".",
"getAttribute",
"(",
"ANT_INVOKER_EXT_PARAM_TRANSTYPE",
")",
";",
... | Entry point of chunk module.
@param input Input parameters and resources.
@return null
@throws DITAOTException exception | [
"Entry",
"point",
"of",
"chunk",
"module",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/ChunkModule.java#L59-L97 |
48,735 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/ChunkModule.java | ChunkModule.hasChanges | private boolean hasChanges(final Map<URI, URI> changeTable) {
if (changeTable.isEmpty()) {
return false;
}
for (Map.Entry<URI, URI> e : changeTable.entrySet()) {
if (!e.getKey().equals(e.getValue())) {
return true;
}
}
return fa... | java | private boolean hasChanges(final Map<URI, URI> changeTable) {
if (changeTable.isEmpty()) {
return false;
}
for (Map.Entry<URI, URI> e : changeTable.entrySet()) {
if (!e.getKey().equals(e.getValue())) {
return true;
}
}
return fa... | [
"private",
"boolean",
"hasChanges",
"(",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"changeTable",
")",
"{",
"if",
"(",
"changeTable",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"Map",
".",
"Entry",
"<",
"URI",
"... | Test whether there are changes that require topic rewriting. | [
"Test",
"whether",
"there",
"are",
"changes",
"that",
"require",
"topic",
"rewriting",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/ChunkModule.java#L102-L112 |
48,736 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/ChunkModule.java | ChunkModule.isEclipseMap | private boolean isEclipseMap(final URI mapFile) throws DITAOTException {
final DocumentBuilder builder = getDocumentBuilder();
Document doc;
try {
doc = builder.parse(mapFile.toString());
} catch (final SAXException | IOException e) {
throw new DITAOTException("Fa... | java | private boolean isEclipseMap(final URI mapFile) throws DITAOTException {
final DocumentBuilder builder = getDocumentBuilder();
Document doc;
try {
doc = builder.parse(mapFile.toString());
} catch (final SAXException | IOException e) {
throw new DITAOTException("Fa... | [
"private",
"boolean",
"isEclipseMap",
"(",
"final",
"URI",
"mapFile",
")",
"throws",
"DITAOTException",
"{",
"final",
"DocumentBuilder",
"builder",
"=",
"getDocumentBuilder",
"(",
")",
";",
"Document",
"doc",
";",
"try",
"{",
"doc",
"=",
"builder",
".",
"parse... | Check whether ditamap is an Eclipse specialization.
@param mapFile ditamap file to test
@return {@code true} if Eclipse specialization, otherwise {@code false}
@throws DITAOTException if reading ditamap fails | [
"Check",
"whether",
"ditamap",
"is",
"an",
"Eclipse",
"specialization",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/ChunkModule.java#L121-L131 |
48,737 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/ChunkModule.java | ChunkModule.updateRefOfDita | private void updateRefOfDita(final Map<URI, URI> changeTable, final Map<URI, URI> conflictTable) {
final TopicRefWriter topicRefWriter = new TopicRefWriter();
topicRefWriter.setLogger(logger);
topicRefWriter.setJob(job);
topicRefWriter.setChangeTable(changeTable);
topicRefWriter.... | java | private void updateRefOfDita(final Map<URI, URI> changeTable, final Map<URI, URI> conflictTable) {
final TopicRefWriter topicRefWriter = new TopicRefWriter();
topicRefWriter.setLogger(logger);
topicRefWriter.setJob(job);
topicRefWriter.setChangeTable(changeTable);
topicRefWriter.... | [
"private",
"void",
"updateRefOfDita",
"(",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"changeTable",
",",
"final",
"Map",
"<",
"URI",
",",
"URI",
">",
"conflictTable",
")",
"{",
"final",
"TopicRefWriter",
"topicRefWriter",
"=",
"new",
"TopicRefWriter",
"("... | Update href attributes in ditamap and topic files. | [
"Update",
"href",
"attributes",
"in",
"ditamap",
"and",
"topic",
"files",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/ChunkModule.java#L136-L154 |
48,738 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTermCollection.java | IndexTermCollection.addTerm | public void addTerm(final IndexTerm term) {
int i = 0;
final int termNum = termList.size();
for (; i < termNum; i++) {
final IndexTerm indexTerm = termList.get(i);
if (indexTerm.equals(term)) {
return;
}
// Add targets when same t... | java | public void addTerm(final IndexTerm term) {
int i = 0;
final int termNum = termList.size();
for (; i < termNum; i++) {
final IndexTerm indexTerm = termList.get(i);
if (indexTerm.equals(term)) {
return;
}
// Add targets when same t... | [
"public",
"void",
"addTerm",
"(",
"final",
"IndexTerm",
"term",
")",
"{",
"int",
"i",
"=",
"0",
";",
"final",
"int",
"termNum",
"=",
"termList",
".",
"size",
"(",
")",
";",
"for",
"(",
";",
"i",
"<",
"termNum",
";",
"i",
"++",
")",
"{",
"final",
... | All a new term into the collection.
@param term index term | [
"All",
"a",
"new",
"term",
"into",
"the",
"collection",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTermCollection.java#L99-L121 |
48,739 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTermCollection.java | IndexTermCollection.sort | public void sort() {
if (IndexTerm.getTermLocale() == null ||
IndexTerm.getTermLocale().getLanguage().trim().length() == 0) {
IndexTerm.setTermLocale(new Locale(LANGUAGE_EN,
COUNTRY_US));
}
/*
* Sort all the terms recursively
*/
... | java | public void sort() {
if (IndexTerm.getTermLocale() == null ||
IndexTerm.getTermLocale().getLanguage().trim().length() == 0) {
IndexTerm.setTermLocale(new Locale(LANGUAGE_EN,
COUNTRY_US));
}
/*
* Sort all the terms recursively
*/
... | [
"public",
"void",
"sort",
"(",
")",
"{",
"if",
"(",
"IndexTerm",
".",
"getTermLocale",
"(",
")",
"==",
"null",
"||",
"IndexTerm",
".",
"getTermLocale",
"(",
")",
".",
"getLanguage",
"(",
")",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0... | Sort term list extracted from dita files base on Locale. | [
"Sort",
"term",
"list",
"extracted",
"from",
"dita",
"files",
"base",
"on",
"Locale",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTermCollection.java#L135-L150 |
48,740 | dita-ot/dita-ot | src/main/java/org/dita/dost/index/IndexTermCollection.java | IndexTermCollection.outputTerms | public void outputTerms() throws DITAOTException {
StringBuilder buff = new StringBuilder(outputFileRoot);
AbstractWriter abstractWriter = null;
if (indexClass != null && indexClass.length() > 0) {
//Instantiate the class value
Class<?> anIndexClass;
try {
... | java | public void outputTerms() throws DITAOTException {
StringBuilder buff = new StringBuilder(outputFileRoot);
AbstractWriter abstractWriter = null;
if (indexClass != null && indexClass.length() > 0) {
//Instantiate the class value
Class<?> anIndexClass;
try {
... | [
"public",
"void",
"outputTerms",
"(",
")",
"throws",
"DITAOTException",
"{",
"StringBuilder",
"buff",
"=",
"new",
"StringBuilder",
"(",
"outputFileRoot",
")",
";",
"AbstractWriter",
"abstractWriter",
"=",
"null",
";",
"if",
"(",
"indexClass",
"!=",
"null",
"&&",... | Output index terms into index file.
@throws DITAOTException exception | [
"Output",
"index",
"terms",
"into",
"index",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/index/IndexTermCollection.java#L157-L199 |
48,741 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/AbstractDitaMetaWriter.java | AbstractDitaMetaWriter.skipUnlockedNavtitle | boolean skipUnlockedNavtitle(final Element metadataContainer, final Element checkForNavtitle) {
if (!TOPIC_TITLEALTS.matches(metadataContainer) ||
!TOPIC_NAVTITLE.matches(checkForNavtitle)) {
return false;
} else if (checkForNavtitle.getAttributeNodeNS(DITA_OT_NS, ATTRIBUTE_N... | java | boolean skipUnlockedNavtitle(final Element metadataContainer, final Element checkForNavtitle) {
if (!TOPIC_TITLEALTS.matches(metadataContainer) ||
!TOPIC_NAVTITLE.matches(checkForNavtitle)) {
return false;
} else if (checkForNavtitle.getAttributeNodeNS(DITA_OT_NS, ATTRIBUTE_N... | [
"boolean",
"skipUnlockedNavtitle",
"(",
"final",
"Element",
"metadataContainer",
",",
"final",
"Element",
"checkForNavtitle",
")",
"{",
"if",
"(",
"!",
"TOPIC_TITLEALTS",
".",
"matches",
"(",
"metadataContainer",
")",
"||",
"!",
"TOPIC_NAVTITLE",
".",
"matches",
"... | Check if an element is an unlocked navtitle, which should not be pushed into topics.
@param metadataContainer container element
@param checkForNavtitle title element | [
"Check",
"if",
"an",
"element",
"is",
"an",
"unlocked",
"navtitle",
"which",
"should",
"not",
"be",
"pushed",
"into",
"topics",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/AbstractDitaMetaWriter.java#L86-L96 |
48,742 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/AbstractDitaMetaWriter.java | AbstractDitaMetaWriter.getNewChildren | private List<Element> getNewChildren(final DitaClass cls, final Document doc) {
final List<Element> res = new ArrayList<>();
if (metaTable.containsKey(cls.matcher)) {
metaTable.get(cls.matcher);
final NodeList list = metaTable.get(cls.matcher).getChildNodes();
for (in... | java | private List<Element> getNewChildren(final DitaClass cls, final Document doc) {
final List<Element> res = new ArrayList<>();
if (metaTable.containsKey(cls.matcher)) {
metaTable.get(cls.matcher);
final NodeList list = metaTable.get(cls.matcher).getChildNodes();
for (in... | [
"private",
"List",
"<",
"Element",
">",
"getNewChildren",
"(",
"final",
"DitaClass",
"cls",
",",
"final",
"Document",
"doc",
")",
"{",
"final",
"List",
"<",
"Element",
">",
"res",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"metaTable",
".... | Get metadata elements to add to current document. Elements have been cloned and imported
into the current document.
@param cls element class of metadata elements
@param doc current document
@return list of metadata elements, may be empty | [
"Get",
"metadata",
"elements",
"to",
"add",
"to",
"current",
"document",
".",
"Elements",
"have",
"been",
"cloned",
"and",
"imported",
"into",
"the",
"current",
"document",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/AbstractDitaMetaWriter.java#L106-L118 |
48,743 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.createTopicStump | private void createTopicStump(final URI newFile) {
try (final OutputStream newFileWriter = new FileOutputStream(new File(newFile))) {
final XMLStreamWriter o = XMLOutputFactory.newInstance().createXMLStreamWriter(newFileWriter, UTF8);
o.writeStartDocument();
o.writeProcessing... | java | private void createTopicStump(final URI newFile) {
try (final OutputStream newFileWriter = new FileOutputStream(new File(newFile))) {
final XMLStreamWriter o = XMLOutputFactory.newInstance().createXMLStreamWriter(newFileWriter, UTF8);
o.writeStartDocument();
o.writeProcessing... | [
"private",
"void",
"createTopicStump",
"(",
"final",
"URI",
"newFile",
")",
"{",
"try",
"(",
"final",
"OutputStream",
"newFileWriter",
"=",
"new",
"FileOutputStream",
"(",
"new",
"File",
"(",
"newFile",
")",
")",
")",
"{",
"final",
"XMLStreamWriter",
"o",
"=... | Create the new topic stump. | [
"Create",
"the",
"new",
"topic",
"stump",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L238-L254 |
48,744 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.readProcessingInstructions | private void readProcessingInstructions(final Document doc) {
final NodeList docNodes = doc.getChildNodes();
for (int i = 0; i < docNodes.getLength(); i++) {
final Node node = docNodes.item(i);
if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
final Pr... | java | private void readProcessingInstructions(final Document doc) {
final NodeList docNodes = doc.getChildNodes();
for (int i = 0; i < docNodes.getLength(); i++) {
final Node node = docNodes.item(i);
if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
final Pr... | [
"private",
"void",
"readProcessingInstructions",
"(",
"final",
"Document",
"doc",
")",
"{",
"final",
"NodeList",
"docNodes",
"=",
"doc",
".",
"getChildNodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"docNodes",
".",
"getLength",
"... | Read processing metadata from processing instructions. | [
"Read",
"processing",
"metadata",
"from",
"processing",
"instructions",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L259-L284 |
48,745 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.processNavitation | private void processNavitation(final Element topicref) {
// create new map's root element
final Element root = (Element) topicref.getOwnerDocument().getDocumentElement().cloneNode(false);
// create navref element
final Element navref = topicref.getOwnerDocument().createElement(MAP_NAVREF... | java | private void processNavitation(final Element topicref) {
// create new map's root element
final Element root = (Element) topicref.getOwnerDocument().getDocumentElement().cloneNode(false);
// create navref element
final Element navref = topicref.getOwnerDocument().createElement(MAP_NAVREF... | [
"private",
"void",
"processNavitation",
"(",
"final",
"Element",
"topicref",
")",
"{",
"// create new map's root element",
"final",
"Element",
"root",
"=",
"(",
"Element",
")",
"topicref",
".",
"getOwnerDocument",
"(",
")",
".",
"getDocumentElement",
"(",
")",
"."... | Create new map and refer to it with navref. | [
"Create",
"new",
"map",
"and",
"refer",
"to",
"it",
"with",
"navref",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L383-L398 |
48,746 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.generateStumpTopic | private void generateStumpTopic(final Element topicref) {
final URI result = getResultFile(topicref);
final URI temp = tempFileNameScheme.generateTempFileName(result);
final URI absTemp = job.tempDir.toURI().resolve(temp);
final String name = getBaseName(new File(result).getName());
... | java | private void generateStumpTopic(final Element topicref) {
final URI result = getResultFile(topicref);
final URI temp = tempFileNameScheme.generateTempFileName(result);
final URI absTemp = job.tempDir.toURI().resolve(temp);
final String name = getBaseName(new File(result).getName());
... | [
"private",
"void",
"generateStumpTopic",
"(",
"final",
"Element",
"topicref",
")",
"{",
"final",
"URI",
"result",
"=",
"getResultFile",
"(",
"topicref",
")",
";",
"final",
"URI",
"temp",
"=",
"tempFileNameScheme",
".",
"generateTempFileName",
"(",
"result",
")",... | Generate stump topic for to-content content.
@param topicref topicref without href to generate stump topic for | [
"Generate",
"stump",
"topic",
"for",
"to",
"-",
"content",
"content",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L414-L442 |
48,747 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.createChildTopicrefStubs | private void createChildTopicrefStubs(final List<Element> topicrefs) {
if (!topicrefs.isEmpty()) {
for (final Element currentElem : topicrefs) {
final String href = getValue(currentElem, ATTRIBUTE_NAME_HREF);
final String chunk = getValue(currentElem,ATTRIBUTE_NAME_CH... | java | private void createChildTopicrefStubs(final List<Element> topicrefs) {
if (!topicrefs.isEmpty()) {
for (final Element currentElem : topicrefs) {
final String href = getValue(currentElem, ATTRIBUTE_NAME_HREF);
final String chunk = getValue(currentElem,ATTRIBUTE_NAME_CH... | [
"private",
"void",
"createChildTopicrefStubs",
"(",
"final",
"List",
"<",
"Element",
">",
"topicrefs",
")",
"{",
"if",
"(",
"!",
"topicrefs",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"final",
"Element",
"currentElem",
":",
"topicrefs",
")",
"{",
"... | Before combining topics in a branch, ensure any descendant topicref with @chunk and no @href has a stub | [
"Before",
"combining",
"topics",
"in",
"a",
"branch",
"ensure",
"any",
"descendant",
"topicref",
"with"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L550-L561 |
48,748 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.getChangeTable | public Map<URI, URI> getChangeTable() {
for (final Map.Entry<URI, URI> e : changeTable.entrySet()) {
assert e.getKey().isAbsolute();
assert e.getValue().isAbsolute();
}
return Collections.unmodifiableMap(changeTable);
} | java | public Map<URI, URI> getChangeTable() {
for (final Map.Entry<URI, URI> e : changeTable.entrySet()) {
assert e.getKey().isAbsolute();
assert e.getValue().isAbsolute();
}
return Collections.unmodifiableMap(changeTable);
} | [
"public",
"Map",
"<",
"URI",
",",
"URI",
">",
"getChangeTable",
"(",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"URI",
",",
"URI",
">",
"e",
":",
"changeTable",
".",
"entrySet",
"(",
")",
")",
"{",
"assert",
"e",
".",
"getKey",
"(",... | Get changed files table.
@return map of changed files, absolute temporary files | [
"Get",
"changed",
"files",
"table",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L594-L600 |
48,749 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/ChunkMapReader.java | ChunkMapReader.getConflicTable | public Map<URI, URI> getConflicTable() {
for (final Map.Entry<URI, URI> e : conflictTable.entrySet()) {
assert e.getKey().isAbsolute();
assert e.getValue().isAbsolute();
}
return conflictTable;
} | java | public Map<URI, URI> getConflicTable() {
for (final Map.Entry<URI, URI> e : conflictTable.entrySet()) {
assert e.getKey().isAbsolute();
assert e.getValue().isAbsolute();
}
return conflictTable;
} | [
"public",
"Map",
"<",
"URI",
",",
"URI",
">",
"getConflicTable",
"(",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"URI",
",",
"URI",
">",
"e",
":",
"conflictTable",
".",
"entrySet",
"(",
")",
")",
"{",
"assert",
"e",
".",
"getKey",
"... | get conflict table.
@return conflict table, absolute temporary files | [
"get",
"conflict",
"table",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/ChunkMapReader.java#L607-L613 |
48,750 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/ImportAntAction.java | ImportAntAction.getResult | @Override
public void getResult(final ContentHandler buf) throws SAXException {
for (final Value value: valueSet) {
final String[] tokens = value.value.split("[/\\\\]", 2);
buf.startElement(NULL_NS_URI, "import", "import", XMLUtils.EMPTY_ATTRIBUTES);
buf.startElement(NULL... | java | @Override
public void getResult(final ContentHandler buf) throws SAXException {
for (final Value value: valueSet) {
final String[] tokens = value.value.split("[/\\\\]", 2);
buf.startElement(NULL_NS_URI, "import", "import", XMLUtils.EMPTY_ATTRIBUTES);
buf.startElement(NULL... | [
"@",
"Override",
"public",
"void",
"getResult",
"(",
"final",
"ContentHandler",
"buf",
")",
"throws",
"SAXException",
"{",
"for",
"(",
"final",
"Value",
"value",
":",
"valueSet",
")",
"{",
"final",
"String",
"[",
"]",
"tokens",
"=",
"value",
".",
"value",
... | Generate Ant import task. | [
"Generate",
"Ant",
"import",
"task",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/ImportAntAction.java#L28-L40 |
48,751 | dita-ot/dita-ot | src/main/java/org/dita/dost/pipeline/PipelineHashIO.java | PipelineHashIO.setAttribute | @Override
public void setAttribute(final String name, final String value) {
hash.put(name, value);
} | java | @Override
public void setAttribute(final String name, final String value) {
hash.put(name, value);
} | [
"@",
"Override",
"public",
"void",
"setAttribute",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"hash",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"}"
] | Set the attribute vale with name into hash map.
@param name name
@param value value | [
"Set",
"the",
"attribute",
"vale",
"with",
"name",
"into",
"hash",
"map",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/pipeline/PipelineHashIO.java#L42-L45 |
48,752 | dita-ot/dita-ot | src/main/java/org/dita/dost/pipeline/PipelineHashIO.java | PipelineHashIO.getAttribute | @Override
public String getAttribute(final String name) {
String value;
value = hash.get(name);
return value;
} | java | @Override
public String getAttribute(final String name) {
String value;
value = hash.get(name);
return value;
} | [
"@",
"Override",
"public",
"String",
"getAttribute",
"(",
"final",
"String",
"name",
")",
"{",
"String",
"value",
";",
"value",
"=",
"hash",
".",
"get",
"(",
"name",
")",
";",
"return",
"value",
";",
"}"
] | Get the attribute value according to its name.
@param name name
@return String value | [
"Get",
"the",
"attribute",
"value",
"according",
"to",
"its",
"name",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/pipeline/PipelineHashIO.java#L53-L58 |
48,753 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/MapMetaReader.java | MapMetaReader.read | @Override
public void read(final File filename) {
filePath = filename;
//clear the history on global metadata table
globalMeta.clear();
super.read(filename);
} | java | @Override
public void read(final File filename) {
filePath = filename;
//clear the history on global metadata table
globalMeta.clear();
super.read(filename);
} | [
"@",
"Override",
"public",
"void",
"read",
"(",
"final",
"File",
"filename",
")",
"{",
"filePath",
"=",
"filename",
";",
"//clear the history on global metadata table",
"globalMeta",
".",
"clear",
"(",
")",
";",
"super",
".",
"read",
"(",
"filename",
")",
";",... | read map files.
@param filename filename | [
"read",
"map",
"files",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/MapMetaReader.java#L124-L131 |
48,754 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/MapMetaReader.java | MapMetaReader.removeIndexTermRecursive | private void removeIndexTermRecursive(final Element parent) {
if (parent == null) {
return;
}
final NodeList children = parent.getChildNodes();
Element child;
for (int i = children.getLength() - 1; i >= 0; i--) {
if (children.item(i).getNodeType() == Node.... | java | private void removeIndexTermRecursive(final Element parent) {
if (parent == null) {
return;
}
final NodeList children = parent.getChildNodes();
Element child;
for (int i = children.getLength() - 1; i >= 0; i--) {
if (children.item(i).getNodeType() == Node.... | [
"private",
"void",
"removeIndexTermRecursive",
"(",
"final",
"Element",
"parent",
")",
"{",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"NodeList",
"children",
"=",
"parent",
".",
"getChildNodes",
"(",
")",
";",
"Element",
"ch... | traverse the node tree and remove all indexterm elements with either start or
end attribute.
@param parent root element | [
"traverse",
"the",
"node",
"tree",
"and",
"remove",
"all",
"indexterm",
"elements",
"with",
"either",
"start",
"or",
"end",
"attribute",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/MapMetaReader.java#L171-L190 |
48,755 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/MapMetaReader.java | MapMetaReader.cloneElementMap | private Map<String, Element> cloneElementMap(final Map<String, Element> current) {
final Map<String, Element> topicMetaTable = new HashMap<>(16);
for (final Entry<String, Element> topicMetaItem: current.entrySet()) {
topicMetaTable.put(topicMetaItem.getKey(), (Element) resultDoc.importNode(t... | java | private Map<String, Element> cloneElementMap(final Map<String, Element> current) {
final Map<String, Element> topicMetaTable = new HashMap<>(16);
for (final Entry<String, Element> topicMetaItem: current.entrySet()) {
topicMetaTable.put(topicMetaItem.getKey(), (Element) resultDoc.importNode(t... | [
"private",
"Map",
"<",
"String",
",",
"Element",
">",
"cloneElementMap",
"(",
"final",
"Map",
"<",
"String",
",",
"Element",
">",
"current",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Element",
">",
"topicMetaTable",
"=",
"new",
"HashMap",
"<>",
"(",... | Clone metadata map.
@param current metadata map to clone
@return a clone of the original map | [
"Clone",
"metadata",
"map",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/MapMetaReader.java#L276-L282 |
48,756 | dita-ot/dita-ot | src/main/java/org/dita/dost/Processor.java | Processor.setProperty | public Processor setProperty(final String name, final String value) {
args.put(name, value);
return this;
} | java | public Processor setProperty(final String name, final String value) {
args.put(name, value);
return this;
} | [
"public",
"Processor",
"setProperty",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"args",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Set property. Existing property mapping will be overridden.
@param name property name
@param value property value
@return this Process object | [
"Set",
"property",
".",
"Existing",
"property",
"mapping",
"will",
"be",
"overridden",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/Processor.java#L113-L116 |
48,757 | dita-ot/dita-ot | src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java | CHMIndexWriter.findTargets | private void findTargets(final IndexTerm term) {
final List<IndexTerm> subTerms = term.getSubTerms();
List<IndexTermTarget> subTargets = null;
if (subTerms != null && ! subTerms.isEmpty()){
for (final IndexTerm subTerm : subTerms) {
subTargets = subTerm.getTargetList(... | java | private void findTargets(final IndexTerm term) {
final List<IndexTerm> subTerms = term.getSubTerms();
List<IndexTermTarget> subTargets = null;
if (subTerms != null && ! subTerms.isEmpty()){
for (final IndexTerm subTerm : subTerms) {
subTargets = subTerm.getTargetList(... | [
"private",
"void",
"findTargets",
"(",
"final",
"IndexTerm",
"term",
")",
"{",
"final",
"List",
"<",
"IndexTerm",
">",
"subTerms",
"=",
"term",
".",
"getSubTerms",
"(",
")",
";",
"List",
"<",
"IndexTermTarget",
">",
"subTargets",
"=",
"null",
";",
"if",
... | find the targets in its subterms when the current term doesn't have any target
@param term The current IndexTerm instance | [
"find",
"the",
"targets",
"in",
"its",
"subterms",
"when",
"the",
"current",
"term",
"doesn",
"t",
"have",
"any",
"target"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java#L134-L154 |
48,758 | dita-ot/dita-ot | src/main/java/org/dita/dost/ProcessorFactory.java | ProcessorFactory.setBaseTempDir | public void setBaseTempDir(final File tmp) {
if (!tmp.isAbsolute()) {
throw new IllegalArgumentException("Temporary directory must be absolute");
}
args.put("base.temp.dir", tmp.getAbsolutePath());
} | java | public void setBaseTempDir(final File tmp) {
if (!tmp.isAbsolute()) {
throw new IllegalArgumentException("Temporary directory must be absolute");
}
args.put("base.temp.dir", tmp.getAbsolutePath());
} | [
"public",
"void",
"setBaseTempDir",
"(",
"final",
"File",
"tmp",
")",
"{",
"if",
"(",
"!",
"tmp",
".",
"isAbsolute",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Temporary directory must be absolute\"",
")",
";",
"}",
"args",
".",
... | Set base directory for temporary directories.
@param tmp absolute directory for temporary directories | [
"Set",
"base",
"directory",
"for",
"temporary",
"directories",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ProcessorFactory.java#L40-L45 |
48,759 | dita-ot/dita-ot | src/main/java/org/dita/dost/ProcessorFactory.java | ProcessorFactory.newProcessor | public Processor newProcessor(final String transtype) {
if (ditaDir == null) {
throw new IllegalStateException();
}
if (!Configuration.transtypes.contains(transtype)) {
throw new IllegalArgumentException("Transtype " + transtype + " not supported");
}
retu... | java | public Processor newProcessor(final String transtype) {
if (ditaDir == null) {
throw new IllegalStateException();
}
if (!Configuration.transtypes.contains(transtype)) {
throw new IllegalArgumentException("Transtype " + transtype + " not supported");
}
retu... | [
"public",
"Processor",
"newProcessor",
"(",
"final",
"String",
"transtype",
")",
"{",
"if",
"(",
"ditaDir",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"if",
"(",
"!",
"Configuration",
".",
"transtypes",
".",
"conta... | Create new Processor to run DITA-OT
@param transtype transtype for the processor
@return new Processor instance | [
"Create",
"new",
"Processor",
"to",
"run",
"DITA",
"-",
"OT"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ProcessorFactory.java#L53-L61 |
48,760 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/Plugins.java | Plugins.getInstalledPlugins | public static List<String> getInstalledPlugins() {
final List<Element> plugins = toList(getPluginConfiguration().getElementsByTagName("plugin"));
return plugins.stream()
.map((Element elem) -> elem.getAttributeNode("id"))
.filter(Objects::nonNull)
.map(Att... | java | public static List<String> getInstalledPlugins() {
final List<Element> plugins = toList(getPluginConfiguration().getElementsByTagName("plugin"));
return plugins.stream()
.map((Element elem) -> elem.getAttributeNode("id"))
.filter(Objects::nonNull)
.map(Att... | [
"public",
"static",
"List",
"<",
"String",
">",
"getInstalledPlugins",
"(",
")",
"{",
"final",
"List",
"<",
"Element",
">",
"plugins",
"=",
"toList",
"(",
"getPluginConfiguration",
"(",
")",
".",
"getElementsByTagName",
"(",
"\"plugin\"",
")",
")",
";",
"ret... | Read the list of installed plugins | [
"Read",
"the",
"list",
"of",
"installed",
"plugins"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/Plugins.java#L32-L40 |
48,761 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/Plugins.java | Plugins.getPluginConfiguration | public static Document getPluginConfiguration() {
try (final InputStream in = Plugins.class.getClassLoader().getResourceAsStream(PLUGIN_CONF)) {
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
} catch (final ParserConfigurationException | SAXException | IOExceptio... | java | public static Document getPluginConfiguration() {
try (final InputStream in = Plugins.class.getClassLoader().getResourceAsStream(PLUGIN_CONF)) {
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
} catch (final ParserConfigurationException | SAXException | IOExceptio... | [
"public",
"static",
"Document",
"getPluginConfiguration",
"(",
")",
"{",
"try",
"(",
"final",
"InputStream",
"in",
"=",
"Plugins",
".",
"class",
".",
"getClassLoader",
"(",
")",
".",
"getResourceAsStream",
"(",
"PLUGIN_CONF",
")",
")",
"{",
"return",
"Document... | Read plugin configuration | [
"Read",
"plugin",
"configuration"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/Plugins.java#L45-L51 |
48,762 | dita-ot/dita-ot | src/main/java/org/dita/dost/platform/Features.java | Features.addFeature | public final void addFeature(final String id, final Element elem) {
boolean isFile;
String value = elem.getAttribute("file");
if (!value.isEmpty()) {
isFile = true;
} else {
value = elem.getAttribute("value");
isFile = "file".equals(elem.getAttribute("... | java | public final void addFeature(final String id, final Element elem) {
boolean isFile;
String value = elem.getAttribute("file");
if (!value.isEmpty()) {
isFile = true;
} else {
value = elem.getAttribute("value");
isFile = "file".equals(elem.getAttribute("... | [
"public",
"final",
"void",
"addFeature",
"(",
"final",
"String",
"id",
",",
"final",
"Element",
"elem",
")",
"{",
"boolean",
"isFile",
";",
"String",
"value",
"=",
"elem",
".",
"getAttribute",
"(",
"\"file\"",
")",
";",
"if",
"(",
"!",
"value",
".",
"i... | Add feature to the feature table.
@param id feature id
@param elem configuration element | [
"Add",
"feature",
"to",
"the",
"feature",
"table",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/Features.java#L109-L138 |
48,763 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.close | public void close() throws IOException {
if (outStream == null && outWriter == null) {
throw new IllegalStateException();
}
if (outStream != null) {
outStream.close();
}
if (outWriter != null) {
outWriter.close();
}
} | java | public void close() throws IOException {
if (outStream == null && outWriter == null) {
throw new IllegalStateException();
}
if (outStream != null) {
outStream.close();
}
if (outWriter != null) {
outWriter.close();
}
} | [
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"outStream",
"==",
"null",
"&&",
"outWriter",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"if",
"(",
"outStream",
"!=",
"null",
")",
... | Close output.
@throws IOException if closing result output failed | [
"Close",
"output",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L120-L130 |
48,764 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.writeStartElement | public void writeStartElement(final String uri, final String qName) throws SAXException {
processStartElement();
final QName res = new QName(uri, qName);
addNamespace(res.uri, res.prefix, res);
elementStack.addFirst(res); // push
openStartElement = true;
} | java | public void writeStartElement(final String uri, final String qName) throws SAXException {
processStartElement();
final QName res = new QName(uri, qName);
addNamespace(res.uri, res.prefix, res);
elementStack.addFirst(res); // push
openStartElement = true;
} | [
"public",
"void",
"writeStartElement",
"(",
"final",
"String",
"uri",
",",
"final",
"String",
"qName",
")",
"throws",
"SAXException",
"{",
"processStartElement",
"(",
")",
";",
"final",
"QName",
"res",
"=",
"new",
"QName",
"(",
"uri",
",",
"qName",
")",
";... | Write start element without attributes.
@param qName element QName
@throws SAXException if processing the event failed | [
"Write",
"start",
"element",
"without",
"attributes",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L169-L175 |
48,765 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.writeNamespace | public void writeNamespace(final String prefix, final String uri) {
if (!openStartElement) {
throw new IllegalStateException("Current state does not allow Namespace writing");
}
final QName qName = elementStack.getFirst(); // peek
for (final NamespaceMapping p: qName.mappings... | java | public void writeNamespace(final String prefix, final String uri) {
if (!openStartElement) {
throw new IllegalStateException("Current state does not allow Namespace writing");
}
final QName qName = elementStack.getFirst(); // peek
for (final NamespaceMapping p: qName.mappings... | [
"public",
"void",
"writeNamespace",
"(",
"final",
"String",
"prefix",
",",
"final",
"String",
"uri",
")",
"{",
"if",
"(",
"!",
"openStartElement",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Current state does not allow Namespace writing\"",
")",
";",... | Write namepace prefix.
@param prefix namespace prefix
@param uri namespace URI
@throws IllegalStateException if start element is not open
@throws IllegalArgumentException if prefix is already bound | [
"Write",
"namepace",
"prefix",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L185-L198 |
48,766 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.writeEndElement | public void writeEndElement() throws SAXException {
processStartElement();
final QName qName = elementStack.remove(); // pop
transformer.endElement(qName.uri, qName.localName, qName.qName);
for (final NamespaceMapping p: qName.mappings) {
if (p.newMapping) {
t... | java | public void writeEndElement() throws SAXException {
processStartElement();
final QName qName = elementStack.remove(); // pop
transformer.endElement(qName.uri, qName.localName, qName.qName);
for (final NamespaceMapping p: qName.mappings) {
if (p.newMapping) {
t... | [
"public",
"void",
"writeEndElement",
"(",
")",
"throws",
"SAXException",
"{",
"processStartElement",
"(",
")",
";",
"final",
"QName",
"qName",
"=",
"elementStack",
".",
"remove",
"(",
")",
";",
"// pop",
"transformer",
".",
"endElement",
"(",
"qName",
".",
"... | Write end element.
@throws SAXException if processing the event failed | [
"Write",
"end",
"element",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L236-L245 |
48,767 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.writeProcessingInstruction | public void writeProcessingInstruction(final String target, final String data) throws SAXException {
processStartElement();
transformer.processingInstruction(target, data != null ? data : "");
} | java | public void writeProcessingInstruction(final String target, final String data) throws SAXException {
processStartElement();
transformer.processingInstruction(target, data != null ? data : "");
} | [
"public",
"void",
"writeProcessingInstruction",
"(",
"final",
"String",
"target",
",",
"final",
"String",
"data",
")",
"throws",
"SAXException",
"{",
"processStartElement",
"(",
")",
";",
"transformer",
".",
"processingInstruction",
"(",
"target",
",",
"data",
"!=... | Write processing instruction.
@param target processing instruction name
@param data processing instruction data, {@code null} if no data
@throws SAXException if processing the event failed | [
"Write",
"processing",
"instruction",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L286-L289 |
48,768 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/XMLSerializer.java | XMLSerializer.writeComment | public void writeComment(final String data) throws SAXException {
processStartElement();
final char[] ch = data.toCharArray();
transformer.comment(ch, 0, ch.length);
} | java | public void writeComment(final String data) throws SAXException {
processStartElement();
final char[] ch = data.toCharArray();
transformer.comment(ch, 0, ch.length);
} | [
"public",
"void",
"writeComment",
"(",
"final",
"String",
"data",
")",
"throws",
"SAXException",
"{",
"processStartElement",
"(",
")",
";",
"final",
"char",
"[",
"]",
"ch",
"=",
"data",
".",
"toCharArray",
"(",
")",
";",
"transformer",
".",
"comment",
"(",... | Write comment.
@param data comment data
@throws SAXException if processing the event failed | [
"Write",
"comment",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L297-L301 |
48,769 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.isHTMLFile | @Deprecated
public static boolean isHTMLFile(final String lcasefn) {
for (final String ext: supportedHTMLExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | java | @Deprecated
public static boolean isHTMLFile(final String lcasefn) {
for (final String ext: supportedHTMLExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | [
"@",
"Deprecated",
"public",
"static",
"boolean",
"isHTMLFile",
"(",
"final",
"String",
"lcasefn",
")",
"{",
"for",
"(",
"final",
"String",
"ext",
":",
"supportedHTMLExtensions",
")",
"{",
"if",
"(",
"lcasefn",
".",
"endsWith",
"(",
"ext",
")",
")",
"{",
... | Return if the file is a html file by extension.
@param lcasefn file name
@return true if is html file and false otherwise | [
"Return",
"if",
"the",
"file",
"is",
"a",
"html",
"file",
"by",
"extension",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L96-L104 |
48,770 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.isResourceFile | @Deprecated
public static boolean isResourceFile(final String lcasefn) {
for (final String ext: supportedResourceExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | java | @Deprecated
public static boolean isResourceFile(final String lcasefn) {
for (final String ext: supportedResourceExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | [
"@",
"Deprecated",
"public",
"static",
"boolean",
"isResourceFile",
"(",
"final",
"String",
"lcasefn",
")",
"{",
"for",
"(",
"final",
"String",
"ext",
":",
"supportedResourceExtensions",
")",
"{",
"if",
"(",
"lcasefn",
".",
"endsWith",
"(",
"ext",
")",
")",
... | Return if the file is a resource file by its extension.
@param lcasefn file name in lower case.
@return {@code true} if file is a resource file, otherwise {@code false} | [
"Return",
"if",
"the",
"file",
"is",
"a",
"resource",
"file",
"by",
"its",
"extension",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L136-L144 |
48,771 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.isSupportedImageFile | @Deprecated
public static boolean isSupportedImageFile(final String lcasefn) {
for (final String ext: supportedImageExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | java | @Deprecated
public static boolean isSupportedImageFile(final String lcasefn) {
for (final String ext: supportedImageExtensions) {
if (lcasefn.endsWith(ext)) {
return true;
}
}
return false;
} | [
"@",
"Deprecated",
"public",
"static",
"boolean",
"isSupportedImageFile",
"(",
"final",
"String",
"lcasefn",
")",
"{",
"for",
"(",
"final",
"String",
"ext",
":",
"supportedImageExtensions",
")",
"{",
"if",
"(",
"lcasefn",
".",
"endsWith",
"(",
"ext",
")",
")... | Return if the file is a supported image file by extension.
@param lcasefn filename
@return true if is supported image and false otherwise | [
"Return",
"if",
"the",
"file",
"is",
"a",
"supported",
"image",
"file",
"by",
"extension",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L151-L159 |
48,772 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.normalizePath | private static String normalizePath(final String path, final String separator) {
final String p = path.replace(WINDOWS_SEPARATOR, separator).replace(UNIX_SEPARATOR, separator);
// remove "." from the directory.
final List<String> dirs = new LinkedList<>();
final StringTokenizer tokenizer... | java | private static String normalizePath(final String path, final String separator) {
final String p = path.replace(WINDOWS_SEPARATOR, separator).replace(UNIX_SEPARATOR, separator);
// remove "." from the directory.
final List<String> dirs = new LinkedList<>();
final StringTokenizer tokenizer... | [
"private",
"static",
"String",
"normalizePath",
"(",
"final",
"String",
"path",
",",
"final",
"String",
"separator",
")",
"{",
"final",
"String",
"p",
"=",
"path",
".",
"replace",
"(",
"WINDOWS_SEPARATOR",
",",
"separator",
")",
".",
"replace",
"(",
"UNIX_SE... | Remove redundant names ".." and "." from the given path and replace directory separators.
@param path input path
@param separator directory separator
@return processed path | [
"Remove",
"redundant",
"names",
"..",
"and",
".",
"from",
"the",
"given",
"path",
"and",
"replace",
"directory",
"separators",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L363-L413 |
48,773 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.isAbsolutePath | public static boolean isAbsolutePath (final String path) {
if (path == null || path.trim().length() == 0) {
return false;
}
if (File.separator.equals(UNIX_SEPARATOR)) {
return path.startsWith(UNIX_SEPARATOR);
} else
if (File.separator.equals(WINDOWS_SEPA... | java | public static boolean isAbsolutePath (final String path) {
if (path == null || path.trim().length() == 0) {
return false;
}
if (File.separator.equals(UNIX_SEPARATOR)) {
return path.startsWith(UNIX_SEPARATOR);
} else
if (File.separator.equals(WINDOWS_SEPA... | [
"public",
"static",
"boolean",
"isAbsolutePath",
"(",
"final",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
"||",
"path",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
... | Return if the path is absolute.
@param path test path
@return true if path is absolute and false otherwise. | [
"Return",
"if",
"the",
"path",
"is",
"absolute",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L421-L435 |
48,774 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.getExtension | public static String getExtension(final String file) {
final int index = file.indexOf(SHARP);
if (file.startsWith(SHARP)) {
return null;
} else if (index != -1) {
final String fileName = file.substring(0, index);
final int fileExtIndex = fileName.lastIndexOf(... | java | public static String getExtension(final String file) {
final int index = file.indexOf(SHARP);
if (file.startsWith(SHARP)) {
return null;
} else if (index != -1) {
final String fileName = file.substring(0, index);
final int fileExtIndex = fileName.lastIndexOf(... | [
"public",
"static",
"String",
"getExtension",
"(",
"final",
"String",
"file",
")",
"{",
"final",
"int",
"index",
"=",
"file",
".",
"indexOf",
"(",
"SHARP",
")",
";",
"if",
"(",
"file",
".",
"startsWith",
"(",
"SHARP",
")",
")",
"{",
"return",
"null",
... | Get file extension
@param file filename, may contain a URL fragment
@return file extensions, {@code null} if no extension was found | [
"Get",
"file",
"extension"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L472-L485 |
48,775 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.getName | public static String getName(final String aURLString) {
int pathnameEndIndex;
if (isWindows()) {
if (aURLString.contains(SHARP)) {
pathnameEndIndex = aURLString.lastIndexOf(SHARP);
} else {
pathnameEndIndex = aURLString.lastIndexOf(WINDOWS_SEPARATO... | java | public static String getName(final String aURLString) {
int pathnameEndIndex;
if (isWindows()) {
if (aURLString.contains(SHARP)) {
pathnameEndIndex = aURLString.lastIndexOf(SHARP);
} else {
pathnameEndIndex = aURLString.lastIndexOf(WINDOWS_SEPARATO... | [
"public",
"static",
"String",
"getName",
"(",
"final",
"String",
"aURLString",
")",
"{",
"int",
"pathnameEndIndex",
";",
"if",
"(",
"isWindows",
"(",
")",
")",
"{",
"if",
"(",
"aURLString",
".",
"contains",
"(",
"SHARP",
")",
")",
"{",
"pathnameEndIndex",
... | Get filename from a path.
@param aURLString Windows, UNIX, or URI path, may contain hash fragment
@return filename without path or hash fragment | [
"Get",
"filename",
"from",
"a",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L493-L519 |
48,776 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.getFullPathNoEndSeparator | public static String getFullPathNoEndSeparator(final String aURLString) {
final int pathnameStartIndex = aURLString.indexOf(UNIX_SEPARATOR);
final int pathnameEndIndex = aURLString.lastIndexOf(UNIX_SEPARATOR);
String aPath = aURLString.substring(0, pathnameEndIndex);
return aPath;
} | java | public static String getFullPathNoEndSeparator(final String aURLString) {
final int pathnameStartIndex = aURLString.indexOf(UNIX_SEPARATOR);
final int pathnameEndIndex = aURLString.lastIndexOf(UNIX_SEPARATOR);
String aPath = aURLString.substring(0, pathnameEndIndex);
return aPath;
} | [
"public",
"static",
"String",
"getFullPathNoEndSeparator",
"(",
"final",
"String",
"aURLString",
")",
"{",
"final",
"int",
"pathnameStartIndex",
"=",
"aURLString",
".",
"indexOf",
"(",
"UNIX_SEPARATOR",
")",
";",
"final",
"int",
"pathnameEndIndex",
"=",
"aURLString"... | Get base path from a path.
@param aURLString UNIX or URI path
@return base path | [
"Get",
"base",
"path",
"from",
"a",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L538-L543 |
48,777 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.stripFragment | @Deprecated
public static String stripFragment(final String path) {
final int i = path.indexOf(SHARP);
if (i != -1) {
return path.substring(0, i);
} else {
return path;
}
} | java | @Deprecated
public static String stripFragment(final String path) {
final int i = path.indexOf(SHARP);
if (i != -1) {
return path.substring(0, i);
} else {
return path;
}
} | [
"@",
"Deprecated",
"public",
"static",
"String",
"stripFragment",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"int",
"i",
"=",
"path",
".",
"indexOf",
"(",
"SHARP",
")",
";",
"if",
"(",
"i",
"!=",
"-",
"1",
")",
"{",
"return",
"path",
".",
"... | Strip fragment part from path.
@param path path
@return path without path | [
"Strip",
"fragment",
"part",
"from",
"path",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L551-L559 |
48,778 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/FileUtils.java | FileUtils.getFragment | @Deprecated
public static String getFragment(final String path, final String defaultValue) {
final int i = path.indexOf(SHARP);
if (i != -1) {
return path.substring(i + 1);
} else {
return defaultValue;
}
} | java | @Deprecated
public static String getFragment(final String path, final String defaultValue) {
final int i = path.indexOf(SHARP);
if (i != -1) {
return path.substring(i + 1);
} else {
return defaultValue;
}
} | [
"@",
"Deprecated",
"public",
"static",
"String",
"getFragment",
"(",
"final",
"String",
"path",
",",
"final",
"String",
"defaultValue",
")",
"{",
"final",
"int",
"i",
"=",
"path",
".",
"indexOf",
"(",
"SHARP",
")",
";",
"if",
"(",
"i",
"!=",
"-",
"1",
... | Get fragment part from path or return default fragment.
@param path path
@param defaultValue default fragment value
@return fragment without {@link Constants#SHARP}, default value if no fragment exists | [
"Get",
"fragment",
"part",
"from",
"path",
"or",
"return",
"default",
"fragment",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L592-L600 |
48,779 | dita-ot/dita-ot | src/main/java/org/ditang/relaxng/defaults/OxygenRelaxNGSchemaReader.java | OxygenRelaxNGSchemaReader.wrapPattern2 | private static SchemaWrapper wrapPattern2(Pattern start, SchemaPatternBuilder spb, PropertyMap properties)
throws SAXException, IncorrectSchemaException {
if (properties.contains(RngProperty.FEASIBLE)) {
//Use a feasible transform
start = FeasibleTransform.transform(spb, start);
}
//Get... | java | private static SchemaWrapper wrapPattern2(Pattern start, SchemaPatternBuilder spb, PropertyMap properties)
throws SAXException, IncorrectSchemaException {
if (properties.contains(RngProperty.FEASIBLE)) {
//Use a feasible transform
start = FeasibleTransform.transform(spb, start);
}
//Get... | [
"private",
"static",
"SchemaWrapper",
"wrapPattern2",
"(",
"Pattern",
"start",
",",
"SchemaPatternBuilder",
"spb",
",",
"PropertyMap",
"properties",
")",
"throws",
"SAXException",
",",
"IncorrectSchemaException",
"{",
"if",
"(",
"properties",
".",
"contains",
"(",
"... | Make a schema wrapper.
@param start Start pattern.
@param spb The schema pattern builder.
@param properties The properties map.
@return The schema wrapper. | [
"Make",
"a",
"schema",
"wrapper",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/ditang/relaxng/defaults/OxygenRelaxNGSchemaReader.java#L174-L205 |
48,780 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/XmlFilterModule.java | XmlFilterModule.execute | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input)
throws DITAOTException {
final Collection<FileInfo> fis = job.getFileInfo(fileInfoFilter);
for (final FileInfo f: fis) {
final URI file = job.tempDirURI.resolve(f.uri);
logger.info(... | java | @Override
public AbstractPipelineOutput execute(final AbstractPipelineInput input)
throws DITAOTException {
final Collection<FileInfo> fis = job.getFileInfo(fileInfoFilter);
for (final FileInfo f: fis) {
final URI file = job.tempDirURI.resolve(f.uri);
logger.info(... | [
"@",
"Override",
"public",
"AbstractPipelineOutput",
"execute",
"(",
"final",
"AbstractPipelineInput",
"input",
")",
"throws",
"DITAOTException",
"{",
"final",
"Collection",
"<",
"FileInfo",
">",
"fis",
"=",
"job",
".",
"getFileInfo",
"(",
"fileInfoFilter",
")",
"... | Filter files through XML filters.
@param input Input parameters and resources.
@return always returns {@code null} | [
"Filter",
"files",
"through",
"XML",
"filters",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/XmlFilterModule.java#L45-L59 |
48,781 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/SubjectSchemeReader.java | SubjectSchemeReader.writeMapToXML | public static void writeMapToXML(final Map<URI, Set<URI>> m, final File outputFile) throws IOException {
if (m == null) {
return;
}
final Properties prop = new Properties();
for (final Map.Entry<URI, Set<URI>> entry: m.entrySet()) {
final URI key = entry.getKey();... | java | public static void writeMapToXML(final Map<URI, Set<URI>> m, final File outputFile) throws IOException {
if (m == null) {
return;
}
final Properties prop = new Properties();
for (final Map.Entry<URI, Set<URI>> entry: m.entrySet()) {
final URI key = entry.getKey();... | [
"public",
"static",
"void",
"writeMapToXML",
"(",
"final",
"Map",
"<",
"URI",
",",
"Set",
"<",
"URI",
">",
">",
"m",
",",
"final",
"File",
"outputFile",
")",
"throws",
"IOException",
"{",
"if",
"(",
"m",
"==",
"null",
")",
"{",
"return",
";",
"}",
... | Write map of sets to a file.
<p>The serialization format is XML properties format where values are comma
separated lists.</p>
@param m map to serialize
@param outputFile output filename, relative to temporary directory | [
"Write",
"map",
"of",
"sets",
"to",
"a",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/SubjectSchemeReader.java#L142-L157 |
48,782 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/SubjectSchemeReader.java | SubjectSchemeReader.loadSubjectScheme | public void loadSubjectScheme(final File scheme) {
assert scheme.isAbsolute();
if (!scheme.exists()) {
throw new IllegalStateException();
}
logger.debug("Load subject scheme " + scheme);
try {
final DocumentBuilder builder = XMLUtils.getDocumentBuilder();... | java | public void loadSubjectScheme(final File scheme) {
assert scheme.isAbsolute();
if (!scheme.exists()) {
throw new IllegalStateException();
}
logger.debug("Load subject scheme " + scheme);
try {
final DocumentBuilder builder = XMLUtils.getDocumentBuilder();... | [
"public",
"void",
"loadSubjectScheme",
"(",
"final",
"File",
"scheme",
")",
"{",
"assert",
"scheme",
".",
"isAbsolute",
"(",
")",
";",
"if",
"(",
"!",
"scheme",
".",
"exists",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
... | Load schema file.
@param scheme absolute path for subject scheme | [
"Load",
"schema",
"file",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/SubjectSchemeReader.java#L164-L184 |
48,783 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/SubjectSchemeReader.java | SubjectSchemeReader.putValuePairsIntoMap | private void putValuePairsIntoMap(final Element subtree, final String elementName, final QName attName, final String category) {
if (subtree == null || attName == null) {
return;
}
Map<String, Set<String>> valueMap = validValuesMap.get(attName);
if (valueMap == null) {
... | java | private void putValuePairsIntoMap(final Element subtree, final String elementName, final QName attName, final String category) {
if (subtree == null || attName == null) {
return;
}
Map<String, Set<String>> valueMap = validValuesMap.get(attName);
if (valueMap == null) {
... | [
"private",
"void",
"putValuePairsIntoMap",
"(",
"final",
"Element",
"subtree",
",",
"final",
"String",
"elementName",
",",
"final",
"QName",
"attName",
",",
"final",
"String",
"category",
")",
"{",
"if",
"(",
"subtree",
"==",
"null",
"||",
"attName",
"==",
"... | Populate valid values map
@param subtree subject scheme definition element
@param elementName element name
@param attName attribute name
@param category enumeration category name | [
"Populate",
"valid",
"values",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/SubjectSchemeReader.java#L285-L320 |
48,784 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.processMap | private void processMap() throws DITAOTException {
final URI in = job.tempDirURI.resolve(job.getFileInfo(fi -> fi.isInput).iterator().next().uri);
final List<XMLFilter> pipe = getProcessingPipe(in);
xmlUtils.transform(in, pipe);
} | java | private void processMap() throws DITAOTException {
final URI in = job.tempDirURI.resolve(job.getFileInfo(fi -> fi.isInput).iterator().next().uri);
final List<XMLFilter> pipe = getProcessingPipe(in);
xmlUtils.transform(in, pipe);
} | [
"private",
"void",
"processMap",
"(",
")",
"throws",
"DITAOTException",
"{",
"final",
"URI",
"in",
"=",
"job",
".",
"tempDirURI",
".",
"resolve",
"(",
"job",
".",
"getFileInfo",
"(",
"fi",
"->",
"fi",
".",
"isInput",
")",
".",
"iterator",
"(",
")",
"."... | Process start map to read copy-to map and write unique topic references. | [
"Process",
"start",
"map",
"to",
"read",
"copy",
"-",
"to",
"map",
"and",
"write",
"unique",
"topic",
"references",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L94-L100 |
48,785 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.getProcessingPipe | private List<XMLFilter> getProcessingPipe(final URI fileToParse) {
final List<XMLFilter> pipe = new ArrayList<>();
if (forceUnique) {
forceUniqueFilter = new ForceUniqueFilter();
forceUniqueFilter.setLogger(logger);
forceUniqueFilter.setJob(job);
forceUni... | java | private List<XMLFilter> getProcessingPipe(final URI fileToParse) {
final List<XMLFilter> pipe = new ArrayList<>();
if (forceUnique) {
forceUniqueFilter = new ForceUniqueFilter();
forceUniqueFilter.setLogger(logger);
forceUniqueFilter.setJob(job);
forceUni... | [
"private",
"List",
"<",
"XMLFilter",
">",
"getProcessingPipe",
"(",
"final",
"URI",
"fileToParse",
")",
"{",
"final",
"List",
"<",
"XMLFilter",
">",
"pipe",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"forceUnique",
")",
"{",
"forceUniqueFilte... | Get processign filters | [
"Get",
"processign",
"filters"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L105-L123 |
48,786 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.getCopyToMap | private Map<FileInfo, FileInfo> getCopyToMap() {
final Map<FileInfo, FileInfo> copyToMap = new HashMap<>();
if (forceUnique) {
forceUniqueFilter.copyToMap.forEach((dstFi, srcFi) -> {
job.add(dstFi);
copyToMap.put(dstFi, srcFi);
});
}
... | java | private Map<FileInfo, FileInfo> getCopyToMap() {
final Map<FileInfo, FileInfo> copyToMap = new HashMap<>();
if (forceUnique) {
forceUniqueFilter.copyToMap.forEach((dstFi, srcFi) -> {
job.add(dstFi);
copyToMap.put(dstFi, srcFi);
});
}
... | [
"private",
"Map",
"<",
"FileInfo",
",",
"FileInfo",
">",
"getCopyToMap",
"(",
")",
"{",
"final",
"Map",
"<",
"FileInfo",
",",
"FileInfo",
">",
"copyToMap",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"if",
"(",
"forceUnique",
")",
"{",
"forceUniqueFilter... | Get copy-to map based on map processing.
@return target to source map of URIs relative to temporary directory | [
"Get",
"copy",
"-",
"to",
"map",
"based",
"on",
"map",
"processing",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L130-L155 |
48,787 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.performCopytoTask | private void performCopytoTask(final Map<FileInfo, FileInfo> copyToMap) {
for (final Map.Entry<FileInfo, FileInfo> entry : copyToMap.entrySet()) {
final URI copytoTarget = entry.getKey().uri;
final URI copytoSource = entry.getValue().uri;
final URI srcFile = job.tempDirURI.re... | java | private void performCopytoTask(final Map<FileInfo, FileInfo> copyToMap) {
for (final Map.Entry<FileInfo, FileInfo> entry : copyToMap.entrySet()) {
final URI copytoTarget = entry.getKey().uri;
final URI copytoSource = entry.getValue().uri;
final URI srcFile = job.tempDirURI.re... | [
"private",
"void",
"performCopytoTask",
"(",
"final",
"Map",
"<",
"FileInfo",
",",
"FileInfo",
">",
"copyToMap",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"FileInfo",
",",
"FileInfo",
">",
"entry",
":",
"copyToMap",
".",
"entrySet",
"(",
"... | Execute copy-to task, generate copy-to targets base on sources.
@param copyToMap target to source map of URIs relative to temporary directory | [
"Execute",
"copy",
"-",
"to",
"task",
"generate",
"copy",
"-",
"to",
"targets",
"base",
"on",
"sources",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L162-L188 |
48,788 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.copyFileWithPIReplaced | private void copyFileWithPIReplaced(final URI src, final URI target, final URI copytoTargetFilename, final URI inputMapInTemp) {
assert src.isAbsolute();
assert target.isAbsolute();
assert !copytoTargetFilename.isAbsolute();
assert inputMapInTemp.isAbsolute();
final File workdir ... | java | private void copyFileWithPIReplaced(final URI src, final URI target, final URI copytoTargetFilename, final URI inputMapInTemp) {
assert src.isAbsolute();
assert target.isAbsolute();
assert !copytoTargetFilename.isAbsolute();
assert inputMapInTemp.isAbsolute();
final File workdir ... | [
"private",
"void",
"copyFileWithPIReplaced",
"(",
"final",
"URI",
"src",
",",
"final",
"URI",
"target",
",",
"final",
"URI",
"copytoTargetFilename",
",",
"final",
"URI",
"inputMapInTemp",
")",
"{",
"assert",
"src",
".",
"isAbsolute",
"(",
")",
";",
"assert",
... | Copy files and replace workdir PI contents.
@param src source URI in temporary directory
@param target target URI in temporary directory
@param copytoTargetFilename target URI relative to temporary directory
@param inputMapInTemp input map URI in temporary directory | [
"Copy",
"files",
"and",
"replace",
"workdir",
"PI",
"contents",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L198-L218 |
48,789 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/CopyToModule.java | CopyToModule.getPathtoRootmap | public static File getPathtoRootmap(final URI traceFilename, final URI inputMap) {
assert traceFilename.isAbsolute();
assert inputMap.isAbsolute();
return toFile(getRelativePath(traceFilename, inputMap)).getParentFile();
} | java | public static File getPathtoRootmap(final URI traceFilename, final URI inputMap) {
assert traceFilename.isAbsolute();
assert inputMap.isAbsolute();
return toFile(getRelativePath(traceFilename, inputMap)).getParentFile();
} | [
"public",
"static",
"File",
"getPathtoRootmap",
"(",
"final",
"URI",
"traceFilename",
",",
"final",
"URI",
"inputMap",
")",
"{",
"assert",
"traceFilename",
".",
"isAbsolute",
"(",
")",
";",
"assert",
"inputMap",
".",
"isAbsolute",
"(",
")",
";",
"return",
"t... | Get path to root map
@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",
"root",
"map"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L351-L355 |
48,790 | dita-ot/dita-ot | src/main/java/org/dita/dost/reader/MergeMapParser.java | MergeMapParser.read | public void read(final File filename, final File tmpDir) {
tempdir = tmpDir != null ? tmpDir : filename.getParentFile();
try {
final TransformerHandler s = stf.newTransformerHandler();
s.getTransformer().setOutputProperty(OMIT_XML_DECLARATION, "yes");
s.setResult(new ... | java | public void read(final File filename, final File tmpDir) {
tempdir = tmpDir != null ? tmpDir : filename.getParentFile();
try {
final TransformerHandler s = stf.newTransformerHandler();
s.getTransformer().setOutputProperty(OMIT_XML_DECLARATION, "yes");
s.setResult(new ... | [
"public",
"void",
"read",
"(",
"final",
"File",
"filename",
",",
"final",
"File",
"tmpDir",
")",
"{",
"tempdir",
"=",
"tmpDir",
"!=",
"null",
"?",
"tmpDir",
":",
"filename",
".",
"getParentFile",
"(",
")",
";",
"try",
"{",
"final",
"TransformerHandler",
... | Read map.
@param filename map file path
@param tmpDir temporary directory path, may be {@code null} | [
"Read",
"map",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/reader/MergeMapParser.java#L130-L149 |
48,791 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java | AbstractReaderModule.initXMLReader | void initXMLReader(final File ditaDir, final boolean validate) throws SAXException {
reader = XMLUtils.getXMLReader();
reader.setFeature(FEATURE_NAMESPACE, true);
reader.setFeature(FEATURE_NAMESPACE_PREFIX, true);
if (validate) {
reader.setFeature(FEATURE_VALIDATION, true);
... | java | void initXMLReader(final File ditaDir, final boolean validate) throws SAXException {
reader = XMLUtils.getXMLReader();
reader.setFeature(FEATURE_NAMESPACE, true);
reader.setFeature(FEATURE_NAMESPACE_PREFIX, true);
if (validate) {
reader.setFeature(FEATURE_VALIDATION, true);
... | [
"void",
"initXMLReader",
"(",
"final",
"File",
"ditaDir",
",",
"final",
"boolean",
"validate",
")",
"throws",
"SAXException",
"{",
"reader",
"=",
"XMLUtils",
".",
"getXMLReader",
"(",
")",
";",
"reader",
".",
"setFeature",
"(",
"FEATURE_NAMESPACE",
",",
"true"... | Init xml reader used for pipeline parsing.
@param ditaDir absolute path to DITA-OT directory
@param validate whether validate input file
@throws SAXException parsing exception | [
"Init",
"xml",
"reader",
"used",
"for",
"pipeline",
"parsing",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java#L186-L213 |
48,792 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java | AbstractReaderModule.processParseResult | void processParseResult(final URI currentFile) {
// Category non-copyto result
for (final Reference file: listFilter.getNonCopytoResult()) {
categorizeReferenceFile(file);
}
for (final Map.Entry<URI, URI> e : listFilter.getCopytoMap().entrySet()) {
final URI sourc... | java | void processParseResult(final URI currentFile) {
// Category non-copyto result
for (final Reference file: listFilter.getNonCopytoResult()) {
categorizeReferenceFile(file);
}
for (final Map.Entry<URI, URI> e : listFilter.getCopytoMap().entrySet()) {
final URI sourc... | [
"void",
"processParseResult",
"(",
"final",
"URI",
"currentFile",
")",
"{",
"// Category non-copyto result",
"for",
"(",
"final",
"Reference",
"file",
":",
"listFilter",
".",
"getNonCopytoResult",
"(",
")",
")",
"{",
"categorizeReferenceFile",
"(",
"file",
")",
";... | Process results from parsing a single topic
@param currentFile absolute URI processes files | [
"Process",
"results",
"from",
"parsing",
"a",
"single",
"topic"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java#L445-L482 |
48,793 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java | AbstractReaderModule.addToWaitList | void addToWaitList(final Reference ref) {
final URI file = ref.filename;
assert file.isAbsolute() && file.getFragment() == null;
if (doneList.contains(file) || waitList.contains(ref) || file.equals(currentFile)) {
return;
}
waitList.add(ref);
} | java | void addToWaitList(final Reference ref) {
final URI file = ref.filename;
assert file.isAbsolute() && file.getFragment() == null;
if (doneList.contains(file) || waitList.contains(ref) || file.equals(currentFile)) {
return;
}
waitList.add(ref);
} | [
"void",
"addToWaitList",
"(",
"final",
"Reference",
"ref",
")",
"{",
"final",
"URI",
"file",
"=",
"ref",
".",
"filename",
";",
"assert",
"file",
".",
"isAbsolute",
"(",
")",
"&&",
"file",
".",
"getFragment",
"(",
")",
"==",
"null",
";",
"if",
"(",
"d... | Add the given file the wait list if it has not been parsed.
@param ref reference to absolute system path | [
"Add",
"the",
"given",
"file",
"the",
"wait",
"list",
"if",
"it",
"has",
"not",
"been",
"parsed",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java#L542-L550 |
48,794 | dita-ot/dita-ot | src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java | AbstractReaderModule.parseFilterFile | private FilterUtils parseFilterFile() {
final FilterUtils filterUtils;
if (ditavalFile != null) {
final DitaValReader ditaValReader = new DitaValReader();
ditaValReader.setLogger(logger);
ditaValReader.setJob(job);
ditaValReader.read(ditavalFile.toURI());
... | java | private FilterUtils parseFilterFile() {
final FilterUtils filterUtils;
if (ditavalFile != null) {
final DitaValReader ditaValReader = new DitaValReader();
ditaValReader.setLogger(logger);
ditaValReader.setJob(job);
ditaValReader.read(ditavalFile.toURI());
... | [
"private",
"FilterUtils",
"parseFilterFile",
"(",
")",
"{",
"final",
"FilterUtils",
"filterUtils",
";",
"if",
"(",
"ditavalFile",
"!=",
"null",
")",
"{",
"final",
"DitaValReader",
"ditaValReader",
"=",
"new",
"DitaValReader",
"(",
")",
";",
"ditaValReader",
".",... | Parse filter file
@return configured filter utility | [
"Parse",
"filter",
"file"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/reader/AbstractReaderModule.java#L557-L573 |
48,795 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/DitaWriterFilter.java | DitaWriterFilter.getAttributeValue | private String getAttributeValue(final String elemQName, final QName attQName, final String value) {
if (StringUtils.isEmptyString(value) && !defaultValueMap.isEmpty()) {
final Map<String, String> defaultMap = defaultValueMap.get(attQName);
if (defaultMap != null) {
final... | java | private String getAttributeValue(final String elemQName, final QName attQName, final String value) {
if (StringUtils.isEmptyString(value) && !defaultValueMap.isEmpty()) {
final Map<String, String> defaultMap = defaultValueMap.get(attQName);
if (defaultMap != null) {
final... | [
"private",
"String",
"getAttributeValue",
"(",
"final",
"String",
"elemQName",
",",
"final",
"QName",
"attQName",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmptyString",
"(",
"value",
")",
"&&",
"!",
"defaultValueMap",
".",
... | Get attribute value or default if attribute is not defined
@param elemQName element QName
@param attQName attribute QName
@param value attribute value
@return attribute value or default | [
"Get",
"attribute",
"value",
"or",
"default",
"if",
"attribute",
"is",
"not",
"defined"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/DitaWriterFilter.java#L180-L191 |
48,796 | dita-ot/dita-ot | src/main/java/org/dita/dost/writer/DitaWriterFilter.java | DitaWriterFilter.replaceHREF | private URI replaceHREF(final QName attName, final Attributes atts) {
URI attValue = toURI(atts.getValue(attName.getNamespaceURI(), attName.getLocalPart()));
if (attValue != null) {
final String fragment = attValue.getFragment();
if (fragment != null) {
attValue =... | java | private URI replaceHREF(final QName attName, final Attributes atts) {
URI attValue = toURI(atts.getValue(attName.getNamespaceURI(), attName.getLocalPart()));
if (attValue != null) {
final String fragment = attValue.getFragment();
if (fragment != null) {
attValue =... | [
"private",
"URI",
"replaceHREF",
"(",
"final",
"QName",
"attName",
",",
"final",
"Attributes",
"atts",
")",
"{",
"URI",
"attValue",
"=",
"toURI",
"(",
"atts",
".",
"getValue",
"(",
"attName",
".",
"getNamespaceURI",
"(",
")",
",",
"attName",
".",
"getLocal... | Relativize absolute references if possible.
@param attName attribute name
@param atts attributes
@return attribute value, may be {@code null} | [
"Relativize",
"absolute",
"references",
"if",
"possible",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/DitaWriterFilter.java#L200-L231 |
48,797 | dita-ot/dita-ot | src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/i18n/Configuration.java | Configuration.getAlphabetForChar | public Alphabet getAlphabetForChar(final char theChar) {
Alphabet result = null;
for (final Alphabet alphabet : this.alphabets) {
if (alphabet.isContain(theChar)) {
result = alphabet;
break;
}
}
return result;
} | java | public Alphabet getAlphabetForChar(final char theChar) {
Alphabet result = null;
for (final Alphabet alphabet : this.alphabets) {
if (alphabet.isContain(theChar)) {
result = alphabet;
break;
}
}
return result;
} | [
"public",
"Alphabet",
"getAlphabetForChar",
"(",
"final",
"char",
"theChar",
")",
"{",
"Alphabet",
"result",
"=",
"null",
";",
"for",
"(",
"final",
"Alphabet",
"alphabet",
":",
"this",
".",
"alphabets",
")",
"{",
"if",
"(",
"alphabet",
".",
"isContain",
"(... | Searches alphabets for a char
@return first founded alphabet that contains given char
or <code>null</code> if no alphabets contains given char. | [
"Searches",
"alphabets",
"for",
"a",
"char"
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.pdf2/src/com/idiominc/ws/opentopic/fo/i18n/Configuration.java#L64-L73 |
48,798 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/URLUtils.java | URLUtils.correct | public static URL correct(final File file) throws MalformedURLException {
if (file == null) {
throw new MalformedURLException("The url is null");
}
return new URL(correct(file.toURI().toString(), true));
} | java | public static URL correct(final File file) throws MalformedURLException {
if (file == null) {
throw new MalformedURLException("The url is null");
}
return new URL(correct(file.toURI().toString(), true));
} | [
"public",
"static",
"URL",
"correct",
"(",
"final",
"File",
"file",
")",
"throws",
"MalformedURLException",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"throw",
"new",
"MalformedURLException",
"(",
"\"The url is null\"",
")",
";",
"}",
"return",
"new",
"... | Corrects the file to URL.
@param file
The file to be corrected. If null will throw
MalformedURLException.
@return a corrected URL. Never null.
@exception MalformedURLException
when the argument is null. | [
"Corrects",
"the",
"file",
"to",
"URL",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/URLUtils.java#L45-L50 |
48,799 | dita-ot/dita-ot | src/main/java/org/dita/dost/util/URLUtils.java | URLUtils.correct | public static URL correct(final URL url) throws MalformedURLException {
if (url == null) {
throw new MalformedURLException("The url is null");
}
return new URL(correct(url.toString(), false));
} | java | public static URL correct(final URL url) throws MalformedURLException {
if (url == null) {
throw new MalformedURLException("The url is null");
}
return new URL(correct(url.toString(), false));
} | [
"public",
"static",
"URL",
"correct",
"(",
"final",
"URL",
"url",
")",
"throws",
"MalformedURLException",
"{",
"if",
"(",
"url",
"==",
"null",
")",
"{",
"throw",
"new",
"MalformedURLException",
"(",
"\"The url is null\"",
")",
";",
"}",
"return",
"new",
"URL... | Corrects an URL.
@param url
The URL to be corrected. If null will throw
MalformedURLException.
@return a corrected URL. Never null.
@exception MalformedURLException
when the argument is null. | [
"Corrects",
"an",
"URL",
"."
] | ea776b3c60c03d9f033b6f7ea072349e49dbcdd2 | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/URLUtils.java#L62-L67 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.