repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentTimephasedData | private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger a... | java | private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger a... | [
"private",
"void",
"writeAssignmentTimephasedData",
"(",
"ResourceAssignment",
"mpx",
",",
"Project",
".",
"Assignments",
".",
"Assignment",
"xml",
")",
"{",
"if",
"(",
"m_writeTimphasedData",
"&&",
"mpx",
".",
"getHasTimephasedData",
"(",
")",
")",
"{",
"List",
... | Writes the timephased data for a resource assignment.
@param mpx MPXJ assignment
@param xml MSDPI assignment | [
"Writes",
"the",
"timephased",
"data",
"for",
"a",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1704-L1750 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentTimephasedData | private void writeAssignmentTimephasedData(BigInteger assignmentID, List<TimephasedDataType> list, List<TimephasedWork> data, int type)
{
for (TimephasedWork mpx : data)
{
TimephasedDataType xml = m_factory.createTimephasedDataType();
list.add(xml);
xml.setStart(mpx.getStart()... | java | private void writeAssignmentTimephasedData(BigInteger assignmentID, List<TimephasedDataType> list, List<TimephasedWork> data, int type)
{
for (TimephasedWork mpx : data)
{
TimephasedDataType xml = m_factory.createTimephasedDataType();
list.add(xml);
xml.setStart(mpx.getStart()... | [
"private",
"void",
"writeAssignmentTimephasedData",
"(",
"BigInteger",
"assignmentID",
",",
"List",
"<",
"TimephasedDataType",
">",
"list",
",",
"List",
"<",
"TimephasedWork",
">",
"data",
",",
"int",
"type",
")",
"{",
"for",
"(",
"TimephasedWork",
"mpx",
":",
... | Writes a list of timephased data to the MSPDI file.
@param assignmentID current assignment ID
@param list output list of timephased data items
@param data input list of timephased data
@param type list type (planned or completed) | [
"Writes",
"a",
"list",
"of",
"timephased",
"data",
"to",
"the",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1894-L1908 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllAssignmentExtendedAttributes | private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | java | private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | [
"private",
"List",
"<",
"AssignmentField",
">",
"getAllAssignmentExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"AssignmentField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"AssignmentField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
... | Retrieve list of assignment extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"assignment",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1915-L1935 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllTaskExtendedAttributes | private List<TaskField> getAllTaskExtendedAttributes()
{
ArrayList<TaskField> result = new ArrayList<TaskField>();
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_FINISH));
... | java | private List<TaskField> getAllTaskExtendedAttributes()
{
ArrayList<TaskField> result = new ArrayList<TaskField>();
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_FINISH));
... | [
"private",
"List",
"<",
"TaskField",
">",
"getAllTaskExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"TaskField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"TaskField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"("... | Retrieve list of task extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"task",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1942-L1961 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllResourceExtendedAttributes | private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceF... | java | private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceF... | [
"private",
"List",
"<",
"ResourceField",
">",
"getAllResourceExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"ResourceField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"ResourceField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
".",
... | Retrieve list of resource extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"resource",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1968-L1987 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.processUDF | private void processUDF(UDFTypeType udf)
{
FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
if (fieldType != null)
{
UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
String name = udf.getTitle();
FieldType field... | java | private void processUDF(UDFTypeType udf)
{
FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
if (fieldType != null)
{
UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
String name = udf.getTitle();
FieldType field... | [
"private",
"void",
"processUDF",
"(",
"UDFTypeType",
"udf",
")",
"{",
"FieldTypeClass",
"fieldType",
"=",
"FIELD_TYPE_MAP",
".",
"get",
"(",
"udf",
".",
"getSubjectArea",
"(",
")",
")",
";",
"if",
"(",
"fieldType",
"!=",
"null",
")",
"{",
"UserFieldDataType"... | Process an individual UDF.
@param udf UDF definition | [
"Process",
"an",
"individual",
"UDF",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L251-L264 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.addUserDefinedField | private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
FieldType field = null;
try
{
switch (fieldType)
{
case TASK:
{
do
{
field = m_taskUdfCounters.... | java | private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
FieldType field = null;
try
{
switch (fieldType)
{
case TASK:
{
do
{
field = m_taskUdfCounters.... | [
"private",
"FieldType",
"addUserDefinedField",
"(",
"FieldTypeClass",
"fieldType",
",",
"UserFieldDataType",
"dataType",
",",
"String",
"name",
")",
"{",
"FieldType",
"field",
"=",
"null",
";",
"try",
"{",
"switch",
"(",
"fieldType",
")",
"{",
"case",
"TASK",
... | Map the Primavera UDF to a custom field.
@param fieldType parent object type
@param dataType UDF data type
@param name UDF name
@return FieldType instance | [
"Map",
"the",
"Primavera",
"UDF",
"to",
"a",
"custom",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L274-L328 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.zeroIsNull | private Double zeroIsNull(Double value)
{
if (value != null && value.doubleValue() == 0)
{
value = null;
}
return value;
} | java | private Double zeroIsNull(Double value)
{
if (value != null && value.doubleValue() == 0)
{
value = null;
}
return value;
} | [
"private",
"Double",
"zeroIsNull",
"(",
"Double",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
"&&",
"value",
".",
"doubleValue",
"(",
")",
"==",
"0",
")",
"{",
"value",
"=",
"null",
";",
"}",
"return",
"value",
";",
"}"
] | Render a zero Double as null.
@param value double value
@return null if the double value is zero | [
"Render",
"a",
"zero",
"Double",
"as",
"null",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L995-L1002 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.getDuration | private Duration getDuration(Double duration)
{
Duration result = null;
if (duration != null)
{
result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS);
}
return result;
} | java | private Duration getDuration(Double duration)
{
Duration result = null;
if (duration != null)
{
result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS);
}
return result;
} | [
"private",
"Duration",
"getDuration",
"(",
"Double",
"duration",
")",
"{",
"Duration",
"result",
"=",
"null",
";",
"if",
"(",
"duration",
"!=",
"null",
")",
"{",
"result",
"=",
"Duration",
".",
"getInstance",
"(",
"NumberHelper",
".",
"getDouble",
"(",
"du... | Extracts a duration from a JAXBElement instance.
@param duration duration expressed in hours
@return duration instance | [
"Extracts",
"a",
"duration",
"from",
"a",
"JAXBElement",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1010-L1020 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.readUDFTypes | private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs)
{
for (UDFAssignmentType udf : udfs)
{
FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId()));
if (fieldType != null)
{
mpxj.set(fieldType, getUdfValue(udf));
... | java | private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs)
{
for (UDFAssignmentType udf : udfs)
{
FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId()));
if (fieldType != null)
{
mpxj.set(fieldType, getUdfValue(udf));
... | [
"private",
"void",
"readUDFTypes",
"(",
"FieldContainer",
"mpxj",
",",
"List",
"<",
"UDFAssignmentType",
">",
"udfs",
")",
"{",
"for",
"(",
"UDFAssignmentType",
"udf",
":",
"udfs",
")",
"{",
"FieldType",
"fieldType",
"=",
"m_fieldTypeMap",
".",
"get",
"(",
"... | Process UDFs for a specific object.
@param mpxj field container
@param udfs UDF values | [
"Process",
"UDFs",
"for",
"a",
"specific",
"object",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1052-L1062 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.getUdfValue | private Object getUdfValue(UDFAssignmentType udf)
{
if (udf.getCostValue() != null)
{
return udf.getCostValue();
}
if (udf.getDoubleValue() != null)
{
return udf.getDoubleValue();
}
if (udf.getFinishDateValue() != null)
{
return... | java | private Object getUdfValue(UDFAssignmentType udf)
{
if (udf.getCostValue() != null)
{
return udf.getCostValue();
}
if (udf.getDoubleValue() != null)
{
return udf.getDoubleValue();
}
if (udf.getFinishDateValue() != null)
{
return... | [
"private",
"Object",
"getUdfValue",
"(",
"UDFAssignmentType",
"udf",
")",
"{",
"if",
"(",
"udf",
".",
"getCostValue",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"udf",
".",
"getCostValue",
"(",
")",
";",
"}",
"if",
"(",
"udf",
".",
"getDoubleValue",
"... | Retrieve the value of a UDF.
@param udf UDF value holder
@return UDF value | [
"Retrieve",
"the",
"value",
"of",
"a",
"UDF",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1070-L1108 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.mapTaskID | private Integer mapTaskID(Integer id)
{
Integer mappedID = m_clashMap.get(id);
if (mappedID == null)
{
mappedID = id;
}
return (mappedID);
} | java | private Integer mapTaskID(Integer id)
{
Integer mappedID = m_clashMap.get(id);
if (mappedID == null)
{
mappedID = id;
}
return (mappedID);
} | [
"private",
"Integer",
"mapTaskID",
"(",
"Integer",
"id",
")",
"{",
"Integer",
"mappedID",
"=",
"m_clashMap",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"mappedID",
"==",
"null",
")",
"{",
"mappedID",
"=",
"id",
";",
"}",
"return",
"(",
"mappedID",
"... | Deals with the case where we have had to map a task ID to a new value.
@param id task ID from database
@return mapped task ID | [
"Deals",
"with",
"the",
"case",
"where",
"we",
"have",
"had",
"to",
"map",
"a",
"task",
"ID",
"to",
"a",
"new",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1165-L1173 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/GraphicalIndicator.java | GraphicalIndicator.evaluate | public int evaluate(FieldContainer container)
{
//
// First step - determine the list of criteria we are should use
//
List<GraphicalIndicatorCriteria> criteria;
if (container instanceof Task)
{
Task task = (Task) container;
if (NumberHelper.getInt(task.getUnique... | java | public int evaluate(FieldContainer container)
{
//
// First step - determine the list of criteria we are should use
//
List<GraphicalIndicatorCriteria> criteria;
if (container instanceof Task)
{
Task task = (Task) container;
if (NumberHelper.getInt(task.getUnique... | [
"public",
"int",
"evaluate",
"(",
"FieldContainer",
"container",
")",
"{",
"//",
"// First step - determine the list of criteria we are should use",
"//",
"List",
"<",
"GraphicalIndicatorCriteria",
">",
"criteria",
";",
"if",
"(",
"container",
"instanceof",
"Task",
")",
... | This method evaluates a if a graphical indicator should
be displayed, given a set of Task or Resource data. The
method will return -1 if no indicator should be displayed.
@param container Task or Resource instance
@return indicator index | [
"This",
"method",
"evaluates",
"a",
"if",
"a",
"graphical",
"indicator",
"should",
"be",
"displayed",
"given",
"a",
"set",
"of",
"Task",
"or",
"Resource",
"data",
".",
"The",
"method",
"will",
"return",
"-",
"1",
"if",
"no",
"indicator",
"should",
"be",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GraphicalIndicator.java#L48-L124 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeFileCreationRecord | private void writeFileCreationRecord() throws IOException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_buffer.setLength(0);
m_buffer.append("MPX");
m_buffer.append(m_delimiter);
m_buffer.append(properties.getMpxProgramName());
m_buffer.append(m_delimit... | java | private void writeFileCreationRecord() throws IOException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_buffer.setLength(0);
m_buffer.append("MPX");
m_buffer.append(m_delimiter);
m_buffer.append(properties.getMpxProgramName());
m_buffer.append(m_delimit... | [
"private",
"void",
"writeFileCreationRecord",
"(",
")",
"throws",
"IOException",
"{",
"ProjectProperties",
"properties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
... | Write file creation record.
@throws IOException | [
"Write",
"file",
"creation",
"record",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L144-L158 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeCalendar | private void writeCalendar(ProjectCalendar record) throws IOException
{
//
// Test used to ensure that we don't write the default calendar used for the "Unassigned" resource
//
if (record.getParent() == null || record.getResource() != null)
{
m_buffer.setLength(0);
if... | java | private void writeCalendar(ProjectCalendar record) throws IOException
{
//
// Test used to ensure that we don't write the default calendar used for the "Unassigned" resource
//
if (record.getParent() == null || record.getResource() != null)
{
m_buffer.setLength(0);
if... | [
"private",
"void",
"writeCalendar",
"(",
"ProjectCalendar",
"record",
")",
"throws",
"IOException",
"{",
"//",
"// Test used to ensure that we don't write the default calendar used for the \"Unassigned\" resource",
"//",
"if",
"(",
"record",
".",
"getParent",
"(",
")",
"==",
... | Write a calendar.
@param record calendar instance
@throws IOException | [
"Write",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L322-L385 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeCalendarHours | private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException
{
m_buffer.setLength(0);
int recordNumber;
if (!parentCalendar.isDerived())
{
recordNumber = MPXConstants.BASE_CALENDAR_HOURS_RECORD_NUMBER;
}
else
{
... | java | private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException
{
m_buffer.setLength(0);
int recordNumber;
if (!parentCalendar.isDerived())
{
recordNumber = MPXConstants.BASE_CALENDAR_HOURS_RECORD_NUMBER;
}
else
{
... | [
"private",
"void",
"writeCalendarHours",
"(",
"ProjectCalendar",
"parentCalendar",
",",
"ProjectCalendarHours",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"int",
"recordNumber",
";",
"if",
"(",
"!",
"parentCalend... | Write calendar hours.
@param parentCalendar parent calendar instance
@param record calendar hours instance
@throws IOException | [
"Write",
"calendar",
"hours",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L394-L446 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResource | private void writeResource(Resource record) throws IOException
{
m_buffer.setLength(0);
//
// Write the resource record
//
int[] fields = m_resourceModel.getModel();
m_buffer.append(MPXConstants.RESOURCE_RECORD_NUMBER);
for (int loop = 0; loop < fields.length; loop++)
... | java | private void writeResource(Resource record) throws IOException
{
m_buffer.setLength(0);
//
// Write the resource record
//
int[] fields = m_resourceModel.getModel();
m_buffer.append(MPXConstants.RESOURCE_RECORD_NUMBER);
for (int loop = 0; loop < fields.length; loop++)
... | [
"private",
"void",
"writeResource",
"(",
"Resource",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"//",
"// Write the resource record",
"//",
"int",
"[",
"]",
"fields",
"=",
"m_resourceModel",
".",
"getModel",
... | Write a resource.
@param record resource instance
@throws IOException | [
"Write",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L497-L545 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeNotes | private void writeNotes(int recordNumber, String text) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(recordNumber);
m_buffer.append(m_delimiter);
if (text != null)
{
String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING);
boolean quote... | java | private void writeNotes(int recordNumber, String text) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(recordNumber);
m_buffer.append(m_delimiter);
if (text != null)
{
String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING);
boolean quote... | [
"private",
"void",
"writeNotes",
"(",
"int",
"recordNumber",
",",
"String",
"text",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"recordNumber",
")",
";",
"m_buffer",
".",
"append",
"(... | Write notes.
@param recordNumber record number
@param text note text
@throws IOException | [
"Write",
"notes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L554-L602 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResourceAssignment | private void writeResourceAssignment(ResourceAssignment record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(formatResource(record.getResource()));
m_buffer.append(m_delimiter)... | java | private void writeResourceAssignment(ResourceAssignment record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(formatResource(record.getResource()));
m_buffer.append(m_delimiter)... | [
"private",
"void",
"writeResourceAssignment",
"(",
"ResourceAssignment",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"MPXConstants",
".",
"RESOURCE_ASSIGNMENT_RECORD_NUMBER",
")",
";"... | Write resource assignment.
@param record resource assignment instance
@throws IOException | [
"Write",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L753-L796 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResourceAssignmentWorkgroupFields | private void writeResourceAssignmentWorkgroupFields(ResourceAssignmentWorkgroupFields record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_WORKGROUP_FIELDS_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(format(record.getMessageUn... | java | private void writeResourceAssignmentWorkgroupFields(ResourceAssignmentWorkgroupFields record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_WORKGROUP_FIELDS_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(format(record.getMessageUn... | [
"private",
"void",
"writeResourceAssignmentWorkgroupFields",
"(",
"ResourceAssignmentWorkgroupFields",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"MPXConstants",
".",
"RESOURCE_ASSIGNMEN... | Write resource assignment workgroup.
@param record resource assignment workgroup instance
@throws IOException | [
"Write",
"resource",
"assignment",
"workgroup",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L804-L826 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeTasks | private void writeTasks(List<Task> tasks) throws IOException
{
for (Task task : tasks)
{
writeTask(task);
writeTasks(task.getChildTasks());
}
} | java | private void writeTasks(List<Task> tasks) throws IOException
{
for (Task task : tasks)
{
writeTask(task);
writeTasks(task.getChildTasks());
}
} | [
"private",
"void",
"writeTasks",
"(",
"List",
"<",
"Task",
">",
"tasks",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Task",
"task",
":",
"tasks",
")",
"{",
"writeTask",
"(",
"task",
")",
";",
"writeTasks",
"(",
"task",
".",
"getChildTasks",
"(",
")... | Recursively write tasks.
@param tasks list of tasks
@throws IOException | [
"Recursively",
"write",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L834-L841 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.getIntegerTimeInMinutes | private Integer getIntegerTimeInMinutes(Date date)
{
Integer result = null;
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
time += cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
re... | java | private Integer getIntegerTimeInMinutes(Date date)
{
Integer result = null;
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
time += cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
re... | [
"private",
"Integer",
"getIntegerTimeInMinutes",
"(",
"Date",
"date",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"date",
")",
";",
"int",
"tim... | This internal method is used to convert from a Date instance to an
integer representing the number of minutes past midnight.
@param date date instance
@return minutes past midnight as an integer | [
"This",
"internal",
"method",
"is",
"used",
"to",
"convert",
"from",
"a",
"Date",
"instance",
"to",
"an",
"integer",
"representing",
"the",
"number",
"of",
"minutes",
"past",
"midnight",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L850-L862 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.escapeQuotes | private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
... | java | private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
... | [
"private",
"String",
"escapeQuotes",
"(",
"String",
"value",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"length",
"=",
"value",
".",
"length",
"(",
")",
";",
"char",
"c",
";",
"sb",
".",
"append",
"(",
"'",
"'... | This method is called when double quotes are found as part of
a value. The quotes are escaped by adding a second quote character
and the entire value is quoted.
@param value text containing quote characters
@return escaped and quoted text | [
"This",
"method",
"is",
"called",
"when",
"double",
"quotes",
"are",
"found",
"as",
"part",
"of",
"a",
"value",
".",
"The",
"quotes",
"are",
"escaped",
"by",
"adding",
"a",
"second",
"quote",
"character",
"and",
"the",
"entire",
"value",
"is",
"quoted",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L872-L892 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.stripLineBreaks | private String stripLineBreaks(String text, String replacement)
{
if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
{
StringBuilder sb = new StringBuilder(text);
int index;
while ((index = sb.indexOf("\r\n")) != -1)
{
sb.replace(index, index + 2, ... | java | private String stripLineBreaks(String text, String replacement)
{
if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
{
StringBuilder sb = new StringBuilder(text);
int index;
while ((index = sb.indexOf("\r\n")) != -1)
{
sb.replace(index, index + 2, ... | [
"private",
"String",
"stripLineBreaks",
"(",
"String",
"text",
",",
"String",
"replacement",
")",
"{",
"if",
"(",
"text",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
"||",
"text",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
")",
"... | This method removes line breaks from a piece of text, and replaces
them with the supplied text.
@param text source text
@param replacement line break replacement text
@return text with line breaks removed. | [
"This",
"method",
"removes",
"line",
"breaks",
"from",
"a",
"piece",
"of",
"text",
"and",
"replaces",
"them",
"with",
"the",
"supplied",
"text",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L902-L934 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.format | private String format(Object o)
{
String result;
if (o == null)
{
result = "";
}
else
{
if (o instanceof Boolean == true)
{
result = LocaleData.getString(m_locale, (((Boolean) o).booleanValue() == true ? LocaleData.YES : LocaleData.NO));
... | java | private String format(Object o)
{
String result;
if (o == null)
{
result = "";
}
else
{
if (o instanceof Boolean == true)
{
result = LocaleData.getString(m_locale, (((Boolean) o).booleanValue() == true ? LocaleData.YES : LocaleData.NO));
... | [
"private",
"String",
"format",
"(",
"Object",
"o",
")",
"{",
"String",
"result",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"result",
"=",
"\"\"",
";",
"}",
"else",
"{",
"if",
"(",
"o",
"instanceof",
"Boolean",
"==",
"true",
")",
"{",
"result",
... | This method returns the string representation of an object. In most
cases this will simply involve calling the normal toString method
on the object, but a couple of exceptions are handled here.
@param o the object to formatted
@return formatted string representing input Object | [
"This",
"method",
"returns",
"the",
"string",
"representation",
"of",
"an",
"object",
".",
"In",
"most",
"cases",
"this",
"will",
"simply",
"involve",
"calling",
"the",
"normal",
"toString",
"method",
"on",
"the",
"object",
"but",
"a",
"couple",
"of",
"excep... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L944-L1002 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.stripTrailingDelimiters | private void stripTrailingDelimiters(StringBuilder buffer)
{
int index = buffer.length() - 1;
while (index > 0 && buffer.charAt(index) == m_delimiter)
{
--index;
}
buffer.setLength(index + 1);
} | java | private void stripTrailingDelimiters(StringBuilder buffer)
{
int index = buffer.length() - 1;
while (index > 0 && buffer.charAt(index) == m_delimiter)
{
--index;
}
buffer.setLength(index + 1);
} | [
"private",
"void",
"stripTrailingDelimiters",
"(",
"StringBuilder",
"buffer",
")",
"{",
"int",
"index",
"=",
"buffer",
".",
"length",
"(",
")",
"-",
"1",
";",
"while",
"(",
"index",
">",
"0",
"&&",
"buffer",
".",
"charAt",
"(",
"index",
")",
"==",
"m_d... | This method removes trailing delimiter characters.
@param buffer input sring buffer | [
"This",
"method",
"removes",
"trailing",
"delimiter",
"characters",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1009-L1019 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTime | private String formatTime(Date value)
{
return (value == null ? null : m_formats.getTimeFormat().format(value));
} | java | private String formatTime(Date value)
{
return (value == null ? null : m_formats.getTimeFormat().format(value));
} | [
"private",
"String",
"formatTime",
"(",
"Date",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getTimeFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
";",
"}"
] | This method is called to format a time value.
@param value time value
@return formatted time value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"time",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1027-L1030 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatCurrency | private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | java | private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | [
"private",
"String",
"formatCurrency",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getCurrencyFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
";",
"}"
] | This method is called to format a currency value.
@param value numeric value
@return currency value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"currency",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1038-L1041 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatUnits | private String formatUnits(Number value)
{
return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100));
} | java | private String formatUnits(Number value)
{
return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100));
} | [
"private",
"String",
"formatUnits",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getUnitsDecimalFormat",
"(",
")",
".",
"format",
"(",
"value",
".",
"doubleValue",
"(",
")",
"/",
"100",
")",... | This method is called to format a units value.
@param value numeric value
@return currency value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"units",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1049-L1052 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatDateTimeNull | private String formatDateTimeNull(Date value)
{
return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
} | java | private String formatDateTimeNull(Date value)
{
return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
} | [
"private",
"String",
"formatDateTimeNull",
"(",
"Date",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"m_formats",
".",
"getNullText",
"(",
")",
":",
"m_formats",
".",
"getDateTimeFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
... | This method is called to format a date. It will return the null text
if a null value is supplied.
@param value date value
@return formatted date value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"date",
".",
"It",
"will",
"return",
"the",
"null",
"text",
"if",
"a",
"null",
"value",
"is",
"supplied",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1077-L1080 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatPercentage | private String formatPercentage(Number value)
{
return (value == null ? null : m_formats.getPercentageDecimalFormat().format(value) + "%");
} | java | private String formatPercentage(Number value)
{
return (value == null ? null : m_formats.getPercentageDecimalFormat().format(value) + "%");
} | [
"private",
"String",
"formatPercentage",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getPercentageDecimalFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
"+",
"\"%\"",
")",
";",
"}"
] | This method is called to format a percentage value.
@param value numeric value
@return percentage value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"percentage",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1099-L1102 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatAccrueType | private String formatAccrueType(AccrueType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.ACCRUE_TYPES)[type.getValue() - 1]);
} | java | private String formatAccrueType(AccrueType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.ACCRUE_TYPES)[type.getValue() - 1]);
} | [
"private",
"String",
"formatAccrueType",
"(",
"AccrueType",
"type",
")",
"{",
"return",
"(",
"type",
"==",
"null",
"?",
"null",
":",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
",",
"LocaleData",
".",
"ACCRUE_TYPES",
")",
"[",
"type",
".",
"getValu... | This method is called to format an accrue type value.
@param type accrue type
@return formatted accrue type | [
"This",
"method",
"is",
"called",
"to",
"format",
"an",
"accrue",
"type",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1110-L1113 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatConstraintType | private String formatConstraintType(ConstraintType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.CONSTRAINT_TYPES)[type.getValue()]);
} | java | private String formatConstraintType(ConstraintType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.CONSTRAINT_TYPES)[type.getValue()]);
} | [
"private",
"String",
"formatConstraintType",
"(",
"ConstraintType",
"type",
")",
"{",
"return",
"(",
"type",
"==",
"null",
"?",
"null",
":",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
",",
"LocaleData",
".",
"CONSTRAINT_TYPES",
")",
"[",
"type",
"."... | This method is called to format a constraint type.
@param type constraint type
@return formatted constraint type | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"constraint",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1121-L1124 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatDuration | private String formatDuration(Object value)
{
String result = null;
if (value instanceof Duration)
{
Duration duration = (Duration) value;
result = m_formats.getDurationDecimalFormat().format(duration.getDuration()) + formatTimeUnit(duration.getUnits());
}
return resul... | java | private String formatDuration(Object value)
{
String result = null;
if (value instanceof Duration)
{
Duration duration = (Duration) value;
result = m_formats.getDurationDecimalFormat().format(duration.getDuration()) + formatTimeUnit(duration.getUnits());
}
return resul... | [
"private",
"String",
"formatDuration",
"(",
"Object",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"instanceof",
"Duration",
")",
"{",
"Duration",
"duration",
"=",
"(",
"Duration",
")",
"value",
";",
"result",
"=",
"m_format... | This method is called to format a duration.
@param value duration value
@return formatted duration value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"duration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1132-L1141 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRate | private String formatRate(Rate value)
{
String result = null;
if (value != null)
{
StringBuilder buffer = new StringBuilder(m_formats.getCurrencyFormat().format(value.getAmount()));
buffer.append("/");
buffer.append(formatTimeUnit(value.getUnits()));
result = buf... | java | private String formatRate(Rate value)
{
String result = null;
if (value != null)
{
StringBuilder buffer = new StringBuilder(m_formats.getCurrencyFormat().format(value.getAmount()));
buffer.append("/");
buffer.append(formatTimeUnit(value.getUnits()));
result = buf... | [
"private",
"String",
"formatRate",
"(",
"Rate",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
"m_formats",
".",
"getCurrencyFormat",
"(",
")... | This method is called to format a rate.
@param value rate value
@return formatted rate | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"rate",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1149-L1160 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatPriority | private String formatPriority(Priority value)
{
String result = null;
if (value != null)
{
String[] priorityTypes = LocaleData.getStringArray(m_locale, LocaleData.PRIORITY_TYPES);
int priority = value.getValue();
if (priority < Priority.LOWEST)
{
pri... | java | private String formatPriority(Priority value)
{
String result = null;
if (value != null)
{
String[] priorityTypes = LocaleData.getStringArray(m_locale, LocaleData.PRIORITY_TYPES);
int priority = value.getValue();
if (priority < Priority.LOWEST)
{
pri... | [
"private",
"String",
"formatPriority",
"(",
"Priority",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"priorityTypes",
"=",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
","... | This method is called to format a priority.
@param value priority instance
@return formatted priority value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"priority",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1168-L1194 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTaskType | private String formatTaskType(TaskType value)
{
return (LocaleData.getString(m_locale, (value == TaskType.FIXED_DURATION ? LocaleData.YES : LocaleData.NO)));
} | java | private String formatTaskType(TaskType value)
{
return (LocaleData.getString(m_locale, (value == TaskType.FIXED_DURATION ? LocaleData.YES : LocaleData.NO)));
} | [
"private",
"String",
"formatTaskType",
"(",
"TaskType",
"value",
")",
"{",
"return",
"(",
"LocaleData",
".",
"getString",
"(",
"m_locale",
",",
"(",
"value",
"==",
"TaskType",
".",
"FIXED_DURATION",
"?",
"LocaleData",
".",
"YES",
":",
"LocaleData",
".",
"NO"... | This method is called to format a task type.
@param value task type value
@return formatted task type | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"task",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1202-L1205 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRelationList | private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_... | java | private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_... | [
"private",
"String",
"formatRelationList",
"(",
"List",
"<",
"Relation",
">",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"value",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"StringBuilder",
"sb",
... | This method is called to format a relation list.
@param value relation list instance
@return formatted relation list | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"relation",
"list",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1213-L1234 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRelation | private String formatRelation(Relation relation)
{
String result = null;
if (relation != null)
{
StringBuilder sb = new StringBuilder(relation.getTargetTask().getID().toString());
Duration duration = relation.getLag();
RelationType type = relation.getType();
do... | java | private String formatRelation(Relation relation)
{
String result = null;
if (relation != null)
{
StringBuilder sb = new StringBuilder(relation.getTargetTask().getID().toString());
Duration duration = relation.getLag();
RelationType type = relation.getType();
do... | [
"private",
"String",
"formatRelation",
"(",
"Relation",
"relation",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"relation",
"!=",
"null",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"relation",
".",
"getTargetTask",
"(",... | This method is called to format a relation.
@param relation relation instance
@return formatted relation instance | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"relation",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1242-L1275 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTimeUnit | private String formatTimeUnit(TimeUnit timeUnit)
{
int units = timeUnit.getValue();
String result;
String[][] unitNames = LocaleData.getStringArrays(m_locale, LocaleData.TIME_UNITS_ARRAY);
if (units < 0 || units >= unitNames.length)
{
result = "";
}
else
{
... | java | private String formatTimeUnit(TimeUnit timeUnit)
{
int units = timeUnit.getValue();
String result;
String[][] unitNames = LocaleData.getStringArrays(m_locale, LocaleData.TIME_UNITS_ARRAY);
if (units < 0 || units >= unitNames.length)
{
result = "";
}
else
{
... | [
"private",
"String",
"formatTimeUnit",
"(",
"TimeUnit",
"timeUnit",
")",
"{",
"int",
"units",
"=",
"timeUnit",
".",
"getValue",
"(",
")",
";",
"String",
"result",
";",
"String",
"[",
"]",
"[",
"]",
"unitNames",
"=",
"LocaleData",
".",
"getStringArrays",
"(... | This method formats a time unit.
@param timeUnit time unit instance
@return formatted time unit instance | [
"This",
"method",
"formats",
"a",
"time",
"unit",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1283-L1299 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatType | @SuppressWarnings("unchecked") private Object formatType(DataType type, Object value)
{
switch (type)
{
case DATE:
{
value = formatDateTime(value);
break;
}
case CURRENCY:
{
value = formatCurrency((Number) value);
... | java | @SuppressWarnings("unchecked") private Object formatType(DataType type, Object value)
{
switch (type)
{
case DATE:
{
value = formatDateTime(value);
break;
}
case CURRENCY:
{
value = formatCurrency((Number) value);
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"Object",
"formatType",
"(",
"DataType",
"type",
",",
"Object",
"value",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"DATE",
":",
"{",
"value",
"=",
"formatDateTime",
"(",
"value",
")",
... | Converts a value to the appropriate type.
@param type target type
@param value input value
@return output value | [
"Converts",
"a",
"value",
"to",
"the",
"appropriate",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1319-L1397 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/MapRow.java | MapRow.getBoolean | public final boolean getBoolean(String name)
{
boolean result = false;
Boolean value = (Boolean) getObject(name);
if (value != null)
{
result = BooleanHelper.getBoolean(value);
}
return result;
} | java | public final boolean getBoolean(String name)
{
boolean result = false;
Boolean value = (Boolean) getObject(name);
if (value != null)
{
result = BooleanHelper.getBoolean(value);
}
return result;
} | [
"public",
"final",
"boolean",
"getBoolean",
"(",
"String",
"name",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"Boolean",
"value",
"=",
"(",
"Boolean",
")",
"getObject",
"(",
"name",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"result",... | Retrieve a boolean value.
@param name column name
@return boolean value | [
"Retrieve",
"a",
"boolean",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/MapRow.java#L90-L99 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpp/DocumentInputStreamFactory.java | DocumentInputStreamFactory.getInstance | public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
... | java | public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
... | [
"public",
"InputStream",
"getInstance",
"(",
"DirectoryEntry",
"directory",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"DocumentEntry",
"entry",
"=",
"(",
"DocumentEntry",
")",
"directory",
".",
"getEntry",
"(",
"name",
")",
";",
"InputStream",
"s... | Method used to instantiate the appropriate input stream reader,
a standard one, or one which can deal with "encrypted" data.
@param directory directory entry
@param name file name
@return new input stream
@throws IOException | [
"Method",
"used",
"to",
"instantiate",
"the",
"appropriate",
"input",
"stream",
"reader",
"a",
"standard",
"one",
"or",
"one",
"which",
"can",
"deal",
"with",
"encrypted",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/DocumentInputStreamFactory.java#L59-L73 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/mpp/GanttBarStyleFactory14.java | GanttBarStyleFactory14.getTaskField | private TaskField getTaskField(int field)
{
TaskField result = MPPTaskField14.getInstance(field);
if (result != null)
{
switch (result)
{
case START_TEXT:
{
result = TaskField.START;
break;
}
case FINI... | java | private TaskField getTaskField(int field)
{
TaskField result = MPPTaskField14.getInstance(field);
if (result != null)
{
switch (result)
{
case START_TEXT:
{
result = TaskField.START;
break;
}
case FINI... | [
"private",
"TaskField",
"getTaskField",
"(",
"int",
"field",
")",
"{",
"TaskField",
"result",
"=",
"MPPTaskField14",
".",
"getInstance",
"(",
"field",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"switch",
"(",
"result",
")",
"{",
"case",
"STAR... | Maps an integer field ID to a field type.
@param field field ID
@return field type | [
"Maps",
"an",
"integer",
"field",
"ID",
"to",
"a",
"field",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/GanttBarStyleFactory14.java#L173-L207 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/ProjectConfig.java | ProjectConfig.updateUniqueCounters | public void updateUniqueCounters()
{
//
// Update task unique IDs
//
for (Task task : m_parent.getTasks())
{
int uniqueID = NumberHelper.getInt(task.getUniqueID());
if (uniqueID > m_taskUniqueID)
{
m_taskUniqueID = uniqueID;
}
}
... | java | public void updateUniqueCounters()
{
//
// Update task unique IDs
//
for (Task task : m_parent.getTasks())
{
int uniqueID = NumberHelper.getInt(task.getUniqueID());
if (uniqueID > m_taskUniqueID)
{
m_taskUniqueID = uniqueID;
}
}
... | [
"public",
"void",
"updateUniqueCounters",
"(",
")",
"{",
"//",
"// Update task unique IDs",
"//",
"for",
"(",
"Task",
"task",
":",
"m_parent",
".",
"getTasks",
"(",
")",
")",
"{",
"int",
"uniqueID",
"=",
"NumberHelper",
".",
"getInt",
"(",
"task",
".",
"ge... | This method is called to ensure that after a project file has been
read, the cached unique ID values used to generate new unique IDs
start after the end of the existing set of unique IDs. | [
"This",
"method",
"is",
"called",
"to",
"ensure",
"that",
"after",
"a",
"project",
"file",
"has",
"been",
"read",
"the",
"cached",
"unique",
"ID",
"values",
"used",
"to",
"generate",
"new",
"unique",
"IDs",
"start",
"after",
"the",
"end",
"of",
"the",
"e... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectConfig.java#L297-L346 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.min | public static Date min(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) < 0) ? d1 : d2;
}
return result;
... | java | public static Date min(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) < 0) ? d1 : d2;
}
return result;
... | [
"public",
"static",
"Date",
"min",
"(",
"Date",
"d1",
",",
"Date",
"d2",
")",
"{",
"Date",
"result",
";",
"if",
"(",
"d1",
"==",
"null",
")",
"{",
"result",
"=",
"d2",
";",
"}",
"else",
"if",
"(",
"d2",
"==",
"null",
")",
"{",
"result",
"=",
... | Returns the earlier of two dates, handling null values. A non-null Date
is always considered to be earlier than a null Date.
@param d1 Date instance
@param d2 Date instance
@return Date earliest date | [
"Returns",
"the",
"earlier",
"of",
"two",
"dates",
"handling",
"null",
"values",
".",
"A",
"non",
"-",
"null",
"Date",
"is",
"always",
"considered",
"to",
"be",
"earlier",
"than",
"a",
"null",
"Date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L191-L208 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.max | public static Date max(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) > 0) ? d1 : d2;
}
return result;
... | java | public static Date max(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) > 0) ? d1 : d2;
}
return result;
... | [
"public",
"static",
"Date",
"max",
"(",
"Date",
"d1",
",",
"Date",
"d2",
")",
"{",
"Date",
"result",
";",
"if",
"(",
"d1",
"==",
"null",
")",
"{",
"result",
"=",
"d2",
";",
"}",
"else",
"if",
"(",
"d2",
"==",
"null",
")",
"{",
"result",
"=",
... | Returns the later of two dates, handling null values. A non-null Date
is always considered to be later than a null Date.
@param d1 Date instance
@param d2 Date instance
@return Date latest date | [
"Returns",
"the",
"later",
"of",
"two",
"dates",
"handling",
"null",
"values",
".",
"A",
"non",
"-",
"null",
"Date",
"is",
"always",
"considered",
"to",
"be",
"later",
"than",
"a",
"null",
"Date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L218-L235 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getVariance | public static Duration getVariance(Task task, Date date1, Date date2, TimeUnit format)
{
Duration variance = null;
if (date1 != null && date2 != null)
{
ProjectCalendar calendar = task.getEffectiveCalendar();
if (calendar != null)
{
variance = calendar.getWor... | java | public static Duration getVariance(Task task, Date date1, Date date2, TimeUnit format)
{
Duration variance = null;
if (date1 != null && date2 != null)
{
ProjectCalendar calendar = task.getEffectiveCalendar();
if (calendar != null)
{
variance = calendar.getWor... | [
"public",
"static",
"Duration",
"getVariance",
"(",
"Task",
"task",
",",
"Date",
"date1",
",",
"Date",
"date2",
",",
"TimeUnit",
"format",
")",
"{",
"Duration",
"variance",
"=",
"null",
";",
"if",
"(",
"date1",
"!=",
"null",
"&&",
"date2",
"!=",
"null",
... | This utility method calculates the difference in working
time between two dates, given the context of a task.
@param task parent task
@param date1 first date
@param date2 second date
@param format required format for the resulting duration
@return difference in working time between the two dates | [
"This",
"utility",
"method",
"calculates",
"the",
"difference",
"in",
"working",
"time",
"between",
"two",
"dates",
"given",
"the",
"context",
"of",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L247-L266 | train |
joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getDateFromLong | public static Date getDateFromLong(long date)
{
TimeZone tz = TimeZone.getDefault();
return (new Date(date - tz.getRawOffset()));
} | java | public static Date getDateFromLong(long date)
{
TimeZone tz = TimeZone.getDefault();
return (new Date(date - tz.getRawOffset()));
} | [
"public",
"static",
"Date",
"getDateFromLong",
"(",
"long",
"date",
")",
"{",
"TimeZone",
"tz",
"=",
"TimeZone",
".",
"getDefault",
"(",
")",
";",
"return",
"(",
"new",
"Date",
"(",
"date",
"-",
"tz",
".",
"getRawOffset",
"(",
")",
")",
")",
";",
"}"... | Creates a date from the equivalent long value. This conversion
takes account of the time zone.
@param date date expressed as a long integer
@return new Date instance | [
"Creates",
"a",
"date",
"from",
"the",
"equivalent",
"long",
"value",
".",
"This",
"conversion",
"takes",
"account",
"of",
"the",
"time",
"zone",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L275-L279 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
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 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.