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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
156,900 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getTimestampFromLong | public static Date getTimestampFromLong(long timestamp)
{
TimeZone tz = TimeZone.getDefault();
Date result = new Date(timestamp - tz.getRawOffset());
if (tz.inDaylightTime(result) == true)
{
int savings;
if (HAS_DST_SAVINGS == true)
{
savings = tz.getD... | java | public static Date getTimestampFromLong(long timestamp)
{
TimeZone tz = TimeZone.getDefault();
Date result = new Date(timestamp - tz.getRawOffset());
if (tz.inDaylightTime(result) == true)
{
int savings;
if (HAS_DST_SAVINGS == true)
{
savings = tz.getD... | [
"public",
"static",
"Date",
"getTimestampFromLong",
"(",
"long",
"timestamp",
")",
"{",
"TimeZone",
"tz",
"=",
"TimeZone",
".",
"getDefault",
"(",
")",
";",
"Date",
"result",
"=",
"new",
"Date",
"(",
"timestamp",
"-",
"tz",
".",
"getRawOffset",
"(",
")",
... | Creates a timestamp from the equivalent long value. This conversion
takes account of the time zone and any daylight savings time.
@param timestamp timestamp expressed as a long integer
@return new Date instance | [
"Creates",
"a",
"timestamp",
"from",
"the",
"equivalent",
"long",
"value",
".",
"This",
"conversion",
"takes",
"account",
"of",
"the",
"time",
"zone",
"and",
"any",
"daylight",
"savings",
"time",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L288-L309 |
156,901 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getTime | public static Date getTime(int hour, int minutes)
{
Calendar cal = popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hour);
cal.set(Calendar.MINUTE, minutes);
cal.set(Calendar.SECOND, 0);
Date result = cal.getTime();
pushCalendar(cal);
return result;
} | java | public static Date getTime(int hour, int minutes)
{
Calendar cal = popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hour);
cal.set(Calendar.MINUTE, minutes);
cal.set(Calendar.SECOND, 0);
Date result = cal.getTime();
pushCalendar(cal);
return result;
} | [
"public",
"static",
"Date",
"getTime",
"(",
"int",
"hour",
",",
"int",
"minutes",
")",
"{",
"Calendar",
"cal",
"=",
"popCalendar",
"(",
")",
";",
"cal",
".",
"set",
"(",
"Calendar",
".",
"HOUR_OF_DAY",
",",
"hour",
")",
";",
"cal",
".",
"set",
"(",
... | Create a Date instance representing a specific time.
@param hour hour 0-23
@param minutes minutes 0-59
@return new Date instance | [
"Create",
"a",
"Date",
"instance",
"representing",
"a",
"specific",
"time",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L318-L327 |
156,902 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.setTime | public static void setTime(Calendar cal, Date time)
{
if (time != null)
{
Calendar startCalendar = popCalendar(time);
cal.set(Calendar.HOUR_OF_DAY, startCalendar.get(Calendar.HOUR_OF_DAY));
cal.set(Calendar.MINUTE, startCalendar.get(Calendar.MINUTE));
cal.set(Calendar.... | java | public static void setTime(Calendar cal, Date time)
{
if (time != null)
{
Calendar startCalendar = popCalendar(time);
cal.set(Calendar.HOUR_OF_DAY, startCalendar.get(Calendar.HOUR_OF_DAY));
cal.set(Calendar.MINUTE, startCalendar.get(Calendar.MINUTE));
cal.set(Calendar.... | [
"public",
"static",
"void",
"setTime",
"(",
"Calendar",
"cal",
",",
"Date",
"time",
")",
"{",
"if",
"(",
"time",
"!=",
"null",
")",
"{",
"Calendar",
"startCalendar",
"=",
"popCalendar",
"(",
"time",
")",
";",
"cal",
".",
"set",
"(",
"Calendar",
".",
... | Given a date represented by a Calendar instance, set the time
component of the date based on the hours and minutes of the
time supplied by the Date instance.
@param cal Calendar instance representing the date
@param time Date instance representing the time of day | [
"Given",
"a",
"date",
"represented",
"by",
"a",
"Calendar",
"instance",
"set",
"the",
"time",
"component",
"of",
"the",
"date",
"based",
"on",
"the",
"hours",
"and",
"minutes",
"of",
"the",
"time",
"supplied",
"by",
"the",
"Date",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L337-L347 |
156,903 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.setTime | public static Date setTime(Date date, Date canonicalTime)
{
Date result;
if (canonicalTime == null)
{
result = date;
}
else
{
//
// The original naive implementation of this method generated
// the "start of day" date (midnight) for the required... | java | public static Date setTime(Date date, Date canonicalTime)
{
Date result;
if (canonicalTime == null)
{
result = date;
}
else
{
//
// The original naive implementation of this method generated
// the "start of day" date (midnight) for the required... | [
"public",
"static",
"Date",
"setTime",
"(",
"Date",
"date",
",",
"Date",
"canonicalTime",
")",
"{",
"Date",
"result",
";",
"if",
"(",
"canonicalTime",
"==",
"null",
")",
"{",
"result",
"=",
"date",
";",
"}",
"else",
"{",
"//",
"// The original naive implem... | Given a date represented by a Date instance, set the time
component of the date based on the hours and minutes of the
time supplied by the Date instance.
@param date Date instance representing the date
@param canonicalTime Date instance representing the time of day
@return new Date instance with the required time set | [
"Given",
"a",
"date",
"represented",
"by",
"a",
"Date",
"instance",
"set",
"the",
"time",
"component",
"of",
"the",
"date",
"based",
"on",
"the",
"hours",
"and",
"minutes",
"of",
"the",
"time",
"supplied",
"by",
"the",
"Date",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L358-L402 |
156,904 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.addDays | public static Date addDays(Date date, int days)
{
Calendar cal = popCalendar(date);
cal.add(Calendar.DAY_OF_YEAR, days);
Date result = cal.getTime();
pushCalendar(cal);
return result;
} | java | public static Date addDays(Date date, int days)
{
Calendar cal = popCalendar(date);
cal.add(Calendar.DAY_OF_YEAR, days);
Date result = cal.getTime();
pushCalendar(cal);
return result;
} | [
"public",
"static",
"Date",
"addDays",
"(",
"Date",
"date",
",",
"int",
"days",
")",
"{",
"Calendar",
"cal",
"=",
"popCalendar",
"(",
"date",
")",
";",
"cal",
".",
"add",
"(",
"Calendar",
".",
"DAY_OF_YEAR",
",",
"days",
")",
";",
"Date",
"result",
"... | Add a number of days to the supplied date.
@param date start date
@param days number of days to add
@return new date | [
"Add",
"a",
"number",
"of",
"days",
"to",
"the",
"supplied",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L441-L448 |
156,905 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.popCalendar | public static Calendar popCalendar()
{
Calendar result;
Deque<Calendar> calendars = CALENDARS.get();
if (calendars.isEmpty())
{
result = Calendar.getInstance();
}
else
{
result = calendars.pop();
}
return result;
} | java | public static Calendar popCalendar()
{
Calendar result;
Deque<Calendar> calendars = CALENDARS.get();
if (calendars.isEmpty())
{
result = Calendar.getInstance();
}
else
{
result = calendars.pop();
}
return result;
} | [
"public",
"static",
"Calendar",
"popCalendar",
"(",
")",
"{",
"Calendar",
"result",
";",
"Deque",
"<",
"Calendar",
">",
"calendars",
"=",
"CALENDARS",
".",
"get",
"(",
")",
";",
"if",
"(",
"calendars",
".",
"isEmpty",
"(",
")",
")",
"{",
"result",
"=",... | Acquire a calendar instance.
@return Calendar instance | [
"Acquire",
"a",
"calendar",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L455-L468 |
156,906 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/BlockReader.java | BlockReader.read | public List<MapRow> read() throws IOException
{
List<MapRow> result = new ArrayList<MapRow>();
int fileCount = m_stream.readInt();
if (fileCount != 0)
{
for (int index = 0; index < fileCount; index++)
{
// We use a LinkedHashMap to preserve insertion order in ite... | java | public List<MapRow> read() throws IOException
{
List<MapRow> result = new ArrayList<MapRow>();
int fileCount = m_stream.readInt();
if (fileCount != 0)
{
for (int index = 0; index < fileCount; index++)
{
// We use a LinkedHashMap to preserve insertion order in ite... | [
"public",
"List",
"<",
"MapRow",
">",
"read",
"(",
")",
"throws",
"IOException",
"{",
"List",
"<",
"MapRow",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"MapRow",
">",
"(",
")",
";",
"int",
"fileCount",
"=",
"m_stream",
".",
"readInt",
"(",
")",
";"... | Read a list of fixed sized blocks from the input stream.
@return List of MapRow instances representing the fixed size blocks | [
"Read",
"a",
"list",
"of",
"fixed",
"sized",
"blocks",
"from",
"the",
"input",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/BlockReader.java#L52-L68 |
156,907 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPComponent.java | MPPComponent.readByte | protected int readByte(InputStream is) throws IOException
{
byte[] data = new byte[1];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getByte(data, 0));
} | java | protected int readByte(InputStream is) throws IOException
{
byte[] data = new byte[1];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getByte(data, 0));
} | [
"protected",
"int",
"readByte",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"1",
"]",
";",
"if",
"(",
"is",
".",
"read",
"(",
"data",
")",
"!=",
"data",
".",
"length",
")",
"{",
... | This method reads a single byte from the input stream.
@param is the input stream
@return byte value
@throws IOException on file read error or EOF | [
"This",
"method",
"reads",
"a",
"single",
"byte",
"from",
"the",
"input",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPComponent.java#L51-L60 |
156,908 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPComponent.java | MPPComponent.readShort | protected int readShort(InputStream is) throws IOException
{
byte[] data = new byte[2];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getShort(data, 0));
} | java | protected int readShort(InputStream is) throws IOException
{
byte[] data = new byte[2];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getShort(data, 0));
} | [
"protected",
"int",
"readShort",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"2",
"]",
";",
"if",
"(",
"is",
".",
"read",
"(",
"data",
")",
"!=",
"data",
".",
"length",
")",
"{",
... | This method reads a two byte integer from the input stream.
@param is the input stream
@return integer value
@throws IOException on file read error or EOF | [
"This",
"method",
"reads",
"a",
"two",
"byte",
"integer",
"from",
"the",
"input",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPComponent.java#L69-L78 |
156,909 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPComponent.java | MPPComponent.readInt | protected int readInt(InputStream is) throws IOException
{
byte[] data = new byte[4];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getInt(data, 0));
} | java | protected int readInt(InputStream is) throws IOException
{
byte[] data = new byte[4];
if (is.read(data) != data.length)
{
throw new EOFException();
}
return (MPPUtility.getInt(data, 0));
} | [
"protected",
"int",
"readInt",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"if",
"(",
"is",
".",
"read",
"(",
"data",
")",
"!=",
"data",
".",
"length",
")",
"{",
"... | This method reads a four byte integer from the input stream.
@param is the input stream
@return byte value
@throws IOException on file read error or EOF | [
"This",
"method",
"reads",
"a",
"four",
"byte",
"integer",
"from",
"the",
"input",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPComponent.java#L87-L96 |
156,910 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPComponent.java | MPPComponent.readByteArray | protected byte[] readByteArray(InputStream is, int size) throws IOException
{
byte[] buffer = new byte[size];
if (is.read(buffer) != buffer.length)
{
throw new EOFException();
}
return (buffer);
} | java | protected byte[] readByteArray(InputStream is, int size) throws IOException
{
byte[] buffer = new byte[size];
if (is.read(buffer) != buffer.length)
{
throw new EOFException();
}
return (buffer);
} | [
"protected",
"byte",
"[",
"]",
"readByteArray",
"(",
"InputStream",
"is",
",",
"int",
"size",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"size",
"]",
";",
"if",
"(",
"is",
".",
"read",
"(",
"buffer",
")",
... | This method reads a byte array from the input stream.
@param is the input stream
@param size number of bytes to read
@return byte array
@throws IOException on file read error or EOF | [
"This",
"method",
"reads",
"a",
"byte",
"array",
"from",
"the",
"input",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPComponent.java#L106-L114 |
156,911 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/Blast.java | Blast.blast | public int blast(InputStream input, OutputStream output) throws IOException
{
m_input = input;
m_output = output;
int lit; /* true if literals are coded */
int dict; /* log2(dictionary size) - 6 */
int symbol; /* decoded symbol, extra bits for distance */
int len; /* length for c... | java | public int blast(InputStream input, OutputStream output) throws IOException
{
m_input = input;
m_output = output;
int lit; /* true if literals are coded */
int dict; /* log2(dictionary size) - 6 */
int symbol; /* decoded symbol, extra bits for distance */
int len; /* length for c... | [
"public",
"int",
"blast",
"(",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"m_input",
"=",
"input",
";",
"m_output",
"=",
"output",
";",
"int",
"lit",
";",
"/* true if literals are coded */",
"int",
"dict",
";",
"/... | Decode PKWare Compression Library stream.
Format notes:
- First byte is 0 if literals are uncoded or 1 if they are coded. Second
byte is 4, 5, or 6 for the number of extra bits in the distance code.
This is the base-2 logarithm of the dictionary size minus six.
- Compressed data is a combination of literals and len... | [
"Decode",
"PKWare",
"Compression",
"Library",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/Blast.java#L156-L261 |
156,912 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/Blast.java | Blast.decode | private int decode(Huffman h) throws IOException
{
int len; /* current number of bits in code */
int code; /* len bits being decoded */
int first; /* first code of length len */
int count; /* number of codes of length len */
int index; /* index of first code of length len in symbol tabl... | java | private int decode(Huffman h) throws IOException
{
int len; /* current number of bits in code */
int code; /* len bits being decoded */
int first; /* first code of length len */
int count; /* number of codes of length len */
int index; /* index of first code of length len in symbol tabl... | [
"private",
"int",
"decode",
"(",
"Huffman",
"h",
")",
"throws",
"IOException",
"{",
"int",
"len",
";",
"/* current number of bits in code */",
"int",
"code",
";",
"/* len bits being decoded */",
"int",
"first",
";",
"/* first code of length len */",
"int",
"count",
";... | Decode a code from the stream s using huffman table h. Return the symbol or
a negative value if there is an error. If all of the lengths are zero, i.e.
an empty code, or if the code is incomplete and an invalid code is received,
then -9 is returned after reading MAXBITS bits.
Format notes:
- The codes as stored in ... | [
"Decode",
"a",
"code",
"from",
"the",
"stream",
"s",
"using",
"huffman",
"table",
"h",
".",
"Return",
"the",
"symbol",
"or",
"a",
"negative",
"value",
"if",
"there",
"is",
"an",
"error",
".",
"If",
"all",
"of",
"the",
"lengths",
"are",
"zero",
"i",
"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/Blast.java#L331-L389 |
156,913 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java | MSPDITimephasedWorkNormaliser.validateSameDay | private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list)
{
for (TimephasedWork assignment : list)
{
Date assignmentStart = assignment.getStart();
Date calendarStartTime = calendar.getStartTime(assignmentStart);
Date assignmentStartTime = DateHelpe... | java | private void validateSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list)
{
for (TimephasedWork assignment : list)
{
Date assignmentStart = assignment.getStart();
Date calendarStartTime = calendar.getStartTime(assignmentStart);
Date assignmentStartTime = DateHelpe... | [
"private",
"void",
"validateSameDay",
"(",
"ProjectCalendar",
"calendar",
",",
"LinkedList",
"<",
"TimephasedWork",
">",
"list",
")",
"{",
"for",
"(",
"TimephasedWork",
"assignment",
":",
"list",
")",
"{",
"Date",
"assignmentStart",
"=",
"assignment",
".",
"getS... | Ensures that the start and end dates for ranges fit within the
working times for a given day.
@param calendar current calendar
@param list assignment data | [
"Ensures",
"that",
"the",
"start",
"and",
"end",
"dates",
"for",
"ranges",
"fit",
"within",
"the",
"working",
"times",
"for",
"a",
"given",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDITimephasedWorkNormaliser.java#L279-L309 |
156,914 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/TableFactory.java | TableFactory.createTable | public Table createTable(ProjectFile file, byte[] data, VarMeta varMeta, Var2Data varData)
{
Table table = new Table();
table.setID(MPPUtility.getInt(data, 0));
table.setResourceFlag(MPPUtility.getShort(data, 108) == 1);
table.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(d... | java | public Table createTable(ProjectFile file, byte[] data, VarMeta varMeta, Var2Data varData)
{
Table table = new Table();
table.setID(MPPUtility.getInt(data, 0));
table.setResourceFlag(MPPUtility.getShort(data, 108) == 1);
table.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(d... | [
"public",
"Table",
"createTable",
"(",
"ProjectFile",
"file",
",",
"byte",
"[",
"]",
"data",
",",
"VarMeta",
"varMeta",
",",
"Var2Data",
"varData",
")",
"{",
"Table",
"table",
"=",
"new",
"Table",
"(",
")",
";",
"table",
".",
"setID",
"(",
"MPPUtility",
... | Creates a new Table instance from data extracted from an MPP file.
@param file parent project file
@param data fixed data
@param varMeta var meta
@param varData var data
@return Table instance | [
"Creates",
"a",
"new",
"Table",
"instance",
"from",
"data",
"extracted",
"from",
"an",
"MPP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TableFactory.java#L61-L90 |
156,915 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/MapRow.java | MapRow.parseBoolean | private final boolean parseBoolean(String value)
{
return value != null && (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("y") || value.equalsIgnoreCase("yes"));
} | java | private final boolean parseBoolean(String value)
{
return value != null && (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("y") || value.equalsIgnoreCase("yes"));
} | [
"private",
"final",
"boolean",
"parseBoolean",
"(",
"String",
"value",
")",
"{",
"return",
"value",
"!=",
"null",
"&&",
"(",
"value",
".",
"equalsIgnoreCase",
"(",
"\"true\"",
")",
"||",
"value",
".",
"equalsIgnoreCase",
"(",
"\"y\"",
")",
"||",
"value",
"... | Parse a string representation of a Boolean value.
XER files sometimes have "N" and "Y" to indicate boolean
@param value string representation
@return Boolean value | [
"Parse",
"a",
"string",
"representation",
"of",
"a",
"Boolean",
"value",
".",
"XER",
"files",
"sometimes",
"have",
"N",
"and",
"Y",
"to",
"indicate",
"boolean"
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/MapRow.java#L183-L186 |
156,916 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processActivityCodes | public void processActivityCodes(List<Row> types, List<Row> typeValues, List<Row> assignments)
{
ActivityCodeContainer container = m_project.getActivityCodes();
Map<Integer, ActivityCode> map = new HashMap<Integer, ActivityCode>();
for (Row row : types)
{
ActivityCode code = new Act... | java | public void processActivityCodes(List<Row> types, List<Row> typeValues, List<Row> assignments)
{
ActivityCodeContainer container = m_project.getActivityCodes();
Map<Integer, ActivityCode> map = new HashMap<Integer, ActivityCode>();
for (Row row : types)
{
ActivityCode code = new Act... | [
"public",
"void",
"processActivityCodes",
"(",
"List",
"<",
"Row",
">",
"types",
",",
"List",
"<",
"Row",
">",
"typeValues",
",",
"List",
"<",
"Row",
">",
"assignments",
")",
"{",
"ActivityCodeContainer",
"container",
"=",
"m_project",
".",
"getActivityCodes",... | Read activity code types and values.
@param types activity code type data
@param typeValues activity code value data
@param assignments activity code task assignments | [
"Read",
"activity",
"code",
"types",
"and",
"values",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L184-L217 |
156,917 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processCalendar | public void processCalendar(Row row)
{
ProjectCalendar calendar = m_project.addCalendar();
Integer id = row.getInteger("clndr_id");
m_calMap.put(id, calendar);
calendar.setName(row.getString("clndr_name"));
try
{
calendar.setMinutesPerDay(Integer.valueOf((int) NumberHel... | java | public void processCalendar(Row row)
{
ProjectCalendar calendar = m_project.addCalendar();
Integer id = row.getInteger("clndr_id");
m_calMap.put(id, calendar);
calendar.setName(row.getString("clndr_name"));
try
{
calendar.setMinutesPerDay(Integer.valueOf((int) NumberHel... | [
"public",
"void",
"processCalendar",
"(",
"Row",
"row",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"m_project",
".",
"addCalendar",
"(",
")",
";",
"Integer",
"id",
"=",
"row",
".",
"getInteger",
"(",
"\"clndr_id\"",
")",
";",
"m_calMap",
".",
"put",
"("... | Process data for an individual calendar.
@param row calendar data | [
"Process",
"data",
"for",
"an",
"individual",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L298-L354 |
156,918 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processCalendarDays | private void processCalendarDays(ProjectCalendar calendar, Record root)
{
// Retrieve working hours ...
Record daysOfWeek = root.getChild("DaysOfWeek");
if (daysOfWeek != null)
{
for (Record dayRecord : daysOfWeek.getChildren())
{
processCalendarHours(calendar, d... | java | private void processCalendarDays(ProjectCalendar calendar, Record root)
{
// Retrieve working hours ...
Record daysOfWeek = root.getChild("DaysOfWeek");
if (daysOfWeek != null)
{
for (Record dayRecord : daysOfWeek.getChildren())
{
processCalendarHours(calendar, d... | [
"private",
"void",
"processCalendarDays",
"(",
"ProjectCalendar",
"calendar",
",",
"Record",
"root",
")",
"{",
"// Retrieve working hours ...",
"Record",
"daysOfWeek",
"=",
"root",
".",
"getChild",
"(",
"\"DaysOfWeek\"",
")",
";",
"if",
"(",
"daysOfWeek",
"!=",
"n... | Process calendar days of the week.
@param calendar project calendar
@param root calendar data | [
"Process",
"calendar",
"days",
"of",
"the",
"week",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L362-L373 |
156,919 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processCalendarHours | private void processCalendarHours(ProjectCalendar calendar, Record dayRecord)
{
// ... for each day of the week
Day day = Day.getInstance(Integer.parseInt(dayRecord.getField()));
// Get hours
List<Record> recHours = dayRecord.getChildren();
if (recHours.size() == 0)
{
// ... | java | private void processCalendarHours(ProjectCalendar calendar, Record dayRecord)
{
// ... for each day of the week
Day day = Day.getInstance(Integer.parseInt(dayRecord.getField()));
// Get hours
List<Record> recHours = dayRecord.getChildren();
if (recHours.size() == 0)
{
// ... | [
"private",
"void",
"processCalendarHours",
"(",
"ProjectCalendar",
"calendar",
",",
"Record",
"dayRecord",
")",
"{",
"// ... for each day of the week",
"Day",
"day",
"=",
"Day",
".",
"getInstance",
"(",
"Integer",
".",
"parseInt",
"(",
"dayRecord",
".",
"getField",
... | Process hours in a working day.
@param calendar project calendar
@param dayRecord working day data | [
"Process",
"hours",
"in",
"a",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L381-L402 |
156,920 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.addHours | private void addHours(ProjectCalendarDateRanges ranges, Record hoursRecord)
{
if (hoursRecord.getValue() != null)
{
String[] wh = hoursRecord.getValue().split("\\|");
try
{
String startText;
String endText;
if (wh[0].equals("s"))
... | java | private void addHours(ProjectCalendarDateRanges ranges, Record hoursRecord)
{
if (hoursRecord.getValue() != null)
{
String[] wh = hoursRecord.getValue().split("\\|");
try
{
String startText;
String endText;
if (wh[0].equals("s"))
... | [
"private",
"void",
"addHours",
"(",
"ProjectCalendarDateRanges",
"ranges",
",",
"Record",
"hoursRecord",
")",
"{",
"if",
"(",
"hoursRecord",
".",
"getValue",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"wh",
"=",
"hoursRecord",
".",
"getValue",
"... | Parses a record containing hours and add them to a container.
@param ranges hours container
@param hoursRecord hours record | [
"Parses",
"a",
"record",
"containing",
"hours",
"and",
"add",
"them",
"to",
"a",
"container",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L410-L446 |
156,921 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getResourceCalendar | private ProjectCalendar getResourceCalendar(Integer calendarID)
{
ProjectCalendar result = null;
if (calendarID != null)
{
ProjectCalendar calendar = m_calMap.get(calendarID);
if (calendar != null)
{
//
// If the resource is linked to a base calend... | java | private ProjectCalendar getResourceCalendar(Integer calendarID)
{
ProjectCalendar result = null;
if (calendarID != null)
{
ProjectCalendar calendar = m_calMap.get(calendarID);
if (calendar != null)
{
//
// If the resource is linked to a base calend... | [
"private",
"ProjectCalendar",
"getResourceCalendar",
"(",
"Integer",
"calendarID",
")",
"{",
"ProjectCalendar",
"result",
"=",
"null",
";",
"if",
"(",
"calendarID",
"!=",
"null",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"m_calMap",
".",
"get",
"(",
"calenda... | Retrieve the correct calendar for a resource.
@param calendarID calendar ID
@return calendar for resource | [
"Retrieve",
"the",
"correct",
"calendar",
"for",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L506-L553 |
156,922 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getActivityIDField | private FieldType getActivityIDField(Map<FieldType, String> map)
{
FieldType result = null;
for (Map.Entry<FieldType, String> entry : map.entrySet())
{
if (entry.getValue().equals("task_code"))
{
result = entry.getKey();
break;
}
}
retu... | java | private FieldType getActivityIDField(Map<FieldType, String> map)
{
FieldType result = null;
for (Map.Entry<FieldType, String> entry : map.entrySet())
{
if (entry.getValue().equals("task_code"))
{
result = entry.getKey();
break;
}
}
retu... | [
"private",
"FieldType",
"getActivityIDField",
"(",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
")",
"{",
"FieldType",
"result",
"=",
"null",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"FieldType",
",",
"String",
">",
"entry",
":",
"map",
".",
"... | Determine which field the Activity ID has been mapped to.
@param map field map
@return field | [
"Determine",
"which",
"field",
"the",
"Activity",
"ID",
"has",
"been",
"mapped",
"to",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L793-L805 |
156,923 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.addUserDefinedField | private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
try
{
switch (fieldType)
{
case TASK:
TaskField taskField;
do
{
taskField = m_taskUdfCounters.nextField(TaskF... | java | private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
try
{
switch (fieldType)
{
case TASK:
TaskField taskField;
do
{
taskField = m_taskUdfCounters.nextField(TaskF... | [
"private",
"void",
"addUserDefinedField",
"(",
"FieldTypeClass",
"fieldType",
",",
"UserFieldDataType",
"dataType",
",",
"String",
"name",
")",
"{",
"try",
"{",
"switch",
"(",
"fieldType",
")",
"{",
"case",
"TASK",
":",
"TaskField",
"taskField",
";",
"do",
"{"... | Configure a new user defined field.
@param fieldType field type
@param dataType field data type
@param name field name | [
"Configure",
"a",
"new",
"user",
"defined",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L814-L871 |
156,924 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.addUDFValue | private void addUDFValue(FieldTypeClass fieldType, FieldContainer container, Row row)
{
Integer fieldId = row.getInteger("udf_type_id");
String fieldName = m_udfFields.get(fieldId);
Object value = null;
FieldType field = m_project.getCustomFields().getFieldByAlias(fieldType, fieldName);
... | java | private void addUDFValue(FieldTypeClass fieldType, FieldContainer container, Row row)
{
Integer fieldId = row.getInteger("udf_type_id");
String fieldName = m_udfFields.get(fieldId);
Object value = null;
FieldType field = m_project.getCustomFields().getFieldByAlias(fieldType, fieldName);
... | [
"private",
"void",
"addUDFValue",
"(",
"FieldTypeClass",
"fieldType",
",",
"FieldContainer",
"container",
",",
"Row",
"row",
")",
"{",
"Integer",
"fieldId",
"=",
"row",
".",
"getInteger",
"(",
"\"udf_type_id\"",
")",
";",
"String",
"fieldName",
"=",
"m_udfFields... | Adds a user defined field value to a task.
@param fieldType field type
@param container FieldContainer instance
@param row UDF data | [
"Adds",
"a",
"user",
"defined",
"field",
"value",
"to",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L880-L941 |
156,925 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.populateUserDefinedFieldValues | private void populateUserDefinedFieldValues(String tableName, FieldTypeClass type, FieldContainer container, Integer uniqueID)
{
Map<Integer, List<Row>> tableData = m_udfValues.get(tableName);
if (tableData != null)
{
List<Row> udf = tableData.get(uniqueID);
if (udf != null)
... | java | private void populateUserDefinedFieldValues(String tableName, FieldTypeClass type, FieldContainer container, Integer uniqueID)
{
Map<Integer, List<Row>> tableData = m_udfValues.get(tableName);
if (tableData != null)
{
List<Row> udf = tableData.get(uniqueID);
if (udf != null)
... | [
"private",
"void",
"populateUserDefinedFieldValues",
"(",
"String",
"tableName",
",",
"FieldTypeClass",
"type",
",",
"FieldContainer",
"container",
",",
"Integer",
"uniqueID",
")",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"tableData",
"=",
... | Populate the UDF values for this entity.
@param tableName parent table name
@param type entity type
@param container entity
@param uniqueID entity Unique ID | [
"Populate",
"the",
"UDF",
"values",
"for",
"this",
"entity",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L951-L965 |
156,926 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processDefaultCurrency | public void processDefaultCurrency(Row row)
{
ProjectProperties properties = m_project.getProjectProperties();
properties.setCurrencySymbol(row.getString("curr_symbol"));
properties.setSymbolPosition(CURRENCY_SYMBOL_POSITION_MAP.get(row.getString("pos_curr_fmt_type")));
properties.setCurrency... | java | public void processDefaultCurrency(Row row)
{
ProjectProperties properties = m_project.getProjectProperties();
properties.setCurrencySymbol(row.getString("curr_symbol"));
properties.setSymbolPosition(CURRENCY_SYMBOL_POSITION_MAP.get(row.getString("pos_curr_fmt_type")));
properties.setCurrency... | [
"public",
"void",
"processDefaultCurrency",
"(",
"Row",
"row",
")",
"{",
"ProjectProperties",
"properties",
"=",
"m_project",
".",
"getProjectProperties",
"(",
")",
";",
"properties",
".",
"setCurrencySymbol",
"(",
"row",
".",
"getString",
"(",
"\"curr_symbol\"",
... | Code common to both XER and database readers to extract
currency format data.
@param row row containing currency data | [
"Code",
"common",
"to",
"both",
"XER",
"and",
"database",
"readers",
"to",
"extract",
"currency",
"format",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1358-L1366 |
156,927 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.processFields | private void processFields(Map<FieldType, String> map, Row row, FieldContainer container)
{
for (Map.Entry<FieldType, String> entry : map.entrySet())
{
FieldType field = entry.getKey();
String name = entry.getValue();
Object value;
switch (field.getDataType())
... | java | private void processFields(Map<FieldType, String> map, Row row, FieldContainer container)
{
for (Map.Entry<FieldType, String> entry : map.entrySet())
{
FieldType field = entry.getKey();
String name = entry.getValue();
Object value;
switch (field.getDataType())
... | [
"private",
"void",
"processFields",
"(",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
",",
"Row",
"row",
",",
"FieldContainer",
"container",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"FieldType",
",",
"String",
">",
"entry",
":",
"map",
".... | Generic method to extract Primavera fields and assign to MPXJ fields.
@param map map of MPXJ field types and Primavera field names
@param row Primavera data container
@param container MPXJ data contain | [
"Generic",
"method",
"to",
"extract",
"Primavera",
"fields",
"and",
"assign",
"to",
"MPXJ",
"fields",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1375-L1458 |
156,928 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.applyAliases | private void applyAliases(Map<FieldType, String> aliases)
{
CustomFieldContainer fields = m_project.getCustomFields();
for (Map.Entry<FieldType, String> entry : aliases.entrySet())
{
fields.getCustomField(entry.getKey()).setAlias(entry.getValue());
}
} | java | private void applyAliases(Map<FieldType, String> aliases)
{
CustomFieldContainer fields = m_project.getCustomFields();
for (Map.Entry<FieldType, String> entry : aliases.entrySet())
{
fields.getCustomField(entry.getKey()).setAlias(entry.getValue());
}
} | [
"private",
"void",
"applyAliases",
"(",
"Map",
"<",
"FieldType",
",",
"String",
">",
"aliases",
")",
"{",
"CustomFieldContainer",
"fields",
"=",
"m_project",
".",
"getCustomFields",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"FieldType",
",",
"St... | Apply aliases to task and resource fields.
@param aliases map of aliases | [
"Apply",
"aliases",
"to",
"task",
"and",
"resource",
"fields",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1481-L1488 |
156,929 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.calculatePercentComplete | private Number calculatePercentComplete(Row row)
{
Number result;
switch (PercentCompleteType.getInstance(row.getString("complete_pct_type")))
{
case UNITS:
{
result = calculateUnitsPercentComplete(row);
break;
}
case DURATION:
{... | java | private Number calculatePercentComplete(Row row)
{
Number result;
switch (PercentCompleteType.getInstance(row.getString("complete_pct_type")))
{
case UNITS:
{
result = calculateUnitsPercentComplete(row);
break;
}
case DURATION:
{... | [
"private",
"Number",
"calculatePercentComplete",
"(",
"Row",
"row",
")",
"{",
"Number",
"result",
";",
"switch",
"(",
"PercentCompleteType",
".",
"getInstance",
"(",
"row",
".",
"getString",
"(",
"\"complete_pct_type\"",
")",
")",
")",
"{",
"case",
"UNITS",
":... | Determine which type of percent complete is used on on this task,
and calculate the required value.
@param row task data
@return percent complete value | [
"Determine",
"which",
"type",
"of",
"percent",
"complete",
"is",
"used",
"on",
"on",
"this",
"task",
"and",
"calculate",
"the",
"required",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1497-L1522 |
156,930 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.calculateUnitsPercentComplete | private Number calculateUnitsPercentComplete(Row row)
{
double result = 0;
double actualWorkQuantity = NumberHelper.getDouble(row.getDouble("act_work_qty"));
double actualEquipmentQuantity = NumberHelper.getDouble(row.getDouble("act_equip_qty"));
double numerator = actualWorkQuantity + actua... | java | private Number calculateUnitsPercentComplete(Row row)
{
double result = 0;
double actualWorkQuantity = NumberHelper.getDouble(row.getDouble("act_work_qty"));
double actualEquipmentQuantity = NumberHelper.getDouble(row.getDouble("act_equip_qty"));
double numerator = actualWorkQuantity + actua... | [
"private",
"Number",
"calculateUnitsPercentComplete",
"(",
"Row",
"row",
")",
"{",
"double",
"result",
"=",
"0",
";",
"double",
"actualWorkQuantity",
"=",
"NumberHelper",
".",
"getDouble",
"(",
"row",
".",
"getDouble",
"(",
"\"act_work_qty\"",
")",
")",
";",
"... | Calculate the units percent complete.
@param row task data
@return percent complete | [
"Calculate",
"the",
"units",
"percent",
"complete",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1541-L1558 |
156,931 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.calculateDurationPercentComplete | private Number calculateDurationPercentComplete(Row row)
{
double result = 0;
double targetDuration = row.getDuration("target_drtn_hr_cnt").getDuration();
double remainingDuration = row.getDuration("remain_drtn_hr_cnt").getDuration();
if (targetDuration == 0)
{
if (remainingDu... | java | private Number calculateDurationPercentComplete(Row row)
{
double result = 0;
double targetDuration = row.getDuration("target_drtn_hr_cnt").getDuration();
double remainingDuration = row.getDuration("remain_drtn_hr_cnt").getDuration();
if (targetDuration == 0)
{
if (remainingDu... | [
"private",
"Number",
"calculateDurationPercentComplete",
"(",
"Row",
"row",
")",
"{",
"double",
"result",
"=",
"0",
";",
"double",
"targetDuration",
"=",
"row",
".",
"getDuration",
"(",
"\"target_drtn_hr_cnt\"",
")",
".",
"getDuration",
"(",
")",
";",
"double",
... | Calculate the duration percent complete.
@param row task data
@return percent complete | [
"Calculate",
"the",
"duration",
"percent",
"complete",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1566-L1591 |
156,932 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getDefaultResourceFieldMap | public static Map<FieldType, String> getDefaultResourceFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(ResourceField.UNIQUE_ID, "rsrc_id");
map.put(ResourceField.GUID, "guid");
map.put(ResourceField.NAME, "rsrc_name");
map.put(ResourceField.COD... | java | public static Map<FieldType, String> getDefaultResourceFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(ResourceField.UNIQUE_ID, "rsrc_id");
map.put(ResourceField.GUID, "guid");
map.put(ResourceField.NAME, "rsrc_name");
map.put(ResourceField.COD... | [
"public",
"static",
"Map",
"<",
"FieldType",
",",
"String",
">",
"getDefaultResourceFieldMap",
"(",
")",
"{",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
"=",
"new",
"LinkedHashMap",
"<",
"FieldType",
",",
"String",
">",
"(",
")",
";",
"map",
"."... | Retrieve the default mapping between MPXJ resource fields and Primavera resource field names.
@return mapping | [
"Retrieve",
"the",
"default",
"mapping",
"between",
"MPXJ",
"resource",
"fields",
"and",
"Primavera",
"resource",
"field",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1598-L1614 |
156,933 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getDefaultWbsFieldMap | public static Map<FieldType, String> getDefaultWbsFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(TaskField.UNIQUE_ID, "wbs_id");
map.put(TaskField.GUID, "guid");
map.put(TaskField.NAME, "wbs_name");
map.put(TaskField.BASELINE_COST, "orig_cost"... | java | public static Map<FieldType, String> getDefaultWbsFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(TaskField.UNIQUE_ID, "wbs_id");
map.put(TaskField.GUID, "guid");
map.put(TaskField.NAME, "wbs_name");
map.put(TaskField.BASELINE_COST, "orig_cost"... | [
"public",
"static",
"Map",
"<",
"FieldType",
",",
"String",
">",
"getDefaultWbsFieldMap",
"(",
")",
"{",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
"=",
"new",
"LinkedHashMap",
"<",
"FieldType",
",",
"String",
">",
"(",
")",
";",
"map",
".",
"... | Retrieve the default mapping between MPXJ task fields and Primavera wbs field names.
@return mapping | [
"Retrieve",
"the",
"default",
"mapping",
"between",
"MPXJ",
"task",
"fields",
"and",
"Primavera",
"wbs",
"field",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1621-L1638 |
156,934 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getDefaultTaskFieldMap | public static Map<FieldType, String> getDefaultTaskFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(TaskField.UNIQUE_ID, "task_id");
map.put(TaskField.GUID, "guid");
map.put(TaskField.NAME, "task_name");
map.put(TaskField.ACTUAL_DURATION, "act_d... | java | public static Map<FieldType, String> getDefaultTaskFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(TaskField.UNIQUE_ID, "task_id");
map.put(TaskField.GUID, "guid");
map.put(TaskField.NAME, "task_name");
map.put(TaskField.ACTUAL_DURATION, "act_d... | [
"public",
"static",
"Map",
"<",
"FieldType",
",",
"String",
">",
"getDefaultTaskFieldMap",
"(",
")",
"{",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
"=",
"new",
"LinkedHashMap",
"<",
"FieldType",
",",
"String",
">",
"(",
")",
";",
"map",
".",
... | Retrieve the default mapping between MPXJ task fields and Primavera task field names.
@return mapping | [
"Retrieve",
"the",
"default",
"mapping",
"between",
"MPXJ",
"task",
"fields",
"and",
"Primavera",
"task",
"field",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1645-L1682 |
156,935 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getDefaultAssignmentFieldMap | public static Map<FieldType, String> getDefaultAssignmentFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(AssignmentField.UNIQUE_ID, "taskrsrc_id");
map.put(AssignmentField.GUID, "guid");
map.put(AssignmentField.REMAINING_WORK, "remain_qty");
ma... | java | public static Map<FieldType, String> getDefaultAssignmentFieldMap()
{
Map<FieldType, String> map = new LinkedHashMap<FieldType, String>();
map.put(AssignmentField.UNIQUE_ID, "taskrsrc_id");
map.put(AssignmentField.GUID, "guid");
map.put(AssignmentField.REMAINING_WORK, "remain_qty");
ma... | [
"public",
"static",
"Map",
"<",
"FieldType",
",",
"String",
">",
"getDefaultAssignmentFieldMap",
"(",
")",
"{",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
"=",
"new",
"LinkedHashMap",
"<",
"FieldType",
",",
"String",
">",
"(",
")",
";",
"map",
"... | Retrieve the default mapping between MPXJ assignment fields and Primavera assignment field names.
@return mapping | [
"Retrieve",
"the",
"default",
"mapping",
"between",
"MPXJ",
"assignment",
"fields",
"and",
"Primavera",
"assignment",
"field",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1689-L1708 |
156,936 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.getDefaultAliases | public static Map<FieldType, String> getDefaultAliases()
{
Map<FieldType, String> map = new HashMap<FieldType, String>();
map.put(TaskField.DATE1, "Suspend Date");
map.put(TaskField.DATE2, "Resume Date");
map.put(TaskField.TEXT1, "Code");
map.put(TaskField.TEXT2, "Activity Type");
... | java | public static Map<FieldType, String> getDefaultAliases()
{
Map<FieldType, String> map = new HashMap<FieldType, String>();
map.put(TaskField.DATE1, "Suspend Date");
map.put(TaskField.DATE2, "Resume Date");
map.put(TaskField.TEXT1, "Code");
map.put(TaskField.TEXT2, "Activity Type");
... | [
"public",
"static",
"Map",
"<",
"FieldType",
",",
"String",
">",
"getDefaultAliases",
"(",
")",
"{",
"Map",
"<",
"FieldType",
",",
"String",
">",
"map",
"=",
"new",
"HashMap",
"<",
"FieldType",
",",
"String",
">",
"(",
")",
";",
"map",
".",
"put",
"(... | Retrieve the default aliases to be applied to MPXJ task and resource fields.
@return map of aliases | [
"Retrieve",
"the",
"default",
"aliases",
"to",
"be",
"applied",
"to",
"MPXJ",
"task",
"and",
"resource",
"fields",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L1715-L1727 |
156,937 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjFilter.java | MpxjFilter.filter | private static void filter(String filename, String filtername) throws Exception
{
ProjectFile project = new UniversalProjectReader().read(filename);
Filter filter = project.getFilters().getFilterByName(filtername);
if (filter == null)
{
displayAvailableFilters(project);
}
... | java | private static void filter(String filename, String filtername) throws Exception
{
ProjectFile project = new UniversalProjectReader().read(filename);
Filter filter = project.getFilters().getFilterByName(filtername);
if (filter == null)
{
displayAvailableFilters(project);
}
... | [
"private",
"static",
"void",
"filter",
"(",
"String",
"filename",
",",
"String",
"filtername",
")",
"throws",
"Exception",
"{",
"ProjectFile",
"project",
"=",
"new",
"UniversalProjectReader",
"(",
")",
".",
"read",
"(",
"filename",
")",
";",
"Filter",
"filter"... | This method opens the named project, applies the named filter
and displays the filtered list of tasks or resources. If an
invalid filter name is supplied, a list of valid filter names
is shown.
@param filename input file name
@param filtername input filter name | [
"This",
"method",
"opens",
"the",
"named",
"project",
"applies",
"the",
"named",
"filter",
"and",
"displays",
"the",
"filtered",
"list",
"of",
"tasks",
"or",
"resources",
".",
"If",
"an",
"invalid",
"filter",
"name",
"is",
"supplied",
"a",
"list",
"of",
"v... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjFilter.java#L74-L97 |
156,938 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjFilter.java | MpxjFilter.displayAvailableFilters | private static void displayAvailableFilters(ProjectFile project)
{
System.out.println("Unknown filter name supplied.");
System.out.println("Available task filters:");
for (Filter filter : project.getFilters().getTaskFilters())
{
System.out.println(" " + filter.getName());
}
... | java | private static void displayAvailableFilters(ProjectFile project)
{
System.out.println("Unknown filter name supplied.");
System.out.println("Available task filters:");
for (Filter filter : project.getFilters().getTaskFilters())
{
System.out.println(" " + filter.getName());
}
... | [
"private",
"static",
"void",
"displayAvailableFilters",
"(",
"ProjectFile",
"project",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Unknown filter name supplied.\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"Available task filters:\"",
")",
... | This utility displays a list of available task filters, and a
list of available resource filters.
@param project project file | [
"This",
"utility",
"displays",
"a",
"list",
"of",
"available",
"task",
"filters",
"and",
"a",
"list",
"of",
"available",
"resource",
"filters",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjFilter.java#L105-L120 |
156,939 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjFilter.java | MpxjFilter.processTaskFilter | private static void processTaskFilter(ProjectFile project, Filter filter)
{
for (Task task : project.getTasks())
{
if (filter.evaluate(task, null))
{
System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
}
}
} | java | private static void processTaskFilter(ProjectFile project, Filter filter)
{
for (Task task : project.getTasks())
{
if (filter.evaluate(task, null))
{
System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
}
}
} | [
"private",
"static",
"void",
"processTaskFilter",
"(",
"ProjectFile",
"project",
",",
"Filter",
"filter",
")",
"{",
"for",
"(",
"Task",
"task",
":",
"project",
".",
"getTasks",
"(",
")",
")",
"{",
"if",
"(",
"filter",
".",
"evaluate",
"(",
"task",
",",
... | Apply a filter to the list of all tasks, and show the results.
@param project project file
@param filter filter | [
"Apply",
"a",
"filter",
"to",
"the",
"list",
"of",
"all",
"tasks",
"and",
"show",
"the",
"results",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjFilter.java#L128-L137 |
156,940 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjFilter.java | MpxjFilter.processResourceFilter | private static void processResourceFilter(ProjectFile project, Filter filter)
{
for (Resource resource : project.getResources())
{
if (filter.evaluate(resource, null))
{
System.out.println(resource.getID() + "," + resource.getUniqueID() + "," + resource.getName());
... | java | private static void processResourceFilter(ProjectFile project, Filter filter)
{
for (Resource resource : project.getResources())
{
if (filter.evaluate(resource, null))
{
System.out.println(resource.getID() + "," + resource.getUniqueID() + "," + resource.getName());
... | [
"private",
"static",
"void",
"processResourceFilter",
"(",
"ProjectFile",
"project",
",",
"Filter",
"filter",
")",
"{",
"for",
"(",
"Resource",
"resource",
":",
"project",
".",
"getResources",
"(",
")",
")",
"{",
"if",
"(",
"filter",
".",
"evaluate",
"(",
... | Apply a filter to the list of all resources, and show the results.
@param project project file
@param filter filter | [
"Apply",
"a",
"filter",
"to",
"the",
"list",
"of",
"all",
"resources",
"and",
"show",
"the",
"results",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjFilter.java#L145-L154 |
156,941 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjConvert.java | MpxjConvert.process | public void process(String inputFile, String outputFile) throws Exception
{
System.out.println("Reading input file started.");
long start = System.currentTimeMillis();
ProjectFile projectFile = readFile(inputFile);
long elapsed = System.currentTimeMillis() - start;
System.out.println("R... | java | public void process(String inputFile, String outputFile) throws Exception
{
System.out.println("Reading input file started.");
long start = System.currentTimeMillis();
ProjectFile projectFile = readFile(inputFile);
long elapsed = System.currentTimeMillis() - start;
System.out.println("R... | [
"public",
"void",
"process",
"(",
"String",
"inputFile",
",",
"String",
"outputFile",
")",
"throws",
"Exception",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Reading input file started.\"",
")",
";",
"long",
"start",
"=",
"System",
".",
"currentTimeMillis... | Convert one project file format to another.
@param inputFile input file
@param outputFile output file
@throws Exception | [
"Convert",
"one",
"project",
"file",
"format",
"to",
"another",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjConvert.java#L80-L94 |
156,942 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjConvert.java | MpxjConvert.readFile | private ProjectFile readFile(String inputFile) throws MPXJException
{
ProjectReader reader = new UniversalProjectReader();
ProjectFile projectFile = reader.read(inputFile);
if (projectFile == null)
{
throw new IllegalArgumentException("Unsupported file type");
}
return pr... | java | private ProjectFile readFile(String inputFile) throws MPXJException
{
ProjectReader reader = new UniversalProjectReader();
ProjectFile projectFile = reader.read(inputFile);
if (projectFile == null)
{
throw new IllegalArgumentException("Unsupported file type");
}
return pr... | [
"private",
"ProjectFile",
"readFile",
"(",
"String",
"inputFile",
")",
"throws",
"MPXJException",
"{",
"ProjectReader",
"reader",
"=",
"new",
"UniversalProjectReader",
"(",
")",
";",
"ProjectFile",
"projectFile",
"=",
"reader",
".",
"read",
"(",
"inputFile",
")",
... | Use the universal project reader to open the file.
Throw an exception if we can't determine the file type.
@param inputFile file name
@return ProjectFile instance | [
"Use",
"the",
"universal",
"project",
"reader",
"to",
"open",
"the",
"file",
".",
"Throw",
"an",
"exception",
"if",
"we",
"can",
"t",
"determine",
"the",
"file",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjConvert.java#L103-L112 |
156,943 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readProjectProperties | private void readProjectProperties(Settings phoenixSettings, Storepoint storepoint)
{
ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(phoenixSettings.getTitle());
mpxjProperties.setDefaultDurationUnits(phoenixSettings.getBaseunit());
mpxjPropert... | java | private void readProjectProperties(Settings phoenixSettings, Storepoint storepoint)
{
ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
mpxjProperties.setName(phoenixSettings.getTitle());
mpxjProperties.setDefaultDurationUnits(phoenixSettings.getBaseunit());
mpxjPropert... | [
"private",
"void",
"readProjectProperties",
"(",
"Settings",
"phoenixSettings",
",",
"Storepoint",
"storepoint",
")",
"{",
"ProjectProperties",
"mpxjProperties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"mpxjProperties",
".",
"setName",
"(",
"... | This method extracts project properties from a Phoenix file.
@param phoenixSettings Phoenix settings
@param storepoint Current storepoint | [
"This",
"method",
"extracts",
"project",
"properties",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L193-L199 |
156,944 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readCalendars | private void readCalendars(Storepoint phoenixProject)
{
Calendars calendars = phoenixProject.getCalendars();
if (calendars != null)
{
for (Calendar calendar : calendars.getCalendar())
{
readCalendar(calendar);
}
ProjectCalendar defaultCalendar = m_pr... | java | private void readCalendars(Storepoint phoenixProject)
{
Calendars calendars = phoenixProject.getCalendars();
if (calendars != null)
{
for (Calendar calendar : calendars.getCalendar())
{
readCalendar(calendar);
}
ProjectCalendar defaultCalendar = m_pr... | [
"private",
"void",
"readCalendars",
"(",
"Storepoint",
"phoenixProject",
")",
"{",
"Calendars",
"calendars",
"=",
"phoenixProject",
".",
"getCalendars",
"(",
")",
";",
"if",
"(",
"calendars",
"!=",
"null",
")",
"{",
"for",
"(",
"Calendar",
"calendar",
":",
"... | This method extracts calendar data from a Phoenix file.
@param phoenixProject Root node of the Phoenix file | [
"This",
"method",
"extracts",
"calendar",
"data",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L206-L222 |
156,945 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readCalendar | private void readCalendar(Calendar calendar)
{
// Create the calendar
ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
mpxjCalendar.setName(calendar.getName());
// Default all days to working
for (Day day : Day.values())
{
mpxjCalendar.setWorkingDay(day, true)... | java | private void readCalendar(Calendar calendar)
{
// Create the calendar
ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
mpxjCalendar.setName(calendar.getName());
// Default all days to working
for (Day day : Day.values())
{
mpxjCalendar.setWorkingDay(day, true)... | [
"private",
"void",
"readCalendar",
"(",
"Calendar",
"calendar",
")",
"{",
"// Create the calendar",
"ProjectCalendar",
"mpxjCalendar",
"=",
"m_projectFile",
".",
"addCalendar",
"(",
")",
";",
"mpxjCalendar",
".",
"setName",
"(",
"calendar",
".",
"getName",
"(",
")... | This method extracts data for a single calendar from a Phoenix file.
@param calendar calendar data | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"calendar",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L229-L262 |
156,946 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readResources | private void readResources(Storepoint phoenixProject)
{
Resources resources = phoenixProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res : resources.getResource())
{
Resource resource = ... | java | private void readResources(Storepoint phoenixProject)
{
Resources resources = phoenixProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res : resources.getResource())
{
Resource resource = ... | [
"private",
"void",
"readResources",
"(",
"Storepoint",
"phoenixProject",
")",
"{",
"Resources",
"resources",
"=",
"phoenixProject",
".",
"getResources",
"(",
")",
";",
"if",
"(",
"resources",
"!=",
"null",
")",
"{",
"for",
"(",
"net",
".",
"sf",
".",
"mpxj... | This method extracts resource data from a Phoenix file.
@param phoenixProject parent node for resources | [
"This",
"method",
"extracts",
"resource",
"data",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L269-L280 |
156,947 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readResource | private Resource readResource(net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource phoenixResource)
{
Resource mpxjResource = m_projectFile.addResource();
TimeUnit rateUnits = phoenixResource.getMonetarybase();
if (rateUnits == null)
{
rateUnits = TimeUnit.HO... | java | private Resource readResource(net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource phoenixResource)
{
Resource mpxjResource = m_projectFile.addResource();
TimeUnit rateUnits = phoenixResource.getMonetarybase();
if (rateUnits == null)
{
rateUnits = TimeUnit.HO... | [
"private",
"Resource",
"readResource",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"phoenix",
".",
"schema",
".",
"Project",
".",
"Storepoints",
".",
"Storepoint",
".",
"Resources",
".",
"Resource",
"phoenixResource",
")",
"{",
"Resource",
"mpxjResource",
"=",
... | This method extracts data for a single resource from a Phoenix file.
@param phoenixResource resource data
@return Resource instance | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"resource",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L288-L311 |
156,948 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readTasks | private void readTasks(Project phoenixProject, Storepoint storepoint)
{
processLayouts(phoenixProject);
processActivityCodes(storepoint);
processActivities(storepoint);
updateDates();
} | java | private void readTasks(Project phoenixProject, Storepoint storepoint)
{
processLayouts(phoenixProject);
processActivityCodes(storepoint);
processActivities(storepoint);
updateDates();
} | [
"private",
"void",
"readTasks",
"(",
"Project",
"phoenixProject",
",",
"Storepoint",
"storepoint",
")",
"{",
"processLayouts",
"(",
"phoenixProject",
")",
";",
"processActivityCodes",
"(",
"storepoint",
")",
";",
"processActivities",
"(",
"storepoint",
")",
";",
"... | Read phases and activities from the Phoenix file to create the task hierarchy.
@param phoenixProject all project data
@param storepoint storepoint containing current project data | [
"Read",
"phases",
"and",
"activities",
"from",
"the",
"Phoenix",
"file",
"to",
"create",
"the",
"task",
"hierarchy",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L319-L325 |
156,949 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.processActivityCodes | private void processActivityCodes(Storepoint storepoint)
{
for (Code code : storepoint.getActivityCodes().getCode())
{
int sequence = 0;
for (Value value : code.getValue())
{
UUID uuid = getUUID(value.getUuid(), value.getName());
m_activityCodeValues.put... | java | private void processActivityCodes(Storepoint storepoint)
{
for (Code code : storepoint.getActivityCodes().getCode())
{
int sequence = 0;
for (Value value : code.getValue())
{
UUID uuid = getUUID(value.getUuid(), value.getName());
m_activityCodeValues.put... | [
"private",
"void",
"processActivityCodes",
"(",
"Storepoint",
"storepoint",
")",
"{",
"for",
"(",
"Code",
"code",
":",
"storepoint",
".",
"getActivityCodes",
"(",
")",
".",
"getCode",
"(",
")",
")",
"{",
"int",
"sequence",
"=",
"0",
";",
"for",
"(",
"Val... | Map from an activity code value UUID to the actual value itself, and its
sequence number.
@param storepoint storepoint containing current project data | [
"Map",
"from",
"an",
"activity",
"code",
"value",
"UUID",
"to",
"the",
"actual",
"value",
"itself",
"and",
"its",
"sequence",
"number",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L333-L345 |
156,950 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.processLayouts | private void processLayouts(Project phoenixProject)
{
//
// Find the active layout
//
Layout activeLayout = getActiveLayout(phoenixProject);
//
// Create a list of the visible codes in the correct order
//
for (CodeOption option : activeLayout.getCodeOptions().getCode... | java | private void processLayouts(Project phoenixProject)
{
//
// Find the active layout
//
Layout activeLayout = getActiveLayout(phoenixProject);
//
// Create a list of the visible codes in the correct order
//
for (CodeOption option : activeLayout.getCodeOptions().getCode... | [
"private",
"void",
"processLayouts",
"(",
"Project",
"phoenixProject",
")",
"{",
"//",
"// Find the active layout",
"//",
"Layout",
"activeLayout",
"=",
"getActiveLayout",
"(",
"phoenixProject",
")",
";",
"//",
"// Create a list of the visible codes in the correct order",
"... | Find the current layout and extract the activity code order and visibility.
@param phoenixProject phoenix project data | [
"Find",
"the",
"current",
"layout",
"and",
"extract",
"the",
"activity",
"code",
"order",
"and",
"visibility",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L352-L369 |
156,951 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.getActiveLayout | private Layout getActiveLayout(Project phoenixProject)
{
//
// Start with the first layout we find
//
Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0);
//
// If this isn't active, find one which is... and if none are,
// we'll just use the first.
/... | java | private Layout getActiveLayout(Project phoenixProject)
{
//
// Start with the first layout we find
//
Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0);
//
// If this isn't active, find one which is... and if none are,
// we'll just use the first.
/... | [
"private",
"Layout",
"getActiveLayout",
"(",
"Project",
"phoenixProject",
")",
"{",
"//",
"// Start with the first layout we find",
"//",
"Layout",
"activeLayout",
"=",
"phoenixProject",
".",
"getLayouts",
"(",
")",
".",
"getLayout",
"(",
")",
".",
"get",
"(",
"0"... | Find the current active layout.
@param phoenixProject phoenix project data
@return current active layout | [
"Find",
"the",
"current",
"active",
"layout",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L377-L401 |
156,952 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.processActivities | private void processActivities(Storepoint phoenixProject)
{
final AlphanumComparator comparator = new AlphanumComparator();
List<Activity> activities = phoenixProject.getActivities().getActivity();
Collections.sort(activities, new Comparator<Activity>()
{
@Override public int compare... | java | private void processActivities(Storepoint phoenixProject)
{
final AlphanumComparator comparator = new AlphanumComparator();
List<Activity> activities = phoenixProject.getActivities().getActivity();
Collections.sort(activities, new Comparator<Activity>()
{
@Override public int compare... | [
"private",
"void",
"processActivities",
"(",
"Storepoint",
"phoenixProject",
")",
"{",
"final",
"AlphanumComparator",
"comparator",
"=",
"new",
"AlphanumComparator",
"(",
")",
";",
"List",
"<",
"Activity",
">",
"activities",
"=",
"phoenixProject",
".",
"getActivitie... | Process the set of activities from the Phoenix file.
@param phoenixProject project data | [
"Process",
"the",
"set",
"of",
"activities",
"from",
"the",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L408-L458 |
156,953 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.processActivity | private void processActivity(Activity activity)
{
Task task = getParentTask(activity).addTask();
task.setText(1, activity.getId());
task.setActualDuration(activity.getActualDuration());
task.setActualFinish(activity.getActualFinish());
task.setActualStart(activity.getActualStart());
... | java | private void processActivity(Activity activity)
{
Task task = getParentTask(activity).addTask();
task.setText(1, activity.getId());
task.setActualDuration(activity.getActualDuration());
task.setActualFinish(activity.getActualFinish());
task.setActualStart(activity.getActualStart());
... | [
"private",
"void",
"processActivity",
"(",
"Activity",
"activity",
")",
"{",
"Task",
"task",
"=",
"getParentTask",
"(",
"activity",
")",
".",
"addTask",
"(",
")",
";",
"task",
".",
"setText",
"(",
"1",
",",
"activity",
".",
"getId",
"(",
")",
")",
";",... | Create a Task instance from a Phoenix activity.
@param activity Phoenix activity data | [
"Create",
"a",
"Task",
"instance",
"from",
"a",
"Phoenix",
"activity",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L465-L533 |
156,954 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.activityIsMilestone | private boolean activityIsMilestone(Activity activity)
{
String type = activity.getType();
return type != null && type.indexOf("Milestone") != -1;
} | java | private boolean activityIsMilestone(Activity activity)
{
String type = activity.getType();
return type != null && type.indexOf("Milestone") != -1;
} | [
"private",
"boolean",
"activityIsMilestone",
"(",
"Activity",
"activity",
")",
"{",
"String",
"type",
"=",
"activity",
".",
"getType",
"(",
")",
";",
"return",
"type",
"!=",
"null",
"&&",
"type",
".",
"indexOf",
"(",
"\"Milestone\"",
")",
"!=",
"-",
"1",
... | Returns true if the activity is a milestone.
@param activity Phoenix activity
@return true if the activity is a milestone | [
"Returns",
"true",
"if",
"the",
"activity",
"is",
"a",
"milestone",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L541-L545 |
156,955 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.activityIsStartMilestone | private boolean activityIsStartMilestone(Activity activity)
{
String type = activity.getType();
return type != null && type.indexOf("StartMilestone") != -1;
} | java | private boolean activityIsStartMilestone(Activity activity)
{
String type = activity.getType();
return type != null && type.indexOf("StartMilestone") != -1;
} | [
"private",
"boolean",
"activityIsStartMilestone",
"(",
"Activity",
"activity",
")",
"{",
"String",
"type",
"=",
"activity",
".",
"getType",
"(",
")",
";",
"return",
"type",
"!=",
"null",
"&&",
"type",
".",
"indexOf",
"(",
"\"StartMilestone\"",
")",
"!=",
"-"... | Returns true if the activity is a start milestone.
@param activity Phoenix activity
@return true if the activity is a milestone | [
"Returns",
"true",
"if",
"the",
"activity",
"is",
"a",
"start",
"milestone",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L553-L557 |
156,956 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.getParentTask | private ChildTaskContainer getParentTask(Activity activity)
{
//
// Make a map of activity codes and their values for this activity
//
Map<UUID, UUID> map = getActivityCodes(activity);
//
// Work through the activity codes in sequence
//
ChildTaskContainer parent = m_... | java | private ChildTaskContainer getParentTask(Activity activity)
{
//
// Make a map of activity codes and their values for this activity
//
Map<UUID, UUID> map = getActivityCodes(activity);
//
// Work through the activity codes in sequence
//
ChildTaskContainer parent = m_... | [
"private",
"ChildTaskContainer",
"getParentTask",
"(",
"Activity",
"activity",
")",
"{",
"//",
"// Make a map of activity codes and their values for this activity",
"//",
"Map",
"<",
"UUID",
",",
"UUID",
">",
"map",
"=",
"getActivityCodes",
"(",
"activity",
")",
";",
... | Retrieves the parent task for a Phoenix activity.
@param activity Phoenix activity
@return parent task | [
"Retrieves",
"the",
"parent",
"task",
"for",
"a",
"Phoenix",
"activity",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L565-L600 |
156,957 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.findChildTaskByUUID | private Task findChildTaskByUUID(ChildTaskContainer parent, UUID uuid)
{
Task result = null;
for (Task task : parent.getChildTasks())
{
if (uuid.equals(task.getGUID()))
{
result = task;
break;
}
}
return result;
} | java | private Task findChildTaskByUUID(ChildTaskContainer parent, UUID uuid)
{
Task result = null;
for (Task task : parent.getChildTasks())
{
if (uuid.equals(task.getGUID()))
{
result = task;
break;
}
}
return result;
} | [
"private",
"Task",
"findChildTaskByUUID",
"(",
"ChildTaskContainer",
"parent",
",",
"UUID",
"uuid",
")",
"{",
"Task",
"result",
"=",
"null",
";",
"for",
"(",
"Task",
"task",
":",
"parent",
".",
"getChildTasks",
"(",
")",
")",
"{",
"if",
"(",
"uuid",
".",... | Locates a task within a child task container which matches the supplied UUID.
@param parent child task container
@param uuid required UUID
@return Task instance or null if the task is not found | [
"Locates",
"a",
"task",
"within",
"a",
"child",
"task",
"container",
"which",
"matches",
"the",
"supplied",
"UUID",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L609-L623 |
156,958 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readAssignments | private void readAssignments(Resource mpxjResource, net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res)
{
for (Assignment assignment : res.getAssignment())
{
readAssignment(mpxjResource, assignment);
}
} | java | private void readAssignments(Resource mpxjResource, net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res)
{
for (Assignment assignment : res.getAssignment())
{
readAssignment(mpxjResource, assignment);
}
} | [
"private",
"void",
"readAssignments",
"(",
"Resource",
"mpxjResource",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"phoenix",
".",
"schema",
".",
"Project",
".",
"Storepoints",
".",
"Storepoint",
".",
"Resources",
".",
"Resource",
"res",
")",
"{",
"for",
"(",... | Reads Phoenix resource assignments.
@param mpxjResource MPXJ resource
@param res Phoenix resource | [
"Reads",
"Phoenix",
"resource",
"assignments",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L631-L637 |
156,959 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readAssignment | private void readAssignment(Resource resource, Assignment assignment)
{
Task task = m_activityMap.get(assignment.getActivity());
if (task != null)
{
task.addResourceAssignment(resource);
}
} | java | private void readAssignment(Resource resource, Assignment assignment)
{
Task task = m_activityMap.get(assignment.getActivity());
if (task != null)
{
task.addResourceAssignment(resource);
}
} | [
"private",
"void",
"readAssignment",
"(",
"Resource",
"resource",
",",
"Assignment",
"assignment",
")",
"{",
"Task",
"task",
"=",
"m_activityMap",
".",
"get",
"(",
"assignment",
".",
"getActivity",
"(",
")",
")",
";",
"if",
"(",
"task",
"!=",
"null",
")",
... | Read a single resource assignment.
@param resource MPXJ resource
@param assignment Phoenix assignment | [
"Read",
"a",
"single",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L645-L652 |
156,960 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readRelationships | private void readRelationships(Storepoint phoenixProject)
{
for (Relationship relation : phoenixProject.getRelationships().getRelationship())
{
readRelation(relation);
}
} | java | private void readRelationships(Storepoint phoenixProject)
{
for (Relationship relation : phoenixProject.getRelationships().getRelationship())
{
readRelation(relation);
}
} | [
"private",
"void",
"readRelationships",
"(",
"Storepoint",
"phoenixProject",
")",
"{",
"for",
"(",
"Relationship",
"relation",
":",
"phoenixProject",
".",
"getRelationships",
"(",
")",
".",
"getRelationship",
"(",
")",
")",
"{",
"readRelation",
"(",
"relation",
... | Read task relationships from a Phoenix file.
@param phoenixProject Phoenix project data | [
"Read",
"task",
"relationships",
"from",
"a",
"Phoenix",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L659-L665 |
156,961 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.readRelation | private void readRelation(Relationship relation)
{
Task predecessor = m_activityMap.get(relation.getPredecessor());
Task successor = m_activityMap.get(relation.getSuccessor());
if (predecessor != null && successor != null)
{
Duration lag = relation.getLag();
RelationType typ... | java | private void readRelation(Relationship relation)
{
Task predecessor = m_activityMap.get(relation.getPredecessor());
Task successor = m_activityMap.get(relation.getSuccessor());
if (predecessor != null && successor != null)
{
Duration lag = relation.getLag();
RelationType typ... | [
"private",
"void",
"readRelation",
"(",
"Relationship",
"relation",
")",
"{",
"Task",
"predecessor",
"=",
"m_activityMap",
".",
"get",
"(",
"relation",
".",
"getPredecessor",
"(",
")",
")",
";",
"Task",
"successor",
"=",
"m_activityMap",
".",
"get",
"(",
"re... | Read an individual Phoenix task relationship.
@param relation Phoenix task relationship | [
"Read",
"an",
"individual",
"Phoenix",
"task",
"relationship",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L672-L682 |
156,962 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.getActivityCodes | Map<UUID, UUID> getActivityCodes(Activity activity)
{
Map<UUID, UUID> map = m_activityCodeCache.get(activity);
if (map == null)
{
map = new HashMap<UUID, UUID>();
m_activityCodeCache.put(activity, map);
for (CodeAssignment ca : activity.getCodeAssignment())
{
... | java | Map<UUID, UUID> getActivityCodes(Activity activity)
{
Map<UUID, UUID> map = m_activityCodeCache.get(activity);
if (map == null)
{
map = new HashMap<UUID, UUID>();
m_activityCodeCache.put(activity, map);
for (CodeAssignment ca : activity.getCodeAssignment())
{
... | [
"Map",
"<",
"UUID",
",",
"UUID",
">",
"getActivityCodes",
"(",
"Activity",
"activity",
")",
"{",
"Map",
"<",
"UUID",
",",
"UUID",
">",
"map",
"=",
"m_activityCodeCache",
".",
"get",
"(",
"activity",
")",
";",
"if",
"(",
"map",
"==",
"null",
")",
"{",... | For a given activity, retrieve a map of the activity code values which have been assigned to it.
@param activity target activity
@return map of activity code value UUIDs | [
"For",
"a",
"given",
"activity",
"retrieve",
"a",
"map",
"of",
"the",
"activity",
"code",
"values",
"which",
"have",
"been",
"assigned",
"to",
"it",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L690-L705 |
156,963 | joniles/mpxj | src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java | PhoenixReader.getCurrentStorepoint | private Storepoint getCurrentStorepoint(Project phoenixProject)
{
List<Storepoint> storepoints = phoenixProject.getStorepoints().getStorepoint();
Collections.sort(storepoints, new Comparator<Storepoint>()
{
@Override public int compare(Storepoint o1, Storepoint o2)
{
r... | java | private Storepoint getCurrentStorepoint(Project phoenixProject)
{
List<Storepoint> storepoints = phoenixProject.getStorepoints().getStorepoint();
Collections.sort(storepoints, new Comparator<Storepoint>()
{
@Override public int compare(Storepoint o1, Storepoint o2)
{
r... | [
"private",
"Storepoint",
"getCurrentStorepoint",
"(",
"Project",
"phoenixProject",
")",
"{",
"List",
"<",
"Storepoint",
">",
"storepoints",
"=",
"phoenixProject",
".",
"getStorepoints",
"(",
")",
".",
"getStorepoint",
"(",
")",
";",
"Collections",
".",
"sort",
"... | Retrieve the most recent storepoint.
@param phoenixProject project data
@return Storepoint instance | [
"Retrieve",
"the",
"most",
"recent",
"storepoint",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L713-L724 |
156,964 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/TableReader.java | TableReader.read | public TableReader read() throws IOException
{
int tableHeader = m_stream.readInt();
if (tableHeader != 0x39AF547A)
{
throw new IllegalArgumentException("Unexpected file format");
}
int recordCount = m_stream.readInt();
for (int loop = 0; loop < recordCount; loop++)
... | java | public TableReader read() throws IOException
{
int tableHeader = m_stream.readInt();
if (tableHeader != 0x39AF547A)
{
throw new IllegalArgumentException("Unexpected file format");
}
int recordCount = m_stream.readInt();
for (int loop = 0; loop < recordCount; loop++)
... | [
"public",
"TableReader",
"read",
"(",
")",
"throws",
"IOException",
"{",
"int",
"tableHeader",
"=",
"m_stream",
".",
"readInt",
"(",
")",
";",
"if",
"(",
"tableHeader",
"!=",
"0x39AF547A",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Unexpecte... | Read data from the table. Return a reference to the current
instance to allow method chaining.
@return reader instance | [
"Read",
"data",
"from",
"the",
"table",
".",
"Return",
"a",
"reference",
"to",
"the",
"current",
"instance",
"to",
"allow",
"method",
"chaining",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/TableReader.java#L63-L105 |
156,965 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/TableReader.java | TableReader.readUUID | protected void readUUID(StreamReader stream, Map<String, Object> map) throws IOException
{
int unknown0Size = stream.getMajorVersion() > 5 ? 8 : 16;
map.put("UNKNOWN0", stream.readBytes(unknown0Size));
map.put("UUID", stream.readUUID());
} | java | protected void readUUID(StreamReader stream, Map<String, Object> map) throws IOException
{
int unknown0Size = stream.getMajorVersion() > 5 ? 8 : 16;
map.put("UNKNOWN0", stream.readBytes(unknown0Size));
map.put("UUID", stream.readUUID());
} | [
"protected",
"void",
"readUUID",
"(",
"StreamReader",
"stream",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"throws",
"IOException",
"{",
"int",
"unknown0Size",
"=",
"stream",
".",
"getMajorVersion",
"(",
")",
">",
"5",
"?",
"8",
":",
"16"... | Read the optional row header and UUID.
@param stream input stream
@param map row map | [
"Read",
"the",
"optional",
"row",
"header",
"and",
"UUID",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/TableReader.java#L124-L129 |
156,966 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java | AbstractShortColumn.readShort | protected int readShort(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 16; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | java | protected int readShort(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 16; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"protected",
"int",
"readShort",
"(",
"int",
"offset",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"int",
"result",
"=",
"0",
";",
"int",
"i",
"=",
"offset",
"+",
"m_offset",
";",
"for",
"(",
"int",
"shiftBy",
"=",
"0",
";",
"shiftBy",
"<",
"16",
";... | Read a two byte integer from the data.
@param offset current offset into data block
@param data data block
@return int value | [
"Read",
"a",
"two",
"byte",
"integer",
"from",
"the",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java#L49-L59 |
156,967 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.loadObject | public void loadObject(Object object, Set<String> excludedMethods)
{
m_model.setTableModel(createTableModel(object, excludedMethods));
} | java | public void loadObject(Object object, Set<String> excludedMethods)
{
m_model.setTableModel(createTableModel(object, excludedMethods));
} | [
"public",
"void",
"loadObject",
"(",
"Object",
"object",
",",
"Set",
"<",
"String",
">",
"excludedMethods",
")",
"{",
"m_model",
".",
"setTableModel",
"(",
"createTableModel",
"(",
"object",
",",
"excludedMethods",
")",
")",
";",
"}"
] | Populate the model with the object's properties.
@param object object whose properties we're displaying
@param excludedMethods method names to exclude | [
"Populate",
"the",
"model",
"with",
"the",
"object",
"s",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L62-L65 |
156,968 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.createTableModel | private TableModel createTableModel(Object object, Set<String> excludedMethods)
{
List<Method> methods = new ArrayList<Method>();
for (Method method : object.getClass().getMethods())
{
if ((method.getParameterTypes().length == 0) || (method.getParameterTypes().length == 1 && method.getPara... | java | private TableModel createTableModel(Object object, Set<String> excludedMethods)
{
List<Method> methods = new ArrayList<Method>();
for (Method method : object.getClass().getMethods())
{
if ((method.getParameterTypes().length == 0) || (method.getParameterTypes().length == 1 && method.getPara... | [
"private",
"TableModel",
"createTableModel",
"(",
"Object",
"object",
",",
"Set",
"<",
"String",
">",
"excludedMethods",
")",
"{",
"List",
"<",
"Method",
">",
"methods",
"=",
"new",
"ArrayList",
"<",
"Method",
">",
"(",
")",
";",
"for",
"(",
"Method",
"m... | Create a table model from an object's properties.
@param object target object
@param excludedMethods method names to exclude
@return table model | [
"Create",
"a",
"table",
"model",
"from",
"an",
"object",
"s",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L74-L126 |
156,969 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.filterValue | private Object filterValue(Object value)
{
if (value instanceof Boolean && !((Boolean) value).booleanValue())
{
value = null;
}
if (value instanceof String && ((String) value).isEmpty())
{
value = null;
}
if (value instanceof Double && ((Double) value).doub... | java | private Object filterValue(Object value)
{
if (value instanceof Boolean && !((Boolean) value).booleanValue())
{
value = null;
}
if (value instanceof String && ((String) value).isEmpty())
{
value = null;
}
if (value instanceof Double && ((Double) value).doub... | [
"private",
"Object",
"filterValue",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"instanceof",
"Boolean",
"&&",
"!",
"(",
"(",
"Boolean",
")",
"value",
")",
".",
"booleanValue",
"(",
")",
")",
"{",
"value",
"=",
"null",
";",
"}",
"if",
"(",
... | Replace default values will null, allowing them to be ignored.
@param value value to test
@return filtered value | [
"Replace",
"default",
"values",
"will",
"null",
"allowing",
"them",
"to",
"be",
"ignored",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L134-L158 |
156,970 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.getSingleValue | private void getSingleValue(Method method, Object object, Map<String, String> map)
{
Object value;
try
{
value = filterValue(method.invoke(object));
}
catch (Exception ex)
{
value = ex.toString();
}
if (value != null)
{
map.put(getProp... | java | private void getSingleValue(Method method, Object object, Map<String, String> map)
{
Object value;
try
{
value = filterValue(method.invoke(object));
}
catch (Exception ex)
{
value = ex.toString();
}
if (value != null)
{
map.put(getProp... | [
"private",
"void",
"getSingleValue",
"(",
"Method",
"method",
",",
"Object",
"object",
",",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"Object",
"value",
";",
"try",
"{",
"value",
"=",
"filterValue",
"(",
"method",
".",
"invoke",
"(",
"... | Retrieve a single value property.
@param method method definition
@param object target object
@param map parameter values | [
"Retrieve",
"a",
"single",
"value",
"property",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L167-L183 |
156,971 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.getMultipleValues | private void getMultipleValues(Method method, Object object, Map<String, String> map)
{
try
{
int index = 1;
while (true)
{
Object value = filterValue(method.invoke(object, Integer.valueOf(index)));
if (value != null)
{
map.put... | java | private void getMultipleValues(Method method, Object object, Map<String, String> map)
{
try
{
int index = 1;
while (true)
{
Object value = filterValue(method.invoke(object, Integer.valueOf(index)));
if (value != null)
{
map.put... | [
"private",
"void",
"getMultipleValues",
"(",
"Method",
"method",
",",
"Object",
"object",
",",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"try",
"{",
"int",
"index",
"=",
"1",
";",
"while",
"(",
"true",
")",
"{",
"Object",
"value",
"=... | Retrieve multiple properties.
@param method method definition
@param object target object
@param map parameter values | [
"Retrieve",
"multiple",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L192-L211 |
156,972 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java | ObjectPropertiesController.getPropertyName | private String getPropertyName(Method method)
{
String result = method.getName();
if (result.startsWith("get"))
{
result = result.substring(3);
}
return result;
} | java | private String getPropertyName(Method method)
{
String result = method.getName();
if (result.startsWith("get"))
{
result = result.substring(3);
}
return result;
} | [
"private",
"String",
"getPropertyName",
"(",
"Method",
"method",
")",
"{",
"String",
"result",
"=",
"method",
".",
"getName",
"(",
")",
";",
"if",
"(",
"result",
".",
"startsWith",
"(",
"\"get\"",
")",
")",
"{",
"result",
"=",
"result",
".",
"substring",... | Convert a method name into a property name.
@param method target method
@return property name | [
"Convert",
"a",
"method",
"name",
"into",
"a",
"property",
"name",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L219-L227 |
156,973 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJDateFormat.java | MPXJDateFormat.setLocale | public void setLocale(Locale locale)
{
List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>();
for (SimpleDateFormat format : m_formats)
{
formats.add(new SimpleDateFormat(format.toPattern(), locale));
}
m_formats = formats.toArray(new SimpleDateFormat[formats.size... | java | public void setLocale(Locale locale)
{
List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>();
for (SimpleDateFormat format : m_formats)
{
formats.add(new SimpleDateFormat(format.toPattern(), locale));
}
m_formats = formats.toArray(new SimpleDateFormat[formats.size... | [
"public",
"void",
"setLocale",
"(",
"Locale",
"locale",
")",
"{",
"List",
"<",
"SimpleDateFormat",
">",
"formats",
"=",
"new",
"ArrayList",
"<",
"SimpleDateFormat",
">",
"(",
")",
";",
"for",
"(",
"SimpleDateFormat",
"format",
":",
"m_formats",
")",
"{",
"... | This method is called when the locale of the parent file is updated.
It resets the locale specific date attributes to the default values
for the new locale.
@param locale new locale | [
"This",
"method",
"is",
"called",
"when",
"the",
"locale",
"of",
"the",
"parent",
"file",
"is",
"updated",
".",
"It",
"resets",
"the",
"locale",
"specific",
"date",
"attributes",
"to",
"the",
"default",
"values",
"for",
"the",
"new",
"locale",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJDateFormat.java#L63-L72 |
156,974 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/DatabaseReader.java | DatabaseReader.process | public Map<String, Table> process(File directory, String prefix) throws IOException
{
String filePrefix = prefix.toUpperCase();
Map<String, Table> tables = new HashMap<String, Table>();
File[] files = directory.listFiles();
if (files != null)
{
for (File file : files)
... | java | public Map<String, Table> process(File directory, String prefix) throws IOException
{
String filePrefix = prefix.toUpperCase();
Map<String, Table> tables = new HashMap<String, Table>();
File[] files = directory.listFiles();
if (files != null)
{
for (File file : files)
... | [
"public",
"Map",
"<",
"String",
",",
"Table",
">",
"process",
"(",
"File",
"directory",
",",
"String",
"prefix",
")",
"throws",
"IOException",
"{",
"String",
"filePrefix",
"=",
"prefix",
".",
"toUpperCase",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Tabl... | Main entry point. Reads a directory containing a P3 Btrieve database files
and returns a map of table names and table content.
@param directory directory containing the database
@param prefix file name prefix used to identify files from the same database
@return Map of table names to table data | [
"Main",
"entry",
"point",
".",
"Reads",
"a",
"directory",
"containing",
"a",
"P3",
"Btrieve",
"database",
"files",
"and",
"returns",
"a",
"map",
"of",
"table",
"names",
"and",
"table",
"content",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/DatabaseReader.java#L55-L84 |
156,975 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroLogger.java | SynchroLogger.openLogFile | public static void openLogFile() throws IOException
{
if (LOG_FILE != null)
{
System.out.println("SynchroLogger Configured");
LOG = new PrintWriter(new FileWriter(LOG_FILE));
}
} | java | public static void openLogFile() throws IOException
{
if (LOG_FILE != null)
{
System.out.println("SynchroLogger Configured");
LOG = new PrintWriter(new FileWriter(LOG_FILE));
}
} | [
"public",
"static",
"void",
"openLogFile",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"LOG_FILE",
"!=",
"null",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"SynchroLogger Configured\"",
")",
";",
"LOG",
"=",
"new",
"PrintWriter",
"(",
"n... | Open the log file for writing. | [
"Open",
"the",
"log",
"file",
"for",
"writing",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L60-L67 |
156,976 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroLogger.java | SynchroLogger.log | public static void log(String label, byte[] data)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(ByteArrayHelper.hexdump(data, true));
LOG.flush();
}
} | java | public static void log(String label, byte[] data)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(ByteArrayHelper.hexdump(data, true));
LOG.flush();
}
} | [
"public",
"static",
"void",
"log",
"(",
"String",
"label",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"LOG",
"!=",
"null",
")",
"{",
"LOG",
".",
"write",
"(",
"label",
")",
";",
"LOG",
".",
"write",
"(",
"\": \"",
")",
";",
"LOG",
".",... | Log a byte array.
@param label label text
@param data byte array | [
"Log",
"a",
"byte",
"array",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L87-L96 |
156,977 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroLogger.java | SynchroLogger.log | public static void log(String label, String data)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(data);
LOG.flush();
}
} | java | public static void log(String label, String data)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(data);
LOG.flush();
}
} | [
"public",
"static",
"void",
"log",
"(",
"String",
"label",
",",
"String",
"data",
")",
"{",
"if",
"(",
"LOG",
"!=",
"null",
")",
"{",
"LOG",
".",
"write",
"(",
"label",
")",
";",
"LOG",
".",
"write",
"(",
"\": \"",
")",
";",
"LOG",
".",
"println"... | Log a string.
@param label label text
@param data string data | [
"Log",
"a",
"string",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L104-L113 |
156,978 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroLogger.java | SynchroLogger.log | public static void log(byte[] data)
{
if (LOG != null)
{
LOG.println(ByteArrayHelper.hexdump(data, true, 16, ""));
LOG.flush();
}
} | java | public static void log(byte[] data)
{
if (LOG != null)
{
LOG.println(ByteArrayHelper.hexdump(data, true, 16, ""));
LOG.flush();
}
} | [
"public",
"static",
"void",
"log",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"LOG",
"!=",
"null",
")",
"{",
"LOG",
".",
"println",
"(",
"ByteArrayHelper",
".",
"hexdump",
"(",
"data",
",",
"true",
",",
"16",
",",
"\"\"",
")",
")",
";",
... | Log a byte array as a hex dump.
@param data byte array | [
"Log",
"a",
"byte",
"array",
"as",
"a",
"hex",
"dump",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L137-L144 |
156,979 | joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroLogger.java | SynchroLogger.log | public static void log(String label, Class<?> klass, Map<String, Object> map)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(klass.getSimpleName());
for (Map.Entry<String, Object> entry : map.entrySet())
{
LOG.println(entry.ge... | java | public static void log(String label, Class<?> klass, Map<String, Object> map)
{
if (LOG != null)
{
LOG.write(label);
LOG.write(": ");
LOG.println(klass.getSimpleName());
for (Map.Entry<String, Object> entry : map.entrySet())
{
LOG.println(entry.ge... | [
"public",
"static",
"void",
"log",
"(",
"String",
"label",
",",
"Class",
"<",
"?",
">",
"klass",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"if",
"(",
"LOG",
"!=",
"null",
")",
"{",
"LOG",
".",
"write",
"(",
"label",
")",
"... | Log table contents.
@param label label text
@param klass reader class name
@param map table data | [
"Log",
"table",
"contents",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L153-L168 |
156,980 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MppBitFlag.java | MppBitFlag.setValue | public void setValue(FieldContainer container, byte[] data)
{
if (data != null)
{
container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue);
}
} | java | public void setValue(FieldContainer container, byte[] data)
{
if (data != null)
{
container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue);
}
} | [
"public",
"void",
"setValue",
"(",
"FieldContainer",
"container",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"container",
".",
"set",
"(",
"m_type",
",",
"(",
"(",
"MPPUtility",
".",
"getInt",
"(",
"data",
","... | Extracts the value of this bit flag from the supplied byte array
and sets the value in the supplied container.
@param container container
@param data byte array | [
"Extracts",
"the",
"value",
"of",
"this",
"bit",
"flag",
"from",
"the",
"supplied",
"byte",
"array",
"and",
"sets",
"the",
"value",
"in",
"the",
"supplied",
"container",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MppBitFlag.java#L37-L43 |
156,981 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/AbstractColumn.java | AbstractColumn.setFieldType | private void setFieldType(FastTrackTableType tableType)
{
switch (tableType)
{
case ACTBARS:
{
m_type = ActBarField.getInstance(m_header.getColumnType());
break;
}
case ACTIVITIES:
{
m_type = ActivityField.getInstance(m_head... | java | private void setFieldType(FastTrackTableType tableType)
{
switch (tableType)
{
case ACTBARS:
{
m_type = ActBarField.getInstance(m_header.getColumnType());
break;
}
case ACTIVITIES:
{
m_type = ActivityField.getInstance(m_head... | [
"private",
"void",
"setFieldType",
"(",
"FastTrackTableType",
"tableType",
")",
"{",
"switch",
"(",
"tableType",
")",
"{",
"case",
"ACTBARS",
":",
"{",
"m_type",
"=",
"ActBarField",
".",
"getInstance",
"(",
"m_header",
".",
"getColumnType",
"(",
")",
")",
";... | Set the enum representing the type of this column.
@param tableType type of table to which this column belongs | [
"Set",
"the",
"enum",
"representing",
"the",
"type",
"of",
"this",
"column",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/AbstractColumn.java#L107-L127 |
156,982 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.process | public void process(File file) throws Exception
{
openLogFile();
int blockIndex = 0;
int length = (int) file.length();
m_buffer = new byte[length];
FileInputStream is = new FileInputStream(file);
try
{
int bytesRead = is.read(m_buffer);
if (bytesRead != le... | java | public void process(File file) throws Exception
{
openLogFile();
int blockIndex = 0;
int length = (int) file.length();
m_buffer = new byte[length];
FileInputStream is = new FileInputStream(file);
try
{
int bytesRead = is.read(m_buffer);
if (bytesRead != le... | [
"public",
"void",
"process",
"(",
"File",
"file",
")",
"throws",
"Exception",
"{",
"openLogFile",
"(",
")",
";",
"int",
"blockIndex",
"=",
"0",
";",
"int",
"length",
"=",
"(",
"int",
")",
"file",
".",
"length",
"(",
")",
";",
"m_buffer",
"=",
"new",
... | Read a FastTrack file.
@param file FastTrack file | [
"Read",
"a",
"FastTrack",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L52-L95 |
156,983 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.getTable | public FastTrackTable getTable(FastTrackTableType type)
{
FastTrackTable result = m_tables.get(type);
if (result == null)
{
result = EMPTY_TABLE;
}
return result;
} | java | public FastTrackTable getTable(FastTrackTableType type)
{
FastTrackTable result = m_tables.get(type);
if (result == null)
{
result = EMPTY_TABLE;
}
return result;
} | [
"public",
"FastTrackTable",
"getTable",
"(",
"FastTrackTableType",
"type",
")",
"{",
"FastTrackTable",
"result",
"=",
"m_tables",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"EMPTY_TABLE",
";",
"}",
"retur... | Retrieve a table of data.
@param type table type
@return FastTrackTable instance | [
"Retrieve",
"a",
"table",
"of",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L103-L111 |
156,984 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.readBlock | private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception
{
logBlock(blockIndex, startIndex, blockLength);
if (blockLength < 128)
{
readTableBlock(startIndex, blockLength);
}
else
{
readColumnBlock(startIndex, blockLength);
}... | java | private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception
{
logBlock(blockIndex, startIndex, blockLength);
if (blockLength < 128)
{
readTableBlock(startIndex, blockLength);
}
else
{
readColumnBlock(startIndex, blockLength);
}... | [
"private",
"void",
"readBlock",
"(",
"int",
"blockIndex",
",",
"int",
"startIndex",
",",
"int",
"blockLength",
")",
"throws",
"Exception",
"{",
"logBlock",
"(",
"blockIndex",
",",
"startIndex",
",",
"blockLength",
")",
";",
"if",
"(",
"blockLength",
"<",
"12... | Read a block of data from the FastTrack file and determine if
it contains a table definition, or columns.
@param blockIndex index of the current block
@param startIndex start index of the block in the file
@param blockLength block length | [
"Read",
"a",
"block",
"of",
"data",
"from",
"the",
"FastTrack",
"file",
"and",
"determine",
"if",
"it",
"contains",
"a",
"table",
"definition",
"or",
"columns",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L141-L153 |
156,985 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.readTableBlock | private void readTableBlock(int startIndex, int blockLength)
{
for (int index = startIndex; index < (startIndex + blockLength - 11); index++)
{
if (matchPattern(TABLE_BLOCK_PATTERNS, index))
{
int offset = index + 7;
int nameLength = FastTrackUtility.getInt(m_buf... | java | private void readTableBlock(int startIndex, int blockLength)
{
for (int index = startIndex; index < (startIndex + blockLength - 11); index++)
{
if (matchPattern(TABLE_BLOCK_PATTERNS, index))
{
int offset = index + 7;
int nameLength = FastTrackUtility.getInt(m_buf... | [
"private",
"void",
"readTableBlock",
"(",
"int",
"startIndex",
",",
"int",
"blockLength",
")",
"{",
"for",
"(",
"int",
"index",
"=",
"startIndex",
";",
"index",
"<",
"(",
"startIndex",
"+",
"blockLength",
"-",
"11",
")",
";",
"index",
"++",
")",
"{",
"... | Read the name of a table and prepare to populate it with column data.
@param startIndex start of the block
@param blockLength length of the block | [
"Read",
"the",
"name",
"of",
"a",
"table",
"and",
"prepare",
"to",
"populate",
"it",
"with",
"column",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L161-L185 |
156,986 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.readColumnBlock | private void readColumnBlock(int startIndex, int blockLength) throws Exception
{
int endIndex = startIndex + blockLength;
List<Integer> blocks = new ArrayList<Integer>();
for (int index = startIndex; index < endIndex - 11; index++)
{
if (matchChildBlock(index))
{
... | java | private void readColumnBlock(int startIndex, int blockLength) throws Exception
{
int endIndex = startIndex + blockLength;
List<Integer> blocks = new ArrayList<Integer>();
for (int index = startIndex; index < endIndex - 11; index++)
{
if (matchChildBlock(index))
{
... | [
"private",
"void",
"readColumnBlock",
"(",
"int",
"startIndex",
",",
"int",
"blockLength",
")",
"throws",
"Exception",
"{",
"int",
"endIndex",
"=",
"startIndex",
"+",
"blockLength",
";",
"List",
"<",
"Integer",
">",
"blocks",
"=",
"new",
"ArrayList",
"<",
"I... | Read multiple columns from a block.
@param startIndex start of the block
@param blockLength length of the block | [
"Read",
"multiple",
"columns",
"from",
"a",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L193-L224 |
156,987 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.readColumn | private void readColumn(int startIndex, int length) throws Exception
{
if (m_currentTable != null)
{
int value = FastTrackUtility.getByte(m_buffer, startIndex);
Class<?> klass = COLUMN_MAP[value];
if (klass == null)
{
klass = UnknownColumn.class;
}... | java | private void readColumn(int startIndex, int length) throws Exception
{
if (m_currentTable != null)
{
int value = FastTrackUtility.getByte(m_buffer, startIndex);
Class<?> klass = COLUMN_MAP[value];
if (klass == null)
{
klass = UnknownColumn.class;
}... | [
"private",
"void",
"readColumn",
"(",
"int",
"startIndex",
",",
"int",
"length",
")",
"throws",
"Exception",
"{",
"if",
"(",
"m_currentTable",
"!=",
"null",
")",
"{",
"int",
"value",
"=",
"FastTrackUtility",
".",
"getByte",
"(",
"m_buffer",
",",
"startIndex"... | Read data for a single column.
@param startIndex block start
@param length block length | [
"Read",
"data",
"for",
"a",
"single",
"column",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L232-L266 |
156,988 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.matchPattern | private final boolean matchPattern(byte[][] patterns, int bufferIndex)
{
boolean match = false;
for (byte[] pattern : patterns)
{
int index = 0;
match = true;
for (byte b : pattern)
{
if (b != m_buffer[bufferIndex + index])
{
... | java | private final boolean matchPattern(byte[][] patterns, int bufferIndex)
{
boolean match = false;
for (byte[] pattern : patterns)
{
int index = 0;
match = true;
for (byte b : pattern)
{
if (b != m_buffer[bufferIndex + index])
{
... | [
"private",
"final",
"boolean",
"matchPattern",
"(",
"byte",
"[",
"]",
"[",
"]",
"patterns",
",",
"int",
"bufferIndex",
")",
"{",
"boolean",
"match",
"=",
"false",
";",
"for",
"(",
"byte",
"[",
"]",
"pattern",
":",
"patterns",
")",
"{",
"int",
"index",
... | Locate a feature in the file by match a byte pattern.
@param patterns patterns to match
@param bufferIndex start index
@return true if the bytes at the position match a pattern | [
"Locate",
"a",
"feature",
"in",
"the",
"file",
"by",
"match",
"a",
"byte",
"pattern",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L275-L297 |
156,989 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.matchChildBlock | private final boolean matchChildBlock(int bufferIndex)
{
//
// Match the pattern we see at the start of the child block
//
int index = 0;
for (byte b : CHILD_BLOCK_PATTERN)
{
if (b != m_buffer[bufferIndex + index])
{
return false;
}
... | java | private final boolean matchChildBlock(int bufferIndex)
{
//
// Match the pattern we see at the start of the child block
//
int index = 0;
for (byte b : CHILD_BLOCK_PATTERN)
{
if (b != m_buffer[bufferIndex + index])
{
return false;
}
... | [
"private",
"final",
"boolean",
"matchChildBlock",
"(",
"int",
"bufferIndex",
")",
"{",
"//",
"// Match the pattern we see at the start of the child block",
"//",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"byte",
"b",
":",
"CHILD_BLOCK_PATTERN",
")",
"{",
"if",
"(... | Locate a child block by byte pattern and validate by
checking the length of the string we are expecting
to follow the pattern.
@param bufferIndex start index
@return true if a child block starts at this point | [
"Locate",
"a",
"child",
"block",
"by",
"byte",
"pattern",
"and",
"validate",
"by",
"checking",
"the",
"length",
"of",
"the",
"string",
"we",
"are",
"expecting",
"to",
"follow",
"the",
"pattern",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L307-L338 |
156,990 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.updateDurationTimeUnit | private void updateDurationTimeUnit(FastTrackColumn column)
{
if (m_durationTimeUnit == null && isDurationColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_durationTimeUnit = FastTrackUtility.getTimeUnit(value);
... | java | private void updateDurationTimeUnit(FastTrackColumn column)
{
if (m_durationTimeUnit == null && isDurationColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_durationTimeUnit = FastTrackUtility.getTimeUnit(value);
... | [
"private",
"void",
"updateDurationTimeUnit",
"(",
"FastTrackColumn",
"column",
")",
"{",
"if",
"(",
"m_durationTimeUnit",
"==",
"null",
"&&",
"isDurationColumn",
"(",
"column",
")",
")",
"{",
"int",
"value",
"=",
"(",
"(",
"DurationColumn",
")",
"column",
")",... | Update the default time unit for durations based on data read from the file.
@param column column data | [
"Update",
"the",
"default",
"time",
"unit",
"for",
"durations",
"based",
"on",
"data",
"read",
"from",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L345-L355 |
156,991 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.updateWorkTimeUnit | private void updateWorkTimeUnit(FastTrackColumn column)
{
if (m_workTimeUnit == null && isWorkColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_workTimeUnit = FastTrackUtility.getTimeUnit(value);
}
}
} | java | private void updateWorkTimeUnit(FastTrackColumn column)
{
if (m_workTimeUnit == null && isWorkColumn(column))
{
int value = ((DurationColumn) column).getTimeUnitValue();
if (value != 1)
{
m_workTimeUnit = FastTrackUtility.getTimeUnit(value);
}
}
} | [
"private",
"void",
"updateWorkTimeUnit",
"(",
"FastTrackColumn",
"column",
")",
"{",
"if",
"(",
"m_workTimeUnit",
"==",
"null",
"&&",
"isWorkColumn",
"(",
"column",
")",
")",
"{",
"int",
"value",
"=",
"(",
"(",
"DurationColumn",
")",
"column",
")",
".",
"g... | Update the default time unit for work based on data read from the file.
@param column column data | [
"Update",
"the",
"default",
"time",
"unit",
"for",
"work",
"based",
"on",
"data",
"read",
"from",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L362-L372 |
156,992 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.logBlock | private void logBlock(int blockIndex, int startIndex, int blockLength)
{
if (m_log != null)
{
m_log.println("Block Index: " + blockIndex);
m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")");
m_log.println();
m_log.println(FastTrackU... | java | private void logBlock(int blockIndex, int startIndex, int blockLength)
{
if (m_log != null)
{
m_log.println("Block Index: " + blockIndex);
m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")");
m_log.println();
m_log.println(FastTrackU... | [
"private",
"void",
"logBlock",
"(",
"int",
"blockIndex",
",",
"int",
"startIndex",
",",
"int",
"blockLength",
")",
"{",
"if",
"(",
"m_log",
"!=",
"null",
")",
"{",
"m_log",
".",
"println",
"(",
"\"Block Index: \"",
"+",
"blockIndex",
")",
";",
"m_log",
"... | Log block data.
@param blockIndex current block index
@param startIndex start index
@param blockLength length | [
"Log",
"block",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L436-L446 |
156,993 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.logColumnData | private void logColumnData(int startIndex, int length)
{
if (m_log != null)
{
m_log.println();
m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, length, true, 16, ""));
m_log.println();
m_log.flush();
}
} | java | private void logColumnData(int startIndex, int length)
{
if (m_log != null)
{
m_log.println();
m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, length, true, 16, ""));
m_log.println();
m_log.flush();
}
} | [
"private",
"void",
"logColumnData",
"(",
"int",
"startIndex",
",",
"int",
"length",
")",
"{",
"if",
"(",
"m_log",
"!=",
"null",
")",
"{",
"m_log",
".",
"println",
"(",
")",
";",
"m_log",
".",
"println",
"(",
"FastTrackUtility",
".",
"hexdump",
"(",
"m_... | Log the data for a single column.
@param startIndex offset into buffer
@param length length | [
"Log",
"the",
"data",
"for",
"a",
"single",
"column",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L454-L463 |
156,994 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.logUnexpectedStructure | private void logUnexpectedStructure()
{
if (m_log != null)
{
m_log.println("ABORTED COLUMN - unexpected structure: " + m_currentColumn.getClass().getSimpleName() + " " + m_currentColumn.getName());
}
} | java | private void logUnexpectedStructure()
{
if (m_log != null)
{
m_log.println("ABORTED COLUMN - unexpected structure: " + m_currentColumn.getClass().getSimpleName() + " " + m_currentColumn.getName());
}
} | [
"private",
"void",
"logUnexpectedStructure",
"(",
")",
"{",
"if",
"(",
"m_log",
"!=",
"null",
")",
"{",
"m_log",
".",
"println",
"(",
"\"ABORTED COLUMN - unexpected structure: \"",
"+",
"m_currentColumn",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")"... | Log unexpected column structure. | [
"Log",
"unexpected",
"column",
"structure",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L468-L474 |
156,995 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java | FastTrackData.logColumn | private void logColumn(FastTrackColumn column)
{
if (m_log != null)
{
m_log.println("TABLE: " + m_currentTable.getType());
m_log.println(column.toString());
m_log.flush();
}
} | java | private void logColumn(FastTrackColumn column)
{
if (m_log != null)
{
m_log.println("TABLE: " + m_currentTable.getType());
m_log.println(column.toString());
m_log.flush();
}
} | [
"private",
"void",
"logColumn",
"(",
"FastTrackColumn",
"column",
")",
"{",
"if",
"(",
"m_log",
"!=",
"null",
")",
"{",
"m_log",
".",
"println",
"(",
"\"TABLE: \"",
"+",
"m_currentTable",
".",
"getType",
"(",
")",
")",
";",
"m_log",
".",
"println",
"(",
... | Log column data.
@param column column data | [
"Log",
"column",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L481-L489 |
156,996 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXReader.java | MPXReader.populateCurrencySettings | private void populateCurrencySettings(Record record, ProjectProperties properties)
{
properties.setCurrencySymbol(record.getString(0));
properties.setSymbolPosition(record.getCurrencySymbolPosition(1));
properties.setCurrencyDigits(record.getInteger(2));
Character c = record.getCharacter(3);... | java | private void populateCurrencySettings(Record record, ProjectProperties properties)
{
properties.setCurrencySymbol(record.getString(0));
properties.setSymbolPosition(record.getCurrencySymbolPosition(1));
properties.setCurrencyDigits(record.getInteger(2));
Character c = record.getCharacter(3);... | [
"private",
"void",
"populateCurrencySettings",
"(",
"Record",
"record",
",",
"ProjectProperties",
"properties",
")",
"{",
"properties",
".",
"setCurrencySymbol",
"(",
"record",
".",
"getString",
"(",
"0",
")",
")",
";",
"properties",
".",
"setSymbolPosition",
"(",... | Populates currency settings.
@param record MPX record
@param properties project properties | [
"Populates",
"currency",
"settings",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L483-L500 |
156,997 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXReader.java | MPXReader.populateDefaultSettings | private void populateDefaultSettings(Record record, ProjectProperties properties) throws MPXJException
{
properties.setDefaultDurationUnits(record.getTimeUnit(0));
properties.setDefaultDurationIsFixed(record.getNumericBoolean(1));
properties.setDefaultWorkUnits(record.getTimeUnit(2));
propert... | java | private void populateDefaultSettings(Record record, ProjectProperties properties) throws MPXJException
{
properties.setDefaultDurationUnits(record.getTimeUnit(0));
properties.setDefaultDurationIsFixed(record.getNumericBoolean(1));
properties.setDefaultWorkUnits(record.getTimeUnit(2));
propert... | [
"private",
"void",
"populateDefaultSettings",
"(",
"Record",
"record",
",",
"ProjectProperties",
"properties",
")",
"throws",
"MPXJException",
"{",
"properties",
".",
"setDefaultDurationUnits",
"(",
"record",
".",
"getTimeUnit",
"(",
"0",
")",
")",
";",
"properties"... | Populates default settings.
@param record MPX record
@param properties project properties
@throws MPXJException | [
"Populates",
"default",
"settings",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L509-L520 |
156,998 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXReader.java | MPXReader.populateDateTimeSettings | private void populateDateTimeSettings(Record record, ProjectProperties properties)
{
properties.setDateOrder(record.getDateOrder(0));
properties.setTimeFormat(record.getTimeFormat(1));
Date time = getTimeFromInteger(record.getInteger(2));
if (time != null)
{
properties.setDefa... | java | private void populateDateTimeSettings(Record record, ProjectProperties properties)
{
properties.setDateOrder(record.getDateOrder(0));
properties.setTimeFormat(record.getTimeFormat(1));
Date time = getTimeFromInteger(record.getInteger(2));
if (time != null)
{
properties.setDefa... | [
"private",
"void",
"populateDateTimeSettings",
"(",
"Record",
"record",
",",
"ProjectProperties",
"properties",
")",
"{",
"properties",
".",
"setDateOrder",
"(",
"record",
".",
"getDateOrder",
"(",
"0",
")",
")",
";",
"properties",
".",
"setTimeFormat",
"(",
"re... | Populates date time settings.
@param record MPX record
@param properties project properties | [
"Populates",
"date",
"time",
"settings",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L528-L555 |
156,999 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXReader.java | MPXReader.getTimeFromInteger | private Date getTimeFromInteger(Integer time)
{
Date result = null;
if (time != null)
{
int minutes = time.intValue();
int hours = minutes / 60;
minutes -= (hours * 60);
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.MILLISECOND, 0);
... | java | private Date getTimeFromInteger(Integer time)
{
Date result = null;
if (time != null)
{
int minutes = time.intValue();
int hours = minutes / 60;
minutes -= (hours * 60);
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.MILLISECOND, 0);
... | [
"private",
"Date",
"getTimeFromInteger",
"(",
"Integer",
"time",
")",
"{",
"Date",
"result",
"=",
"null",
";",
"if",
"(",
"time",
"!=",
"null",
")",
"{",
"int",
"minutes",
"=",
"time",
".",
"intValue",
"(",
")",
";",
"int",
"hours",
"=",
"minutes",
"... | Converts a time represented as an integer to a Date instance.
@param time integer time
@return Date instance | [
"Converts",
"a",
"time",
"represented",
"as",
"an",
"integer",
"to",
"a",
"Date",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L563-L583 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.