repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readAssignmentBaselines
private void readAssignmentBaselines(Project.Assignments.Assignment assignment, ResourceAssignment mpx) { for (Project.Assignments.Assignment.Baseline baseline : assignment.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); //baseline.getBCWP() //baseline...
java
private void readAssignmentBaselines(Project.Assignments.Assignment assignment, ResourceAssignment mpx) { for (Project.Assignments.Assignment.Baseline baseline : assignment.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); //baseline.getBCWP() //baseline...
[ "private", "void", "readAssignmentBaselines", "(", "Project", ".", "Assignments", ".", "Assignment", "assignment", ",", "ResourceAssignment", "mpx", ")", "{", "for", "(", "Project", ".", "Assignments", ".", "Assignment", ".", "Baseline", "baseline", ":", "assignme...
Extracts assignment baseline data. @param assignment xml assignment @param mpx mpxj assignment
[ "Extracts", "assignment", "baseline", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1683-L1712
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readAssignmentExtendedAttributes
private void readAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx) { for (Project.Assignments.Assignment.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; AssignmentField m...
java
private void readAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx) { for (Project.Assignments.Assignment.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; AssignmentField m...
[ "private", "void", "readAssignmentExtendedAttributes", "(", "Project", ".", "Assignments", ".", "Assignment", "xml", ",", "ResourceAssignment", "mpx", ")", "{", "for", "(", "Project", ".", "Assignments", ".", "Assignment", ".", "ExtendedAttribute", "attrib", ":", ...
This method processes any extended attributes associated with a resource assignment. @param xml MSPDI resource assignment instance @param mpx MPX task instance
[ "This", "method", "processes", "any", "extended", "attributes", "associated", "with", "a", "resource", "assignment", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1721-L1730
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.isSplit
private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { if (calendar != null && assignment.getTotalAmount().getDuration() == 0) { Duration calendarWork = calendar.getWork(assignment...
java
private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { if (calendar != null && assignment.getTotalAmount().getDuration() == 0) { Duration calendarWork = calendar.getWork(assignment...
[ "private", "boolean", "isSplit", "(", "ProjectCalendar", "calendar", ",", "List", "<", "TimephasedWork", ">", "list", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "TimephasedWork", "assignment", ":", "list", ")", "{", "if", "(", "calendar", ...
Test to determine if this is a split task. @param calendar current calendar @param list timephased resource assignment list @return boolean flag
[ "Test", "to", "determine", "if", "this", "is", "a", "split", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1739-L1755
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTimephasedAssignment
private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type) { LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>(); for (TimephasedDataType item : assignment.getTimephasedData()) { if (NumberHel...
java
private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type) { LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>(); for (TimephasedDataType item : assignment.getTimephasedData()) { if (NumberHel...
[ "private", "LinkedList", "<", "TimephasedWork", ">", "readTimephasedAssignment", "(", "ProjectCalendar", "calendar", ",", "Project", ".", "Assignments", ".", "Assignment", "assignment", ",", "int", "type", ")", "{", "LinkedList", "<", "TimephasedWork", ">", "result"...
Reads timephased assignment data. @param calendar current calendar @param assignment assignment data @param type flag indicating if this is planned or complete work @return list of timephased resource assignment instances
[ "Reads", "timephased", "assignment", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1765-L1805
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.deriveResourceCalendar
private ProjectCalendar deriveResourceCalendar(Integer parentCalendarID) { ProjectCalendar calendar = m_project.addDefaultDerivedCalendar(); calendar.setUniqueID(Integer.valueOf(m_project.getProjectConfig().getNextCalendarUniqueID())); calendar.setParent(m_project.getCalendarByUniqueID(parentCalend...
java
private ProjectCalendar deriveResourceCalendar(Integer parentCalendarID) { ProjectCalendar calendar = m_project.addDefaultDerivedCalendar(); calendar.setUniqueID(Integer.valueOf(m_project.getProjectConfig().getNextCalendarUniqueID())); calendar.setParent(m_project.getCalendarByUniqueID(parentCalend...
[ "private", "ProjectCalendar", "deriveResourceCalendar", "(", "Integer", "parentCalendarID", ")", "{", "ProjectCalendar", "calendar", "=", "m_project", ".", "addDefaultDerivedCalendar", "(", ")", ";", "calendar", ".", "setUniqueID", "(", "Integer", ".", "valueOf", "(",...
Derive a calendar for a resource. @param parentCalendarID calendar from which resource calendar is derived @return new calendar for a resource
[ "Derive", "a", "calendar", "for", "a", "resource", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L182-L188
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.processTasks
public void processTasks(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones) { List<Row> parentBars = buildRowHierarchy(bars, expandedTasks, tasks, milestones); createTasks(m_project, "", parentBars); deriveProjectCalendar(); updateStructure(); }
java
public void processTasks(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones) { List<Row> parentBars = buildRowHierarchy(bars, expandedTasks, tasks, milestones); createTasks(m_project, "", parentBars); deriveProjectCalendar(); updateStructure(); }
[ "public", "void", "processTasks", "(", "List", "<", "Row", ">", "bars", ",", "List", "<", "Row", ">", "expandedTasks", ",", "List", "<", "Row", ">", "tasks", ",", "List", "<", "Row", ">", "milestones", ")", "{", "List", "<", "Row", ">", "parentBars",...
Organises the data from Asta into a hierarchy and converts this into tasks. @param bars bar data @param expandedTasks expanded task data @param tasks task data @param milestones milestone data
[ "Organises", "the", "data", "from", "Asta", "into", "a", "hierarchy", "and", "converts", "this", "into", "tasks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L198-L204
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.buildRowHierarchy
private List<Row> buildRowHierarchy(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones) { // // Create a list of leaf nodes by merging the task and milestone lists // List<Row> leaves = new ArrayList<Row>(); leaves.addAll(tasks); leaves.addAll(milestone...
java
private List<Row> buildRowHierarchy(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones) { // // Create a list of leaf nodes by merging the task and milestone lists // List<Row> leaves = new ArrayList<Row>(); leaves.addAll(tasks); leaves.addAll(milestone...
[ "private", "List", "<", "Row", ">", "buildRowHierarchy", "(", "List", "<", "Row", ">", "bars", ",", "List", "<", "Row", ">", "expandedTasks", ",", "List", "<", "Row", ">", "tasks", ",", "List", "<", "Row", ">", "milestones", ")", "{", "//", "// Creat...
Builds the task hierarchy. Note that there are two distinct levels of organisation going on here. The first is the Asta "summary" organisation, where the user organises bars into summary groups. We are using this to create our hierarchy of tasks. The second level displayed within a summary group (or at the project le...
[ "Builds", "the", "task", "hierarchy", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L222-L313
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.createTasks
private void createTasks(ChildTaskContainer parent, String parentName, List<Row> rows) { for (Row row : rows) { boolean rowIsBar = (row.getInteger("BARID") != null); // // Don't export hammock tasks. // if (rowIsBar && row.getChildRows().isEmpty()) {...
java
private void createTasks(ChildTaskContainer parent, String parentName, List<Row> rows) { for (Row row : rows) { boolean rowIsBar = (row.getInteger("BARID") != null); // // Don't export hammock tasks. // if (rowIsBar && row.getChildRows().isEmpty()) {...
[ "private", "void", "createTasks", "(", "ChildTaskContainer", "parent", ",", "String", "parentName", ",", "List", "<", "Row", ">", "rows", ")", "{", "for", "(", "Row", "row", ":", "rows", ")", "{", "boolean", "rowIsBar", "=", "(", "row", ".", "getInteger"...
Recursively descend through the hierarchy creating tasks. @param parent parent task @param parentName parent name @param rows rows to add as tasks to this parent
[ "Recursively", "descend", "through", "the", "hierarchy", "creating", "tasks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L322-L363
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.skipBar
private boolean skipBar(Row row) { List<Row> childRows = row.getChildRows(); return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty(); }
java
private boolean skipBar(Row row) { List<Row> childRows = row.getChildRows(); return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty(); }
[ "private", "boolean", "skipBar", "(", "Row", "row", ")", "{", "List", "<", "Row", ">", "childRows", "=", "row", ".", "getChildRows", "(", ")", ";", "return", "childRows", ".", "size", "(", ")", "==", "1", "&&", "childRows", ".", "get", "(", "0", ")...
Returns true if we should skip this bar, i.e. the bar only has a single child task. @param row bar row to test @return true if this bar should be skipped
[ "Returns", "true", "if", "we", "should", "skip", "this", "bar", "i", ".", "e", ".", "the", "bar", "only", "has", "a", "single", "child", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L371-L375
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.populateLeaf
private void populateLeaf(String parentName, Row row, Task task) { if (row.getInteger("TASKID") != null) { populateTask(row, task); } else { populateMilestone(row, task); } String name = task.getName(); if (name == null || name.isEmpty()) { ...
java
private void populateLeaf(String parentName, Row row, Task task) { if (row.getInteger("TASKID") != null) { populateTask(row, task); } else { populateMilestone(row, task); } String name = task.getName(); if (name == null || name.isEmpty()) { ...
[ "private", "void", "populateLeaf", "(", "String", "parentName", ",", "Row", "row", ",", "Task", "task", ")", "{", "if", "(", "row", ".", "getInteger", "(", "\"TASKID\"", ")", "!=", "null", ")", "{", "populateTask", "(", "row", ",", "task", ")", ";", ...
Adds a leaf node, which could be a task or a milestone. @param parentName parent bar name @param row row to add @param task task to populate with data from the row
[ "Adds", "a", "leaf", "node", "which", "could", "be", "a", "task", "or", "a", "milestone", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L384-L400
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.populateTask
private void populateTask(Row row, Task task) { //"PROJID" task.setUniqueID(row.getInteger("TASKID")); //GIVEN_DURATIONTYPF //GIVEN_DURATIONELA_MONTHS task.setDuration(row.getDuration("GIVEN_DURATIONHOURS")); task.setResume(row.getDate("RESUME")); //task.setStart(row.getDate...
java
private void populateTask(Row row, Task task) { //"PROJID" task.setUniqueID(row.getInteger("TASKID")); //GIVEN_DURATIONTYPF //GIVEN_DURATIONELA_MONTHS task.setDuration(row.getDuration("GIVEN_DURATIONHOURS")); task.setResume(row.getDate("RESUME")); //task.setStart(row.getDate...
[ "private", "void", "populateTask", "(", "Row", "row", ",", "Task", "task", ")", "{", "//\"PROJID\"", "task", ".", "setUniqueID", "(", "row", ".", "getInteger", "(", "\"TASKID\"", ")", ")", ";", "//GIVEN_DURATIONTYPF", "//GIVEN_DURATIONELA_MONTHS", "task", ".", ...
Populate a task from a Row instance. @param row Row instance @param task Task instance
[ "Populate", "a", "task", "from", "a", "Row", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L408-L481
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.populateBar
private void populateBar(Row row, Task task) { Integer calendarID = row.getInteger("CALENDAU"); ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID); //PROJID task.setUniqueID(row.getInteger("BARID")); task.setStart(row.getDate("STARV")); task.setFinish(row.getD...
java
private void populateBar(Row row, Task task) { Integer calendarID = row.getInteger("CALENDAU"); ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID); //PROJID task.setUniqueID(row.getInteger("BARID")); task.setStart(row.getDate("STARV")); task.setFinish(row.getD...
[ "private", "void", "populateBar", "(", "Row", "row", ",", "Task", "task", ")", "{", "Integer", "calendarID", "=", "row", ".", "getInteger", "(", "\"CALENDAU\"", ")", ";", "ProjectCalendar", "calendar", "=", "m_project", ".", "getCalendarByUniqueID", "(", "cale...
Uses data from a bar to populate a task. @param row bar data @param task task to populate
[ "Uses", "data", "from", "a", "bar", "to", "populate", "a", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L489-L520
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.populateMilestone
private void populateMilestone(Row row, Task task) { task.setMilestone(true); //PROJID task.setUniqueID(row.getInteger("MILESTONEID")); task.setStart(row.getDate("GIVEN_DATE_TIME")); task.setFinish(row.getDate("GIVEN_DATE_TIME")); //PROGREST_PERIOD //SYMBOL_APPEARANCE ...
java
private void populateMilestone(Row row, Task task) { task.setMilestone(true); //PROJID task.setUniqueID(row.getInteger("MILESTONEID")); task.setStart(row.getDate("GIVEN_DATE_TIME")); task.setFinish(row.getDate("GIVEN_DATE_TIME")); //PROGREST_PERIOD //SYMBOL_APPEARANCE ...
[ "private", "void", "populateMilestone", "(", "Row", "row", ",", "Task", "task", ")", "{", "task", ".", "setMilestone", "(", "true", ")", ";", "//PROJID", "task", ".", "setUniqueID", "(", "row", ".", "getInteger", "(", "\"MILESTONEID\"", ")", ")", ";", "t...
Populate a milestone from a Row instance. @param row Row instance @param task Task instance
[ "Populate", "a", "milestone", "from", "a", "Row", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L528-L586
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.getInitials
private String getInitials(String name) { String result = null; if (name != null && name.length() != 0) { StringBuilder sb = new StringBuilder(); sb.append(name.charAt(0)); int index = 1; while (true) { index = name.indexOf(' ', index); ...
java
private String getInitials(String name) { String result = null; if (name != null && name.length() != 0) { StringBuilder sb = new StringBuilder(); sb.append(name.charAt(0)); int index = 1; while (true) { index = name.indexOf(' ', index); ...
[ "private", "String", "getInitials", "(", "String", "name", ")", "{", "String", "result", "=", "null", ";", "if", "(", "name", "!=", "null", "&&", "name", ".", "length", "(", ")", "!=", "0", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", ...
Convert a name into initials. @param name source name @return initials
[ "Convert", "a", "name", "into", "initials", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L886-L916
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.deriveProjectCalendar
private void deriveProjectCalendar() { // // Count the number of times each calendar is used // Map<ProjectCalendar, Integer> map = new HashMap<ProjectCalendar, Integer>(); for (Task task : m_project.getTasks()) { ProjectCalendar calendar = task.getCalendar(); In...
java
private void deriveProjectCalendar() { // // Count the number of times each calendar is used // Map<ProjectCalendar, Integer> map = new HashMap<ProjectCalendar, Integer>(); for (Task task : m_project.getTasks()) { ProjectCalendar calendar = task.getCalendar(); In...
[ "private", "void", "deriveProjectCalendar", "(", ")", "{", "//", "// Count the number of times each calendar is used", "//", "Map", "<", "ProjectCalendar", ",", "Integer", ">", "map", "=", "new", "HashMap", "<", "ProjectCalendar", ",", "Integer", ">", "(", ")", ";...
Asta Powerproject assigns an explicit calendar for each task. This method is used to find the most common calendar and use this as the default project calendar. This allows the explicitly assigned task calendars to be removed.
[ "Asta", "Powerproject", "assigns", "an", "explicit", "calendar", "for", "each", "task", ".", "This", "method", "is", "used", "to", "find", "the", "most", "common", "calendar", "and", "use", "this", "as", "the", "default", "project", "calendar", ".", "This", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L923-L974
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.processConstraints
private void processConstraints(Row row, Task task) { ConstraintType constraintType = ConstraintType.AS_SOON_AS_POSSIBLE; Date constraintDate = null; switch (row.getInt("CONSTRAINU")) { case 0: { if (row.getInt("PLACEMENT") == 0) { con...
java
private void processConstraints(Row row, Task task) { ConstraintType constraintType = ConstraintType.AS_SOON_AS_POSSIBLE; Date constraintDate = null; switch (row.getInt("CONSTRAINU")) { case 0: { if (row.getInt("PLACEMENT") == 0) { con...
[ "private", "void", "processConstraints", "(", "Row", "row", ",", "Task", "task", ")", "{", "ConstraintType", "constraintType", "=", "ConstraintType", ".", "AS_SOON_AS_POSSIBLE", ";", "Date", "constraintDate", "=", "null", ";", "switch", "(", "row", ".", "getInt"...
Determines the constraints relating to a task. @param row row data @param task Task instance
[ "Determines", "the", "constraints", "relating", "to", "a", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L982-L1053
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.createWorkPatternMap
public Map<Integer, Row> createWorkPatternMap(List<Row> rows) { Map<Integer, Row> map = new HashMap<Integer, Row>(); for (Row row : rows) { map.put(row.getInteger("WORK_PATTERNID"), row); } return map; }
java
public Map<Integer, Row> createWorkPatternMap(List<Row> rows) { Map<Integer, Row> map = new HashMap<Integer, Row>(); for (Row row : rows) { map.put(row.getInteger("WORK_PATTERNID"), row); } return map; }
[ "public", "Map", "<", "Integer", ",", "Row", ">", "createWorkPatternMap", "(", "List", "<", "Row", ">", "rows", ")", "{", "Map", "<", "Integer", ",", "Row", ">", "map", "=", "new", "HashMap", "<", "Integer", ",", "Row", ">", "(", ")", ";", "for", ...
Creates a map of work pattern rows indexed by the primary key. @param rows work pattern rows @return work pattern map
[ "Creates", "a", "map", "of", "work", "pattern", "rows", "indexed", "by", "the", "primary", "key", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1101-L1109
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.createWorkPatternAssignmentMap
public Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows) { Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>(); for (Row row : rows) { Integer calendarID = row.getInteger("WORK_PATTERN_ASSIGNMENTID"); List<Row> list = map.get(calendarID); ...
java
public Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows) { Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>(); for (Row row : rows) { Integer calendarID = row.getInteger("WORK_PATTERN_ASSIGNMENTID"); List<Row> list = map.get(calendarID); ...
[ "public", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "createWorkPatternAssignmentMap", "(", "List", "<", "Row", ">", "rows", ")", "{", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "map", "=", "new", "HashMap", "<", "Intege...
Creates a map between a calendar ID and a list of work pattern assignment rows. @param rows work pattern assignment rows @return work pattern assignment map
[ "Creates", "a", "map", "between", "a", "calendar", "ID", "and", "a", "list", "of", "work", "pattern", "assignment", "rows", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1118-L1133
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.createTimeEntryMap
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows) { Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>(); for (Row row : rows) { Integer workPatternID = row.getInteger("TIME_ENTRYID"); List<Row> list = map.get(workPatternID); if (list == null) ...
java
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows) { Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>(); for (Row row : rows) { Integer workPatternID = row.getInteger("TIME_ENTRYID"); List<Row> list = map.get(workPatternID); if (list == null) ...
[ "public", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "createTimeEntryMap", "(", "List", "<", "Row", ">", "rows", ")", "{", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "map", "=", "new", "HashMap", "<", "Integer", ",", ...
Creates a map between a work pattern ID and a list of time entry rows. @param rows time entry rows @return time entry map
[ "Creates", "a", "map", "between", "a", "work", "pattern", "ID", "and", "a", "list", "of", "time", "entry", "rows", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1164-L1179
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.processCalendar
public void processCalendar(Row calendarRow, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> workPatternAssignmentMap, Map<Integer, List<Row>> exceptionAssignmentMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap) { // // Create the calendar and add the default wo...
java
public void processCalendar(Row calendarRow, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> workPatternAssignmentMap, Map<Integer, List<Row>> exceptionAssignmentMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap) { // // Create the calendar and add the default wo...
[ "public", "void", "processCalendar", "(", "Row", "calendarRow", ",", "Map", "<", "Integer", ",", "Row", ">", "workPatternMap", ",", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "workPatternAssignmentMap", ",", "Map", "<", "Integer", ",", "List...
Creates a ProjectCalendar instance from the Asta data. @param calendarRow basic calendar data @param workPatternMap work pattern map @param workPatternAssignmentMap work pattern assignment map @param exceptionAssignmentMap exception assignment map @param timeEntryMap time entry map @param exceptionTypeMap exception ty...
[ "Creates", "a", "ProjectCalendar", "instance", "from", "the", "Asta", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1191-L1235
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.processWorkPattern
private void processWorkPattern(ProjectCalendarWeek week, Integer workPatternID, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap) { Row workPatternRow = workPatternMap.get(workPatternID); if (workPatternRow != null) { week.setN...
java
private void processWorkPattern(ProjectCalendarWeek week, Integer workPatternID, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap) { Row workPatternRow = workPatternMap.get(workPatternID); if (workPatternRow != null) { week.setN...
[ "private", "void", "processWorkPattern", "(", "ProjectCalendarWeek", "week", ",", "Integer", "workPatternID", ",", "Map", "<", "Integer", ",", "Row", ">", "workPatternMap", ",", "Map", "<", "Integer", ",", "List", "<", "Row", ">", ">", "timeEntryMap", ",", "...
Populates a ProjectCalendarWeek instance from Asta work pattern data. @param week target ProjectCalendarWeek instance @param workPatternID target work pattern ID @param workPatternMap work pattern data @param timeEntryMap time entry map @param exceptionTypeMap exception type map
[ "Populates", "a", "ProjectCalendarWeek", "instance", "from", "Asta", "work", "pattern", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1246-L1297
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaReader.java
AstaReader.getNotes
private String getNotes(Row row) { String notes = row.getString("NOTET"); if (notes != null) { if (notes.isEmpty()) { notes = null; } else { if (notes.indexOf(LINE_BREAK) != -1) { notes = notes.replace(L...
java
private String getNotes(Row row) { String notes = row.getString("NOTET"); if (notes != null) { if (notes.isEmpty()) { notes = null; } else { if (notes.indexOf(LINE_BREAK) != -1) { notes = notes.replace(L...
[ "private", "String", "getNotes", "(", "Row", "row", ")", "{", "String", "notes", "=", "row", ".", "getString", "(", "\"NOTET\"", ")", ";", "if", "(", "notes", "!=", "null", ")", "{", "if", "(", "notes", ".", "isEmpty", "(", ")", ")", "{", "notes", ...
Extract note text. @param row task data @return note text
[ "Extract", "note", "text", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1305-L1323
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaFileReader.java
AstaFileReader.addListeners
private void addListeners(ProjectReader reader) { if (m_projectListeners != null) { for (ProjectListener listener : m_projectListeners) { reader.addProjectListener(listener); } } }
java
private void addListeners(ProjectReader reader) { if (m_projectListeners != null) { for (ProjectListener listener : m_projectListeners) { reader.addProjectListener(listener); } } }
[ "private", "void", "addListeners", "(", "ProjectReader", "reader", ")", "{", "if", "(", "m_projectListeners", "!=", "null", ")", "{", "for", "(", "ProjectListener", "listener", ":", "m_projectListeners", ")", "{", "reader", ".", "addProjectListener", "(", "liste...
Adds any listeners attached to this reader to the reader created internally. @param reader internal project reader
[ "Adds", "any", "listeners", "attached", "to", "this", "reader", "to", "the", "reader", "created", "internally", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L93-L102
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaFileReader.java
AstaFileReader.readTextFile
private ProjectFile readTextFile(InputStream inputStream) throws MPXJException { ProjectReader reader = new AstaTextFileReader(); addListeners(reader); return reader.read(inputStream); }
java
private ProjectFile readTextFile(InputStream inputStream) throws MPXJException { ProjectReader reader = new AstaTextFileReader(); addListeners(reader); return reader.read(inputStream); }
[ "private", "ProjectFile", "readTextFile", "(", "InputStream", "inputStream", ")", "throws", "MPXJException", "{", "ProjectReader", "reader", "=", "new", "AstaTextFileReader", "(", ")", ";", "addListeners", "(", "reader", ")", ";", "return", "reader", ".", "read", ...
Process a text-based PP file. @param inputStream file input stream @return ProjectFile instance
[ "Process", "a", "text", "-", "based", "PP", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L110-L115
train
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AstaFileReader.java
AstaFileReader.readDatabaseFile
private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException { ProjectReader reader = new AstaDatabaseFileReader(); addListeners(reader); return reader.read(inputStream); }
java
private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException { ProjectReader reader = new AstaDatabaseFileReader(); addListeners(reader); return reader.read(inputStream); }
[ "private", "ProjectFile", "readDatabaseFile", "(", "InputStream", "inputStream", ")", "throws", "MPXJException", "{", "ProjectReader", "reader", "=", "new", "AstaDatabaseFileReader", "(", ")", ";", "addListeners", "(", "reader", ")", ";", "return", "reader", ".", ...
Process a SQLite database PP file. @param inputStream file input stream @return ProjectFile instance
[ "Process", "a", "SQLite", "database", "PP", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L123-L128
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPReader.java
MPPReader.getFileFormat
public static String getFileFormat(POIFSFileSystem fs) throws IOException { String fileFormat = ""; DirectoryEntry root = fs.getRoot(); if (root.getEntryNames().contains("\1CompObj")) { CompObj compObj = new CompObj(new DocumentInputStream((DocumentEntry) root.getEntry("\1CompObj")))...
java
public static String getFileFormat(POIFSFileSystem fs) throws IOException { String fileFormat = ""; DirectoryEntry root = fs.getRoot(); if (root.getEntryNames().contains("\1CompObj")) { CompObj compObj = new CompObj(new DocumentInputStream((DocumentEntry) root.getEntry("\1CompObj")))...
[ "public", "static", "String", "getFileFormat", "(", "POIFSFileSystem", "fs", ")", "throws", "IOException", "{", "String", "fileFormat", "=", "\"\"", ";", "DirectoryEntry", "root", "=", "fs", ".", "getRoot", "(", ")", ";", "if", "(", "root", ".", "getEntryNam...
This method allows us to peek into the OLE compound document to extract the file format. This allows the UniversalProjectReader to determine if this is an MPP file, or if it is another type of OLE compound document. @param fs POIFSFileSystem instance @return file format name @throws IOException
[ "This", "method", "allows", "us", "to", "peek", "into", "the", "OLE", "compound", "document", "to", "extract", "the", "file", "format", ".", "This", "allows", "the", "UniversalProjectReader", "to", "determine", "if", "this", "is", "an", "MPP", "file", "or", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L100-L110
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPReader.java
MPPReader.read
public ProjectFile read(POIFSFileSystem fs) throws MPXJException { try { ProjectFile projectFile = new ProjectFile(); ProjectConfig config = projectFile.getProjectConfig(); config.setAutoTaskID(false); config.setAutoTaskUniqueID(false); config.setAutoResource...
java
public ProjectFile read(POIFSFileSystem fs) throws MPXJException { try { ProjectFile projectFile = new ProjectFile(); ProjectConfig config = projectFile.getProjectConfig(); config.setAutoTaskID(false); config.setAutoTaskUniqueID(false); config.setAutoResource...
[ "public", "ProjectFile", "read", "(", "POIFSFileSystem", "fs", ")", "throws", "MPXJException", "{", "try", "{", "ProjectFile", "projectFile", "=", "new", "ProjectFile", "(", ")", ";", "ProjectConfig", "config", "=", "projectFile", ".", "getProjectConfig", "(", "...
Alternative entry point allowing an MPP file to be read from a user-supplied POI file stream. @param fs POI file stream @return ProjectFile instance @throws MPXJException
[ "Alternative", "entry", "point", "allowing", "an", "MPP", "file", "to", "be", "read", "from", "a", "user", "-", "supplied", "POI", "file", "stream", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L120-L220
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPPReader.java
MPPReader.validationRelations
private void validationRelations(Task task) { List<Relation> predecessors = task.getPredecessors(); if (!predecessors.isEmpty()) { ArrayList<Relation> invalid = new ArrayList<Relation>(); for (Relation relation : predecessors) { Task sourceTask = relation.getS...
java
private void validationRelations(Task task) { List<Relation> predecessors = task.getPredecessors(); if (!predecessors.isEmpty()) { ArrayList<Relation> invalid = new ArrayList<Relation>(); for (Relation relation : predecessors) { Task sourceTask = relation.getS...
[ "private", "void", "validationRelations", "(", "Task", "task", ")", "{", "List", "<", "Relation", ">", "predecessors", "=", "task", ".", "getPredecessors", "(", ")", ";", "if", "(", "!", "predecessors", ".", "isEmpty", "(", ")", ")", "{", "ArrayList", "<...
This method validates all relationships for a task, removing any which have been incorrectly read from the MPP file and point to a parent task. @param task task under test
[ "This", "method", "validates", "all", "relationships", "for", "a", "task", "removing", "any", "which", "have", "been", "incorrectly", "read", "from", "the", "MPP", "file", "and", "point", "to", "a", "parent", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L229-L254
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXTaskField.java
MPXTaskField.getMpxjField
public static TaskField getMpxjField(int value) { TaskField result = null; if (value >= 0 && value < MPX_MPXJ_ARRAY.length) { result = MPX_MPXJ_ARRAY[value]; } return (result); }
java
public static TaskField getMpxjField(int value) { TaskField result = null; if (value >= 0 && value < MPX_MPXJ_ARRAY.length) { result = MPX_MPXJ_ARRAY[value]; } return (result); }
[ "public", "static", "TaskField", "getMpxjField", "(", "int", "value", ")", "{", "TaskField", "result", "=", "null", ";", "if", "(", "value", ">=", "0", "&&", "value", "<", "MPX_MPXJ_ARRAY", ".", "length", ")", "{", "result", "=", "MPX_MPXJ_ARRAY", "[", "...
Retrieve an instance of the TaskField class based on the data read from an MPX file. @param value value from an MS Project file @return TaskField instance
[ "Retrieve", "an", "instance", "of", "the", "TaskField", "class", "based", "on", "the", "data", "read", "from", "an", "MPX", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXTaskField.java#L42-L52
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXTaskField.java
MPXTaskField.getMpxField
public static int getMpxField(int value) { int result = 0; if (value >= 0 && value < MPXJ_MPX_ARRAY.length) { result = MPXJ_MPX_ARRAY[value]; } return (result); }
java
public static int getMpxField(int value) { int result = 0; if (value >= 0 && value < MPXJ_MPX_ARRAY.length) { result = MPXJ_MPX_ARRAY[value]; } return (result); }
[ "public", "static", "int", "getMpxField", "(", "int", "value", ")", "{", "int", "result", "=", "0", ";", "if", "(", "value", ">=", "0", "&&", "value", "<", "MPXJ_MPX_ARRAY", ".", "length", ")", "{", "result", "=", "MPXJ_MPX_ARRAY", "[", "value", "]", ...
Retrieve the integer value used to represent a task field in an MPX file. @param value MPXJ task field value @return MPX field value
[ "Retrieve", "the", "integer", "value", "used", "to", "represent", "a", "task", "field", "in", "an", "MPX", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXTaskField.java#L61-L70
train
joniles/mpxj
src/main/java/net/sf/mpxj/TaskContainer.java
TaskContainer.add
public Task add() { Task task = new Task(m_projectFile, (Task) null); add(task); m_projectFile.getChildTasks().add(task); return task; }
java
public Task add() { Task task = new Task(m_projectFile, (Task) null); add(task); m_projectFile.getChildTasks().add(task); return task; }
[ "public", "Task", "add", "(", ")", "{", "Task", "task", "=", "new", "Task", "(", "m_projectFile", ",", "(", "Task", ")", "null", ")", ";", "add", "(", "task", ")", ";", "m_projectFile", ".", "getChildTasks", "(", ")", ".", "add", "(", "task", ")", ...
Add a task to the project. @return new task instance
[ "Add", "a", "task", "to", "the", "project", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L52-L58
train
joniles/mpxj
src/main/java/net/sf/mpxj/TaskContainer.java
TaskContainer.synchronizeTaskIDToHierarchy
public void synchronizeTaskIDToHierarchy() { clear(); int currentID = (getByID(Integer.valueOf(0)) == null ? 1 : 0); for (Task task : m_projectFile.getChildTasks()) { task.setID(Integer.valueOf(currentID++)); add(task); currentID = synchroizeTaskIDToHierarchy(task,...
java
public void synchronizeTaskIDToHierarchy() { clear(); int currentID = (getByID(Integer.valueOf(0)) == null ? 1 : 0); for (Task task : m_projectFile.getChildTasks()) { task.setID(Integer.valueOf(currentID++)); add(task); currentID = synchroizeTaskIDToHierarchy(task,...
[ "public", "void", "synchronizeTaskIDToHierarchy", "(", ")", "{", "clear", "(", ")", ";", "int", "currentID", "=", "(", "getByID", "(", "Integer", ".", "valueOf", "(", "0", ")", ")", "==", "null", "?", "1", ":", "0", ")", ";", "for", "(", "Task", "t...
Microsoft Project bases the order of tasks displayed on their ID value. This method takes the hierarchical structure of tasks represented in MPXJ and renumbers the ID values to ensure that this structure is displayed as expected in Microsoft Project. This is typically used to deal with the case where a hierarchical tas...
[ "Microsoft", "Project", "bases", "the", "order", "of", "tasks", "displayed", "on", "their", "ID", "value", ".", "This", "method", "takes", "the", "hierarchical", "structure", "of", "tasks", "represented", "in", "MPXJ", "and", "renumbers", "the", "ID", "values"...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L122-L133
train
joniles/mpxj
src/main/java/net/sf/mpxj/TaskContainer.java
TaskContainer.synchroizeTaskIDToHierarchy
private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID) { for (Task task : parentTask.getChildTasks()) { task.setID(Integer.valueOf(currentID++)); add(task); currentID = synchroizeTaskIDToHierarchy(task, currentID); } return currentID; }
java
private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID) { for (Task task : parentTask.getChildTasks()) { task.setID(Integer.valueOf(currentID++)); add(task); currentID = synchroizeTaskIDToHierarchy(task, currentID); } return currentID; }
[ "private", "int", "synchroizeTaskIDToHierarchy", "(", "Task", "parentTask", ",", "int", "currentID", ")", "{", "for", "(", "Task", "task", ":", "parentTask", ".", "getChildTasks", "(", ")", ")", "{", "task", ".", "setID", "(", "Integer", ".", "valueOf", "(...
Called recursively to renumber child task IDs. @param parentTask parent task instance @param currentID current task ID @return updated current task ID
[ "Called", "recursively", "to", "renumber", "child", "task", "IDs", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L142-L151
train
joniles/mpxj
src/main/java/net/sf/mpxj/TaskContainer.java
TaskContainer.updateStructure
public void updateStructure() { if (size() > 1) { Collections.sort(this); m_projectFile.getChildTasks().clear(); Task lastTask = null; int lastLevel = -1; boolean autoWbs = m_projectFile.getProjectConfig().getAutoWBS(); boolean autoOutlineNumber = m_...
java
public void updateStructure() { if (size() > 1) { Collections.sort(this); m_projectFile.getChildTasks().clear(); Task lastTask = null; int lastLevel = -1; boolean autoWbs = m_projectFile.getProjectConfig().getAutoWBS(); boolean autoOutlineNumber = m_...
[ "public", "void", "updateStructure", "(", ")", "{", "if", "(", "size", "(", ")", ">", "1", ")", "{", "Collections", ".", "sort", "(", "this", ")", ";", "m_projectFile", ".", "getChildTasks", "(", ")", ".", "clear", "(", ")", ";", "Task", "lastTask", ...
This method is used to recreate the hierarchical structure of the project file from scratch. The method sorts the list of all tasks, then iterates through it creating the parent-child structure defined by the outline level field.
[ "This", "method", "is", "used", "to", "recreate", "the", "hierarchical", "structure", "of", "the", "project", "file", "from", "scratch", ".", "The", "method", "sorts", "the", "list", "of", "all", "tasks", "then", "iterates", "through", "it", "creating", "the...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L159-L234
train
joniles/mpxj
src/main/java/net/sf/mpxj/utility/MppCleanUtility.java
MppCleanUtility.process
private void process(String input, String output) throws MPXJException, IOException { // // Extract the project data // MPPReader reader = new MPPReader(); m_project = reader.read(input); String varDataFileName; String projectDirName; int mppFileType = NumberHelper.ge...
java
private void process(String input, String output) throws MPXJException, IOException { // // Extract the project data // MPPReader reader = new MPPReader(); m_project = reader.read(input); String varDataFileName; String projectDirName; int mppFileType = NumberHelper.ge...
[ "private", "void", "process", "(", "String", "input", ",", "String", "output", ")", "throws", "MPXJException", ",", "IOException", "{", "//", "// Extract the project data", "//", "MPPReader", "reader", "=", "new", "MPPReader", "(", ")", ";", "m_project", "=", ...
Process an MPP file to make it anonymous. @param input input file name @param output output file name @throws Exception
[ "Process", "an", "MPP", "file", "to", "make", "it", "anonymous", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L108-L219
train
joniles/mpxj
src/main/java/net/sf/mpxj/utility/MppCleanUtility.java
MppCleanUtility.mapText
private void mapText(String oldText, Map<String, String> replacements) { char c2 = 0; if (oldText != null && oldText.length() != 0 && !replacements.containsKey(oldText)) { StringBuilder newText = new StringBuilder(oldText.length()); for (int loop = 0; loop < oldText.length(); loop...
java
private void mapText(String oldText, Map<String, String> replacements) { char c2 = 0; if (oldText != null && oldText.length() != 0 && !replacements.containsKey(oldText)) { StringBuilder newText = new StringBuilder(oldText.length()); for (int loop = 0; loop < oldText.length(); loop...
[ "private", "void", "mapText", "(", "String", "oldText", ",", "Map", "<", "String", ",", "String", ">", "replacements", ")", "{", "char", "c2", "=", "0", ";", "if", "(", "oldText", "!=", "null", "&&", "oldText", ".", "length", "(", ")", "!=", "0", "...
Converts plan text into anonymous text. Preserves upper case, lower case, punctuation, whitespace and digits while making the text unreadable. @param oldText text to replace @param replacements map of find/replace pairs
[ "Converts", "plan", "text", "into", "anonymous", "text", ".", "Preserves", "upper", "case", "lower", "case", "punctuation", "whitespace", "and", "digits", "while", "making", "the", "text", "unreadable", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L282-L332
train
joniles/mpxj
src/main/java/net/sf/mpxj/utility/MppCleanUtility.java
MppCleanUtility.getBytes
private byte[] getBytes(String value, boolean unicode) { byte[] result; if (unicode) { int start = 0; // Get the bytes in UTF-16 byte[] bytes; try { bytes = value.getBytes("UTF-16"); } catch (UnsupportedEncodingException e)...
java
private byte[] getBytes(String value, boolean unicode) { byte[] result; if (unicode) { int start = 0; // Get the bytes in UTF-16 byte[] bytes; try { bytes = value.getBytes("UTF-16"); } catch (UnsupportedEncodingException e)...
[ "private", "byte", "[", "]", "getBytes", "(", "String", "value", ",", "boolean", "unicode", ")", "{", "byte", "[", "]", "result", ";", "if", "(", "unicode", ")", "{", "int", "start", "=", "0", ";", "// Get the bytes in UTF-16", "byte", "[", "]", "bytes...
Convert a Java String instance into the equivalent array of single or double bytes. @param value Java String instance representing text @param unicode true if double byte characters are required @return byte array representing the supplied text
[ "Convert", "a", "Java", "String", "instance", "into", "the", "equivalent", "array", "of", "single", "or", "double", "bytes", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L373-L410
train
joniles/mpxj
src/main/java/net/sf/mpxj/utility/MppCleanUtility.java
MppCleanUtility.compareBytes
private boolean compareBytes(byte[] lhs, byte[] rhs, int rhsOffset) { boolean result = true; for (int loop = 0; loop < lhs.length; loop++) { if (lhs[loop] != rhs[rhsOffset + loop]) { result = false; break; } } return (result); }
java
private boolean compareBytes(byte[] lhs, byte[] rhs, int rhsOffset) { boolean result = true; for (int loop = 0; loop < lhs.length; loop++) { if (lhs[loop] != rhs[rhsOffset + loop]) { result = false; break; } } return (result); }
[ "private", "boolean", "compareBytes", "(", "byte", "[", "]", "lhs", ",", "byte", "[", "]", "rhs", ",", "int", "rhsOffset", ")", "{", "boolean", "result", "=", "true", ";", "for", "(", "int", "loop", "=", "0", ";", "loop", "<", "lhs", ".", "length",...
Compare an array of bytes with a subsection of a larger array of bytes. @param lhs small array of bytes @param rhs large array of bytes @param rhsOffset offset into larger array of bytes @return true if a match is found
[ "Compare", "an", "array", "of", "bytes", "with", "a", "subsection", "of", "a", "larger", "array", "of", "bytes", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L420-L432
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeCurrency
private void writeCurrency() { ProjectProperties props = m_projectFile.getProjectProperties(); CurrencyType currency = m_factory.createCurrencyType(); m_apibo.getCurrency().add(currency); String positiveSymbol = getCurrencyFormat(props.getSymbolPosition()); String negativeSymbol = "(" ...
java
private void writeCurrency() { ProjectProperties props = m_projectFile.getProjectProperties(); CurrencyType currency = m_factory.createCurrencyType(); m_apibo.getCurrency().add(currency); String positiveSymbol = getCurrencyFormat(props.getSymbolPosition()); String negativeSymbol = "(" ...
[ "private", "void", "writeCurrency", "(", ")", "{", "ProjectProperties", "props", "=", "m_projectFile", ".", "getProjectProperties", "(", ")", ";", "CurrencyType", "currency", "=", "m_factory", ".", "createCurrencyType", "(", ")", ";", "m_apibo", ".", "getCurrency"...
Create a handful of default currencies to keep Primavera happy.
[ "Create", "a", "handful", "of", "default", "currencies", "to", "keep", "Primavera", "happy", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L239-L258
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.getSymbolName
private String getSymbolName(char c) { String result = null; switch (c) { case ',': { result = "Comma"; break; } case '.': { result = "Period"; break; } } return result; }
java
private String getSymbolName(char c) { String result = null; switch (c) { case ',': { result = "Comma"; break; } case '.': { result = "Period"; break; } } return result; }
[ "private", "String", "getSymbolName", "(", "char", "c", ")", "{", "String", "result", "=", "null", ";", "switch", "(", "c", ")", "{", "case", "'", "'", ":", "{", "result", "=", "\"Comma\"", ";", "break", ";", "}", "case", "'", "'", ":", "{", "res...
Map the currency separator character to a symbol name. @param c currency separator character @return symbol name
[ "Map", "the", "currency", "separator", "character", "to", "a", "symbol", "name", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L266-L286
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.getCurrencyFormat
private String getCurrencyFormat(CurrencySymbolPosition position) { String result; switch (position) { case AFTER: { result = "1.1#"; break; } case AFTER_WITH_SPACE: { result = "1.1 #"; break; } ...
java
private String getCurrencyFormat(CurrencySymbolPosition position) { String result; switch (position) { case AFTER: { result = "1.1#"; break; } case AFTER_WITH_SPACE: { result = "1.1 #"; break; } ...
[ "private", "String", "getCurrencyFormat", "(", "CurrencySymbolPosition", "position", ")", "{", "String", "result", ";", "switch", "(", "position", ")", "{", "case", "AFTER", ":", "{", "result", "=", "\"1.1#\"", ";", "break", ";", "}", "case", "AFTER_WITH_SPACE...
Generate a currency format. @param position currency symbol position @return currency format
[ "Generate", "a", "currency", "format", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L294-L327
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeUserFieldDefinitions
private void writeUserFieldDefinitions() { for (CustomField cf : m_sortedCustomFieldsList) { if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null) { UDFTypeType udf = m_factory.createUDFTypeType(); udf.setObjectId(Integer.valueOf(FieldTypeHelp...
java
private void writeUserFieldDefinitions() { for (CustomField cf : m_sortedCustomFieldsList) { if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null) { UDFTypeType udf = m_factory.createUDFTypeType(); udf.setObjectId(Integer.valueOf(FieldTypeHelp...
[ "private", "void", "writeUserFieldDefinitions", "(", ")", "{", "for", "(", "CustomField", "cf", ":", "m_sortedCustomFieldsList", ")", "{", "if", "(", "cf", ".", "getFieldType", "(", ")", "!=", "null", "&&", "cf", ".", "getFieldType", "(", ")", ".", "getDat...
Add UDFType objects to a PM XML file. @author kmahan @date 2014-09-24 @author lsong @date 2015-7-24
[ "Add", "UDFType", "objects", "to", "a", "PM", "XML", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L337-L352
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeCalendar
private void writeCalendar(ProjectCalendar mpxj) { CalendarType xml = m_factory.createCalendarType(); m_apibo.getCalendar().add(xml); String type = mpxj.getResource() == null ? "Global" : "Resource"; xml.setBaseCalendarObjectId(getCalendarUniqueID(mpxj.getParent())); xml.setIsPersonal(...
java
private void writeCalendar(ProjectCalendar mpxj) { CalendarType xml = m_factory.createCalendarType(); m_apibo.getCalendar().add(xml); String type = mpxj.getResource() == null ? "Global" : "Resource"; xml.setBaseCalendarObjectId(getCalendarUniqueID(mpxj.getParent())); xml.setIsPersonal(...
[ "private", "void", "writeCalendar", "(", "ProjectCalendar", "mpxj", ")", "{", "CalendarType", "xml", "=", "m_factory", ".", "createCalendarType", "(", ")", ";", "m_apibo", ".", "getCalendar", "(", ")", ".", "add", "(", "xml", ")", ";", "String", "type", "=...
This method writes data for an individual calendar to a PM XML file. @param mpxj ProjectCalander instance
[ "This", "method", "writes", "data", "for", "an", "individual", "calendar", "to", "a", "PM", "XML", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L439-L503
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeResources
private void writeResources() { for (Resource resource : m_projectFile.getResources()) { if (resource.getUniqueID().intValue() != 0) { writeResource(resource); } } }
java
private void writeResources() { for (Resource resource : m_projectFile.getResources()) { if (resource.getUniqueID().intValue() != 0) { writeResource(resource); } } }
[ "private", "void", "writeResources", "(", ")", "{", "for", "(", "Resource", "resource", ":", "m_projectFile", ".", "getResources", "(", ")", ")", "{", "if", "(", "resource", ".", "getUniqueID", "(", ")", ".", "intValue", "(", ")", "!=", "0", ")", "{", ...
This method writes resource data to a PM XML file.
[ "This", "method", "writes", "resource", "data", "to", "a", "PM", "XML", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L508-L517
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeResource
private void writeResource(Resource mpxj) { ResourceType xml = m_factory.createResourceType(); m_apibo.getResource().add(xml); xml.setAutoComputeActuals(Boolean.TRUE); xml.setCalculateCostFromUnits(Boolean.TRUE); xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));...
java
private void writeResource(Resource mpxj) { ResourceType xml = m_factory.createResourceType(); m_apibo.getResource().add(xml); xml.setAutoComputeActuals(Boolean.TRUE); xml.setCalculateCostFromUnits(Boolean.TRUE); xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));...
[ "private", "void", "writeResource", "(", "Resource", "mpxj", ")", "{", "ResourceType", "xml", "=", "m_factory", ".", "createResourceType", "(", ")", ";", "m_apibo", ".", "getResource", "(", ")", ".", "add", "(", "xml", ")", ";", "xml", ".", "setAutoCompute...
Write a single resource. @param mpxj Resource instance
[ "Write", "a", "single", "resource", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L524-L545
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeTask
private void writeTask(Task task) { if (!task.getNull()) { if (extractAndConvertTaskType(task) == null || task.getSummary()) { writeWBS(task); } else { writeActivity(task); } } }
java
private void writeTask(Task task) { if (!task.getNull()) { if (extractAndConvertTaskType(task) == null || task.getSummary()) { writeWBS(task); } else { writeActivity(task); } } }
[ "private", "void", "writeTask", "(", "Task", "task", ")", "{", "if", "(", "!", "task", ".", "getNull", "(", ")", ")", "{", "if", "(", "extractAndConvertTaskType", "(", "task", ")", "==", "null", "||", "task", ".", "getSummary", "(", ")", ")", "{", ...
Given a Task instance, this task determines if it should be written to the PM XML file as an activity or as a WBS item, and calls the appropriate method. @param task Task instance
[ "Given", "a", "Task", "instance", "this", "task", "determines", "if", "it", "should", "be", "written", "to", "the", "PM", "XML", "file", "as", "an", "activity", "or", "as", "a", "WBS", "item", "and", "calls", "the", "appropriate", "method", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L579-L592
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeWBS
private void writeWBS(Task mpxj) { if (mpxj.getUniqueID().intValue() != 0) { WBSType xml = m_factory.createWBSType(); m_project.getWBS().add(xml); String code = mpxj.getWBS(); code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code; Task parentTas...
java
private void writeWBS(Task mpxj) { if (mpxj.getUniqueID().intValue() != 0) { WBSType xml = m_factory.createWBSType(); m_project.getWBS().add(xml); String code = mpxj.getWBS(); code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code; Task parentTas...
[ "private", "void", "writeWBS", "(", "Task", "mpxj", ")", "{", "if", "(", "mpxj", ".", "getUniqueID", "(", ")", ".", "intValue", "(", ")", "!=", "0", ")", "{", "WBSType", "xml", "=", "m_factory", ".", "createWBSType", "(", ")", ";", "m_project", ".", ...
Writes a WBS entity to the PM XML file. @param mpxj MPXJ Task entity
[ "Writes", "a", "WBS", "entity", "to", "the", "PM", "XML", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L599-L624
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.writeActivity
private void writeActivity(Task mpxj) { ActivityType xml = m_factory.createActivityType(); m_project.getActivity().add(xml); Task parentTask = mpxj.getParentTask(); Integer parentObjectID = parentTask == null ? null : parentTask.getUniqueID(); xml.setActualStartDate(mpxj.getActualStar...
java
private void writeActivity(Task mpxj) { ActivityType xml = m_factory.createActivityType(); m_project.getActivity().add(xml); Task parentTask = mpxj.getParentTask(); Integer parentObjectID = parentTask == null ? null : parentTask.getUniqueID(); xml.setActualStartDate(mpxj.getActualStar...
[ "private", "void", "writeActivity", "(", "Task", "mpxj", ")", "{", "ActivityType", "xml", "=", "m_factory", ".", "createActivityType", "(", ")", ";", "m_project", ".", "getActivity", "(", ")", ".", "add", "(", "xml", ")", ";", "Task", "parentTask", "=", ...
Writes an activity to a PM XML file. @param mpxj MPXJ Task instance
[ "Writes", "an", "activity", "to", "a", "PM", "XML", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L631-L672
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java
PrimaveraPMFileWriter.extractAndConvertTaskType
private String extractAndConvertTaskType(Task task) { String activityType = (String) task.getCachedValue(m_activityTypeField); if (activityType == null) { activityType = "Resource Dependent"; } else { if (ACTIVITY_TYPE_MAP.containsKey(activityType)) { ...
java
private String extractAndConvertTaskType(Task task) { String activityType = (String) task.getCachedValue(m_activityTypeField); if (activityType == null) { activityType = "Resource Dependent"; } else { if (ACTIVITY_TYPE_MAP.containsKey(activityType)) { ...
[ "private", "String", "extractAndConvertTaskType", "(", "Task", "task", ")", "{", "String", "activityType", "=", "(", "String", ")", "task", ".", "getCachedValue", "(", "m_activityTypeField", ")", ";", "if", "(", "activityType", "==", "null", ")", "{", "activit...
Attempts to locate the activity type value extracted from an existing P6 schedule. If necessary converts to the form which can be used in the PMXML file. Returns "Resource Dependent" as the default value. @param task parent task @return activity type
[ "Attempts", "to", "locate", "the", "activity", "type", "value", "extracted", "from", "an", "existing", "P6", "schedule", ".", "If", "necessary", "converts", "to", "the", "form", "which", "can", "be", "used", "in", "the", "PMXML", "file", ".", "Returns", "R...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L682-L697
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train