conversation listlengths 2 2 |
|---|
[
{
"content": "Retrieve the correct index for the supplied Table instance.\n\n@param table Table instance\n@return index",
"role": "user"
},
{
"content": "private Map<String, Table> getIndex(Table table)\n {\n Map<String, Table> result;\n\n if (!table.getResourceFlag())\n {\n ... |
[
{
"content": "Saves the project file displayed in this panel.\n\n@param file target file\n@param type file type",
"role": "user"
},
{
"content": "public void saveFile(File file, String type)\n {\n if (file != null)\n {\n m_treeController.saveFile(file, type);\n }\n }",
... |
[
{
"content": "Adds a filter definition to this project file.\n\n@param filter filter definition",
"role": "user"
},
{
"content": "public void addFilter(Filter filter)\n {\n if (filter.isTaskFilter())\n {\n m_taskFilters.add(filter);\n }\n\n if (filter.isResourceFilter()... |
[
{
"content": "Removes a filter from this project file.\n\n@param filterName The name of the filter",
"role": "user"
},
{
"content": "public void removeFilter(String filterName)\n {\n Filter filter = getFilterByName(filterName);\n if (filter != null)\n {\n if (filter.isTaskFi... |
[
{
"content": "This method writes project properties to a Planner file.",
"role": "user"
},
{
"content": "private void writeProjectProperties()\n {\n ProjectProperties properties = m_projectFile.getProjectProperties();\n\n m_plannerProject.setCompany(properties.getCompany());\n m_pla... |
[
{
"content": "This method writes calendar data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"role": "user"
},
{
"content": "private void writeCalendars() throws JAXBException\n {\n //\n // Create the new Planner calendar list\n //\n Calendars calendars =... |
[
{
"content": "Write the standard set of day types.\n\n@param calendars parent collection of calendars",
"role": "user"
},
{
"content": "private void writeDayTypes(Calendars calendars)\n {\n DayTypes dayTypes = m_factory.createDayTypes();\n calendars.setDayTypes(dayTypes);\n List<Day... |
[
{
"content": "This method writes data for a single calendar to a Planner file.\n\n@param mpxjCalendar MPXJ calendar instance\n@param plannerCalendar Planner calendar instance\n@throws JAXBException on xml creation errors",
"role": "user"
},
{
"content": "private void writeCalendar(ProjectCalendar mp... |
[
{
"content": "Process the standard working hours for a given day.\n\n@param mpxjCalendar MPXJ Calendar instance\n@param uniqueID unique ID sequence generation\n@param day Day instance\n@param typeList Planner list of days",
"role": "user"
},
{
"content": "private void processWorkingHours(ProjectCale... |
[
{
"content": "This method writes resource data to a Planner file.",
"role": "user"
},
{
"content": "private void writeResources()\n {\n Resources resources = m_factory.createResources();\n m_plannerProject.setResources(resources);\n List<net.sf.mpxj.planner.schema.Resource> resource... |
[
{
"content": "This method writes data for a single resource to a Planner file.\n\n@param mpxjResource MPXJ Resource instance\n@param plannerResource Planner Resource instance",
"role": "user"
},
{
"content": "private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plann... |
[
{
"content": "This method writes task data to a Planner file.\n\n@throws JAXBException on xml creation errors",
"role": "user"
},
{
"content": "private void writeTasks() throws JAXBException\n {\n Tasks tasks = m_factory.createTasks();\n m_plannerProject.setTasks(tasks);\n List<net.... |
[
{
"content": "This method writes data for a single task to a Planner file.\n\n@param mpxjTask MPXJ Task instance\n@param taskList list of child tasks for current parent",
"role": "user"
},
{
"content": "private void writeTask(Task mpxjTask, List<net.sf.mpxj.planner.schema.Task> taskList) throws JAXB... |
[
{
"content": "This method writes predecessor data to a Planner file.\nWe have to deal with a slight anomaly in this method that is introduced\nby the MPX file format. It would be possible for someone to create an\nMPX file with both the predecessor list and the unique ID predecessor\nlist populated... which mea... |
[
{
"content": "This method writes assignment data to a Planner file.",
"role": "user"
},
{
"content": "private void writeAssignments()\n {\n Allocations allocations = m_factory.createAllocations();\n m_plannerProject.setAllocations(allocations);\n\n List<Allocation> allocationList = ... |
[
{
"content": "Convert an Integer value into a String.\n\n@param value Integer value\n@return String value",
"role": "user"
},
{
"content": "private String getIntegerString(Number value)\n {\n return (value == null ? null : Integer.toString(value.intValue()));\n }",
"role": "assistant"
... |
[
{
"content": "Used to determine if a particular day of the week is normally\na working day.\n\n@param mpxjCalendar ProjectCalendar instance\n@param day Day instance\n@return boolean flag",
"role": "user"
},
{
"content": "private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day)\n {\n ... |
[
{
"content": "Returns a flag represented as a String, indicating if\nthe supplied day is a working day.\n\n@param mpxjCalendar MPXJ ProjectCalendar instance\n@param day Day instance\n@return boolean flag as a string",
"role": "user"
},
{
"content": "private String getWorkingDayString(ProjectCalendar... |
[
{
"content": "Convert a Java date into a Planner time.\n\n0800\n\n@param value Java Date instance\n@return Planner time value",
"role": "user"
},
{
"content": "private String getTimeString(Date value)\n {\n Calendar cal = DateHelper.popCalendar(value);\n int hours = cal.get(Calendar.HOUR... |
[
{
"content": "Convert a Java date into a Planner date.\n\n20070222\n\n@param value Java Date instance\n@return Planner date",
"role": "user"
},
{
"content": "private String getDateString(Date value)\n {\n Calendar cal = DateHelper.popCalendar(value);\n int year = cal.get(Calendar.YEAR);\... |
[
{
"content": "Convert a Java date into a Planner date-time string.\n\n20070222T080000Z\n\n@param value Java date\n@return Planner date-time string",
"role": "user"
},
{
"content": "private String getDateTimeString(Date value)\n {\n String result = null;\n if (value != null)\n {\n ... |
[
{
"content": "Converts an MPXJ Duration instance into the string representation\nof a Planner duration.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string represen... |
[
{
"content": "This method extracts project properties from a Planner file.\n\n@param project Root node of the Planner file",
"role": "user"
},
{
"content": "private void readProjectProperties(Project project) throws MPXJException\n {\n ProjectProperties properties = m_projectFile.getProjectPr... |
[
{
"content": "This method extracts calendar data from a Planner file.\n\n@param project Root node of the Planner file",
"role": "user"
},
{
"content": "private void readCalendars(Project project) throws MPXJException\n {\n Calendars calendars = project.getCalendars();\n if (calendars != ... |
[
{
"content": "This method extracts data for a single calendar from a Planner file.\n\n@param plannerCalendar Calendar data\n@param parentMpxjCalendar parent of derived calendar",
"role": "user"
},
{
"content": "private void readCalendar(net.sf.mpxj.planner.schema.Calendar plannerCalendar, ProjectCal... |
[
{
"content": "This method extracts resource data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"role": "user"
},
{
"content": "private void readResources(Project plannerProject) throws MPXJException\n {\n Resources resources = plannerProject.getResources();\n ... |
[
{
"content": "This method extracts data for a single resource from a Planner file.\n\n@param plannerResource Resource data",
"role": "user"
},
{
"content": "private void readResource(net.sf.mpxj.planner.schema.Resource plannerResource) throws MPXJException\n {\n Resource mpxjResource = m_proj... |
[
{
"content": "This method extracts task data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"role": "user"
},
{
"content": "private void readTasks(Project plannerProject) throws MPXJException\n {\n Tasks tasks = plannerProject.getTasks();\n if (tasks != nul... |
[
{
"content": "This method extracts predecessor data from a Planner file.\n\n@param plannerTask Task data",
"role": "user"
},
{
"content": "private void readPredecessors(net.sf.mpxj.planner.schema.Task plannerTask)\n {\n Task mpxjTask = m_projectFile.getTaskByUniqueID(getInteger(plannerTask.ge... |
[
{
"content": "This method extracts assignment data from a Planner file.\n\n@param plannerProject Root node of the Planner file",
"role": "user"
},
{
"content": "private void readAssignments(Project plannerProject)\n {\n Allocations allocations = plannerProject.getAllocations();\n List<Al... |
[
{
"content": "Convert a Planner date-time value into a Java date.\n\n20070222T080000Z\n\n@param value Planner date-time\n@return Java Date instance",
"role": "user"
},
{
"content": "private Date getDateTime(String value) throws MPXJException\n {\n try\n {\n Number year = m_fourDi... |
[
{
"content": "Convert a Planner time into a Java date.\n\n0800\n\n@param value Planner time\n@return Java Date instance",
"role": "user"
},
{
"content": "private Date getTime(String value) throws MPXJException\n {\n try\n {\n Number hours = m_twoDigitFormat.parse(value.substring(... |
[
{
"content": "Converts the string representation of a Planner duration into\nan MPXJ Duration instance.\n\nPlanner represents durations as a number of seconds in its\nfile format, however it displays durations as days and hours,\nand seems to assume that a working day is 8 hours.\n\n@param value string represen... |
[
{
"content": "This is the main entry point used to convert the internal representation\nof timephased work into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param work timephased resource assignment data\n@param rangeUnits timescale u... |
[
{
"content": "This is the main entry point used to convert the internal representation\nof timephased baseline work into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param work timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList t... |
[
{
"content": "This is the main entry point used to convert the internal representation\nof timephased cost into an external form which can\nbe displayed to the user.\n\n@param projectCalendar calendar used by the resource assignment\n@param cost timephased resource assignment data\n@param rangeUnits timescale u... |
[
{
"content": "This is the main entry point used to convert the internal representation\nof timephased baseline cost into an external form which can\nbe displayed to the user.\n\n@param file parent project file\n@param cost timephased resource assignment data\n@param rangeUnits timescale units\n@param dateList t... |
[
{
"content": "Used to locate the first timephased resource assignment block which\nintersects with the target date range.\n\n@param <T> payload type\n@param range target date range\n@param assignments timephased resource assignments\n@param startIndex index at which to start the search\n@return index of timepha... |
[
{
"content": "For a given set of calendar data, this method sets the working\nday status for each day, and if present, sets the hours for that\nday.\n\nNOTE: MPP14 defines the concept of working weeks. MPXJ does not\ncurrently support this, and thus we only read the working hours\nfor the default working week.\... |
[
{
"content": "The way calendars are stored in an MPP14 file means that there\ncan be forward references between the base calendar unique ID for a\nderived calendar, and the base calendar itself. To get around this,\nwe initially populate the base calendar name attribute with the\nbase calendar unique ID, and no... |
[
{
"content": "This method is called to alert project listeners to the fact that\na task has been read from a project file.\n\n@param task task instance",
"role": "user"
},
{
"content": "public void fireTaskReadEvent(Task task)\n {\n if (m_projectListeners != null)\n {\n for (Proj... |
[
{
"content": "This method is called to alert project listeners to the fact that\na task has been written to a project file.\n\n@param task task instance",
"role": "user"
},
{
"content": "public void fireTaskWrittenEvent(Task task)\n {\n if (m_projectListeners != null)\n {\n for (... |
[
{
"content": "This method is called to alert project listeners to the fact that\na resource has been read from a project file.\n\n@param resource resource instance",
"role": "user"
},
{
"content": "public void fireResourceReadEvent(Resource resource)\n {\n if (m_projectListeners != null)\n ... |
[
{
"content": "This method is called to alert project listeners to the fact that\na resource has been written to a project file.\n\n@param resource resource instance",
"role": "user"
},
{
"content": "public void fireResourceWrittenEvent(Resource resource)\n {\n if (m_projectListeners != null)\... |
[
{
"content": "This method is called to alert project listeners to the fact that\na calendar has been read from a project file.\n\n@param calendar calendar instance",
"role": "user"
},
{
"content": "public void fireCalendarReadEvent(ProjectCalendar calendar)\n {\n if (m_projectListeners != nul... |
[
{
"content": "This method is called to alert project listeners to the fact that\na resource assignment has been read from a project file.\n\n@param resourceAssignment resourceAssignment instance",
"role": "user"
},
{
"content": "public void fireAssignmentReadEvent(ResourceAssignment resourceAssignme... |
[
{
"content": "This method is called to alert project listeners to the fact that\na resource assignment has been written to a project file.\n\n@param resourceAssignment resourceAssignment instance",
"role": "user"
},
{
"content": "public void fireAssignmentWrittenEvent(ResourceAssignment resourceAssi... |
[
{
"content": "This method is called to alert project listeners to the fact that\na relation has been read from a project file.\n\n@param relation relation instance",
"role": "user"
},
{
"content": "public void fireRelationReadEvent(Relation relation)\n {\n if (m_projectListeners != null)\n ... |
[
{
"content": "This method is called to alert project listeners to the fact that\na relation has been written to a project file.\n\n@param relation relation instance",
"role": "user"
},
{
"content": "public void fireRelationWrittenEvent(Relation relation)\n {\n if (m_projectListeners != null)\... |
[
{
"content": "This method is called to alert project listeners to the fact that\na calendar has been written to a project file.\n\n@param calendar calendar instance",
"role": "user"
},
{
"content": "public void fireCalendarWrittenEvent(ProjectCalendar calendar)\n {\n if (m_projectListeners !=... |
[
{
"content": "Adds a collection of listeners to the current project.\n\n@param listeners collection of listeners",
"role": "user"
},
{
"content": "public void addProjectListeners(List<ProjectListener> listeners)\n {\n if (listeners != null)\n {\n for (ProjectListener listener : l... |
[
{
"content": "Generate the next available field for a user defined field.\n\n@param <E> field type class\n@param clazz class of the desired field enum\n@param type user defined field type.\n@return field of specified type",
"role": "user"
},
{
"content": "public <E extends Enum<E> & FieldType> E nex... |
[
{
"content": "Read FTS file data from the configured source and return a populated ProjectFile instance.\n\n@return ProjectFile instance",
"role": "user"
},
{
"content": "private ProjectFile read() throws Exception\n {\n m_project = new ProjectFile();\n m_eventManager = m_project.getEven... |
[
{
"content": "Process task dependencies.",
"role": "user"
},
{
"content": "private void processDependencies()\n {\n Set<Task> tasksWithBars = new HashSet<Task>();\n FastTrackTable table = m_data.getTable(FastTrackTableType.ACTBARS);\n for (MapRow row : table)\n {\n Task... |
[
{
"content": "Extract the outline level from a task's WBS attribute.\n\n@param task Task instance\n@return outline level",
"role": "user"
},
{
"content": "private Integer getOutlineLevel(Task task)\n {\n String value = task.getWBS();\n Integer result = Integer.valueOf(1);\n if (valu... |
[
{
"content": "Set the state of an individual day in a weekly recurrence.\n\n@param day Day instance\n@param value true if this day is included in the recurrence",
"role": "user"
},
{
"content": "public void setWeeklyDay(Day day, boolean value)\n {\n if (value)\n {\n m_days.add(da... |
[
{
"content": "Converts from a bitmap to individual day flags for a weekly recurrence,\nusing the array of masks.\n\n@param days bitmap\n@param masks array of mask values",
"role": "user"
},
{
"content": "public void setWeeklyDaysFromBitmap(Integer days, int[] masks)\n {\n if (days != null)\n ... |
[
{
"content": "Retrieves the monthly or yearly relative day of the week.\n\n@return day of the week",
"role": "user"
},
{
"content": "public Day getDayOfWeek()\n {\n Day result = null;\n if (!m_days.isEmpty())\n {\n result = m_days.iterator().next();\n }\n return re... |
[
{
"content": "Retrieve the set of start dates represented by this recurrence data.\n\n@return array of start dates",
"role": "user"
},
{
"content": "public Date[] getDates()\n {\n int frequency = NumberHelper.getInt(m_frequency);\n if (frequency < 1)\n {\n frequency = 1;\n ... |
[
{
"content": "Determines if we need to calculate more dates.\nIf we do not have a finish date, this method falls back on using the\noccurrences attribute. If we have a finish date, we'll use that instead.\nWe're assuming that the recurring data has one or other of those values.\n\n@param calendar current date\n... |
[
{
"content": "Calculate start dates for a daily recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getDailyDates(Calendar calendar, int frequency, List<Date> dates)\n {\n while (moreDates(ca... |
[
{
"content": "Calculate start dates for a weekly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getWeeklyDates(Calendar calendar, int frequency, List<Date> dates)\n {\n int currentDay = ... |
[
{
"content": "Calculate start dates for a monthly recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getMonthlyDates(Calendar calendar, int frequency, List<Date> dates)\n {\n if (m_relative)... |
[
{
"content": "Calculate start dates for a monthly relative recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getMonthlyRelativeDates(Calendar calendar, int frequency, List<Date> dates)\n {\n ... |
[
{
"content": "Calculate start dates for a monthly absolute recurrence.\n\n@param calendar current date\n@param frequency frequency\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getMonthlyAbsoluteDates(Calendar calendar, int frequency, List<Date> dates)\n {\n ... |
[
{
"content": "Calculate start dates for a yearly recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getYearlyDates(Calendar calendar, List<Date> dates)\n {\n if (m_relative)\n {\n getYearlyRelativeDates(ca... |
[
{
"content": "Calculate start dates for a yearly relative recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getYearlyRelativeDates(Calendar calendar, List<Date> dates)\n {\n long startDate = calendar.getTimeInMillis()... |
[
{
"content": "Calculate start dates for a yearly absolute recurrence.\n\n@param calendar current date\n@param dates array of start dates",
"role": "user"
},
{
"content": "private void getYearlyAbsoluteDates(Calendar calendar, List<Date> dates)\n {\n long startDate = calendar.getTimeInMillis()... |
[
{
"content": "Moves a calendar to the nth named day of the month.\n\n@param calendar current date\n@param dayNumber nth day",
"role": "user"
},
{
"content": "private void setCalendarToOrdinalRelativeDay(Calendar calendar, int dayNumber)\n {\n int currentDayOfWeek = calendar.get(Calendar.DAY_O... |
[
{
"content": "Moves a calendar to the last named day of the month.\n\n@param calendar current date",
"role": "user"
},
{
"content": "private void setCalendarToLastRelativeDay(Calendar calendar)\n {\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n ... |
[
{
"content": "Sets the yearly absolute date.\n\n@param date yearly absolute date",
"role": "user"
},
{
"content": "public void setYearlyAbsoluteFromDate(Date date)\n {\n if (date != null)\n {\n Calendar cal = DateHelper.popCalendar(date);\n m_dayNumber = Integer.valueOf(c... |
[
{
"content": "Retrieve the ordinal text for a given integer.\n\n@param value integer value\n@return ordinal text",
"role": "user"
},
{
"content": "private String getOrdinal(Integer value)\n {\n String result;\n int index = value.intValue();\n if (index >= ORDINAL.length)\n {\n ... |
[
{
"content": "This method takes the textual version of a priority\nand returns an appropriate instance of this class. Note that unrecognised\nvalues are treated as medium priority.\n\n@param locale target locale\n@param priority text version of the priority\n@return Priority class instance",
"role": "user"
... |
[
{
"content": "If a and b are not null, returns a new duration of a + b.\nIf a is null and b is not null, returns b.\nIf a is not null and b is null, returns a.\nIf a and b are null, returns null.\nIf needed, b is converted to a's time unit using the project properties.\n\n@param a first duration\n@param b secon... |
[
{
"content": "Retrieves a ProjectReader instance which can read a file of the\ntype specified by the supplied file name.\n\n@param name file name\n@return ProjectReader instance",
"role": "user"
},
{
"content": "public static ProjectReader getProjectReader(String name) throws MPXJException\n {\n ... |
[
{
"content": "Select calendar data from the database.\n\n@throws SQLException",
"role": "user"
},
{
"content": "private void processCalendars() throws SQLException\n {\n for (ResultSetRow row : getRows(\"SELECT * FROM MSP_CALENDARS WHERE PROJ_ID=?\", m_projectID))\n {\n processCa... |
[
{
"content": "Process calendar hours and exception data from the database.\n\n@param calendars all calendars for the project",
"role": "user"
},
{
"content": "private void processCalendarData(List<ProjectCalendar> calendars) throws SQLException\n {\n for (ProjectCalendar calendar : calendars)... |
[
{
"content": "Process the hours and exceptions for an individual calendar.\n\n@param calendar project calendar\n@param calendarData hours and exception rows for this calendar",
"role": "user"
},
{
"content": "private void processCalendarData(ProjectCalendar calendar, List<ResultSetRow> calendarData)... |
[
{
"content": "The only indication that a task is a SubProject is the contents\nof the subproject file name field. We test these here then add a skeleton\nsubproject structure to match the way we do things with MPP files.",
"role": "user"
},
{
"content": "private void processSubProjects()\n {\n ... |
[
{
"content": "Process a single outline code.\n\n@param parentRow outline code to task mapping table\n@throws SQLException",
"role": "user"
},
{
"content": "private void processOutlineCodeFields(Row parentRow) throws SQLException\n {\n Integer entityID = parentRow.getInteger(\"CODE_REF_UID\");... |
[
{
"content": "Allocates a database connection.\n\n@throws SQLException",
"role": "user"
},
{
"content": "private void allocateConnection() throws SQLException\n {\n if (m_connection == null)\n {\n m_connection = m_dataSource.getConnection();\n m_allocatedConnection = true... |
[
{
"content": "Queries database meta data to check for the existence of\nspecific tables.",
"role": "user"
},
{
"content": "private void queryDatabaseMetaData()\n {\n ResultSet rs = null;\n\n try\n {\n Set<String> tables = new HashSet<String>();\n DatabaseMetaData dmd... |
[
{
"content": "Convert the Primavera string representation of a UUID into a Java UUID instance.\n\n@param value Primavera UUID\n@return Java UUID instance",
"role": "user"
},
{
"content": "public static final UUID parseUUID(String value)\n {\n UUID result = null;\n if (value != null && !v... |
[
{
"content": "Retrieve a UUID in the form required by Primavera PMXML.\n\n@param guid UUID instance\n@return formatted UUID",
"role": "user"
},
{
"content": "public static String printUUID(UUID guid)\n {\n return guid == null ? null : \"{\" + guid.toString().toUpperCase() + \"}\";\n }",
... |
[
{
"content": "Print a time value.\n\n@param value time value\n@return time value",
"role": "user"
},
{
"content": "public static final String printTime(Date value)\n {\n return (value == null ? null : TIME_FORMAT.get().format(value));\n }",
"role": "assistant"
}
] |
[
{
"content": "Renumbers all entity unique IDs.",
"role": "user"
},
{
"content": "public void renumberUniqueIDs()\n {\n int uid = firstUniqueID();\n for (T entity : this)\n {\n entity.setUniqueID(Integer.valueOf(uid++));\n }\n }",
"role": "assistant"
}
] |
[
{
"content": "Validate that the Unique IDs for the entities in this container are valid for MS Project.\nIf they are not valid, i.e one or more of them are too large, renumber them.",
"role": "user"
},
{
"content": "public void validateUniqueIDsForMicrosoftProject()\n {\n if (!isEmpty())\n ... |
[
{
"content": "Extract definition records from the table and divide into groups.",
"role": "user"
},
{
"content": "private void readDefinitions()\n {\n for (MapRow row : m_tables.get(\"TTL\"))\n {\n Integer id = row.getInteger(\"DEFINITION_ID\");\n List<MapRow> list = m_de... |
[
{
"content": "Read project calendars.",
"role": "user"
},
{
"content": "private void readCalendars()\n {\n Table cal = m_tables.get(\"CAL\");\n for (MapRow row : cal)\n {\n ProjectCalendar calendar = m_projectFile.addCalendar();\n m_calendarMap.put(row.getInteger(\"C... |
[
{
"content": "Reads the integer representation of calendar hours for a given\nday and populates the calendar.\n\n@param calendar parent calendar\n@param day target day\n@param hours working hours",
"role": "user"
},
{
"content": "private void readHours(ProjectCalendar calendar, Day day, Integer hour... |
[
{
"content": "Count the number of working hours in a day, based in the\ninteger representation of the working hours.\n\n@param hours working hours\n@return number of hours",
"role": "user"
},
{
"content": "private int countHours(Integer hours)\n {\n int value = hours.intValue();\n int ho... |
[
{
"content": "Read holidays from the database and create calendar exceptions.",
"role": "user"
},
{
"content": "private void readHolidays()\n {\n for (MapRow row : m_tables.get(\"HOL\"))\n {\n ProjectCalendar calendar = m_calendarMap.get(row.getInteger(\"CALENDAR_ID\"));\n ... |
[
{
"content": "Read activities.",
"role": "user"
},
{
"content": "private void readActivities()\n {\n List<MapRow> items = new ArrayList<MapRow>();\n for (MapRow row : m_tables.get(\"ACT\"))\n {\n items.add(row);\n }\n final AlphanumComparator comparator = new Alpha... |
[
{
"content": "Creates a CostRateTable instance from a block of data.\n\n@param resource parent resource\n@param index cost rate table index\n@param data data block",
"role": "user"
},
{
"content": "public void process(Resource resource, int index, byte[] data)\n {\n CostRateTable result = new... |
[
{
"content": "Converts an integer into a time format.\n\n@param format integer format value\n@return TimeUnit instance",
"role": "user"
},
{
"content": "private TimeUnit getFormat(int format)\n {\n TimeUnit result;\n if (format == 0xFFFF)\n {\n result = TimeUnit.HOURS;\n ... |
[
{
"content": "This method takes the textual version of a constraint name\nand returns an appropriate class instance. Note that unrecognised\nvalues are treated as \"As Soon As Possible\" constraints.\n\n@param locale target locale\n@param type text version of the constraint type\n@return ConstraintType instance... |
[
{
"content": "This method performs a set of queries to retrieve information\nfrom the an MPP or an MPX file.\n\n@param filename name of the MPX file\n@throws Exception on file read error",
"role": "user"
},
{
"content": "private static void query(String filename) throws Exception\n {\n Projec... |
[
{
"content": "Reads basic summary details from the project properties.\n\n@param file MPX file",
"role": "user"
},
{
"content": "private static void listProjectProperties(ProjectFile file)\n {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy HH:mm z\");\n ProjectProperties prope... |
[
{
"content": "This method lists all resources defined in the file.\n\n@param file MPX file",
"role": "user"
},
{
"content": "private static void listResources(ProjectFile file)\n {\n for (Resource resource : file.getResources())\n {\n System.out.println(\"Resource: \" + resource.... |
[
{
"content": "This method lists all tasks defined in the file.\n\n@param file MPX file",
"role": "user"
},
{
"content": "private static void listTasks(ProjectFile file)\n {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy HH:mm z\");\n\n for (Task task : file.getTasks())\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.