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/ProjectEntityContainer.java
ProjectEntityContainer.renumberUniqueIDs
public void renumberUniqueIDs() { int uid = firstUniqueID(); for (T entity : this) { entity.setUniqueID(Integer.valueOf(uid++)); } }
java
public void renumberUniqueIDs() { int uid = firstUniqueID(); for (T entity : this) { entity.setUniqueID(Integer.valueOf(uid++)); } }
[ "public", "void", "renumberUniqueIDs", "(", ")", "{", "int", "uid", "=", "firstUniqueID", "(", ")", ";", "for", "(", "T", "entity", ":", "this", ")", "{", "entity", ".", "setUniqueID", "(", "Integer", ".", "valueOf", "(", "uid", "++", ")", ")", ";", ...
Renumbers all entity unique IDs.
[ "Renumbers", "all", "entity", "unique", "IDs", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectEntityContainer.java#L61-L68
train
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectEntityContainer.java
ProjectEntityContainer.validateUniqueIDsForMicrosoftProject
public void validateUniqueIDsForMicrosoftProject() { if (!isEmpty()) { for (T entity : this) { if (NumberHelper.getInt(entity.getUniqueID()) > MS_PROJECT_MAX_UNIQUE_ID) { renumberUniqueIDs(); break; } } } ...
java
public void validateUniqueIDsForMicrosoftProject() { if (!isEmpty()) { for (T entity : this) { if (NumberHelper.getInt(entity.getUniqueID()) > MS_PROJECT_MAX_UNIQUE_ID) { renumberUniqueIDs(); break; } } } ...
[ "public", "void", "validateUniqueIDsForMicrosoftProject", "(", ")", "{", "if", "(", "!", "isEmpty", "(", ")", ")", "{", "for", "(", "T", "entity", ":", "this", ")", "{", "if", "(", "NumberHelper", ".", "getInt", "(", "entity", ".", "getUniqueID", "(", ...
Validate that the Unique IDs for the entities in this container are valid for MS Project. If they are not valid, i.e one or more of them are too large, renumber them.
[ "Validate", "that", "the", "Unique", "IDs", "for", "the", "entities", "in", "this", "container", "are", "valid", "for", "MS", "Project", ".", "If", "they", "are", "not", "valid", "i", ".", "e", "one", "or", "more", "of", "them", "are", "too", "large", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectEntityContainer.java#L74-L87
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.readDefinitions
private void readDefinitions() { for (MapRow row : m_tables.get("TTL")) { Integer id = row.getInteger("DEFINITION_ID"); List<MapRow> list = m_definitions.get(id); if (list == null) { list = new ArrayList<MapRow>(); m_definitions.put(id, list); ...
java
private void readDefinitions() { for (MapRow row : m_tables.get("TTL")) { Integer id = row.getInteger("DEFINITION_ID"); List<MapRow> list = m_definitions.get(id); if (list == null) { list = new ArrayList<MapRow>(); m_definitions.put(id, list); ...
[ "private", "void", "readDefinitions", "(", ")", "{", "for", "(", "MapRow", "row", ":", "m_tables", ".", "get", "(", "\"TTL\"", ")", ")", "{", "Integer", "id", "=", "row", ".", "getInteger", "(", "\"DEFINITION_ID\"", ")", ";", "List", "<", "MapRow", ">"...
Extract definition records from the table and divide into groups.
[ "Extract", "definition", "records", "from", "the", "table", "and", "divide", "into", "groups", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L280-L299
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.readCalendars
private void readCalendars() { Table cal = m_tables.get("CAL"); for (MapRow row : cal) { ProjectCalendar calendar = m_projectFile.addCalendar(); m_calendarMap.put(row.getInteger("CALENDAR_ID"), calendar); Integer[] days = { row.getInteger("SUNDAY_HOUR...
java
private void readCalendars() { Table cal = m_tables.get("CAL"); for (MapRow row : cal) { ProjectCalendar calendar = m_projectFile.addCalendar(); m_calendarMap.put(row.getInteger("CALENDAR_ID"), calendar); Integer[] days = { row.getInteger("SUNDAY_HOUR...
[ "private", "void", "readCalendars", "(", ")", "{", "Table", "cal", "=", "m_tables", ".", "get", "(", "\"CAL\"", ")", ";", "for", "(", "MapRow", "row", ":", "cal", ")", "{", "ProjectCalendar", "calendar", "=", "m_projectFile", ".", "addCalendar", "(", ")"...
Read project calendars.
[ "Read", "project", "calendars", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L304-L364
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.readHours
private void readHours(ProjectCalendar calendar, Day day, Integer hours) { int value = hours.intValue(); int startHour = 0; ProjectCalendarHours calendarHours = null; Calendar cal = DateHelper.popCalendar(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal...
java
private void readHours(ProjectCalendar calendar, Day day, Integer hours) { int value = hours.intValue(); int startHour = 0; ProjectCalendarHours calendarHours = null; Calendar cal = DateHelper.popCalendar(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal...
[ "private", "void", "readHours", "(", "ProjectCalendar", "calendar", ",", "Day", "day", ",", "Integer", "hours", ")", "{", "int", "value", "=", "hours", ".", "intValue", "(", ")", ";", "int", "startHour", "=", "0", ";", "ProjectCalendarHours", "calendarHours"...
Reads the integer representation of calendar hours for a given day and populates the calendar. @param calendar parent calendar @param day target day @param hours working hours
[ "Reads", "the", "integer", "representation", "of", "calendar", "hours", "for", "a", "given", "day", "and", "populates", "the", "calendar", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L374-L426
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.countHours
private int countHours(Integer hours) { int value = hours.intValue(); int hoursPerDay = 0; int hour = 0; while (value > 0) { // Move forward until we find a working hour while (hour < 24) { if ((value & 0x1) != 0) { ++hou...
java
private int countHours(Integer hours) { int value = hours.intValue(); int hoursPerDay = 0; int hour = 0; while (value > 0) { // Move forward until we find a working hour while (hour < 24) { if ((value & 0x1) != 0) { ++hou...
[ "private", "int", "countHours", "(", "Integer", "hours", ")", "{", "int", "value", "=", "hours", ".", "intValue", "(", ")", ";", "int", "hoursPerDay", "=", "0", ";", "int", "hour", "=", "0", ";", "while", "(", "value", ">", "0", ")", "{", "// Move ...
Count the number of working hours in a day, based in the integer representation of the working hours. @param hours working hours @return number of hours
[ "Count", "the", "number", "of", "working", "hours", "in", "a", "day", "based", "in", "the", "integer", "representation", "of", "the", "working", "hours", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L435-L454
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.readHolidays
private void readHolidays() { for (MapRow row : m_tables.get("HOL")) { ProjectCalendar calendar = m_calendarMap.get(row.getInteger("CALENDAR_ID")); if (calendar != null) { Date date = row.getDate("DATE"); ProjectCalendarException exception = calendar.add...
java
private void readHolidays() { for (MapRow row : m_tables.get("HOL")) { ProjectCalendar calendar = m_calendarMap.get(row.getInteger("CALENDAR_ID")); if (calendar != null) { Date date = row.getDate("DATE"); ProjectCalendarException exception = calendar.add...
[ "private", "void", "readHolidays", "(", ")", "{", "for", "(", "MapRow", "row", ":", "m_tables", ".", "get", "(", "\"HOL\"", ")", ")", "{", "ProjectCalendar", "calendar", "=", "m_calendarMap", ".", "get", "(", "row", ".", "getInteger", "(", "\"CALENDAR_ID\"...
Read holidays from the database and create calendar exceptions.
[ "Read", "holidays", "from", "the", "database", "and", "create", "calendar", "exceptions", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L459-L479
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java
SureTrakDatabaseReader.readActivities
private void readActivities() { List<MapRow> items = new ArrayList<MapRow>(); for (MapRow row : m_tables.get("ACT")) { items.add(row); } final AlphanumComparator comparator = new AlphanumComparator(); Collections.sort(items, new Comparator<MapRow>() { @Over...
java
private void readActivities() { List<MapRow> items = new ArrayList<MapRow>(); for (MapRow row : m_tables.get("ACT")) { items.add(row); } final AlphanumComparator comparator = new AlphanumComparator(); Collections.sort(items, new Comparator<MapRow>() { @Over...
[ "private", "void", "readActivities", "(", ")", "{", "List", "<", "MapRow", ">", "items", "=", "new", "ArrayList", "<", "MapRow", ">", "(", ")", ";", "for", "(", "MapRow", "row", ":", "m_tables", ".", "get", "(", "\"ACT\"", ")", ")", "{", "items", "...
Read activities.
[ "Read", "activities", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/suretrak/SureTrakDatabaseReader.java#L588-L636
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CostRateTableFactory.java
CostRateTableFactory.process
public void process(Resource resource, int index, byte[] data) { CostRateTable result = new CostRateTable(); if (data != null) { for (int i = 16; i + 44 <= data.length; i += 44) { Rate standardRate = new Rate(MPPUtility.getDouble(data, i), TimeUnit.HOURS); ...
java
public void process(Resource resource, int index, byte[] data) { CostRateTable result = new CostRateTable(); if (data != null) { for (int i = 16; i + 44 <= data.length; i += 44) { Rate standardRate = new Rate(MPPUtility.getDouble(data, i), TimeUnit.HOURS); ...
[ "public", "void", "process", "(", "Resource", "resource", ",", "int", "index", ",", "byte", "[", "]", "data", ")", "{", "CostRateTable", "result", "=", "new", "CostRateTable", "(", ")", ";", "if", "(", "data", "!=", "null", ")", "{", "for", "(", "int...
Creates a CostRateTable instance from a block of data. @param resource parent resource @param index cost rate table index @param data data block
[ "Creates", "a", "CostRateTable", "instance", "from", "a", "block", "of", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CostRateTableFactory.java#L48-L88
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CostRateTableFactory.java
CostRateTableFactory.getFormat
private TimeUnit getFormat(int format) { TimeUnit result; if (format == 0xFFFF) { result = TimeUnit.HOURS; } else { result = MPPUtility.getWorkTimeUnits(format); } return result; }
java
private TimeUnit getFormat(int format) { TimeUnit result; if (format == 0xFFFF) { result = TimeUnit.HOURS; } else { result = MPPUtility.getWorkTimeUnits(format); } return result; }
[ "private", "TimeUnit", "getFormat", "(", "int", "format", ")", "{", "TimeUnit", "result", ";", "if", "(", "format", "==", "0xFFFF", ")", "{", "result", "=", "TimeUnit", ".", "HOURS", ";", "}", "else", "{", "result", "=", "MPPUtility", ".", "getWorkTimeUn...
Converts an integer into a time format. @param format integer format value @return TimeUnit instance
[ "Converts", "an", "integer", "into", "a", "time", "format", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CostRateTableFactory.java#L96-L108
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/ConstraintTypeUtility.java
ConstraintTypeUtility.getInstance
public static ConstraintType getInstance(Locale locale, String type) { int index = 0; String[] constraintTypes = LocaleData.getStringArray(locale, LocaleData.CONSTRAINT_TYPES); for (int loop = 0; loop < constraintTypes.length; loop++) { if (constraintTypes[loop].equalsIgnoreCase(typ...
java
public static ConstraintType getInstance(Locale locale, String type) { int index = 0; String[] constraintTypes = LocaleData.getStringArray(locale, LocaleData.CONSTRAINT_TYPES); for (int loop = 0; loop < constraintTypes.length; loop++) { if (constraintTypes[loop].equalsIgnoreCase(typ...
[ "public", "static", "ConstraintType", "getInstance", "(", "Locale", "locale", ",", "String", "type", ")", "{", "int", "index", "=", "0", ";", "String", "[", "]", "constraintTypes", "=", "LocaleData", ".", "getStringArray", "(", "locale", ",", "LocaleData", "...
This method takes the textual version of a constraint name and returns an appropriate class instance. Note that unrecognised values are treated as "As Soon As Possible" constraints. @param locale target locale @param type text version of the constraint type @return ConstraintType instance
[ "This", "method", "takes", "the", "textual", "version", "of", "a", "constraint", "name", "and", "returns", "an", "appropriate", "class", "instance", ".", "Note", "that", "unrecognised", "values", "are", "treated", "as", "As", "Soon", "As", "Possible", "constra...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/ConstraintTypeUtility.java#L53-L68
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.query
private static void query(String filename) throws Exception { ProjectFile mpx = new UniversalProjectReader().read(filename); listProjectProperties(mpx); listResources(mpx); listTasks(mpx); listAssignments(mpx); listAssignmentsByTask(mpx); listAssignmentsByResource(mpx)...
java
private static void query(String filename) throws Exception { ProjectFile mpx = new UniversalProjectReader().read(filename); listProjectProperties(mpx); listResources(mpx); listTasks(mpx); listAssignments(mpx); listAssignmentsByTask(mpx); listAssignmentsByResource(mpx)...
[ "private", "static", "void", "query", "(", "String", "filename", ")", "throws", "Exception", "{", "ProjectFile", "mpx", "=", "new", "UniversalProjectReader", "(", ")", ".", "read", "(", "filename", ")", ";", "listProjectProperties", "(", "mpx", ")", ";", "li...
This method performs a set of queries to retrieve information from the an MPP or an MPX file. @param filename name of the MPX file @throws Exception on file read error
[ "This", "method", "performs", "a", "set", "of", "queries", "to", "retrieve", "information", "from", "the", "an", "MPP", "or", "an", "MPX", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L84-L112
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listProjectProperties
private static void listProjectProperties(ProjectFile file) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z"); ProjectProperties properties = file.getProjectProperties(); Date startDate = properties.getStartDate(); Date finishDate = properties.getFinishDate(); String fo...
java
private static void listProjectProperties(ProjectFile file) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z"); ProjectProperties properties = file.getProjectProperties(); Date startDate = properties.getStartDate(); Date finishDate = properties.getFinishDate(); String fo...
[ "private", "static", "void", "listProjectProperties", "(", "ProjectFile", "file", ")", "{", "SimpleDateFormat", "df", "=", "new", "SimpleDateFormat", "(", "\"dd/MM/yyyy HH:mm z\"", ")", ";", "ProjectProperties", "properties", "=", "file", ".", "getProjectProperties", ...
Reads basic summary details from the project properties. @param file MPX file
[ "Reads", "basic", "summary", "details", "from", "the", "project", "properties", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L119-L131
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listResources
private static void listResources(ProjectFile file) { for (Resource resource : file.getResources()) { System.out.println("Resource: " + resource.getName() + " (Unique ID=" + resource.getUniqueID() + ") Start=" + resource.getStart() + " Finish=" + resource.getFinish()); } System.out.p...
java
private static void listResources(ProjectFile file) { for (Resource resource : file.getResources()) { System.out.println("Resource: " + resource.getName() + " (Unique ID=" + resource.getUniqueID() + ") Start=" + resource.getStart() + " Finish=" + resource.getFinish()); } System.out.p...
[ "private", "static", "void", "listResources", "(", "ProjectFile", "file", ")", "{", "for", "(", "Resource", "resource", ":", "file", ".", "getResources", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Resource: \"", "+", "resource", ".",...
This method lists all resources defined in the file. @param file MPX file
[ "This", "method", "lists", "all", "resources", "defined", "in", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L138-L145
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listTasks
private static void listTasks(ProjectFile file) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z"); for (Task task : file.getTasks()) { Date date = task.getStart(); String text = task.getStartText(); String startDate = text != null ? text : (date != null ...
java
private static void listTasks(ProjectFile file) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z"); for (Task task : file.getTasks()) { Date date = task.getStart(); String text = task.getStartText(); String startDate = text != null ? text : (date != null ...
[ "private", "static", "void", "listTasks", "(", "ProjectFile", "file", ")", "{", "SimpleDateFormat", "df", "=", "new", "SimpleDateFormat", "(", "\"dd/MM/yyyy HH:mm z\"", ")", ";", "for", "(", "Task", "task", ":", "file", ".", "getTasks", "(", ")", ")", "{", ...
This method lists all tasks defined in the file. @param file MPX file
[ "This", "method", "lists", "all", "tasks", "defined", "in", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L152-L190
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listHierarchy
private static void listHierarchy(ProjectFile file) { for (Task task : file.getChildTasks()) { System.out.println("Task: " + task.getName() + "\t" + task.getStart() + "\t" + task.getFinish()); listHierarchy(task, " "); } System.out.println(); }
java
private static void listHierarchy(ProjectFile file) { for (Task task : file.getChildTasks()) { System.out.println("Task: " + task.getName() + "\t" + task.getStart() + "\t" + task.getFinish()); listHierarchy(task, " "); } System.out.println(); }
[ "private", "static", "void", "listHierarchy", "(", "ProjectFile", "file", ")", "{", "for", "(", "Task", "task", ":", "file", ".", "getChildTasks", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Task: \"", "+", "task", ".", "getName", ...
This method lists all tasks defined in the file in a hierarchical format, reflecting the parent-child relationships between them. @param file MPX file
[ "This", "method", "lists", "all", "tasks", "defined", "in", "the", "file", "in", "a", "hierarchical", "format", "reflecting", "the", "parent", "-", "child", "relationships", "between", "them", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L198-L207
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listHierarchy
private static void listHierarchy(Task task, String indent) { for (Task child : task.getChildTasks()) { System.out.println(indent + "Task: " + child.getName() + "\t" + child.getStart() + "\t" + child.getFinish()); listHierarchy(child, indent + " "); } }
java
private static void listHierarchy(Task task, String indent) { for (Task child : task.getChildTasks()) { System.out.println(indent + "Task: " + child.getName() + "\t" + child.getStart() + "\t" + child.getFinish()); listHierarchy(child, indent + " "); } }
[ "private", "static", "void", "listHierarchy", "(", "Task", "task", ",", "String", "indent", ")", "{", "for", "(", "Task", "child", ":", "task", ".", "getChildTasks", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "indent", "+", "\"Task:...
Helper method called recursively to list child tasks. @param task task whose children are to be displayed @param indent whitespace used to indent hierarchy levels
[ "Helper", "method", "called", "recursively", "to", "list", "child", "tasks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L215-L222
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listAssignments
private static void listAssignments(ProjectFile file) { Task task; Resource resource; String taskName; String resourceName; for (ResourceAssignment assignment : file.getResourceAssignments()) { task = assignment.getTask(); if (task == null) { ...
java
private static void listAssignments(ProjectFile file) { Task task; Resource resource; String taskName; String resourceName; for (ResourceAssignment assignment : file.getResourceAssignments()) { task = assignment.getTask(); if (task == null) { ...
[ "private", "static", "void", "listAssignments", "(", "ProjectFile", "file", ")", "{", "Task", "task", ";", "Resource", "resource", ";", "String", "taskName", ";", "String", "resourceName", ";", "for", "(", "ResourceAssignment", "assignment", ":", "file", ".", ...
This method lists all resource assignments defined in the file. @param file MPX file
[ "This", "method", "lists", "all", "resource", "assignments", "defined", "in", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L229-L266
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listTimephasedWork
private static void listTimephasedWork(ResourceAssignment assignment) { Task task = assignment.getTask(); int days = (int) ((task.getFinish().getTime() - task.getStart().getTime()) / (1000 * 60 * 60 * 24)) + 1; if (days > 1) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yy"); ...
java
private static void listTimephasedWork(ResourceAssignment assignment) { Task task = assignment.getTask(); int days = (int) ((task.getFinish().getTime() - task.getStart().getTime()) / (1000 * 60 * 60 * 24)) + 1; if (days > 1) { SimpleDateFormat df = new SimpleDateFormat("dd/MM/yy"); ...
[ "private", "static", "void", "listTimephasedWork", "(", "ResourceAssignment", "assignment", ")", "{", "Task", "task", "=", "assignment", ".", "getTask", "(", ")", ";", "int", "days", "=", "(", "int", ")", "(", "(", "task", ".", "getFinish", "(", ")", "."...
Dump timephased work for an assignment. @param assignment resource assignment
[ "Dump", "timephased", "work", "for", "an", "assignment", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L273-L297
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listAssignmentsByTask
private static void listAssignmentsByTask(ProjectFile file) { for (Task task : file.getTasks()) { System.out.println("Assignments for task " + task.getName() + ":"); for (ResourceAssignment assignment : task.getResourceAssignments()) { Resource resource = assignmen...
java
private static void listAssignmentsByTask(ProjectFile file) { for (Task task : file.getTasks()) { System.out.println("Assignments for task " + task.getName() + ":"); for (ResourceAssignment assignment : task.getResourceAssignments()) { Resource resource = assignmen...
[ "private", "static", "void", "listAssignmentsByTask", "(", "ProjectFile", "file", ")", "{", "for", "(", "Task", "task", ":", "file", ".", "getTasks", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Assignments for task \"", "+", "task", "...
This method displays the resource assignments for each task. This time rather than just iterating through the list of all assignments in the file, we extract the assignments on a task-by-task basis. @param file MPX file
[ "This", "method", "displays", "the", "resource", "assignments", "for", "each", "task", ".", "This", "time", "rather", "than", "just", "iterating", "through", "the", "list", "of", "all", "assignments", "in", "the", "file", "we", "extract", "the", "assignments",...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L306-L331
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listAssignmentsByResource
private static void listAssignmentsByResource(ProjectFile file) { for (Resource resource : file.getResources()) { System.out.println("Assignments for resource " + resource.getName() + ":"); for (ResourceAssignment assignment : resource.getTaskAssignments()) { Task ...
java
private static void listAssignmentsByResource(ProjectFile file) { for (Resource resource : file.getResources()) { System.out.println("Assignments for resource " + resource.getName() + ":"); for (ResourceAssignment assignment : resource.getTaskAssignments()) { Task ...
[ "private", "static", "void", "listAssignmentsByResource", "(", "ProjectFile", "file", ")", "{", "for", "(", "Resource", "resource", ":", "file", ".", "getResources", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Assignments for resource \"", ...
This method displays the resource assignments for each resource. This time rather than just iterating through the list of all assignments in the file, we extract the assignments on a resource-by-resource basis. @param file MPX file
[ "This", "method", "displays", "the", "resource", "assignments", "for", "each", "resource", ".", "This", "time", "rather", "than", "just", "iterating", "through", "the", "list", "of", "all", "assignments", "in", "the", "file", "we", "extract", "the", "assignmen...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L340-L354
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listTaskNotes
private static void listTaskNotes(ProjectFile file) { for (Task task : file.getTasks()) { String notes = task.getNotes(); if (notes.length() != 0) { System.out.println("Notes for " + task.getName() + ": " + notes); } } System.out.println(); ...
java
private static void listTaskNotes(ProjectFile file) { for (Task task : file.getTasks()) { String notes = task.getNotes(); if (notes.length() != 0) { System.out.println("Notes for " + task.getName() + ": " + notes); } } System.out.println(); ...
[ "private", "static", "void", "listTaskNotes", "(", "ProjectFile", "file", ")", "{", "for", "(", "Task", "task", ":", "file", ".", "getTasks", "(", ")", ")", "{", "String", "notes", "=", "task", ".", "getNotes", "(", ")", ";", "if", "(", "notes", ".",...
This method lists any notes attached to tasks. @param file MPX file
[ "This", "method", "lists", "any", "notes", "attached", "to", "tasks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L361-L374
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listResourceNotes
private static void listResourceNotes(ProjectFile file) { for (Resource resource : file.getResources()) { String notes = resource.getNotes(); if (notes.length() != 0) { System.out.println("Notes for " + resource.getName() + ": " + notes); } } ...
java
private static void listResourceNotes(ProjectFile file) { for (Resource resource : file.getResources()) { String notes = resource.getNotes(); if (notes.length() != 0) { System.out.println("Notes for " + resource.getName() + ": " + notes); } } ...
[ "private", "static", "void", "listResourceNotes", "(", "ProjectFile", "file", ")", "{", "for", "(", "Resource", "resource", ":", "file", ".", "getResources", "(", ")", ")", "{", "String", "notes", "=", "resource", ".", "getNotes", "(", ")", ";", "if", "(...
This method lists any notes attached to resources. @param file MPX file
[ "This", "method", "lists", "any", "notes", "attached", "to", "resources", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L381-L394
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listRelationships
private static void listRelationships(ProjectFile file) { for (Task task : file.getTasks()) { System.out.print(task.getID()); System.out.print('\t'); System.out.print(task.getName()); System.out.print('\t'); dumpRelationList(task.getPredecessors()); ...
java
private static void listRelationships(ProjectFile file) { for (Task task : file.getTasks()) { System.out.print(task.getID()); System.out.print('\t'); System.out.print(task.getName()); System.out.print('\t'); dumpRelationList(task.getPredecessors()); ...
[ "private", "static", "void", "listRelationships", "(", "ProjectFile", "file", ")", "{", "for", "(", "Task", "task", ":", "file", ".", "getTasks", "(", ")", ")", "{", "System", ".", "out", ".", "print", "(", "task", ".", "getID", "(", ")", ")", ";", ...
This method lists task predecessor and successor relationships. @param file project file
[ "This", "method", "lists", "task", "predecessor", "and", "successor", "relationships", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L401-L415
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.dumpRelationList
private static void dumpRelationList(List<Relation> relations) { if (relations != null && relations.isEmpty() == false) { if (relations.size() > 1) { System.out.print('"'); } boolean first = true; for (Relation relation : relations) { ...
java
private static void dumpRelationList(List<Relation> relations) { if (relations != null && relations.isEmpty() == false) { if (relations.size() > 1) { System.out.print('"'); } boolean first = true; for (Relation relation : relations) { ...
[ "private", "static", "void", "dumpRelationList", "(", "List", "<", "Relation", ">", "relations", ")", "{", "if", "(", "relations", "!=", "null", "&&", "relations", ".", "isEmpty", "(", ")", "==", "false", ")", "{", "if", "(", "relations", ".", "size", ...
Internal utility to dump relationship lists in a structured format that can easily be compared with the tabular data in MS Project. @param relations relation list
[ "Internal", "utility", "to", "dump", "relationship", "lists", "in", "a", "structured", "format", "that", "can", "easily", "be", "compared", "with", "the", "tabular", "data", "in", "MS", "Project", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L423-L460
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listSlack
private static void listSlack(ProjectFile file) { for (Task task : file.getTasks()) { System.out.println(task.getName() + " Total Slack=" + task.getTotalSlack() + " Start Slack=" + task.getStartSlack() + " Finish Slack=" + task.getFinishSlack()); } }
java
private static void listSlack(ProjectFile file) { for (Task task : file.getTasks()) { System.out.println(task.getName() + " Total Slack=" + task.getTotalSlack() + " Start Slack=" + task.getStartSlack() + " Finish Slack=" + task.getFinishSlack()); } }
[ "private", "static", "void", "listSlack", "(", "ProjectFile", "file", ")", "{", "for", "(", "Task", "task", ":", "file", ".", "getTasks", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "task", ".", "getName", "(", ")", "+", "\" Total ...
List the slack values for each task. @param file ProjectFile instance
[ "List", "the", "slack", "values", "for", "each", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L467-L473
train
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MpxjQuery.java
MpxjQuery.listCalendars
private static void listCalendars(ProjectFile file) { for (ProjectCalendar cal : file.getCalendars()) { System.out.println(cal.toString()); } }
java
private static void listCalendars(ProjectFile file) { for (ProjectCalendar cal : file.getCalendars()) { System.out.println(cal.toString()); } }
[ "private", "static", "void", "listCalendars", "(", "ProjectFile", "file", ")", "{", "for", "(", "ProjectCalendar", "cal", ":", "file", ".", "getCalendars", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "cal", ".", "toString", "(", ")", ...
List details of all calendars in the file. @param file ProjectFile instance
[ "List", "details", "of", "all", "calendars", "in", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjQuery.java#L480-L486
train
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarContainer.java
ProjectCalendarContainer.addDefaultBaseCalendar
public ProjectCalendar addDefaultBaseCalendar() { ProjectCalendar calendar = add(); calendar.setName(ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME); calendar.setWorkingDay(Day.SUNDAY, false); calendar.setWorkingDay(Day.MONDAY, true); calendar.setWorkingDay(Day.TUESDAY, true); calen...
java
public ProjectCalendar addDefaultBaseCalendar() { ProjectCalendar calendar = add(); calendar.setName(ProjectCalendar.DEFAULT_BASE_CALENDAR_NAME); calendar.setWorkingDay(Day.SUNDAY, false); calendar.setWorkingDay(Day.MONDAY, true); calendar.setWorkingDay(Day.TUESDAY, true); calen...
[ "public", "ProjectCalendar", "addDefaultBaseCalendar", "(", ")", "{", "ProjectCalendar", "calendar", "=", "add", "(", ")", ";", "calendar", ".", "setName", "(", "ProjectCalendar", ".", "DEFAULT_BASE_CALENDAR_NAME", ")", ";", "calendar", ".", "setWorkingDay", "(", ...
This is a convenience method used to add a calendar called "Standard" to the project, and populate it with a default working week and default working hours. @return a new default calendar
[ "This", "is", "a", "convenience", "method", "used", "to", "add", "a", "calendar", "called", "Standard", "to", "the", "project", "and", "populate", "it", "with", "a", "default", "working", "week", "and", "default", "working", "hours", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarContainer.java#L73-L90
train
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarContainer.java
ProjectCalendarContainer.addDefaultDerivedCalendar
public ProjectCalendar addDefaultDerivedCalendar() { ProjectCalendar calendar = add(); calendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.WEDNESDAY, D...
java
public ProjectCalendar addDefaultDerivedCalendar() { ProjectCalendar calendar = add(); calendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT); calendar.setWorkingDay(Day.WEDNESDAY, D...
[ "public", "ProjectCalendar", "addDefaultDerivedCalendar", "(", ")", "{", "ProjectCalendar", "calendar", "=", "add", "(", ")", ";", "calendar", ".", "setWorkingDay", "(", "Day", ".", "SUNDAY", ",", "DayType", ".", "DEFAULT", ")", ";", "calendar", ".", "setWorki...
This is a convenience method to add a default derived calendar to the project. @return new ProjectCalendar instance
[ "This", "is", "a", "convenience", "method", "to", "add", "a", "default", "derived", "calendar", "to", "the", "project", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarContainer.java#L98-L111
train
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarContainer.java
ProjectCalendarContainer.getByName
public ProjectCalendar getByName(String calendarName) { ProjectCalendar calendar = null; if (calendarName != null && calendarName.length() != 0) { Iterator<ProjectCalendar> iter = iterator(); while (iter.hasNext() == true) { calendar = iter.next(); ...
java
public ProjectCalendar getByName(String calendarName) { ProjectCalendar calendar = null; if (calendarName != null && calendarName.length() != 0) { Iterator<ProjectCalendar> iter = iterator(); while (iter.hasNext() == true) { calendar = iter.next(); ...
[ "public", "ProjectCalendar", "getByName", "(", "String", "calendarName", ")", "{", "ProjectCalendar", "calendar", "=", "null", ";", "if", "(", "calendarName", "!=", "null", "&&", "calendarName", ".", "length", "(", ")", "!=", "0", ")", "{", "Iterator", "<", ...
Retrieves the named calendar. This method will return null if the named calendar is not located. @param calendarName name of the required calendar @return ProjectCalendar instance
[ "Retrieves", "the", "named", "calendar", ".", "This", "method", "will", "return", "null", "if", "the", "named", "calendar", "is", "not", "located", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarContainer.java#L120-L142
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDDatabaseReader.java
MPDDatabaseReader.read
public ProjectFile read() throws MPXJException { MPD9DatabaseReader reader = new MPD9DatabaseReader(); reader.setProjectID(m_projectID); reader.setPreserveNoteFormatting(m_preserveNoteFormatting); reader.setDataSource(m_dataSource); reader.setConnection(m_connection); ProjectFile ...
java
public ProjectFile read() throws MPXJException { MPD9DatabaseReader reader = new MPD9DatabaseReader(); reader.setProjectID(m_projectID); reader.setPreserveNoteFormatting(m_preserveNoteFormatting); reader.setDataSource(m_dataSource); reader.setConnection(m_connection); ProjectFile ...
[ "public", "ProjectFile", "read", "(", ")", "throws", "MPXJException", "{", "MPD9DatabaseReader", "reader", "=", "new", "MPD9DatabaseReader", "(", ")", ";", "reader", ".", "setProjectID", "(", "m_projectID", ")", ";", "reader", ".", "setPreserveNoteFormatting", "("...
Read project data from a database. @return ProjectFile instance @throws MPXJException
[ "Read", "project", "data", "from", "a", "database", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDDatabaseReader.java#L79-L88
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDDatabaseReader.java
MPDDatabaseReader.read
@Override public ProjectFile read(String accessDatabaseFileName) throws MPXJException { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + accessDatabaseFileName; m_connection = DriverManager.getConnection...
java
@Override public ProjectFile read(String accessDatabaseFileName) throws MPXJException { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=" + accessDatabaseFileName; m_connection = DriverManager.getConnection...
[ "@", "Override", "public", "ProjectFile", "read", "(", "String", "accessDatabaseFileName", ")", "throws", "MPXJException", "{", "try", "{", "Class", ".", "forName", "(", "\"sun.jdbc.odbc.JdbcOdbcDriver\"", ")", ";", "String", "url", "=", "\"jdbc:odbc:DRIVER=Microsoft ...
This is a convenience method which reads the first project from the named MPD file using the JDBC-ODBC bridge driver. @param accessDatabaseFileName access database file name @return ProjectFile instance @throws MPXJException
[ "This", "is", "a", "convenience", "method", "which", "reads", "the", "first", "project", "from", "the", "named", "MPD", "file", "using", "the", "JDBC", "-", "ODBC", "bridge", "driver", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDDatabaseReader.java#L142-L178
train
joniles/mpxj
src/main/java/net/sf/mpxj/writer/ProjectWriterUtility.java
ProjectWriterUtility.getProjectWriter
public static ProjectWriter getProjectWriter(String name) throws InstantiationException, IllegalAccessException { int index = name.lastIndexOf('.'); if (index == -1) { throw new IllegalArgumentException("Filename has no extension: " + name); } String extension = name.substring...
java
public static ProjectWriter getProjectWriter(String name) throws InstantiationException, IllegalAccessException { int index = name.lastIndexOf('.'); if (index == -1) { throw new IllegalArgumentException("Filename has no extension: " + name); } String extension = name.substring...
[ "public", "static", "ProjectWriter", "getProjectWriter", "(", "String", "name", ")", "throws", "InstantiationException", ",", "IllegalAccessException", "{", "int", "index", "=", "name", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "index", "==", "-"...
Retrieves a ProjectWriter instance which can write a file of the type specified by the supplied file name. @param name file name @return ProjectWriter instance
[ "Retrieves", "a", "ProjectWriter", "instance", "which", "can", "write", "a", "file", "of", "the", "type", "specified", "by", "the", "supplied", "file", "name", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/writer/ProjectWriterUtility.java#L57-L76
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java
CustomFieldValueReader9.processCustomFieldValues
private void processCustomFieldValues() { byte[] data = m_projectProps.getByteArray(Props.TASK_FIELD_ATTRIBUTES); if (data != null) { int index = 0; int offset = 0; // First the length int length = MPPUtility.getInt(data, offset); offset += 4; /...
java
private void processCustomFieldValues() { byte[] data = m_projectProps.getByteArray(Props.TASK_FIELD_ATTRIBUTES); if (data != null) { int index = 0; int offset = 0; // First the length int length = MPPUtility.getInt(data, offset); offset += 4; /...
[ "private", "void", "processCustomFieldValues", "(", ")", "{", "byte", "[", "]", "data", "=", "m_projectProps", ".", "getByteArray", "(", "Props", ".", "TASK_FIELD_ATTRIBUTES", ")", ";", "if", "(", "data", "!=", "null", ")", "{", "int", "index", "=", "0", ...
Reads non outline code custom field values and populates container.
[ "Reads", "non", "outline", "code", "custom", "field", "values", "and", "populates", "container", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java#L83-L140
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java
CustomFieldValueReader9.processOutlineCodeValues
private void processOutlineCodeValues() throws IOException { DirectoryEntry outlineCodeDir = (DirectoryEntry) m_projectDir.getEntry("TBkndOutlCode"); FixedMeta fm = new FixedMeta(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedMeta"))), 10); FixedData fd = new FixedData(fm, n...
java
private void processOutlineCodeValues() throws IOException { DirectoryEntry outlineCodeDir = (DirectoryEntry) m_projectDir.getEntry("TBkndOutlCode"); FixedMeta fm = new FixedMeta(new DocumentInputStream(((DocumentEntry) outlineCodeDir.getEntry("FixedMeta"))), 10); FixedData fd = new FixedData(fm, n...
[ "private", "void", "processOutlineCodeValues", "(", ")", "throws", "IOException", "{", "DirectoryEntry", "outlineCodeDir", "=", "(", "DirectoryEntry", ")", "m_projectDir", ".", "getEntry", "(", "\"TBkndOutlCode\"", ")", ";", "FixedMeta", "fm", "=", "new", "FixedMeta...
Reads outline code custom field values and populates container.
[ "Reads", "outline", "code", "custom", "field", "values", "and", "populates", "container", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java#L145-L195
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java
CustomFieldValueReader9.populateContainer
private void populateContainer(FieldType field, byte[] values, byte[] descriptions) { CustomField config = m_container.getCustomField(field); CustomFieldLookupTable table = config.getLookupTable(); List<Object> descriptionList = convertType(DataType.STRING, descriptions); List<Object> valueL...
java
private void populateContainer(FieldType field, byte[] values, byte[] descriptions) { CustomField config = m_container.getCustomField(field); CustomFieldLookupTable table = config.getLookupTable(); List<Object> descriptionList = convertType(DataType.STRING, descriptions); List<Object> valueL...
[ "private", "void", "populateContainer", "(", "FieldType", "field", ",", "byte", "[", "]", "values", ",", "byte", "[", "]", "descriptions", ")", "{", "CustomField", "config", "=", "m_container", ".", "getCustomField", "(", "field", ")", ";", "CustomFieldLookupT...
Populate the container, converting raw data into Java types. @param field custom field to which these values belong @param values raw value data @param descriptions raw description data
[ "Populate", "the", "container", "converting", "raw", "data", "into", "Java", "types", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java#L204-L221
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java
CustomFieldValueReader9.populateContainer
private void populateContainer(FieldType field, List<Pair<String, String>> items) { CustomField config = m_container.getCustomField(field); CustomFieldLookupTable table = config.getLookupTable(); for (Pair<String, String> pair : items) { CustomFieldValueItem item = new CustomFieldVa...
java
private void populateContainer(FieldType field, List<Pair<String, String>> items) { CustomField config = m_container.getCustomField(field); CustomFieldLookupTable table = config.getLookupTable(); for (Pair<String, String> pair : items) { CustomFieldValueItem item = new CustomFieldVa...
[ "private", "void", "populateContainer", "(", "FieldType", "field", ",", "List", "<", "Pair", "<", "String", ",", "String", ">", ">", "items", ")", "{", "CustomField", "config", "=", "m_container", ".", "getCustomField", "(", "field", ")", ";", "CustomFieldLo...
Populate the container from outline code data. @param field field type @param items pairs of values and descriptions
[ "Populate", "the", "container", "from", "outline", "code", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java#L229-L241
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java
CustomFieldValueReader9.convertType
private List<Object> convertType(DataType type, byte[] data) { List<Object> result = new ArrayList<Object>(); int index = 0; while (index < data.length) { switch (type) { case STRING: { String value = MPPUtility.getUnicodeString(data, ...
java
private List<Object> convertType(DataType type, byte[] data) { List<Object> result = new ArrayList<Object>(); int index = 0; while (index < data.length) { switch (type) { case STRING: { String value = MPPUtility.getUnicodeString(data, ...
[ "private", "List", "<", "Object", ">", "convertType", "(", "DataType", "type", ",", "byte", "[", "]", "data", ")", "{", "List", "<", "Object", ">", "result", "=", "new", "ArrayList", "<", "Object", ">", "(", ")", ";", "int", "index", "=", "0", ";",...
Convert raw data into Java types. @param type data type @param data raw data @return list of Java object
[ "Convert", "raw", "data", "into", "Java", "types", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CustomFieldValueReader9.java#L250-L318
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getBoolean
public boolean getBoolean(FastTrackField type) { boolean result = false; Object value = getObject(type); if (value != null) { result = BooleanHelper.getBoolean((Boolean) value); } return result; }
java
public boolean getBoolean(FastTrackField type) { boolean result = false; Object value = getObject(type); if (value != null) { result = BooleanHelper.getBoolean((Boolean) value); } return result; }
[ "public", "boolean", "getBoolean", "(", "FastTrackField", "type", ")", "{", "boolean", "result", "=", "false", ";", "Object", "value", "=", "getObject", "(", "type", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "result", "=", "BooleanHelper", "....
Retrieve a boolean field. @param type field type @return field data
[ "Retrieve", "a", "boolean", "field", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L103-L112
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getTimestamp
public Date getTimestamp(FastTrackField dateName, FastTrackField timeName) { Date result = null; Date date = getDate(dateName); if (date != null) { Calendar dateCal = DateHelper.popCalendar(date); Date time = getDate(timeName); if (time != null) { ...
java
public Date getTimestamp(FastTrackField dateName, FastTrackField timeName) { Date result = null; Date date = getDate(dateName); if (date != null) { Calendar dateCal = DateHelper.popCalendar(date); Date time = getDate(timeName); if (time != null) { ...
[ "public", "Date", "getTimestamp", "(", "FastTrackField", "dateName", ",", "FastTrackField", "timeName", ")", "{", "Date", "result", "=", "null", ";", "Date", "date", "=", "getDate", "(", "dateName", ")", ";", "if", "(", "date", "!=", "null", ")", "{", "C...
Retrieve a timestamp field. @param dateName field containing the date component @param timeName field containing the time component @return Date instance
[ "Retrieve", "a", "timestamp", "field", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L132-L155
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getDuration
public Duration getDuration(FastTrackField type) { Double value = (Double) getObject(type); return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getDurationTimeUnit()); }
java
public Duration getDuration(FastTrackField type) { Double value = (Double) getObject(type); return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getDurationTimeUnit()); }
[ "public", "Duration", "getDuration", "(", "FastTrackField", "type", ")", "{", "Double", "value", "=", "(", "Double", ")", "getObject", "(", "type", ")", ";", "return", "value", "==", "null", "?", "null", ":", "Duration", ".", "getInstance", "(", "value", ...
Retrieve a duration field. @param type field type @return Duration instance
[ "Retrieve", "a", "duration", "field", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L174-L178
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getWork
public Duration getWork(FastTrackField type) { Double value = (Double) getObject(type); return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getWorkTimeUnit()); }
java
public Duration getWork(FastTrackField type) { Double value = (Double) getObject(type); return value == null ? null : Duration.getInstance(value.doubleValue(), m_table.getWorkTimeUnit()); }
[ "public", "Duration", "getWork", "(", "FastTrackField", "type", ")", "{", "Double", "value", "=", "(", "Double", ")", "getObject", "(", "type", ")", ";", "return", "value", "==", "null", "?", "null", ":", "Duration", ".", "getInstance", "(", "value", "."...
Retrieve a work field. @param type field type @return Duration instance
[ "Retrieve", "a", "work", "field", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L186-L190
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getUUID
public UUID getUUID(FastTrackField type) { String value = getString(type); UUID result = null; if (value != null && !value.isEmpty() && value.length() >= 36) { if (value.startsWith("{")) { value = value.substring(1, value.length() - 1); } if (va...
java
public UUID getUUID(FastTrackField type) { String value = getString(type); UUID result = null; if (value != null && !value.isEmpty() && value.length() >= 36) { if (value.startsWith("{")) { value = value.substring(1, value.length() - 1); } if (va...
[ "public", "UUID", "getUUID", "(", "FastTrackField", "type", ")", "{", "String", "value", "=", "getString", "(", "type", ")", ";", "UUID", "result", "=", "null", ";", "if", "(", "value", "!=", "null", "&&", "!", "value", ".", "isEmpty", "(", ")", "&&"...
Retrieve a UUID field. @param type field type @return UUID instance
[ "Retrieve", "a", "UUID", "field", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L210-L227
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDUtility.java
MPDUtility.getSymbolPosition
public static CurrencySymbolPosition getSymbolPosition(int value) { CurrencySymbolPosition result; switch (value) { case 1: { result = CurrencySymbolPosition.AFTER; break; } case 2: { result = CurrencySymbolPosition....
java
public static CurrencySymbolPosition getSymbolPosition(int value) { CurrencySymbolPosition result; switch (value) { case 1: { result = CurrencySymbolPosition.AFTER; break; } case 2: { result = CurrencySymbolPosition....
[ "public", "static", "CurrencySymbolPosition", "getSymbolPosition", "(", "int", "value", ")", "{", "CurrencySymbolPosition", "result", ";", "switch", "(", "value", ")", "{", "case", "1", ":", "{", "result", "=", "CurrencySymbolPosition", ".", "AFTER", ";", "break...
This method maps the currency symbol position from the representation used in the MPP file to the representation used by MPX. @param value MPP symbol position @return MPX symbol position
[ "This", "method", "maps", "the", "currency", "symbol", "position", "from", "the", "representation", "used", "in", "the", "MPP", "file", "to", "the", "representation", "used", "by", "MPX", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDUtility.java#L52-L85
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDUtility.java
MPDUtility.getDuration
public static final Duration getDuration(double value, TimeUnit type) { double duration; // Value is given in 1/10 of minute switch (type) { case MINUTES: case ELAPSED_MINUTES: { duration = value / 10; break; } case HOURS: ...
java
public static final Duration getDuration(double value, TimeUnit type) { double duration; // Value is given in 1/10 of minute switch (type) { case MINUTES: case ELAPSED_MINUTES: { duration = value / 10; break; } case HOURS: ...
[ "public", "static", "final", "Duration", "getDuration", "(", "double", "value", ",", "TimeUnit", "type", ")", "{", "double", "duration", ";", "// Value is given in 1/10 of minute", "switch", "(", "type", ")", "{", "case", "MINUTES", ":", "case", "ELAPSED_MINUTES",...
Reads a duration value. This method relies on the fact that the units of the duration have been specified elsewhere. @param value Duration value @param type type of units of the duration @return Duration instance
[ "Reads", "a", "duration", "value", ".", "This", "method", "relies", "on", "the", "fact", "that", "the", "units", "of", "the", "duration", "have", "been", "specified", "elsewhere", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDUtility.java#L271-L334
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDUtility.java
MPDUtility.dumpRow
public static void dumpRow(Map<String, Object> row) { for (Entry<String, Object> entry : row.entrySet()) { Object value = entry.getValue(); System.out.println(entry.getKey() + " = " + value + " ( " + (value == null ? "" : value.getClass().getName()) + ")"); } }
java
public static void dumpRow(Map<String, Object> row) { for (Entry<String, Object> entry : row.entrySet()) { Object value = entry.getValue(); System.out.println(entry.getKey() + " = " + value + " ( " + (value == null ? "" : value.getClass().getName()) + ")"); } }
[ "public", "static", "void", "dumpRow", "(", "Map", "<", "String", ",", "Object", ">", "row", ")", "{", "for", "(", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "row", ".", "entrySet", "(", ")", ")", "{", "Object", "value", "=", "entry"...
Dump the contents of a row from an MPD file. @param row row data
[ "Dump", "the", "contents", "of", "a", "row", "from", "an", "MPD", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDUtility.java#L341-L348
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.generateMapFile
public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException { m_responseList = new LinkedList<String>(); writeMapFile(mapFileName, jarFile, mapClassMethods); }
java
public void generateMapFile(File jarFile, String mapFileName, boolean mapClassMethods) throws XMLStreamException, IOException, ClassNotFoundException, IntrospectionException { m_responseList = new LinkedList<String>(); writeMapFile(mapFileName, jarFile, mapClassMethods); }
[ "public", "void", "generateMapFile", "(", "File", "jarFile", ",", "String", "mapFileName", ",", "boolean", "mapClassMethods", ")", "throws", "XMLStreamException", ",", "IOException", ",", "ClassNotFoundException", ",", "IntrospectionException", "{", "m_responseList", "=...
Generate a map file from a jar file. @param jarFile jar file @param mapFileName map file name @param mapClassMethods true if we want to produce .Net style class method names @throws XMLStreamException @throws IOException @throws ClassNotFoundException @throws IntrospectionException
[ "Generate", "a", "map", "file", "from", "a", "jar", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L94-L98
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.writeMapFile
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = ...
java
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = ...
[ "private", "void", "writeMapFile", "(", "String", "mapFileName", ",", "File", "jarFile", ",", "boolean", "mapClassMethods", ")", "throws", "IOException", ",", "XMLStreamException", ",", "ClassNotFoundException", ",", "IntrospectionException", "{", "FileWriter", "fw", ...
Generate an IKVM map file. @param mapFileName map file name @param jarFile jar file containing code to be mapped @param mapClassMethods true if we want to produce .Net style class method names @throws IOException @throws XMLStreamException @throws ClassNotFoundException @throws IntrospectionException
[ "Generate", "an", "IKVM", "map", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L111-L132
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.addClasses
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader loader = new URLClassLoade...
java
private void addClasses(XMLStreamWriter writer, File jarFile, boolean mapClassMethods) throws IOException, ClassNotFoundException, XMLStreamException, IntrospectionException { ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader loader = new URLClassLoade...
[ "private", "void", "addClasses", "(", "XMLStreamWriter", "writer", ",", "File", "jarFile", ",", "boolean", "mapClassMethods", ")", "throws", "IOException", ",", "ClassNotFoundException", ",", "XMLStreamException", ",", "IntrospectionException", "{", "ClassLoader", "curr...
Add classes to the map file. @param writer XML stream writer @param jarFile jar file @param mapClassMethods true if we want to produce .Net style class method names @throws IOException @throws ClassNotFoundException @throws XMLStreamException @throws IntrospectionException
[ "Add", "classes", "to", "the", "map", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L145-L165
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.addClass
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException { String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", "."); writer.writeStartElement("cla...
java
private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException { String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", "."); writer.writeStartElement("cla...
[ "private", "void", "addClass", "(", "URLClassLoader", "loader", ",", "JarEntry", "jarEntry", ",", "XMLStreamWriter", "writer", ",", "boolean", "mapClassMethods", ")", "throws", "ClassNotFoundException", ",", "XMLStreamException", ",", "IntrospectionException", "{", "Str...
Add an individual class to the map file. @param loader jar file class loader @param jarEntry jar file entry @param writer XML stream writer @param mapClassMethods true if we want to produce .Net style class method names @throws ClassNotFoundException @throws XMLStreamException @throws IntrospectionException
[ "Add", "an", "individual", "class", "to", "the", "map", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L178-L194
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.processProperties
private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException { BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass()); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); ...
java
private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException { BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass()); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); ...
[ "private", "void", "processProperties", "(", "XMLStreamWriter", "writer", ",", "Set", "<", "Method", ">", "methodSet", ",", "Class", "<", "?", ">", "aClass", ")", "throws", "IntrospectionException", ",", "XMLStreamException", "{", "BeanInfo", "beanInfo", "=", "I...
Process class properties. @param writer output stream @param methodSet set of methods processed @param aClass class being processed @throws IntrospectionException @throws XMLStreamException
[ "Process", "class", "properties", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L205-L238
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.addProperty
private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException { if (name.length() != 0) { writer.writeStartElement("property"); // convert property name to .NET style (i.e. first letter uppercase) ...
java
private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException { if (name.length() != 0) { writer.writeStartElement("property"); // convert property name to .NET style (i.e. first letter uppercase) ...
[ "private", "void", "addProperty", "(", "XMLStreamWriter", "writer", ",", "String", "name", ",", "Class", "<", "?", ">", "propertyType", ",", "String", "readMethod", ",", "String", "writeMethod", ")", "throws", "XMLStreamException", "{", "if", "(", "name", ".",...
Add a simple property to the map file. @param writer xml stream writer @param name property name @param propertyType property type @param readMethod read method name @param writeMethod write method name @throws XMLStreamException
[ "Add", "a", "simple", "property", "to", "the", "map", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L250-L280
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.getTypeString
private String getTypeString(Class<?> c) { String result = TYPE_MAP.get(c); if (result == null) { result = c.getName(); if (!result.endsWith(";") && !result.startsWith("[")) { result = "L" + result + ";"; } } return result; }
java
private String getTypeString(Class<?> c) { String result = TYPE_MAP.get(c); if (result == null) { result = c.getName(); if (!result.endsWith(";") && !result.startsWith("[")) { result = "L" + result + ";"; } } return result; }
[ "private", "String", "getTypeString", "(", "Class", "<", "?", ">", "c", ")", "{", "String", "result", "=", "TYPE_MAP", ".", "get", "(", "c", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "c", ".", "getName", "(", ")", ";",...
Converts a class into a signature token. @param c class @return signature token text
[ "Converts", "a", "class", "into", "a", "signature", "token", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L288-L300
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.processClassMethods
private void processClassMethods(XMLStreamWriter writer, Class<?> aClass, Set<Method> methodSet) throws XMLStreamException { Method[] methods = aClass.getDeclaredMethods(); for (Method method : methods) { if (!methodSet.contains(method) && Modifier.isPublic(method.getModifiers()) && !Modif...
java
private void processClassMethods(XMLStreamWriter writer, Class<?> aClass, Set<Method> methodSet) throws XMLStreamException { Method[] methods = aClass.getDeclaredMethods(); for (Method method : methods) { if (!methodSet.contains(method) && Modifier.isPublic(method.getModifiers()) && !Modif...
[ "private", "void", "processClassMethods", "(", "XMLStreamWriter", "writer", ",", "Class", "<", "?", ">", "aClass", ",", "Set", "<", "Method", ">", "methodSet", ")", "throws", "XMLStreamException", "{", "Method", "[", "]", "methods", "=", "aClass", ".", "getD...
Hides the original Java-style method name using an attribute which should be respected by Visual Studio, the creates a new wrapper method using a .Net style method name. Note that this does not work for VB as it is case insensitive. Even though Visual Studio won't show you the Java-style method name, the VB compiler s...
[ "Hides", "the", "original", "Java", "-", "style", "method", "name", "using", "an", "attribute", "which", "should", "be", "respected", "by", "Visual", "Studio", "the", "creates", "a", "new", "wrapper", "method", "using", "a", ".", "Net", "style", "method", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L367-L458
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.ignoreMethod
private boolean ignoreMethod(String name) { boolean result = false; for (String ignoredName : IGNORED_METHODS) { if (name.matches(ignoredName)) { result = true; break; } } return result; }
java
private boolean ignoreMethod(String name) { boolean result = false; for (String ignoredName : IGNORED_METHODS) { if (name.matches(ignoredName)) { result = true; break; } } return result; }
[ "private", "boolean", "ignoreMethod", "(", "String", "name", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "String", "ignoredName", ":", "IGNORED_METHODS", ")", "{", "if", "(", "name", ".", "matches", "(", "ignoredName", ")", ")", "{", "r...
Used to determine if the current method should be ignored. @param name method name @return true if the method should be ignored
[ "Used", "to", "determine", "if", "the", "current", "method", "should", "be", "ignored", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L466-L480
train
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.createMethodSignature
private String createMethodSignature(Method method) { StringBuilder sb = new StringBuilder(); sb.append("("); for (Class<?> type : method.getParameterTypes()) { sb.append(getTypeString(type)); } sb.append(")"); Class<?> type = method.getReturnType(); if (type....
java
private String createMethodSignature(Method method) { StringBuilder sb = new StringBuilder(); sb.append("("); for (Class<?> type : method.getParameterTypes()) { sb.append(getTypeString(type)); } sb.append(")"); Class<?> type = method.getReturnType(); if (type....
[ "private", "String", "createMethodSignature", "(", "Method", "method", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"(\"", ")", ";", "for", "(", "Class", "<", "?", ">", "type", ":", "method", ...
Creates a method signature. @param method Method instance @return method signature
[ "Creates", "a", "method", "signature", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L488-L507
train
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarException.java
ProjectCalendarException.contains
public boolean contains(Date date) { boolean result = false; if (date != null) { result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0); } return (result); }
java
public boolean contains(Date date) { boolean result = false; if (date != null) { result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0); } return (result); }
[ "public", "boolean", "contains", "(", "Date", "date", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "date", "!=", "null", ")", "{", "result", "=", "(", "DateHelper", ".", "compare", "(", "getFromDate", "(", ")", ",", "getToDate", "(", ...
This method determines whether the given date falls in the range of dates covered by this exception. Note that this method assumes that both the start and end date of this exception have been set. @param date Date to be tested @return Boolean value
[ "This", "method", "determines", "whether", "the", "given", "date", "falls", "in", "the", "range", "of", "dates", "covered", "by", "this", "exception", ".", "Note", "that", "this", "method", "assumes", "that", "both", "the", "start", "and", "end", "date", "...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarException.java#L129-L139
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/JTableExtra.java
JTableExtra.setModel
@Override public void setModel(TableModel model) { super.setModel(model); int columns = model.getColumnCount(); TableColumnModel tableColumnModel = getColumnModel(); for (int index = 0; index < columns; index++) { tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidt...
java
@Override public void setModel(TableModel model) { super.setModel(model); int columns = model.getColumnCount(); TableColumnModel tableColumnModel = getColumnModel(); for (int index = 0; index < columns; index++) { tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidt...
[ "@", "Override", "public", "void", "setModel", "(", "TableModel", "model", ")", "{", "super", ".", "setModel", "(", "model", ")", ";", "int", "columns", "=", "model", ".", "getColumnCount", "(", ")", ";", "TableColumnModel", "tableColumnModel", "=", "getColu...
Updates the model. Ensures that we reset the columns widths. @param model table model
[ "Updates", "the", "model", ".", "Ensures", "that", "we", "reset", "the", "columns", "widths", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/JTableExtra.java#L139-L148
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.process
@Override public void process(MPPReader reader, ProjectFile file, DirectoryEntry root) throws MPXJException, IOException { try { populateMemberData(reader, file, root); processProjectProperties(); if (!reader.getReadPropertiesOnly()) { processSubProjectDat...
java
@Override public void process(MPPReader reader, ProjectFile file, DirectoryEntry root) throws MPXJException, IOException { try { populateMemberData(reader, file, root); processProjectProperties(); if (!reader.getReadPropertiesOnly()) { processSubProjectDat...
[ "@", "Override", "public", "void", "process", "(", "MPPReader", "reader", ",", "ProjectFile", "file", ",", "DirectoryEntry", "root", ")", "throws", "MPXJException", ",", "IOException", "{", "try", "{", "populateMemberData", "(", "reader", ",", "file", ",", "ro...
This method is used to process an MPP14 file. This is the file format used by Project 14. @param reader parent file reader @param file parent MPP file @param root Root of the POI file system.
[ "This", "method", "is", "used", "to", "process", "an", "MPP14", "file", ".", "This", "is", "the", "file", "format", "used", "by", "Project", "14", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L80-L115
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.processGraphicalIndicators
private void processGraphicalIndicators() { GraphicalIndicatorReader graphicalIndicatorReader = new GraphicalIndicatorReader(); graphicalIndicatorReader.process(m_file.getCustomFields(), m_file.getProjectProperties(), m_projectProps); }
java
private void processGraphicalIndicators() { GraphicalIndicatorReader graphicalIndicatorReader = new GraphicalIndicatorReader(); graphicalIndicatorReader.process(m_file.getCustomFields(), m_file.getProjectProperties(), m_projectProps); }
[ "private", "void", "processGraphicalIndicators", "(", ")", "{", "GraphicalIndicatorReader", "graphicalIndicatorReader", "=", "new", "GraphicalIndicatorReader", "(", ")", ";", "graphicalIndicatorReader", ".", "process", "(", "m_file", ".", "getCustomFields", "(", ")", ",...
Process the graphical indicator data.
[ "Process", "the", "graphical", "indicator", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L230-L234
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.readSubProjects
private void readSubProjects(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex) { while (uniqueIDOffset < filePathOffset) { readSubProject(data, uniqueIDOffset, filePathOffset, fileNameOffset, subprojectIndex++); uniqueIDOffset += 4; } ...
java
private void readSubProjects(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex) { while (uniqueIDOffset < filePathOffset) { readSubProject(data, uniqueIDOffset, filePathOffset, fileNameOffset, subprojectIndex++); uniqueIDOffset += 4; } ...
[ "private", "void", "readSubProjects", "(", "byte", "[", "]", "data", ",", "int", "uniqueIDOffset", ",", "int", "filePathOffset", ",", "int", "fileNameOffset", ",", "int", "subprojectIndex", ")", "{", "while", "(", "uniqueIDOffset", "<", "filePathOffset", ")", ...
Read a list of sub projects. @param data byte array @param uniqueIDOffset offset of unique ID @param filePathOffset offset of file path @param fileNameOffset offset of file name @param subprojectIndex index of the subproject, used to calculate unique id offset
[ "Read", "a", "list", "of", "sub", "projects", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L559-L566
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.processBaseFonts
private void processBaseFonts(byte[] data) { int offset = 0; int blockCount = MPPUtility.getShort(data, 0); offset += 2; int size; String name; for (int loop = 0; loop < blockCount; loop++) { /*unknownAttribute = MPPUtility.getShort(data, offset);*/ offs...
java
private void processBaseFonts(byte[] data) { int offset = 0; int blockCount = MPPUtility.getShort(data, 0); offset += 2; int size; String name; for (int loop = 0; loop < blockCount; loop++) { /*unknownAttribute = MPPUtility.getShort(data, offset);*/ offs...
[ "private", "void", "processBaseFonts", "(", "byte", "[", "]", "data", ")", "{", "int", "offset", "=", "0", ";", "int", "blockCount", "=", "MPPUtility", ".", "getShort", "(", "data", ",", "0", ")", ";", "offset", "+=", "2", ";", "int", "size", ";", ...
Create an index of base font numbers and their associated base font instances. @param data property data
[ "Create", "an", "index", "of", "base", "font", "numbers", "and", "their", "associated", "base", "font", "instances", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L773-L800
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.createTaskMap
private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData) { TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>(); int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID); Integer taskNameKe...
java
private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData) { TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>(); int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID); Integer taskNameKe...
[ "private", "TreeMap", "<", "Integer", ",", "Integer", ">", "createTaskMap", "(", "FieldMap", "fieldMap", ",", "FixedMeta", "taskFixedMeta", ",", "FixedData", "taskFixedData", ",", "Var2Data", "taskVarData", ")", "{", "TreeMap", "<", "Integer", ",", "Integer", ">...
This method maps the task unique identifiers to their index number within the FixedData block. @param fieldMap field map @param taskFixedMeta Fixed meta data for this task @param taskFixedData Fixed data for this task @param taskVarData Variable task data @return Mapping between task identifiers and block position
[ "This", "method", "maps", "the", "task", "unique", "identifiers", "to", "their", "index", "number", "within", "the", "FixedData", "block", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L812-L890
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.postProcessTasks
private void postProcessTasks() throws MPXJException { // // Renumber ID values using a large increment to allow // space for later inserts. // TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>(); // I've found a pathological case of an MPP file with around 102k b...
java
private void postProcessTasks() throws MPXJException { // // Renumber ID values using a large increment to allow // space for later inserts. // TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>(); // I've found a pathological case of an MPP file with around 102k b...
[ "private", "void", "postProcessTasks", "(", ")", "throws", "MPXJException", "{", "//", "// Renumber ID values using a large increment to allow", "// space for later inserts.", "//", "TreeMap", "<", "Integer", ",", "Integer", ">", "taskMap", "=", "new", "TreeMap", "<", "...
MPP14 files seem to exhibit some occasional weirdness with duplicate ID values which leads to the task structure being reported incorrectly. The following method attempts to correct this. The method uses ordering data embedded in the file to reconstruct the correct ID order of the tasks.
[ "MPP14", "files", "seem", "to", "exhibit", "some", "occasional", "weirdness", "with", "duplicate", "ID", "values", "which", "leads", "to", "the", "task", "structure", "being", "reported", "incorrectly", ".", "The", "following", "method", "attempts", "to", "corre...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1317-L1376
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.processHyperlinkData
private void processHyperlinkData(Resource resource, byte[] data) { if (data != null) { int offset = 12; String hyperlink; String address; String subaddress; offset += 12; hyperlink = MPPUtility.getUnicodeString(data, offset); offset += ((hy...
java
private void processHyperlinkData(Resource resource, byte[] data) { if (data != null) { int offset = 12; String hyperlink; String address; String subaddress; offset += 12; hyperlink = MPPUtility.getUnicodeString(data, offset); offset += ((hy...
[ "private", "void", "processHyperlinkData", "(", "Resource", "resource", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "data", "!=", "null", ")", "{", "int", "offset", "=", "12", ";", "String", "hyperlink", ";", "String", "address", ";", "String", ...
This method is used to extract the resource hyperlink attributes from a block of data and call the appropriate modifier methods to configure the specified task object. @param resource resource instance @param data hyperlink data block
[ "This", "method", "is", "used", "to", "extract", "the", "resource", "hyperlink", "attributes", "from", "a", "block", "of", "data", "and", "call", "the", "appropriate", "modifier", "methods", "to", "configure", "the", "specified", "task", "object", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1547-L1571
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.readBitFields
private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data) { for (MppBitFlag flag : flags) { flag.setValue(container, data); } }
java
private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data) { for (MppBitFlag flag : flags) { flag.setValue(container, data); } }
[ "private", "void", "readBitFields", "(", "MppBitFlag", "[", "]", "flags", ",", "FieldContainer", "container", ",", "byte", "[", "]", "data", ")", "{", "for", "(", "MppBitFlag", "flag", ":", "flags", ")", "{", "flag", ".", "setValue", "(", "container", ",...
Iterate through a set of bit field flags and set the value for each one in the supplied container. @param flags bit field flags @param container field container @param data source data
[ "Iterate", "through", "a", "set", "of", "bit", "field", "flags", "and", "set", "the", "value", "for", "each", "one", "in", "the", "supplied", "container", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L2039-L2045
train
joniles/mpxj
src/main/java/net/sf/mpxj/turboproject/Table.java
Table.read
public void read(InputStream is) throws IOException { byte[] headerBlock = new byte[20]; is.read(headerBlock); int headerLength = PEPUtility.getShort(headerBlock, 8); int recordCount = PEPUtility.getInt(headerBlock, 10); int recordLength = PEPUtility.getInt(headerBlock, 16); Stre...
java
public void read(InputStream is) throws IOException { byte[] headerBlock = new byte[20]; is.read(headerBlock); int headerLength = PEPUtility.getShort(headerBlock, 8); int recordCount = PEPUtility.getInt(headerBlock, 10); int recordLength = PEPUtility.getInt(headerBlock, 16); Stre...
[ "public", "void", "read", "(", "InputStream", "is", ")", "throws", "IOException", "{", "byte", "[", "]", "headerBlock", "=", "new", "byte", "[", "20", "]", ";", "is", ".", "read", "(", "headerBlock", ")", ";", "int", "headerLength", "=", "PEPUtility", ...
Reads the table data from an input stream and breaks it down into rows. @param is input stream
[ "Reads", "the", "table", "data", "from", "an", "input", "stream", "and", "breaks", "it", "down", "into", "rows", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/Table.java#L59-L75
train
joniles/mpxj
src/main/java/net/sf/mpxj/turboproject/Table.java
Table.addRow
protected void addRow(int uniqueID, Map<String, Object> map) { m_rows.put(Integer.valueOf(uniqueID), new MapRow(map)); }
java
protected void addRow(int uniqueID, Map<String, Object> map) { m_rows.put(Integer.valueOf(uniqueID), new MapRow(map)); }
[ "protected", "void", "addRow", "(", "int", "uniqueID", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "m_rows", ".", "put", "(", "Integer", ".", "valueOf", "(", "uniqueID", ")", ",", "new", "MapRow", "(", "map", ")", ")", ";", "}" ...
Adds a row to the internal storage, indexed by primary key. @param uniqueID unique ID of the row @param map row data as a simpe map
[ "Adds", "a", "row", "to", "the", "internal", "storage", "indexed", "by", "primary", "key", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/Table.java#L106-L109
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java
TimephasedDataFactory.getCompleteWork
public List<TimephasedWork> getCompleteWork(ProjectCalendar calendar, ResourceAssignment resourceAssignment, byte[] data) { LinkedList<TimephasedWork> list = new LinkedList<TimephasedWork>(); if (calendar != null && data != null && data.length > 2 && MPPUtility.getShort(data, 0) > 0) { Da...
java
public List<TimephasedWork> getCompleteWork(ProjectCalendar calendar, ResourceAssignment resourceAssignment, byte[] data) { LinkedList<TimephasedWork> list = new LinkedList<TimephasedWork>(); if (calendar != null && data != null && data.length > 2 && MPPUtility.getShort(data, 0) > 0) { Da...
[ "public", "List", "<", "TimephasedWork", ">", "getCompleteWork", "(", "ProjectCalendar", "calendar", ",", "ResourceAssignment", "resourceAssignment", ",", "byte", "[", "]", "data", ")", "{", "LinkedList", "<", "TimephasedWork", ">", "list", "=", "new", "LinkedList...
Given a block of data representing completed work, this method will retrieve a set of TimephasedWork instances which represent the day by day work carried out for a specific resource assignment. @param calendar calendar on which date calculations are based @param resourceAssignment resource assignment @param data comp...
[ "Given", "a", "block", "of", "data", "representing", "completed", "work", "this", "method", "will", "retrieve", "a", "set", "of", "TimephasedWork", "instances", "which", "represent", "the", "day", "by", "day", "work", "carried", "out", "for", "a", "specific", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L61-L149
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java
TimephasedDataFactory.getWorkModified
public boolean getWorkModified(List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { result = assignment.getModified(); if (result) { break; } } return result; }
java
public boolean getWorkModified(List<TimephasedWork> list) { boolean result = false; for (TimephasedWork assignment : list) { result = assignment.getModified(); if (result) { break; } } return result; }
[ "public", "boolean", "getWorkModified", "(", "List", "<", "TimephasedWork", ">", "list", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "TimephasedWork", "assignment", ":", "list", ")", "{", "result", "=", "assignment", ".", "getModified", "("...
Test the list of TimephasedWork instances to see if any of them have been modified. @param list list of TimephasedWork instances @return boolean flag
[ "Test", "the", "list", "of", "TimephasedWork", "instances", "to", "see", "if", "any", "of", "them", "have", "been", "modified", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L304-L316
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java
TimephasedDataFactory.getBaselineWork
public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw) { TimephasedWorkContainer result = null; if (data != null && data.length > 0) { LinkedList<TimephasedWork> list = null; ...
java
public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw) { TimephasedWorkContainer result = null; if (data != null && data.length > 0) { LinkedList<TimephasedWork> list = null; ...
[ "public", "TimephasedWorkContainer", "getBaselineWork", "(", "ResourceAssignment", "assignment", ",", "ProjectCalendar", "calendar", ",", "TimephasedWorkNormaliser", "normaliser", ",", "byte", "[", "]", "data", ",", "boolean", "raw", ")", "{", "TimephasedWorkContainer", ...
Extracts baseline work from the MPP file for a specific baseline. Returns null if no baseline work is present, otherwise returns a list of timephased work items. @param assignment parent assignment @param calendar baseline calendar @param normaliser normaliser associated with this data @param data timephased baseline ...
[ "Extracts", "baseline", "work", "from", "the", "MPP", "file", "for", "a", "specific", "baseline", ".", "Returns", "null", "if", "no", "baseline", "work", "is", "present", "otherwise", "returns", "a", "list", "of", "timephased", "work", "items", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L330-L392
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java
TimephasedDataFactory.getBaselineCost
public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw) { TimephasedCostContainer result = null; if (data != null && data.length > 0) { LinkedList<TimephasedCost> list = null; //System.out.println(By...
java
public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw) { TimephasedCostContainer result = null; if (data != null && data.length > 0) { LinkedList<TimephasedCost> list = null; //System.out.println(By...
[ "public", "TimephasedCostContainer", "getBaselineCost", "(", "ProjectCalendar", "calendar", ",", "TimephasedCostNormaliser", "normaliser", ",", "byte", "[", "]", "data", ",", "boolean", "raw", ")", "{", "TimephasedCostContainer", "result", "=", "null", ";", "if", "(...
Extracts baseline cost from the MPP file for a specific baseline. Returns null if no baseline cost is present, otherwise returns a list of timephased work items. @param calendar baseline calendar @param normaliser normaliser associated with this data @param data timephased baseline work data block @param raw flag indi...
[ "Extracts", "baseline", "cost", "from", "the", "MPP", "file", "for", "a", "specific", "baseline", ".", "Returns", "null", "if", "no", "baseline", "cost", "is", "present", "otherwise", "returns", "a", "list", "of", "timephased", "work", "items", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L405-L453
train
joniles/mpxj
src/main/java/net/sf/mpxj/common/SplitTaskFactory.java
SplitTaskFactory.processSplitData
public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned) { Date splitsComplete = null; TimephasedWork lastComplete = null; TimephasedWork firstPlanned = null; if (!timephasedComplete.isEmpty()) { lastComplete = tim...
java
public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned) { Date splitsComplete = null; TimephasedWork lastComplete = null; TimephasedWork firstPlanned = null; if (!timephasedComplete.isEmpty()) { lastComplete = tim...
[ "public", "void", "processSplitData", "(", "Task", "task", ",", "List", "<", "TimephasedWork", ">", "timephasedComplete", ",", "List", "<", "TimephasedWork", ">", "timephasedPlanned", ")", "{", "Date", "splitsComplete", "=", "null", ";", "TimephasedWork", "lastCom...
Process the timephased resource assignment data to work out the split structure of the task. @param task parent task @param timephasedComplete completed resource assignment work @param timephasedPlanned planned resource assignment work
[ "Process", "the", "timephased", "resource", "assignment", "data", "to", "work", "out", "the", "split", "structure", "of", "the", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/SplitTaskFactory.java#L48-L131
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.updateScheduleSource
private void updateScheduleSource(ProjectProperties properties) { // Rudimentary identification of schedule source if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd")) { properties.setFileApplication("Synchro"); } else { ...
java
private void updateScheduleSource(ProjectProperties properties) { // Rudimentary identification of schedule source if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd")) { properties.setFileApplication("Synchro"); } else { ...
[ "private", "void", "updateScheduleSource", "(", "ProjectProperties", "properties", ")", "{", "// Rudimentary identification of schedule source", "if", "(", "properties", ".", "getCompany", "(", ")", "!=", "null", "&&", "properties", ".", "getCompany", "(", ")", ".", ...
Populate the properties indicating the source of this schedule. @param properties project properties
[ "Populate", "the", "properties", "indicating", "the", "source", "of", "this", "schedule", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L357-L376
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readCalendars
private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map) { Project.Calendars calendars = project.getCalendars(); if (calendars != null) { LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>(); ...
java
private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map) { Project.Calendars calendars = project.getCalendars(); if (calendars != null) { LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>(); ...
[ "private", "void", "readCalendars", "(", "Project", "project", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "map", ")", "{", "Project", ".", "Calendars", "calendars", "=", "project", ".", "getCalendars", "(", ")", ";", "if", "(", "calendar...
This method extracts calendar data from an MSPDI file. @param project Root node of the MSPDI file @param map Map of calendar UIDs to names
[ "This", "method", "extracts", "calendar", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L384-L409
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.updateBaseCalendarNames
private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map) { for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars) { ProjectCalendar cal = pair.getFirst(); BigInteger baseCalendarID = pair.getSecond...
java
private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map) { for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars) { ProjectCalendar cal = pair.getFirst(); BigInteger baseCalendarID = pair.getSecond...
[ "private", "static", "void", "updateBaseCalendarNames", "(", "List", "<", "Pair", "<", "ProjectCalendar", ",", "BigInteger", ">", ">", "baseCalendars", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "map", ")", "{", "for", "(", "Pair", "<", ...
The way calendars are stored in an MSPDI file means that there can be forward references between the base calendar unique ID for a derived calendar, and the base calendar itself. To get around this, we initially populate the base calendar name attribute with the base calendar unique ID, and now in this method we can co...
[ "The", "way", "calendars", "are", "stored", "in", "an", "MSPDI", "file", "means", "that", "there", "can", "be", "forward", "references", "between", "the", "base", "calendar", "unique", "ID", "for", "a", "derived", "calendar", "and", "the", "base", "calendar"...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L422-L435
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readCalendar
private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars) { ProjectCalendar bc = m_projectFile.addCalendar(); bc.setUniqueID(NumberHelper.getInteger(calendar.getUID())); bc.setName(calendar.getName...
java
private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars) { ProjectCalendar bc = m_projectFile.addCalendar(); bc.setUniqueID(NumberHelper.getInteger(calendar.getUID())); bc.setName(calendar.getName...
[ "private", "void", "readCalendar", "(", "Project", ".", "Calendars", ".", "Calendar", "calendar", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "map", ",", "List", "<", "Pair", "<", "ProjectCalendar", ",", "BigInteger", ">", ">", "baseCalenda...
This method extracts data for a single calendar from an MSPDI file. @param calendar Calendar data @param map Map of calendar UIDs to names @param baseCalendars list of base calendars
[ "This", "method", "extracts", "data", "for", "a", "single", "calendar", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L444-L482
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readDay
private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays) { BigInteger dayType = day.getDayType(); if (dayType != null) { if (dayType.intValue() == 0) { if (readExceptionsFromDays) { ...
java
private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays) { BigInteger dayType = day.getDayType(); if (dayType != null) { if (dayType.intValue() == 0) { if (readExceptionsFromDays) { ...
[ "private", "void", "readDay", "(", "ProjectCalendar", "calendar", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", "day", ",", "boolean", "readExceptionsFromDays", ")", "{", "BigInteger", "dayType", "=", "day", ".", "getDayType...
This method extracts data for a single day from an MSPDI file. @param calendar Calendar data @param day Day data @param readExceptionsFromDays read exceptions form day definitions
[ "This", "method", "extracts", "data", "for", "a", "single", "day", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L491-L508
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readNormalDay
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay) { int dayNumber = weekDay.getDayType().intValue(); Day day = Day.getInstance(dayNumber); calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking())); ProjectCalendarHour...
java
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay) { int dayNumber = weekDay.getDayType().intValue(); Day day = Day.getInstance(dayNumber); calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking())); ProjectCalendarHour...
[ "private", "void", "readNormalDay", "(", "ProjectCalendar", "calendar", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", "weekDay", ")", "{", "int", "dayNumber", "=", "weekDay", ".", "getDayType", "(", ")", ".", "intValue", ...
This method extracts data for a normal working day from an MSPDI file. @param calendar Calendar data @param weekDay Day data
[ "This", "method", "extracts", "data", "for", "a", "normal", "working", "day", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L516-L542
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readExceptionDay
private void readExceptionDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day) { Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod timePeriod = day.getTimePeriod(); Date fromDate = timePeriod.getFromDate(); Date toDate = timePeriod.getToDate(); Project.Calendars...
java
private void readExceptionDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day) { Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod timePeriod = day.getTimePeriod(); Date fromDate = timePeriod.getFromDate(); Date toDate = timePeriod.getToDate(); Project.Calendars...
[ "private", "void", "readExceptionDay", "(", "ProjectCalendar", "calendar", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", "day", ")", "{", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", ".", ...
This method extracts data for an exception day from an MSPDI file. @param calendar Calendar data @param day Day data
[ "This", "method", "extracts", "data", "for", "an", "exception", "day", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L550-L577
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readExceptions
private void readExceptions(Project.Calendars.Calendar calendar, ProjectCalendar bc) { Project.Calendars.Calendar.Exceptions exceptions = calendar.getExceptions(); if (exceptions != null) { for (Project.Calendars.Calendar.Exceptions.Exception exception : exceptions.getException()) ...
java
private void readExceptions(Project.Calendars.Calendar calendar, ProjectCalendar bc) { Project.Calendars.Calendar.Exceptions exceptions = calendar.getExceptions(); if (exceptions != null) { for (Project.Calendars.Calendar.Exceptions.Exception exception : exceptions.getException()) ...
[ "private", "void", "readExceptions", "(", "Project", ".", "Calendars", ".", "Calendar", "calendar", ",", "ProjectCalendar", "bc", ")", "{", "Project", ".", "Calendars", ".", "Calendar", ".", "Exceptions", "exceptions", "=", "calendar", ".", "getExceptions", "(",...
Reads any exceptions present in the file. This is only used in MSPDI file versions saved by Project 2007 and later. @param calendar XML calendar @param bc MPXJ calendar
[ "Reads", "any", "exceptions", "present", "in", "the", "file", ".", "This", "is", "only", "used", "in", "MSPDI", "file", "versions", "saved", "by", "Project", "2007", "and", "later", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L586-L596
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readException
private void readException(ProjectCalendar bc, Project.Calendars.Calendar.Exceptions.Exception exception) { Date fromDate = exception.getTimePeriod().getFromDate(); Date toDate = exception.getTimePeriod().getToDate(); // Vico Schedule Planner seems to write start and end dates to FromTime and ToTi...
java
private void readException(ProjectCalendar bc, Project.Calendars.Calendar.Exceptions.Exception exception) { Date fromDate = exception.getTimePeriod().getFromDate(); Date toDate = exception.getTimePeriod().getToDate(); // Vico Schedule Planner seems to write start and end dates to FromTime and ToTi...
[ "private", "void", "readException", "(", "ProjectCalendar", "bc", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "Exceptions", ".", "Exception", "exception", ")", "{", "Date", "fromDate", "=", "exception", ".", "getTimePeriod", "(", ")", ".", "getFrom...
Read a single calendar exception. @param bc parent calendar @param exception exception data
[ "Read", "a", "single", "calendar", "exception", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L604-L638
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readRecurringData
private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception) { RecurrenceType rt = getRecurrenceType(NumberHelper.getInt(exception.getType())); if (rt != null) { RecurringData rd = new RecurringData(); rd.setStartDate(bce....
java
private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception) { RecurrenceType rt = getRecurrenceType(NumberHelper.getInt(exception.getType())); if (rt != null) { RecurringData rd = new RecurringData(); rd.setStartDate(bce....
[ "private", "void", "readRecurringData", "(", "ProjectCalendarException", "bce", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "Exceptions", ".", "Exception", "exception", ")", "{", "RecurrenceType", "rt", "=", "getRecurrenceType", "(", "NumberHelper", ".",...
Read recurring data for a calendar exception. @param bce MPXJ calendar exception @param exception XML calendar exception
[ "Read", "recurring", "data", "for", "a", "calendar", "exception", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L646-L709
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.getFrequency
private Integer getFrequency(Project.Calendars.Calendar.Exceptions.Exception exception) { Integer period = NumberHelper.getInteger(exception.getPeriod()); if (period == null) { period = Integer.valueOf(1); } return period; }
java
private Integer getFrequency(Project.Calendars.Calendar.Exceptions.Exception exception) { Integer period = NumberHelper.getInteger(exception.getPeriod()); if (period == null) { period = Integer.valueOf(1); } return period; }
[ "private", "Integer", "getFrequency", "(", "Project", ".", "Calendars", ".", "Calendar", ".", "Exceptions", ".", "Exception", "exception", ")", "{", "Integer", "period", "=", "NumberHelper", ".", "getInteger", "(", "exception", ".", "getPeriod", "(", ")", ")",...
Retrieve the frequency of an exception. @param exception XML calendar exception @return frequency
[ "Retrieve", "the", "frequency", "of", "an", "exception", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L759-L767
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readWorkWeeks
private void readWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar) { WorkWeeks ww = xmlCalendar.getWorkWeeks(); if (ww != null) { for (WorkWeek xmlWeek : ww.getWorkWeek()) { ProjectCalendarWeek week = mpxjCalendar.addWorkWeek(); ...
java
private void readWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar) { WorkWeeks ww = xmlCalendar.getWorkWeeks(); if (ww != null) { for (WorkWeek xmlWeek : ww.getWorkWeek()) { ProjectCalendarWeek week = mpxjCalendar.addWorkWeek(); ...
[ "private", "void", "readWorkWeeks", "(", "Project", ".", "Calendars", ".", "Calendar", "xmlCalendar", ",", "ProjectCalendar", "mpxjCalendar", ")", "{", "WorkWeeks", "ww", "=", "xmlCalendar", ".", "getWorkWeeks", "(", ")", ";", "if", "(", "ww", "!=", "null", ...
Read the work weeks associated with this calendar. @param xmlCalendar XML calendar object @param mpxjCalendar MPXJ calendar object
[ "Read", "the", "work", "weeks", "associated", "with", "this", "calendar", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L775-L821
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readProjectExtendedAttributes
private void readProjectExtendedAttributes(Project project) { Project.ExtendedAttributes attributes = project.getExtendedAttributes(); if (attributes != null) { for (Project.ExtendedAttributes.ExtendedAttribute ea : attributes.getExtendedAttribute()) { readFieldAlias(e...
java
private void readProjectExtendedAttributes(Project project) { Project.ExtendedAttributes attributes = project.getExtendedAttributes(); if (attributes != null) { for (Project.ExtendedAttributes.ExtendedAttribute ea : attributes.getExtendedAttribute()) { readFieldAlias(e...
[ "private", "void", "readProjectExtendedAttributes", "(", "Project", "project", ")", "{", "Project", ".", "ExtendedAttributes", "attributes", "=", "project", ".", "getExtendedAttributes", "(", ")", ";", "if", "(", "attributes", "!=", "null", ")", "{", "for", "(",...
This method extracts project extended attribute data from an MSPDI file. @param project Root node of the MSPDI file
[ "This", "method", "extracts", "project", "extended", "attribute", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L828-L838
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readFieldAlias
private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute) { String alias = attribute.getAlias(); if (alias != null && alias.length() != 0) { FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID())); m_projectFile.getCustomFi...
java
private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute) { String alias = attribute.getAlias(); if (alias != null && alias.length() != 0) { FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID())); m_projectFile.getCustomFi...
[ "private", "void", "readFieldAlias", "(", "Project", ".", "ExtendedAttributes", ".", "ExtendedAttribute", "attribute", ")", "{", "String", "alias", "=", "attribute", ".", "getAlias", "(", ")", ";", "if", "(", "alias", "!=", "null", "&&", "alias", ".", "lengt...
Read a single field alias from an extended attribute. @param attribute extended attribute
[ "Read", "a", "single", "field", "alias", "from", "an", "extended", "attribute", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L845-L853
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readResources
private void readResources(Project project, HashMap<BigInteger, ProjectCalendar> calendarMap) { Project.Resources resources = project.getResources(); if (resources != null) { for (Project.Resources.Resource resource : resources.getResource()) { readResource(resource, c...
java
private void readResources(Project project, HashMap<BigInteger, ProjectCalendar> calendarMap) { Project.Resources resources = project.getResources(); if (resources != null) { for (Project.Resources.Resource resource : resources.getResource()) { readResource(resource, c...
[ "private", "void", "readResources", "(", "Project", "project", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "calendarMap", ")", "{", "Project", ".", "Resources", "resources", "=", "project", ".", "getResources", "(", ")", ";", "if", "(", "...
This method extracts resource data from an MSPDI file. @param project Root node of the MSPDI file @param calendarMap Map of calendar UIDs to names
[ "This", "method", "extracts", "resource", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L861-L871
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readResourceBaselines
private void readResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource) { for (Project.Resources.Resource.Baseline baseline : xmlResource.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(bas...
java
private void readResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource) { for (Project.Resources.Resource.Baseline baseline : xmlResource.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(bas...
[ "private", "void", "readResourceBaselines", "(", "Project", ".", "Resources", ".", "Resource", "xmlResource", ",", "Resource", "mpxjResource", ")", "{", "for", "(", "Project", ".", "Resources", ".", "Resource", ".", "Baseline", "baseline", ":", "xmlResource", "....
Reads baseline values for the current resource. @param xmlResource MSPDI resource instance @param mpxjResource MPXJ resource instance
[ "Reads", "baseline", "values", "for", "the", "current", "resource", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L978-L998
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readResourceExtendedAttributes
private void readResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx) { for (Project.Resources.Resource.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; ResourceField mpxFieldID = MPPResourc...
java
private void readResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx) { for (Project.Resources.Resource.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; ResourceField mpxFieldID = MPPResourc...
[ "private", "void", "readResourceExtendedAttributes", "(", "Project", ".", "Resources", ".", "Resource", "xml", ",", "Resource", "mpx", ")", "{", "for", "(", "Project", ".", "Resources", ".", "Resource", ".", "ExtendedAttribute", "attrib", ":", "xml", ".", "get...
This method processes any extended attributes associated with a resource. @param xml MSPDI resource instance @param mpx MPX resource instance
[ "This", "method", "processes", "any", "extended", "attributes", "associated", "with", "a", "resource", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1006-L1015
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readCostRateTables
private void readCostRateTables(Resource resource, Rates rates) { if (rates == null) { CostRateTable table = new CostRateTable(); table.add(CostRateTableEntry.DEFAULT_ENTRY); resource.setCostRateTable(0, table); table = new CostRateTable(); table.add(CostRate...
java
private void readCostRateTables(Resource resource, Rates rates) { if (rates == null) { CostRateTable table = new CostRateTable(); table.add(CostRateTableEntry.DEFAULT_ENTRY); resource.setCostRateTable(0, table); table = new CostRateTable(); table.add(CostRate...
[ "private", "void", "readCostRateTables", "(", "Resource", "resource", ",", "Rates", "rates", ")", "{", "if", "(", "rates", "==", "null", ")", "{", "CostRateTable", "table", "=", "new", "CostRateTable", "(", ")", ";", "table", ".", "add", "(", "CostRateTabl...
Reads the cost rate tables from the file. @param resource parent resource @param rates XML cot rate tables
[ "Reads", "the", "cost", "rate", "tables", "from", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1023-L1078
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readAvailabilityTable
private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods) { if (periods != null) { AvailabilityTable table = resource.getAvailability(); List<AvailabilityPeriod> list = periods.getAvailabilityPeriod(); for (AvailabilityPeriod period : list) { ...
java
private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods) { if (periods != null) { AvailabilityTable table = resource.getAvailability(); List<AvailabilityPeriod> list = periods.getAvailabilityPeriod(); for (AvailabilityPeriod period : list) { ...
[ "private", "void", "readAvailabilityTable", "(", "Resource", "resource", ",", "AvailabilityPeriods", "periods", ")", "{", "if", "(", "periods", "!=", "null", ")", "{", "AvailabilityTable", "table", "=", "resource", ".", "getAvailability", "(", ")", ";", "List", ...
Reads the availability table from the file. @param resource MPXJ resource instance @param periods MSPDI availability periods
[ "Reads", "the", "availability", "table", "from", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1086-L1102
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTasks
private void readTasks(Project project) { Project.Tasks tasks = project.getTasks(); if (tasks != null) { int tasksWithoutIDCount = 0; for (Project.Tasks.Task task : tasks.getTask()) { Task mpxjTask = readTask(task); if (mpxjTask.getID() == null) ...
java
private void readTasks(Project project) { Project.Tasks tasks = project.getTasks(); if (tasks != null) { int tasksWithoutIDCount = 0; for (Project.Tasks.Task task : tasks.getTask()) { Task mpxjTask = readTask(task); if (mpxjTask.getID() == null) ...
[ "private", "void", "readTasks", "(", "Project", "project", ")", "{", "Project", ".", "Tasks", "tasks", "=", "project", ".", "getTasks", "(", ")", ";", "if", "(", "tasks", "!=", "null", ")", "{", "int", "tasksWithoutIDCount", "=", "0", ";", "for", "(", ...
This method extracts task data from an MSPDI file. @param project Root node of the MSPDI file
[ "This", "method", "extracts", "task", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1109-L1142
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.updateProjectProperties
private void updateProjectProperties(Task task) { ProjectProperties props = m_projectFile.getProjectProperties(); props.setComments(task.getNotes()); }
java
private void updateProjectProperties(Task task) { ProjectProperties props = m_projectFile.getProjectProperties(); props.setComments(task.getNotes()); }
[ "private", "void", "updateProjectProperties", "(", "Task", "task", ")", "{", "ProjectProperties", "props", "=", "m_projectFile", ".", "getProjectProperties", "(", ")", ";", "props", ".", "setComments", "(", "task", ".", "getNotes", "(", ")", ")", ";", "}" ]
Update the project properties from the project summary task. @param task project summary task
[ "Update", "the", "project", "properties", "from", "the", "project", "summary", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1363-L1367
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTaskBaselines
private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat) { for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(baseline.getCo...
java
private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat) { for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline()) { int number = NumberHelper.getInt(baseline.getNumber()); Double cost = DatatypeConverter.parseCurrency(baseline.getCo...
[ "private", "void", "readTaskBaselines", "(", "Project", ".", "Tasks", ".", "Task", "xmlTask", ",", "Task", "mpxjTask", ",", "TimeUnit", "durationFormat", ")", "{", "for", "(", "Project", ".", "Tasks", ".", "Task", ".", "Baseline", "baseline", ":", "xmlTask",...
Reads baseline values for the current task. @param xmlTask MSPDI task instance @param mpxjTask MPXJ task instance @param durationFormat duration format to use
[ "Reads", "baseline", "values", "for", "the", "current", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1407-L1436
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readTaskExtendedAttributes
private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx) { for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; TaskField mpxFieldID = MPPTaskField.getInstance(xmlFieldID); ...
java
private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx) { for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; TaskField mpxFieldID = MPPTaskField.getInstance(xmlFieldID); ...
[ "private", "void", "readTaskExtendedAttributes", "(", "Project", ".", "Tasks", ".", "Task", "xml", ",", "Task", "mpx", ")", "{", "for", "(", "Project", ".", "Tasks", ".", "Task", ".", "ExtendedAttribute", "attrib", ":", "xml", ".", "getExtendedAttribute", "(...
This method processes any extended attributes associated with a task. @param xml MSPDI task instance @param mpx MPX task instance
[ "This", "method", "processes", "any", "extended", "attributes", "associated", "with", "a", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1444-L1453
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.getTaskCalendar
private ProjectCalendar getTaskCalendar(Project.Tasks.Task task) { ProjectCalendar calendar = null; BigInteger calendarID = task.getCalendarUID(); if (calendarID != null) { calendar = m_projectFile.getCalendarByUniqueID(Integer.valueOf(calendarID.intValue())); } return ...
java
private ProjectCalendar getTaskCalendar(Project.Tasks.Task task) { ProjectCalendar calendar = null; BigInteger calendarID = task.getCalendarUID(); if (calendarID != null) { calendar = m_projectFile.getCalendarByUniqueID(Integer.valueOf(calendarID.intValue())); } return ...
[ "private", "ProjectCalendar", "getTaskCalendar", "(", "Project", ".", "Tasks", ".", "Task", "task", ")", "{", "ProjectCalendar", "calendar", "=", "null", ";", "BigInteger", "calendarID", "=", "task", ".", "getCalendarUID", "(", ")", ";", "if", "(", "calendarID...
This method is used to retrieve the calendar associated with a task. If no calendar is associated with a task, this method returns null. @param task MSPDI task @return calendar instance
[ "This", "method", "is", "used", "to", "retrieve", "the", "calendar", "associated", "with", "a", "task", ".", "If", "no", "calendar", "is", "associated", "with", "a", "task", "this", "method", "returns", "null", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1463-L1474
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readPredecessors
private void readPredecessors(Project.Tasks.Task task) { Integer uid = task.getUID(); if (uid != null) { Task currTask = m_projectFile.getTaskByUniqueID(uid); if (currTask != null) { for (Project.Tasks.Task.PredecessorLink link : task.getPredecessorLink()) ...
java
private void readPredecessors(Project.Tasks.Task task) { Integer uid = task.getUID(); if (uid != null) { Task currTask = m_projectFile.getTaskByUniqueID(uid); if (currTask != null) { for (Project.Tasks.Task.PredecessorLink link : task.getPredecessorLink()) ...
[ "private", "void", "readPredecessors", "(", "Project", ".", "Tasks", ".", "Task", "task", ")", "{", "Integer", "uid", "=", "task", ".", "getUID", "(", ")", ";", "if", "(", "uid", "!=", "null", ")", "{", "Task", "currTask", "=", "m_projectFile", ".", ...
This method extracts predecessor data from an MSPDI file. @param task Task data
[ "This", "method", "extracts", "predecessor", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1481-L1495
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readPredecessor
private void readPredecessor(Task currTask, Project.Tasks.Task.PredecessorLink link) { BigInteger uid = link.getPredecessorUID(); if (uid != null) { Task prevTask = m_projectFile.getTaskByUniqueID(Integer.valueOf(uid.intValue())); if (prevTask != null) { Relat...
java
private void readPredecessor(Task currTask, Project.Tasks.Task.PredecessorLink link) { BigInteger uid = link.getPredecessorUID(); if (uid != null) { Task prevTask = m_projectFile.getTaskByUniqueID(Integer.valueOf(uid.intValue())); if (prevTask != null) { Relat...
[ "private", "void", "readPredecessor", "(", "Task", "currTask", ",", "Project", ".", "Tasks", ".", "Task", ".", "PredecessorLink", "link", ")", "{", "BigInteger", "uid", "=", "link", ".", "getPredecessorUID", "(", ")", ";", "if", "(", "uid", "!=", "null", ...
This method extracts data for a single predecessor from an MSPDI file. @param currTask Current task object @param link Predecessor data
[ "This", "method", "extracts", "data", "for", "a", "single", "predecessor", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1503-L1545
train
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readAssignments
private void readAssignments(Project project) { Project.Assignments assignments = project.getAssignments(); if (assignments != null) { SplitTaskFactory splitFactory = new SplitTaskFactory(); TimephasedWorkNormaliser normaliser = new MSPDITimephasedWorkNormaliser(); for (P...
java
private void readAssignments(Project project) { Project.Assignments assignments = project.getAssignments(); if (assignments != null) { SplitTaskFactory splitFactory = new SplitTaskFactory(); TimephasedWorkNormaliser normaliser = new MSPDITimephasedWorkNormaliser(); for (P...
[ "private", "void", "readAssignments", "(", "Project", "project", ")", "{", "Project", ".", "Assignments", "assignments", "=", "project", ".", "getAssignments", "(", ")", ";", "if", "(", "assignments", "!=", "null", ")", "{", "SplitTaskFactory", "splitFactory", ...
This method extracts assignment data from an MSPDI file. @param project Root node of the MSPDI file
[ "This", "method", "extracts", "assignment", "data", "from", "an", "MSPDI", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1552-L1564
train