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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
157,700 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXResourceField.java | MPXResourceField.getMpxjField | public static ResourceField getMpxjField(int value)
{
ResourceField result = null;
if (value >= 0 && value < MPX_MPXJ_ARRAY.length)
{
result = MPX_MPXJ_ARRAY[value];
}
return (result);
} | java | public static ResourceField getMpxjField(int value)
{
ResourceField result = null;
if (value >= 0 && value < MPX_MPXJ_ARRAY.length)
{
result = MPX_MPXJ_ARRAY[value];
}
return (result);
} | [
"public",
"static",
"ResourceField",
"getMpxjField",
"(",
"int",
"value",
")",
"{",
"ResourceField",
"result",
"=",
"null",
";",
"if",
"(",
"value",
">=",
"0",
"&&",
"value",
"<",
"MPX_MPXJ_ARRAY",
".",
"length",
")",
"{",
"result",
"=",
"MPX_MPXJ_ARRAY",
... | Retrieve an instance of the ResourceField class based on the data read from an
MPX file.
@param value value from an MS Project file
@return instance of this class | [
"Retrieve",
"an",
"instance",
"of",
"the",
"ResourceField",
"class",
"based",
"on",
"the",
"data",
"read",
"from",
"an",
"MPX",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXResourceField.java#L42-L52 |
157,701 | joniles/mpxj | src/main/java/net/sf/mpxj/Filter.java | Filter.evaluate | public boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
boolean result = true;
if (m_criteria != null)
{
result = m_criteria.evaluate(container, promptValues);
//
// If this row has failed, but it is a summary row, and we are
... | java | public boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
boolean result = true;
if (m_criteria != null)
{
result = m_criteria.evaluate(container, promptValues);
//
// If this row has failed, but it is a summary row, and we are
... | [
"public",
"boolean",
"evaluate",
"(",
"FieldContainer",
"container",
",",
"Map",
"<",
"GenericCriteriaPrompt",
",",
"Object",
">",
"promptValues",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"if",
"(",
"m_criteria",
"!=",
"null",
")",
"{",
"result",
"="... | Evaluates the filter, returns true if the supplied Task or Resource
instance matches the filter criteria.
@param container Task or Resource instance
@param promptValues respose to prompts
@return boolean flag | [
"Evaluates",
"the",
"filter",
"returns",
"true",
"if",
"the",
"supplied",
"Task",
"or",
"Resource",
"instance",
"matches",
"the",
"filter",
"criteria",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Filter.java#L163-L189 |
157,702 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java | AbstractWbsFormat.parseRawValue | public void parseRawValue(String value)
{
int valueIndex = 0;
int elementIndex = 0;
m_elements.clear();
while (valueIndex < value.length() && elementIndex < m_elements.size())
{
int elementLength = m_lengths.get(elementIndex).intValue();
if (elementIndex > 0)
... | java | public void parseRawValue(String value)
{
int valueIndex = 0;
int elementIndex = 0;
m_elements.clear();
while (valueIndex < value.length() && elementIndex < m_elements.size())
{
int elementLength = m_lengths.get(elementIndex).intValue();
if (elementIndex > 0)
... | [
"public",
"void",
"parseRawValue",
"(",
"String",
"value",
")",
"{",
"int",
"valueIndex",
"=",
"0",
";",
"int",
"elementIndex",
"=",
"0",
";",
"m_elements",
".",
"clear",
"(",
")",
";",
"while",
"(",
"valueIndex",
"<",
"value",
".",
"length",
"(",
")",... | Parses a raw WBS value from the database and breaks it into
component parts ready for formatting.
@param value raw WBS value | [
"Parses",
"a",
"raw",
"WBS",
"value",
"from",
"the",
"database",
"and",
"breaks",
"it",
"into",
"component",
"parts",
"ready",
"for",
"formatting",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java#L40-L62 |
157,703 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java | AbstractWbsFormat.getFormattedParentValue | public String getFormattedParentValue()
{
String result = null;
if (m_elements.size() > 2)
{
result = joinElements(m_elements.size() - 2);
}
return result;
} | java | public String getFormattedParentValue()
{
String result = null;
if (m_elements.size() > 2)
{
result = joinElements(m_elements.size() - 2);
}
return result;
} | [
"public",
"String",
"getFormattedParentValue",
"(",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"m_elements",
".",
"size",
"(",
")",
">",
"2",
")",
"{",
"result",
"=",
"joinElements",
"(",
"m_elements",
".",
"size",
"(",
")",
"-",
"2",
... | Retrieves the formatted parent WBS value.
@return formatted parent WBS value | [
"Retrieves",
"the",
"formatted",
"parent",
"WBS",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java#L89-L97 |
157,704 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java | AbstractWbsFormat.joinElements | private String joinElements(int length)
{
StringBuilder sb = new StringBuilder();
for (int index = 0; index < length; index++)
{
sb.append(m_elements.get(index));
}
return sb.toString();
} | java | private String joinElements(int length)
{
StringBuilder sb = new StringBuilder();
for (int index = 0; index < length; index++)
{
sb.append(m_elements.get(index));
}
return sb.toString();
} | [
"private",
"String",
"joinElements",
"(",
"int",
"length",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"length",
";",
"index",
"++",
")",
"{",
"sb",
".",
"appen... | Joins the individual WBS elements to make the formated value.
@param length number of elements to join
@return formatted WBS value | [
"Joins",
"the",
"individual",
"WBS",
"elements",
"to",
"make",
"the",
"formated",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractWbsFormat.java#L105-L113 |
157,705 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addTasks | private void addTasks(MpxjTreeNode parentNode, ChildTaskContainer parent)
{
for (Task task : parent.getChildTasks())
{
final Task t = task;
MpxjTreeNode childNode = new MpxjTreeNode(task, TASK_EXCLUDED_METHODS)
{
@Override public String toString()
{
... | java | private void addTasks(MpxjTreeNode parentNode, ChildTaskContainer parent)
{
for (Task task : parent.getChildTasks())
{
final Task t = task;
MpxjTreeNode childNode = new MpxjTreeNode(task, TASK_EXCLUDED_METHODS)
{
@Override public String toString()
{
... | [
"private",
"void",
"addTasks",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ChildTaskContainer",
"parent",
")",
"{",
"for",
"(",
"Task",
"task",
":",
"parent",
".",
"getChildTasks",
"(",
")",
")",
"{",
"final",
"Task",
"t",
"=",
"task",
";",
"MpxjTreeNode",
"c... | Add tasks to the tree.
@param parentNode parent tree node
@param parent parent task container | [
"Add",
"tasks",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L198-L213 |
157,706 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addResources | private void addResources(MpxjTreeNode parentNode, ProjectFile file)
{
for (Resource resource : file.getResources())
{
final Resource r = resource;
MpxjTreeNode childNode = new MpxjTreeNode(resource)
{
@Override public String toString()
{
... | java | private void addResources(MpxjTreeNode parentNode, ProjectFile file)
{
for (Resource resource : file.getResources())
{
final Resource r = resource;
MpxjTreeNode childNode = new MpxjTreeNode(resource)
{
@Override public String toString()
{
... | [
"private",
"void",
"addResources",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"Resource",
"resource",
":",
"file",
".",
"getResources",
"(",
")",
")",
"{",
"final",
"Resource",
"r",
"=",
"resource",
";",
"MpxjTreeNod... | Add resources to the tree.
@param parentNode parent tree node
@param file resource container | [
"Add",
"resources",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L221-L235 |
157,707 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addCalendars | private void addCalendars(MpxjTreeNode parentNode, ProjectFile file)
{
for (ProjectCalendar calendar : file.getCalendars())
{
addCalendar(parentNode, calendar);
}
} | java | private void addCalendars(MpxjTreeNode parentNode, ProjectFile file)
{
for (ProjectCalendar calendar : file.getCalendars())
{
addCalendar(parentNode, calendar);
}
} | [
"private",
"void",
"addCalendars",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"ProjectCalendar",
"calendar",
":",
"file",
".",
"getCalendars",
"(",
")",
")",
"{",
"addCalendar",
"(",
"parentNode",
",",
"calendar",
")",... | Add calendars to the tree.
@param parentNode parent tree node
@param file calendar container | [
"Add",
"calendars",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L243-L249 |
157,708 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addCalendar | private void addCalendar(MpxjTreeNode parentNode, final ProjectCalendar calendar)
{
MpxjTreeNode calendarNode = new MpxjTreeNode(calendar, CALENDAR_EXCLUDED_METHODS)
{
@Override public String toString()
{
return calendar.getName();
}
};
parentNode.add(ca... | java | private void addCalendar(MpxjTreeNode parentNode, final ProjectCalendar calendar)
{
MpxjTreeNode calendarNode = new MpxjTreeNode(calendar, CALENDAR_EXCLUDED_METHODS)
{
@Override public String toString()
{
return calendar.getName();
}
};
parentNode.add(ca... | [
"private",
"void",
"addCalendar",
"(",
"MpxjTreeNode",
"parentNode",
",",
"final",
"ProjectCalendar",
"calendar",
")",
"{",
"MpxjTreeNode",
"calendarNode",
"=",
"new",
"MpxjTreeNode",
"(",
"calendar",
",",
"CALENDAR_EXCLUDED_METHODS",
")",
"{",
"@",
"Override",
"pub... | Add a calendar node.
@param parentNode parent node
@param calendar calendar | [
"Add",
"a",
"calendar",
"node",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L257-L283 |
157,709 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addCalendarDay | private void addCalendarDay(MpxjTreeNode parentNode, ProjectCalendar calendar, final Day day)
{
MpxjTreeNode dayNode = new MpxjTreeNode(day)
{
@Override public String toString()
{
return day.name();
}
};
parentNode.add(dayNode);
addHours(dayNode, c... | java | private void addCalendarDay(MpxjTreeNode parentNode, ProjectCalendar calendar, final Day day)
{
MpxjTreeNode dayNode = new MpxjTreeNode(day)
{
@Override public String toString()
{
return day.name();
}
};
parentNode.add(dayNode);
addHours(dayNode, c... | [
"private",
"void",
"addCalendarDay",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectCalendar",
"calendar",
",",
"final",
"Day",
"day",
")",
"{",
"MpxjTreeNode",
"dayNode",
"=",
"new",
"MpxjTreeNode",
"(",
"day",
")",
"{",
"@",
"Override",
"public",
"String",
... | Add a calendar day node.
@param parentNode parent node
@param calendar ProjectCalendar instance
@param day calendar day | [
"Add",
"a",
"calendar",
"day",
"node",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L292-L303 |
157,710 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addHours | private void addHours(MpxjTreeNode parentNode, ProjectCalendarDateRanges hours)
{
for (DateRange range : hours)
{
final DateRange r = range;
MpxjTreeNode rangeNode = new MpxjTreeNode(range)
{
@Override public String toString()
{
return m_t... | java | private void addHours(MpxjTreeNode parentNode, ProjectCalendarDateRanges hours)
{
for (DateRange range : hours)
{
final DateRange r = range;
MpxjTreeNode rangeNode = new MpxjTreeNode(range)
{
@Override public String toString()
{
return m_t... | [
"private",
"void",
"addHours",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectCalendarDateRanges",
"hours",
")",
"{",
"for",
"(",
"DateRange",
"range",
":",
"hours",
")",
"{",
"final",
"DateRange",
"r",
"=",
"range",
";",
"MpxjTreeNode",
"rangeNode",
"=",
"ne... | Add hours to a parent object.
@param parentNode parent node
@param hours list of ranges | [
"Add",
"hours",
"to",
"a",
"parent",
"object",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L311-L325 |
157,711 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addCalendarException | private void addCalendarException(MpxjTreeNode parentNode, final ProjectCalendarException exception)
{
MpxjTreeNode exceptionNode = new MpxjTreeNode(exception, CALENDAR_EXCEPTION_EXCLUDED_METHODS)
{
@Override public String toString()
{
return m_dateFormat.format(exception.ge... | java | private void addCalendarException(MpxjTreeNode parentNode, final ProjectCalendarException exception)
{
MpxjTreeNode exceptionNode = new MpxjTreeNode(exception, CALENDAR_EXCEPTION_EXCLUDED_METHODS)
{
@Override public String toString()
{
return m_dateFormat.format(exception.ge... | [
"private",
"void",
"addCalendarException",
"(",
"MpxjTreeNode",
"parentNode",
",",
"final",
"ProjectCalendarException",
"exception",
")",
"{",
"MpxjTreeNode",
"exceptionNode",
"=",
"new",
"MpxjTreeNode",
"(",
"exception",
",",
"CALENDAR_EXCEPTION_EXCLUDED_METHODS",
")",
"... | Add an exception to a calendar.
@param parentNode parent node
@param exception calendar exceptions | [
"Add",
"an",
"exception",
"to",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L333-L344 |
157,712 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addGroups | private void addGroups(MpxjTreeNode parentNode, ProjectFile file)
{
for (Group group : file.getGroups())
{
final Group g = group;
MpxjTreeNode childNode = new MpxjTreeNode(group)
{
@Override public String toString()
{
return g.getName();
... | java | private void addGroups(MpxjTreeNode parentNode, ProjectFile file)
{
for (Group group : file.getGroups())
{
final Group g = group;
MpxjTreeNode childNode = new MpxjTreeNode(group)
{
@Override public String toString()
{
return g.getName();
... | [
"private",
"void",
"addGroups",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"Group",
"group",
":",
"file",
".",
"getGroups",
"(",
")",
")",
"{",
"final",
"Group",
"g",
"=",
"group",
";",
"MpxjTreeNode",
"childNode",... | Add groups to the tree.
@param parentNode parent tree node
@param file group container | [
"Add",
"groups",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L352-L366 |
157,713 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addCustomFields | private void addCustomFields(MpxjTreeNode parentNode, ProjectFile file)
{
for (CustomField field : file.getCustomFields())
{
final CustomField c = field;
MpxjTreeNode childNode = new MpxjTreeNode(field)
{
@Override public String toString()
{
... | java | private void addCustomFields(MpxjTreeNode parentNode, ProjectFile file)
{
for (CustomField field : file.getCustomFields())
{
final CustomField c = field;
MpxjTreeNode childNode = new MpxjTreeNode(field)
{
@Override public String toString()
{
... | [
"private",
"void",
"addCustomFields",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"CustomField",
"field",
":",
"file",
".",
"getCustomFields",
"(",
")",
")",
"{",
"final",
"CustomField",
"c",
"=",
"field",
";",
"MpxjT... | Add custom fields to the tree.
@param parentNode parent tree node
@param file custom fields container | [
"Add",
"custom",
"fields",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L374-L390 |
157,714 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addViews | private void addViews(MpxjTreeNode parentNode, ProjectFile file)
{
for (View view : file.getViews())
{
final View v = view;
MpxjTreeNode childNode = new MpxjTreeNode(view)
{
@Override public String toString()
{
return v.getName();
... | java | private void addViews(MpxjTreeNode parentNode, ProjectFile file)
{
for (View view : file.getViews())
{
final View v = view;
MpxjTreeNode childNode = new MpxjTreeNode(view)
{
@Override public String toString()
{
return v.getName();
... | [
"private",
"void",
"addViews",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"View",
"view",
":",
"file",
".",
"getViews",
"(",
")",
")",
"{",
"final",
"View",
"v",
"=",
"view",
";",
"MpxjTreeNode",
"childNode",
"="... | Add views to the tree.
@param parentNode parent tree node
@param file views container | [
"Add",
"views",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L398-L412 |
157,715 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addTables | private void addTables(MpxjTreeNode parentNode, ProjectFile file)
{
for (Table table : file.getTables())
{
final Table t = table;
MpxjTreeNode childNode = new MpxjTreeNode(table, TABLE_EXCLUDED_METHODS)
{
@Override public String toString()
{
... | java | private void addTables(MpxjTreeNode parentNode, ProjectFile file)
{
for (Table table : file.getTables())
{
final Table t = table;
MpxjTreeNode childNode = new MpxjTreeNode(table, TABLE_EXCLUDED_METHODS)
{
@Override public String toString()
{
... | [
"private",
"void",
"addTables",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"Table",
"table",
":",
"file",
".",
"getTables",
"(",
")",
")",
"{",
"final",
"Table",
"t",
"=",
"table",
";",
"MpxjTreeNode",
"childNode",... | Add tables to the tree.
@param parentNode parent tree node
@param file tables container | [
"Add",
"tables",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L420-L436 |
157,716 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addColumns | private void addColumns(MpxjTreeNode parentNode, Table table)
{
for (Column column : table.getColumns())
{
final Column c = column;
MpxjTreeNode childNode = new MpxjTreeNode(column)
{
@Override public String toString()
{
return c.getTitle(... | java | private void addColumns(MpxjTreeNode parentNode, Table table)
{
for (Column column : table.getColumns())
{
final Column c = column;
MpxjTreeNode childNode = new MpxjTreeNode(column)
{
@Override public String toString()
{
return c.getTitle(... | [
"private",
"void",
"addColumns",
"(",
"MpxjTreeNode",
"parentNode",
",",
"Table",
"table",
")",
"{",
"for",
"(",
"Column",
"column",
":",
"table",
".",
"getColumns",
"(",
")",
")",
"{",
"final",
"Column",
"c",
"=",
"column",
";",
"MpxjTreeNode",
"childNode... | Add columns to the tree.
@param parentNode parent tree node
@param table columns container | [
"Add",
"columns",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L444-L458 |
157,717 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addFilters | private void addFilters(MpxjTreeNode parentNode, List<Filter> filters)
{
for (Filter field : filters)
{
final Filter f = field;
MpxjTreeNode childNode = new MpxjTreeNode(field)
{
@Override public String toString()
{
return f.getName();
... | java | private void addFilters(MpxjTreeNode parentNode, List<Filter> filters)
{
for (Filter field : filters)
{
final Filter f = field;
MpxjTreeNode childNode = new MpxjTreeNode(field)
{
@Override public String toString()
{
return f.getName();
... | [
"private",
"void",
"addFilters",
"(",
"MpxjTreeNode",
"parentNode",
",",
"List",
"<",
"Filter",
">",
"filters",
")",
"{",
"for",
"(",
"Filter",
"field",
":",
"filters",
")",
"{",
"final",
"Filter",
"f",
"=",
"field",
";",
"MpxjTreeNode",
"childNode",
"=",
... | Add filters to the tree.
@param parentNode parent tree node
@param filters list of filters | [
"Add",
"filters",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L466-L480 |
157,718 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.addAssignments | private void addAssignments(MpxjTreeNode parentNode, ProjectFile file)
{
for (ResourceAssignment assignment : file.getResourceAssignments())
{
final ResourceAssignment a = assignment;
MpxjTreeNode childNode = new MpxjTreeNode(a)
{
@Override public String toString()
... | java | private void addAssignments(MpxjTreeNode parentNode, ProjectFile file)
{
for (ResourceAssignment assignment : file.getResourceAssignments())
{
final ResourceAssignment a = assignment;
MpxjTreeNode childNode = new MpxjTreeNode(a)
{
@Override public String toString()
... | [
"private",
"void",
"addAssignments",
"(",
"MpxjTreeNode",
"parentNode",
",",
"ProjectFile",
"file",
")",
"{",
"for",
"(",
"ResourceAssignment",
"assignment",
":",
"file",
".",
"getResourceAssignments",
"(",
")",
")",
"{",
"final",
"ResourceAssignment",
"a",
"=",
... | Add assignments to the tree.
@param parentNode parent tree node
@param file assignments container | [
"Add",
"assignments",
"to",
"the",
"tree",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L488-L506 |
157,719 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.saveFile | public void saveFile(File file, String type)
{
try
{
Class<? extends ProjectWriter> fileClass = WRITER_MAP.get(type);
if (fileClass == null)
{
throw new IllegalArgumentException("Cannot write files of type: " + type);
}
ProjectWriter writer = file... | java | public void saveFile(File file, String type)
{
try
{
Class<? extends ProjectWriter> fileClass = WRITER_MAP.get(type);
if (fileClass == null)
{
throw new IllegalArgumentException("Cannot write files of type: " + type);
}
ProjectWriter writer = file... | [
"public",
"void",
"saveFile",
"(",
"File",
"file",
",",
"String",
"type",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
"extends",
"ProjectWriter",
">",
"fileClass",
"=",
"WRITER_MAP",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"fileClass",
"==",
"null",... | Save the current file as the given type.
@param file target file
@param type file type | [
"Save",
"the",
"current",
"file",
"as",
"the",
"given",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L514-L532 |
157,720 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java | ProjectTreeController.excludedMethods | private static Set<String> excludedMethods(String... methodNames)
{
Set<String> set = new HashSet<String>(MpxjTreeNode.DEFAULT_EXCLUDED_METHODS);
set.addAll(Arrays.asList(methodNames));
return set;
} | java | private static Set<String> excludedMethods(String... methodNames)
{
Set<String> set = new HashSet<String>(MpxjTreeNode.DEFAULT_EXCLUDED_METHODS);
set.addAll(Arrays.asList(methodNames));
return set;
} | [
"private",
"static",
"Set",
"<",
"String",
">",
"excludedMethods",
"(",
"String",
"...",
"methodNames",
")",
"{",
"Set",
"<",
"String",
">",
"set",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
"MpxjTreeNode",
".",
"DEFAULT_EXCLUDED_METHODS",
")",
";",
"... | Generates a set of excluded method names.
@param methodNames method names
@return set of method names | [
"Generates",
"a",
"set",
"of",
"excluded",
"method",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L540-L545 |
157,721 | joniles/mpxj | src/main/java/net/sf/mpxj/common/FixedLengthInputStream.java | FixedLengthInputStream.close | @Override public void close() throws IOException
{
long skippedLast = 0;
if (m_remaining > 0)
{
skippedLast = skip(m_remaining);
while (m_remaining > 0 && skippedLast > 0)
{
skippedLast = skip(m_remaining);
}
}
} | java | @Override public void close() throws IOException
{
long skippedLast = 0;
if (m_remaining > 0)
{
skippedLast = skip(m_remaining);
while (m_remaining > 0 && skippedLast > 0)
{
skippedLast = skip(m_remaining);
}
}
} | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"long",
"skippedLast",
"=",
"0",
";",
"if",
"(",
"m_remaining",
">",
"0",
")",
"{",
"skippedLast",
"=",
"skip",
"(",
"m_remaining",
")",
";",
"while",
"(",
"m_remaining",... | Closing will only skip to the end of this fixed length input stream and
not call the parent's close method.
@throws IOException if an I/O error occurs while closing stream | [
"Closing",
"will",
"only",
"skip",
"to",
"the",
"end",
"of",
"this",
"fixed",
"length",
"input",
"stream",
"and",
"not",
"call",
"the",
"parent",
"s",
"close",
"method",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FixedLengthInputStream.java#L55-L66 |
157,722 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/LocaleUtility.java | LocaleUtility.setLocale | public static void setLocale(ProjectProperties properties, Locale locale)
{
properties.setMpxDelimiter(LocaleData.getChar(locale, LocaleData.FILE_DELIMITER));
properties.setMpxProgramName(LocaleData.getString(locale, LocaleData.PROGRAM_NAME));
properties.setMpxCodePage((CodePage) LocaleData.getObje... | java | public static void setLocale(ProjectProperties properties, Locale locale)
{
properties.setMpxDelimiter(LocaleData.getChar(locale, LocaleData.FILE_DELIMITER));
properties.setMpxProgramName(LocaleData.getString(locale, LocaleData.PROGRAM_NAME));
properties.setMpxCodePage((CodePage) LocaleData.getObje... | [
"public",
"static",
"void",
"setLocale",
"(",
"ProjectProperties",
"properties",
",",
"Locale",
"locale",
")",
"{",
"properties",
".",
"setMpxDelimiter",
"(",
"LocaleData",
".",
"getChar",
"(",
"locale",
",",
"LocaleData",
".",
"FILE_DELIMITER",
")",
")",
";",
... | This method is called when the locale of the parent file is updated.
It resets the locale specific currency attributes to the default values
for the new locale.
@param properties project properties
@param locale new locale | [
"This",
"method",
"is",
"called",
"when",
"the",
"locale",
"of",
"the",
"parent",
"file",
"is",
"updated",
".",
"It",
"resets",
"the",
"locale",
"specific",
"currency",
"attributes",
"to",
"the",
"default",
"values",
"for",
"the",
"new",
"locale",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/LocaleUtility.java#L58-L79 |
157,723 | joniles/mpxj | src/main/java/net/sf/mpxj/Column.java | Column.getTitle | public String getTitle(Locale locale)
{
String result = null;
if (m_title != null)
{
result = m_title;
}
else
{
if (m_fieldType != null)
{
result = m_project.getCustomFields().getCustomField(m_fieldType).getAlias();
if (result ==... | java | public String getTitle(Locale locale)
{
String result = null;
if (m_title != null)
{
result = m_title;
}
else
{
if (m_fieldType != null)
{
result = m_project.getCustomFields().getCustomField(m_fieldType).getAlias();
if (result ==... | [
"public",
"String",
"getTitle",
"(",
"Locale",
"locale",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"m_title",
"!=",
"null",
")",
"{",
"result",
"=",
"m_title",
";",
"}",
"else",
"{",
"if",
"(",
"m_fieldType",
"!=",
"null",
")",
"{",
... | Retrieves the column title for the given locale.
@param locale required locale for the default column title
@return column title | [
"Retrieves",
"the",
"column",
"title",
"for",
"the",
"given",
"locale",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Column.java#L97-L118 |
157,724 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/AccrueTypeUtility.java | AccrueTypeUtility.getInstance | public static AccrueType getInstance(String type, Locale locale)
{
AccrueType result = null;
String[] typeNames = LocaleData.getStringArray(locale, LocaleData.ACCRUE_TYPES);
for (int loop = 0; loop < typeNames.length; loop++)
{
if (typeNames[loop].equalsIgnoreCase(type) == true)
... | java | public static AccrueType getInstance(String type, Locale locale)
{
AccrueType result = null;
String[] typeNames = LocaleData.getStringArray(locale, LocaleData.ACCRUE_TYPES);
for (int loop = 0; loop < typeNames.length; loop++)
{
if (typeNames[loop].equalsIgnoreCase(type) == true)
... | [
"public",
"static",
"AccrueType",
"getInstance",
"(",
"String",
"type",
",",
"Locale",
"locale",
")",
"{",
"AccrueType",
"result",
"=",
"null",
";",
"String",
"[",
"]",
"typeNames",
"=",
"LocaleData",
".",
"getStringArray",
"(",
"locale",
",",
"LocaleData",
... | This method takes the textual version of an accrue type name
and populates the class instance appropriately. Note that unrecognised
values are treated as "Prorated".
@param type text version of the accrue type
@param locale target locale
@return AccrueType class instance | [
"This",
"method",
"takes",
"the",
"textual",
"version",
"of",
"an",
"accrue",
"type",
"name",
"and",
"populates",
"the",
"class",
"instance",
"appropriately",
".",
"Note",
"that",
"unrecognised",
"values",
"are",
"treated",
"as",
"Prorated",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/AccrueTypeUtility.java#L53-L74 |
157,725 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/DataExportUtility.java | DataExportUtility.process | public void process(Connection connection, String directory) throws Exception
{
connection.setAutoCommit(true);
//
// Retrieve meta data about the connection
//
DatabaseMetaData dmd = connection.getMetaData();
String[] types =
{
"TABLE"
};
FileWriter ... | java | public void process(Connection connection, String directory) throws Exception
{
connection.setAutoCommit(true);
//
// Retrieve meta data about the connection
//
DatabaseMetaData dmd = connection.getMetaData();
String[] types =
{
"TABLE"
};
FileWriter ... | [
"public",
"void",
"process",
"(",
"Connection",
"connection",
",",
"String",
"directory",
")",
"throws",
"Exception",
"{",
"connection",
".",
"setAutoCommit",
"(",
"true",
")",
";",
"//",
"// Retrieve meta data about the connection",
"//",
"DatabaseMetaData",
"dmd",
... | Export data base contents to a directory using supplied connection.
@param connection database connection
@param directory target directory
@throws Exception | [
"Export",
"data",
"base",
"contents",
"to",
"a",
"directory",
"using",
"supplied",
"connection",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/DataExportUtility.java#L103-L135 |
157,726 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/DataExportUtility.java | DataExportUtility.escapeText | private String escapeText(StringBuilder sb, String text)
{
int length = text.length();
char c;
sb.setLength(0);
for (int loop = 0; loop < length; loop++)
{
c = text.charAt(loop);
switch (c)
{
case '<':
{
sb.append("<... | java | private String escapeText(StringBuilder sb, String text)
{
int length = text.length();
char c;
sb.setLength(0);
for (int loop = 0; loop < length; loop++)
{
c = text.charAt(loop);
switch (c)
{
case '<':
{
sb.append("<... | [
"private",
"String",
"escapeText",
"(",
"StringBuilder",
"sb",
",",
"String",
"text",
")",
"{",
"int",
"length",
"=",
"text",
".",
"length",
"(",
")",
";",
"char",
"c",
";",
"sb",
".",
"setLength",
"(",
"0",
")",
";",
"for",
"(",
"int",
"loop",
"="... | Quick and dirty XML text escape.
@param sb working string buffer
@param text input text
@return escaped text | [
"Quick",
"and",
"dirty",
"XML",
"text",
"escape",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/DataExportUtility.java#L328-L379 |
157,727 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFmethods.java | SDEFmethods.rset | public static String rset(String input, int width)
{
String result; // result to return
StringBuilder pad = new StringBuilder();
if (input == null)
{
for (int i = 0; i < width - 1; i++)
{
pad.append(' '); // put blanks into buffer
}
result = " "... | java | public static String rset(String input, int width)
{
String result; // result to return
StringBuilder pad = new StringBuilder();
if (input == null)
{
for (int i = 0; i < width - 1; i++)
{
pad.append(' '); // put blanks into buffer
}
result = " "... | [
"public",
"static",
"String",
"rset",
"(",
"String",
"input",
",",
"int",
"width",
")",
"{",
"String",
"result",
";",
"// result to return",
"StringBuilder",
"pad",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"... | Another method to force an input string into a fixed width field
and set it on the right with the left side filled with space ' ' characters.
@param input input string
@param width required width
@return formatted string | [
"Another",
"method",
"to",
"force",
"an",
"input",
"string",
"into",
"a",
"fixed",
"width",
"field",
"and",
"set",
"it",
"on",
"the",
"right",
"with",
"the",
"left",
"side",
"filled",
"with",
"space",
"characters",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFmethods.java#L82-L111 |
157,728 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFmethods.java | SDEFmethods.workDays | public static String workDays(ProjectCalendar input)
{
StringBuilder result = new StringBuilder();
DayType[] test = input.getDays(); // get the array from MPXJ ProjectCalendar
for (DayType i : test)
{ // go through every day in the given array
if (i == DayType.NON_WORKING)
{... | java | public static String workDays(ProjectCalendar input)
{
StringBuilder result = new StringBuilder();
DayType[] test = input.getDays(); // get the array from MPXJ ProjectCalendar
for (DayType i : test)
{ // go through every day in the given array
if (i == DayType.NON_WORKING)
{... | [
"public",
"static",
"String",
"workDays",
"(",
"ProjectCalendar",
"input",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"DayType",
"[",
"]",
"test",
"=",
"input",
".",
"getDays",
"(",
")",
";",
"// get the array from MPXJ Pr... | This method takes a calendar of MPXJ library type, then returns a String of the
general working days USACE format. For example, the regular 5-day work week is
NYYYYYN
If you get Fridays off work, then the String becomes NYYYYNN
@param input ProjectCalendar instance
@return work days string | [
"This",
"method",
"takes",
"a",
"calendar",
"of",
"MPXJ",
"library",
"type",
"then",
"returns",
"a",
"String",
"of",
"the",
"general",
"working",
"days",
"USACE",
"format",
".",
"For",
"example",
"the",
"regular",
"5",
"-",
"day",
"work",
"week",
"is",
"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFmethods.java#L123-L139 |
157,729 | joniles/mpxj | src/main/java/net/sf/mpxj/common/InputStreamHelper.java | InputStreamHelper.writeStreamToTempFile | public static File writeStreamToTempFile(InputStream inputStream, String tempFileSuffix) throws IOException
{
FileOutputStream outputStream = null;
try
{
File file = File.createTempFile("mpxj", tempFileSuffix);
outputStream = new FileOutputStream(file);
byte[] buffer = n... | java | public static File writeStreamToTempFile(InputStream inputStream, String tempFileSuffix) throws IOException
{
FileOutputStream outputStream = null;
try
{
File file = File.createTempFile("mpxj", tempFileSuffix);
outputStream = new FileOutputStream(file);
byte[] buffer = n... | [
"public",
"static",
"File",
"writeStreamToTempFile",
"(",
"InputStream",
"inputStream",
",",
"String",
"tempFileSuffix",
")",
"throws",
"IOException",
"{",
"FileOutputStream",
"outputStream",
"=",
"null",
";",
"try",
"{",
"File",
"file",
"=",
"File",
".",
"createT... | Copy the data from an InputStream to a temp file.
@param inputStream data source
@param tempFileSuffix suffix to use for temp file
@return File instance | [
"Copy",
"the",
"data",
"from",
"an",
"InputStream",
"to",
"a",
"temp",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/InputStreamHelper.java#L46-L74 |
157,730 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/Record.java | Record.getRecord | public static Record getRecord(String text)
{
Record root;
try
{
root = new Record(text);
}
//
// I've come across invalid calendar data in an otherwise fine Primavera
// database belonging to a customer. We deal with this gracefully here
// rather than prop... | java | public static Record getRecord(String text)
{
Record root;
try
{
root = new Record(text);
}
//
// I've come across invalid calendar data in an otherwise fine Primavera
// database belonging to a customer. We deal with this gracefully here
// rather than prop... | [
"public",
"static",
"Record",
"getRecord",
"(",
"String",
"text",
")",
"{",
"Record",
"root",
";",
"try",
"{",
"root",
"=",
"new",
"Record",
"(",
"text",
")",
";",
"}",
"//",
"// I've come across invalid calendar data in an otherwise fine Primavera",
"// database be... | Create a structured Record instance from the flat text data.
Null is returned if errors are encountered during parse.
@param text flat text data
@return Record instance | [
"Create",
"a",
"structured",
"Record",
"instance",
"from",
"the",
"flat",
"text",
"data",
".",
"Null",
"is",
"returned",
"if",
"errors",
"are",
"encountered",
"during",
"parse",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/Record.java#L63-L83 |
157,731 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/Record.java | Record.getChild | public Record getChild(String key)
{
Record result = null;
if (key != null)
{
for (Record record : m_records)
{
if (key.equals(record.getField()))
{
result = record;
break;
}
}
}
return result;
... | java | public Record getChild(String key)
{
Record result = null;
if (key != null)
{
for (Record record : m_records)
{
if (key.equals(record.getField()))
{
result = record;
break;
}
}
}
return result;
... | [
"public",
"Record",
"getChild",
"(",
"String",
"key",
")",
"{",
"Record",
"result",
"=",
"null",
";",
"if",
"(",
"key",
"!=",
"null",
")",
"{",
"for",
"(",
"Record",
"record",
":",
"m_records",
")",
"{",
"if",
"(",
"key",
".",
"equals",
"(",
"recor... | Retrieve a child record by name.
@param key child record name
@return child record | [
"Retrieve",
"a",
"child",
"record",
"by",
"name",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/Record.java#L121-L136 |
157,732 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/Record.java | Record.getClosingParenthesisPosition | private int getClosingParenthesisPosition(String text, int opening)
{
if (text.charAt(opening) != '(')
{
return -1;
}
int count = 0;
for (int i = opening; i < text.length(); i++)
{
char c = text.charAt(i);
switch (c)
{
case '(':
... | java | private int getClosingParenthesisPosition(String text, int opening)
{
if (text.charAt(opening) != '(')
{
return -1;
}
int count = 0;
for (int i = opening; i < text.length(); i++)
{
char c = text.charAt(i);
switch (c)
{
case '(':
... | [
"private",
"int",
"getClosingParenthesisPosition",
"(",
"String",
"text",
",",
"int",
"opening",
")",
"{",
"if",
"(",
"text",
".",
"charAt",
"(",
"opening",
")",
"!=",
"'",
"'",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"count",
"=",
"0",
";",
... | Look for the closing parenthesis corresponding to the one at position
represented by the opening index.
@param text input expression
@param opening opening parenthesis index
@return closing parenthesis index | [
"Look",
"for",
"the",
"closing",
"parenthesis",
"corresponding",
"to",
"the",
"one",
"at",
"position",
"represented",
"by",
"the",
"opening",
"index",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/Record.java#L204-L236 |
157,733 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java | FastTrackUtility.getLong | public static final long getLong(byte[] data, int offset)
{
if (data.length != 8)
{
throw new UnexpectedStructureException();
}
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 64; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shif... | java | public static final long getLong(byte[] data, int offset)
{
if (data.length != 8)
{
throw new UnexpectedStructureException();
}
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 64; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shif... | [
"public",
"static",
"final",
"long",
"getLong",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
")",
"{",
"if",
"(",
"data",
".",
"length",
"!=",
"8",
")",
"{",
"throw",
"new",
"UnexpectedStructureException",
"(",
")",
";",
"}",
"long",
"result",
... | This method reads an eight byte integer from the input array.
@param data the input array
@param offset offset of integer data in the array
@return integer value | [
"This",
"method",
"reads",
"an",
"eight",
"byte",
"integer",
"from",
"the",
"input",
"array",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L107-L122 |
157,734 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java | FastTrackUtility.getTimeUnit | public static final TimeUnit getTimeUnit(int value)
{
TimeUnit result = null;
switch (value)
{
case 1:
{
// Appears to mean "use the document format"
result = TimeUnit.ELAPSED_DAYS;
break;
}
case 2:
{
res... | java | public static final TimeUnit getTimeUnit(int value)
{
TimeUnit result = null;
switch (value)
{
case 1:
{
// Appears to mean "use the document format"
result = TimeUnit.ELAPSED_DAYS;
break;
}
case 2:
{
res... | [
"public",
"static",
"final",
"TimeUnit",
"getTimeUnit",
"(",
"int",
"value",
")",
"{",
"TimeUnit",
"result",
"=",
"null",
";",
"switch",
"(",
"value",
")",
"{",
"case",
"1",
":",
"{",
"// Appears to mean \"use the document format\"",
"result",
"=",
"TimeUnit",
... | Convert an integer value into a TimeUnit instance.
@param value time unit value
@return TimeUnit instance | [
"Convert",
"an",
"integer",
"value",
"into",
"a",
"TimeUnit",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L165-L216 |
157,735 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java | FastTrackUtility.skipToNextMatchingShort | public static int skipToNextMatchingShort(byte[] buffer, int offset, int value)
{
int nextOffset = offset;
while (getShort(buffer, nextOffset) != value)
{
++nextOffset;
}
nextOffset += 2;
return nextOffset;
} | java | public static int skipToNextMatchingShort(byte[] buffer, int offset, int value)
{
int nextOffset = offset;
while (getShort(buffer, nextOffset) != value)
{
++nextOffset;
}
nextOffset += 2;
return nextOffset;
} | [
"public",
"static",
"int",
"skipToNextMatchingShort",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"value",
")",
"{",
"int",
"nextOffset",
"=",
"offset",
";",
"while",
"(",
"getShort",
"(",
"buffer",
",",
"nextOffset",
")",
"!=",
"v... | Skip to the next matching short value.
@param buffer input data array
@param offset start offset into the input array
@param value value to match
@return offset of matching pattern | [
"Skip",
"to",
"the",
"next",
"matching",
"short",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L226-L236 |
157,736 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java | FastTrackUtility.hexdump | public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix)
{
StringBuilder sb = new StringBuilder();
if (buffer != null)
{
int index = offset;
DecimalFormat df = new DecimalFormat("00000");
while (index < (offset ... | java | public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix)
{
StringBuilder sb = new StringBuilder();
if (buffer != null)
{
int index = offset;
DecimalFormat df = new DecimalFormat("00000");
while (index < (offset ... | [
"public",
"static",
"final",
"String",
"hexdump",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"length",
",",
"boolean",
"ascii",
",",
"int",
"columns",
",",
"String",
"prefix",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBu... | Dump raw data as hex.
@param buffer buffer
@param offset offset into buffer
@param length length of data to dump
@param ascii true if ASCII should also be printed
@param columns number of columns
@param prefix prefix when printing
@return hex dump | [
"Dump",
"raw",
"data",
"as",
"hex",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L249-L275 |
157,737 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.generateWBS | public void generateWBS(Task parent)
{
String wbs;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
wbs = "0";
}
else
{
wbs = Integer.toString(getParentFile().getChildTasks().size() + 1);
}
}
... | java | public void generateWBS(Task parent)
{
String wbs;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
wbs = "0";
}
else
{
wbs = Integer.toString(getParentFile().getChildTasks().size() + 1);
}
}
... | [
"public",
"void",
"generateWBS",
"(",
"Task",
"parent",
")",
"{",
"String",
"wbs",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"if",
"(",
"NumberHelper",
".",
"getInt",
"(",
"getUniqueID",
"(",
")",
")",
"==",
"0",
")",
"{",
"wbs",
"=",
"\"0\... | This method is used to automatically generate a value
for the WBS field of this task.
@param parent Parent Task | [
"This",
"method",
"is",
"used",
"to",
"automatically",
"generate",
"a",
"value",
"for",
"the",
"WBS",
"field",
"of",
"this",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L105-L148 |
157,738 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.generateOutlineNumber | public void generateOutlineNumber(Task parent)
{
String outline;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
outline = "0";
}
else
{
outline = Integer.toString(getParentFile().getChildTasks().size() + 1);... | java | public void generateOutlineNumber(Task parent)
{
String outline;
if (parent == null)
{
if (NumberHelper.getInt(getUniqueID()) == 0)
{
outline = "0";
}
else
{
outline = Integer.toString(getParentFile().getChildTasks().size() + 1);... | [
"public",
"void",
"generateOutlineNumber",
"(",
"Task",
"parent",
")",
"{",
"String",
"outline",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"if",
"(",
"NumberHelper",
".",
"getInt",
"(",
"getUniqueID",
"(",
")",
")",
"==",
"0",
")",
"{",
"outlin... | This method is used to automatically generate a value
for the Outline Number field of this task.
@param parent Parent Task | [
"This",
"method",
"is",
"used",
"to",
"automatically",
"generate",
"a",
"value",
"for",
"the",
"Outline",
"Number",
"field",
"of",
"this",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L156-L194 |
157,739 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addTask | @Override public Task addTask()
{
ProjectFile parent = getParentFile();
Task task = new Task(parent, this);
m_children.add(task);
parent.getTasks().add(task);
setSummary(true);
return (task);
} | java | @Override public Task addTask()
{
ProjectFile parent = getParentFile();
Task task = new Task(parent, this);
m_children.add(task);
parent.getTasks().add(task);
setSummary(true);
return (task);
} | [
"@",
"Override",
"public",
"Task",
"addTask",
"(",
")",
"{",
"ProjectFile",
"parent",
"=",
"getParentFile",
"(",
")",
";",
"Task",
"task",
"=",
"new",
"Task",
"(",
"parent",
",",
"this",
")",
";",
"m_children",
".",
"add",
"(",
"task",
")",
";",
"par... | This method allows nested tasks to be added, with the WBS being
completed automatically.
@return new task | [
"This",
"method",
"allows",
"nested",
"tasks",
"to",
"be",
"added",
"with",
"the",
"WBS",
"being",
"completed",
"automatically",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L212-L225 |
157,740 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addChildTask | public void addChildTask(Task child, int childOutlineLevel)
{
int outlineLevel = NumberHelper.getInt(getOutlineLevel());
if ((outlineLevel + 1) == childOutlineLevel)
{
m_children.add(child);
setSummary(true);
}
else
{
if (m_children.isEmpty() == false)
... | java | public void addChildTask(Task child, int childOutlineLevel)
{
int outlineLevel = NumberHelper.getInt(getOutlineLevel());
if ((outlineLevel + 1) == childOutlineLevel)
{
m_children.add(child);
setSummary(true);
}
else
{
if (m_children.isEmpty() == false)
... | [
"public",
"void",
"addChildTask",
"(",
"Task",
"child",
",",
"int",
"childOutlineLevel",
")",
"{",
"int",
"outlineLevel",
"=",
"NumberHelper",
".",
"getInt",
"(",
"getOutlineLevel",
"(",
")",
")",
";",
"if",
"(",
"(",
"outlineLevel",
"+",
"1",
")",
"==",
... | This method is used to associate a child task with the current
task instance. It has package access, and has been designed to
allow the hierarchical outline structure of tasks in an MPX
file to be constructed as the file is read in.
@param child Child task.
@param childOutlineLevel Outline level of the child task. | [
"This",
"method",
"is",
"used",
"to",
"associate",
"a",
"child",
"task",
"with",
"the",
"current",
"task",
"instance",
".",
"It",
"has",
"package",
"access",
"and",
"has",
"been",
"designed",
"to",
"allow",
"the",
"hierarchical",
"outline",
"structure",
"of"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L236-L252 |
157,741 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addChildTask | public void addChildTask(Task child)
{
child.m_parent = this;
m_children.add(child);
setSummary(true);
if (getParentFile().getProjectConfig().getAutoOutlineLevel() == true)
{
child.setOutlineLevel(Integer.valueOf(NumberHelper.getInt(getOutlineLevel()) + 1));
}
} | java | public void addChildTask(Task child)
{
child.m_parent = this;
m_children.add(child);
setSummary(true);
if (getParentFile().getProjectConfig().getAutoOutlineLevel() == true)
{
child.setOutlineLevel(Integer.valueOf(NumberHelper.getInt(getOutlineLevel()) + 1));
}
} | [
"public",
"void",
"addChildTask",
"(",
"Task",
"child",
")",
"{",
"child",
".",
"m_parent",
"=",
"this",
";",
"m_children",
".",
"add",
"(",
"child",
")",
";",
"setSummary",
"(",
"true",
")",
";",
"if",
"(",
"getParentFile",
"(",
")",
".",
"getProjectC... | This method is used to associate a child task with the current
task instance. It has been designed to
allow the hierarchical outline structure of tasks in an MPX
file to be updated once all of the task data has been read.
@param child child task | [
"This",
"method",
"is",
"used",
"to",
"associate",
"a",
"child",
"task",
"with",
"the",
"current",
"task",
"instance",
".",
"It",
"has",
"been",
"designed",
"to",
"allow",
"the",
"hierarchical",
"outline",
"structure",
"of",
"tasks",
"in",
"an",
"MPX",
"fi... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L262-L272 |
157,742 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addChildTaskBefore | public void addChildTaskBefore(Task child, Task previousSibling)
{
int index = m_children.indexOf(previousSibling);
if (index == -1)
{
m_children.add(child);
}
else
{
m_children.add(index, child);
}
child.m_parent = this;
setSummary(true);
... | java | public void addChildTaskBefore(Task child, Task previousSibling)
{
int index = m_children.indexOf(previousSibling);
if (index == -1)
{
m_children.add(child);
}
else
{
m_children.add(index, child);
}
child.m_parent = this;
setSummary(true);
... | [
"public",
"void",
"addChildTaskBefore",
"(",
"Task",
"child",
",",
"Task",
"previousSibling",
")",
"{",
"int",
"index",
"=",
"m_children",
".",
"indexOf",
"(",
"previousSibling",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"m_children",
".",
... | Inserts a child task prior to a given sibling task.
@param child new child task
@param previousSibling sibling task | [
"Inserts",
"a",
"child",
"task",
"prior",
"to",
"a",
"given",
"sibling",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L280-L299 |
157,743 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.removeChildTask | public void removeChildTask(Task child)
{
if (m_children.remove(child))
{
child.m_parent = null;
}
setSummary(!m_children.isEmpty());
} | java | public void removeChildTask(Task child)
{
if (m_children.remove(child))
{
child.m_parent = null;
}
setSummary(!m_children.isEmpty());
} | [
"public",
"void",
"removeChildTask",
"(",
"Task",
"child",
")",
"{",
"if",
"(",
"m_children",
".",
"remove",
"(",
"child",
")",
")",
"{",
"child",
".",
"m_parent",
"=",
"null",
";",
"}",
"setSummary",
"(",
"!",
"m_children",
".",
"isEmpty",
"(",
")",
... | Removes a child task.
@param child child task instance | [
"Removes",
"a",
"child",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L306-L313 |
157,744 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addResourceAssignment | public ResourceAssignment addResourceAssignment(Resource resource)
{
ResourceAssignment assignment = getExistingResourceAssignment(resource);
if (assignment == null)
{
assignment = new ResourceAssignment(getParentFile(), this);
m_assignments.add(assignment);
getParentFil... | java | public ResourceAssignment addResourceAssignment(Resource resource)
{
ResourceAssignment assignment = getExistingResourceAssignment(resource);
if (assignment == null)
{
assignment = new ResourceAssignment(getParentFile(), this);
m_assignments.add(assignment);
getParentFil... | [
"public",
"ResourceAssignment",
"addResourceAssignment",
"(",
"Resource",
"resource",
")",
"{",
"ResourceAssignment",
"assignment",
"=",
"getExistingResourceAssignment",
"(",
"resource",
")",
";",
"if",
"(",
"assignment",
"==",
"null",
")",
"{",
"assignment",
"=",
"... | This method allows a resource assignment to be added to the
current task.
@param resource the resource to assign
@return ResourceAssignment object | [
"This",
"method",
"allows",
"a",
"resource",
"assignment",
"to",
"be",
"added",
"to",
"the",
"current",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L379-L401 |
157,745 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addResourceAssignment | public void addResourceAssignment(ResourceAssignment assignment)
{
if (getExistingResourceAssignment(assignment.getResource()) == null)
{
m_assignments.add(assignment);
getParentFile().getResourceAssignments().add(assignment);
Resource resource = assignment.getResource();
... | java | public void addResourceAssignment(ResourceAssignment assignment)
{
if (getExistingResourceAssignment(assignment.getResource()) == null)
{
m_assignments.add(assignment);
getParentFile().getResourceAssignments().add(assignment);
Resource resource = assignment.getResource();
... | [
"public",
"void",
"addResourceAssignment",
"(",
"ResourceAssignment",
"assignment",
")",
"{",
"if",
"(",
"getExistingResourceAssignment",
"(",
"assignment",
".",
"getResource",
"(",
")",
")",
"==",
"null",
")",
"{",
"m_assignments",
".",
"add",
"(",
"assignment",
... | Add a resource assignment which has been populated elsewhere.
@param assignment resource assignment | [
"Add",
"a",
"resource",
"assignment",
"which",
"has",
"been",
"populated",
"elsewhere",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L408-L421 |
157,746 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getExistingResourceAssignment | private ResourceAssignment getExistingResourceAssignment(Resource resource)
{
ResourceAssignment assignment = null;
Integer resourceUniqueID = null;
if (resource != null)
{
Iterator<ResourceAssignment> iter = m_assignments.iterator();
resourceUniqueID = resource.getUniqueID... | java | private ResourceAssignment getExistingResourceAssignment(Resource resource)
{
ResourceAssignment assignment = null;
Integer resourceUniqueID = null;
if (resource != null)
{
Iterator<ResourceAssignment> iter = m_assignments.iterator();
resourceUniqueID = resource.getUniqueID... | [
"private",
"ResourceAssignment",
"getExistingResourceAssignment",
"(",
"Resource",
"resource",
")",
"{",
"ResourceAssignment",
"assignment",
"=",
"null",
";",
"Integer",
"resourceUniqueID",
"=",
"null",
";",
"if",
"(",
"resource",
"!=",
"null",
")",
"{",
"Iterator",... | Retrieves an existing resource assignment if one is present,
to prevent duplicate resource assignments being added.
@param resource resource to test for
@return existing resource assignment | [
"Retrieves",
"an",
"existing",
"resource",
"assignment",
"if",
"one",
"is",
"present",
"to",
"prevent",
"duplicate",
"resource",
"assignments",
"being",
"added",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L430-L453 |
157,747 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.addPredecessor | @SuppressWarnings("unchecked") public Relation addPredecessor(Task targetTask, RelationType type, Duration lag)
{
//
// Ensure that we have a valid lag duration
//
if (lag == null)
{
lag = Duration.getInstance(0, TimeUnit.DAYS);
}
//
// Retrieve the list of p... | java | @SuppressWarnings("unchecked") public Relation addPredecessor(Task targetTask, RelationType type, Duration lag)
{
//
// Ensure that we have a valid lag duration
//
if (lag == null)
{
lag = Duration.getInstance(0, TimeUnit.DAYS);
}
//
// Retrieve the list of p... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Relation",
"addPredecessor",
"(",
"Task",
"targetTask",
",",
"RelationType",
"type",
",",
"Duration",
"lag",
")",
"{",
"//",
"// Ensure that we have a valid lag duration",
"//",
"if",
"(",
"lag",
"==",
... | This method allows a predecessor relationship to be added to this
task instance.
@param targetTask the predecessor task
@param type relation type
@param lag relation lag
@return relationship | [
"This",
"method",
"allows",
"a",
"predecessor",
"relationship",
"to",
"be",
"added",
"to",
"this",
"task",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L486-L565 |
157,748 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setID | @Override public void setID(Integer val)
{
ProjectFile parent = getParentFile();
Integer previous = getID();
if (previous != null)
{
parent.getTasks().unmapID(previous);
}
parent.getTasks().mapID(val, this);
set(TaskField.ID, val);
} | java | @Override public void setID(Integer val)
{
ProjectFile parent = getParentFile();
Integer previous = getID();
if (previous != null)
{
parent.getTasks().unmapID(previous);
}
parent.getTasks().mapID(val, this);
set(TaskField.ID, val);
} | [
"@",
"Override",
"public",
"void",
"setID",
"(",
"Integer",
"val",
")",
"{",
"ProjectFile",
"parent",
"=",
"getParentFile",
"(",
")",
";",
"Integer",
"previous",
"=",
"getID",
"(",
")",
";",
"if",
"(",
"previous",
"!=",
"null",
")",
"{",
"parent",
".",... | The ID field contains the identifier number that Microsoft Project
automatically assigns to each task as you add it to the project.
The ID indicates the position of a task with respect to the other tasks.
@param val ID | [
"The",
"ID",
"field",
"contains",
"the",
"identifier",
"number",
"that",
"Microsoft",
"Project",
"automatically",
"assigns",
"to",
"each",
"task",
"as",
"you",
"add",
"it",
"to",
"the",
"project",
".",
"The",
"ID",
"indicates",
"the",
"position",
"of",
"a",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1073-L1086 |
157,749 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getBaselineDuration | public Duration getBaselineDuration()
{
Object result = getCachedValue(TaskField.BASELINE_DURATION);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
}
if (!(result instanceof Duration))
{
result = null;
}
return ... | java | public Duration getBaselineDuration()
{
Object result = getCachedValue(TaskField.BASELINE_DURATION);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
}
if (!(result instanceof Duration))
{
result = null;
}
return ... | [
"public",
"Duration",
"getBaselineDuration",
"(",
")",
"{",
"Object",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELINE_DURATION",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
... | The Baseline Duration field shows the original span of time planned
to complete a task.
@return - duration string | [
"The",
"Baseline",
"Duration",
"field",
"shows",
"the",
"original",
"span",
"of",
"time",
"planned",
"to",
"complete",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1587-L1600 |
157,750 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getBaselineDurationText | public String getBaselineDurationText()
{
Object result = getCachedValue(TaskField.BASELINE_DURATION);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
}
if (!(result instanceof String))
{
result = null;
}
return ... | java | public String getBaselineDurationText()
{
Object result = getCachedValue(TaskField.BASELINE_DURATION);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
}
if (!(result instanceof String))
{
result = null;
}
return ... | [
"public",
"String",
"getBaselineDurationText",
"(",
")",
"{",
"Object",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELINE_DURATION",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
... | Retrieves the text value for the baseline duration.
@return baseline duration text | [
"Retrieves",
"the",
"text",
"value",
"for",
"the",
"baseline",
"duration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1607-L1620 |
157,751 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getBaselineFinish | public Date getBaselineFinish()
{
Object result = getCachedValue(TaskField.BASELINE_FINISH);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_FINISH);
}
if (!(result instanceof Date))
{
result = null;
}
return (Date) result;... | java | public Date getBaselineFinish()
{
Object result = getCachedValue(TaskField.BASELINE_FINISH);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_FINISH);
}
if (!(result instanceof Date))
{
result = null;
}
return (Date) result;... | [
"public",
"Date",
"getBaselineFinish",
"(",
")",
"{",
"Object",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELINE_FINISH",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELIN... | The Baseline Finish field shows the planned completion date for a task
at the time you saved a baseline. Information in this field becomes
available when you set a baseline for a task.
@return Date | [
"The",
"Baseline",
"Finish",
"field",
"shows",
"the",
"planned",
"completion",
"date",
"for",
"a",
"task",
"at",
"the",
"time",
"you",
"saved",
"a",
"baseline",
".",
"Information",
"in",
"this",
"field",
"becomes",
"available",
"when",
"you",
"set",
"a",
"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1639-L1652 |
157,752 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getBaselineStart | public Date getBaselineStart()
{
Object result = getCachedValue(TaskField.BASELINE_START);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_START);
}
if (!(result instanceof Date))
{
result = null;
}
return (Date) result;
... | java | public Date getBaselineStart()
{
Object result = getCachedValue(TaskField.BASELINE_START);
if (result == null)
{
result = getCachedValue(TaskField.BASELINE_ESTIMATED_START);
}
if (!(result instanceof Date))
{
result = null;
}
return (Date) result;
... | [
"public",
"Date",
"getBaselineStart",
"(",
")",
"{",
"Object",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELINE_START",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getCachedValue",
"(",
"TaskField",
".",
"BASELINE_... | The Baseline Start field shows the planned beginning date for a task at
the time you saved a baseline. Information in this field becomes available
when you set a baseline.
@return Date | [
"The",
"Baseline",
"Start",
"field",
"shows",
"the",
"planned",
"beginning",
"date",
"for",
"a",
"task",
"at",
"the",
"time",
"you",
"saved",
"a",
"baseline",
".",
"Information",
"in",
"this",
"field",
"becomes",
"available",
"when",
"you",
"set",
"a",
"ba... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1691-L1704 |
157,753 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getCostVariance | public Number getCostVariance()
{
Number variance = (Number) getCachedValue(TaskField.COST_VARIANCE);
if (variance == null)
{
Number cost = getCost();
Number baselineCost = getBaselineCost();
if (cost != null && baselineCost != null)
{
variance = Numb... | java | public Number getCostVariance()
{
Number variance = (Number) getCachedValue(TaskField.COST_VARIANCE);
if (variance == null)
{
Number cost = getCost();
Number baselineCost = getBaselineCost();
if (cost != null && baselineCost != null)
{
variance = Numb... | [
"public",
"Number",
"getCostVariance",
"(",
")",
"{",
"Number",
"variance",
"=",
"(",
"Number",
")",
"getCachedValue",
"(",
"TaskField",
".",
"COST_VARIANCE",
")",
";",
"if",
"(",
"variance",
"==",
"null",
")",
"{",
"Number",
"cost",
"=",
"getCost",
"(",
... | The Cost Variance field shows the difference between the baseline cost
and total cost for a task. The total cost is the current estimate of costs
based on actual costs and remaining costs.
@return amount | [
"The",
"Cost",
"Variance",
"field",
"shows",
"the",
"difference",
"between",
"the",
"baseline",
"cost",
"and",
"total",
"cost",
"for",
"a",
"task",
".",
"The",
"total",
"cost",
"is",
"the",
"current",
"estimate",
"of",
"costs",
"based",
"on",
"actual",
"co... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1841-L1855 |
157,754 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getCritical | public boolean getCritical()
{
Boolean critical = (Boolean) getCachedValue(TaskField.CRITICAL);
if (critical == null)
{
Duration totalSlack = getTotalSlack();
ProjectProperties props = getParentFile().getProjectProperties();
int criticalSlackLimit = NumberHelper.getInt(pr... | java | public boolean getCritical()
{
Boolean critical = (Boolean) getCachedValue(TaskField.CRITICAL);
if (critical == null)
{
Duration totalSlack = getTotalSlack();
ProjectProperties props = getParentFile().getProjectProperties();
int criticalSlackLimit = NumberHelper.getInt(pr... | [
"public",
"boolean",
"getCritical",
"(",
")",
"{",
"Boolean",
"critical",
"=",
"(",
"Boolean",
")",
"getCachedValue",
"(",
"TaskField",
".",
"CRITICAL",
")",
";",
"if",
"(",
"critical",
"==",
"null",
")",
"{",
"Duration",
"totalSlack",
"=",
"getTotalSlack",
... | The Critical field indicates whether a task has any room in the schedule
to slip, or if a task is on the critical path. The Critical field contains
Yes if the task is critical and No if the task is not critical.
@return boolean | [
"The",
"Critical",
"field",
"indicates",
"whether",
"a",
"task",
"has",
"any",
"room",
"in",
"the",
"schedule",
"to",
"slip",
"or",
"if",
"a",
"task",
"is",
"on",
"the",
"critical",
"path",
".",
"The",
"Critical",
"field",
"contains",
"Yes",
"if",
"the",... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1875-L1891 |
157,755 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setOutlineCode | public void setOutlineCode(int index, String value)
{
set(selectField(TaskFieldLists.CUSTOM_OUTLINE_CODE, index), value);
} | java | public void setOutlineCode(int index, String value)
{
set(selectField(TaskFieldLists.CUSTOM_OUTLINE_CODE, index), value);
} | [
"public",
"void",
"setOutlineCode",
"(",
"int",
"index",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"CUSTOM_OUTLINE_CODE",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an outline code value.
@param index outline code index (1-10)
@param value outline code value | [
"Set",
"an",
"outline",
"code",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L2617-L2620 |
157,756 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getTotalSlack | public Duration getTotalSlack()
{
Duration totalSlack = (Duration) getCachedValue(TaskField.TOTAL_SLACK);
if (totalSlack == null)
{
Duration duration = getDuration();
if (duration == null)
{
duration = Duration.getInstance(0, TimeUnit.DAYS);
}
... | java | public Duration getTotalSlack()
{
Duration totalSlack = (Duration) getCachedValue(TaskField.TOTAL_SLACK);
if (totalSlack == null)
{
Duration duration = getDuration();
if (duration == null)
{
duration = Duration.getInstance(0, TimeUnit.DAYS);
}
... | [
"public",
"Duration",
"getTotalSlack",
"(",
")",
"{",
"Duration",
"totalSlack",
"=",
"(",
"Duration",
")",
"getCachedValue",
"(",
"TaskField",
".",
"TOTAL_SLACK",
")",
";",
"if",
"(",
"totalSlack",
"==",
"null",
")",
"{",
"Duration",
"duration",
"=",
"getDur... | The Total Slack field contains the amount of time a task can be
delayed without delaying the project's finish date.
@return string representing duration | [
"The",
"Total",
"Slack",
"field",
"contains",
"the",
"amount",
"of",
"time",
"a",
"task",
"can",
"be",
"delayed",
"without",
"delaying",
"the",
"project",
"s",
"finish",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L2639-L2708 |
157,757 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setCalendar | public void setCalendar(ProjectCalendar calendar)
{
set(TaskField.CALENDAR, calendar);
setCalendarUniqueID(calendar == null ? null : calendar.getUniqueID());
} | java | public void setCalendar(ProjectCalendar calendar)
{
set(TaskField.CALENDAR, calendar);
setCalendarUniqueID(calendar == null ? null : calendar.getUniqueID());
} | [
"public",
"void",
"setCalendar",
"(",
"ProjectCalendar",
"calendar",
")",
"{",
"set",
"(",
"TaskField",
".",
"CALENDAR",
",",
"calendar",
")",
";",
"setCalendarUniqueID",
"(",
"calendar",
"==",
"null",
"?",
"null",
":",
"calendar",
".",
"getUniqueID",
"(",
"... | Sets the name of the base calendar associated with this task.
Note that this attribute appears in MPP9 and MSPDI files.
@param calendar calendar instance | [
"Sets",
"the",
"name",
"of",
"the",
"base",
"calendar",
"associated",
"with",
"this",
"task",
".",
"Note",
"that",
"this",
"attribute",
"appears",
"in",
"MPP9",
"and",
"MSPDI",
"files",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3634-L3638 |
157,758 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getStartSlack | public Duration getStartSlack()
{
Duration startSlack = (Duration) getCachedValue(TaskField.START_SLACK);
if (startSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
startSlack = DateHelper.getVariance(this, getEarlyStart(), getLateSta... | java | public Duration getStartSlack()
{
Duration startSlack = (Duration) getCachedValue(TaskField.START_SLACK);
if (startSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
startSlack = DateHelper.getVariance(this, getEarlyStart(), getLateSta... | [
"public",
"Duration",
"getStartSlack",
"(",
")",
"{",
"Duration",
"startSlack",
"=",
"(",
"Duration",
")",
"getCachedValue",
"(",
"TaskField",
".",
"START_SLACK",
")",
";",
"if",
"(",
"startSlack",
"==",
"null",
")",
"{",
"Duration",
"duration",
"=",
"getDur... | Retrieve the start slack.
@return start slack | [
"Retrieve",
"the",
"start",
"slack",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3691-L3704 |
157,759 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getFinishSlack | public Duration getFinishSlack()
{
Duration finishSlack = (Duration) getCachedValue(TaskField.FINISH_SLACK);
if (finishSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
finishSlack = DateHelper.getVariance(this, getEarlyFinish(), getL... | java | public Duration getFinishSlack()
{
Duration finishSlack = (Duration) getCachedValue(TaskField.FINISH_SLACK);
if (finishSlack == null)
{
Duration duration = getDuration();
if (duration != null)
{
finishSlack = DateHelper.getVariance(this, getEarlyFinish(), getL... | [
"public",
"Duration",
"getFinishSlack",
"(",
")",
"{",
"Duration",
"finishSlack",
"=",
"(",
"Duration",
")",
"getCachedValue",
"(",
"TaskField",
".",
"FINISH_SLACK",
")",
";",
"if",
"(",
"finishSlack",
"==",
"null",
")",
"{",
"Duration",
"duration",
"=",
"ge... | Retrieve the finish slack.
@return finish slack | [
"Retrieve",
"the",
"finish",
"slack",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3711-L3724 |
157,760 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getFieldByAlias | public Object getFieldByAlias(String alias)
{
return getCachedValue(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias));
} | java | public Object getFieldByAlias(String alias)
{
return getCachedValue(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias));
} | [
"public",
"Object",
"getFieldByAlias",
"(",
"String",
"alias",
")",
"{",
"return",
"getCachedValue",
"(",
"getParentFile",
"(",
")",
".",
"getCustomFields",
"(",
")",
".",
"getFieldByAlias",
"(",
"FieldTypeClass",
".",
"TASK",
",",
"alias",
")",
")",
";",
"}... | Retrieve the value of a field using its alias.
@param alias field alias
@return field value | [
"Retrieve",
"the",
"value",
"of",
"a",
"field",
"using",
"its",
"alias",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3732-L3735 |
157,761 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setFieldByAlias | public void setFieldByAlias(String alias, Object value)
{
set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value);
} | java | public void setFieldByAlias(String alias, Object value)
{
set(getParentFile().getCustomFields().getFieldByAlias(FieldTypeClass.TASK, alias), value);
} | [
"public",
"void",
"setFieldByAlias",
"(",
"String",
"alias",
",",
"Object",
"value",
")",
"{",
"set",
"(",
"getParentFile",
"(",
")",
".",
"getCustomFields",
"(",
")",
".",
"getFieldByAlias",
"(",
"FieldTypeClass",
".",
"TASK",
",",
"alias",
")",
",",
"val... | Set the value of a field using its alias.
@param alias field alias
@param value field value | [
"Set",
"the",
"value",
"of",
"a",
"field",
"using",
"its",
"alias",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3743-L3746 |
157,762 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getEnterpriseFlag | public boolean getEnterpriseFlag(int index)
{
return (BooleanHelper.getBoolean((Boolean) getCachedValue(selectField(TaskFieldLists.ENTERPRISE_FLAG, index))));
} | java | public boolean getEnterpriseFlag(int index)
{
return (BooleanHelper.getBoolean((Boolean) getCachedValue(selectField(TaskFieldLists.ENTERPRISE_FLAG, index))));
} | [
"public",
"boolean",
"getEnterpriseFlag",
"(",
"int",
"index",
")",
"{",
"return",
"(",
"BooleanHelper",
".",
"getBoolean",
"(",
"(",
"Boolean",
")",
"getCachedValue",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"ENTERPRISE_FLAG",
",",
"index",
")",
")",
"... | Retrieve an enterprise field value.
@param index field index
@return field value | [
"Retrieve",
"an",
"enterprise",
"field",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3892-L3895 |
157,763 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getBaselineDurationText | public String getBaselineDurationText(int baselineNumber)
{
Object result = getCachedValue(selectField(TaskFieldLists.BASELINE_DURATIONS, baselineNumber));
if (result == null)
{
result = getCachedValue(selectField(TaskFieldLists.BASELINE_ESTIMATED_DURATIONS, baselineNumber));
}
... | java | public String getBaselineDurationText(int baselineNumber)
{
Object result = getCachedValue(selectField(TaskFieldLists.BASELINE_DURATIONS, baselineNumber));
if (result == null)
{
result = getCachedValue(selectField(TaskFieldLists.BASELINE_ESTIMATED_DURATIONS, baselineNumber));
}
... | [
"public",
"String",
"getBaselineDurationText",
"(",
"int",
"baselineNumber",
")",
"{",
"Object",
"result",
"=",
"getCachedValue",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"BASELINE_DURATIONS",
",",
"baselineNumber",
")",
")",
";",
"if",
"(",
"result",
"==",... | Retrieves the baseline duration text value.
@param baselineNumber baseline number
@return baseline duration text value | [
"Retrieves",
"the",
"baseline",
"duration",
"text",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4067-L4080 |
157,764 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setBaselineDurationText | public void setBaselineDurationText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_DURATIONS, baselineNumber), value);
} | java | public void setBaselineDurationText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_DURATIONS, baselineNumber), value);
} | [
"public",
"void",
"setBaselineDurationText",
"(",
"int",
"baselineNumber",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"BASELINE_DURATIONS",
",",
"baselineNumber",
")",
",",
"value",
")",
";",
"}"
] | Sets the baseline duration text value.
@param baselineNumber baseline number
@param value baseline duration text value | [
"Sets",
"the",
"baseline",
"duration",
"text",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4088-L4091 |
157,765 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setBaselineFinishText | public void setBaselineFinishText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_FINISHES, baselineNumber), value);
} | java | public void setBaselineFinishText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_FINISHES, baselineNumber), value);
} | [
"public",
"void",
"setBaselineFinishText",
"(",
"int",
"baselineNumber",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"BASELINE_FINISHES",
",",
"baselineNumber",
")",
",",
"value",
")",
";",
"}"
] | Sets the baseline finish text value.
@param baselineNumber baseline number
@param value baseline finish text value | [
"Sets",
"the",
"baseline",
"finish",
"text",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4141-L4144 |
157,766 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setBaselineStartText | public void setBaselineStartText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber), value);
} | java | public void setBaselineStartText(int baselineNumber, String value)
{
set(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber), value);
} | [
"public",
"void",
"setBaselineStartText",
"(",
"int",
"baselineNumber",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"BASELINE_STARTS",
",",
"baselineNumber",
")",
",",
"value",
")",
";",
"}"
] | Sets the baseline start text value.
@param baselineNumber baseline number
@param value baseline start text value | [
"Sets",
"the",
"baseline",
"start",
"text",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4194-L4197 |
157,767 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getCompleteThrough | public Date getCompleteThrough()
{
Date value = (Date) getCachedValue(TaskField.COMPLETE_THROUGH);
if (value == null)
{
int percentComplete = NumberHelper.getInt(getPercentageComplete());
switch (percentComplete)
{
case 0:
{
break;
... | java | public Date getCompleteThrough()
{
Date value = (Date) getCachedValue(TaskField.COMPLETE_THROUGH);
if (value == null)
{
int percentComplete = NumberHelper.getInt(getPercentageComplete());
switch (percentComplete)
{
case 0:
{
break;
... | [
"public",
"Date",
"getCompleteThrough",
"(",
")",
"{",
"Date",
"value",
"=",
"(",
"Date",
")",
"getCachedValue",
"(",
"TaskField",
".",
"COMPLETE_THROUGH",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"int",
"percentComplete",
"=",
"NumberHelper",
... | Retrieve the "complete through" date.
@return complete through date | [
"Retrieve",
"the",
"complete",
"through",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4215-L4252 |
157,768 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getTaskMode | public TaskMode getTaskMode()
{
return BooleanHelper.getBoolean((Boolean) getCachedValue(TaskField.TASK_MODE)) ? TaskMode.MANUALLY_SCHEDULED : TaskMode.AUTO_SCHEDULED;
} | java | public TaskMode getTaskMode()
{
return BooleanHelper.getBoolean((Boolean) getCachedValue(TaskField.TASK_MODE)) ? TaskMode.MANUALLY_SCHEDULED : TaskMode.AUTO_SCHEDULED;
} | [
"public",
"TaskMode",
"getTaskMode",
"(",
")",
"{",
"return",
"BooleanHelper",
".",
"getBoolean",
"(",
"(",
"Boolean",
")",
"getCachedValue",
"(",
"TaskField",
".",
"TASK_MODE",
")",
")",
"?",
"TaskMode",
".",
"MANUALLY_SCHEDULED",
":",
"TaskMode",
".",
"AUTO_... | Retrieves the task mode.
@return task mode | [
"Retrieves",
"the",
"task",
"mode",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4300-L4303 |
157,769 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.getEffectiveCalendar | public ProjectCalendar getEffectiveCalendar()
{
ProjectCalendar result = getCalendar();
if (result == null)
{
result = getParentFile().getDefaultCalendar();
}
return result;
} | java | public ProjectCalendar getEffectiveCalendar()
{
ProjectCalendar result = getCalendar();
if (result == null)
{
result = getParentFile().getDefaultCalendar();
}
return result;
} | [
"public",
"ProjectCalendar",
"getEffectiveCalendar",
"(",
")",
"{",
"ProjectCalendar",
"result",
"=",
"getCalendar",
"(",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getParentFile",
"(",
")",
".",
"getDefaultCalendar",
"(",
")",
";... | Retrieve the effective calendar for this task. If the task does not have
a specific calendar associated with it, fall back to using the default calendar
for the project.
@return ProjectCalendar instance | [
"Retrieve",
"the",
"effective",
"calendar",
"for",
"this",
"task",
".",
"If",
"the",
"task",
"does",
"not",
"have",
"a",
"specific",
"calendar",
"associated",
"with",
"it",
"fall",
"back",
"to",
"using",
"the",
"default",
"calendar",
"for",
"the",
"project",... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4569-L4577 |
157,770 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.removePredecessor | public boolean removePredecessor(Task targetTask, RelationType type, Duration lag)
{
boolean matchFound = false;
//
// Retrieve the list of predecessors
//
List<Relation> predecessorList = getPredecessors();
if (!predecessorList.isEmpty())
{
//
// Ensure t... | java | public boolean removePredecessor(Task targetTask, RelationType type, Duration lag)
{
boolean matchFound = false;
//
// Retrieve the list of predecessors
//
List<Relation> predecessorList = getPredecessors();
if (!predecessorList.isEmpty())
{
//
// Ensure t... | [
"public",
"boolean",
"removePredecessor",
"(",
"Task",
"targetTask",
",",
"RelationType",
"type",
",",
"Duration",
"lag",
")",
"{",
"boolean",
"matchFound",
"=",
"false",
";",
"//",
"// Retrieve the list of predecessors",
"//",
"List",
"<",
"Relation",
">",
"prede... | This method allows a predecessor relationship to be removed from this
task instance. It will only delete relationships that exactly match the
given targetTask, type and lag time.
@param targetTask the predecessor task
@param type relation type
@param lag relation lag
@return returns true if the relation is found and ... | [
"This",
"method",
"allows",
"a",
"predecessor",
"relationship",
"to",
"be",
"removed",
"from",
"this",
"task",
"instance",
".",
"It",
"will",
"only",
"delete",
"relationships",
"that",
"exactly",
"match",
"the",
"given",
"targetTask",
"type",
"and",
"lag",
"ti... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4589-L4635 |
157,771 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.removeRelation | private boolean removeRelation(List<Relation> relationList, Task targetTask, RelationType type, Duration lag)
{
boolean matchFound = false;
for (Relation relation : relationList)
{
if (relation.getTargetTask() == targetTask)
{
if (relation.getType() == type && relation... | java | private boolean removeRelation(List<Relation> relationList, Task targetTask, RelationType type, Duration lag)
{
boolean matchFound = false;
for (Relation relation : relationList)
{
if (relation.getTargetTask() == targetTask)
{
if (relation.getType() == type && relation... | [
"private",
"boolean",
"removeRelation",
"(",
"List",
"<",
"Relation",
">",
"relationList",
",",
"Task",
"targetTask",
",",
"RelationType",
"type",
",",
"Duration",
"lag",
")",
"{",
"boolean",
"matchFound",
"=",
"false",
";",
"for",
"(",
"Relation",
"relation",... | Internal method used to locate an remove an item from a list Relations.
@param relationList list of Relation instances
@param targetTask target relationship task
@param type target relationship type
@param lag target relationship lag
@return true if a relationship was removed | [
"Internal",
"method",
"used",
"to",
"locate",
"an",
"remove",
"an",
"item",
"from",
"a",
"list",
"Relations",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L4646-L4661 |
157,772 | joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.isRelated | private boolean isRelated(Task task, List<Relation> list)
{
boolean result = false;
for (Relation relation : list)
{
if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
{
result = true;
break;
}
}
ret... | java | private boolean isRelated(Task task, List<Relation> list)
{
boolean result = false;
for (Relation relation : list)
{
if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
{
result = true;
break;
}
}
ret... | [
"private",
"boolean",
"isRelated",
"(",
"Task",
"task",
",",
"List",
"<",
"Relation",
">",
"list",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"Relation",
"relation",
":",
"list",
")",
"{",
"if",
"(",
"relation",
".",
"getTargetTask",
... | Internal method used to test for the existence of a relationship
with a task.
@param task target task
@param list list of relationships
@return boolean flag | [
"Internal",
"method",
"used",
"to",
"test",
"for",
"the",
"existence",
"of",
"a",
"relationship",
"with",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L5020-L5032 |
157,773 | jensgerdes/sonar-pmd | sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleSet.java | PmdRuleSet.writeTo | public void writeTo(Writer destination) {
Element eltRuleset = new Element("ruleset");
addAttribute(eltRuleset, "name", name);
addChild(eltRuleset, "description", description);
for (PmdRule pmdRule : rules) {
Element eltRule = new Element("rule");
addAttribute(elt... | java | public void writeTo(Writer destination) {
Element eltRuleset = new Element("ruleset");
addAttribute(eltRuleset, "name", name);
addChild(eltRuleset, "description", description);
for (PmdRule pmdRule : rules) {
Element eltRule = new Element("rule");
addAttribute(elt... | [
"public",
"void",
"writeTo",
"(",
"Writer",
"destination",
")",
"{",
"Element",
"eltRuleset",
"=",
"new",
"Element",
"(",
"\"ruleset\"",
")",
";",
"addAttribute",
"(",
"eltRuleset",
",",
"\"name\"",
",",
"name",
")",
";",
"addChild",
"(",
"eltRuleset",
",",
... | Serializes this RuleSet in an XML document.
@param destination The writer to which the XML document shall be written. | [
"Serializes",
"this",
"RuleSet",
"in",
"an",
"XML",
"document",
"."
] | 49b9272b2a71aa1b480972ec6cb4cc347bb50959 | https://github.com/jensgerdes/sonar-pmd/blob/49b9272b2a71aa1b480972ec6cb4cc347bb50959/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleSet.java#L76-L102 |
157,774 | jensgerdes/sonar-pmd | sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/factory/XmlRuleSetFactory.java | XmlRuleSetFactory.create | @Override
public PmdRuleSet create() {
final SAXBuilder parser = new SAXBuilder();
final Document dom;
try {
dom = parser.build(source);
} catch (JDOMException | IOException e) {
if (messages != null) {
messages.addErrorText(INVALID_INPUT + " :... | java | @Override
public PmdRuleSet create() {
final SAXBuilder parser = new SAXBuilder();
final Document dom;
try {
dom = parser.build(source);
} catch (JDOMException | IOException e) {
if (messages != null) {
messages.addErrorText(INVALID_INPUT + " :... | [
"@",
"Override",
"public",
"PmdRuleSet",
"create",
"(",
")",
"{",
"final",
"SAXBuilder",
"parser",
"=",
"new",
"SAXBuilder",
"(",
")",
";",
"final",
"Document",
"dom",
";",
"try",
"{",
"dom",
"=",
"parser",
".",
"build",
"(",
"source",
")",
";",
"}",
... | Parses the given Reader for PmdRuleSets.
@return The extracted PmdRuleSet - empty in case of problems, never null. | [
"Parses",
"the",
"given",
"Reader",
"for",
"PmdRuleSets",
"."
] | 49b9272b2a71aa1b480972ec6cb4cc347bb50959 | https://github.com/jensgerdes/sonar-pmd/blob/49b9272b2a71aa1b480972ec6cb4cc347bb50959/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/factory/XmlRuleSetFactory.java#L100-L137 |
157,775 | jensgerdes/sonar-pmd | sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/TextRangeCalculator.java | TextRangeCalculator.calculateBeginLine | private static int calculateBeginLine(RuleViolation pmdViolation) {
int minLine = Math.min(pmdViolation.getBeginLine(), pmdViolation.getEndLine());
return minLine > 0 ? minLine : calculateEndLine(pmdViolation);
} | java | private static int calculateBeginLine(RuleViolation pmdViolation) {
int minLine = Math.min(pmdViolation.getBeginLine(), pmdViolation.getEndLine());
return minLine > 0 ? minLine : calculateEndLine(pmdViolation);
} | [
"private",
"static",
"int",
"calculateBeginLine",
"(",
"RuleViolation",
"pmdViolation",
")",
"{",
"int",
"minLine",
"=",
"Math",
".",
"min",
"(",
"pmdViolation",
".",
"getBeginLine",
"(",
")",
",",
"pmdViolation",
".",
"getEndLine",
"(",
")",
")",
";",
"retu... | Calculates the beginLine of a violation report.
@param pmdViolation The violation for which the beginLine should be calculated.
@return The beginLine is assumed to be the line with the smallest number. However, if the smallest number is
out-of-range (non-positive), it takes the other number. | [
"Calculates",
"the",
"beginLine",
"of",
"a",
"violation",
"report",
"."
] | 49b9272b2a71aa1b480972ec6cb4cc347bb50959 | https://github.com/jensgerdes/sonar-pmd/blob/49b9272b2a71aa1b480972ec6cb4cc347bb50959/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/TextRangeCalculator.java#L61-L64 |
157,776 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java | SearchViewFacade.findViewById | @Nullable public View findViewById(int id) {
if (searchView != null) {
return searchView.findViewById(id);
} else if (supportView != null) {
return supportView.findViewById(id);
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | java | @Nullable public View findViewById(int id) {
if (searchView != null) {
return searchView.findViewById(id);
} else if (supportView != null) {
return supportView.findViewById(id);
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | [
"@",
"Nullable",
"public",
"View",
"findViewById",
"(",
"int",
"id",
")",
"{",
"if",
"(",
"searchView",
"!=",
"null",
")",
"{",
"return",
"searchView",
".",
"findViewById",
"(",
"id",
")",
";",
"}",
"else",
"if",
"(",
"supportView",
"!=",
"null",
")",
... | Look for a child view with the given id. If this view has the given
id, return this view.
@param id The id to search for.
@return The view that has the given id in the hierarchy or null | [
"Look",
"for",
"a",
"child",
"view",
"with",
"the",
"given",
"id",
".",
"If",
"this",
"view",
"has",
"the",
"given",
"id",
"return",
"this",
"view",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java#L88-L95 |
157,777 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java | SearchViewFacade.getContext | @NonNull public Context getContext() {
if (searchView != null) {
return searchView.getContext();
} else if (supportView != null) {
return supportView.getContext();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | java | @NonNull public Context getContext() {
if (searchView != null) {
return searchView.getContext();
} else if (supportView != null) {
return supportView.getContext();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | [
"@",
"NonNull",
"public",
"Context",
"getContext",
"(",
")",
"{",
"if",
"(",
"searchView",
"!=",
"null",
")",
"{",
"return",
"searchView",
".",
"getContext",
"(",
")",
";",
"}",
"else",
"if",
"(",
"supportView",
"!=",
"null",
")",
"{",
"return",
"suppo... | Returns the context the view is running in, through which it can
access the current theme, resources, etc.
@return The view's Context. | [
"Returns",
"the",
"context",
"the",
"view",
"is",
"running",
"in",
"through",
"which",
"it",
"can",
"access",
"the",
"current",
"theme",
"resources",
"etc",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java#L103-L110 |
157,778 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java | SearchViewFacade.getQuery | @NonNull public CharSequence getQuery() {
if (searchView != null) {
return searchView.getQuery();
} else if (supportView != null) {
return supportView.getQuery();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | java | @NonNull public CharSequence getQuery() {
if (searchView != null) {
return searchView.getQuery();
} else if (supportView != null) {
return supportView.getQuery();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
} | [
"@",
"NonNull",
"public",
"CharSequence",
"getQuery",
"(",
")",
"{",
"if",
"(",
"searchView",
"!=",
"null",
")",
"{",
"return",
"searchView",
".",
"getQuery",
"(",
")",
";",
"}",
"else",
"if",
"(",
"supportView",
"!=",
"null",
")",
"{",
"return",
"supp... | Returns the query string currently in the text field.
@return the query string | [
"Returns",
"the",
"query",
"string",
"currently",
"in",
"the",
"text",
"field",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java#L117-L124 |
157,779 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java | SearchViewFacade.setOnQueryTextListener | public void setOnQueryTextListener(@NonNull final SearchView.OnQueryTextListener listener) {
if (searchView != null) {
searchView.setOnQueryTextListener(listener);
} else if (supportView != null) {
supportView.setOnQueryTextListener(new android.support.v7.widget.SearchView.OnQuer... | java | public void setOnQueryTextListener(@NonNull final SearchView.OnQueryTextListener listener) {
if (searchView != null) {
searchView.setOnQueryTextListener(listener);
} else if (supportView != null) {
supportView.setOnQueryTextListener(new android.support.v7.widget.SearchView.OnQuer... | [
"public",
"void",
"setOnQueryTextListener",
"(",
"@",
"NonNull",
"final",
"SearchView",
".",
"OnQueryTextListener",
"listener",
")",
"{",
"if",
"(",
"searchView",
"!=",
"null",
")",
"{",
"searchView",
".",
"setOnQueryTextListener",
"(",
"listener",
")",
";",
"}"... | Sets a listener for user actions within the SearchView.
@param listener the listener object that receives callbacks when the user performs
actions in the SearchView such as clicking on buttons or typing a query. | [
"Sets",
"a",
"listener",
"for",
"user",
"actions",
"within",
"the",
"SearchView",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java#L187-L203 |
157,780 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java | SearchViewFacade.setOnCloseListener | public void setOnCloseListener(@NonNull final android.support.v7.widget.SearchView.OnCloseListener listener) {
if (searchView != null) {
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override public boolean onClose() {
return listener.onClose()... | java | public void setOnCloseListener(@NonNull final android.support.v7.widget.SearchView.OnCloseListener listener) {
if (searchView != null) {
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override public boolean onClose() {
return listener.onClose()... | [
"public",
"void",
"setOnCloseListener",
"(",
"@",
"NonNull",
"final",
"android",
".",
"support",
".",
"v7",
".",
"widget",
".",
"SearchView",
".",
"OnCloseListener",
"listener",
")",
"{",
"if",
"(",
"searchView",
"!=",
"null",
")",
"{",
"searchView",
".",
... | Sets a listener to inform when the user closes the SearchView.
@param listener the listener to call when the user closes the SearchView. | [
"Sets",
"a",
"listener",
"to",
"inform",
"when",
"the",
"user",
"closes",
"the",
"SearchView",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/utils/SearchViewFacade.java#L253-L265 |
157,781 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.get | public static Searcher get(String variant) {
final Searcher searcher = instances.get(variant);
if (searcher == null) {
throw new IllegalStateException(Errors.SEARCHER_GET_BEFORE_CREATE);
}
return searcher;
} | java | public static Searcher get(String variant) {
final Searcher searcher = instances.get(variant);
if (searcher == null) {
throw new IllegalStateException(Errors.SEARCHER_GET_BEFORE_CREATE);
}
return searcher;
} | [
"public",
"static",
"Searcher",
"get",
"(",
"String",
"variant",
")",
"{",
"final",
"Searcher",
"searcher",
"=",
"instances",
".",
"get",
"(",
"variant",
")",
";",
"if",
"(",
"searcher",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",... | Gets the Searcher for a given variant.
@param variant an identifier to differentiate this Searcher from eventual others.
@return the corresponding Searcher instance.
@throws IllegalStateException if no searcher was {@link #create(Searchable) created} before for this {@code variant}. | [
"Gets",
"the",
"Searcher",
"for",
"a",
"given",
"variant",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L166-L172 |
157,782 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.reset | @NonNull
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher reset() {
lastResponsePage = 0;
lastRequestPage = 0;
lastResponseId = 0;
endReached = false;
clearFacetRefinements();
cancelPendingRequests();
numericRefinements.cl... | java | @NonNull
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher reset() {
lastResponsePage = 0;
lastRequestPage = 0;
lastResponseId = 0;
endReached = false;
clearFacetRefinements();
cancelPendingRequests();
numericRefinements.cl... | [
"@",
"NonNull",
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"Searcher",
"reset",
"(",
")",
"{",
"lastResponsePage",
"=",
"0",
";",
"lastRequestPage",
"=",
"0",
";",
"lastResponseId",
"=",
... | Resets the helper's state.
@return this {@link Searcher} for chaining. | [
"Resets",
"the",
"helper",
"s",
"state",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L463-L474 |
157,783 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.cancelPendingRequests | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher cancelPendingRequests() {
if (pendingRequests.size() != 0) {
for (int i = 0; i < pendingRequests.size(); i++) {
int reqId = pendingRequests.keyAt(i);
Request r = pendingRequests.val... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher cancelPendingRequests() {
if (pendingRequests.size() != 0) {
for (int i = 0; i < pendingRequests.size(); i++) {
int reqId = pendingRequests.keyAt(i);
Request r = pendingRequests.val... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"Searcher",
"cancelPendingRequests",
"(",
")",
"{",
"if",
"(",
"pendingRequests",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"for",
"(",
"i... | Cancels all requests still waiting for a response.
@return this {@link Searcher} for chaining. | [
"Cancels",
"all",
"requests",
"still",
"waiting",
"for",
"a",
"response",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L491-L503 |
157,784 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.addBooleanFilter | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher addBooleanFilter(String attribute, Boolean value) {
booleanFilterMap.put(attribute, value);
rebuildQueryFacetFilters();
return this;
} | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher addBooleanFilter(String attribute, Boolean value) {
booleanFilterMap.put(attribute, value);
rebuildQueryFacetFilters();
return this;
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"Searcher",
"addBooleanFilter",
"(",
"String",
"attribute",
",",
"Boolean",
"value",
")",
"{",
"booleanFilterMap",
".",
"put",
"(",
"attribute",
"... | Adds a boolean refinement for the next queries.
@param attribute the attribute to refine on.
@param value the value to refine with.
@return this {@link Searcher} for chaining. | [
"Adds",
"a",
"boolean",
"refinement",
"for",
"the",
"next",
"queries",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L768-L773 |
157,785 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.addFacet | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher addFacet(String... attributes) {
for (String attribute : attributes) {
final Integer value = facetRequestCount.get(attribute);
facetRequestCount.put(attribute, value == null ? 1 : value + 1);
... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher addFacet(String... attributes) {
for (String attribute : attributes) {
final Integer value = facetRequestCount.get(attribute);
facetRequestCount.put(attribute, value == null ? 1 : value + 1);
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"Searcher",
"addFacet",
"(",
"String",
"...",
"attributes",
")",
"{",
"for",
"(",
"String",
"attribute",
":",
"attributes",
")",
"{",
"final",
... | Adds one or several attributes to facet on for the next queries.
@param attributes one or more attribute names.
@return this {@link Searcher} for chaining. | [
"Adds",
"one",
"or",
"several",
"attributes",
"to",
"facet",
"on",
"for",
"the",
"next",
"queries",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L809-L820 |
157,786 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java | Searcher.deleteFacet | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher deleteFacet(String... attributes) {
for (String attribute : attributes) {
facetRequestCount.put(attribute, 0);
facets.remove(attribute);
}
rebuildQueryFacets();
return this;
... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public Searcher deleteFacet(String... attributes) {
for (String attribute : attributes) {
facetRequestCount.put(attribute, 0);
facets.remove(attribute);
}
rebuildQueryFacets();
return this;
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"Searcher",
"deleteFacet",
"(",
"String",
"...",
"attributes",
")",
"{",
"for",
"(",
"String",
"attribute",
":",
"attributes",
")",
"{",
"facetR... | Forces removal of one or several faceted attributes for the next queries.
@param attributes one or more attribute names.
@return this {@link Searcher} for chaining. | [
"Forces",
"removal",
"of",
"one",
"or",
"several",
"faceted",
"attributes",
"for",
"the",
"next",
"queries",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L852-L860 |
157,787 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/model/NumericRefinement.java | NumericRefinement.checkOperatorIsValid | public static void checkOperatorIsValid(int operatorCode) {
switch (operatorCode) {
case OPERATOR_LT:
case OPERATOR_LE:
case OPERATOR_EQ:
case OPERATOR_NE:
case OPERATOR_GE:
case OPERATOR_GT:
case OPERATOR_UNKNOWN:
... | java | public static void checkOperatorIsValid(int operatorCode) {
switch (operatorCode) {
case OPERATOR_LT:
case OPERATOR_LE:
case OPERATOR_EQ:
case OPERATOR_NE:
case OPERATOR_GE:
case OPERATOR_GT:
case OPERATOR_UNKNOWN:
... | [
"public",
"static",
"void",
"checkOperatorIsValid",
"(",
"int",
"operatorCode",
")",
"{",
"switch",
"(",
"operatorCode",
")",
"{",
"case",
"OPERATOR_LT",
":",
"case",
"OPERATOR_LE",
":",
"case",
"OPERATOR_EQ",
":",
"case",
"OPERATOR_NE",
":",
"case",
"OPERATOR_G... | Checks if the given operator code is a valid one.
@param operatorCode an operator code to evaluate
@throws IllegalStateException if operatorCode is not a known operator code. | [
"Checks",
"if",
"the",
"given",
"operator",
"code",
"is",
"a",
"valid",
"one",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/model/NumericRefinement.java#L81-L94 |
157,788 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java | JSONUtils.getStringFromJSONPath | public static String getStringFromJSONPath(JSONObject record, String path) {
final Object object = getObjectFromJSONPath(record, path);
return object == null ? null : object.toString();
} | java | public static String getStringFromJSONPath(JSONObject record, String path) {
final Object object = getObjectFromJSONPath(record, path);
return object == null ? null : object.toString();
} | [
"public",
"static",
"String",
"getStringFromJSONPath",
"(",
"JSONObject",
"record",
",",
"String",
"path",
")",
"{",
"final",
"Object",
"object",
"=",
"getObjectFromJSONPath",
"(",
"record",
",",
"path",
")",
";",
"return",
"object",
"==",
"null",
"?",
"null",... | Gets a string attribute from a json object given a path to traverse.
@param record a JSONObject to traverse.
@param path the json path to follow.
@return the attribute as a {@link String}, or null if it was not found. | [
"Gets",
"a",
"string",
"attribute",
"from",
"a",
"json",
"object",
"given",
"a",
"path",
"to",
"traverse",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java#L21-L24 |
157,789 | algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java | JSONUtils.getMapFromJSONPath | public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | java | public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | [
"public",
"static",
"HashMap",
"<",
"String",
",",
"String",
">",
"getMapFromJSONPath",
"(",
"JSONObject",
"record",
",",
"String",
"path",
")",
"{",
"return",
"getObjectFromJSONPath",
"(",
"record",
",",
"path",
")",
";",
"}"
] | Gets a Map of attributes from a json object given a path to traverse.
@param record a JSONObject to traverse.
@param path the json path to follow.
@return the attributes as a {@link HashMap}, or null if it was not found. | [
"Gets",
"a",
"Map",
"of",
"attributes",
"from",
"a",
"json",
"object",
"given",
"a",
"path",
"to",
"traverse",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java#L33-L35 |
157,790 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/views/Hits.java | Hits.enableKeyboardAutoHiding | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void enableKeyboardAutoHiding() {
keyboardListener = new OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
if (dx != 0 || dy != 0) {
... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void enableKeyboardAutoHiding() {
keyboardListener = new OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
if (dx != 0 || dy != 0) {
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"void",
"enableKeyboardAutoHiding",
"(",
")",
"{",
"keyboardListener",
"=",
"new",
"OnScrollListener",
"(",
")",
"{",
"@",
"Override",
"public",
"... | Starts closing the keyboard when the hits are scrolled. | [
"Starts",
"closing",
"the",
"keyboard",
"when",
"the",
"hits",
"are",
"scrolled",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/views/Hits.java#L210-L224 |
157,791 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java | InstantSearch.search | public void search(String query) {
final Query newQuery = searcher.getQuery().setQuery(query);
searcher.setQuery(newQuery).search();
} | java | public void search(String query) {
final Query newQuery = searcher.getQuery().setQuery(query);
searcher.setQuery(newQuery).search();
} | [
"public",
"void",
"search",
"(",
"String",
"query",
")",
"{",
"final",
"Query",
"newQuery",
"=",
"searcher",
".",
"getQuery",
"(",
")",
".",
"setQuery",
"(",
"query",
")",
";",
"searcher",
".",
"setQuery",
"(",
"newQuery",
")",
".",
"search",
"(",
")",... | Triggers a new search with the given text.
@param query the text to search for. | [
"Triggers",
"a",
"new",
"search",
"with",
"the",
"given",
"text",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L176-L179 |
157,792 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java | InstantSearch.registerFilters | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void registerFilters(List<AlgoliaFilter> filters) {
for (final AlgoliaFilter filter : filters) {
searcher.addFacet(filter.getAttribute());
}
} | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void registerFilters(List<AlgoliaFilter> filters) {
for (final AlgoliaFilter filter : filters) {
searcher.addFacet(filter.getAttribute());
}
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"void",
"registerFilters",
"(",
"List",
"<",
"AlgoliaFilter",
">",
"filters",
")",
"{",
"for",
"(",
"final",
"AlgoliaFilter",
"filter",
":",
"fi... | Registers your facet filters, adding them to this InstantSearch's widgets.
@param filters a List of facet filters. | [
"Registers",
"your",
"facet",
"filters",
"adding",
"them",
"to",
"this",
"InstantSearch",
"s",
"widgets",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L324-L329 |
157,793 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java | InstantSearch.registerWidget | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void registerWidget(View widget) {
prepareWidget(widget);
if (widget instanceof AlgoliaResultsListener) {
AlgoliaResultsListener listener = (AlgoliaResultsListener) widget;
if (!this.resultListeners.co... | java | @SuppressWarnings({"WeakerAccess", "unused"}) // For library users
public void registerWidget(View widget) {
prepareWidget(widget);
if (widget instanceof AlgoliaResultsListener) {
AlgoliaResultsListener listener = (AlgoliaResultsListener) widget;
if (!this.resultListeners.co... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"WeakerAccess\"",
",",
"\"unused\"",
"}",
")",
"// For library users",
"public",
"void",
"registerWidget",
"(",
"View",
"widget",
")",
"{",
"prepareWidget",
"(",
"widget",
")",
";",
"if",
"(",
"widget",
"instanceof",
"Algolia... | Links the given widget to InstantSearch according to the interfaces it implements.
@param widget a widget implementing ({@link AlgoliaResultsListener} || {@link AlgoliaErrorListener} || {@link AlgoliaSearcherListener}). | [
"Links",
"the",
"given",
"widget",
"to",
"InstantSearch",
"according",
"to",
"the",
"interfaces",
"it",
"implements",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L365-L387 |
157,794 | algolia/instantsearch-android | ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java | InstantSearch.processAllListeners | private List<String> processAllListeners(View rootView) {
List<String> refinementAttributes = new ArrayList<>();
// Register any AlgoliaResultsListener (unless it has a different variant than searcher)
final List<AlgoliaResultsListener> resultListeners = LayoutViews.findByClass((ViewGroup) root... | java | private List<String> processAllListeners(View rootView) {
List<String> refinementAttributes = new ArrayList<>();
// Register any AlgoliaResultsListener (unless it has a different variant than searcher)
final List<AlgoliaResultsListener> resultListeners = LayoutViews.findByClass((ViewGroup) root... | [
"private",
"List",
"<",
"String",
">",
"processAllListeners",
"(",
"View",
"rootView",
")",
"{",
"List",
"<",
"String",
">",
"refinementAttributes",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Register any AlgoliaResultsListener (unless it has a different variant ... | Finds and sets up the Listeners in the given rootView.
@param rootView a View to traverse looking for listeners.
@return the list of refinement attributes found on listeners. | [
"Finds",
"and",
"sets",
"up",
"the",
"Listeners",
"in",
"the",
"given",
"rootView",
"."
] | 12092ec30140df9ffc2bf916339b433372034616 | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/helpers/InstantSearch.java#L395-L438 |
157,795 | uwolfer/gerrit-rest-java-client | src/main/java/com/urswolfer/gerrit/client/rest/http/accounts/AccountsRestClient.java | AccountsRestClient.suggestAccounts | @Override
public SuggestAccountsRequest suggestAccounts() throws RestApiException {
return new SuggestAccountsRequest() {
@Override
public List<AccountInfo> get() throws RestApiException {
return AccountsRestClient.this.suggestAccounts(this);
}
};
... | java | @Override
public SuggestAccountsRequest suggestAccounts() throws RestApiException {
return new SuggestAccountsRequest() {
@Override
public List<AccountInfo> get() throws RestApiException {
return AccountsRestClient.this.suggestAccounts(this);
}
};
... | [
"@",
"Override",
"public",
"SuggestAccountsRequest",
"suggestAccounts",
"(",
")",
"throws",
"RestApiException",
"{",
"return",
"new",
"SuggestAccountsRequest",
"(",
")",
"{",
"@",
"Override",
"public",
"List",
"<",
"AccountInfo",
">",
"get",
"(",
")",
"throws",
... | Added in Gerrit 2.11. | [
"Added",
"in",
"Gerrit",
"2",
".",
"11",
"."
] | fa66cd76270cd12cff9e30e0d96826fe0253d209 | https://github.com/uwolfer/gerrit-rest-java-client/blob/fa66cd76270cd12cff9e30e0d96826fe0253d209/src/main/java/com/urswolfer/gerrit/client/rest/http/accounts/AccountsRestClient.java#L60-L68 |
157,796 | uwolfer/gerrit-rest-java-client | src/main/java/com/google/gerrit/extensions/restapi/Url.java | Url.encode | public static String encode(String component) {
if (component != null) {
try {
return URLEncoder.encode(component, UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("JVM must support UTF-8", e);
}
}
return null;
} | java | public static String encode(String component) {
if (component != null) {
try {
return URLEncoder.encode(component, UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("JVM must support UTF-8", e);
}
}
return null;
} | [
"public",
"static",
"String",
"encode",
"(",
"String",
"component",
")",
"{",
"if",
"(",
"component",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"URLEncoder",
".",
"encode",
"(",
"component",
",",
"UTF_8",
".",
"name",
"(",
")",
")",
";",
"}",
"ca... | Encode a path segment, escaping characters not valid for a URL.
<p>The following characters are not escaped:
<ul>
<li>{@code a..z, A..Z, 0..9}
<li>{@code . - * _}
</ul>
<p>' ' (space) is encoded as '+'.
<p>All other characters (including '/') are converted to the triplet "%xy" where "xy" is the
hex representation o... | [
"Encode",
"a",
"path",
"segment",
"escaping",
"characters",
"not",
"valid",
"for",
"a",
"URL",
"."
] | fa66cd76270cd12cff9e30e0d96826fe0253d209 | https://github.com/uwolfer/gerrit-rest-java-client/blob/fa66cd76270cd12cff9e30e0d96826fe0253d209/src/main/java/com/google/gerrit/extensions/restapi/Url.java#L43-L52 |
157,797 | uwolfer/gerrit-rest-java-client | src/main/java/com/urswolfer/gerrit/client/rest/http/GerritRestClient.java | GerritRestClient.getXsrfFromHtmlBody | private Optional<String> getXsrfFromHtmlBody(HttpResponse loginResponse) throws IOException {
Optional<Cookie> gerritAccountCookie = findGerritAccountCookie();
if (gerritAccountCookie.isPresent()) {
Matcher matcher = GERRIT_AUTH_PATTERN.matcher(EntityUtils.toString(loginResponse.getEntity(),... | java | private Optional<String> getXsrfFromHtmlBody(HttpResponse loginResponse) throws IOException {
Optional<Cookie> gerritAccountCookie = findGerritAccountCookie();
if (gerritAccountCookie.isPresent()) {
Matcher matcher = GERRIT_AUTH_PATTERN.matcher(EntityUtils.toString(loginResponse.getEntity(),... | [
"private",
"Optional",
"<",
"String",
">",
"getXsrfFromHtmlBody",
"(",
"HttpResponse",
"loginResponse",
")",
"throws",
"IOException",
"{",
"Optional",
"<",
"Cookie",
">",
"gerritAccountCookie",
"=",
"findGerritAccountCookie",
"(",
")",
";",
"if",
"(",
"gerritAccount... | In Gerrit < 2.12 the XSRF token was included in the start page HTML. | [
"In",
"Gerrit",
"<",
"2",
".",
"12",
"the",
"XSRF",
"token",
"was",
"included",
"in",
"the",
"start",
"page",
"HTML",
"."
] | fa66cd76270cd12cff9e30e0d96826fe0253d209 | https://github.com/uwolfer/gerrit-rest-java-client/blob/fa66cd76270cd12cff9e30e0d96826fe0253d209/src/main/java/com/urswolfer/gerrit/client/rest/http/GerritRestClient.java#L361-L370 |
157,798 | uwolfer/gerrit-rest-java-client | src/main/java/com/urswolfer/gerrit/client/rest/http/GerritRestClient.java | GerritRestClient.getCredentialsProvider | private BasicCredentialsProvider getCredentialsProvider() {
return new BasicCredentialsProvider() {
private Set<AuthScope> authAlreadyTried = Sets.newHashSet();
@Override
public Credentials getCredentials(AuthScope authscope) {
if (authAlreadyTried.contains(a... | java | private BasicCredentialsProvider getCredentialsProvider() {
return new BasicCredentialsProvider() {
private Set<AuthScope> authAlreadyTried = Sets.newHashSet();
@Override
public Credentials getCredentials(AuthScope authscope) {
if (authAlreadyTried.contains(a... | [
"private",
"BasicCredentialsProvider",
"getCredentialsProvider",
"(",
")",
"{",
"return",
"new",
"BasicCredentialsProvider",
"(",
")",
"{",
"private",
"Set",
"<",
"AuthScope",
">",
"authAlreadyTried",
"=",
"Sets",
".",
"newHashSet",
"(",
")",
";",
"@",
"Override",... | With this impl, it only returns the same credentials once. Otherwise it's possible that a loop will occur.
When server returns status code 401, the HTTP client provides the same credentials forever.
Since we create a new HTTP client for every request, we can handle it this way. | [
"With",
"this",
"impl",
"it",
"only",
"returns",
"the",
"same",
"credentials",
"once",
".",
"Otherwise",
"it",
"s",
"possible",
"that",
"a",
"loop",
"will",
"occur",
".",
"When",
"server",
"returns",
"status",
"code",
"401",
"the",
"HTTP",
"client",
"provi... | fa66cd76270cd12cff9e30e0d96826fe0253d209 | https://github.com/uwolfer/gerrit-rest-java-client/blob/fa66cd76270cd12cff9e30e0d96826fe0253d209/src/main/java/com/urswolfer/gerrit/client/rest/http/GerritRestClient.java#L429-L442 |
157,799 | uwolfer/gerrit-rest-java-client | src/main/java/com/google/gerrit/extensions/restapi/BinaryResult.java | BinaryResult.asString | public String asString() throws IOException {
long len = getContentLength();
ByteArrayOutputStream buf;
if (0 < len) {
buf = new ByteArrayOutputStream((int) len);
} else {
buf = new ByteArrayOutputStream();
}
writeTo(buf);
return decode(buf.toByteArray(), getCharacterEncoding());... | java | public String asString() throws IOException {
long len = getContentLength();
ByteArrayOutputStream buf;
if (0 < len) {
buf = new ByteArrayOutputStream((int) len);
} else {
buf = new ByteArrayOutputStream();
}
writeTo(buf);
return decode(buf.toByteArray(), getCharacterEncoding());... | [
"public",
"String",
"asString",
"(",
")",
"throws",
"IOException",
"{",
"long",
"len",
"=",
"getContentLength",
"(",
")",
";",
"ByteArrayOutputStream",
"buf",
";",
"if",
"(",
"0",
"<",
"len",
")",
"{",
"buf",
"=",
"new",
"ByteArrayOutputStream",
"(",
"(",
... | Return a copy of the result as a String.
<p>The default version of this method copies the result into a temporary byte array and then
tries to decode it using the configured encoding.
@return string version of the result.
@throws IOException if the data cannot be produced or could not be decoded to a String. | [
"Return",
"a",
"copy",
"of",
"the",
"result",
"as",
"a",
"String",
"."
] | fa66cd76270cd12cff9e30e0d96826fe0253d209 | https://github.com/uwolfer/gerrit-rest-java-client/blob/fa66cd76270cd12cff9e30e0d96826fe0253d209/src/main/java/com/google/gerrit/extensions/restapi/BinaryResult.java#L154-L164 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.