id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
157,600 | joniles/mpxj | src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java | UniversalProjectReader.handleByteOrderMark | private ProjectFile handleByteOrderMark(InputStream stream, int length, Charset charset) throws Exception
{
UniversalProjectReader reader = new UniversalProjectReader();
reader.setSkipBytes(length);
reader.setCharset(charset);
return reader.read(stream);
} | java | private ProjectFile handleByteOrderMark(InputStream stream, int length, Charset charset) throws Exception
{
UniversalProjectReader reader = new UniversalProjectReader();
reader.setSkipBytes(length);
reader.setCharset(charset);
return reader.read(stream);
} | [
"private",
"ProjectFile",
"handleByteOrderMark",
"(",
"InputStream",
"stream",
",",
"int",
"length",
",",
"Charset",
"charset",
")",
"throws",
"Exception",
"{",
"UniversalProjectReader",
"reader",
"=",
"new",
"UniversalProjectReader",
"(",
")",
";",
"reader",
".",
... | The file we are working with has a byte order mark. Skip this and try again to read the file.
@param stream schedule data
@param length length of the byte order mark
@param charset charset indicated by byte order mark
@return ProjectFile instance | [
"The",
"file",
"we",
"are",
"working",
"with",
"has",
"a",
"byte",
"order",
"mark",
".",
"Skip",
"this",
"and",
"try",
"again",
"to",
"read",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java#L674-L680 |
157,601 | joniles/mpxj | src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java | UniversalProjectReader.handleDosExeFile | private ProjectFile handleDosExeFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".tmp");
InputStream is = null;
try
{
is = new FileInputStream(file);
if (is.available() > 1350)
{
StreamHelper.skip(... | java | private ProjectFile handleDosExeFile(InputStream stream) throws Exception
{
File file = InputStreamHelper.writeStreamToTempFile(stream, ".tmp");
InputStream is = null;
try
{
is = new FileInputStream(file);
if (is.available() > 1350)
{
StreamHelper.skip(... | [
"private",
"ProjectFile",
"handleDosExeFile",
"(",
"InputStream",
"stream",
")",
"throws",
"Exception",
"{",
"File",
"file",
"=",
"InputStreamHelper",
".",
"writeStreamToTempFile",
"(",
"stream",
",",
"\".tmp\"",
")",
";",
"InputStream",
"is",
"=",
"null",
";",
... | This could be a self-extracting archive. If we understand the format, expand
it and check the content for files we can read.
@param stream schedule data
@return ProjectFile instance | [
"This",
"could",
"be",
"a",
"self",
"-",
"extracting",
"archive",
".",
"If",
"we",
"understand",
"the",
"format",
"expand",
"it",
"and",
"check",
"the",
"content",
"for",
"files",
"we",
"can",
"read",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java#L689-L742 |
157,602 | joniles/mpxj | src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java | UniversalProjectReader.handleXerFile | private ProjectFile handleXerFile(InputStream stream) throws Exception
{
PrimaveraXERFileReader reader = new PrimaveraXERFileReader();
reader.setCharset(m_charset);
List<ProjectFile> projects = reader.readAll(stream);
ProjectFile project = null;
for (ProjectFile file : projects)
{... | java | private ProjectFile handleXerFile(InputStream stream) throws Exception
{
PrimaveraXERFileReader reader = new PrimaveraXERFileReader();
reader.setCharset(m_charset);
List<ProjectFile> projects = reader.readAll(stream);
ProjectFile project = null;
for (ProjectFile file : projects)
{... | [
"private",
"ProjectFile",
"handleXerFile",
"(",
"InputStream",
"stream",
")",
"throws",
"Exception",
"{",
"PrimaveraXERFileReader",
"reader",
"=",
"new",
"PrimaveraXERFileReader",
"(",
")",
";",
"reader",
".",
"setCharset",
"(",
"m_charset",
")",
";",
"List",
"<",... | XER files can contain multiple projects when there are cross-project dependencies.
As the UniversalProjectReader is designed just to read a single project, we need
to select one project from those available in the XER file.
The original project selected for export by the user will have its "export flag"
set to true. We... | [
"XER",
"files",
"can",
"contain",
"multiple",
"projects",
"when",
"there",
"are",
"cross",
"-",
"project",
"dependencies",
".",
"As",
"the",
"UniversalProjectReader",
"is",
"designed",
"just",
"to",
"read",
"a",
"single",
"project",
"we",
"need",
"to",
"select... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java#L755-L774 |
157,603 | joniles/mpxj | src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java | UniversalProjectReader.populateTableNames | private Set<String> populateTableNames(String url) throws SQLException
{
Set<String> tableNames = new HashSet<String>();
Connection connection = null;
ResultSet rs = null;
try
{
connection = DriverManager.getConnection(url);
DatabaseMetaData dmd = connection.getMetaDa... | java | private Set<String> populateTableNames(String url) throws SQLException
{
Set<String> tableNames = new HashSet<String>();
Connection connection = null;
ResultSet rs = null;
try
{
connection = DriverManager.getConnection(url);
DatabaseMetaData dmd = connection.getMetaDa... | [
"private",
"Set",
"<",
"String",
">",
"populateTableNames",
"(",
"String",
"url",
")",
"throws",
"SQLException",
"{",
"Set",
"<",
"String",
">",
"tableNames",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"Connection",
"connection",
"=",
"null"... | Open a database and build a set of table names.
@param url database URL
@return set containing table names | [
"Open",
"a",
"database",
"and",
"build",
"a",
"set",
"of",
"table",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java#L782-L813 |
157,604 | joniles/mpxj | src/main/java/net/sf/mpxj/common/StreamHelper.java | StreamHelper.skip | public static void skip(InputStream stream, long skip) throws IOException
{
long count = skip;
while (count > 0)
{
count -= stream.skip(count);
}
} | java | public static void skip(InputStream stream, long skip) throws IOException
{
long count = skip;
while (count > 0)
{
count -= stream.skip(count);
}
} | [
"public",
"static",
"void",
"skip",
"(",
"InputStream",
"stream",
",",
"long",
"skip",
")",
"throws",
"IOException",
"{",
"long",
"count",
"=",
"skip",
";",
"while",
"(",
"count",
">",
"0",
")",
"{",
"count",
"-=",
"stream",
".",
"skip",
"(",
"count",
... | The documentation for InputStream.skip indicates that it can bail out early, and not skip
the requested number of bytes. I've encountered this in practice, hence this helper method.
@param stream InputStream instance
@param skip number of bytes to skip | [
"The",
"documentation",
"for",
"InputStream",
".",
"skip",
"indicates",
"that",
"it",
"can",
"bail",
"out",
"early",
"and",
"not",
"skip",
"the",
"requested",
"number",
"of",
"bytes",
".",
"I",
"ve",
"encountered",
"this",
"in",
"practice",
"hence",
"this",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/StreamHelper.java#L41-L48 |
157,605 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP9Reader.java | MPP9Reader.processCustomValueLists | private void processCustomValueLists() throws IOException
{
CustomFieldValueReader9 reader = new CustomFieldValueReader9(m_projectDir, m_file.getProjectProperties(), m_projectProps, m_file.getCustomFields());
reader.process();
} | java | private void processCustomValueLists() throws IOException
{
CustomFieldValueReader9 reader = new CustomFieldValueReader9(m_projectDir, m_file.getProjectProperties(), m_projectProps, m_file.getCustomFields());
reader.process();
} | [
"private",
"void",
"processCustomValueLists",
"(",
")",
"throws",
"IOException",
"{",
"CustomFieldValueReader9",
"reader",
"=",
"new",
"CustomFieldValueReader9",
"(",
"m_projectDir",
",",
"m_file",
".",
"getProjectProperties",
"(",
")",
",",
"m_projectProps",
",",
"m_... | Retrieve any task field value lists defined in the MPP file. | [
"Retrieve",
"any",
"task",
"field",
"value",
"lists",
"defined",
"in",
"the",
"MPP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP9Reader.java#L750-L754 |
157,606 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP9Reader.java | MPP9Reader.processFieldNameAliases | private void processFieldNameAliases(Map<Integer, FieldType> map, byte[] data)
{
if (data != null)
{
int offset = 0;
int index = 0;
CustomFieldContainer fields = m_file.getCustomFields();
while (offset < data.length)
{
String alias = MPPUtility.get... | java | private void processFieldNameAliases(Map<Integer, FieldType> map, byte[] data)
{
if (data != null)
{
int offset = 0;
int index = 0;
CustomFieldContainer fields = m_file.getCustomFields();
while (offset < data.length)
{
String alias = MPPUtility.get... | [
"private",
"void",
"processFieldNameAliases",
"(",
"Map",
"<",
"Integer",
",",
"FieldType",
">",
"map",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"int",
"index",
"=",
"0",
";... | Retrieve any resource field aliases defined in the MPP file.
@param map index to field map
@param data resource field name alias data | [
"Retrieve",
"any",
"resource",
"field",
"aliases",
"defined",
"in",
"the",
"MPP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP9Reader.java#L864-L886 |
157,607 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP9Reader.java | MPP9Reader.createResourceMap | private TreeMap<Integer, Integer> createResourceMap(FieldMap fieldMap, FixedMeta rscFixedMeta, FixedData rscFixedData)
{
TreeMap<Integer, Integer> resourceMap = new TreeMap<Integer, Integer>();
int itemCount = rscFixedMeta.getAdjustedItemCount();
for (int loop = 0; loop < itemCount; loop++)
... | java | private TreeMap<Integer, Integer> createResourceMap(FieldMap fieldMap, FixedMeta rscFixedMeta, FixedData rscFixedData)
{
TreeMap<Integer, Integer> resourceMap = new TreeMap<Integer, Integer>();
int itemCount = rscFixedMeta.getAdjustedItemCount();
for (int loop = 0; loop < itemCount; loop++)
... | [
"private",
"TreeMap",
"<",
"Integer",
",",
"Integer",
">",
"createResourceMap",
"(",
"FieldMap",
"fieldMap",
",",
"FixedMeta",
"rscFixedMeta",
",",
"FixedData",
"rscFixedData",
")",
"{",
"TreeMap",
"<",
"Integer",
",",
"Integer",
">",
"resourceMap",
"=",
"new",
... | This method maps the resource unique identifiers to their index number
within the FixedData block.
@param fieldMap field map
@param rscFixedMeta resource fixed meta data
@param rscFixedData resource fixed data
@return map of resource IDs to resource data | [
"This",
"method",
"maps",
"the",
"resource",
"unique",
"identifiers",
"to",
"their",
"index",
"number",
"within",
"the",
"FixedData",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP9Reader.java#L986-L1004 |
157,608 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP9Reader.java | MPP9Reader.postProcessTasks | private void postProcessTasks()
{
List<Task> allTasks = m_file.getTasks();
if (allTasks.size() > 1)
{
Collections.sort(allTasks);
int taskID = -1;
int lastTaskID = -1;
for (int i = 0; i < allTasks.size(); i++)
{
Task task = allTasks.get(i);... | java | private void postProcessTasks()
{
List<Task> allTasks = m_file.getTasks();
if (allTasks.size() > 1)
{
Collections.sort(allTasks);
int taskID = -1;
int lastTaskID = -1;
for (int i = 0; i < allTasks.size(); i++)
{
Task task = allTasks.get(i);... | [
"private",
"void",
"postProcessTasks",
"(",
")",
"{",
"List",
"<",
"Task",
">",
"allTasks",
"=",
"m_file",
".",
"getTasks",
"(",
")",
";",
"if",
"(",
"allTasks",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"Collections",
".",
"sort",
"(",
"allTasks",
... | This method is called to try to catch any invalid tasks that may have sneaked past all our other checks.
This is done by validating the tasks by task ID. | [
"This",
"method",
"is",
"called",
"to",
"try",
"to",
"catch",
"any",
"invalid",
"tasks",
"that",
"may",
"have",
"sneaked",
"past",
"all",
"our",
"other",
"checks",
".",
"This",
"is",
"done",
"by",
"validating",
"the",
"tasks",
"by",
"task",
"ID",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP9Reader.java#L2050-L2077 |
157,609 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/TaskDateDump.java | TaskDateDump.process | public void process(String name) throws Exception
{
ProjectFile file = new UniversalProjectReader().read(name);
for (Task task : file.getTasks())
{
if (!task.getSummary())
{
System.out.print(task.getWBS());
System.out.print("\t");
System.out.pri... | java | public void process(String name) throws Exception
{
ProjectFile file = new UniversalProjectReader().read(name);
for (Task task : file.getTasks())
{
if (!task.getSummary())
{
System.out.print(task.getWBS());
System.out.print("\t");
System.out.pri... | [
"public",
"void",
"process",
"(",
"String",
"name",
")",
"throws",
"Exception",
"{",
"ProjectFile",
"file",
"=",
"new",
"UniversalProjectReader",
"(",
")",
".",
"read",
"(",
"name",
")",
";",
"for",
"(",
"Task",
"task",
":",
"file",
".",
"getTasks",
"(",... | Dump data for all non-summary tasks to stdout.
@param name file name | [
"Dump",
"data",
"for",
"all",
"non",
"-",
"summary",
"tasks",
"to",
"stdout",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/TaskDateDump.java#L73-L94 |
157,610 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readProjectProperties | private void readProjectProperties(Document cdp)
{
WorkspaceProperties props = cdp.getWorkspaceProperties();
ProjectProperties mpxjProps = m_projectFile.getProjectProperties();
mpxjProps.setSymbolPosition(props.getCurrencyPosition());
mpxjProps.setCurrencyDigits(props.getCurrencyDigits());
... | java | private void readProjectProperties(Document cdp)
{
WorkspaceProperties props = cdp.getWorkspaceProperties();
ProjectProperties mpxjProps = m_projectFile.getProjectProperties();
mpxjProps.setSymbolPosition(props.getCurrencyPosition());
mpxjProps.setCurrencyDigits(props.getCurrencyDigits());
... | [
"private",
"void",
"readProjectProperties",
"(",
"Document",
"cdp",
")",
"{",
"WorkspaceProperties",
"props",
"=",
"cdp",
".",
"getWorkspaceProperties",
"(",
")",
";",
"ProjectProperties",
"mpxjProps",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";"... | Extracts project properties from a ConceptDraw PROJECT file.
@param cdp ConceptDraw PROJECT file | [
"Extracts",
"project",
"properties",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L184-L196 |
157,611 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readCalendars | private void readCalendars(Document cdp)
{
for (Calendar calendar : cdp.getCalendars().getCalendar())
{
readCalendar(calendar);
}
for (Calendar calendar : cdp.getCalendars().getCalendar())
{
ProjectCalendar child = m_calendarMap.get(calendar.getID());
Project... | java | private void readCalendars(Document cdp)
{
for (Calendar calendar : cdp.getCalendars().getCalendar())
{
readCalendar(calendar);
}
for (Calendar calendar : cdp.getCalendars().getCalendar())
{
ProjectCalendar child = m_calendarMap.get(calendar.getID());
Project... | [
"private",
"void",
"readCalendars",
"(",
"Document",
"cdp",
")",
"{",
"for",
"(",
"Calendar",
"calendar",
":",
"cdp",
".",
"getCalendars",
"(",
")",
".",
"getCalendar",
"(",
")",
")",
"{",
"readCalendar",
"(",
"calendar",
")",
";",
"}",
"for",
"(",
"Ca... | Extracts calendar data from a ConceptDraw PROJECT file.
@param cdp ConceptDraw PROJECT file | [
"Extracts",
"calendar",
"data",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L203-L223 |
157,612 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readWeekDay | private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day)
{
if (day.isIsDayWorking())
{
ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay());
for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePerio... | java | private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day)
{
if (day.isIsDayWorking())
{
ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay());
for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePerio... | [
"private",
"void",
"readWeekDay",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"WeekDay",
"day",
")",
"{",
"if",
"(",
"day",
".",
"isIsDayWorking",
"(",
")",
")",
"{",
"ProjectCalendarHours",
"hours",
"=",
"mpxjCalendar",
".",
"addCalendarHours",
"(",
"day",
"... | Reads a single day for a calendar.
@param mpxjCalendar ProjectCalendar instance
@param day ConceptDraw PROJECT week day | [
"Reads",
"a",
"single",
"day",
"for",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L253-L263 |
157,613 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readExceptionDay | private void readExceptionDay(ProjectCalendar mpxjCalendar, ExceptedDay day)
{
ProjectCalendarException mpxjException = mpxjCalendar.addCalendarException(day.getDate(), day.getDate());
if (day.isIsDayWorking())
{
for (Document.Calendars.Calendar.ExceptedDays.ExceptedDay.TimePeriods.TimePer... | java | private void readExceptionDay(ProjectCalendar mpxjCalendar, ExceptedDay day)
{
ProjectCalendarException mpxjException = mpxjCalendar.addCalendarException(day.getDate(), day.getDate());
if (day.isIsDayWorking())
{
for (Document.Calendars.Calendar.ExceptedDays.ExceptedDay.TimePeriods.TimePer... | [
"private",
"void",
"readExceptionDay",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"ExceptedDay",
"day",
")",
"{",
"ProjectCalendarException",
"mpxjException",
"=",
"mpxjCalendar",
".",
"addCalendarException",
"(",
"day",
".",
"getDate",
"(",
")",
",",
"day",
".",
... | Read an exception day for a calendar.
@param mpxjCalendar ProjectCalendar instance
@param day ConceptDraw PROJECT exception day | [
"Read",
"an",
"exception",
"day",
"for",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L271-L281 |
157,614 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readResources | private void readResources(Document cdp)
{
for (Document.Resources.Resource resource : cdp.getResources().getResource())
{
readResource(resource);
}
} | java | private void readResources(Document cdp)
{
for (Document.Resources.Resource resource : cdp.getResources().getResource())
{
readResource(resource);
}
} | [
"private",
"void",
"readResources",
"(",
"Document",
"cdp",
")",
"{",
"for",
"(",
"Document",
".",
"Resources",
".",
"Resource",
"resource",
":",
"cdp",
".",
"getResources",
"(",
")",
".",
"getResource",
"(",
")",
")",
"{",
"readResource",
"(",
"resource",... | Reads resource data from a ConceptDraw PROJECT file.
@param cdp ConceptDraw PROJECT file | [
"Reads",
"resource",
"data",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L288-L294 |
157,615 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readResource | private void readResource(Document.Resources.Resource resource)
{
Resource mpxjResource = m_projectFile.addResource();
mpxjResource.setName(resource.getName());
mpxjResource.setResourceCalendar(m_calendarMap.get(resource.getCalendarID()));
mpxjResource.setStandardRate(new Rate(resource.getCos... | java | private void readResource(Document.Resources.Resource resource)
{
Resource mpxjResource = m_projectFile.addResource();
mpxjResource.setName(resource.getName());
mpxjResource.setResourceCalendar(m_calendarMap.get(resource.getCalendarID()));
mpxjResource.setStandardRate(new Rate(resource.getCos... | [
"private",
"void",
"readResource",
"(",
"Document",
".",
"Resources",
".",
"Resource",
"resource",
")",
"{",
"Resource",
"mpxjResource",
"=",
"m_projectFile",
".",
"addResource",
"(",
")",
";",
"mpxjResource",
".",
"setName",
"(",
"resource",
".",
"getName",
"... | Reads a single resource from a ConceptDraw PROJECT file.
@param resource ConceptDraw PROJECT resource | [
"Reads",
"a",
"single",
"resource",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L301-L316 |
157,616 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readTasks | private void readTasks(Document cdp)
{
//
// Sort the projects into the correct order
//
List<Project> projects = new ArrayList<Project>(cdp.getProjects().getProject());
final AlphanumComparator comparator = new AlphanumComparator();
Collections.sort(projects, new Comparator<Proj... | java | private void readTasks(Document cdp)
{
//
// Sort the projects into the correct order
//
List<Project> projects = new ArrayList<Project>(cdp.getProjects().getProject());
final AlphanumComparator comparator = new AlphanumComparator();
Collections.sort(projects, new Comparator<Proj... | [
"private",
"void",
"readTasks",
"(",
"Document",
"cdp",
")",
"{",
"//",
"// Sort the projects into the correct order",
"//",
"List",
"<",
"Project",
">",
"projects",
"=",
"new",
"ArrayList",
"<",
"Project",
">",
"(",
"cdp",
".",
"getProjects",
"(",
")",
".",
... | Read the projects from a ConceptDraw PROJECT file as top level tasks.
@param cdp ConceptDraw PROJECT file | [
"Read",
"the",
"projects",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"as",
"top",
"level",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L323-L343 |
157,617 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readProject | private void readProject(Project project)
{
Task mpxjTask = m_projectFile.addTask();
//project.getAuthor()
mpxjTask.setBaselineCost(project.getBaselineCost());
mpxjTask.setBaselineFinish(project.getBaselineFinishDate());
mpxjTask.setBaselineStart(project.getBaselineStartDate());
/... | java | private void readProject(Project project)
{
Task mpxjTask = m_projectFile.addTask();
//project.getAuthor()
mpxjTask.setBaselineCost(project.getBaselineCost());
mpxjTask.setBaselineFinish(project.getBaselineFinishDate());
mpxjTask.setBaselineStart(project.getBaselineStartDate());
/... | [
"private",
"void",
"readProject",
"(",
"Project",
"project",
")",
"{",
"Task",
"mpxjTask",
"=",
"m_projectFile",
".",
"addTask",
"(",
")",
";",
"//project.getAuthor()",
"mpxjTask",
".",
"setBaselineCost",
"(",
"project",
".",
"getBaselineCost",
"(",
")",
")",
... | Read a project from a ConceptDraw PROJECT file.
@param project ConceptDraw PROJECT project | [
"Read",
"a",
"project",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L350-L397 |
157,618 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readTask | private void readTask(String projectIdentifier, Map<String, Task> map, Document.Projects.Project.Task task)
{
Task parentTask = map.get(getParentOutlineNumber(task.getOutlineNumber()));
Task mpxjTask = parentTask.addTask();
TimeUnit units = task.getBaseDurationTimeUnit();
mpxjTask.setCost(t... | java | private void readTask(String projectIdentifier, Map<String, Task> map, Document.Projects.Project.Task task)
{
Task parentTask = map.get(getParentOutlineNumber(task.getOutlineNumber()));
Task mpxjTask = parentTask.addTask();
TimeUnit units = task.getBaseDurationTimeUnit();
mpxjTask.setCost(t... | [
"private",
"void",
"readTask",
"(",
"String",
"projectIdentifier",
",",
"Map",
"<",
"String",
",",
"Task",
">",
"map",
",",
"Document",
".",
"Projects",
".",
"Project",
".",
"Task",
"task",
")",
"{",
"Task",
"parentTask",
"=",
"map",
".",
"get",
"(",
"... | Read a task from a ConceptDraw PROJECT file.
@param projectIdentifier parent project identifier
@param map outline number to task map
@param task ConceptDraw PROJECT task | [
"Read",
"a",
"task",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L406-L458 |
157,619 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readRelationships | private void readRelationships(Document cdp)
{
for (Link link : cdp.getLinks().getLink())
{
readRelationship(link);
}
} | java | private void readRelationships(Document cdp)
{
for (Link link : cdp.getLinks().getLink())
{
readRelationship(link);
}
} | [
"private",
"void",
"readRelationships",
"(",
"Document",
"cdp",
")",
"{",
"for",
"(",
"Link",
"link",
":",
"cdp",
".",
"getLinks",
"(",
")",
".",
"getLink",
"(",
")",
")",
"{",
"readRelationship",
"(",
"link",
")",
";",
"}",
"}"
] | Read all task relationships from a ConceptDraw PROJECT file.
@param cdp ConceptDraw PROJECT file | [
"Read",
"all",
"task",
"relationships",
"from",
"a",
"ConceptDraw",
"PROJECT",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L483-L489 |
157,620 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.readRelationship | private void readRelationship(Link link)
{
Task sourceTask = m_taskIdMap.get(link.getSourceTaskID());
Task destinationTask = m_taskIdMap.get(link.getDestinationTaskID());
if (sourceTask != null && destinationTask != null)
{
Duration lag = getDuration(link.getLagUnit(), link.getLag())... | java | private void readRelationship(Link link)
{
Task sourceTask = m_taskIdMap.get(link.getSourceTaskID());
Task destinationTask = m_taskIdMap.get(link.getDestinationTaskID());
if (sourceTask != null && destinationTask != null)
{
Duration lag = getDuration(link.getLagUnit(), link.getLag())... | [
"private",
"void",
"readRelationship",
"(",
"Link",
"link",
")",
"{",
"Task",
"sourceTask",
"=",
"m_taskIdMap",
".",
"get",
"(",
"link",
".",
"getSourceTaskID",
"(",
")",
")",
";",
"Task",
"destinationTask",
"=",
"m_taskIdMap",
".",
"get",
"(",
"link",
"."... | Read a task relationship.
@param link ConceptDraw PROJECT task link | [
"Read",
"a",
"task",
"relationship",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L496-L507 |
157,621 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.getDuration | private Duration getDuration(TimeUnit units, Double duration)
{
Duration result = null;
if (duration != null)
{
double durationValue = duration.doubleValue() * 100.0;
switch (units)
{
case MINUTES:
{
durationValue *= MINUTES_PER_DAY... | java | private Duration getDuration(TimeUnit units, Double duration)
{
Duration result = null;
if (duration != null)
{
double durationValue = duration.doubleValue() * 100.0;
switch (units)
{
case MINUTES:
{
durationValue *= MINUTES_PER_DAY... | [
"private",
"Duration",
"getDuration",
"(",
"TimeUnit",
"units",
",",
"Double",
"duration",
")",
"{",
"Duration",
"result",
"=",
"null",
";",
"if",
"(",
"duration",
"!=",
"null",
")",
"{",
"double",
"durationValue",
"=",
"duration",
".",
"doubleValue",
"(",
... | Read a duration.
@param units duration units
@param duration duration value
@return Duration instance | [
"Read",
"a",
"duration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L516-L567 |
157,622 | joniles/mpxj | src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java | ConceptDrawProjectReader.getParentOutlineNumber | private String getParentOutlineNumber(String outlineNumber)
{
String result;
int index = outlineNumber.lastIndexOf('.');
if (index == -1)
{
result = "";
}
else
{
result = outlineNumber.substring(0, index);
}
return result;
} | java | private String getParentOutlineNumber(String outlineNumber)
{
String result;
int index = outlineNumber.lastIndexOf('.');
if (index == -1)
{
result = "";
}
else
{
result = outlineNumber.substring(0, index);
}
return result;
} | [
"private",
"String",
"getParentOutlineNumber",
"(",
"String",
"outlineNumber",
")",
"{",
"String",
"result",
";",
"int",
"index",
"=",
"outlineNumber",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"result",
"... | Return the parent outline number, or an empty string if
we have a root task.
@param outlineNumber child outline number
@return parent outline number | [
"Return",
"the",
"parent",
"outline",
"number",
"or",
"an",
"empty",
"string",
"if",
"we",
"have",
"a",
"root",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L576-L589 |
157,623 | joniles/mpxj | src/main/java/net/sf/mpxj/common/MPPConstraintField.java | MPPConstraintField.getInstance | public static ConstraintField getInstance(int value)
{
ConstraintField result = null;
if (value >= 0 && value < FIELD_ARRAY.length)
{
result = FIELD_ARRAY[value];
}
return (result);
} | java | public static ConstraintField getInstance(int value)
{
ConstraintField result = null;
if (value >= 0 && value < FIELD_ARRAY.length)
{
result = FIELD_ARRAY[value];
}
return (result);
} | [
"public",
"static",
"ConstraintField",
"getInstance",
"(",
"int",
"value",
")",
"{",
"ConstraintField",
"result",
"=",
"null",
";",
"if",
"(",
"value",
">=",
"0",
"&&",
"value",
"<",
"FIELD_ARRAY",
".",
"length",
")",
"{",
"result",
"=",
"FIELD_ARRAY",
"["... | Retrieve an instance of the ConstraintField class based on the data read from an
MS Project file.
@param value value from an MS Project file
@return ConstraintField instance | [
"Retrieve",
"an",
"instance",
"of",
"the",
"ConstraintField",
"class",
"based",
"on",
"the",
"data",
"read",
"from",
"an",
"MS",
"Project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/MPPConstraintField.java#L44-L54 |
157,624 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.update | public void update()
{
ProjectProperties properties = m_projectFile.getProjectProperties();
char decimalSeparator = properties.getDecimalSeparator();
char thousandsSeparator = properties.getThousandsSeparator();
m_unitsDecimalFormat.applyPattern("#.##", null, decimalSeparator, thousandsSepara... | java | public void update()
{
ProjectProperties properties = m_projectFile.getProjectProperties();
char decimalSeparator = properties.getDecimalSeparator();
char thousandsSeparator = properties.getThousandsSeparator();
m_unitsDecimalFormat.applyPattern("#.##", null, decimalSeparator, thousandsSepara... | [
"public",
"void",
"update",
"(",
")",
"{",
"ProjectProperties",
"properties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"char",
"decimalSeparator",
"=",
"properties",
".",
"getDecimalSeparator",
"(",
")",
";",
"char",
"thousandsSeparator",
... | Called to update the cached formats when something changes. | [
"Called",
"to",
"update",
"the",
"cached",
"formats",
"when",
"something",
"changes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L62-L73 |
157,625 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.updateCurrencyFormats | private void updateCurrencyFormats(ProjectProperties properties, char decimalSeparator, char thousandsSeparator)
{
String prefix = "";
String suffix = "";
String currencySymbol = quoteFormatCharacters(properties.getCurrencySymbol());
switch (properties.getSymbolPosition())
{
c... | java | private void updateCurrencyFormats(ProjectProperties properties, char decimalSeparator, char thousandsSeparator)
{
String prefix = "";
String suffix = "";
String currencySymbol = quoteFormatCharacters(properties.getCurrencySymbol());
switch (properties.getSymbolPosition())
{
c... | [
"private",
"void",
"updateCurrencyFormats",
"(",
"ProjectProperties",
"properties",
",",
"char",
"decimalSeparator",
",",
"char",
"thousandsSeparator",
")",
"{",
"String",
"prefix",
"=",
"\"\"",
";",
"String",
"suffix",
"=",
"\"\"",
";",
"String",
"currencySymbol",
... | Update the currency format.
@param properties project properties
@param decimalSeparator decimal separator
@param thousandsSeparator thousands separator | [
"Update",
"the",
"currency",
"format",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L82-L160 |
157,626 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.quoteFormatCharacters | private String quoteFormatCharacters(String literal)
{
StringBuilder sb = new StringBuilder();
int length = literal.length();
char c;
for (int loop = 0; loop < length; loop++)
{
c = literal.charAt(loop);
switch (c)
{
case '0':
case '#'... | java | private String quoteFormatCharacters(String literal)
{
StringBuilder sb = new StringBuilder();
int length = literal.length();
char c;
for (int loop = 0; loop < length; loop++)
{
c = literal.charAt(loop);
switch (c)
{
case '0':
case '#'... | [
"private",
"String",
"quoteFormatCharacters",
"(",
"String",
"literal",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"length",
"=",
"literal",
".",
"length",
"(",
")",
";",
"char",
"c",
";",
"for",
"(",
"int",
"loop... | This method is used to quote any special characters that appear in
literal text that is required as part of the currency format.
@param literal Literal text
@return literal text with special characters in quotes | [
"This",
"method",
"is",
"used",
"to",
"quote",
"any",
"special",
"characters",
"that",
"appear",
"in",
"literal",
"text",
"that",
"is",
"required",
"as",
"part",
"of",
"the",
"currency",
"format",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L169-L204 |
157,627 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.updateDateTimeFormats | private void updateDateTimeFormats(ProjectProperties properties)
{
String[] timePatterns = getTimePatterns(properties);
String[] datePatterns = getDatePatterns(properties);
String[] dateTimePatterns = getDateTimePatterns(properties, timePatterns);
m_dateTimeFormat.applyPatterns(dateTimePatte... | java | private void updateDateTimeFormats(ProjectProperties properties)
{
String[] timePatterns = getTimePatterns(properties);
String[] datePatterns = getDatePatterns(properties);
String[] dateTimePatterns = getDateTimePatterns(properties, timePatterns);
m_dateTimeFormat.applyPatterns(dateTimePatte... | [
"private",
"void",
"updateDateTimeFormats",
"(",
"ProjectProperties",
"properties",
")",
"{",
"String",
"[",
"]",
"timePatterns",
"=",
"getTimePatterns",
"(",
"properties",
")",
";",
"String",
"[",
"]",
"datePatterns",
"=",
"getDatePatterns",
"(",
"properties",
")... | Updates the date and time formats.
@param properties project properties | [
"Updates",
"the",
"date",
"and",
"time",
"formats",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L211-L230 |
157,628 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.getDatePatterns | private String[] getDatePatterns(ProjectProperties properties)
{
String pattern = "";
char datesep = properties.getDateSeparator();
DateOrder dateOrder = properties.getDateOrder();
switch (dateOrder)
{
case DMY:
{
pattern = "dd" + datesep + "MM" + datesep... | java | private String[] getDatePatterns(ProjectProperties properties)
{
String pattern = "";
char datesep = properties.getDateSeparator();
DateOrder dateOrder = properties.getDateOrder();
switch (dateOrder)
{
case DMY:
{
pattern = "dd" + datesep + "MM" + datesep... | [
"private",
"String",
"[",
"]",
"getDatePatterns",
"(",
"ProjectProperties",
"properties",
")",
"{",
"String",
"pattern",
"=",
"\"\"",
";",
"char",
"datesep",
"=",
"properties",
".",
"getDateSeparator",
"(",
")",
";",
"DateOrder",
"dateOrder",
"=",
"properties",
... | Generate date patterns based on the project configuration.
@param properties project properties
@return date patterns | [
"Generate",
"date",
"patterns",
"based",
"on",
"the",
"project",
"configuration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L238-L270 |
157,629 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJFormats.java | MPXJFormats.generateDateTimePatterns | private List<String> generateDateTimePatterns(String datePattern, String[] timePatterns)
{
List<String> patterns = new ArrayList<String>();
for (String timePattern : timePatterns)
{
patterns.add(datePattern + " " + timePattern);
}
// Always fall back on the date-only pattern
... | java | private List<String> generateDateTimePatterns(String datePattern, String[] timePatterns)
{
List<String> patterns = new ArrayList<String>();
for (String timePattern : timePatterns)
{
patterns.add(datePattern + " " + timePattern);
}
// Always fall back on the date-only pattern
... | [
"private",
"List",
"<",
"String",
">",
"generateDateTimePatterns",
"(",
"String",
"datePattern",
",",
"String",
"[",
"]",
"timePatterns",
")",
"{",
"List",
"<",
"String",
">",
"patterns",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
... | Generate a set of datetime patterns to accommodate variations in MPX files.
@param datePattern date pattern element
@param timePatterns time patterns
@return datetime patterns | [
"Generate",
"a",
"set",
"of",
"datetime",
"patterns",
"to",
"accommodate",
"variations",
"in",
"MPX",
"files",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJFormats.java#L680-L692 |
157,630 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java | AbstractVarMeta.getUniqueIdentifierArray | @Override public Integer[] getUniqueIdentifierArray()
{
Integer[] result = new Integer[m_table.size()];
int index = 0;
for (Integer value : m_table.keySet())
{
result[index] = value;
++index;
}
return (result);
} | java | @Override public Integer[] getUniqueIdentifierArray()
{
Integer[] result = new Integer[m_table.size()];
int index = 0;
for (Integer value : m_table.keySet())
{
result[index] = value;
++index;
}
return (result);
} | [
"@",
"Override",
"public",
"Integer",
"[",
"]",
"getUniqueIdentifierArray",
"(",
")",
"{",
"Integer",
"[",
"]",
"result",
"=",
"new",
"Integer",
"[",
"m_table",
".",
"size",
"(",
")",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"Integer",
"v... | This method returns an array containing all of the unique identifiers
for which data has been stored in the Var2Data block.
@return array of unique identifiers | [
"This",
"method",
"returns",
"an",
"array",
"containing",
"all",
"of",
"the",
"unique",
"identifiers",
"for",
"which",
"data",
"has",
"been",
"stored",
"in",
"the",
"Var2Data",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java#L70-L80 |
157,631 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java | AbstractVarMeta.getOffset | @Override public Integer getOffset(Integer id, Integer type)
{
Integer result = null;
Map<Integer, Integer> map = m_table.get(id);
if (map != null && type != null)
{
result = map.get(type);
}
return (result);
} | java | @Override public Integer getOffset(Integer id, Integer type)
{
Integer result = null;
Map<Integer, Integer> map = m_table.get(id);
if (map != null && type != null)
{
result = map.get(type);
}
return (result);
} | [
"@",
"Override",
"public",
"Integer",
"getOffset",
"(",
"Integer",
"id",
",",
"Integer",
"type",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"map",
"=",
"m_table",
".",
"get",
"(",
"id",
")",
";",
"if"... | This method retrieves the offset of a given entry in the Var2Data block.
Each entry can be uniquely located by the identifier of the object to
which the data belongs, and the type of the data.
@param id unique identifier of an entity
@param type data type identifier
@return offset of requested item | [
"This",
"method",
"retrieves",
"the",
"offset",
"of",
"a",
"given",
"entry",
"in",
"the",
"Var2Data",
"block",
".",
"Each",
"entry",
"can",
"be",
"uniquely",
"located",
"by",
"the",
"identifier",
"of",
"the",
"object",
"to",
"which",
"the",
"data",
"belong... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractVarMeta.java#L102-L113 |
157,632 | joniles/mpxj | src/main/java/net/sf/mpxj/GenericCriteria.java | GenericCriteria.setRightValue | public void setRightValue(int index, Object value)
{
m_definedRightValues[index] = value;
if (value instanceof FieldType)
{
m_symbolicValues = true;
}
else
{
if (value instanceof Duration)
{
if (((Duration) value).getUnits() != TimeUnit.HOUR... | java | public void setRightValue(int index, Object value)
{
m_definedRightValues[index] = value;
if (value instanceof FieldType)
{
m_symbolicValues = true;
}
else
{
if (value instanceof Duration)
{
if (((Duration) value).getUnits() != TimeUnit.HOUR... | [
"public",
"void",
"setRightValue",
"(",
"int",
"index",
",",
"Object",
"value",
")",
"{",
"m_definedRightValues",
"[",
"index",
"]",
"=",
"value",
";",
"if",
"(",
"value",
"instanceof",
"FieldType",
")",
"{",
"m_symbolicValues",
"=",
"true",
";",
"}",
"els... | Add the value to list of values to be used as part of the
evaluation of this indicator.
@param index position in the list
@param value evaluation value | [
"Add",
"the",
"value",
"to",
"list",
"of",
"values",
"to",
"be",
"used",
"as",
"part",
"of",
"the",
"evaluation",
"of",
"this",
"indicator",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GenericCriteria.java#L95-L115 |
157,633 | joniles/mpxj | src/main/java/net/sf/mpxj/GenericCriteria.java | GenericCriteria.evaluate | public boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
//
// Retrieve the LHS value
//
FieldType field = m_leftValue;
Object lhs;
if (field == null)
{
lhs = null;
}
else
{
lhs = container.getC... | java | public boolean evaluate(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
//
// Retrieve the LHS value
//
FieldType field = m_leftValue;
Object lhs;
if (field == null)
{
lhs = null;
}
else
{
lhs = container.getC... | [
"public",
"boolean",
"evaluate",
"(",
"FieldContainer",
"container",
",",
"Map",
"<",
"GenericCriteriaPrompt",
",",
"Object",
">",
"promptValues",
")",
"{",
"//",
"// Retrieve the LHS value",
"//",
"FieldType",
"field",
"=",
"m_leftValue",
";",
"Object",
"lhs",
";... | Evaluate the criteria and return a boolean result.
@param container field container
@param promptValues responses to prompts
@return boolean flag | [
"Evaluate",
"the",
"criteria",
"and",
"return",
"a",
"boolean",
"result",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GenericCriteria.java#L135-L222 |
157,634 | joniles/mpxj | src/main/java/net/sf/mpxj/GenericCriteria.java | GenericCriteria.evaluateLogicalOperator | private boolean evaluateLogicalOperator(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
boolean result = false;
if (m_criteriaList.size() == 0)
{
result = true;
}
else
{
for (GenericCriteria criteria : m_criteriaList)
{
... | java | private boolean evaluateLogicalOperator(FieldContainer container, Map<GenericCriteriaPrompt, Object> promptValues)
{
boolean result = false;
if (m_criteriaList.size() == 0)
{
result = true;
}
else
{
for (GenericCriteria criteria : m_criteriaList)
{
... | [
"private",
"boolean",
"evaluateLogicalOperator",
"(",
"FieldContainer",
"container",
",",
"Map",
"<",
"GenericCriteriaPrompt",
",",
"Object",
">",
"promptValues",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"if",
"(",
"m_criteriaList",
".",
"size",
"(",
")... | Evalutes AND and OR operators.
@param container data context
@param promptValues responses to prompts
@return operator result | [
"Evalutes",
"AND",
"and",
"OR",
"operators",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GenericCriteria.java#L231-L252 |
157,635 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.read | private ProjectFile read() throws Exception
{
m_project = new ProjectFile();
m_eventManager = m_project.getEventManager();
m_project.getProjectProperties().setFileApplication("Synchro");
m_project.getProjectProperties().setFileType("SP");
CustomFieldContainer fields = m_project.getCus... | java | private ProjectFile read() throws Exception
{
m_project = new ProjectFile();
m_eventManager = m_project.getEventManager();
m_project.getProjectProperties().setFileApplication("Synchro");
m_project.getProjectProperties().setFileType("SP");
CustomFieldContainer fields = m_project.getCus... | [
"private",
"ProjectFile",
"read",
"(",
")",
"throws",
"Exception",
"{",
"m_project",
"=",
"new",
"ProjectFile",
"(",
")",
";",
"m_eventManager",
"=",
"m_project",
".",
"getEventManager",
"(",
")",
";",
"m_project",
".",
"getProjectProperties",
"(",
")",
".",
... | Reads data from the SP file.
@return Project File instance | [
"Reads",
"data",
"from",
"the",
"SP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L114-L133 |
157,636 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processCalendars | private void processCalendars() throws IOException
{
CalendarReader reader = new CalendarReader(m_data.getTableData("Calendars"));
reader.read();
for (MapRow row : reader.getRows())
{
processCalendar(row);
}
m_project.setDefaultCalendar(m_calendarMap.get(reader.getDefau... | java | private void processCalendars() throws IOException
{
CalendarReader reader = new CalendarReader(m_data.getTableData("Calendars"));
reader.read();
for (MapRow row : reader.getRows())
{
processCalendar(row);
}
m_project.setDefaultCalendar(m_calendarMap.get(reader.getDefau... | [
"private",
"void",
"processCalendars",
"(",
")",
"throws",
"IOException",
"{",
"CalendarReader",
"reader",
"=",
"new",
"CalendarReader",
"(",
"m_data",
".",
"getTableData",
"(",
"\"Calendars\"",
")",
")",
";",
"reader",
".",
"read",
"(",
")",
";",
"for",
"("... | Extract calendar data. | [
"Extract",
"calendar",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L138-L149 |
157,637 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processCalendar | private void processCalendar(MapRow row)
{
ProjectCalendar calendar = m_project.addCalendar();
Map<UUID, List<DateRange>> dayTypeMap = processDayTypes(row.getRows("DAY_TYPES"));
calendar.setName(row.getString("NAME"));
processRanges(dayTypeMap.get(row.getUUID("SUNDAY_DAY_TYPE")), calendar.... | java | private void processCalendar(MapRow row)
{
ProjectCalendar calendar = m_project.addCalendar();
Map<UUID, List<DateRange>> dayTypeMap = processDayTypes(row.getRows("DAY_TYPES"));
calendar.setName(row.getString("NAME"));
processRanges(dayTypeMap.get(row.getUUID("SUNDAY_DAY_TYPE")), calendar.... | [
"private",
"void",
"processCalendar",
"(",
"MapRow",
"row",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"m_project",
".",
"addCalendar",
"(",
")",
";",
"Map",
"<",
"UUID",
",",
"List",
"<",
"DateRange",
">",
">",
"dayTypeMap",
"=",
"processDayTypes",
"(",
... | Extract data for a single calendar.
@param row calendar data | [
"Extract",
"data",
"for",
"a",
"single",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L156-L179 |
157,638 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processRanges | private void processRanges(List<DateRange> ranges, ProjectCalendarDateRanges container)
{
if (ranges != null)
{
for (DateRange range : ranges)
{
container.addRange(range);
}
}
} | java | private void processRanges(List<DateRange> ranges, ProjectCalendarDateRanges container)
{
if (ranges != null)
{
for (DateRange range : ranges)
{
container.addRange(range);
}
}
} | [
"private",
"void",
"processRanges",
"(",
"List",
"<",
"DateRange",
">",
"ranges",
",",
"ProjectCalendarDateRanges",
"container",
")",
"{",
"if",
"(",
"ranges",
"!=",
"null",
")",
"{",
"for",
"(",
"DateRange",
"range",
":",
"ranges",
")",
"{",
"container",
... | Populate time ranges.
@param ranges time ranges from a Synchro table
@param container time range container | [
"Populate",
"time",
"ranges",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L187-L196 |
157,639 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processDayTypes | private Map<UUID, List<DateRange>> processDayTypes(List<MapRow> types)
{
Map<UUID, List<DateRange>> map = new HashMap<UUID, List<DateRange>>();
for (MapRow row : types)
{
List<DateRange> ranges = new ArrayList<DateRange>();
for (MapRow range : row.getRows("TIME_RANGES"))
... | java | private Map<UUID, List<DateRange>> processDayTypes(List<MapRow> types)
{
Map<UUID, List<DateRange>> map = new HashMap<UUID, List<DateRange>>();
for (MapRow row : types)
{
List<DateRange> ranges = new ArrayList<DateRange>();
for (MapRow range : row.getRows("TIME_RANGES"))
... | [
"private",
"Map",
"<",
"UUID",
",",
"List",
"<",
"DateRange",
">",
">",
"processDayTypes",
"(",
"List",
"<",
"MapRow",
">",
"types",
")",
"{",
"Map",
"<",
"UUID",
",",
"List",
"<",
"DateRange",
">",
">",
"map",
"=",
"new",
"HashMap",
"<",
"UUID",
"... | Extract day type definitions.
@param types Synchro day type rows
@return Map of day types by UUID | [
"Extract",
"day",
"type",
"definitions",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L204-L218 |
157,640 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processResources | private void processResources() throws IOException
{
CompanyReader reader = new CompanyReader(m_data.getTableData("Companies"));
reader.read();
for (MapRow companyRow : reader.getRows())
{
// TODO: need to sort by type as well as by name!
for (MapRow resourceRow : sort(compa... | java | private void processResources() throws IOException
{
CompanyReader reader = new CompanyReader(m_data.getTableData("Companies"));
reader.read();
for (MapRow companyRow : reader.getRows())
{
// TODO: need to sort by type as well as by name!
for (MapRow resourceRow : sort(compa... | [
"private",
"void",
"processResources",
"(",
")",
"throws",
"IOException",
"{",
"CompanyReader",
"reader",
"=",
"new",
"CompanyReader",
"(",
"m_data",
".",
"getTableData",
"(",
"\"Companies\"",
")",
")",
";",
"reader",
".",
"read",
"(",
")",
";",
"for",
"(",
... | Extract resource data. | [
"Extract",
"resource",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L223-L235 |
157,641 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processResource | private void processResource(MapRow row) throws IOException
{
Resource resource = m_project.addResource();
resource.setName(row.getString("NAME"));
resource.setGUID(row.getUUID("UUID"));
resource.setEmailAddress(row.getString("EMAIL"));
resource.setHyperlink(row.getString("URL"));
... | java | private void processResource(MapRow row) throws IOException
{
Resource resource = m_project.addResource();
resource.setName(row.getString("NAME"));
resource.setGUID(row.getUUID("UUID"));
resource.setEmailAddress(row.getString("EMAIL"));
resource.setHyperlink(row.getString("URL"));
... | [
"private",
"void",
"processResource",
"(",
"MapRow",
"row",
")",
"throws",
"IOException",
"{",
"Resource",
"resource",
"=",
"m_project",
".",
"addResource",
"(",
")",
";",
"resource",
".",
"setName",
"(",
"row",
".",
"getString",
"(",
"\"NAME\"",
")",
")",
... | Extract data for a single resource.
@param row Synchro resource data | [
"Extract",
"data",
"for",
"a",
"single",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L242-L264 |
157,642 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processTasks | private void processTasks() throws IOException
{
TaskReader reader = new TaskReader(m_data.getTableData("Tasks"));
reader.read();
for (MapRow row : reader.getRows())
{
processTask(m_project, row);
}
updateDates();
} | java | private void processTasks() throws IOException
{
TaskReader reader = new TaskReader(m_data.getTableData("Tasks"));
reader.read();
for (MapRow row : reader.getRows())
{
processTask(m_project, row);
}
updateDates();
} | [
"private",
"void",
"processTasks",
"(",
")",
"throws",
"IOException",
"{",
"TaskReader",
"reader",
"=",
"new",
"TaskReader",
"(",
"m_data",
".",
"getTableData",
"(",
"\"Tasks\"",
")",
")",
";",
"reader",
".",
"read",
"(",
")",
";",
"for",
"(",
"MapRow",
... | Extract task data. | [
"Extract",
"task",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L269-L278 |
157,643 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processTask | private void processTask(ChildTaskContainer parent, MapRow row) throws IOException
{
Task task = parent.addTask();
task.setName(row.getString("NAME"));
task.setGUID(row.getUUID("UUID"));
task.setText(1, row.getString("ID"));
task.setDuration(row.getDuration("PLANNED_DURATION"));
t... | java | private void processTask(ChildTaskContainer parent, MapRow row) throws IOException
{
Task task = parent.addTask();
task.setName(row.getString("NAME"));
task.setGUID(row.getUUID("UUID"));
task.setText(1, row.getString("ID"));
task.setDuration(row.getDuration("PLANNED_DURATION"));
t... | [
"private",
"void",
"processTask",
"(",
"ChildTaskContainer",
"parent",
",",
"MapRow",
"row",
")",
"throws",
"IOException",
"{",
"Task",
"task",
"=",
"parent",
".",
"addTask",
"(",
")",
";",
"task",
".",
"setName",
"(",
"row",
".",
"getString",
"(",
"\"NAME... | Extract data for a single task.
@param parent task parent
@param row Synchro task data | [
"Extract",
"data",
"for",
"a",
"single",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L286-L354 |
157,644 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processChildTasks | private void processChildTasks(Task task, MapRow row) throws IOException
{
List<MapRow> tasks = row.getRows("TASKS");
if (tasks != null)
{
for (MapRow childTask : tasks)
{
processTask(task, childTask);
}
}
} | java | private void processChildTasks(Task task, MapRow row) throws IOException
{
List<MapRow> tasks = row.getRows("TASKS");
if (tasks != null)
{
for (MapRow childTask : tasks)
{
processTask(task, childTask);
}
}
} | [
"private",
"void",
"processChildTasks",
"(",
"Task",
"task",
",",
"MapRow",
"row",
")",
"throws",
"IOException",
"{",
"List",
"<",
"MapRow",
">",
"tasks",
"=",
"row",
".",
"getRows",
"(",
"\"TASKS\"",
")",
";",
"if",
"(",
"tasks",
"!=",
"null",
")",
"{... | Extract child task data.
@param task MPXJ task
@param row Synchro task data | [
"Extract",
"child",
"task",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L362-L372 |
157,645 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processPredecessors | private void processPredecessors()
{
for (Map.Entry<Task, List<MapRow>> entry : m_predecessorMap.entrySet())
{
Task task = entry.getKey();
List<MapRow> predecessors = entry.getValue();
for (MapRow predecessor : predecessors)
{
processPredecessor(task, prede... | java | private void processPredecessors()
{
for (Map.Entry<Task, List<MapRow>> entry : m_predecessorMap.entrySet())
{
Task task = entry.getKey();
List<MapRow> predecessors = entry.getValue();
for (MapRow predecessor : predecessors)
{
processPredecessor(task, prede... | [
"private",
"void",
"processPredecessors",
"(",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Task",
",",
"List",
"<",
"MapRow",
">",
">",
"entry",
":",
"m_predecessorMap",
".",
"entrySet",
"(",
")",
")",
"{",
"Task",
"task",
"=",
"entry",
".",
"ge... | Extract predecessor data. | [
"Extract",
"predecessor",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L377-L388 |
157,646 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processPredecessor | private void processPredecessor(Task task, MapRow row)
{
Task predecessor = m_taskMap.get(row.getUUID("PREDECESSOR_UUID"));
if (predecessor != null)
{
task.addPredecessor(predecessor, row.getRelationType("RELATION_TYPE"), row.getDuration("LAG"));
}
} | java | private void processPredecessor(Task task, MapRow row)
{
Task predecessor = m_taskMap.get(row.getUUID("PREDECESSOR_UUID"));
if (predecessor != null)
{
task.addPredecessor(predecessor, row.getRelationType("RELATION_TYPE"), row.getDuration("LAG"));
}
} | [
"private",
"void",
"processPredecessor",
"(",
"Task",
"task",
",",
"MapRow",
"row",
")",
"{",
"Task",
"predecessor",
"=",
"m_taskMap",
".",
"get",
"(",
"row",
".",
"getUUID",
"(",
"\"PREDECESSOR_UUID\"",
")",
")",
";",
"if",
"(",
"predecessor",
"!=",
"null... | Extract data for a single predecessor.
@param task parent task
@param row Synchro predecessor data | [
"Extract",
"data",
"for",
"a",
"single",
"predecessor",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L396-L403 |
157,647 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processResourceAssignments | private void processResourceAssignments(Task task, List<MapRow> assignments)
{
for (MapRow row : assignments)
{
processResourceAssignment(task, row);
}
} | java | private void processResourceAssignments(Task task, List<MapRow> assignments)
{
for (MapRow row : assignments)
{
processResourceAssignment(task, row);
}
} | [
"private",
"void",
"processResourceAssignments",
"(",
"Task",
"task",
",",
"List",
"<",
"MapRow",
">",
"assignments",
")",
"{",
"for",
"(",
"MapRow",
"row",
":",
"assignments",
")",
"{",
"processResourceAssignment",
"(",
"task",
",",
"row",
")",
";",
"}",
... | Extract resource assignments for a task.
@param task parent task
@param assignments list of Synchro resource assignment data | [
"Extract",
"resource",
"assignments",
"for",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L411-L417 |
157,648 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processResourceAssignment | private void processResourceAssignment(Task task, MapRow row)
{
Resource resource = m_resourceMap.get(row.getUUID("RESOURCE_UUID"));
task.addResourceAssignment(resource);
} | java | private void processResourceAssignment(Task task, MapRow row)
{
Resource resource = m_resourceMap.get(row.getUUID("RESOURCE_UUID"));
task.addResourceAssignment(resource);
} | [
"private",
"void",
"processResourceAssignment",
"(",
"Task",
"task",
",",
"MapRow",
"row",
")",
"{",
"Resource",
"resource",
"=",
"m_resourceMap",
".",
"get",
"(",
"row",
".",
"getUUID",
"(",
"\"RESOURCE_UUID\"",
")",
")",
";",
"task",
".",
"addResourceAssignm... | Extract data for a single resource assignment.
@param task parent task
@param row Synchro resource assignment | [
"Extract",
"data",
"for",
"a",
"single",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L425-L429 |
157,649 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.setConstraints | private void setConstraints(Task task, MapRow row)
{
ConstraintType constraintType = null;
Date constraintDate = null;
Date lateDate = row.getDate("CONSTRAINT_LATE_DATE");
Date earlyDate = row.getDate("CONSTRAINT_EARLY_DATE");
switch (row.getInteger("CONSTRAINT_TYPE").intValue())
... | java | private void setConstraints(Task task, MapRow row)
{
ConstraintType constraintType = null;
Date constraintDate = null;
Date lateDate = row.getDate("CONSTRAINT_LATE_DATE");
Date earlyDate = row.getDate("CONSTRAINT_EARLY_DATE");
switch (row.getInteger("CONSTRAINT_TYPE").intValue())
... | [
"private",
"void",
"setConstraints",
"(",
"Task",
"task",
",",
"MapRow",
"row",
")",
"{",
"ConstraintType",
"constraintType",
"=",
"null",
";",
"Date",
"constraintDate",
"=",
"null",
";",
"Date",
"lateDate",
"=",
"row",
".",
"getDate",
"(",
"\"CONSTRAINT_LATE_... | Map Synchro constraints to MPXJ constraints.
@param task task
@param row Synchro constraint data | [
"Map",
"Synchro",
"constraints",
"to",
"MPXJ",
"constraints",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L437-L525 |
157,650 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.getNotes | private String getNotes(List<MapRow> rows)
{
String result = null;
if (rows != null && !rows.isEmpty())
{
StringBuilder sb = new StringBuilder();
for (MapRow row : rows)
{
sb.append(row.getString("TITLE"));
sb.append('\n');
sb.append(ro... | java | private String getNotes(List<MapRow> rows)
{
String result = null;
if (rows != null && !rows.isEmpty())
{
StringBuilder sb = new StringBuilder();
for (MapRow row : rows)
{
sb.append(row.getString("TITLE"));
sb.append('\n');
sb.append(ro... | [
"private",
"String",
"getNotes",
"(",
"List",
"<",
"MapRow",
">",
"rows",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"rows",
"!=",
"null",
"&&",
"!",
"rows",
".",
"isEmpty",
"(",
")",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"St... | Common mechanism to convert Synchro commentary recorss into notes.
@param rows commentary table rows
@return note text | [
"Common",
"mechanism",
"to",
"convert",
"Synchro",
"commentary",
"recorss",
"into",
"notes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L533-L549 |
157,651 | 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 |
157,652 | 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 |
157,653 | 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 |
157,654 | 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 |
157,655 | 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 |
157,656 | 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 |
157,657 | 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 |
157,658 | 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 |
157,659 | 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 |
157,660 | 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 |
157,661 | 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 |
157,662 | 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 |
157,663 | 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 |
157,664 | 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 |
157,665 | 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 |
157,666 | 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 |
157,667 | 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 |
157,668 | 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 |
157,669 | 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 |
157,670 | 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 |
157,671 | 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 |
157,672 | 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 |
157,673 | 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 |
157,674 | 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 |
157,675 | 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 |
157,676 | 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 |
157,677 | 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 |
157,678 | 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 |
157,679 | 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 |
157,680 | 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 |
157,681 | 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 |
157,682 | 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 |
157,683 | 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 |
157,684 | 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 |
157,685 | 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 |
157,686 | 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 |
157,687 | 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 |
157,688 | 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 |
157,689 | 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 |
157,690 | 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 |
157,691 | 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 |
157,692 | 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 |
157,693 | 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 |
157,694 | 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 |
157,695 | 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 |
157,696 | 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 |
157,697 | 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 |
157,698 | 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 |
157,699 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.