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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.sort | private List<MapRow> sort(List<MapRow> rows, final String attribute)
{
Collections.sort(rows, new Comparator<MapRow>()
{
@Override public int compare(MapRow o1, MapRow o2)
{
String value1 = o1.getString(attribute);
String value2 = o2.getString(attribute);
... | java | private List<MapRow> sort(List<MapRow> rows, final String attribute)
{
Collections.sort(rows, new Comparator<MapRow>()
{
@Override public int compare(MapRow o1, MapRow o2)
{
String value1 = o1.getString(attribute);
String value2 = o2.getString(attribute);
... | [
"private",
"List",
"<",
"MapRow",
">",
"sort",
"(",
"List",
"<",
"MapRow",
">",
"rows",
",",
"final",
"String",
"attribute",
")",
"{",
"Collections",
".",
"sort",
"(",
"rows",
",",
"new",
"Comparator",
"<",
"MapRow",
">",
"(",
")",
"{",
"@",
"Overrid... | Sort MapRows based on a named attribute.
@param rows map rows to sort
@param attribute attribute to sort on
@return list argument (allows method chaining) | [
"Sort",
"MapRows",
"based",
"on",
"a",
"named",
"attribute",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L558-L570 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.updateDates | private void updateDates(Task parentTask)
{
if (parentTask.hasChildTasks())
{
Date plannedStartDate = null;
Date plannedFinishDate = null;
for (Task task : parentTask.getChildTasks())
{
updateDates(task);
plannedStartDate = DateHelper.min(plann... | java | private void updateDates(Task parentTask)
{
if (parentTask.hasChildTasks())
{
Date plannedStartDate = null;
Date plannedFinishDate = null;
for (Task task : parentTask.getChildTasks())
{
updateDates(task);
plannedStartDate = DateHelper.min(plann... | [
"private",
"void",
"updateDates",
"(",
"Task",
"parentTask",
")",
"{",
"if",
"(",
"parentTask",
".",
"hasChildTasks",
"(",
")",
")",
"{",
"Date",
"plannedStartDate",
"=",
"null",
";",
"Date",
"plannedFinishDate",
"=",
"null",
";",
"for",
"(",
"Task",
"task... | Recursively update parent task dates.
@param parentTask parent task | [
"Recursively",
"update",
"parent",
"task",
"dates",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L588-L605 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/common/MultiDateFormat.java | MultiDateFormat.parseNonNullDate | protected Date parseNonNullDate(String str, ParsePosition pos)
{
Date result = null;
for (int index = 0; index < m_formats.length; index++)
{
result = m_formats[index].parse(str, pos);
if (pos.getIndex() != 0)
{
break;
}
result = null;
... | java | protected Date parseNonNullDate(String str, ParsePosition pos)
{
Date result = null;
for (int index = 0; index < m_formats.length; index++)
{
result = m_formats[index].parse(str, pos);
if (pos.getIndex() != 0)
{
break;
}
result = null;
... | [
"protected",
"Date",
"parseNonNullDate",
"(",
"String",
"str",
",",
"ParsePosition",
"pos",
")",
"{",
"Date",
"result",
"=",
"null",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"m_formats",
".",
"length",
";",
"index",
"++",
")",
"{",... | We have a non-null date, try each format in turn to see if it can be parsed.
@param str date to parse
@param pos position at which to start parsing
@return Date instance | [
"We",
"have",
"a",
"non",
"-",
"null",
"date",
"try",
"each",
"format",
"in",
"turn",
"to",
"see",
"if",
"it",
"can",
"be",
"parsed",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/MultiDateFormat.java#L79-L92 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ProjectEntityWithIDContainer.java | ProjectEntityWithIDContainer.renumberIDs | public void renumberIDs()
{
if (!isEmpty())
{
Collections.sort(this);
T firstEntity = get(0);
int id = NumberHelper.getInt(firstEntity.getID());
if (id != 0)
{
id = 1;
}
for (T entity : this)
{
entity.setID(I... | java | public void renumberIDs()
{
if (!isEmpty())
{
Collections.sort(this);
T firstEntity = get(0);
int id = NumberHelper.getInt(firstEntity.getID());
if (id != 0)
{
id = 1;
}
for (T entity : this)
{
entity.setID(I... | [
"public",
"void",
"renumberIDs",
"(",
")",
"{",
"if",
"(",
"!",
"isEmpty",
"(",
")",
")",
"{",
"Collections",
".",
"sort",
"(",
"this",
")",
";",
"T",
"firstEntity",
"=",
"get",
"(",
"0",
")",
";",
"int",
"id",
"=",
"NumberHelper",
".",
"getInt",
... | This method can be called to ensure that the IDs of all
entities are sequential, and start from an
appropriate point. If entities are added to and removed from
this list, then the project is loaded into Microsoft
project, if the ID values have gaps in the sequence, there will
be blank rows shown. | [
"This",
"method",
"can",
"be",
"called",
"to",
"ensure",
"that",
"the",
"IDs",
"of",
"all",
"entities",
"are",
"sequential",
"and",
"start",
"from",
"an",
"appropriate",
"point",
".",
"If",
"entities",
"are",
"added",
"to",
"and",
"removed",
"from",
"this"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectEntityWithIDContainer.java#L57-L74 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/Priority.java | Priority.getInstance | public static Priority getInstance(int priority)
{
Priority result;
if (priority >= LOWEST && priority <= DO_NOT_LEVEL && (priority % 100 == 0))
{
result = VALUE[(priority / 100) - 1];
}
else
{
result = new Priority(priority);
}
return (result);
... | java | public static Priority getInstance(int priority)
{
Priority result;
if (priority >= LOWEST && priority <= DO_NOT_LEVEL && (priority % 100 == 0))
{
result = VALUE[(priority / 100) - 1];
}
else
{
result = new Priority(priority);
}
return (result);
... | [
"public",
"static",
"Priority",
"getInstance",
"(",
"int",
"priority",
")",
"{",
"Priority",
"result",
";",
"if",
"(",
"priority",
">=",
"LOWEST",
"&&",
"priority",
"<=",
"DO_NOT_LEVEL",
"&&",
"(",
"priority",
"%",
"100",
"==",
"0",
")",
")",
"{",
"resul... | This method takes an integer enumeration of a priority
and returns an appropriate instance of this class. Note that unrecognised
values are treated as medium priority.
@param priority int version of the priority
@return Priority class instance | [
"This",
"method",
"takes",
"an",
"integer",
"enumeration",
"of",
"a",
"priority",
"and",
"returns",
"an",
"appropriate",
"instance",
"of",
"this",
"class",
".",
"Note",
"that",
"unrecognised",
"values",
"are",
"treated",
"as",
"medium",
"priority",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Priority.java#L61-L75 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java | AstaTextFileReader.processFile | private void processFile(InputStream is) throws MPXJException
{
try
{
InputStreamReader reader = new InputStreamReader(is, CharsetHelper.UTF8);
Tokenizer tk = new ReaderTokenizer(reader)
{
@Override protected boolean startQuotedIsValid(StringBuilder buffer)
... | java | private void processFile(InputStream is) throws MPXJException
{
try
{
InputStreamReader reader = new InputStreamReader(is, CharsetHelper.UTF8);
Tokenizer tk = new ReaderTokenizer(reader)
{
@Override protected boolean startQuotedIsValid(StringBuilder buffer)
... | [
"private",
"void",
"processFile",
"(",
"InputStream",
"is",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"InputStreamReader",
"reader",
"=",
"new",
"InputStreamReader",
"(",
"is",
",",
"CharsetHelper",
".",
"UTF8",
")",
";",
"Tokenizer",
"tk",
"=",
"new",
... | Tokenizes the input file and extracts the required data.
@param is input stream
@throws MPXJException | [
"Tokenizes",
"the",
"input",
"file",
"and",
"extracts",
"the",
"required",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java#L107-L213 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java | AstaTextFileReader.processFileType | private void processFileType(String token) throws MPXJException
{
String version = token.substring(2).split(" ")[0];
//System.out.println(version);
Class<? extends AbstractFileFormat> fileFormatClass = FILE_VERSION_MAP.get(Integer.valueOf(version));
if (fileFormatClass == null)
{
... | java | private void processFileType(String token) throws MPXJException
{
String version = token.substring(2).split(" ")[0];
//System.out.println(version);
Class<? extends AbstractFileFormat> fileFormatClass = FILE_VERSION_MAP.get(Integer.valueOf(version));
if (fileFormatClass == null)
{
... | [
"private",
"void",
"processFileType",
"(",
"String",
"token",
")",
"throws",
"MPXJException",
"{",
"String",
"version",
"=",
"token",
".",
"substring",
"(",
"2",
")",
".",
"split",
"(",
"\" \"",
")",
"[",
"0",
"]",
";",
"//System.out.println(version);",
"Cla... | Reads the file version and configures the expected file format.
@param token token containing the file version
@throws MPXJException | [
"Reads",
"the",
"file",
"version",
"and",
"configures",
"the",
"expected",
"file",
"format",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java#L221-L241 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java | AstaTextFileReader.processCalendars | private void processCalendars() throws SQLException
{
List<Row> rows = getTable("EXCEPTIONN");
Map<Integer, DayType> exceptionMap = m_reader.createExceptionTypeMap(rows);
rows = getTable("WORK_PATTERN");
Map<Integer, Row> workPatternMap = m_reader.createWorkPatternMap(rows);
rows = ne... | java | private void processCalendars() throws SQLException
{
List<Row> rows = getTable("EXCEPTIONN");
Map<Integer, DayType> exceptionMap = m_reader.createExceptionTypeMap(rows);
rows = getTable("WORK_PATTERN");
Map<Integer, Row> workPatternMap = m_reader.createWorkPatternMap(rows);
rows = ne... | [
"private",
"void",
"processCalendars",
"(",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"Row",
">",
"rows",
"=",
"getTable",
"(",
"\"EXCEPTIONN\"",
")",
";",
"Map",
"<",
"Integer",
",",
"DayType",
">",
"exceptionMap",
"=",
"m_reader",
".",
"createExcept... | Extract calendar data from the file.
@throws SQLException | [
"Extract",
"calendar",
"data",
"from",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java#L262-L291 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java | AstaTextFileReader.join | private List<Row> join(List<Row> leftRows, String leftColumn, String rightTable, List<Row> rightRows, String rightColumn)
{
List<Row> result = new LinkedList<Row>();
RowComparator leftComparator = new RowComparator(new String[]
{
leftColumn
});
RowComparator rightComparator = ... | java | private List<Row> join(List<Row> leftRows, String leftColumn, String rightTable, List<Row> rightRows, String rightColumn)
{
List<Row> result = new LinkedList<Row>();
RowComparator leftComparator = new RowComparator(new String[]
{
leftColumn
});
RowComparator rightComparator = ... | [
"private",
"List",
"<",
"Row",
">",
"join",
"(",
"List",
"<",
"Row",
">",
"leftRows",
",",
"String",
"leftColumn",
",",
"String",
"rightTable",
",",
"List",
"<",
"Row",
">",
"rightRows",
",",
"String",
"rightColumn",
")",
"{",
"List",
"<",
"Row",
">",
... | Very basic implementation of an inner join between two result sets.
@param leftRows left result set
@param leftColumn left foreign key column
@param rightTable right table name
@param rightRows right result set
@param rightColumn right primary key column
@return joined result set | [
"Very",
"basic",
"implementation",
"of",
"an",
"inner",
"join",
"between",
"two",
"result",
"sets",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java#L361-L425 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java | AstaTextFileReader.getTable | private List<Row> getTable(String name)
{
List<Row> result = m_tables.get(name);
if (result == null)
{
result = Collections.emptyList();
}
return result;
} | java | private List<Row> getTable(String name)
{
List<Row> result = m_tables.get(name);
if (result == null)
{
result = Collections.emptyList();
}
return result;
} | [
"private",
"List",
"<",
"Row",
">",
"getTable",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"Row",
">",
"result",
"=",
"m_tables",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"Collections",
".",
... | Retrieve table data, return an empty result set if no table data is present.
@param name table name
@return table data | [
"Retrieve",
"table",
"data",
"return",
"an",
"empty",
"result",
"set",
"if",
"no",
"table",
"data",
"is",
"present",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaTextFileReader.java#L433-L441 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readProjectProperties | private void readProjectProperties(Project ganttProject)
{
ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(ganttProject.getName());
mpxjProperties.setCompany(ganttProject.getCompany());
mpxjProperties.setDefaultDurationUnits(TimeUnit.DAYS);
... | java | private void readProjectProperties(Project ganttProject)
{
ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(ganttProject.getName());
mpxjProperties.setCompany(ganttProject.getCompany());
mpxjProperties.setDefaultDurationUnits(TimeUnit.DAYS);
... | [
"private",
"void",
"readProjectProperties",
"(",
"Project",
"ganttProject",
")",
"{",
"ProjectProperties",
"mpxjProperties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"mpxjProperties",
".",
"setName",
"(",
"ganttProject",
".",
"getName",
"(",
... | This method extracts project properties from a GanttProject file.
@param ganttProject GanttProject file | [
"This",
"method",
"extracts",
"project",
"properties",
"from",
"a",
"GanttProject",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L202-L215 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readCalendars | private void readCalendars(Project ganttProject)
{
m_mpxjCalendar = m_projectFile.addCalendar();
m_mpxjCalendar.setName(ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME);
Calendars gpCalendar = ganttProject.getCalendars();
setWorkingDays(m_mpxjCalendar, gpCalendar);
setExceptions(m_mpxjCalen... | java | private void readCalendars(Project ganttProject)
{
m_mpxjCalendar = m_projectFile.addCalendar();
m_mpxjCalendar.setName(ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME);
Calendars gpCalendar = ganttProject.getCalendars();
setWorkingDays(m_mpxjCalendar, gpCalendar);
setExceptions(m_mpxjCalen... | [
"private",
"void",
"readCalendars",
"(",
"Project",
"ganttProject",
")",
"{",
"m_mpxjCalendar",
"=",
"m_projectFile",
".",
"addCalendar",
"(",
")",
";",
"m_mpxjCalendar",
".",
"setName",
"(",
"ProjectCalendar",
".",
"DEFAULT_BASE_CALENDAR_NAME",
")",
";",
"Calendars... | This method extracts calendar data from a GanttProject file.
@param ganttProject Root node of the GanttProject file | [
"This",
"method",
"extracts",
"calendar",
"data",
"from",
"a",
"GanttProject",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L222-L231 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.setWorkingDays | private void setWorkingDays(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
{
DayTypes dayTypes = gpCalendar.getDayTypes();
DefaultWeek defaultWeek = dayTypes.getDefaultWeek();
if (defaultWeek == null)
{
mpxjCalendar.setWorkingDay(Day.SUNDAY, false);
mpxjCalendar.setWork... | java | private void setWorkingDays(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
{
DayTypes dayTypes = gpCalendar.getDayTypes();
DefaultWeek defaultWeek = dayTypes.getDefaultWeek();
if (defaultWeek == null)
{
mpxjCalendar.setWorkingDay(Day.SUNDAY, false);
mpxjCalendar.setWork... | [
"private",
"void",
"setWorkingDays",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"Calendars",
"gpCalendar",
")",
"{",
"DayTypes",
"dayTypes",
"=",
"gpCalendar",
".",
"getDayTypes",
"(",
")",
";",
"DefaultWeek",
"defaultWeek",
"=",
"dayTypes",
".",
"getDefaultWeek",... | Add working days and working time to a calendar.
@param mpxjCalendar MPXJ calendar
@param gpCalendar GanttProject calendar | [
"Add",
"working",
"days",
"and",
"working",
"time",
"to",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L239-L273 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.setExceptions | private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
{
List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate();
for (net.sf.mpxj.ganttproject.schema.Date date : dates)
{
addException(mpxjCalendar, date);
}
} | java | private void setExceptions(ProjectCalendar mpxjCalendar, Calendars gpCalendar)
{
List<net.sf.mpxj.ganttproject.schema.Date> dates = gpCalendar.getDate();
for (net.sf.mpxj.ganttproject.schema.Date date : dates)
{
addException(mpxjCalendar, date);
}
} | [
"private",
"void",
"setExceptions",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"Calendars",
"gpCalendar",
")",
"{",
"List",
"<",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Date",
">",
"dates",
"=",
"gpCalendar",
".",
"getDate"... | Add exceptions to the calendar.
@param mpxjCalendar MPXJ calendar
@param gpCalendar GanttProject calendar | [
"Add",
"exceptions",
"to",
"the",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L292-L299 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.addException | private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
{
String year = date.getYear();
if (year == null || year.isEmpty())
{
// In order to process recurring exceptions using MPXJ, we need a start and end date
// to constrain the number ... | java | private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
{
String year = date.getYear();
if (year == null || year.isEmpty())
{
// In order to process recurring exceptions using MPXJ, we need a start and end date
// to constrain the number ... | [
"private",
"void",
"addException",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Date",
"date",
")",
"{",
"String",
"year",
"=",
"date",
".",
"getYear",
"(",
")",
";",
"if",
"(",
"... | Add a single exception to a calendar.
@param mpxjCalendar MPXJ calendar
@param date calendar exception | [
"Add",
"a",
"single",
"exception",
"to",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L307-L334 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResources | private void readResources(Project ganttProject)
{
Resources resources = ganttProject.getResources();
readResourceCustomPropertyDefinitions(resources);
readRoleDefinitions(ganttProject);
for (net.sf.mpxj.ganttproject.schema.Resource gpResource : resources.getResource())
{
read... | java | private void readResources(Project ganttProject)
{
Resources resources = ganttProject.getResources();
readResourceCustomPropertyDefinitions(resources);
readRoleDefinitions(ganttProject);
for (net.sf.mpxj.ganttproject.schema.Resource gpResource : resources.getResource())
{
read... | [
"private",
"void",
"readResources",
"(",
"Project",
"ganttProject",
")",
"{",
"Resources",
"resources",
"=",
"ganttProject",
".",
"getResources",
"(",
")",
";",
"readResourceCustomPropertyDefinitions",
"(",
"resources",
")",
";",
"readRoleDefinitions",
"(",
"ganttProj... | This method extracts resource data from a GanttProject file.
@param ganttProject parent node for resources | [
"This",
"method",
"extracts",
"resource",
"data",
"from",
"a",
"GanttProject",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L341-L351 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResourceCustomPropertyDefinitions | private void readResourceCustomPropertyDefinitions(Resources gpResources)
{
CustomField field = m_projectFile.getCustomFields().getCustomField(ResourceField.TEXT1);
field.setAlias("Phone");
for (CustomPropertyDefinition definition : gpResources.getCustomPropertyDefinition())
{
//
... | java | private void readResourceCustomPropertyDefinitions(Resources gpResources)
{
CustomField field = m_projectFile.getCustomFields().getCustomField(ResourceField.TEXT1);
field.setAlias("Phone");
for (CustomPropertyDefinition definition : gpResources.getCustomPropertyDefinition())
{
//
... | [
"private",
"void",
"readResourceCustomPropertyDefinitions",
"(",
"Resources",
"gpResources",
")",
"{",
"CustomField",
"field",
"=",
"m_projectFile",
".",
"getCustomFields",
"(",
")",
".",
"getCustomField",
"(",
"ResourceField",
".",
"TEXT1",
")",
";",
"field",
".",
... | Read custom property definitions for resources.
@param gpResources GanttProject resources | [
"Read",
"custom",
"property",
"definitions",
"for",
"resources",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L358-L395 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readTaskCustomPropertyDefinitions | private void readTaskCustomPropertyDefinitions(Tasks gpTasks)
{
for (Taskproperty definition : gpTasks.getTaskproperties().getTaskproperty())
{
//
// Ignore everything but custom values
//
if (!"custom".equals(definition.getType()))
{
continue;
... | java | private void readTaskCustomPropertyDefinitions(Tasks gpTasks)
{
for (Taskproperty definition : gpTasks.getTaskproperties().getTaskproperty())
{
//
// Ignore everything but custom values
//
if (!"custom".equals(definition.getType()))
{
continue;
... | [
"private",
"void",
"readTaskCustomPropertyDefinitions",
"(",
"Tasks",
"gpTasks",
")",
"{",
"for",
"(",
"Taskproperty",
"definition",
":",
"gpTasks",
".",
"getTaskproperties",
"(",
")",
".",
"getTaskproperty",
"(",
")",
")",
"{",
"//",
"// Ignore everything but custo... | Read custom property definitions for tasks.
@param gpTasks GanttProject tasks | [
"Read",
"custom",
"property",
"definitions",
"for",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L402-L444 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readRoleDefinitions | private void readRoleDefinitions(Project gpProject)
{
m_roleDefinitions.put("Default:1", "project manager");
for (Roles roles : gpProject.getRoles())
{
if ("Default".equals(roles.getRolesetName()))
{
continue;
}
for (Role role : roles.getRole())
... | java | private void readRoleDefinitions(Project gpProject)
{
m_roleDefinitions.put("Default:1", "project manager");
for (Roles roles : gpProject.getRoles())
{
if ("Default".equals(roles.getRolesetName()))
{
continue;
}
for (Role role : roles.getRole())
... | [
"private",
"void",
"readRoleDefinitions",
"(",
"Project",
"gpProject",
")",
"{",
"m_roleDefinitions",
".",
"put",
"(",
"\"Default:1\"",
",",
"\"project manager\"",
")",
";",
"for",
"(",
"Roles",
"roles",
":",
"gpProject",
".",
"getRoles",
"(",
")",
")",
"{",
... | Read the role definitions from a GanttProject project.
@param gpProject GanttProject project | [
"Read",
"the",
"role",
"definitions",
"from",
"a",
"GanttProject",
"project",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L451-L467 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResource | private void readResource(net.sf.mpxj.ganttproject.schema.Resource gpResource)
{
Resource mpxjResource = m_projectFile.addResource();
mpxjResource.setUniqueID(Integer.valueOf(NumberHelper.getInt(gpResource.getId()) + 1));
mpxjResource.setName(gpResource.getName());
mpxjResource.setEmailAddres... | java | private void readResource(net.sf.mpxj.ganttproject.schema.Resource gpResource)
{
Resource mpxjResource = m_projectFile.addResource();
mpxjResource.setUniqueID(Integer.valueOf(NumberHelper.getInt(gpResource.getId()) + 1));
mpxjResource.setName(gpResource.getName());
mpxjResource.setEmailAddres... | [
"private",
"void",
"readResource",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Resource",
"gpResource",
")",
"{",
"Resource",
"mpxjResource",
"=",
"m_projectFile",
".",
"addResource",
"(",
")",
";",
"mpxjResource",
".",
"set... | This method extracts data for a single resource from a GanttProject file.
@param gpResource resource data | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"resource",
"from",
"a",
"GanttProject",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L474-L490 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResourceCustomFields | private void readResourceCustomFields(net.sf.mpxj.ganttproject.schema.Resource gpResource, Resource mpxjResource)
{
//
// Populate custom field default values
//
Map<FieldType, Object> customFields = new HashMap<FieldType, Object>();
for (Pair<FieldType, String> definition : m_resourceP... | java | private void readResourceCustomFields(net.sf.mpxj.ganttproject.schema.Resource gpResource, Resource mpxjResource)
{
//
// Populate custom field default values
//
Map<FieldType, Object> customFields = new HashMap<FieldType, Object>();
for (Pair<FieldType, String> definition : m_resourceP... | [
"private",
"void",
"readResourceCustomFields",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Resource",
"gpResource",
",",
"Resource",
"mpxjResource",
")",
"{",
"//",
"// Populate custom field default values",
"//",
"Map",
"<",
"Fie... | Read custom fields for a GanttProject resource.
@param gpResource GanttProject resource
@param mpxjResource MPXJ Resource instance | [
"Read",
"custom",
"fields",
"for",
"a",
"GanttProject",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L498-L589 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readTaskCustomFields | private void readTaskCustomFields(net.sf.mpxj.ganttproject.schema.Task gpTask, Task mpxjTask)
{
//
// Populate custom field default values
//
Map<FieldType, Object> customFields = new HashMap<FieldType, Object>();
for (Pair<FieldType, String> definition : m_taskPropertyDefinitions.value... | java | private void readTaskCustomFields(net.sf.mpxj.ganttproject.schema.Task gpTask, Task mpxjTask)
{
//
// Populate custom field default values
//
Map<FieldType, Object> customFields = new HashMap<FieldType, Object>();
for (Pair<FieldType, String> definition : m_taskPropertyDefinitions.value... | [
"private",
"void",
"readTaskCustomFields",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Task",
"gpTask",
",",
"Task",
"mpxjTask",
")",
"{",
"//",
"// Populate custom field default values",
"//",
"Map",
"<",
"FieldType",
",",
"O... | Read custom fields for a GanttProject task.
@param gpTask GanttProject task
@param mpxjTask MPXJ Task instance | [
"Read",
"custom",
"fields",
"for",
"a",
"GanttProject",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L597-L688 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readTasks | private void readTasks(Project gpProject)
{
Tasks tasks = gpProject.getTasks();
readTaskCustomPropertyDefinitions(tasks);
for (net.sf.mpxj.ganttproject.schema.Task task : tasks.getTask())
{
readTask(m_projectFile, task);
}
} | java | private void readTasks(Project gpProject)
{
Tasks tasks = gpProject.getTasks();
readTaskCustomPropertyDefinitions(tasks);
for (net.sf.mpxj.ganttproject.schema.Task task : tasks.getTask())
{
readTask(m_projectFile, task);
}
} | [
"private",
"void",
"readTasks",
"(",
"Project",
"gpProject",
")",
"{",
"Tasks",
"tasks",
"=",
"gpProject",
".",
"getTasks",
"(",
")",
";",
"readTaskCustomPropertyDefinitions",
"(",
"tasks",
")",
";",
"for",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttpr... | Read the top level tasks from GanttProject.
@param gpProject GanttProject project | [
"Read",
"the",
"top",
"level",
"tasks",
"from",
"GanttProject",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L695-L703 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readTask | private void readTask(ChildTaskContainer mpxjParent, net.sf.mpxj.ganttproject.schema.Task gpTask)
{
Task mpxjTask = mpxjParent.addTask();
mpxjTask.setUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1));
mpxjTask.setName(gpTask.getName());
mpxjTask.setPercentageComplete(gpTask.g... | java | private void readTask(ChildTaskContainer mpxjParent, net.sf.mpxj.ganttproject.schema.Task gpTask)
{
Task mpxjTask = mpxjParent.addTask();
mpxjTask.setUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1));
mpxjTask.setName(gpTask.getName());
mpxjTask.setPercentageComplete(gpTask.g... | [
"private",
"void",
"readTask",
"(",
"ChildTaskContainer",
"mpxjParent",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Task",
"gpTask",
")",
"{",
"Task",
"mpxjTask",
"=",
"mpxjParent",
".",
"addTask",
"(",
")",
";",
"mpxjTask... | Recursively read a task, and any sub tasks.
@param mpxjParent Parent for the MPXJ tasks
@param gpTask GanttProject task | [
"Recursively",
"read",
"a",
"task",
"and",
"any",
"sub",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L711-L754 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.getPriority | private Priority getPriority(Integer gpPriority)
{
int result;
if (gpPriority == null)
{
result = Priority.MEDIUM;
}
else
{
int index = gpPriority.intValue();
if (index < 0 || index >= PRIORITY.length)
{
result = Priority.MEDIUM;
... | java | private Priority getPriority(Integer gpPriority)
{
int result;
if (gpPriority == null)
{
result = Priority.MEDIUM;
}
else
{
int index = gpPriority.intValue();
if (index < 0 || index >= PRIORITY.length)
{
result = Priority.MEDIUM;
... | [
"private",
"Priority",
"getPriority",
"(",
"Integer",
"gpPriority",
")",
"{",
"int",
"result",
";",
"if",
"(",
"gpPriority",
"==",
"null",
")",
"{",
"result",
"=",
"Priority",
".",
"MEDIUM",
";",
"}",
"else",
"{",
"int",
"index",
"=",
"gpPriority",
".",
... | Given a GanttProject priority value, turn this into an MPXJ Priority instance.
@param gpPriority GanttProject priority
@return Priority instance | [
"Given",
"a",
"GanttProject",
"priority",
"value",
"turn",
"this",
"into",
"an",
"MPXJ",
"Priority",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L762-L782 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readRelationships | private void readRelationships(Project gpProject)
{
for (net.sf.mpxj.ganttproject.schema.Task gpTask : gpProject.getTasks().getTask())
{
readRelationships(gpTask);
}
} | java | private void readRelationships(Project gpProject)
{
for (net.sf.mpxj.ganttproject.schema.Task gpTask : gpProject.getTasks().getTask())
{
readRelationships(gpTask);
}
} | [
"private",
"void",
"readRelationships",
"(",
"Project",
"gpProject",
")",
"{",
"for",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Task",
"gpTask",
":",
"gpProject",
".",
"getTasks",
"(",
")",
".",
"getTask",
"(",
")",
... | Read all task relationships from a GanttProject.
@param gpProject GanttProject project | [
"Read",
"all",
"task",
"relationships",
"from",
"a",
"GanttProject",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L789-L795 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readRelationships | private void readRelationships(net.sf.mpxj.ganttproject.schema.Task gpTask)
{
for (Depend depend : gpTask.getDepend())
{
Task task1 = m_projectFile.getTaskByUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1));
Task task2 = m_projectFile.getTaskByUniqueID(Integer.valueOf(N... | java | private void readRelationships(net.sf.mpxj.ganttproject.schema.Task gpTask)
{
for (Depend depend : gpTask.getDepend())
{
Task task1 = m_projectFile.getTaskByUniqueID(Integer.valueOf(NumberHelper.getInt(gpTask.getId()) + 1));
Task task2 = m_projectFile.getTaskByUniqueID(Integer.valueOf(N... | [
"private",
"void",
"readRelationships",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"ganttproject",
".",
"schema",
".",
"Task",
"gpTask",
")",
"{",
"for",
"(",
"Depend",
"depend",
":",
"gpTask",
".",
"getDepend",
"(",
")",
")",
"{",
"Task",
"task1",
"=",
... | Read the relationships for an individual GanttProject task.
@param gpTask GanttProject task | [
"Read",
"the",
"relationships",
"for",
"an",
"individual",
"GanttProject",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L802-L815 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.getRelationType | private RelationType getRelationType(Integer gpType)
{
RelationType result = null;
if (gpType != null)
{
int index = NumberHelper.getInt(gpType);
if (index > 0 && index < RELATION.length)
{
result = RELATION[index];
}
}
if (result == null... | java | private RelationType getRelationType(Integer gpType)
{
RelationType result = null;
if (gpType != null)
{
int index = NumberHelper.getInt(gpType);
if (index > 0 && index < RELATION.length)
{
result = RELATION[index];
}
}
if (result == null... | [
"private",
"RelationType",
"getRelationType",
"(",
"Integer",
"gpType",
")",
"{",
"RelationType",
"result",
"=",
"null",
";",
"if",
"(",
"gpType",
"!=",
"null",
")",
"{",
"int",
"index",
"=",
"NumberHelper",
".",
"getInt",
"(",
"gpType",
")",
";",
"if",
... | Convert a GanttProject task relationship type into an MPXJ RelationType instance.
@param gpType GanttProject task relation type
@return RelationType instance | [
"Convert",
"a",
"GanttProject",
"task",
"relationship",
"type",
"into",
"an",
"MPXJ",
"RelationType",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L823-L841 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResourceAssignments | private void readResourceAssignments(Project gpProject)
{
Allocations allocations = gpProject.getAllocations();
if (allocations != null)
{
for (Allocation allocation : allocations.getAllocation())
{
readResourceAssignment(allocation);
}
}
} | java | private void readResourceAssignments(Project gpProject)
{
Allocations allocations = gpProject.getAllocations();
if (allocations != null)
{
for (Allocation allocation : allocations.getAllocation())
{
readResourceAssignment(allocation);
}
}
} | [
"private",
"void",
"readResourceAssignments",
"(",
"Project",
"gpProject",
")",
"{",
"Allocations",
"allocations",
"=",
"gpProject",
".",
"getAllocations",
"(",
")",
";",
"if",
"(",
"allocations",
"!=",
"null",
")",
"{",
"for",
"(",
"Allocation",
"allocation",
... | Read all resource assignments from a GanttProject project.
@param gpProject GanttProject project | [
"Read",
"all",
"resource",
"assignments",
"from",
"a",
"GanttProject",
"project",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L848-L858 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java | GanttProjectReader.readResourceAssignment | private void readResourceAssignment(Allocation gpAllocation)
{
Integer taskID = Integer.valueOf(NumberHelper.getInt(gpAllocation.getTaskId()) + 1);
Integer resourceID = Integer.valueOf(NumberHelper.getInt(gpAllocation.getResourceId()) + 1);
Task task = m_projectFile.getTaskByUniqueID(taskID);
... | java | private void readResourceAssignment(Allocation gpAllocation)
{
Integer taskID = Integer.valueOf(NumberHelper.getInt(gpAllocation.getTaskId()) + 1);
Integer resourceID = Integer.valueOf(NumberHelper.getInt(gpAllocation.getResourceId()) + 1);
Task task = m_projectFile.getTaskByUniqueID(taskID);
... | [
"private",
"void",
"readResourceAssignment",
"(",
"Allocation",
"gpAllocation",
")",
"{",
"Integer",
"taskID",
"=",
"Integer",
".",
"valueOf",
"(",
"NumberHelper",
".",
"getInt",
"(",
"gpAllocation",
".",
"getTaskId",
"(",
")",
")",
"+",
"1",
")",
";",
"Inte... | Read an individual GanttProject resource assignment.
@param gpAllocation GanttProject resource assignment. | [
"Read",
"an",
"individual",
"GanttProject",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttproject/GanttProjectReader.java#L865-L877 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeCustomFields | private void writeCustomFields() throws IOException
{
m_writer.writeStartList("custom_fields");
for (CustomField field : m_projectFile.getCustomFields())
{
writeCustomField(field);
}
m_writer.writeEndList();
} | java | private void writeCustomFields() throws IOException
{
m_writer.writeStartList("custom_fields");
for (CustomField field : m_projectFile.getCustomFields())
{
writeCustomField(field);
}
m_writer.writeEndList();
} | [
"private",
"void",
"writeCustomFields",
"(",
")",
"throws",
"IOException",
"{",
"m_writer",
".",
"writeStartList",
"(",
"\"custom_fields\"",
")",
";",
"for",
"(",
"CustomField",
"field",
":",
"m_projectFile",
".",
"getCustomFields",
"(",
")",
")",
"{",
"writeCus... | Write a list of custom field attributes. | [
"Write",
"a",
"list",
"of",
"custom",
"field",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L130-L138 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeCustomField | private void writeCustomField(CustomField field) throws IOException
{
if (field.getAlias() != null)
{
m_writer.writeStartObject(null);
m_writer.writeNameValuePair("field_type_class", field.getFieldType().getFieldTypeClass().name().toLowerCase());
m_writer.writeNameValuePair("fi... | java | private void writeCustomField(CustomField field) throws IOException
{
if (field.getAlias() != null)
{
m_writer.writeStartObject(null);
m_writer.writeNameValuePair("field_type_class", field.getFieldType().getFieldTypeClass().name().toLowerCase());
m_writer.writeNameValuePair("fi... | [
"private",
"void",
"writeCustomField",
"(",
"CustomField",
"field",
")",
"throws",
"IOException",
"{",
"if",
"(",
"field",
".",
"getAlias",
"(",
")",
"!=",
"null",
")",
"{",
"m_writer",
".",
"writeStartObject",
"(",
"null",
")",
";",
"m_writer",
".",
"writ... | Write attributes for an individual custom field.
Note that at present we are only writing a subset of the
available data... in this instance the field alias.
If the field does not have an alias we won't write an
entry.
@param field custom field to write
@throws IOException | [
"Write",
"attributes",
"for",
"an",
"individual",
"custom",
"field",
".",
"Note",
"that",
"at",
"present",
"we",
"are",
"only",
"writing",
"a",
"subset",
"of",
"the",
"available",
"data",
"...",
"in",
"this",
"instance",
"the",
"field",
"alias",
".",
"If",... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L150-L160 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeProperties | private void writeProperties() throws IOException
{
writeAttributeTypes("property_types", ProjectField.values());
writeFields("property_values", m_projectFile.getProjectProperties(), ProjectField.values());
} | java | private void writeProperties() throws IOException
{
writeAttributeTypes("property_types", ProjectField.values());
writeFields("property_values", m_projectFile.getProjectProperties(), ProjectField.values());
} | [
"private",
"void",
"writeProperties",
"(",
")",
"throws",
"IOException",
"{",
"writeAttributeTypes",
"(",
"\"property_types\"",
",",
"ProjectField",
".",
"values",
"(",
")",
")",
";",
"writeFields",
"(",
"\"property_values\"",
",",
"m_projectFile",
".",
"getProjectP... | This method writes project property data to a JSON file. | [
"This",
"method",
"writes",
"project",
"property",
"data",
"to",
"a",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L165-L169 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeResources | private void writeResources() throws IOException
{
writeAttributeTypes("resource_types", ResourceField.values());
m_writer.writeStartList("resources");
for (Resource resource : m_projectFile.getResources())
{
writeFields(null, resource, ResourceField.values());
}
m_write... | java | private void writeResources() throws IOException
{
writeAttributeTypes("resource_types", ResourceField.values());
m_writer.writeStartList("resources");
for (Resource resource : m_projectFile.getResources())
{
writeFields(null, resource, ResourceField.values());
}
m_write... | [
"private",
"void",
"writeResources",
"(",
")",
"throws",
"IOException",
"{",
"writeAttributeTypes",
"(",
"\"resource_types\"",
",",
"ResourceField",
".",
"values",
"(",
")",
")",
";",
"m_writer",
".",
"writeStartList",
"(",
"\"resources\"",
")",
";",
"for",
"(",... | This method writes resource data to a JSON file. | [
"This",
"method",
"writes",
"resource",
"data",
"to",
"a",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L174-L184 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeTasks | private void writeTasks() throws IOException
{
writeAttributeTypes("task_types", TaskField.values());
m_writer.writeStartList("tasks");
for (Task task : m_projectFile.getChildTasks())
{
writeTask(task);
}
m_writer.writeEndList();
} | java | private void writeTasks() throws IOException
{
writeAttributeTypes("task_types", TaskField.values());
m_writer.writeStartList("tasks");
for (Task task : m_projectFile.getChildTasks())
{
writeTask(task);
}
m_writer.writeEndList();
} | [
"private",
"void",
"writeTasks",
"(",
")",
"throws",
"IOException",
"{",
"writeAttributeTypes",
"(",
"\"task_types\"",
",",
"TaskField",
".",
"values",
"(",
")",
")",
";",
"m_writer",
".",
"writeStartList",
"(",
"\"tasks\"",
")",
";",
"for",
"(",
"Task",
"ta... | This method writes task data to a JSON file.
Note that we write the task hierarchy in order to make rebuilding the hierarchy easier. | [
"This",
"method",
"writes",
"task",
"data",
"to",
"a",
"JSON",
"file",
".",
"Note",
"that",
"we",
"write",
"the",
"task",
"hierarchy",
"in",
"order",
"to",
"make",
"rebuilding",
"the",
"hierarchy",
"easier",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L190-L200 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeTask | private void writeTask(Task task) throws IOException
{
writeFields(null, task, TaskField.values());
for (Task child : task.getChildTasks())
{
writeTask(child);
}
} | java | private void writeTask(Task task) throws IOException
{
writeFields(null, task, TaskField.values());
for (Task child : task.getChildTasks())
{
writeTask(child);
}
} | [
"private",
"void",
"writeTask",
"(",
"Task",
"task",
")",
"throws",
"IOException",
"{",
"writeFields",
"(",
"null",
",",
"task",
",",
"TaskField",
".",
"values",
"(",
")",
")",
";",
"for",
"(",
"Task",
"child",
":",
"task",
".",
"getChildTasks",
"(",
"... | This method is called recursively to write a task and its child tasks
to the JSON file.
@param task task to write | [
"This",
"method",
"is",
"called",
"recursively",
"to",
"write",
"a",
"task",
"and",
"its",
"child",
"tasks",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L208-L215 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeAssignments | private void writeAssignments() throws IOException
{
writeAttributeTypes("assignment_types", AssignmentField.values());
m_writer.writeStartList("assignments");
for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
{
writeFields(null, assignment, AssignmentFiel... | java | private void writeAssignments() throws IOException
{
writeAttributeTypes("assignment_types", AssignmentField.values());
m_writer.writeStartList("assignments");
for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
{
writeFields(null, assignment, AssignmentFiel... | [
"private",
"void",
"writeAssignments",
"(",
")",
"throws",
"IOException",
"{",
"writeAttributeTypes",
"(",
"\"assignment_types\"",
",",
"AssignmentField",
".",
"values",
"(",
")",
")",
";",
"m_writer",
".",
"writeStartList",
"(",
"\"assignments\"",
")",
";",
"for"... | This method writes assignment data to a JSON file. | [
"This",
"method",
"writes",
"assignment",
"data",
"to",
"a",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L220-L231 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeAttributeTypes | private void writeAttributeTypes(String name, FieldType[] types) throws IOException
{
m_writer.writeStartObject(name);
for (FieldType field : types)
{
m_writer.writeNameValuePair(field.name().toLowerCase(), field.getDataType().getValue());
}
m_writer.writeEndObject();
} | java | private void writeAttributeTypes(String name, FieldType[] types) throws IOException
{
m_writer.writeStartObject(name);
for (FieldType field : types)
{
m_writer.writeNameValuePair(field.name().toLowerCase(), field.getDataType().getValue());
}
m_writer.writeEndObject();
} | [
"private",
"void",
"writeAttributeTypes",
"(",
"String",
"name",
",",
"FieldType",
"[",
"]",
"types",
")",
"throws",
"IOException",
"{",
"m_writer",
".",
"writeStartObject",
"(",
"name",
")",
";",
"for",
"(",
"FieldType",
"field",
":",
"types",
")",
"{",
"... | Generates a mapping between attribute names and data types.
@param name name of the map
@param types types to write | [
"Generates",
"a",
"mapping",
"between",
"attribute",
"names",
"and",
"data",
"types",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L239-L247 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeFields | private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
{
m_writer.writeStartObject(objectName);
for (FieldType field : fields)
{
Object value = container.getCurrentValue(field);
if (value != null)
{
writeFi... | java | private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
{
m_writer.writeStartObject(objectName);
for (FieldType field : fields)
{
Object value = container.getCurrentValue(field);
if (value != null)
{
writeFi... | [
"private",
"void",
"writeFields",
"(",
"String",
"objectName",
",",
"FieldContainer",
"container",
",",
"FieldType",
"[",
"]",
"fields",
")",
"throws",
"IOException",
"{",
"m_writer",
".",
"writeStartObject",
"(",
"objectName",
")",
";",
"for",
"(",
"FieldType",... | Write a set of fields from a field container to a JSON file.
@param objectName name of the object, or null if no name required
@param container field container
@param fields fields to write | [
"Write",
"a",
"set",
"of",
"fields",
"from",
"a",
"field",
"container",
"to",
"a",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L255-L267 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeIntegerField | private void writeIntegerField(String fieldName, Object value) throws IOException
{
int val = ((Number) value).intValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | java | private void writeIntegerField(String fieldName, Object value) throws IOException
{
int val = ((Number) value).intValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeIntegerField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"int",
"val",
"=",
"(",
"(",
"Number",
")",
"value",
")",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"val",
"!=",
"0",
")",
... | Write an integer field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"an",
"integer",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L370-L377 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeDoubleField | private void writeDoubleField(String fieldName, Object value) throws IOException
{
double val = ((Number) value).doubleValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | java | private void writeDoubleField(String fieldName, Object value) throws IOException
{
double val = ((Number) value).doubleValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeDoubleField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"double",
"val",
"=",
"(",
"(",
"Number",
")",
"value",
")",
".",
"doubleValue",
"(",
")",
";",
"if",
"(",
"val",
"!=",
"0",
"... | Write an double field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"an",
"double",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L385-L392 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeBooleanField | private void writeBooleanField(String fieldName, Object value) throws IOException
{
boolean val = ((Boolean) value).booleanValue();
if (val)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | java | private void writeBooleanField(String fieldName, Object value) throws IOException
{
boolean val = ((Boolean) value).booleanValue();
if (val)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeBooleanField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"boolean",
"val",
"=",
"(",
"(",
"Boolean",
")",
"value",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"val",
")",
"{",
... | Write a boolean field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"boolean",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L400-L407 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeDurationField | private void writeDurationField(String fieldName, Object value) throws IOException
{
if (value instanceof String)
{
m_writer.writeNameValuePair(fieldName + "_text", (String) value);
}
else
{
Duration val = (Duration) value;
if (val.getDuration() != 0)
... | java | private void writeDurationField(String fieldName, Object value) throws IOException
{
if (value instanceof String)
{
m_writer.writeNameValuePair(fieldName + "_text", (String) value);
}
else
{
Duration val = (Duration) value;
if (val.getDuration() != 0)
... | [
"private",
"void",
"writeDurationField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
"instanceof",
"String",
")",
"{",
"m_writer",
".",
"writeNameValuePair",
"(",
"fieldName",
"+",
"\"_text\"",
",",
... | Write a duration field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"duration",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L415-L431 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeDateField | private void writeDateField(String fieldName, Object value) throws IOException
{
if (value instanceof String)
{
m_writer.writeNameValuePair(fieldName + "_text", (String) value);
}
else
{
Date val = (Date) value;
m_writer.writeNameValuePair(fieldName, val);
... | java | private void writeDateField(String fieldName, Object value) throws IOException
{
if (value instanceof String)
{
m_writer.writeNameValuePair(fieldName + "_text", (String) value);
}
else
{
Date val = (Date) value;
m_writer.writeNameValuePair(fieldName, val);
... | [
"private",
"void",
"writeDateField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"value",
"instanceof",
"String",
")",
"{",
"m_writer",
".",
"writeNameValuePair",
"(",
"fieldName",
"+",
"\"_text\"",
",",
"(... | Write a date field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"date",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L439-L450 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeTimeUnitsField | private void writeTimeUnitsField(String fieldName, Object value) throws IOException
{
TimeUnit val = (TimeUnit) value;
if (val != m_projectFile.getProjectProperties().getDefaultDurationUnits())
{
m_writer.writeNameValuePair(fieldName, val.toString());
}
} | java | private void writeTimeUnitsField(String fieldName, Object value) throws IOException
{
TimeUnit val = (TimeUnit) value;
if (val != m_projectFile.getProjectProperties().getDefaultDurationUnits())
{
m_writer.writeNameValuePair(fieldName, val.toString());
}
} | [
"private",
"void",
"writeTimeUnitsField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"TimeUnit",
"val",
"=",
"(",
"TimeUnit",
")",
"value",
";",
"if",
"(",
"val",
"!=",
"m_projectFile",
".",
"getProjectProperties",
"... | Write a time units field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"time",
"units",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L458-L465 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writePriorityField | private void writePriorityField(String fieldName, Object value) throws IOException
{
m_writer.writeNameValuePair(fieldName, ((Priority) value).getValue());
} | java | private void writePriorityField(String fieldName, Object value) throws IOException
{
m_writer.writeNameValuePair(fieldName, ((Priority) value).getValue());
} | [
"private",
"void",
"writePriorityField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"m_writer",
".",
"writeNameValuePair",
"(",
"fieldName",
",",
"(",
"(",
"Priority",
")",
"value",
")",
".",
"getValue",
"(",
")",
... | Write a priority field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"priority",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L473-L476 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeMap | private void writeMap(String fieldName, Object value) throws IOException
{
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) value;
m_writer.writeStartObject(fieldName);
for (Map.Entry<String, Object> entry : map.entrySet())
{
Object entryValue = en... | java | private void writeMap(String fieldName, Object value) throws IOException
{
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) value;
m_writer.writeStartObject(fieldName);
for (Map.Entry<String, Object> entry : map.entrySet())
{
Object entryValue = en... | [
"private",
"void",
"writeMap",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
"=",
"(",
"Map",
"<",
"String",
",",
... | Write a map field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"map",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L484-L504 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeStringField | private void writeStringField(String fieldName, Object value) throws IOException
{
String val = value.toString();
if (!val.isEmpty())
{
m_writer.writeNameValuePair(fieldName, val);
}
} | java | private void writeStringField(String fieldName, Object value) throws IOException
{
String val = value.toString();
if (!val.isEmpty())
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeStringField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"String",
"val",
"=",
"value",
".",
"toString",
"(",
")",
";",
"if",
"(",
"!",
"val",
".",
"isEmpty",
"(",
")",
")",
"{",
"m_w... | Write a string field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"string",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L512-L519 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeRelationList | private void writeRelationList(String fieldName, Object value) throws IOException
{
@SuppressWarnings("unchecked")
List<Relation> list = (List<Relation>) value;
if (!list.isEmpty())
{
m_writer.writeStartList(fieldName);
for (Relation relation : list)
{
m... | java | private void writeRelationList(String fieldName, Object value) throws IOException
{
@SuppressWarnings("unchecked")
List<Relation> list = (List<Relation>) value;
if (!list.isEmpty())
{
m_writer.writeStartList(fieldName);
for (Relation relation : list)
{
m... | [
"private",
"void",
"writeRelationList",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"List",
"<",
"Relation",
">",
"list",
"=",
"(",
"List",
"<",
"Relation",
">",
"... | Write a relation list field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"a",
"relation",
"list",
"field",
"to",
"the",
"JSON",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L527-L544 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.