id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
157,200 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/TimephasedUtility.java | TimephasedUtility.segmentBaselineWork | public ArrayList<Duration> segmentBaselineWork(ProjectFile file, List<TimephasedWork> work, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
return segmentWork(file.getBaselineCalendar(), work, rangeUnits, dateList);
} | java | public ArrayList<Duration> segmentBaselineWork(ProjectFile file, List<TimephasedWork> work, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
return segmentWork(file.getBaselineCalendar(), work, rangeUnits, dateList);
} | [
"public",
"ArrayList",
"<",
"Duration",
">",
"segmentBaselineWork",
"(",
"ProjectFile",
"file",
",",
"List",
"<",
"TimephasedWork",
">",
"work",
",",
"TimescaleUnits",
"rangeUnits",
",",
"ArrayList",
"<",
"DateRange",
">",
"dateList",
")",
"{",
"return",
"segmen... | This is the main entry point used to convert the internal representation
of timephased baseline work into an external form which can
be displayed to the user.
@param file parent project file
@param work timephased resource assignment data
@param rangeUnits timescale units
@param dateList timescale date ranges
@return ... | [
"This",
"is",
"the",
"main",
"entry",
"point",
"used",
"to",
"convert",
"the",
"internal",
"representation",
"of",
"timephased",
"baseline",
"work",
"into",
"an",
"external",
"form",
"which",
"can",
"be",
"displayed",
"to",
"the",
"user",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L108-L111 |
157,201 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/TimephasedUtility.java | TimephasedUtility.segmentCost | public ArrayList<Double> segmentCost(ProjectCalendar projectCalendar, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
ArrayList<Double> result = new ArrayList<Double>(dateList.size());
int lastStartIndex = 0;
//
// Iterate through the list of dates rang... | java | public ArrayList<Double> segmentCost(ProjectCalendar projectCalendar, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
ArrayList<Double> result = new ArrayList<Double>(dateList.size());
int lastStartIndex = 0;
//
// Iterate through the list of dates rang... | [
"public",
"ArrayList",
"<",
"Double",
">",
"segmentCost",
"(",
"ProjectCalendar",
"projectCalendar",
",",
"List",
"<",
"TimephasedCost",
">",
"cost",
",",
"TimescaleUnits",
"rangeUnits",
",",
"ArrayList",
"<",
"DateRange",
">",
"dateList",
")",
"{",
"ArrayList",
... | This is the main entry point used to convert the internal representation
of timephased cost into an external form which can
be displayed to the user.
@param projectCalendar calendar used by the resource assignment
@param cost timephased resource assignment data
@param rangeUnits timescale units
@param dateList timesca... | [
"This",
"is",
"the",
"main",
"entry",
"point",
"used",
"to",
"convert",
"the",
"internal",
"representation",
"of",
"timephased",
"cost",
"into",
"an",
"external",
"form",
"which",
"can",
"be",
"displayed",
"to",
"the",
"user",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L124-L160 |
157,202 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/TimephasedUtility.java | TimephasedUtility.segmentBaselineCost | public ArrayList<Double> segmentBaselineCost(ProjectFile file, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
return segmentCost(file.getBaselineCalendar(), cost, rangeUnits, dateList);
} | java | public ArrayList<Double> segmentBaselineCost(ProjectFile file, List<TimephasedCost> cost, TimescaleUnits rangeUnits, ArrayList<DateRange> dateList)
{
return segmentCost(file.getBaselineCalendar(), cost, rangeUnits, dateList);
} | [
"public",
"ArrayList",
"<",
"Double",
">",
"segmentBaselineCost",
"(",
"ProjectFile",
"file",
",",
"List",
"<",
"TimephasedCost",
">",
"cost",
",",
"TimescaleUnits",
"rangeUnits",
",",
"ArrayList",
"<",
"DateRange",
">",
"dateList",
")",
"{",
"return",
"segmentC... | This is the main entry point used to convert the internal representation
of timephased baseline cost into an external form which can
be displayed to the user.
@param file parent project file
@param cost timephased resource assignment data
@param rangeUnits timescale units
@param dateList timescale date ranges
@return ... | [
"This",
"is",
"the",
"main",
"entry",
"point",
"used",
"to",
"convert",
"the",
"internal",
"representation",
"of",
"timephased",
"baseline",
"cost",
"into",
"an",
"external",
"form",
"which",
"can",
"be",
"displayed",
"to",
"the",
"user",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L173-L176 |
157,203 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/TimephasedUtility.java | TimephasedUtility.getStartIndex | private <T extends TimephasedItem<?>> int getStartIndex(DateRange range, List<T> assignments, int startIndex)
{
int result = -1;
if (assignments != null)
{
long rangeStart = range.getStart().getTime();
long rangeEnd = range.getEnd().getTime();
for (int loop = startIndex;... | java | private <T extends TimephasedItem<?>> int getStartIndex(DateRange range, List<T> assignments, int startIndex)
{
int result = -1;
if (assignments != null)
{
long rangeStart = range.getStart().getTime();
long rangeEnd = range.getEnd().getTime();
for (int loop = startIndex;... | [
"private",
"<",
"T",
"extends",
"TimephasedItem",
"<",
"?",
">",
">",
"int",
"getStartIndex",
"(",
"DateRange",
"range",
",",
"List",
"<",
"T",
">",
"assignments",
",",
"int",
"startIndex",
")",
"{",
"int",
"result",
"=",
"-",
"1",
";",
"if",
"(",
"a... | Used to locate the first timephased resource assignment block which
intersects with the target date range.
@param <T> payload type
@param range target date range
@param assignments timephased resource assignments
@param startIndex index at which to start the search
@return index of timephased resource assignment which... | [
"Used",
"to",
"locate",
"the",
"first",
"timephased",
"resource",
"assignment",
"block",
"which",
"intersects",
"with",
"the",
"target",
"date",
"range",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L188-L234 |
157,204 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/AbstractCalendarFactory.java | AbstractCalendarFactory.processCalendarHours | private void processCalendarHours(byte[] data, ProjectCalendar defaultCalendar, ProjectCalendar cal, boolean isBaseCalendar)
{
// Dump out the calendar related data and fields.
//MPPUtility.dataDump(data, true, false, false, false, true, false, true);
int offset;
ProjectCalendarHours hours;
... | java | private void processCalendarHours(byte[] data, ProjectCalendar defaultCalendar, ProjectCalendar cal, boolean isBaseCalendar)
{
// Dump out the calendar related data and fields.
//MPPUtility.dataDump(data, true, false, false, false, true, false, true);
int offset;
ProjectCalendarHours hours;
... | [
"private",
"void",
"processCalendarHours",
"(",
"byte",
"[",
"]",
"data",
",",
"ProjectCalendar",
"defaultCalendar",
",",
"ProjectCalendar",
"cal",
",",
"boolean",
"isBaseCalendar",
")",
"{",
"// Dump out the calendar related data and fields.",
"//MPPUtility.dataDump(data, tr... | For a given set of calendar data, this method sets the working
day status for each day, and if present, sets the hours for that
day.
NOTE: MPP14 defines the concept of working weeks. MPXJ does not
currently support this, and thus we only read the working hours
for the default working week.
@param data calendar data b... | [
"For",
"a",
"given",
"set",
"of",
"calendar",
"data",
"this",
"method",
"sets",
"the",
"working",
"day",
"status",
"for",
"each",
"day",
"and",
"if",
"present",
"sets",
"the",
"hours",
"for",
"that",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractCalendarFactory.java#L194-L282 |
157,205 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/AbstractCalendarFactory.java | AbstractCalendarFactory.updateBaseCalendarNames | private void updateBaseCalendarNames(List<Pair<ProjectCalendar, Integer>> baseCalendars, HashMap<Integer, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, Integer> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
Integer baseCalendarID = pair.getSecond();
Projec... | java | private void updateBaseCalendarNames(List<Pair<ProjectCalendar, Integer>> baseCalendars, HashMap<Integer, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, Integer> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
Integer baseCalendarID = pair.getSecond();
Projec... | [
"private",
"void",
"updateBaseCalendarNames",
"(",
"List",
"<",
"Pair",
"<",
"ProjectCalendar",
",",
"Integer",
">",
">",
"baseCalendars",
",",
"HashMap",
"<",
"Integer",
",",
"ProjectCalendar",
">",
"map",
")",
"{",
"for",
"(",
"Pair",
"<",
"ProjectCalendar",... | The way calendars are stored in an MPP14 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",
"MPP14",
"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/mpp/AbstractCalendarFactory.java#L295-L312 |
157,206 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireTaskReadEvent | public void fireTaskReadEvent(Task task)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.taskRead(task);
}
}
} | java | public void fireTaskReadEvent(Task task)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.taskRead(task);
}
}
} | [
"public",
"void",
"fireTaskReadEvent",
"(",
"Task",
"task",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"taskRead",
"(",
"task",
")",
";",... | This method is called to alert project listeners to the fact that
a task has been read from a project file.
@param task task instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"task",
"has",
"been",
"read",
"from",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L42-L51 |
157,207 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireTaskWrittenEvent | public void fireTaskWrittenEvent(Task task)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.taskWritten(task);
}
}
} | java | public void fireTaskWrittenEvent(Task task)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.taskWritten(task);
}
}
} | [
"public",
"void",
"fireTaskWrittenEvent",
"(",
"Task",
"task",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"taskWritten",
"(",
"task",
")",
... | This method is called to alert project listeners to the fact that
a task has been written to a project file.
@param task task instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"task",
"has",
"been",
"written",
"to",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L59-L68 |
157,208 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireResourceReadEvent | public void fireResourceReadEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceRead(resource);
}
}
} | java | public void fireResourceReadEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceRead(resource);
}
}
} | [
"public",
"void",
"fireResourceReadEvent",
"(",
"Resource",
"resource",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"resourceRead",
"(",
"reso... | This method is called to alert project listeners to the fact that
a resource has been read from a project file.
@param resource resource instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"resource",
"has",
"been",
"read",
"from",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L76-L85 |
157,209 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireResourceWrittenEvent | public void fireResourceWrittenEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceWritten(resource);
}
}
} | java | public void fireResourceWrittenEvent(Resource resource)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.resourceWritten(resource);
}
}
} | [
"public",
"void",
"fireResourceWrittenEvent",
"(",
"Resource",
"resource",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"resourceWritten",
"(",
... | This method is called to alert project listeners to the fact that
a resource has been written to a project file.
@param resource resource instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"resource",
"has",
"been",
"written",
"to",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L93-L102 |
157,210 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireCalendarReadEvent | public void fireCalendarReadEvent(ProjectCalendar calendar)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.calendarRead(calendar);
}
}
} | java | public void fireCalendarReadEvent(ProjectCalendar calendar)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.calendarRead(calendar);
}
}
} | [
"public",
"void",
"fireCalendarReadEvent",
"(",
"ProjectCalendar",
"calendar",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"calendarRead",
"(",
... | This method is called to alert project listeners to the fact that
a calendar has been read from a project file.
@param calendar calendar instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"calendar",
"has",
"been",
"read",
"from",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L110-L119 |
157,211 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireAssignmentReadEvent | public void fireAssignmentReadEvent(ResourceAssignment resourceAssignment)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.assignmentRead(resourceAssignment);
}
}
} | java | public void fireAssignmentReadEvent(ResourceAssignment resourceAssignment)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.assignmentRead(resourceAssignment);
}
}
} | [
"public",
"void",
"fireAssignmentReadEvent",
"(",
"ResourceAssignment",
"resourceAssignment",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"assignm... | This method is called to alert project listeners to the fact that
a resource assignment has been read from a project file.
@param resourceAssignment resourceAssignment instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"resource",
"assignment",
"has",
"been",
"read",
"from",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L127-L136 |
157,212 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireAssignmentWrittenEvent | public void fireAssignmentWrittenEvent(ResourceAssignment resourceAssignment)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.assignmentWritten(resourceAssignment);
}
}
} | java | public void fireAssignmentWrittenEvent(ResourceAssignment resourceAssignment)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.assignmentWritten(resourceAssignment);
}
}
} | [
"public",
"void",
"fireAssignmentWrittenEvent",
"(",
"ResourceAssignment",
"resourceAssignment",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"assi... | This method is called to alert project listeners to the fact that
a resource assignment has been written to a project file.
@param resourceAssignment resourceAssignment instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"resource",
"assignment",
"has",
"been",
"written",
"to",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L144-L153 |
157,213 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireRelationReadEvent | public void fireRelationReadEvent(Relation relation)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.relationRead(relation);
}
}
} | java | public void fireRelationReadEvent(Relation relation)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.relationRead(relation);
}
}
} | [
"public",
"void",
"fireRelationReadEvent",
"(",
"Relation",
"relation",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"relationRead",
"(",
"rela... | This method is called to alert project listeners to the fact that
a relation has been read from a project file.
@param relation relation instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"relation",
"has",
"been",
"read",
"from",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L161-L170 |
157,214 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireRelationWrittenEvent | public void fireRelationWrittenEvent(Relation relation)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.relationWritten(relation);
}
}
} | java | public void fireRelationWrittenEvent(Relation relation)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.relationWritten(relation);
}
}
} | [
"public",
"void",
"fireRelationWrittenEvent",
"(",
"Relation",
"relation",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"relationWritten",
"(",
... | This method is called to alert project listeners to the fact that
a relation has been written to a project file.
@param relation relation instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"relation",
"has",
"been",
"written",
"to",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L178-L187 |
157,215 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.fireCalendarWrittenEvent | public void fireCalendarWrittenEvent(ProjectCalendar calendar)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.calendarWritten(calendar);
}
}
} | java | public void fireCalendarWrittenEvent(ProjectCalendar calendar)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.calendarWritten(calendar);
}
}
} | [
"public",
"void",
"fireCalendarWrittenEvent",
"(",
"ProjectCalendar",
"calendar",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"listener",
".",
"calendarWritten",
... | This method is called to alert project listeners to the fact that
a calendar has been written to a project file.
@param calendar calendar instance | [
"This",
"method",
"is",
"called",
"to",
"alert",
"project",
"listeners",
"to",
"the",
"fact",
"that",
"a",
"calendar",
"has",
"been",
"written",
"to",
"a",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L195-L204 |
157,216 | joniles/mpxj | src/main/java/net/sf/mpxj/EventManager.java | EventManager.addProjectListeners | public void addProjectListeners(List<ProjectListener> listeners)
{
if (listeners != null)
{
for (ProjectListener listener : listeners)
{
addProjectListener(listener);
}
}
} | java | public void addProjectListeners(List<ProjectListener> listeners)
{
if (listeners != null)
{
for (ProjectListener listener : listeners)
{
addProjectListener(listener);
}
}
} | [
"public",
"void",
"addProjectListeners",
"(",
"List",
"<",
"ProjectListener",
">",
"listeners",
")",
"{",
"if",
"(",
"listeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"listeners",
")",
"{",
"addProjectListener",
"(",
"listene... | Adds a collection of listeners to the current project.
@param listeners collection of listeners | [
"Adds",
"a",
"collection",
"of",
"listeners",
"to",
"the",
"current",
"project",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/EventManager.java#L225-L234 |
157,217 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/UserFieldCounters.java | UserFieldCounters.nextField | public <E extends Enum<E> & FieldType> E nextField(Class<E> clazz, UserFieldDataType type)
{
for (String name : m_names[type.ordinal()])
{
int i = NumberHelper.getInt(m_counters.get(name)) + 1;
try
{
E e = Enum.valueOf(clazz, name + i);
m_counters.put(na... | java | public <E extends Enum<E> & FieldType> E nextField(Class<E> clazz, UserFieldDataType type)
{
for (String name : m_names[type.ordinal()])
{
int i = NumberHelper.getInt(m_counters.get(name)) + 1;
try
{
E e = Enum.valueOf(clazz, name + i);
m_counters.put(na... | [
"public",
"<",
"E",
"extends",
"Enum",
"<",
"E",
">",
"&",
"FieldType",
">",
"E",
"nextField",
"(",
"Class",
"<",
"E",
">",
"clazz",
",",
"UserFieldDataType",
"type",
")",
"{",
"for",
"(",
"String",
"name",
":",
"m_names",
"[",
"type",
".",
"ordinal"... | Generate the next available field for a user defined field.
@param <E> field type class
@param clazz class of the desired field enum
@param type user defined field type.
@return field of specified type | [
"Generate",
"the",
"next",
"available",
"field",
"for",
"a",
"user",
"defined",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/UserFieldCounters.java#L70-L89 |
157,218 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java | FastTrackReader.read | private ProjectFile read() throws Exception
{
m_project = new ProjectFile();
m_eventManager = m_project.getEventManager();
ProjectConfig config = m_project.getProjectConfig();
config.setAutoCalendarUniqueID(false);
config.setAutoTaskID(false);
config.setAutoTaskUniqueID(false);
... | java | private ProjectFile read() throws Exception
{
m_project = new ProjectFile();
m_eventManager = m_project.getEventManager();
ProjectConfig config = m_project.getProjectConfig();
config.setAutoCalendarUniqueID(false);
config.setAutoTaskID(false);
config.setAutoTaskUniqueID(false);
... | [
"private",
"ProjectFile",
"read",
"(",
")",
"throws",
"Exception",
"{",
"m_project",
"=",
"new",
"ProjectFile",
"(",
")",
";",
"m_eventManager",
"=",
"m_project",
".",
"getEventManager",
"(",
")",
";",
"ProjectConfig",
"config",
"=",
"m_project",
".",
"getProj... | Read FTS file data from the configured source and return a populated ProjectFile instance.
@return ProjectFile instance | [
"Read",
"FTS",
"file",
"data",
"from",
"the",
"configured",
"source",
"and",
"return",
"a",
"populated",
"ProjectFile",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java#L139-L165 |
157,219 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java | FastTrackReader.processDependencies | private void processDependencies()
{
Set<Task> tasksWithBars = new HashSet<Task>();
FastTrackTable table = m_data.getTable(FastTrackTableType.ACTBARS);
for (MapRow row : table)
{
Task task = m_project.getTaskByUniqueID(row.getInteger(ActBarField._ACTIVITY));
if (task == null... | java | private void processDependencies()
{
Set<Task> tasksWithBars = new HashSet<Task>();
FastTrackTable table = m_data.getTable(FastTrackTableType.ACTBARS);
for (MapRow row : table)
{
Task task = m_project.getTaskByUniqueID(row.getInteger(ActBarField._ACTIVITY));
if (task == null... | [
"private",
"void",
"processDependencies",
"(",
")",
"{",
"Set",
"<",
"Task",
">",
"tasksWithBars",
"=",
"new",
"HashSet",
"<",
"Task",
">",
"(",
")",
";",
"FastTrackTable",
"table",
"=",
"m_data",
".",
"getTable",
"(",
"FastTrackTableType",
".",
"ACTBARS",
... | Process task dependencies. | [
"Process",
"task",
"dependencies",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java#L532-L579 |
157,220 | joniles/mpxj | src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java | FastTrackReader.getOutlineLevel | private Integer getOutlineLevel(Task task)
{
String value = task.getWBS();
Integer result = Integer.valueOf(1);
if (value != null && value.length() > 0)
{
String[] path = WBS_SPLIT_REGEX.split(value);
result = Integer.valueOf(path.length);
}
return result;
} | java | private Integer getOutlineLevel(Task task)
{
String value = task.getWBS();
Integer result = Integer.valueOf(1);
if (value != null && value.length() > 0)
{
String[] path = WBS_SPLIT_REGEX.split(value);
result = Integer.valueOf(path.length);
}
return result;
} | [
"private",
"Integer",
"getOutlineLevel",
"(",
"Task",
"task",
")",
"{",
"String",
"value",
"=",
"task",
".",
"getWBS",
"(",
")",
";",
"Integer",
"result",
"=",
"Integer",
".",
"valueOf",
"(",
"1",
")",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"va... | Extract the outline level from a task's WBS attribute.
@param task Task instance
@return outline level | [
"Extract",
"the",
"outline",
"level",
"from",
"a",
"task",
"s",
"WBS",
"attribute",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackReader.java#L640-L650 |
157,221 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.setWeeklyDay | public void setWeeklyDay(Day day, boolean value)
{
if (value)
{
m_days.add(day);
}
else
{
m_days.remove(day);
}
} | java | public void setWeeklyDay(Day day, boolean value)
{
if (value)
{
m_days.add(day);
}
else
{
m_days.remove(day);
}
} | [
"public",
"void",
"setWeeklyDay",
"(",
"Day",
"day",
",",
"boolean",
"value",
")",
"{",
"if",
"(",
"value",
")",
"{",
"m_days",
".",
"add",
"(",
"day",
")",
";",
"}",
"else",
"{",
"m_days",
".",
"remove",
"(",
"day",
")",
";",
"}",
"}"
] | Set the state of an individual day in a weekly recurrence.
@param day Day instance
@param value true if this day is included in the recurrence | [
"Set",
"the",
"state",
"of",
"an",
"individual",
"day",
"in",
"a",
"weekly",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L180-L190 |
157,222 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.setWeeklyDaysFromBitmap | public void setWeeklyDaysFromBitmap(Integer days, int[] masks)
{
if (days != null)
{
int value = days.intValue();
for (Day day : Day.values())
{
setWeeklyDay(day, ((value & masks[day.getValue()]) != 0));
}
}
} | java | public void setWeeklyDaysFromBitmap(Integer days, int[] masks)
{
if (days != null)
{
int value = days.intValue();
for (Day day : Day.values())
{
setWeeklyDay(day, ((value & masks[day.getValue()]) != 0));
}
}
} | [
"public",
"void",
"setWeeklyDaysFromBitmap",
"(",
"Integer",
"days",
",",
"int",
"[",
"]",
"masks",
")",
"{",
"if",
"(",
"days",
"!=",
"null",
")",
"{",
"int",
"value",
"=",
"days",
".",
"intValue",
"(",
")",
";",
"for",
"(",
"Day",
"day",
":",
"Da... | Converts from a bitmap to individual day flags for a weekly recurrence,
using the array of masks.
@param days bitmap
@param masks array of mask values | [
"Converts",
"from",
"a",
"bitmap",
"to",
"individual",
"day",
"flags",
"for",
"a",
"weekly",
"recurrence",
"using",
"the",
"array",
"of",
"masks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L199-L209 |
157,223 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getDayOfWeek | public Day getDayOfWeek()
{
Day result = null;
if (!m_days.isEmpty())
{
result = m_days.iterator().next();
}
return result;
} | java | public Day getDayOfWeek()
{
Day result = null;
if (!m_days.isEmpty())
{
result = m_days.iterator().next();
}
return result;
} | [
"public",
"Day",
"getDayOfWeek",
"(",
")",
"{",
"Day",
"result",
"=",
"null",
";",
"if",
"(",
"!",
"m_days",
".",
"isEmpty",
"(",
")",
")",
"{",
"result",
"=",
"m_days",
".",
"iterator",
"(",
")",
".",
"next",
"(",
")",
";",
"}",
"return",
"resul... | Retrieves the monthly or yearly relative day of the week.
@return day of the week | [
"Retrieves",
"the",
"monthly",
"or",
"yearly",
"relative",
"day",
"of",
"the",
"week",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L256-L264 |
157,224 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getDates | public Date[] getDates()
{
int frequency = NumberHelper.getInt(m_frequency);
if (frequency < 1)
{
frequency = 1;
}
Calendar calendar = DateHelper.popCalendar(m_startDate);
List<Date> dates = new ArrayList<Date>();
switch (m_recurrenceType)
{
case DA... | java | public Date[] getDates()
{
int frequency = NumberHelper.getInt(m_frequency);
if (frequency < 1)
{
frequency = 1;
}
Calendar calendar = DateHelper.popCalendar(m_startDate);
List<Date> dates = new ArrayList<Date>();
switch (m_recurrenceType)
{
case DA... | [
"public",
"Date",
"[",
"]",
"getDates",
"(",
")",
"{",
"int",
"frequency",
"=",
"NumberHelper",
".",
"getInt",
"(",
"m_frequency",
")",
";",
"if",
"(",
"frequency",
"<",
"1",
")",
"{",
"frequency",
"=",
"1",
";",
"}",
"Calendar",
"calendar",
"=",
"Da... | Retrieve the set of start dates represented by this recurrence data.
@return array of start dates | [
"Retrieve",
"the",
"set",
"of",
"start",
"dates",
"represented",
"by",
"this",
"recurrence",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L322-L363 |
157,225 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.moreDates | private boolean moreDates(Calendar calendar, List<Date> dates)
{
boolean result;
if (m_finishDate == null)
{
int occurrences = NumberHelper.getInt(m_occurrences);
if (occurrences < 1)
{
occurrences = 1;
}
result = dates.size() < occurrences;
... | java | private boolean moreDates(Calendar calendar, List<Date> dates)
{
boolean result;
if (m_finishDate == null)
{
int occurrences = NumberHelper.getInt(m_occurrences);
if (occurrences < 1)
{
occurrences = 1;
}
result = dates.size() < occurrences;
... | [
"private",
"boolean",
"moreDates",
"(",
"Calendar",
"calendar",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"boolean",
"result",
";",
"if",
"(",
"m_finishDate",
"==",
"null",
")",
"{",
"int",
"occurrences",
"=",
"NumberHelper",
".",
"getInt",
"(",
... | Determines if we need to calculate more dates.
If we do not have a finish date, this method falls back on using the
occurrences attribute. If we have a finish date, we'll use that instead.
We're assuming that the recurring data has one or other of those values.
@param calendar current date
@param dates dates generated... | [
"Determines",
"if",
"we",
"need",
"to",
"calculate",
"more",
"dates",
".",
"If",
"we",
"do",
"not",
"have",
"a",
"finish",
"date",
"this",
"method",
"falls",
"back",
"on",
"using",
"the",
"occurrences",
"attribute",
".",
"If",
"we",
"have",
"a",
"finish"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L375-L392 |
157,226 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getDailyDates | private void getDailyDates(Calendar calendar, int frequency, List<Date> dates)
{
while (moreDates(calendar, dates))
{
dates.add(calendar.getTime());
calendar.add(Calendar.DAY_OF_YEAR, frequency);
}
} | java | private void getDailyDates(Calendar calendar, int frequency, List<Date> dates)
{
while (moreDates(calendar, dates))
{
dates.add(calendar.getTime());
calendar.add(Calendar.DAY_OF_YEAR, frequency);
}
} | [
"private",
"void",
"getDailyDates",
"(",
"Calendar",
"calendar",
",",
"int",
"frequency",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"while",
"(",
"moreDates",
"(",
"calendar",
",",
"dates",
")",
")",
"{",
"dates",
".",
"add",
"(",
"calendar",
"... | Calculate start dates for a daily recurrence.
@param calendar current date
@param frequency frequency
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"daily",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L401-L408 |
157,227 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getWeeklyDates | private void getWeeklyDates(Calendar calendar, int frequency, List<Date> dates)
{
int currentDay = calendar.get(Calendar.DAY_OF_WEEK);
while (moreDates(calendar, dates))
{
int offset = 0;
for (int dayIndex = 0; dayIndex < 7; dayIndex++)
{
if (getWeeklyDay(Day... | java | private void getWeeklyDates(Calendar calendar, int frequency, List<Date> dates)
{
int currentDay = calendar.get(Calendar.DAY_OF_WEEK);
while (moreDates(calendar, dates))
{
int offset = 0;
for (int dayIndex = 0; dayIndex < 7; dayIndex++)
{
if (getWeeklyDay(Day... | [
"private",
"void",
"getWeeklyDates",
"(",
"Calendar",
"calendar",
",",
"int",
"frequency",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"int",
"currentDay",
"=",
"calendar",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_WEEK",
")",
";",
"while",
"(",
"m... | Calculate start dates for a weekly recurrence.
@param calendar current date
@param frequency frequency
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"weekly",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L417-L455 |
157,228 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getMonthlyDates | private void getMonthlyDates(Calendar calendar, int frequency, List<Date> dates)
{
if (m_relative)
{
getMonthlyRelativeDates(calendar, frequency, dates);
}
else
{
getMonthlyAbsoluteDates(calendar, frequency, dates);
}
} | java | private void getMonthlyDates(Calendar calendar, int frequency, List<Date> dates)
{
if (m_relative)
{
getMonthlyRelativeDates(calendar, frequency, dates);
}
else
{
getMonthlyAbsoluteDates(calendar, frequency, dates);
}
} | [
"private",
"void",
"getMonthlyDates",
"(",
"Calendar",
"calendar",
",",
"int",
"frequency",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"if",
"(",
"m_relative",
")",
"{",
"getMonthlyRelativeDates",
"(",
"calendar",
",",
"frequency",
",",
"dates",
")",
... | Calculate start dates for a monthly recurrence.
@param calendar current date
@param frequency frequency
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"monthly",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L464-L474 |
157,229 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getMonthlyRelativeDates | private void getMonthlyRelativeDates(Calendar calendar, int frequency, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
int dayNumber = NumberHelper.getInt(m_dayNumber);
while (moreDates(calendar, dates))
{
if (dayNumber ... | java | private void getMonthlyRelativeDates(Calendar calendar, int frequency, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
int dayNumber = NumberHelper.getInt(m_dayNumber);
while (moreDates(calendar, dates))
{
if (dayNumber ... | [
"private",
"void",
"getMonthlyRelativeDates",
"(",
"Calendar",
"calendar",
",",
"int",
"frequency",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"long",
"startDate",
"=",
"calendar",
".",
"getTimeInMillis",
"(",
")",
";",
"calendar",
".",
"set",
"(",
... | Calculate start dates for a monthly relative recurrence.
@param calendar current date
@param frequency frequency
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"monthly",
"relative",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L483-L511 |
157,230 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getMonthlyAbsoluteDates | private void getMonthlyAbsoluteDates(Calendar calendar, int frequency, List<Date> dates)
{
int currentDayNumber = calendar.get(Calendar.DAY_OF_MONTH);
calendar.set(Calendar.DAY_OF_MONTH, 1);
int requiredDayNumber = NumberHelper.getInt(m_dayNumber);
if (requiredDayNumber < currentDayNumber)
... | java | private void getMonthlyAbsoluteDates(Calendar calendar, int frequency, List<Date> dates)
{
int currentDayNumber = calendar.get(Calendar.DAY_OF_MONTH);
calendar.set(Calendar.DAY_OF_MONTH, 1);
int requiredDayNumber = NumberHelper.getInt(m_dayNumber);
if (requiredDayNumber < currentDayNumber)
... | [
"private",
"void",
"getMonthlyAbsoluteDates",
"(",
"Calendar",
"calendar",
",",
"int",
"frequency",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"int",
"currentDayNumber",
"=",
"calendar",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
")",
";",
"cal... | Calculate start dates for a monthly absolute recurrence.
@param calendar current date
@param frequency frequency
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"monthly",
"absolute",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L520-L543 |
157,231 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getYearlyDates | private void getYearlyDates(Calendar calendar, List<Date> dates)
{
if (m_relative)
{
getYearlyRelativeDates(calendar, dates);
}
else
{
getYearlyAbsoluteDates(calendar, dates);
}
} | java | private void getYearlyDates(Calendar calendar, List<Date> dates)
{
if (m_relative)
{
getYearlyRelativeDates(calendar, dates);
}
else
{
getYearlyAbsoluteDates(calendar, dates);
}
} | [
"private",
"void",
"getYearlyDates",
"(",
"Calendar",
"calendar",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"if",
"(",
"m_relative",
")",
"{",
"getYearlyRelativeDates",
"(",
"calendar",
",",
"dates",
")",
";",
"}",
"else",
"{",
"getYearlyAbsoluteDate... | Calculate start dates for a yearly recurrence.
@param calendar current date
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"yearly",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L551-L561 |
157,232 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getYearlyRelativeDates | private void getYearlyRelativeDates(Calendar calendar, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, NumberHelper.getInt(m_monthNumber) - 1);
int dayNumber = NumberHelper.getInt(m_dayNumber);
while ... | java | private void getYearlyRelativeDates(Calendar calendar, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, NumberHelper.getInt(m_monthNumber) - 1);
int dayNumber = NumberHelper.getInt(m_dayNumber);
while ... | [
"private",
"void",
"getYearlyRelativeDates",
"(",
"Calendar",
"calendar",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"long",
"startDate",
"=",
"calendar",
".",
"getTimeInMillis",
"(",
")",
";",
"calendar",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MON... | Calculate start dates for a yearly relative recurrence.
@param calendar current date
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"yearly",
"relative",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L569-L598 |
157,233 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getYearlyAbsoluteDates | private void getYearlyAbsoluteDates(Calendar calendar, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, NumberHelper.getInt(m_monthNumber) - 1);
int requiredDayNumber = NumberHelper.getInt(m_dayNumber);
... | java | private void getYearlyAbsoluteDates(Calendar calendar, List<Date> dates)
{
long startDate = calendar.getTimeInMillis();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, NumberHelper.getInt(m_monthNumber) - 1);
int requiredDayNumber = NumberHelper.getInt(m_dayNumber);
... | [
"private",
"void",
"getYearlyAbsoluteDates",
"(",
"Calendar",
"calendar",
",",
"List",
"<",
"Date",
">",
"dates",
")",
"{",
"long",
"startDate",
"=",
"calendar",
".",
"getTimeInMillis",
"(",
")",
";",
"calendar",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MON... | Calculate start dates for a yearly absolute recurrence.
@param calendar current date
@param dates array of start dates | [
"Calculate",
"start",
"dates",
"for",
"a",
"yearly",
"absolute",
"recurrence",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L606-L632 |
157,234 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.setCalendarToOrdinalRelativeDay | private void setCalendarToOrdinalRelativeDay(Calendar calendar, int dayNumber)
{
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
if (requiredDayOfWeek > currentDayOfWeek)
{
dayOfWeekOffset = ... | java | private void setCalendarToOrdinalRelativeDay(Calendar calendar, int dayNumber)
{
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
if (requiredDayOfWeek > currentDayOfWeek)
{
dayOfWeekOffset = ... | [
"private",
"void",
"setCalendarToOrdinalRelativeDay",
"(",
"Calendar",
"calendar",
",",
"int",
"dayNumber",
")",
"{",
"int",
"currentDayOfWeek",
"=",
"calendar",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_WEEK",
")",
";",
"int",
"requiredDayOfWeek",
"=",
"getDayOfW... | Moves a calendar to the nth named day of the month.
@param calendar current date
@param dayNumber nth day | [
"Moves",
"a",
"calendar",
"to",
"the",
"nth",
"named",
"day",
"of",
"the",
"month",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L640-L666 |
157,235 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.setCalendarToLastRelativeDay | private void setCalendarToLastRelativeDay(Calendar calendar)
{
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
i... | java | private void setCalendarToLastRelativeDay(Calendar calendar)
{
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
int requiredDayOfWeek = getDayOfWeek().getValue();
int dayOfWeekOffset = 0;
i... | [
"private",
"void",
"setCalendarToLastRelativeDay",
"(",
"Calendar",
"calendar",
")",
"{",
"calendar",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"calendar",
".",
"getActualMaximum",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
")",
")",
";",
"int",
"current... | Moves a calendar to the last named day of the month.
@param calendar current date | [
"Moves",
"a",
"calendar",
"to",
"the",
"last",
"named",
"day",
"of",
"the",
"month",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L673-L696 |
157,236 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.setYearlyAbsoluteFromDate | public void setYearlyAbsoluteFromDate(Date date)
{
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
m_dayNumber = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
m_monthNumber = Integer.valueOf(cal.get(Calendar.MONTH) + 1);
DateHelper.pushCalendar(cal)... | java | public void setYearlyAbsoluteFromDate(Date date)
{
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
m_dayNumber = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
m_monthNumber = Integer.valueOf(cal.get(Calendar.MONTH) + 1);
DateHelper.pushCalendar(cal)... | [
"public",
"void",
"setYearlyAbsoluteFromDate",
"(",
"Date",
"date",
")",
"{",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"date",
")",
";",
"m_dayNumber",
"=",
"Integer",
".",
"valueOf",
"(",
... | Sets the yearly absolute date.
@param date yearly absolute date | [
"Sets",
"the",
"yearly",
"absolute",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L703-L712 |
157,237 | joniles/mpxj | src/main/java/net/sf/mpxj/RecurringData.java | RecurringData.getOrdinal | private String getOrdinal(Integer value)
{
String result;
int index = value.intValue();
if (index >= ORDINAL.length)
{
result = "every " + index + "th";
}
else
{
result = ORDINAL[index];
}
return result;
} | java | private String getOrdinal(Integer value)
{
String result;
int index = value.intValue();
if (index >= ORDINAL.length)
{
result = "every " + index + "th";
}
else
{
result = ORDINAL[index];
}
return result;
} | [
"private",
"String",
"getOrdinal",
"(",
"Integer",
"value",
")",
"{",
"String",
"result",
";",
"int",
"index",
"=",
"value",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"index",
">=",
"ORDINAL",
".",
"length",
")",
"{",
"result",
"=",
"\"every \"",
"+",... | Retrieve the ordinal text for a given integer.
@param value integer value
@return ordinal text | [
"Retrieve",
"the",
"ordinal",
"text",
"for",
"a",
"given",
"integer",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/RecurringData.java#L720-L733 |
157,238 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/PriorityUtility.java | PriorityUtility.getInstance | public static Priority getInstance(Locale locale, String priority)
{
int index = DEFAULT_PRIORITY_INDEX;
if (priority != null)
{
String[] priorityTypes = LocaleData.getStringArray(locale, LocaleData.PRIORITY_TYPES);
for (int loop = 0; loop < priorityTypes.length; loop++)
... | java | public static Priority getInstance(Locale locale, String priority)
{
int index = DEFAULT_PRIORITY_INDEX;
if (priority != null)
{
String[] priorityTypes = LocaleData.getStringArray(locale, LocaleData.PRIORITY_TYPES);
for (int loop = 0; loop < priorityTypes.length; loop++)
... | [
"public",
"static",
"Priority",
"getInstance",
"(",
"Locale",
"locale",
",",
"String",
"priority",
")",
"{",
"int",
"index",
"=",
"DEFAULT_PRIORITY_INDEX",
";",
"if",
"(",
"priority",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"priorityTypes",
"=",
"LocaleD... | This method takes the textual version of a priority
and returns an appropriate instance of this class. Note that unrecognised
values are treated as medium priority.
@param locale target locale
@param priority text version of the priority
@return Priority class instance | [
"This",
"method",
"takes",
"the",
"textual",
"version",
"of",
"a",
"priority",
"and",
"returns",
"an",
"appropriate",
"instance",
"of",
"this",
"class",
".",
"Note",
"that",
"unrecognised",
"values",
"are",
"treated",
"as",
"medium",
"priority",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/PriorityUtility.java#L53-L71 |
157,239 | joniles/mpxj | src/main/java/net/sf/mpxj/Duration.java | Duration.add | public static Duration add(Duration a, Duration b, ProjectProperties defaults)
{
if (a == null && b == null)
{
return null;
}
if (a == null)
{
return b;
}
if (b == null)
{
return a;
}
TimeUnit unit = a.getUnits();
if (b.getU... | java | public static Duration add(Duration a, Duration b, ProjectProperties defaults)
{
if (a == null && b == null)
{
return null;
}
if (a == null)
{
return b;
}
if (b == null)
{
return a;
}
TimeUnit unit = a.getUnits();
if (b.getU... | [
"public",
"static",
"Duration",
"add",
"(",
"Duration",
"a",
",",
"Duration",
"b",
",",
"ProjectProperties",
"defaults",
")",
"{",
"if",
"(",
"a",
"==",
"null",
"&&",
"b",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"a",
"==",
"n... | If a and b are not null, returns a new duration of a + b.
If a is null and b is not null, returns b.
If a is not null and b is null, returns a.
If a and b are null, returns null.
If needed, b is converted to a's time unit using the project properties.
@param a first duration
@param b second duration
@param defaults pr... | [
"If",
"a",
"and",
"b",
"are",
"not",
"null",
"returns",
"a",
"new",
"duration",
"of",
"a",
"+",
"b",
".",
"If",
"a",
"is",
"null",
"and",
"b",
"is",
"not",
"null",
"returns",
"b",
".",
"If",
"a",
"is",
"not",
"null",
"and",
"b",
"is",
"null",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Duration.java#L405-L426 |
157,240 | joniles/mpxj | src/main/java/net/sf/mpxj/reader/ProjectReaderUtility.java | ProjectReaderUtility.getProjectReader | public static ProjectReader getProjectReader(String name) throws MPXJException
{
int index = name.lastIndexOf('.');
if (index == -1)
{
throw new IllegalArgumentException("Filename has no extension: " + name);
}
String extension = name.substring(index + 1).toUpperCase();
... | java | public static ProjectReader getProjectReader(String name) throws MPXJException
{
int index = name.lastIndexOf('.');
if (index == -1)
{
throw new IllegalArgumentException("Filename has no extension: " + name);
}
String extension = name.substring(index + 1).toUpperCase();
... | [
"public",
"static",
"ProjectReader",
"getProjectReader",
"(",
"String",
"name",
")",
"throws",
"MPXJException",
"{",
"int",
"index",
"=",
"name",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"throw",
"new",
... | Retrieves a ProjectReader instance which can read a file of the
type specified by the supplied file name.
@param name file name
@return ProjectReader instance | [
"Retrieves",
"a",
"ProjectReader",
"instance",
"which",
"can",
"read",
"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/reader/ProjectReaderUtility.java#L66-L92 |
157,241 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.processCalendars | private void processCalendars() throws SQLException
{
for (ResultSetRow row : getRows("SELECT * FROM MSP_CALENDARS WHERE PROJ_ID=?", m_projectID))
{
processCalendar(row);
}
updateBaseCalendarNames();
processCalendarData(m_project.getCalendars());
} | java | private void processCalendars() throws SQLException
{
for (ResultSetRow row : getRows("SELECT * FROM MSP_CALENDARS WHERE PROJ_ID=?", m_projectID))
{
processCalendar(row);
}
updateBaseCalendarNames();
processCalendarData(m_project.getCalendars());
} | [
"private",
"void",
"processCalendars",
"(",
")",
"throws",
"SQLException",
"{",
"for",
"(",
"ResultSetRow",
"row",
":",
"getRows",
"(",
"\"SELECT * FROM MSP_CALENDARS WHERE PROJ_ID=?\"",
",",
"m_projectID",
")",
")",
"{",
"processCalendar",
"(",
"row",
")",
";",
"... | Select calendar data from the database.
@throws SQLException | [
"Select",
"calendar",
"data",
"from",
"the",
"database",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L187-L197 |
157,242 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.processCalendarData | private void processCalendarData(List<ProjectCalendar> calendars) throws SQLException
{
for (ProjectCalendar calendar : calendars)
{
processCalendarData(calendar, getRows("SELECT * FROM MSP_CALENDAR_DATA WHERE PROJ_ID=? AND CAL_UID=?", m_projectID, calendar.getUniqueID()));
}
} | java | private void processCalendarData(List<ProjectCalendar> calendars) throws SQLException
{
for (ProjectCalendar calendar : calendars)
{
processCalendarData(calendar, getRows("SELECT * FROM MSP_CALENDAR_DATA WHERE PROJ_ID=? AND CAL_UID=?", m_projectID, calendar.getUniqueID()));
}
} | [
"private",
"void",
"processCalendarData",
"(",
"List",
"<",
"ProjectCalendar",
">",
"calendars",
")",
"throws",
"SQLException",
"{",
"for",
"(",
"ProjectCalendar",
"calendar",
":",
"calendars",
")",
"{",
"processCalendarData",
"(",
"calendar",
",",
"getRows",
"(",... | Process calendar hours and exception data from the database.
@param calendars all calendars for the project | [
"Process",
"calendar",
"hours",
"and",
"exception",
"data",
"from",
"the",
"database",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L204-L210 |
157,243 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.processCalendarData | private void processCalendarData(ProjectCalendar calendar, List<ResultSetRow> calendarData)
{
for (ResultSetRow row : calendarData)
{
processCalendarData(calendar, row);
}
} | java | private void processCalendarData(ProjectCalendar calendar, List<ResultSetRow> calendarData)
{
for (ResultSetRow row : calendarData)
{
processCalendarData(calendar, row);
}
} | [
"private",
"void",
"processCalendarData",
"(",
"ProjectCalendar",
"calendar",
",",
"List",
"<",
"ResultSetRow",
">",
"calendarData",
")",
"{",
"for",
"(",
"ResultSetRow",
"row",
":",
"calendarData",
")",
"{",
"processCalendarData",
"(",
"calendar",
",",
"row",
"... | Process the hours and exceptions for an individual calendar.
@param calendar project calendar
@param calendarData hours and exception rows for this calendar | [
"Process",
"the",
"hours",
"and",
"exceptions",
"for",
"an",
"individual",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L218-L224 |
157,244 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.processSubProjects | private void processSubProjects()
{
int subprojectIndex = 1;
for (Task task : m_project.getTasks())
{
String subProjectFileName = task.getSubprojectName();
if (subProjectFileName != null)
{
String fileName = subProjectFileName;
int offset = 0x01000... | java | private void processSubProjects()
{
int subprojectIndex = 1;
for (Task task : m_project.getTasks())
{
String subProjectFileName = task.getSubprojectName();
if (subProjectFileName != null)
{
String fileName = subProjectFileName;
int offset = 0x01000... | [
"private",
"void",
"processSubProjects",
"(",
")",
"{",
"int",
"subprojectIndex",
"=",
"1",
";",
"for",
"(",
"Task",
"task",
":",
"m_project",
".",
"getTasks",
"(",
")",
")",
"{",
"String",
"subProjectFileName",
"=",
"task",
".",
"getSubprojectName",
"(",
... | The only indication that a task is a SubProject is the contents
of the subproject file name field. We test these here then add a skeleton
subproject structure to match the way we do things with MPP files. | [
"The",
"only",
"indication",
"that",
"a",
"task",
"is",
"a",
"SubProject",
"is",
"the",
"contents",
"of",
"the",
"subproject",
"file",
"name",
"field",
".",
"We",
"test",
"these",
"here",
"then",
"add",
"a",
"skeleton",
"subproject",
"structure",
"to",
"ma... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L346-L372 |
157,245 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.processOutlineCodeFields | private void processOutlineCodeFields(Row parentRow) throws SQLException
{
Integer entityID = parentRow.getInteger("CODE_REF_UID");
Integer outlineCodeEntityID = parentRow.getInteger("CODE_UID");
for (ResultSetRow row : getRows("SELECT * FROM MSP_OUTLINE_CODES WHERE CODE_UID=?", outlineCodeEntityI... | java | private void processOutlineCodeFields(Row parentRow) throws SQLException
{
Integer entityID = parentRow.getInteger("CODE_REF_UID");
Integer outlineCodeEntityID = parentRow.getInteger("CODE_UID");
for (ResultSetRow row : getRows("SELECT * FROM MSP_OUTLINE_CODES WHERE CODE_UID=?", outlineCodeEntityI... | [
"private",
"void",
"processOutlineCodeFields",
"(",
"Row",
"parentRow",
")",
"throws",
"SQLException",
"{",
"Integer",
"entityID",
"=",
"parentRow",
".",
"getInteger",
"(",
"\"CODE_REF_UID\"",
")",
";",
"Integer",
"outlineCodeEntityID",
"=",
"parentRow",
".",
"getIn... | Process a single outline code.
@param parentRow outline code to task mapping table
@throws SQLException | [
"Process",
"a",
"single",
"outline",
"code",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L458-L467 |
157,246 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.allocateConnection | private void allocateConnection() throws SQLException
{
if (m_connection == null)
{
m_connection = m_dataSource.getConnection();
m_allocatedConnection = true;
queryDatabaseMetaData();
}
} | java | private void allocateConnection() throws SQLException
{
if (m_connection == null)
{
m_connection = m_dataSource.getConnection();
m_allocatedConnection = true;
queryDatabaseMetaData();
}
} | [
"private",
"void",
"allocateConnection",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"m_connection",
"==",
"null",
")",
"{",
"m_connection",
"=",
"m_dataSource",
".",
"getConnection",
"(",
")",
";",
"m_allocatedConnection",
"=",
"true",
";",
"queryDataba... | Allocates a database connection.
@throws SQLException | [
"Allocates",
"a",
"database",
"connection",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L578-L586 |
157,247 | joniles/mpxj | src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java | MPD9DatabaseReader.queryDatabaseMetaData | private void queryDatabaseMetaData()
{
ResultSet rs = null;
try
{
Set<String> tables = new HashSet<String>();
DatabaseMetaData dmd = m_connection.getMetaData();
rs = dmd.getTables(null, null, null, null);
while (rs.next())
{
tables.add(rs.ge... | java | private void queryDatabaseMetaData()
{
ResultSet rs = null;
try
{
Set<String> tables = new HashSet<String>();
DatabaseMetaData dmd = m_connection.getMetaData();
rs = dmd.getTables(null, null, null, null);
while (rs.next())
{
tables.add(rs.ge... | [
"private",
"void",
"queryDatabaseMetaData",
"(",
")",
"{",
"ResultSet",
"rs",
"=",
"null",
";",
"try",
"{",
"Set",
"<",
"String",
">",
"tables",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"DatabaseMetaData",
"dmd",
"=",
"m_connection",
"."... | Queries database meta data to check for the existence of
specific tables. | [
"Queries",
"database",
"meta",
"data",
"to",
"check",
"for",
"the",
"existence",
"of",
"specific",
"tables",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9DatabaseReader.java#L669-L709 |
157,248 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java | DatatypeConverter.parseUUID | public static final UUID parseUUID(String value)
{
UUID result = null;
if (value != null && !value.isEmpty())
{
if (value.charAt(0) == '{')
{
// PMXML representation: <GUID>{0AB9133E-A09A-9648-B98A-B2384894AC44}</GUID>
result = UUID.fromString(value.substri... | java | public static final UUID parseUUID(String value)
{
UUID result = null;
if (value != null && !value.isEmpty())
{
if (value.charAt(0) == '{')
{
// PMXML representation: <GUID>{0AB9133E-A09A-9648-B98A-B2384894AC44}</GUID>
result = UUID.fromString(value.substri... | [
"public",
"static",
"final",
"UUID",
"parseUUID",
"(",
"String",
"value",
")",
"{",
"UUID",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"!",
"value",
".",
"isEmpty",
"(",
")",
")",
"{",
"if",
"(",
"value",
".",
"charAt",
"("... | Convert the Primavera string representation of a UUID into a Java UUID instance.
@param value Primavera UUID
@return Java UUID instance | [
"Convert",
"the",
"Primavera",
"string",
"representation",
"of",
"a",
"UUID",
"into",
"a",
"Java",
"UUID",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java#L44-L75 |
157,249 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java | DatatypeConverter.printUUID | public static String printUUID(UUID guid)
{
return guid == null ? null : "{" + guid.toString().toUpperCase() + "}";
} | java | public static String printUUID(UUID guid)
{
return guid == null ? null : "{" + guid.toString().toUpperCase() + "}";
} | [
"public",
"static",
"String",
"printUUID",
"(",
"UUID",
"guid",
")",
"{",
"return",
"guid",
"==",
"null",
"?",
"null",
":",
"\"{\"",
"+",
"guid",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"(",
")",
"+",
"\"}\"",
";",
"}"
] | Retrieve a UUID in the form required by Primavera PMXML.
@param guid UUID instance
@return formatted UUID | [
"Retrieve",
"a",
"UUID",
"in",
"the",
"form",
"required",
"by",
"Primavera",
"PMXML",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java#L83-L86 |
157,250 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java | DatatypeConverter.printTime | public static final String printTime(Date value)
{
return (value == null ? null : TIME_FORMAT.get().format(value));
} | java | public static final String printTime(Date value)
{
return (value == null ? null : TIME_FORMAT.get().format(value));
} | [
"public",
"static",
"final",
"String",
"printTime",
"(",
"Date",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"TIME_FORMAT",
".",
"get",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
";",
"}"
] | Print a time value.
@param value time value
@return time value | [
"Print",
"a",
"time",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/DatatypeConverter.java#L131-L134 |
157,251 | 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 |
157,252 | 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 |
157,253 | 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 |
157,254 | 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 |
157,255 | 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 |
157,256 | 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 |
157,257 | 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 |
157,258 | 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 |
157,259 | 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 |
157,260 | 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 |
157,261 | 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 |
157,262 | 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 |
157,263 | 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 |
157,264 | 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 |
157,265 | 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 |
157,266 | 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 |
157,267 | 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 |
157,268 | 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 |
157,269 | 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 |
157,270 | 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 |
157,271 | 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 |
157,272 | 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 |
157,273 | 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 |
157,274 | 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 |
157,275 | 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 |
157,276 | 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 |
157,277 | 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 |
157,278 | 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 |
157,279 | 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 |
157,280 | 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 |
157,281 | 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 |
157,282 | 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 |
157,283 | 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 |
157,284 | 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 |
157,285 | 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 |
157,286 | 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 |
157,287 | 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 |
157,288 | 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 |
157,289 | 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 |
157,290 | 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 |
157,291 | 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 |
157,292 | 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 |
157,293 | 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 |
157,294 | 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 |
157,295 | 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 |
157,296 | 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 |
157,297 | 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 |
157,298 | 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 |
157,299 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.