id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
157,400 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeAssignments | private void writeAssignments()
{
for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
{
Resource resource = assignment.getResource();
if (resource != null)
{
Task task = assignment.getTask();
if (task != null && task.getUniqueID(... | java | private void writeAssignments()
{
for (ResourceAssignment assignment : m_projectFile.getResourceAssignments())
{
Resource resource = assignment.getResource();
if (resource != null)
{
Task task = assignment.getTask();
if (task != null && task.getUniqueID(... | [
"private",
"void",
"writeAssignments",
"(",
")",
"{",
"for",
"(",
"ResourceAssignment",
"assignment",
":",
"m_projectFile",
".",
"getResourceAssignments",
"(",
")",
")",
"{",
"Resource",
"resource",
"=",
"assignment",
".",
"getResource",
"(",
")",
";",
"if",
"... | Writes assignment data to a PM XML file. | [
"Writes",
"assignment",
"data",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L702-L716 |
157,401 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeAssignment | private void writeAssignment(ResourceAssignment mpxj)
{
ResourceAssignmentType xml = m_factory.createResourceAssignmentType();
m_project.getResourceAssignment().add(xml);
Task task = mpxj.getTask();
Task parentTask = task.getParentTask();
Integer parentTaskUniqueID = parentTask == null ... | java | private void writeAssignment(ResourceAssignment mpxj)
{
ResourceAssignmentType xml = m_factory.createResourceAssignmentType();
m_project.getResourceAssignment().add(xml);
Task task = mpxj.getTask();
Task parentTask = task.getParentTask();
Integer parentTaskUniqueID = parentTask == null ... | [
"private",
"void",
"writeAssignment",
"(",
"ResourceAssignment",
"mpxj",
")",
"{",
"ResourceAssignmentType",
"xml",
"=",
"m_factory",
".",
"createResourceAssignmentType",
"(",
")",
";",
"m_project",
".",
"getResourceAssignment",
"(",
")",
".",
"add",
"(",
"xml",
"... | Writes a resource assignment to a PM XML file.
@param mpxj MPXJ ResourceAssignment instance | [
"Writes",
"a",
"resource",
"assignment",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L723-L760 |
157,402 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writePredecessors | private void writePredecessors(Task task)
{
List<Relation> relations = task.getPredecessors();
for (Relation mpxj : relations)
{
RelationshipType xml = m_factory.createRelationshipType();
m_project.getRelationship().add(xml);
xml.setLag(getDuration(mpxj.getLag()));
... | java | private void writePredecessors(Task task)
{
List<Relation> relations = task.getPredecessors();
for (Relation mpxj : relations)
{
RelationshipType xml = m_factory.createRelationshipType();
m_project.getRelationship().add(xml);
xml.setLag(getDuration(mpxj.getLag()));
... | [
"private",
"void",
"writePredecessors",
"(",
"Task",
"task",
")",
"{",
"List",
"<",
"Relation",
">",
"relations",
"=",
"task",
".",
"getPredecessors",
"(",
")",
";",
"for",
"(",
"Relation",
"mpxj",
":",
"relations",
")",
"{",
"RelationshipType",
"xml",
"="... | Writes task predecessor links to a PM XML file.
@param task MPXJ Task instance | [
"Writes",
"task",
"predecessor",
"links",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L767-L783 |
157,403 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeUDFType | private List<UDFAssignmentType> writeUDFType(FieldTypeClass type, FieldContainer mpxj)
{
List<UDFAssignmentType> out = new ArrayList<UDFAssignmentType>();
for (CustomField cf : m_sortedCustomFieldsList)
{
FieldType fieldType = cf.getFieldType();
if (fieldType != null && type == fi... | java | private List<UDFAssignmentType> writeUDFType(FieldTypeClass type, FieldContainer mpxj)
{
List<UDFAssignmentType> out = new ArrayList<UDFAssignmentType>();
for (CustomField cf : m_sortedCustomFieldsList)
{
FieldType fieldType = cf.getFieldType();
if (fieldType != null && type == fi... | [
"private",
"List",
"<",
"UDFAssignmentType",
">",
"writeUDFType",
"(",
"FieldTypeClass",
"type",
",",
"FieldContainer",
"mpxj",
")",
"{",
"List",
"<",
"UDFAssignmentType",
">",
"out",
"=",
"new",
"ArrayList",
"<",
"UDFAssignmentType",
">",
"(",
")",
";",
"for"... | Writes a list of UDF types.
@author lsong
@param type parent entity type
@param mpxj parent entity
@return list of UDFAssignmentType instances | [
"Writes",
"a",
"list",
"of",
"UDF",
"types",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L793-L812 |
157,404 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.setUserFieldValue | private void setUserFieldValue(UDFAssignmentType udf, DataType dataType, Object value)
{
switch (dataType)
{
case DURATION:
{
udf.setTextValue(((Duration) value).toString());
break;
}
case CURRENCY:
{
if (!(value instanceof... | java | private void setUserFieldValue(UDFAssignmentType udf, DataType dataType, Object value)
{
switch (dataType)
{
case DURATION:
{
udf.setTextValue(((Duration) value).toString());
break;
}
case CURRENCY:
{
if (!(value instanceof... | [
"private",
"void",
"setUserFieldValue",
"(",
"UDFAssignmentType",
"udf",
",",
"DataType",
"dataType",
",",
"Object",
"value",
")",
"{",
"switch",
"(",
"dataType",
")",
"{",
"case",
"DURATION",
":",
"{",
"udf",
".",
"setTextValue",
"(",
"(",
"(",
"Duration",
... | Sets the value of a UDF.
@param udf user defined field
@param dataType MPXJ data type
@param value field value | [
"Sets",
"the",
"value",
"of",
"a",
"UDF",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L821-L887 |
157,405 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getDuration | private Double getDuration(Duration duration)
{
Double result;
if (duration == null)
{
result = null;
}
else
{
if (duration.getUnits() != TimeUnit.HOURS)
{
duration = duration.convertUnits(TimeUnit.HOURS, m_projectFile.getProjectProperties())... | java | private Double getDuration(Duration duration)
{
Double result;
if (duration == null)
{
result = null;
}
else
{
if (duration.getUnits() != TimeUnit.HOURS)
{
duration = duration.convertUnits(TimeUnit.HOURS, m_projectFile.getProjectProperties())... | [
"private",
"Double",
"getDuration",
"(",
"Duration",
"duration",
")",
"{",
"Double",
"result",
";",
"if",
"(",
"duration",
"==",
"null",
")",
"{",
"result",
"=",
"null",
";",
"}",
"else",
"{",
"if",
"(",
"duration",
".",
"getUnits",
"(",
")",
"!=",
"... | Retrieve a duration in the form required by Primavera.
@param duration Duration instance
@return formatted duration | [
"Retrieve",
"a",
"duration",
"in",
"the",
"form",
"required",
"by",
"Primavera",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L895-L912 |
157,406 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getResourceType | private String getResourceType(Resource resource)
{
String result;
net.sf.mpxj.ResourceType type = resource.getType();
if (type == null)
{
type = net.sf.mpxj.ResourceType.WORK;
}
switch (type)
{
case MATERIAL:
{
result = "Material";
... | java | private String getResourceType(Resource resource)
{
String result;
net.sf.mpxj.ResourceType type = resource.getType();
if (type == null)
{
type = net.sf.mpxj.ResourceType.WORK;
}
switch (type)
{
case MATERIAL:
{
result = "Material";
... | [
"private",
"String",
"getResourceType",
"(",
"Resource",
"resource",
")",
"{",
"String",
"result",
";",
"net",
".",
"sf",
".",
"mpxj",
".",
"ResourceType",
"type",
"=",
"resource",
".",
"getType",
"(",
")",
";",
"if",
"(",
"type",
"==",
"null",
")",
"{... | Formats a resource type.
@param resource MPXJ resource
@return Primavera resource type | [
"Formats",
"a",
"resource",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L931-L962 |
157,407 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getPercentage | private Double getPercentage(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue() / 100);
}
return result;
} | java | private Double getPercentage(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue() / 100);
}
return result;
} | [
"private",
"Double",
"getPercentage",
"(",
"Number",
"number",
")",
"{",
"Double",
"result",
"=",
"null",
";",
"if",
"(",
"number",
"!=",
"null",
")",
"{",
"result",
"=",
"Double",
".",
"valueOf",
"(",
"number",
".",
"doubleValue",
"(",
")",
"/",
"100"... | Formats a percentage value.
@param number MPXJ percentage value
@return Primavera percentage value | [
"Formats",
"a",
"percentage",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L970-L980 |
157,408 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getDouble | private Double getDouble(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue());
}
return result;
} | java | private Double getDouble(Number number)
{
Double result = null;
if (number != null)
{
result = Double.valueOf(number.doubleValue());
}
return result;
} | [
"private",
"Double",
"getDouble",
"(",
"Number",
"number",
")",
"{",
"Double",
"result",
"=",
"null",
";",
"if",
"(",
"number",
"!=",
"null",
")",
"{",
"result",
"=",
"Double",
".",
"valueOf",
"(",
"number",
".",
"doubleValue",
"(",
")",
")",
";",
"}... | Formats a double value.
@param number numeric value
@return Double instance | [
"Formats",
"a",
"double",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L988-L998 |
157,409 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getActivityStatus | private String getActivityStatus(Task mpxj)
{
String result;
if (mpxj.getActualStart() == null)
{
result = "Not Started";
}
else
{
if (mpxj.getActualFinish() == null)
{
result = "In Progress";
}
else
{
r... | java | private String getActivityStatus(Task mpxj)
{
String result;
if (mpxj.getActualStart() == null)
{
result = "Not Started";
}
else
{
if (mpxj.getActualFinish() == null)
{
result = "In Progress";
}
else
{
r... | [
"private",
"String",
"getActivityStatus",
"(",
"Task",
"mpxj",
")",
"{",
"String",
"result",
";",
"if",
"(",
"mpxj",
".",
"getActualStart",
"(",
")",
"==",
"null",
")",
"{",
"result",
"=",
"\"Not Started\"",
";",
"}",
"else",
"{",
"if",
"(",
"mpxj",
".... | Retrieve an activity status.
@param mpxj MPXJ Task instance
@return activity status | [
"Retrieve",
"an",
"activity",
"status",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L1030-L1049 |
157,410 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getActivityID | private String getActivityID(Task task)
{
String result = null;
if (m_activityIDField != null)
{
Object value = task.getCachedValue(m_activityIDField);
if (value != null)
{
result = value.toString();
}
}
return result;
} | java | private String getActivityID(Task task)
{
String result = null;
if (m_activityIDField != null)
{
Object value = task.getCachedValue(m_activityIDField);
if (value != null)
{
result = value.toString();
}
}
return result;
} | [
"private",
"String",
"getActivityID",
"(",
"Task",
"task",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"m_activityIDField",
"!=",
"null",
")",
"{",
"Object",
"value",
"=",
"task",
".",
"getCachedValue",
"(",
"m_activityIDField",
")",
";",
"i... | Retrieve the Activity ID value for this task.
@param task Task instance
@return Activity ID value | [
"Retrieve",
"the",
"Activity",
"ID",
"value",
"for",
"this",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L1056-L1068 |
157,411 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.configureCustomFields | private void configureCustomFields()
{
CustomFieldContainer customFields = m_projectFile.getCustomFields();
// If the caller hasn't already supplied a value for this field
if (m_activityIDField == null)
{
m_activityIDField = (TaskField) customFields.getFieldByAlias(FieldTypeClass.TA... | java | private void configureCustomFields()
{
CustomFieldContainer customFields = m_projectFile.getCustomFields();
// If the caller hasn't already supplied a value for this field
if (m_activityIDField == null)
{
m_activityIDField = (TaskField) customFields.getFieldByAlias(FieldTypeClass.TA... | [
"private",
"void",
"configureCustomFields",
"(",
")",
"{",
"CustomFieldContainer",
"customFields",
"=",
"m_projectFile",
".",
"getCustomFields",
"(",
")",
";",
"// If the caller hasn't already supplied a value for this field",
"if",
"(",
"m_activityIDField",
"==",
"null",
"... | Find the fields in which the Activity ID and Activity Type are stored. | [
"Find",
"the",
"fields",
"in",
"which",
"the",
"Activity",
"ID",
"and",
"Activity",
"Type",
"are",
"stored",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L1073-L1092 |
157,412 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.populateSortedCustomFieldsList | private void populateSortedCustomFieldsList ()
{
m_sortedCustomFieldsList = new ArrayList<CustomField>();
for (CustomField field : m_projectFile.getCustomFields())
{
FieldType fieldType = field.getFieldType();
if (fieldType != null)
{
m_sortedCustomFieldsList.... | java | private void populateSortedCustomFieldsList ()
{
m_sortedCustomFieldsList = new ArrayList<CustomField>();
for (CustomField field : m_projectFile.getCustomFields())
{
FieldType fieldType = field.getFieldType();
if (fieldType != null)
{
m_sortedCustomFieldsList.... | [
"private",
"void",
"populateSortedCustomFieldsList",
"(",
")",
"{",
"m_sortedCustomFieldsList",
"=",
"new",
"ArrayList",
"<",
"CustomField",
">",
"(",
")",
";",
"for",
"(",
"CustomField",
"field",
":",
"m_projectFile",
".",
"getCustomFields",
"(",
")",
")",
"{",... | Populate a sorted list of custom fields to ensure that these fields
are written to the file in a consistent order. | [
"Populate",
"a",
"sorted",
"list",
"of",
"custom",
"fields",
"to",
"ensure",
"that",
"these",
"fields",
"are",
"written",
"to",
"the",
"file",
"in",
"a",
"consistent",
"order",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L1098-L1122 |
157,413 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarHours.java | ProjectCalendarHours.setDay | public void setDay(Day d)
{
if (m_day != null)
{
m_parentCalendar.removeHoursFromDay(this);
}
m_day = d;
m_parentCalendar.attachHoursToDay(this);
} | java | public void setDay(Day d)
{
if (m_day != null)
{
m_parentCalendar.removeHoursFromDay(this);
}
m_day = d;
m_parentCalendar.attachHoursToDay(this);
} | [
"public",
"void",
"setDay",
"(",
"Day",
"d",
")",
"{",
"if",
"(",
"m_day",
"!=",
"null",
")",
"{",
"m_parentCalendar",
".",
"removeHoursFromDay",
"(",
"this",
")",
";",
"}",
"m_day",
"=",
"d",
";",
"m_parentCalendar",
".",
"attachHoursToDay",
"(",
"this"... | Set day.
@param d day instance | [
"Set",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarHours.java#L67-L77 |
157,414 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXJBaseFormat.java | MPXJBaseFormat.applyPatterns | public void applyPatterns(String[] patterns)
{
m_formats = new SimpleDateFormat[patterns.length];
for (int index = 0; index < patterns.length; index++)
{
m_formats[index] = new SimpleDateFormat(patterns[index]);
}
} | java | public void applyPatterns(String[] patterns)
{
m_formats = new SimpleDateFormat[patterns.length];
for (int index = 0; index < patterns.length; index++)
{
m_formats[index] = new SimpleDateFormat(patterns[index]);
}
} | [
"public",
"void",
"applyPatterns",
"(",
"String",
"[",
"]",
"patterns",
")",
"{",
"m_formats",
"=",
"new",
"SimpleDateFormat",
"[",
"patterns",
".",
"length",
"]",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"patterns",
".",
"length",
... | This method is used to configure the format pattern.
@param patterns new format patterns | [
"This",
"method",
"is",
"used",
"to",
"configure",
"the",
"format",
"pattern",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJBaseFormat.java#L55-L62 |
157,415 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDuration | public static Duration getDuration(ProjectProperties properties, Integer durationValue, Integer unitsValue)
{
Duration result;
if (durationValue == null)
{
result = null;
}
else
{
result = Duration.getInstance(durationValue.intValue(), TimeUnit.MINUTES);
... | java | public static Duration getDuration(ProjectProperties properties, Integer durationValue, Integer unitsValue)
{
Duration result;
if (durationValue == null)
{
result = null;
}
else
{
result = Duration.getInstance(durationValue.intValue(), TimeUnit.MINUTES);
... | [
"public",
"static",
"Duration",
"getDuration",
"(",
"ProjectProperties",
"properties",
",",
"Integer",
"durationValue",
",",
"Integer",
"unitsValue",
")",
"{",
"Duration",
"result",
";",
"if",
"(",
"durationValue",
"==",
"null",
")",
"{",
"result",
"=",
"null",
... | Convert the integer representation of a duration value and duration units
into an MPXJ Duration instance.
@param properties project properties, used for duration units conversion
@param durationValue integer duration value
@param unitsValue integer units value
@return Duration instance | [
"Convert",
"the",
"integer",
"representation",
"of",
"a",
"duration",
"value",
"and",
"duration",
"units",
"into",
"an",
"MPXJ",
"Duration",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L63-L80 |
157,416 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDurationValue | public static Integer getDurationValue(ProjectProperties properties, Duration duration)
{
Integer result;
if (duration == null)
{
result = null;
}
else
{
if (duration.getUnits() != TimeUnit.MINUTES)
{
duration = duration.convertUnits(TimeUnit... | java | public static Integer getDurationValue(ProjectProperties properties, Duration duration)
{
Integer result;
if (duration == null)
{
result = null;
}
else
{
if (duration.getUnits() != TimeUnit.MINUTES)
{
duration = duration.convertUnits(TimeUnit... | [
"public",
"static",
"Integer",
"getDurationValue",
"(",
"ProjectProperties",
"properties",
",",
"Duration",
"duration",
")",
"{",
"Integer",
"result",
";",
"if",
"(",
"duration",
"==",
"null",
")",
"{",
"result",
"=",
"null",
";",
"}",
"else",
"{",
"if",
"... | Convert an MPXJ Duration instance into an integer duration in minutes
ready to be written to an MPX file.
@param properties project properties, used for duration units conversion
@param duration Duration instance
@return integer duration in minutes | [
"Convert",
"an",
"MPXJ",
"Duration",
"instance",
"into",
"an",
"integer",
"duration",
"in",
"minutes",
"ready",
"to",
"be",
"written",
"to",
"an",
"MPX",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L90-L106 |
157,417 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDurationUnits | public static Integer getDurationUnits(RecurringTask recurrence)
{
Duration duration = recurrence.getDuration();
Integer result = null;
if (duration != null)
{
result = UNITS_MAP.get(duration.getUnits());
}
return (result);
} | java | public static Integer getDurationUnits(RecurringTask recurrence)
{
Duration duration = recurrence.getDuration();
Integer result = null;
if (duration != null)
{
result = UNITS_MAP.get(duration.getUnits());
}
return (result);
} | [
"public",
"static",
"Integer",
"getDurationUnits",
"(",
"RecurringTask",
"recurrence",
")",
"{",
"Duration",
"duration",
"=",
"recurrence",
".",
"getDuration",
"(",
")",
";",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"duration",
"!=",
"null",
")",
"{... | Converts a TimeUnit instance to an integer value suitable for
writing to an MPX file.
@param recurrence RecurringTask instance
@return integer value | [
"Converts",
"a",
"TimeUnit",
"instance",
"to",
"an",
"integer",
"value",
"suitable",
"for",
"writing",
"to",
"an",
"MPX",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L115-L126 |
157,418 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDurationUnits | private static TimeUnit getDurationUnits(Integer value)
{
TimeUnit result = null;
if (value != null)
{
int index = value.intValue();
if (index >= 0 && index < DURATION_UNITS.length)
{
result = DURATION_UNITS[index];
}
}
if (result == nul... | java | private static TimeUnit getDurationUnits(Integer value)
{
TimeUnit result = null;
if (value != null)
{
int index = value.intValue();
if (index >= 0 && index < DURATION_UNITS.length)
{
result = DURATION_UNITS[index];
}
}
if (result == nul... | [
"private",
"static",
"TimeUnit",
"getDurationUnits",
"(",
"Integer",
"value",
")",
"{",
"TimeUnit",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"int",
"index",
"=",
"value",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"index"... | Maps a duration unit value from a recurring task record in an MPX file
to a TimeUnit instance. Defaults to days if any problems are encountered.
@param value integer duration units value
@return TimeUnit instance | [
"Maps",
"a",
"duration",
"unit",
"value",
"from",
"a",
"recurring",
"task",
"record",
"in",
"an",
"MPX",
"file",
"to",
"a",
"TimeUnit",
"instance",
".",
"Defaults",
"to",
"days",
"if",
"any",
"problems",
"are",
"encountered",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L135-L154 |
157,419 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDays | public static Integer getDays(String days)
{
Integer result = null;
if (days != null)
{
result = Integer.valueOf(Integer.parseInt(days, 2));
}
return (result);
} | java | public static Integer getDays(String days)
{
Integer result = null;
if (days != null)
{
result = Integer.valueOf(Integer.parseInt(days, 2));
}
return (result);
} | [
"public",
"static",
"Integer",
"getDays",
"(",
"String",
"days",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"days",
"!=",
"null",
")",
"{",
"result",
"=",
"Integer",
".",
"valueOf",
"(",
"Integer",
".",
"parseInt",
"(",
"days",
",",
... | Converts the string representation of the days bit field into an integer.
@param days string bit field
@return integer bit field | [
"Converts",
"the",
"string",
"representation",
"of",
"the",
"days",
"bit",
"field",
"into",
"an",
"integer",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L186-L194 |
157,420 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDays | public static String getDays(RecurringTask task)
{
StringBuilder sb = new StringBuilder();
for (Day day : Day.values())
{
sb.append(task.getWeeklyDay(day) ? "1" : "0");
}
return sb.toString();
} | java | public static String getDays(RecurringTask task)
{
StringBuilder sb = new StringBuilder();
for (Day day : Day.values())
{
sb.append(task.getWeeklyDay(day) ? "1" : "0");
}
return sb.toString();
} | [
"public",
"static",
"String",
"getDays",
"(",
"RecurringTask",
"task",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Day",
"day",
":",
"Day",
".",
"values",
"(",
")",
")",
"{",
"sb",
".",
"append",
"(",
"ta... | Convert weekly recurrence days into a bit field.
@param task recurring task
@return bit field as a string | [
"Convert",
"weekly",
"recurrence",
"days",
"into",
"a",
"bit",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L202-L210 |
157,421 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDay | public static Day getDay(Integer day)
{
Day result = null;
if (day != null)
{
result = DAY_ARRAY[day.intValue()];
}
return (result);
} | java | public static Day getDay(Integer day)
{
Day result = null;
if (day != null)
{
result = DAY_ARRAY[day.intValue()];
}
return (result);
} | [
"public",
"static",
"Day",
"getDay",
"(",
"Integer",
"day",
")",
"{",
"Day",
"result",
"=",
"null",
";",
"if",
"(",
"day",
"!=",
"null",
")",
"{",
"result",
"=",
"DAY_ARRAY",
"[",
"day",
".",
"intValue",
"(",
")",
"]",
";",
"}",
"return",
"(",
"r... | Convert MPX day index to Day instance.
@param day day index
@return Day instance | [
"Convert",
"MPX",
"day",
"index",
"to",
"Day",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L218-L226 |
157,422 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getDay | public static Integer getDay(Day day)
{
Integer result = null;
if (day != null)
{
result = DAY_MAP.get(day);
}
return (result);
} | java | public static Integer getDay(Day day)
{
Integer result = null;
if (day != null)
{
result = DAY_MAP.get(day);
}
return (result);
} | [
"public",
"static",
"Integer",
"getDay",
"(",
"Day",
"day",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"day",
"!=",
"null",
")",
"{",
"result",
"=",
"DAY_MAP",
".",
"get",
"(",
"day",
")",
";",
"}",
"return",
"(",
"result",
")",
... | Convert Day instance to MPX day index.
@param day Day instance
@return day index | [
"Convert",
"Day",
"instance",
"to",
"MPX",
"day",
"index",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L234-L242 |
157,423 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java | RecurrenceUtility.getYearlyAbsoluteAsDate | public static Date getYearlyAbsoluteAsDate(RecurringData data)
{
Date result;
Integer yearlyAbsoluteDay = data.getDayNumber();
Integer yearlyAbsoluteMonth = data.getMonthNumber();
Date startDate = data.getStartDate();
if (yearlyAbsoluteDay == null || yearlyAbsoluteMonth == null || star... | java | public static Date getYearlyAbsoluteAsDate(RecurringData data)
{
Date result;
Integer yearlyAbsoluteDay = data.getDayNumber();
Integer yearlyAbsoluteMonth = data.getMonthNumber();
Date startDate = data.getStartDate();
if (yearlyAbsoluteDay == null || yearlyAbsoluteMonth == null || star... | [
"public",
"static",
"Date",
"getYearlyAbsoluteAsDate",
"(",
"RecurringData",
"data",
")",
"{",
"Date",
"result",
";",
"Integer",
"yearlyAbsoluteDay",
"=",
"data",
".",
"getDayNumber",
"(",
")",
";",
"Integer",
"yearlyAbsoluteMonth",
"=",
"data",
".",
"getMonthNumb... | Retrieves the yearly absolute date.
@param data recurrence data
@return yearly absolute date | [
"Retrieves",
"the",
"yearly",
"absolute",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RecurrenceUtility.java#L250-L270 |
157,424 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/AbstractIntColumn.java | AbstractIntColumn.readInt | public int readInt(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | java | public int readInt(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"public",
"int",
"readInt",
"(",
"int",
"offset",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"int",
"result",
"=",
"0",
";",
"int",
"i",
"=",
"offset",
"+",
"m_offset",
";",
"for",
"(",
"int",
"shiftBy",
"=",
"0",
";",
"shiftBy",
"<",
"32",
";",
... | Read a four byte integer from the data.
@param offset current offset into data block
@param data data block
@return int value | [
"Read",
"a",
"four",
"byte",
"integer",
"from",
"the",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractIntColumn.java#L49-L59 |
157,425 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/RowHeader.java | RowHeader.parse | private void parse(String header)
{
ArrayList<String> list = new ArrayList<String>(4);
StringBuilder sb = new StringBuilder();
int index = 1;
while (index < header.length())
{
char c = header.charAt(index++);
if (Character.isDigit(c))
{
sb.append(c... | java | private void parse(String header)
{
ArrayList<String> list = new ArrayList<String>(4);
StringBuilder sb = new StringBuilder();
int index = 1;
while (index < header.length())
{
char c = header.charAt(index++);
if (Character.isDigit(c))
{
sb.append(c... | [
"private",
"void",
"parse",
"(",
"String",
"header",
")",
"{",
"ArrayList",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"4",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"index",
... | Parses values out of the header text.
@param header header text | [
"Parses",
"values",
"out",
"of",
"the",
"header",
"text",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/RowHeader.java#L49-L83 |
157,426 | joniles/mpxj | src/main/java/net/sf/mpxj/CostRateTable.java | CostRateTable.getIndexByDate | public int getIndexByDate(Date date)
{
int result = -1;
int index = 0;
for (CostRateTableEntry entry : this)
{
if (DateHelper.compare(date, entry.getEndDate()) < 0)
{
result = index;
break;
}
++index;
}
return result;
... | java | public int getIndexByDate(Date date)
{
int result = -1;
int index = 0;
for (CostRateTableEntry entry : this)
{
if (DateHelper.compare(date, entry.getEndDate()) < 0)
{
result = index;
break;
}
++index;
}
return result;
... | [
"public",
"int",
"getIndexByDate",
"(",
"Date",
"date",
")",
"{",
"int",
"result",
"=",
"-",
"1",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"CostRateTableEntry",
"entry",
":",
"this",
")",
"{",
"if",
"(",
"DateHelper",
".",
"compare",
"(",
"dat... | Retrieve the index of the table entry valid for the supplied date.
@param date required date
@return cost rate table entry index | [
"Retrieve",
"the",
"index",
"of",
"the",
"table",
"entry",
"valid",
"for",
"the",
"supplied",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/CostRateTable.java#L64-L80 |
157,427 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.getInt | public static final int getInt(String value)
{
return (value == null || value.length() == 0 ? 0 : Integer.parseInt(value));
} | java | public static final int getInt(String value)
{
return (value == null || value.length() == 0 ? 0 : Integer.parseInt(value));
} | [
"public",
"static",
"final",
"int",
"getInt",
"(",
"String",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"length",
"(",
")",
"==",
"0",
"?",
"0",
":",
"Integer",
".",
"parseInt",
"(",
"value",
")",
")",
";",
"}"
] | This method retrieves an int value from a String instance.
It returns zero by default if a null value or an empty string is supplied.
@param value string representation of an integer
@return int value | [
"This",
"method",
"retrieves",
"an",
"int",
"value",
"from",
"a",
"String",
"instance",
".",
"It",
"returns",
"zero",
"by",
"default",
"if",
"a",
"null",
"value",
"or",
"an",
"empty",
"string",
"is",
"supplied",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L53-L56 |
157,428 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.getDouble | public static final double getDouble(String value)
{
return (value == null || value.length() == 0 ? 0 : Double.parseDouble(value));
} | java | public static final double getDouble(String value)
{
return (value == null || value.length() == 0 ? 0 : Double.parseDouble(value));
} | [
"public",
"static",
"final",
"double",
"getDouble",
"(",
"String",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"length",
"(",
")",
"==",
"0",
"?",
"0",
":",
"Double",
".",
"parseDouble",
"(",
"value",
")",
")",
";",
... | This method retrieves a double value from a String instance.
It returns zero by default if a null value or an empty string is supplied.
@param value string representation of a double
@return double value | [
"This",
"method",
"retrieves",
"a",
"double",
"value",
"from",
"a",
"String",
"instance",
".",
"It",
"returns",
"zero",
"by",
"default",
"if",
"a",
"null",
"value",
"or",
"an",
"empty",
"string",
"is",
"supplied",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L65-L68 |
157,429 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.getInteger | public static final Integer getInteger(Number value)
{
Integer result = null;
if (value != null)
{
if (value instanceof Integer)
{
result = (Integer) value;
}
else
{
result = Integer.valueOf((int) Math.round(value.doubleValue()));... | java | public static final Integer getInteger(Number value)
{
Integer result = null;
if (value != null)
{
if (value instanceof Integer)
{
result = (Integer) value;
}
else
{
result = Integer.valueOf((int) Math.round(value.doubleValue()));... | [
"public",
"static",
"final",
"Integer",
"getInteger",
"(",
"Number",
"value",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"if",
"(",
"value",
"instanceof",
"Integer",
")",
"{",
"result",
"=",
"(",
"Integ... | Utility method used to convert an arbitrary Number into an Integer.
@param value Number instance
@return Integer instance | [
"Utility",
"method",
"used",
"to",
"convert",
"an",
"arbitrary",
"Number",
"into",
"an",
"Integer",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L76-L91 |
157,430 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.getInteger | public static final Integer getInteger(String value)
{
Integer result;
try
{
result = Integer.valueOf(Integer.parseInt(value));
}
catch (Exception ex)
{
result = null;
}
return (result);
} | java | public static final Integer getInteger(String value)
{
Integer result;
try
{
result = Integer.valueOf(Integer.parseInt(value));
}
catch (Exception ex)
{
result = null;
}
return (result);
} | [
"public",
"static",
"final",
"Integer",
"getInteger",
"(",
"String",
"value",
")",
"{",
"Integer",
"result",
";",
"try",
"{",
"result",
"=",
"Integer",
".",
"valueOf",
"(",
"Integer",
".",
"parseInt",
"(",
"value",
")",
")",
";",
"}",
"catch",
"(",
"Ex... | Converts a string representation of an integer into an Integer object.
Silently ignores any parse exceptions and returns null.
@param value String representation of an integer
@return Integer instance | [
"Converts",
"a",
"string",
"representation",
"of",
"an",
"integer",
"into",
"an",
"Integer",
"object",
".",
"Silently",
"ignores",
"any",
"parse",
"exceptions",
"and",
"returns",
"null",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L100-L115 |
157,431 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.getBigInteger | public static final BigInteger getBigInteger(Number value)
{
BigInteger result = null;
if (value != null)
{
if (value instanceof BigInteger)
{
result = (BigInteger) value;
}
else
{
result = BigInteger.valueOf(Math.round(value.doub... | java | public static final BigInteger getBigInteger(Number value)
{
BigInteger result = null;
if (value != null)
{
if (value instanceof BigInteger)
{
result = (BigInteger) value;
}
else
{
result = BigInteger.valueOf(Math.round(value.doub... | [
"public",
"static",
"final",
"BigInteger",
"getBigInteger",
"(",
"Number",
"value",
")",
"{",
"BigInteger",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"if",
"(",
"value",
"instanceof",
"BigInteger",
")",
"{",
"result",
"=",
"... | Utility method used to convert a Number into a BigInteger.
@param value Number instance
@return BigInteger instance | [
"Utility",
"method",
"used",
"to",
"convert",
"a",
"Number",
"into",
"a",
"BigInteger",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L123-L138 |
157,432 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.round | public static final double round(double value, double precision)
{
precision = Math.pow(10, precision);
return Math.round(value * precision) / precision;
} | java | public static final double round(double value, double precision)
{
precision = Math.pow(10, precision);
return Math.round(value * precision) / precision;
} | [
"public",
"static",
"final",
"double",
"round",
"(",
"double",
"value",
",",
"double",
"precision",
")",
"{",
"precision",
"=",
"Math",
".",
"pow",
"(",
"10",
",",
"precision",
")",
";",
"return",
"Math",
".",
"round",
"(",
"value",
"*",
"precision",
"... | Utility method used to round a double to the given precision.
@param value value to truncate
@param precision Number of decimals to round to.
@return double value | [
"Utility",
"method",
"used",
"to",
"round",
"a",
"double",
"to",
"the",
"given",
"precision",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L180-L184 |
157,433 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.parseInteger | public static final Integer parseInteger(String value)
{
return (value == null || value.length() == 0 ? null : Integer.valueOf(Integer.parseInt(value)));
} | java | public static final Integer parseInteger(String value)
{
return (value == null || value.length() == 0 ? null : Integer.valueOf(Integer.parseInt(value)));
} | [
"public",
"static",
"final",
"Integer",
"parseInteger",
"(",
"String",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"length",
"(",
")",
"==",
"0",
"?",
"null",
":",
"Integer",
".",
"valueOf",
"(",
"Integer",
".",
"parseI... | Utility method to convert a String to an Integer, and
handles null values.
@param value string representation of an integer
@return int value | [
"Utility",
"method",
"to",
"convert",
"a",
"String",
"to",
"an",
"Integer",
"and",
"handles",
"null",
"values",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L193-L196 |
157,434 | joniles/mpxj | src/main/java/net/sf/mpxj/common/NumberHelper.java | NumberHelper.compare | public static int compare(Integer n1, Integer n2)
{
int result;
if (n1 == null || n2 == null)
{
result = (n1 == null && n2 == null ? 0 : (n1 == null ? 1 : -1));
}
else
{
result = n1.compareTo(n2);
}
return (result);
} | java | public static int compare(Integer n1, Integer n2)
{
int result;
if (n1 == null || n2 == null)
{
result = (n1 == null && n2 == null ? 0 : (n1 == null ? 1 : -1));
}
else
{
result = n1.compareTo(n2);
}
return (result);
} | [
"public",
"static",
"int",
"compare",
"(",
"Integer",
"n1",
",",
"Integer",
"n2",
")",
"{",
"int",
"result",
";",
"if",
"(",
"n1",
"==",
"null",
"||",
"n2",
"==",
"null",
")",
"{",
"result",
"=",
"(",
"n1",
"==",
"null",
"&&",
"n2",
"==",
"null",... | Compare two integers, accounting for null values.
@param n1 integer value
@param n2 integer value
@return comparison result | [
"Compare",
"two",
"integers",
"accounting",
"for",
"null",
"values",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/NumberHelper.java#L237-L249 |
157,435 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MapRow.java | MapRow.getObject | private final Object getObject(String name)
{
if (m_map.containsKey(name) == false)
{
throw new IllegalArgumentException("Invalid column name " + name);
}
Object result = m_map.get(name);
return (result);
} | java | private final Object getObject(String name)
{
if (m_map.containsKey(name) == false)
{
throw new IllegalArgumentException("Invalid column name " + name);
}
Object result = m_map.get(name);
return (result);
} | [
"private",
"final",
"Object",
"getObject",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"m_map",
".",
"containsKey",
"(",
"name",
")",
"==",
"false",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid column name \"",
"+",
"name",
")",
";",... | Retrieve a value from the map, ensuring that a key exists in the map
with the specified name.
@param name column name
@return column value | [
"Retrieve",
"a",
"value",
"from",
"the",
"map",
"ensuring",
"that",
"a",
"key",
"exists",
"in",
"the",
"map",
"with",
"the",
"specified",
"name",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MapRow.java#L164-L174 |
157,436 | joniles/mpxj | src/main/java/net/sf/mpxj/common/Tokenizer.java | Tokenizer.nextToken | public int nextToken() throws IOException
{
int c;
int nextc = -1;
boolean quoted = false;
int result = m_next;
if (m_next != 0)
{
m_next = 0;
}
m_buffer.setLength(0);
while (result == 0)
{
if (nextc != -1)
{
c = nex... | java | public int nextToken() throws IOException
{
int c;
int nextc = -1;
boolean quoted = false;
int result = m_next;
if (m_next != 0)
{
m_next = 0;
}
m_buffer.setLength(0);
while (result == 0)
{
if (nextc != -1)
{
c = nex... | [
"public",
"int",
"nextToken",
"(",
")",
"throws",
"IOException",
"{",
"int",
"c",
";",
"int",
"nextc",
"=",
"-",
"1",
";",
"boolean",
"quoted",
"=",
"false",
";",
"int",
"result",
"=",
"m_next",
";",
"if",
"(",
"m_next",
"!=",
"0",
")",
"{",
"m_nex... | This method retrieves the next token and returns a constant representing
the type of token found.
@return token type value | [
"This",
"method",
"retrieves",
"the",
"next",
"token",
"and",
"returns",
"a",
"constant",
"representing",
"the",
"type",
"of",
"token",
"found",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/Tokenizer.java#L51-L162 |
157,437 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.addWorkgroupAssignment | public ResourceAssignmentWorkgroupFields addWorkgroupAssignment() throws MPXJException
{
if (m_workgroup != null)
{
throw new MPXJException(MPXJException.MAXIMUM_RECORDS);
}
m_workgroup = new ResourceAssignmentWorkgroupFields();
return (m_workgroup);
} | java | public ResourceAssignmentWorkgroupFields addWorkgroupAssignment() throws MPXJException
{
if (m_workgroup != null)
{
throw new MPXJException(MPXJException.MAXIMUM_RECORDS);
}
m_workgroup = new ResourceAssignmentWorkgroupFields();
return (m_workgroup);
} | [
"public",
"ResourceAssignmentWorkgroupFields",
"addWorkgroupAssignment",
"(",
")",
"throws",
"MPXJException",
"{",
"if",
"(",
"m_workgroup",
"!=",
"null",
")",
"{",
"throw",
"new",
"MPXJException",
"(",
"MPXJException",
".",
"MAXIMUM_RECORDS",
")",
";",
"}",
"m_work... | This method allows a resource assignment workgroup fields record
to be added to the current resource assignment. A maximum of
one of these records can be added to a resource assignment record.
@return ResourceAssignmentWorkgroupFields object
@throws MPXJException if MSP defined limit of 1 is exceeded | [
"This",
"method",
"allows",
"a",
"resource",
"assignment",
"workgroup",
"fields",
"record",
"to",
"be",
"added",
"to",
"the",
"current",
"resource",
"assignment",
".",
"A",
"maximum",
"of",
"one",
"of",
"these",
"records",
"can",
"be",
"added",
"to",
"a",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L71-L81 |
157,438 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getStart | public Date getStart()
{
Date result = (Date) getCachedValue(AssignmentField.START);
if (result == null)
{
result = getTask().getStart();
}
return result;
} | java | public Date getStart()
{
Date result = (Date) getCachedValue(AssignmentField.START);
if (result == null)
{
result = getTask().getStart();
}
return result;
} | [
"public",
"Date",
"getStart",
"(",
")",
"{",
"Date",
"result",
"=",
"(",
"Date",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"START",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getTask",
"(",
")",
".",
"getStart",
... | Returns the start of this resource assignment.
@return start date | [
"Returns",
"the",
"start",
"of",
"this",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L348-L356 |
157,439 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getFinish | public Date getFinish()
{
Date result = (Date) getCachedValue(AssignmentField.FINISH);
if (result == null)
{
result = getTask().getFinish();
}
return result;
} | java | public Date getFinish()
{
Date result = (Date) getCachedValue(AssignmentField.FINISH);
if (result == null)
{
result = getTask().getFinish();
}
return result;
} | [
"public",
"Date",
"getFinish",
"(",
")",
"{",
"Date",
"result",
"=",
"(",
"Date",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"FINISH",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"getTask",
"(",
")",
".",
"getFinish",... | Returns the finish date for this resource assignment.
@return finish date | [
"Returns",
"the",
"finish",
"date",
"for",
"this",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L373-L381 |
157,440 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedOvertimeWork | public List<TimephasedWork> getTimephasedOvertimeWork()
{
if (m_timephasedOvertimeWork == null && m_timephasedWork != null && getOvertimeWork() != null)
{
double perDayFactor = getRemainingOvertimeWork().getDuration() / (getRemainingWork().getDuration() - getRemainingOvertimeWork().getDuration()... | java | public List<TimephasedWork> getTimephasedOvertimeWork()
{
if (m_timephasedOvertimeWork == null && m_timephasedWork != null && getOvertimeWork() != null)
{
double perDayFactor = getRemainingOvertimeWork().getDuration() / (getRemainingWork().getDuration() - getRemainingOvertimeWork().getDuration()... | [
"public",
"List",
"<",
"TimephasedWork",
">",
"getTimephasedOvertimeWork",
"(",
")",
"{",
"if",
"(",
"m_timephasedOvertimeWork",
"==",
"null",
"&&",
"m_timephasedWork",
"!=",
"null",
"&&",
"getOvertimeWork",
"(",
")",
"!=",
"null",
")",
"{",
"double",
"perDayFac... | Retrieves the timephased breakdown of the planned overtime work for this
resource assignment.
@return timephased planned work | [
"Retrieves",
"the",
"timephased",
"breakdown",
"of",
"the",
"planned",
"overtime",
"work",
"for",
"this",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L587-L600 |
157,441 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedCost | public List<TimephasedCost> getTimephasedCost()
{
if (m_timephasedCost == null)
{
Resource r = getResource();
ResourceType type = r != null ? r.getType() : ResourceType.WORK;
//for Work and Material resources, we will calculate in the normal way
if (type != ResourceTy... | java | public List<TimephasedCost> getTimephasedCost()
{
if (m_timephasedCost == null)
{
Resource r = getResource();
ResourceType type = r != null ? r.getType() : ResourceType.WORK;
//for Work and Material resources, we will calculate in the normal way
if (type != ResourceTy... | [
"public",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedCost",
"(",
")",
"{",
"if",
"(",
"m_timephasedCost",
"==",
"null",
")",
"{",
"Resource",
"r",
"=",
"getResource",
"(",
")",
";",
"ResourceType",
"type",
"=",
"r",
"!=",
"null",
"?",
"r",
".",
... | Retrieves the timephased breakdown of cost.
@return timephased cost | [
"Retrieves",
"the",
"timephased",
"breakdown",
"of",
"cost",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L629-L658 |
157,442 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedActualCost | public List<TimephasedCost> getTimephasedActualCost()
{
if (m_timephasedActualCost == null)
{
Resource r = getResource();
ResourceType type = r != null ? r.getType() : ResourceType.WORK;
//for Work and Material resources, we will calculate in the normal way
if (type !... | java | public List<TimephasedCost> getTimephasedActualCost()
{
if (m_timephasedActualCost == null)
{
Resource r = getResource();
ResourceType type = r != null ? r.getType() : ResourceType.WORK;
//for Work and Material resources, we will calculate in the normal way
if (type !... | [
"public",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedActualCost",
"(",
")",
"{",
"if",
"(",
"m_timephasedActualCost",
"==",
"null",
")",
"{",
"Resource",
"r",
"=",
"getResource",
"(",
")",
";",
"ResourceType",
"type",
"=",
"r",
"!=",
"null",
"?",
"r... | Retrieves the timephased breakdown of actual cost.
@return timephased actual cost | [
"Retrieves",
"the",
"timephased",
"breakdown",
"of",
"actual",
"cost",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L665-L695 |
157,443 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedCostMultipleRates | private List<TimephasedCost> getTimephasedCostMultipleRates(List<TimephasedWork> standardWorkList, List<TimephasedWork> overtimeWorkList)
{
List<TimephasedWork> standardWorkResult = new LinkedList<TimephasedWork>();
List<TimephasedWork> overtimeWorkResult = new LinkedList<TimephasedWork>();
CostRat... | java | private List<TimephasedCost> getTimephasedCostMultipleRates(List<TimephasedWork> standardWorkList, List<TimephasedWork> overtimeWorkList)
{
List<TimephasedWork> standardWorkResult = new LinkedList<TimephasedWork>();
List<TimephasedWork> overtimeWorkResult = new LinkedList<TimephasedWork>();
CostRat... | [
"private",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedCostMultipleRates",
"(",
"List",
"<",
"TimephasedWork",
">",
"standardWorkList",
",",
"List",
"<",
"TimephasedWork",
">",
"overtimeWorkList",
")",
"{",
"List",
"<",
"TimephasedWork",
">",
"standardWorkResult... | Generates timephased costs from timephased work where multiple cost rates
apply to the assignment.
@param standardWorkList timephased work
@param overtimeWorkList timephased work
@return timephased cost | [
"Generates",
"timephased",
"costs",
"from",
"timephased",
"work",
"where",
"multiple",
"cost",
"rates",
"apply",
"to",
"the",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L805-L839 |
157,444 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedCostFixedAmount | private List<TimephasedCost> getTimephasedCostFixedAmount()
{
List<TimephasedCost> result = new LinkedList<TimephasedCost>();
ProjectCalendar cal = getCalendar();
double remainingCost = getRemainingCost().doubleValue();
if (remainingCost > 0)
{
AccrueType accrueAt = getResou... | java | private List<TimephasedCost> getTimephasedCostFixedAmount()
{
List<TimephasedCost> result = new LinkedList<TimephasedCost>();
ProjectCalendar cal = getCalendar();
double remainingCost = getRemainingCost().doubleValue();
if (remainingCost > 0)
{
AccrueType accrueAt = getResou... | [
"private",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedCostFixedAmount",
"(",
")",
"{",
"List",
"<",
"TimephasedCost",
">",
"result",
"=",
"new",
"LinkedList",
"<",
"TimephasedCost",
">",
"(",
")",
";",
"ProjectCalendar",
"cal",
"=",
"getCalendar",
"(",
... | Generates timephased costs from the assignment's cost value. Used for Cost type Resources.
@return timephased cost | [
"Generates",
"timephased",
"costs",
"from",
"the",
"assignment",
"s",
"cost",
"value",
".",
"Used",
"for",
"Cost",
"type",
"Resources",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L846-L913 |
157,445 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedActualCostFixedAmount | private List<TimephasedCost> getTimephasedActualCostFixedAmount()
{
List<TimephasedCost> result = new LinkedList<TimephasedCost>();
double actualCost = getActualCost().doubleValue();
if (actualCost > 0)
{
AccrueType accrueAt = getResource().getAccrueAt();
if (accrueAt == ... | java | private List<TimephasedCost> getTimephasedActualCostFixedAmount()
{
List<TimephasedCost> result = new LinkedList<TimephasedCost>();
double actualCost = getActualCost().doubleValue();
if (actualCost > 0)
{
AccrueType accrueAt = getResource().getAccrueAt();
if (accrueAt == ... | [
"private",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedActualCostFixedAmount",
"(",
")",
"{",
"List",
"<",
"TimephasedCost",
">",
"result",
"=",
"new",
"LinkedList",
"<",
"TimephasedCost",
">",
"(",
")",
";",
"double",
"actualCost",
"=",
"getActualCost",
"... | Generates timephased actual costs from the assignment's cost value. Used for Cost type Resources.
@return timephased cost | [
"Generates",
"timephased",
"actual",
"costs",
"from",
"the",
"assignment",
"s",
"cost",
"value",
".",
"Used",
"for",
"Cost",
"type",
"Resources",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L920-L951 |
157,446 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.splitWork | private List<TimephasedWork> splitWork(CostRateTable table, ProjectCalendar calendar, TimephasedWork work, int rateIndex)
{
List<TimephasedWork> result = new LinkedList<TimephasedWork>();
work.setTotalAmount(Duration.getInstance(0, work.getAmountPerDay().getUnits()));
while (true)
{
... | java | private List<TimephasedWork> splitWork(CostRateTable table, ProjectCalendar calendar, TimephasedWork work, int rateIndex)
{
List<TimephasedWork> result = new LinkedList<TimephasedWork>();
work.setTotalAmount(Duration.getInstance(0, work.getAmountPerDay().getUnits()));
while (true)
{
... | [
"private",
"List",
"<",
"TimephasedWork",
">",
"splitWork",
"(",
"CostRateTable",
"table",
",",
"ProjectCalendar",
"calendar",
",",
"TimephasedWork",
"work",
",",
"int",
"rateIndex",
")",
"{",
"List",
"<",
"TimephasedWork",
">",
"result",
"=",
"new",
"LinkedList... | Splits timephased work segments in line with cost rates. Note that this is
an approximation - where a rate changes during a working day, the second
rate is used for the whole day.
@param table cost rate table
@param calendar calendar used by this assignment
@param work timephased work segment
@param rateIndex rate app... | [
"Splits",
"timephased",
"work",
"segments",
"in",
"line",
"with",
"cost",
"rates",
".",
"Note",
"that",
"this",
"is",
"an",
"approximation",
"-",
"where",
"a",
"rate",
"changes",
"during",
"a",
"working",
"day",
"the",
"second",
"rate",
"is",
"used",
"for"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1061-L1089 |
157,447 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.hasMultipleCostRates | private boolean hasMultipleCostRates()
{
boolean result = false;
CostRateTable table = getCostRateTable();
if (table != null)
{
//
// We assume here that if there is just one entry in the cost rate
// table, this is an open ended rate which covers any work, it won't... | java | private boolean hasMultipleCostRates()
{
boolean result = false;
CostRateTable table = getCostRateTable();
if (table != null)
{
//
// We assume here that if there is just one entry in the cost rate
// table, this is an open ended rate which covers any work, it won't... | [
"private",
"boolean",
"hasMultipleCostRates",
"(",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"CostRateTable",
"table",
"=",
"getCostRateTable",
"(",
")",
";",
"if",
"(",
"table",
"!=",
"null",
")",
"{",
"//",
"// We assume here that if there is just one en... | Used to determine if multiple cost rates apply to this assignment.
@return true if multiple cost rates apply to this assignment | [
"Used",
"to",
"determine",
"if",
"multiple",
"cost",
"rates",
"apply",
"to",
"this",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1096-L1119 |
157,448 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getCostRateTableEntry | private CostRateTableEntry getCostRateTableEntry(Date date)
{
CostRateTableEntry result;
CostRateTable table = getCostRateTable();
if (table == null)
{
Resource resource = getResource();
result = new CostRateTableEntry(resource.getStandardRate(), TimeUnit.HOURS, resource.ge... | java | private CostRateTableEntry getCostRateTableEntry(Date date)
{
CostRateTableEntry result;
CostRateTable table = getCostRateTable();
if (table == null)
{
Resource resource = getResource();
result = new CostRateTableEntry(resource.getStandardRate(), TimeUnit.HOURS, resource.ge... | [
"private",
"CostRateTableEntry",
"getCostRateTableEntry",
"(",
"Date",
"date",
")",
"{",
"CostRateTableEntry",
"result",
";",
"CostRateTable",
"table",
"=",
"getCostRateTable",
"(",
")",
";",
"if",
"(",
"table",
"==",
"null",
")",
"{",
"Resource",
"resource",
"=... | Retrieves the cost rate table entry active on a given date.
@param date target date
@return cost rate table entry | [
"Retrieves",
"the",
"cost",
"rate",
"table",
"entry",
"active",
"on",
"a",
"given",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1127-L1150 |
157,449 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getCostRateTableEntryIndex | private int getCostRateTableEntryIndex(Date date)
{
int result = -1;
CostRateTable table = getCostRateTable();
if (table != null)
{
if (table.size() == 1)
{
result = 0;
}
else
{
result = table.getIndexByDate(date);
... | java | private int getCostRateTableEntryIndex(Date date)
{
int result = -1;
CostRateTable table = getCostRateTable();
if (table != null)
{
if (table.size() == 1)
{
result = 0;
}
else
{
result = table.getIndexByDate(date);
... | [
"private",
"int",
"getCostRateTableEntryIndex",
"(",
"Date",
"date",
")",
"{",
"int",
"result",
"=",
"-",
"1",
";",
"CostRateTable",
"table",
"=",
"getCostRateTable",
"(",
")",
";",
"if",
"(",
"table",
"!=",
"null",
")",
"{",
"if",
"(",
"table",
".",
"... | Retrieves the index of a cost rate table entry active on a given date.
@param date target date
@return cost rate table entry index | [
"Retrieves",
"the",
"index",
"of",
"a",
"cost",
"rate",
"table",
"entry",
"active",
"on",
"a",
"given",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1158-L1176 |
157,450 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedBaselineWork | public List<TimephasedWork> getTimephasedBaselineWork(int index)
{
return m_timephasedBaselineWork[index] == null ? null : m_timephasedBaselineWork[index].getData();
} | java | public List<TimephasedWork> getTimephasedBaselineWork(int index)
{
return m_timephasedBaselineWork[index] == null ? null : m_timephasedBaselineWork[index].getData();
} | [
"public",
"List",
"<",
"TimephasedWork",
">",
"getTimephasedBaselineWork",
"(",
"int",
"index",
")",
"{",
"return",
"m_timephasedBaselineWork",
"[",
"index",
"]",
"==",
"null",
"?",
"null",
":",
"m_timephasedBaselineWork",
"[",
"index",
"]",
".",
"getData",
"(",... | Retrieve timephased baseline work. Note that index 0 represents "Baseline",
index 1 represents "Baseline1" and so on.
@param index baseline index
@return timephased work, or null if no baseline is present | [
"Retrieve",
"timephased",
"baseline",
"work",
".",
"Note",
"that",
"index",
"0",
"represents",
"Baseline",
"index",
"1",
"represents",
"Baseline1",
"and",
"so",
"on",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1220-L1223 |
157,451 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getTimephasedBaselineCost | public List<TimephasedCost> getTimephasedBaselineCost(int index)
{
return m_timephasedBaselineCost[index] == null ? null : m_timephasedBaselineCost[index].getData();
} | java | public List<TimephasedCost> getTimephasedBaselineCost(int index)
{
return m_timephasedBaselineCost[index] == null ? null : m_timephasedBaselineCost[index].getData();
} | [
"public",
"List",
"<",
"TimephasedCost",
">",
"getTimephasedBaselineCost",
"(",
"int",
"index",
")",
"{",
"return",
"m_timephasedBaselineCost",
"[",
"index",
"]",
"==",
"null",
"?",
"null",
":",
"m_timephasedBaselineCost",
"[",
"index",
"]",
".",
"getData",
"(",... | Retrieve timephased baseline cost. Note that index 0 represents "Baseline",
index 1 represents "Baseline1" and so on.
@param index baseline index
@return timephased work, or null if no baseline is present | [
"Retrieve",
"timephased",
"baseline",
"cost",
".",
"Note",
"that",
"index",
"0",
"represents",
"Baseline",
"index",
"1",
"represents",
"Baseline1",
"and",
"so",
"on",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1232-L1235 |
157,452 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getCalendar | public ProjectCalendar getCalendar()
{
ProjectCalendar calendar = null;
Resource resource = getResource();
if (resource != null)
{
calendar = resource.getResourceCalendar();
}
Task task = getTask();
if (calendar == null || task.getIgnoreResourceCalendar())
{
... | java | public ProjectCalendar getCalendar()
{
ProjectCalendar calendar = null;
Resource resource = getResource();
if (resource != null)
{
calendar = resource.getResourceCalendar();
}
Task task = getTask();
if (calendar == null || task.getIgnoreResourceCalendar())
{
... | [
"public",
"ProjectCalendar",
"getCalendar",
"(",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"null",
";",
"Resource",
"resource",
"=",
"getResource",
"(",
")",
";",
"if",
"(",
"resource",
"!=",
"null",
")",
"{",
"calendar",
"=",
"resource",
".",
"getResour... | Retrieves the calendar used for this resource assignment.
@return ProjectCalendar instance | [
"Retrieves",
"the",
"calendar",
"used",
"for",
"this",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1242-L1258 |
157,453 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setEnterpriseCost | public void setEnterpriseCost(int index, Number value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_COST, index), value);
} | java | public void setEnterpriseCost(int index, Number value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_COST, index), value);
} | [
"public",
"void",
"setEnterpriseCost",
"(",
"int",
"index",
",",
"Number",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"ENTERPRISE_COST",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise cost value.
@param index cost index (1-30)
@param value cost value | [
"Set",
"an",
"enterprise",
"cost",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1694-L1697 |
157,454 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setEnterpriseDate | public void setEnterpriseDate(int index, Date value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_DATE, index), value);
} | java | public void setEnterpriseDate(int index, Date value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_DATE, index), value);
} | [
"public",
"void",
"setEnterpriseDate",
"(",
"int",
"index",
",",
"Date",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"ENTERPRISE_DATE",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise date value.
@param index date index (1-30)
@param value date value | [
"Set",
"an",
"enterprise",
"date",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1716-L1719 |
157,455 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setEnterpriseDuration | public void setEnterpriseDuration(int index, Duration value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_DURATION, index), value);
} | java | public void setEnterpriseDuration(int index, Duration value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_DURATION, index), value);
} | [
"public",
"void",
"setEnterpriseDuration",
"(",
"int",
"index",
",",
"Duration",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"ENTERPRISE_DURATION",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise duration value.
@param index duration index (1-30)
@param value duration value | [
"Set",
"an",
"enterprise",
"duration",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1738-L1741 |
157,456 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setEnterpriseNumber | public void setEnterpriseNumber(int index, Number value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_NUMBER, index), value);
} | java | public void setEnterpriseNumber(int index, Number value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_NUMBER, index), value);
} | [
"public",
"void",
"setEnterpriseNumber",
"(",
"int",
"index",
",",
"Number",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"ENTERPRISE_NUMBER",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise number value.
@param index number index (1-40)
@param value number value | [
"Set",
"an",
"enterprise",
"number",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1782-L1785 |
157,457 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setEnterpriseText | public void setEnterpriseText(int index, String value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_TEXT, index), value);
} | java | public void setEnterpriseText(int index, String value)
{
set(selectField(AssignmentFieldLists.ENTERPRISE_TEXT, index), value);
} | [
"public",
"void",
"setEnterpriseText",
"(",
"int",
"index",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"ENTERPRISE_TEXT",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise text value.
@param index text index (1-40)
@param value text value | [
"Set",
"an",
"enterprise",
"text",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1804-L1807 |
157,458 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getOvertimeCost | public Number getOvertimeCost()
{
Number cost = (Number) getCachedValue(AssignmentField.OVERTIME_COST);
if (cost == null)
{
Number actual = getActualOvertimeCost();
Number remaining = getRemainingOvertimeCost();
if (actual != null && remaining != null)
{
... | java | public Number getOvertimeCost()
{
Number cost = (Number) getCachedValue(AssignmentField.OVERTIME_COST);
if (cost == null)
{
Number actual = getActualOvertimeCost();
Number remaining = getRemainingOvertimeCost();
if (actual != null && remaining != null)
{
... | [
"public",
"Number",
"getOvertimeCost",
"(",
")",
"{",
"Number",
"cost",
"=",
"(",
"Number",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"OVERTIME_COST",
")",
";",
"if",
"(",
"cost",
"==",
"null",
")",
"{",
"Number",
"actual",
"=",
"getActualOvertimeC... | Returns the overtime cost of this resource assignment.
@return cost | [
"Returns",
"the",
"overtime",
"cost",
"of",
"this",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1907-L1921 |
157,459 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getPercentageWorkComplete | public Number getPercentageWorkComplete()
{
Number pct = (Number) getCachedValue(AssignmentField.PERCENT_WORK_COMPLETE);
if (pct == null)
{
Duration actualWork = getActualWork();
Duration work = getWork();
if (actualWork != null && work != null && work.getDuration() != 0)... | java | public Number getPercentageWorkComplete()
{
Number pct = (Number) getCachedValue(AssignmentField.PERCENT_WORK_COMPLETE);
if (pct == null)
{
Duration actualWork = getActualWork();
Duration work = getWork();
if (actualWork != null && work != null && work.getDuration() != 0)... | [
"public",
"Number",
"getPercentageWorkComplete",
"(",
")",
"{",
"Number",
"pct",
"=",
"(",
"Number",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"PERCENT_WORK_COMPLETE",
")",
";",
"if",
"(",
"pct",
"==",
"null",
")",
"{",
"Duration",
"actualWork",
"=",... | The % Work Complete field contains the current status of a task,
expressed as the percentage of the task's work that has been completed.
You can enter percent work complete, or you can have Microsoft Project
calculate it for you based on actual work on the task.
@return percentage as float | [
"The",
"%",
"Work",
"Complete",
"field",
"contains",
"the",
"current",
"status",
"of",
"a",
"task",
"expressed",
"as",
"the",
"percentage",
"of",
"the",
"task",
"s",
"work",
"that",
"has",
"been",
"completed",
".",
"You",
"can",
"enter",
"percent",
"work",... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L2198-L2212 |
157,460 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getStartVariance | public Duration getStartVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.START_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselineS... | java | public Duration getStartVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.START_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselineS... | [
"public",
"Duration",
"getStartVariance",
"(",
")",
"{",
"Duration",
"variance",
"=",
"(",
"Duration",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"START_VARIANCE",
")",
";",
"if",
"(",
"variance",
"==",
"null",
")",
"{",
"TimeUnit",
"format",
"=",
"... | Calculate the start variance.
@return start variance | [
"Calculate",
"the",
"start",
"variance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L2418-L2428 |
157,461 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getFinishVariance | public Duration getFinishVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.FINISH_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselin... | java | public Duration getFinishVariance()
{
Duration variance = (Duration) getCachedValue(AssignmentField.FINISH_VARIANCE);
if (variance == null)
{
TimeUnit format = getParentFile().getProjectProperties().getDefaultDurationUnits();
variance = DateHelper.getVariance(getTask(), getBaselin... | [
"public",
"Duration",
"getFinishVariance",
"(",
")",
"{",
"Duration",
"variance",
"=",
"(",
"Duration",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"FINISH_VARIANCE",
")",
";",
"if",
"(",
"variance",
"==",
"null",
")",
"{",
"TimeUnit",
"format",
"=",
... | Calculate the finish variance.
@return finish variance | [
"Calculate",
"the",
"finish",
"variance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L2447-L2457 |
157,462 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.getCostRateTableIndex | public int getCostRateTableIndex()
{
Integer value = (Integer) getCachedValue(AssignmentField.COST_RATE_TABLE);
return value == null ? 0 : value.intValue();
} | java | public int getCostRateTableIndex()
{
Integer value = (Integer) getCachedValue(AssignmentField.COST_RATE_TABLE);
return value == null ? 0 : value.intValue();
} | [
"public",
"int",
"getCostRateTableIndex",
"(",
")",
"{",
"Integer",
"value",
"=",
"(",
"Integer",
")",
"getCachedValue",
"(",
"AssignmentField",
".",
"COST_RATE_TABLE",
")",
";",
"return",
"value",
"==",
"null",
"?",
"0",
":",
"value",
".",
"intValue",
"(",
... | Returns the cost rate table index for this assignment.
@return cost rate table index | [
"Returns",
"the",
"cost",
"rate",
"table",
"index",
"for",
"this",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L2580-L2584 |
157,463 | joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.selectField | private AssignmentField selectField(AssignmentField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | java | private AssignmentField selectField(AssignmentField[] fields, int index)
{
if (index < 1 || index > fields.length)
{
throw new IllegalArgumentException(index + " is not a valid field index");
}
return (fields[index - 1]);
} | [
"private",
"AssignmentField",
"selectField",
"(",
"AssignmentField",
"[",
"]",
"fields",
",",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"1",
"||",
"index",
">",
"fields",
".",
"length",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"i... | Maps a field index to an AssignmentField instance.
@param fields array of fields used as the basis for the mapping.
@param index required field index
@return AssignmnetField instance | [
"Maps",
"a",
"field",
"index",
"to",
"an",
"AssignmentField",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L2683-L2690 |
157,464 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/ActivitySorter.java | ActivitySorter.sort | public void sort(ChildTaskContainer container)
{
// Do we have any tasks?
List<Task> tasks = container.getChildTasks();
if (!tasks.isEmpty())
{
for (Task task : tasks)
{
//
// Sort child activities
//
sort(task);
/... | java | public void sort(ChildTaskContainer container)
{
// Do we have any tasks?
List<Task> tasks = container.getChildTasks();
if (!tasks.isEmpty())
{
for (Task task : tasks)
{
//
// Sort child activities
//
sort(task);
/... | [
"public",
"void",
"sort",
"(",
"ChildTaskContainer",
"container",
")",
"{",
"// Do we have any tasks?",
"List",
"<",
"Task",
">",
"tasks",
"=",
"container",
".",
"getChildTasks",
"(",
")",
";",
"if",
"(",
"!",
"tasks",
".",
"isEmpty",
"(",
")",
")",
"{",
... | Recursively sort the supplied child tasks.
@param container child tasks | [
"Recursively",
"sort",
"the",
"supplied",
"child",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/ActivitySorter.java#L57-L110 |
157,465 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/TableReader.java | TableReader.read | public void read(File file, Table table) throws IOException
{
//System.out.println("Reading " + file.getName());
InputStream is = null;
try
{
is = new FileInputStream(file);
read(is, table);
}
finally
{
StreamHelper.closeQuietly(is);
}
} | java | public void read(File file, Table table) throws IOException
{
//System.out.println("Reading " + file.getName());
InputStream is = null;
try
{
is = new FileInputStream(file);
read(is, table);
}
finally
{
StreamHelper.closeQuietly(is);
}
} | [
"public",
"void",
"read",
"(",
"File",
"file",
",",
"Table",
"table",
")",
"throws",
"IOException",
"{",
"//System.out.println(\"Reading \" + file.getName());",
"InputStream",
"is",
"=",
"null",
";",
"try",
"{",
"is",
"=",
"new",
"FileInputStream",
"(",
"file",
... | Read the table from the file and populate the supplied Table instance.
@param file database file
@param table Table instance | [
"Read",
"the",
"table",
"from",
"the",
"file",
"and",
"populate",
"the",
"supplied",
"Table",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/TableReader.java#L60-L74 |
157,466 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/TableReader.java | TableReader.readPage | private void readPage(byte[] buffer, Table table)
{
int magicNumber = getShort(buffer, 0);
if (magicNumber == 0x4400)
{
//System.out.println(ByteArrayHelper.hexdump(buffer, 0, 6, true, 16, ""));
int recordSize = m_definition.getRecordSize();
RowValidator rowValidator = m_... | java | private void readPage(byte[] buffer, Table table)
{
int magicNumber = getShort(buffer, 0);
if (magicNumber == 0x4400)
{
//System.out.println(ByteArrayHelper.hexdump(buffer, 0, 6, true, 16, ""));
int recordSize = m_definition.getRecordSize();
RowValidator rowValidator = m_... | [
"private",
"void",
"readPage",
"(",
"byte",
"[",
"]",
"buffer",
",",
"Table",
"table",
")",
"{",
"int",
"magicNumber",
"=",
"getShort",
"(",
"buffer",
",",
"0",
")",
";",
"if",
"(",
"magicNumber",
"==",
"0x4400",
")",
"{",
"//System.out.println(ByteArrayHe... | Reads data from a single page of the database file.
@param buffer page from the database file
@param table Table instance | [
"Reads",
"data",
"from",
"a",
"single",
"page",
"of",
"the",
"database",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/TableReader.java#L108-L142 |
157,467 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/PropsBlock.java | PropsBlock.populateMap | private void populateMap(byte[] data, Integer previousItemOffset, Integer previousItemKey, Integer itemOffset)
{
if (previousItemOffset != null)
{
int itemSize = itemOffset.intValue() - previousItemOffset.intValue();
byte[] itemData = new byte[itemSize];
System.arraycopy(data, ... | java | private void populateMap(byte[] data, Integer previousItemOffset, Integer previousItemKey, Integer itemOffset)
{
if (previousItemOffset != null)
{
int itemSize = itemOffset.intValue() - previousItemOffset.intValue();
byte[] itemData = new byte[itemSize];
System.arraycopy(data, ... | [
"private",
"void",
"populateMap",
"(",
"byte",
"[",
"]",
"data",
",",
"Integer",
"previousItemOffset",
",",
"Integer",
"previousItemKey",
",",
"Integer",
"itemOffset",
")",
"{",
"if",
"(",
"previousItemOffset",
"!=",
"null",
")",
"{",
"int",
"itemSize",
"=",
... | Method used to extract data from the block of properties and
insert the key value pair into a map.
@param data block of property data
@param previousItemOffset previous offset
@param previousItemKey item key
@param itemOffset current item offset | [
"Method",
"used",
"to",
"extract",
"data",
"from",
"the",
"block",
"of",
"properties",
"and",
"insert",
"the",
"key",
"value",
"pair",
"into",
"a",
"map",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/PropsBlock.java#L83-L92 |
157,468 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/HexDumpController.java | HexDumpController.viewDocument | public void viewDocument(DocumentEntry entry)
{
InputStream is = null;
try
{
is = new DocumentInputStream(entry);
byte[] data = new byte[is.available()];
is.read(data);
m_model.setData(data);
updateTables();
}
catch (IOException ex)
{... | java | public void viewDocument(DocumentEntry entry)
{
InputStream is = null;
try
{
is = new DocumentInputStream(entry);
byte[] data = new byte[is.available()];
is.read(data);
m_model.setData(data);
updateTables();
}
catch (IOException ex)
{... | [
"public",
"void",
"viewDocument",
"(",
"DocumentEntry",
"entry",
")",
"{",
"InputStream",
"is",
"=",
"null",
";",
"try",
"{",
"is",
"=",
"new",
"DocumentInputStream",
"(",
"entry",
")",
";",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"is",
".",... | Command to select a document from the POIFS for viewing.
@param entry document to view | [
"Command",
"to",
"select",
"a",
"document",
"from",
"the",
"POIFS",
"for",
"viewing",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/HexDumpController.java#L112-L135 |
157,469 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/HexDumpController.java | HexDumpController.updateTables | protected void updateTables()
{
byte[] data = m_model.getData();
int columns = m_model.getColumns();
int rows = (data.length / columns) + 1;
int offset = m_model.getOffset();
String[][] hexData = new String[rows][columns];
String[][] asciiData = new String[rows][columns];
... | java | protected void updateTables()
{
byte[] data = m_model.getData();
int columns = m_model.getColumns();
int rows = (data.length / columns) + 1;
int offset = m_model.getOffset();
String[][] hexData = new String[rows][columns];
String[][] asciiData = new String[rows][columns];
... | [
"protected",
"void",
"updateTables",
"(",
")",
"{",
"byte",
"[",
"]",
"data",
"=",
"m_model",
".",
"getData",
"(",
")",
";",
"int",
"columns",
"=",
"m_model",
".",
"getColumns",
"(",
")",
";",
"int",
"rows",
"=",
"(",
"data",
".",
"length",
"/",
"c... | Update the content of the tables. | [
"Update",
"the",
"content",
"of",
"the",
"tables",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/HexDumpController.java#L140-L199 |
157,470 | joniles/mpxj | src/main/java/net/sf/mpxj/common/FieldTypeHelper.java | FieldTypeHelper.getInstance | public static final FieldType getInstance(int fieldID)
{
FieldType result;
int prefix = fieldID & 0xFFFF0000;
int index = fieldID & 0x0000FFFF;
switch (prefix)
{
case MPPTaskField.TASK_FIELD_BASE:
{
result = MPPTaskField.getInstance(index);
if ... | java | public static final FieldType getInstance(int fieldID)
{
FieldType result;
int prefix = fieldID & 0xFFFF0000;
int index = fieldID & 0x0000FFFF;
switch (prefix)
{
case MPPTaskField.TASK_FIELD_BASE:
{
result = MPPTaskField.getInstance(index);
if ... | [
"public",
"static",
"final",
"FieldType",
"getInstance",
"(",
"int",
"fieldID",
")",
"{",
"FieldType",
"result",
";",
"int",
"prefix",
"=",
"fieldID",
"&",
"0xFFFF0000",
";",
"int",
"index",
"=",
"fieldID",
"&",
"0x0000FFFF",
";",
"switch",
"(",
"prefix",
... | Retrieve a FieldType instance based on an ID value from
an MPP9 or MPP12 file.
@param fieldID field ID
@return FieldType instance | [
"Retrieve",
"a",
"FieldType",
"instance",
"based",
"on",
"an",
"ID",
"value",
"from",
"an",
"MPP9",
"or",
"MPP12",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FieldTypeHelper.java#L87-L143 |
157,471 | joniles/mpxj | src/main/java/net/sf/mpxj/common/FieldTypeHelper.java | FieldTypeHelper.getPlaceholder | private static FieldType getPlaceholder(final Class<?> type, final int fieldID)
{
return new FieldType()
{
@Override public FieldTypeClass getFieldTypeClass()
{
return FieldTypeClass.UNKNOWN;
}
@Override public String name()
{
return "... | java | private static FieldType getPlaceholder(final Class<?> type, final int fieldID)
{
return new FieldType()
{
@Override public FieldTypeClass getFieldTypeClass()
{
return FieldTypeClass.UNKNOWN;
}
@Override public String name()
{
return "... | [
"private",
"static",
"FieldType",
"getPlaceholder",
"(",
"final",
"Class",
"<",
"?",
">",
"type",
",",
"final",
"int",
"fieldID",
")",
"{",
"return",
"new",
"FieldType",
"(",
")",
"{",
"@",
"Override",
"public",
"FieldTypeClass",
"getFieldTypeClass",
"(",
")... | Generate a placeholder for an unknown type.
@param type expected type
@param fieldID field ID
@return placeholder | [
"Generate",
"a",
"placeholder",
"for",
"an",
"unknown",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FieldTypeHelper.java#L218-L262 |
157,472 | joniles/mpxj | src/main/java/net/sf/mpxj/common/FieldTypeHelper.java | FieldTypeHelper.valueIsNotDefault | public static final boolean valueIsNotDefault(FieldType type, Object value)
{
boolean result = true;
if (value == null)
{
result = false;
}
else
{
DataType dataType = type.getDataType();
switch (dataType)
{
case BOOLEAN:
... | java | public static final boolean valueIsNotDefault(FieldType type, Object value)
{
boolean result = true;
if (value == null)
{
result = false;
}
else
{
DataType dataType = type.getDataType();
switch (dataType)
{
case BOOLEAN:
... | [
"public",
"static",
"final",
"boolean",
"valueIsNotDefault",
"(",
"FieldType",
"type",
",",
"Object",
"value",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"result",
"=",
"false",
";",
"}",
"else",
"{",
"... | Determines if this value is the default value for the given field type.
@param type field type
@param value value
@return true if the value is not default | [
"Determines",
"if",
"this",
"value",
"is",
"the",
"default",
"value",
"for",
"the",
"given",
"field",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FieldTypeHelper.java#L313-L353 |
157,473 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.readAll | public List<ProjectFile> readAll(InputStream is, boolean linkCrossProjectRelations) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
m_numberFormat = new DecimalFormat();
processFile(is);
List<Row> rows = getRows("project", null, null);
... | java | public List<ProjectFile> readAll(InputStream is, boolean linkCrossProjectRelations) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
m_numberFormat = new DecimalFormat();
processFile(is);
List<Row> rows = getRows("project", null, null);
... | [
"public",
"List",
"<",
"ProjectFile",
">",
"readAll",
"(",
"InputStream",
"is",
",",
"boolean",
"linkCrossProjectRelations",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"m_tables",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"Row",
">",
">",... | This is a convenience method which allows all projects in an
XER file to be read in a single pass.
@param is input stream
@param linkCrossProjectRelations add Relation links that cross ProjectFile boundaries
@return list of ProjectFile instances
@throws MPXJException | [
"This",
"is",
"a",
"convenience",
"method",
"which",
"allows",
"all",
"projects",
"in",
"an",
"XER",
"file",
"to",
"be",
"read",
"in",
"a",
"single",
"pass",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L177-L250 |
157,474 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.processFile | private void processFile(InputStream is) throws MPXJException
{
int line = 1;
try
{
//
// Test the header and extract the separator. If this is successful,
// we reset the stream back as far as we can. The design of the
// BufferedInputStream class means that we... | java | private void processFile(InputStream is) throws MPXJException
{
int line = 1;
try
{
//
// Test the header and extract the separator. If this is successful,
// we reset the stream back as far as we can. The design of the
// BufferedInputStream class means that we... | [
"private",
"void",
"processFile",
"(",
"InputStream",
"is",
")",
"throws",
"MPXJException",
"{",
"int",
"line",
"=",
"1",
";",
"try",
"{",
"//",
"// Test the header and extract the separator. If this is successful,",
"// we reset the stream back as far as we can. The design of ... | Reads the XER file table and row structure ready for processing.
@param is input stream
@throws MPXJException | [
"Reads",
"the",
"XER",
"file",
"table",
"and",
"row",
"structure",
"ready",
"for",
"processing",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L258-L307 |
157,475 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.getCharset | private Charset getCharset()
{
Charset result = m_charset;
if (result == null)
{
// We default to CP1252 as this seems to be the most common encoding
result = m_encoding == null ? CharsetHelper.CP1252 : Charset.forName(m_encoding);
}
return result;
} | java | private Charset getCharset()
{
Charset result = m_charset;
if (result == null)
{
// We default to CP1252 as this seems to be the most common encoding
result = m_encoding == null ? CharsetHelper.CP1252 : Charset.forName(m_encoding);
}
return result;
} | [
"private",
"Charset",
"getCharset",
"(",
")",
"{",
"Charset",
"result",
"=",
"m_charset",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"// We default to CP1252 as this seems to be the most common encoding",
"result",
"=",
"m_encoding",
"==",
"null",
"?",
"Chars... | Retrieve the Charset used to read the file.
@return Charset instance | [
"Retrieve",
"the",
"Charset",
"used",
"to",
"read",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L314-L323 |
157,476 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.processProjectID | private void processProjectID()
{
if (m_projectID == null)
{
List<Row> rows = getRows("project", null, null);
if (!rows.isEmpty())
{
Row row = rows.get(0);
m_projectID = row.getInteger("proj_id");
}
}
} | java | private void processProjectID()
{
if (m_projectID == null)
{
List<Row> rows = getRows("project", null, null);
if (!rows.isEmpty())
{
Row row = rows.get(0);
m_projectID = row.getInteger("proj_id");
}
}
} | [
"private",
"void",
"processProjectID",
"(",
")",
"{",
"if",
"(",
"m_projectID",
"==",
"null",
")",
"{",
"List",
"<",
"Row",
">",
"rows",
"=",
"getRows",
"(",
"\"project\"",
",",
"null",
",",
"null",
")",
";",
"if",
"(",
"!",
"rows",
".",
"isEmpty",
... | If the user has not specified a project ID, this method
retrieves the ID of the first project in the file. | [
"If",
"the",
"user",
"has",
"not",
"specified",
"a",
"project",
"ID",
"this",
"method",
"retrieves",
"the",
"ID",
"of",
"the",
"first",
"project",
"in",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L329-L340 |
157,477 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.processCurrency | private void processCurrency(Row row)
{
String currencyName = row.getString("curr_short_name");
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator(row.getString("decimal_symbol").charAt(0));
symbols.setGroupingSeparator(row.getString("digit_group_symbol").c... | java | private void processCurrency(Row row)
{
String currencyName = row.getString("curr_short_name");
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator(row.getString("decimal_symbol").charAt(0));
symbols.setGroupingSeparator(row.getString("digit_group_symbol").c... | [
"private",
"void",
"processCurrency",
"(",
"Row",
"row",
")",
"{",
"String",
"currencyName",
"=",
"row",
".",
"getString",
"(",
"\"curr_short_name\"",
")",
";",
"DecimalFormatSymbols",
"symbols",
"=",
"new",
"DecimalFormatSymbols",
"(",
")",
";",
"symbols",
".",... | Process a currency definition.
@param row record from XER file | [
"Process",
"a",
"currency",
"definition",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L347-L363 |
157,478 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.listProjects | public Map<Integer, String> listProjects(InputStream is) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
processFile(is);
Map<Integer, String> result = new HashMap<Integer, String>();
List<Row> rows = getRows("project", null, null);
... | java | public Map<Integer, String> listProjects(InputStream is) throws MPXJException
{
try
{
m_tables = new HashMap<String, List<Row>>();
processFile(is);
Map<Integer, String> result = new HashMap<Integer, String>();
List<Row> rows = getRows("project", null, null);
... | [
"public",
"Map",
"<",
"Integer",
",",
"String",
">",
"listProjects",
"(",
"InputStream",
"is",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"m_tables",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"Row",
">",
">",
"(",
")",
";",
"process... | Populates a Map instance representing the IDs and names of
projects available in the current file.
@param is input stream used to read XER file
@return Map instance containing ID and name pairs
@throws MPXJException | [
"Populates",
"a",
"Map",
"instance",
"representing",
"the",
"IDs",
"and",
"names",
"of",
"projects",
"available",
"in",
"the",
"current",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L373-L399 |
157,479 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.processScheduleOptions | private void processScheduleOptions()
{
List<Row> rows = getRows("schedoptions", "proj_id", m_projectID);
if (rows.isEmpty() == false)
{
Row row = rows.get(0);
Map<String, Object> customProperties = new HashMap<String, Object>();
customProperties.put("LagCalendar", row.ge... | java | private void processScheduleOptions()
{
List<Row> rows = getRows("schedoptions", "proj_id", m_projectID);
if (rows.isEmpty() == false)
{
Row row = rows.get(0);
Map<String, Object> customProperties = new HashMap<String, Object>();
customProperties.put("LagCalendar", row.ge... | [
"private",
"void",
"processScheduleOptions",
"(",
")",
"{",
"List",
"<",
"Row",
">",
"rows",
"=",
"getRows",
"(",
"\"schedoptions\"",
",",
"\"proj_id\"",
",",
"m_projectID",
")",
";",
"if",
"(",
"rows",
".",
"isEmpty",
"(",
")",
"==",
"false",
")",
"{",
... | Process schedule options from SCHEDOPTIONS. This table only seems to exist
in XER files, not P6 databases. | [
"Process",
"schedule",
"options",
"from",
"SCHEDOPTIONS",
".",
"This",
"table",
"only",
"seems",
"to",
"exist",
"in",
"XER",
"files",
"not",
"P6",
"databases",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L438-L452 |
157,480 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.readRecord | private void readRecord(Tokenizer tk, List<String> record) throws IOException
{
record.clear();
while (tk.nextToken() == Tokenizer.TT_WORD)
{
record.add(tk.getToken());
}
} | java | private void readRecord(Tokenizer tk, List<String> record) throws IOException
{
record.clear();
while (tk.nextToken() == Tokenizer.TT_WORD)
{
record.add(tk.getToken());
}
} | [
"private",
"void",
"readRecord",
"(",
"Tokenizer",
"tk",
",",
"List",
"<",
"String",
">",
"record",
")",
"throws",
"IOException",
"{",
"record",
".",
"clear",
"(",
")",
";",
"while",
"(",
"tk",
".",
"nextToken",
"(",
")",
"==",
"Tokenizer",
".",
"TT_WO... | Reads each token from a single record and adds it to a list.
@param tk tokenizer
@param record list of tokens
@throws IOException | [
"Reads",
"each",
"token",
"from",
"a",
"single",
"record",
"and",
"adds",
"it",
"to",
"a",
"list",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L529-L536 |
157,481 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.processRecord | private boolean processRecord(List<String> record) throws MPXJException
{
boolean done = false;
XerRecordType type = RECORD_TYPE_MAP.get(record.get(0));
if (type == null)
{
throw new MPXJException(MPXJException.INVALID_FORMAT);
}
switch (type)
{
case HEAD... | java | private boolean processRecord(List<String> record) throws MPXJException
{
boolean done = false;
XerRecordType type = RECORD_TYPE_MAP.get(record.get(0));
if (type == null)
{
throw new MPXJException(MPXJException.INVALID_FORMAT);
}
switch (type)
{
case HEAD... | [
"private",
"boolean",
"processRecord",
"(",
"List",
"<",
"String",
">",
"record",
")",
"throws",
"MPXJException",
"{",
"boolean",
"done",
"=",
"false",
";",
"XerRecordType",
"type",
"=",
"RECORD_TYPE_MAP",
".",
"get",
"(",
"record",
".",
"get",
"(",
"0",
"... | Handles a complete record at a time, stores it in a form ready for
further processing.
@param record record to be processed
@return flag indicating if this is the last record in the file to be processed
@throws MPXJException | [
"Handles",
"a",
"complete",
"record",
"at",
"a",
"time",
"stores",
"it",
"in",
"a",
"form",
"ready",
"for",
"further",
"processing",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L546-L698 |
157,482 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java | PrimaveraXERFileReader.getRows | private List<Row> getRows(String tableName, String columnName, Integer id)
{
List<Row> result;
List<Row> table = m_tables.get(tableName);
if (table == null)
{
result = Collections.<Row> emptyList();
}
else
{
if (columnName == null)
{
re... | java | private List<Row> getRows(String tableName, String columnName, Integer id)
{
List<Row> result;
List<Row> table = m_tables.get(tableName);
if (table == null)
{
result = Collections.<Row> emptyList();
}
else
{
if (columnName == null)
{
re... | [
"private",
"List",
"<",
"Row",
">",
"getRows",
"(",
"String",
"tableName",
",",
"String",
"columnName",
",",
"Integer",
"id",
")",
"{",
"List",
"<",
"Row",
">",
"result",
";",
"List",
"<",
"Row",
">",
"table",
"=",
"m_tables",
".",
"get",
"(",
"table... | Filters a list of rows from the named table. If a column name and a value
are supplied, then use this to filter the rows. If no column name is
supplied, then return all rows.
@param tableName table name
@param columnName filter column name
@param id filter column value
@return filtered list of rows | [
"Filters",
"a",
"list",
"of",
"rows",
"from",
"the",
"named",
"table",
".",
"If",
"a",
"column",
"name",
"and",
"a",
"value",
"are",
"supplied",
"then",
"use",
"this",
"to",
"filter",
"the",
"rows",
".",
"If",
"no",
"column",
"name",
"is",
"supplied",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraXERFileReader.java#L803-L830 |
157,483 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader.java | CustomFieldValueReader.getTypedValue | protected Object getTypedValue(int type, byte[] value)
{
Object result;
switch (type)
{
case 4: // Date
{
result = MPPUtility.getTimestamp(value, 0);
break;
}
case 6: // Duration
{
TimeUnit units = MPPUtility.getDura... | java | protected Object getTypedValue(int type, byte[] value)
{
Object result;
switch (type)
{
case 4: // Date
{
result = MPPUtility.getTimestamp(value, 0);
break;
}
case 6: // Duration
{
TimeUnit units = MPPUtility.getDura... | [
"protected",
"Object",
"getTypedValue",
"(",
"int",
"type",
",",
"byte",
"[",
"]",
"value",
")",
"{",
"Object",
"result",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"4",
":",
"// Date",
"{",
"result",
"=",
"MPPUtility",
".",
"getTimestamp",
"(",
"va... | Convert raw value as read from the MPP file into a Java type.
@param type MPP value type
@param value raw value data
@return Java object | [
"Convert",
"raw",
"value",
"as",
"read",
"from",
"the",
"MPP",
"file",
"into",
"a",
"Java",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader.java#L71-L117 |
157,484 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/common/Table.java | Table.addRow | public void addRow(String primaryKeyColumnName, Map<String, Object> map)
{
Integer rowNumber = Integer.valueOf(m_rowNumber++);
map.put("ROW_NUMBER", rowNumber);
Object primaryKey = null;
if (primaryKeyColumnName != null)
{
primaryKey = map.get(primaryKeyColumnName);
}
... | java | public void addRow(String primaryKeyColumnName, Map<String, Object> map)
{
Integer rowNumber = Integer.valueOf(m_rowNumber++);
map.put("ROW_NUMBER", rowNumber);
Object primaryKey = null;
if (primaryKeyColumnName != null)
{
primaryKey = map.get(primaryKeyColumnName);
}
... | [
"public",
"void",
"addRow",
"(",
"String",
"primaryKeyColumnName",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"Integer",
"rowNumber",
"=",
"Integer",
".",
"valueOf",
"(",
"m_rowNumber",
"++",
")",
";",
"map",
".",
"put",
"(",
"\"ROW_... | Add a row to the table. We have a limited understanding of the way
Btrieve handles outdated rows, so we use what we think is a version number
to try to ensure that we only have the latest rows.
@param primaryKeyColumnName primary key column name
@param map Map containing row data | [
"Add",
"a",
"row",
"to",
"the",
"table",
".",
"We",
"have",
"a",
"limited",
"understanding",
"of",
"the",
"way",
"Btrieve",
"handles",
"outdated",
"rows",
"so",
"we",
"use",
"what",
"we",
"think",
"is",
"a",
"version",
"number",
"to",
"try",
"to",
"ens... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/Table.java#L63-L93 |
157,485 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.getEmbeddedObjects | public static List<List<RTFEmbeddedObject>> getEmbeddedObjects(String text)
{
List<List<RTFEmbeddedObject>> objects = null;
List<RTFEmbeddedObject> objectData;
int offset = text.indexOf(OBJDATA);
if (offset != -1)
{
objects = new LinkedList<List<RTFEmbeddedObject>>();
... | java | public static List<List<RTFEmbeddedObject>> getEmbeddedObjects(String text)
{
List<List<RTFEmbeddedObject>> objects = null;
List<RTFEmbeddedObject> objectData;
int offset = text.indexOf(OBJDATA);
if (offset != -1)
{
objects = new LinkedList<List<RTFEmbeddedObject>>();
... | [
"public",
"static",
"List",
"<",
"List",
"<",
"RTFEmbeddedObject",
">",
">",
"getEmbeddedObjects",
"(",
"String",
"text",
")",
"{",
"List",
"<",
"List",
"<",
"RTFEmbeddedObject",
">>",
"objects",
"=",
"null",
";",
"List",
"<",
"RTFEmbeddedObject",
">",
"obje... | This method generates a list of lists. Each list represents the data
for an embedded object, and contains set set of RTFEmbeddedObject instances
that make up the embedded object. This method will return null
if there are no embedded objects in the RTF document.
@param text RTF document
@return list of lists of RTFEmbe... | [
"This",
"method",
"generates",
"a",
"list",
"of",
"lists",
".",
"Each",
"list",
"represents",
"the",
"data",
"for",
"an",
"embedded",
"object",
"and",
"contains",
"set",
"set",
"of",
"RTFEmbeddedObject",
"instances",
"that",
"make",
"up",
"the",
"embedded",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L149-L169 |
157,486 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.getInt | private int getInt(List<byte[]> blocks)
{
int result;
if (blocks.isEmpty() == false)
{
byte[] data = blocks.remove(0);
result = MPPUtility.getInt(data, 0);
}
else
{
result = 0;
}
return (result);
} | java | private int getInt(List<byte[]> blocks)
{
int result;
if (blocks.isEmpty() == false)
{
byte[] data = blocks.remove(0);
result = MPPUtility.getInt(data, 0);
}
else
{
result = 0;
}
return (result);
} | [
"private",
"int",
"getInt",
"(",
"List",
"<",
"byte",
"[",
"]",
">",
"blocks",
")",
"{",
"int",
"result",
";",
"if",
"(",
"blocks",
".",
"isEmpty",
"(",
")",
"==",
"false",
")",
"{",
"byte",
"[",
"]",
"data",
"=",
"blocks",
".",
"remove",
"(",
... | Internal method used to retrieve a integer from an
embedded data block.
@param blocks list of data blocks
@return int value | [
"Internal",
"method",
"used",
"to",
"retrieve",
"a",
"integer",
"from",
"an",
"embedded",
"data",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L178-L191 |
157,487 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.getData | private byte[] getData(List<byte[]> blocks, int length)
{
byte[] result;
if (blocks.isEmpty() == false)
{
if (length < 4)
{
length = 4;
}
result = new byte[length];
int offset = 0;
byte[] data;
while (offset < length)
... | java | private byte[] getData(List<byte[]> blocks, int length)
{
byte[] result;
if (blocks.isEmpty() == false)
{
if (length < 4)
{
length = 4;
}
result = new byte[length];
int offset = 0;
byte[] data;
while (offset < length)
... | [
"private",
"byte",
"[",
"]",
"getData",
"(",
"List",
"<",
"byte",
"[",
"]",
">",
"blocks",
",",
"int",
"length",
")",
"{",
"byte",
"[",
"]",
"result",
";",
"if",
"(",
"blocks",
".",
"isEmpty",
"(",
")",
"==",
"false",
")",
"{",
"if",
"(",
"leng... | Internal method used to retrieve a byte array from one
or more embedded data blocks. Consecutive data blocks may
need to be concatenated by this method in order to retrieve
the complete set of data.
@param blocks list of data blocks
@param length expected length of the data
@return byte array | [
"Internal",
"method",
"used",
"to",
"retrieve",
"a",
"byte",
"array",
"from",
"one",
"or",
"more",
"embedded",
"data",
"blocks",
".",
"Consecutive",
"data",
"blocks",
"may",
"need",
"to",
"be",
"concatenated",
"by",
"this",
"method",
"in",
"order",
"to",
"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L203-L231 |
157,488 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.readObjectData | private static int readObjectData(int offset, String text, List<RTFEmbeddedObject> objects)
{
LinkedList<byte[]> blocks = new LinkedList<byte[]>();
offset += (OBJDATA.length());
offset = skipEndOfLine(text, offset);
int length;
int lastOffset = offset;
while (offset != -1)
... | java | private static int readObjectData(int offset, String text, List<RTFEmbeddedObject> objects)
{
LinkedList<byte[]> blocks = new LinkedList<byte[]>();
offset += (OBJDATA.length());
offset = skipEndOfLine(text, offset);
int length;
int lastOffset = offset;
while (offset != -1)
... | [
"private",
"static",
"int",
"readObjectData",
"(",
"int",
"offset",
",",
"String",
"text",
",",
"List",
"<",
"RTFEmbeddedObject",
">",
"objects",
")",
"{",
"LinkedList",
"<",
"byte",
"[",
"]",
">",
"blocks",
"=",
"new",
"LinkedList",
"<",
"byte",
"[",
"]... | This method extracts byte arrays from the embedded object data
and converts them into RTFEmbeddedObject instances, which
it then adds to the supplied list.
@param offset offset into the RTF document
@param text RTF document
@param objects destination for RTFEmbeddedObject instances
@return new offset into the RTF docu... | [
"This",
"method",
"extracts",
"byte",
"arrays",
"from",
"the",
"embedded",
"object",
"data",
"and",
"converts",
"them",
"into",
"RTFEmbeddedObject",
"instances",
"which",
"it",
"then",
"adds",
"to",
"the",
"supplied",
"list",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L243-L275 |
157,489 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.skipEndOfLine | private static int skipEndOfLine(String text, int offset)
{
char c;
boolean finished = false;
while (finished == false)
{
c = text.charAt(offset);
switch (c)
{
case ' ': // found that OBJDATA could be followed by a space the EOL
case '\r':
... | java | private static int skipEndOfLine(String text, int offset)
{
char c;
boolean finished = false;
while (finished == false)
{
c = text.charAt(offset);
switch (c)
{
case ' ': // found that OBJDATA could be followed by a space the EOL
case '\r':
... | [
"private",
"static",
"int",
"skipEndOfLine",
"(",
"String",
"text",
",",
"int",
"offset",
")",
"{",
"char",
"c",
";",
"boolean",
"finished",
"=",
"false",
";",
"while",
"(",
"finished",
"==",
"false",
")",
"{",
"c",
"=",
"text",
".",
"charAt",
"(",
"... | This method skips the end-of-line markers in the RTF document.
It also indicates if the end of the embedded object has been reached.
@param text RTF document test
@param offset offset into the RTF document
@return new offset | [
"This",
"method",
"skips",
"the",
"end",
"-",
"of",
"-",
"line",
"markers",
"in",
"the",
"RTF",
"document",
".",
"It",
"also",
"indicates",
"if",
"the",
"end",
"of",
"the",
"embedded",
"object",
"has",
"been",
"reached",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L285-L319 |
157,490 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.getBlockLength | private static int getBlockLength(String text, int offset)
{
int startIndex = offset;
boolean finished = false;
char c;
while (finished == false)
{
c = text.charAt(offset);
switch (c)
{
case '\r':
case '\n':
case '}':
... | java | private static int getBlockLength(String text, int offset)
{
int startIndex = offset;
boolean finished = false;
char c;
while (finished == false)
{
c = text.charAt(offset);
switch (c)
{
case '\r':
case '\n':
case '}':
... | [
"private",
"static",
"int",
"getBlockLength",
"(",
"String",
"text",
",",
"int",
"offset",
")",
"{",
"int",
"startIndex",
"=",
"offset",
";",
"boolean",
"finished",
"=",
"false",
";",
"char",
"c",
";",
"while",
"(",
"finished",
"==",
"false",
")",
"{",
... | Calculates the length of the next block of RTF data.
@param text RTF data
@param offset current offset into this data
@return block length | [
"Calculates",
"the",
"length",
"of",
"the",
"next",
"block",
"of",
"RTF",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L328-L358 |
157,491 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java | RTFEmbeddedObject.readDataBlock | private static int readDataBlock(String text, int offset, int length, List<byte[]> blocks)
{
int bytes = length / 2;
byte[] data = new byte[bytes];
for (int index = 0; index < bytes; index++)
{
data[index] = (byte) Integer.parseInt(text.substring(offset, offset + 2), 16);
o... | java | private static int readDataBlock(String text, int offset, int length, List<byte[]> blocks)
{
int bytes = length / 2;
byte[] data = new byte[bytes];
for (int index = 0; index < bytes; index++)
{
data[index] = (byte) Integer.parseInt(text.substring(offset, offset + 2), 16);
o... | [
"private",
"static",
"int",
"readDataBlock",
"(",
"String",
"text",
",",
"int",
"offset",
",",
"int",
"length",
",",
"List",
"<",
"byte",
"[",
"]",
">",
"blocks",
")",
"{",
"int",
"bytes",
"=",
"length",
"/",
"2",
";",
"byte",
"[",
"]",
"data",
"="... | Reads a data block and adds it to the list of blocks.
@param text RTF data
@param offset current offset
@param length next block length
@param blocks list of blocks
@return next offset | [
"Reads",
"a",
"data",
"block",
"and",
"adds",
"it",
"to",
"the",
"list",
"of",
"blocks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/RTFEmbeddedObject.java#L369-L382 |
157,492 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP12Reader.java | MPP12Reader.readSubProject | private SubProject readSubProject(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex)
{
try
{
SubProject sp = new SubProject();
int type = SUBPROJECT_TASKUNIQUEID0;
if (uniqueIDOffset != -1)
{
int value = MPPUtilit... | java | private SubProject readSubProject(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex)
{
try
{
SubProject sp = new SubProject();
int type = SUBPROJECT_TASKUNIQUEID0;
if (uniqueIDOffset != -1)
{
int value = MPPUtilit... | [
"private",
"SubProject",
"readSubProject",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"uniqueIDOffset",
",",
"int",
"filePathOffset",
",",
"int",
"fileNameOffset",
",",
"int",
"subprojectIndex",
")",
"{",
"try",
"{",
"SubProject",
"sp",
"=",
"new",
"SubProject... | Method used to read the sub project details from a byte array.
@param data byte array
@param uniqueIDOffset offset of unique ID
@param filePathOffset offset of file path
@param fileNameOffset offset of file name
@param subprojectIndex index of the subproject, used to calculate unique id offset
@return new SubProject i... | [
"Method",
"used",
"to",
"read",
"the",
"sub",
"project",
"details",
"from",
"a",
"byte",
"array",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP12Reader.java#L569-L738 |
157,493 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/suretrak/TableReader.java | TableReader.readRecord | private void readRecord(byte[] buffer, Table table)
{
//System.out.println(ByteArrayHelper.hexdump(buffer, true, 16, ""));
int deletedFlag = getShort(buffer, 0);
if (deletedFlag != 0)
{
Map<String, Object> row = new HashMap<String, Object>();
for (ColumnDefinition column : m... | java | private void readRecord(byte[] buffer, Table table)
{
//System.out.println(ByteArrayHelper.hexdump(buffer, true, 16, ""));
int deletedFlag = getShort(buffer, 0);
if (deletedFlag != 0)
{
Map<String, Object> row = new HashMap<String, Object>();
for (ColumnDefinition column : m... | [
"private",
"void",
"readRecord",
"(",
"byte",
"[",
"]",
"buffer",
",",
"Table",
"table",
")",
"{",
"//System.out.println(ByteArrayHelper.hexdump(buffer, true, 16, \"\"));",
"int",
"deletedFlag",
"=",
"getShort",
"(",
"buffer",
",",
"0",
")",
";",
"if",
"(",
"delet... | Reads a single record from the table.
@param buffer record data
@param table parent table | [
"Reads",
"a",
"single",
"record",
"from",
"the",
"table",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/TableReader.java#L118-L134 |
157,494 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.decodeBuffer | public static final void decodeBuffer(byte[] data, byte encryptionCode)
{
for (int i = 0; i < data.length; i++)
{
data[i] = (byte) (data[i] ^ encryptionCode);
}
} | java | public static final void decodeBuffer(byte[] data, byte encryptionCode)
{
for (int i = 0; i < data.length; i++)
{
data[i] = (byte) (data[i] ^ encryptionCode);
}
} | [
"public",
"static",
"final",
"void",
"decodeBuffer",
"(",
"byte",
"[",
"]",
"data",
",",
"byte",
"encryptionCode",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"data",
".",
"length",
";",
"i",
"++",
")",
"{",
"data",
"[",
"i",
"]",
... | This method decodes a byte array with the given encryption code
using XOR encryption.
@param data Source data
@param encryptionCode Encryption code | [
"This",
"method",
"decodes",
"a",
"byte",
"array",
"with",
"the",
"given",
"encryption",
"code",
"using",
"XOR",
"encryption",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L64-L70 |
157,495 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.decodePassword | public static final String decodePassword(byte[] data, byte encryptionCode)
{
String result;
if (data.length < MINIMUM_PASSWORD_DATA_LENGTH)
{
result = null;
}
else
{
MPPUtility.decodeBuffer(data, encryptionCode);
StringBuilder buffer = new StringBuild... | java | public static final String decodePassword(byte[] data, byte encryptionCode)
{
String result;
if (data.length < MINIMUM_PASSWORD_DATA_LENGTH)
{
result = null;
}
else
{
MPPUtility.decodeBuffer(data, encryptionCode);
StringBuilder buffer = new StringBuild... | [
"public",
"static",
"final",
"String",
"decodePassword",
"(",
"byte",
"[",
"]",
"data",
",",
"byte",
"encryptionCode",
")",
"{",
"String",
"result",
";",
"if",
"(",
"data",
".",
"length",
"<",
"MINIMUM_PASSWORD_DATA_LENGTH",
")",
"{",
"result",
"=",
"null",
... | Decode the password from the given data. Will decode the data block as well.
@param data encrypted data block
@param encryptionCode encryption code
@return password | [
"Decode",
"the",
"password",
"from",
"the",
"given",
"data",
".",
"Will",
"decode",
"the",
"data",
"block",
"as",
"well",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L112-L143 |
157,496 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.getByteArray | public static final void getByteArray(byte[] data, int offset, int size, byte[] buffer, int bufferOffset)
{
System.arraycopy(data, offset, buffer, bufferOffset, size);
} | java | public static final void getByteArray(byte[] data, int offset, int size, byte[] buffer, int bufferOffset)
{
System.arraycopy(data, offset, buffer, bufferOffset, size);
} | [
"public",
"static",
"final",
"void",
"getByteArray",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
",",
"int",
"size",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"bufferOffset",
")",
"{",
"System",
".",
"arraycopy",
"(",
"data",
",",
"offset",... | This method extracts a portion of a byte array and writes it into
another byte array.
@param data Source data
@param offset Offset into source data
@param size Required size to be extracted from the source data
@param buffer Destination buffer
@param bufferOffset Offset into destination buffer | [
"This",
"method",
"extracts",
"a",
"portion",
"of",
"a",
"byte",
"array",
"and",
"writes",
"it",
"into",
"another",
"byte",
"array",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L155-L158 |
157,497 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.getLong6 | public static final long getLong6(byte[] data, int offset)
{
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 48; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | java | public static final long getLong6(byte[] data, int offset)
{
long result = 0;
int i = offset;
for (int shiftBy = 0; shiftBy < 48; shiftBy += 8)
{
result |= ((long) (data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} | [
"public",
"static",
"final",
"long",
"getLong6",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
")",
"{",
"long",
"result",
"=",
"0",
";",
"int",
"i",
"=",
"offset",
";",
"for",
"(",
"int",
"shiftBy",
"=",
"0",
";",
"shiftBy",
"<",
"48",
";... | This method reads a six byte long from the input array.
@param data the input array
@param offset offset of integer data in the array
@return integer value | [
"This",
"method",
"reads",
"a",
"six",
"byte",
"long",
"from",
"the",
"input",
"array",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L237-L247 |
157,498 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.getTime | public static final Date getTime(byte[] data, int offset)
{
int time = getShort(data, offset) / 10;
Calendar cal = DateHelper.popCalendar(EPOCH_DATE);
cal.set(Calendar.HOUR_OF_DAY, (time / 60));
cal.set(Calendar.MINUTE, (time % 60));
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.M... | java | public static final Date getTime(byte[] data, int offset)
{
int time = getShort(data, offset) / 10;
Calendar cal = DateHelper.popCalendar(EPOCH_DATE);
cal.set(Calendar.HOUR_OF_DAY, (time / 60));
cal.set(Calendar.MINUTE, (time % 60));
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.M... | [
"public",
"static",
"final",
"Date",
"getTime",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
")",
"{",
"int",
"time",
"=",
"getShort",
"(",
"data",
",",
"offset",
")",
"/",
"10",
";",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
... | Reads a time value. The time is represented as tenths of a
minute since midnight.
@param data byte array of data
@param offset location of data as offset into the array
@return time value | [
"Reads",
"a",
"time",
"value",
".",
"The",
"time",
"is",
"represented",
"as",
"tenths",
"of",
"a",
"minute",
"since",
"midnight",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L337-L347 |
157,499 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPUtility.java | MPPUtility.getTimestamp | public static final Date getTimestamp(byte[] data, int offset)
{
Date result;
long days = getShort(data, offset + 2);
if (days < 100)
{
// We are seeing some files which have very small values for the number of days.
// When the relevant field is shown in MS Project it appe... | java | public static final Date getTimestamp(byte[] data, int offset)
{
Date result;
long days = getShort(data, offset + 2);
if (days < 100)
{
// We are seeing some files which have very small values for the number of days.
// When the relevant field is shown in MS Project it appe... | [
"public",
"static",
"final",
"Date",
"getTimestamp",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
")",
"{",
"Date",
"result",
";",
"long",
"days",
"=",
"getShort",
"(",
"data",
",",
"offset",
"+",
"2",
")",
";",
"if",
"(",
"days",
"<",
"100... | Reads a combined date and time value.
@param data byte array of data
@param offset location of data as offset into the array
@return time value | [
"Reads",
"a",
"combined",
"date",
"and",
"time",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPUtility.java#L369-L397 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.