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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
156,800 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.setProjectNameAndRead | public static final ProjectFile setProjectNameAndRead(File directory) throws MPXJException
{
List<String> projects = listProjectNames(directory);
if (!projects.isEmpty())
{
P3DatabaseReader reader = new P3DatabaseReader();
reader.setProjectName(projects.get(0));
return r... | java | public static final ProjectFile setProjectNameAndRead(File directory) throws MPXJException
{
List<String> projects = listProjectNames(directory);
if (!projects.isEmpty())
{
P3DatabaseReader reader = new P3DatabaseReader();
reader.setProjectName(projects.get(0));
return r... | [
"public",
"static",
"final",
"ProjectFile",
"setProjectNameAndRead",
"(",
"File",
"directory",
")",
"throws",
"MPXJException",
"{",
"List",
"<",
"String",
">",
"projects",
"=",
"listProjectNames",
"(",
"directory",
")",
";",
"if",
"(",
"!",
"projects",
".",
"i... | Convenience method which locates the first P3 database in a directory
and opens it.
@param directory directory containing a P3 database
@return ProjectFile instance | [
"Convenience",
"method",
"which",
"locates",
"the",
"first",
"P3",
"database",
"in",
"a",
"directory",
"and",
"opens",
"it",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L87-L99 |
156,801 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.listProjectNames | public static final List<String> listProjectNames(File directory)
{
List<String> result = new ArrayList<String>();
File[] files = directory.listFiles(new FilenameFilter()
{
@Override public boolean accept(File dir, String name)
{
return name.toUpperCase().endsWith("ST... | java | public static final List<String> listProjectNames(File directory)
{
List<String> result = new ArrayList<String>();
File[] files = directory.listFiles(new FilenameFilter()
{
@Override public boolean accept(File dir, String name)
{
return name.toUpperCase().endsWith("ST... | [
"public",
"static",
"final",
"List",
"<",
"String",
">",
"listProjectNames",
"(",
"File",
"directory",
")",
"{",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"File",
"[",
"]",
"files",
"=",
"director... | Retrieve a list of the available P3 project names from a directory.
@param directory directory containing P3 files
@return list of project names | [
"Retrieve",
"a",
"list",
"of",
"the",
"available",
"P3",
"project",
"names",
"from",
"a",
"directory",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L118-L143 |
156,802 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.readProjectHeader | private void readProjectHeader()
{
Table table = m_tables.get("DIR");
MapRow row = table.find("");
if (row != null)
{
setFields(PROJECT_FIELDS, row, m_projectFile.getProjectProperties());
m_wbsFormat = new P3WbsFormat(row);
}
} | java | private void readProjectHeader()
{
Table table = m_tables.get("DIR");
MapRow row = table.find("");
if (row != null)
{
setFields(PROJECT_FIELDS, row, m_projectFile.getProjectProperties());
m_wbsFormat = new P3WbsFormat(row);
}
} | [
"private",
"void",
"readProjectHeader",
"(",
")",
"{",
"Table",
"table",
"=",
"m_tables",
".",
"get",
"(",
"\"DIR\"",
")",
";",
"MapRow",
"row",
"=",
"table",
".",
"find",
"(",
"\"\"",
")",
";",
"if",
"(",
"row",
"!=",
"null",
")",
"{",
"setFields",
... | Read general project properties. | [
"Read",
"general",
"project",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L253-L262 |
156,803 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.readWBS | private void readWBS()
{
Map<Integer, List<MapRow>> levelMap = new HashMap<Integer, List<MapRow>>();
for (MapRow row : m_tables.get("STR"))
{
Integer level = row.getInteger("LEVEL_NUMBER");
List<MapRow> items = levelMap.get(level);
if (items == null)
{
... | java | private void readWBS()
{
Map<Integer, List<MapRow>> levelMap = new HashMap<Integer, List<MapRow>>();
for (MapRow row : m_tables.get("STR"))
{
Integer level = row.getInteger("LEVEL_NUMBER");
List<MapRow> items = levelMap.get(level);
if (items == null)
{
... | [
"private",
"void",
"readWBS",
"(",
")",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"MapRow",
">",
">",
"levelMap",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
"List",
"<",
"MapRow",
">",
">",
"(",
")",
";",
"for",
"(",
"MapRow",
"row",
":",
"m... | Read tasks representing the WBS. | [
"Read",
"tasks",
"representing",
"the",
"WBS",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L298-L364 |
156,804 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.readRelationships | private void readRelationships()
{
for (MapRow row : m_tables.get("REL"))
{
Task predecessor = m_activityMap.get(row.getString("PREDECESSOR_ACTIVITY_ID"));
Task successor = m_activityMap.get(row.getString("SUCCESSOR_ACTIVITY_ID"));
if (predecessor != null && successor != null)
... | java | private void readRelationships()
{
for (MapRow row : m_tables.get("REL"))
{
Task predecessor = m_activityMap.get(row.getString("PREDECESSOR_ACTIVITY_ID"));
Task successor = m_activityMap.get(row.getString("SUCCESSOR_ACTIVITY_ID"));
if (predecessor != null && successor != null)
... | [
"private",
"void",
"readRelationships",
"(",
")",
"{",
"for",
"(",
"MapRow",
"row",
":",
"m_tables",
".",
"get",
"(",
"\"REL\"",
")",
")",
"{",
"Task",
"predecessor",
"=",
"m_activityMap",
".",
"get",
"(",
"row",
".",
"getString",
"(",
"\"PREDECESSOR_ACTIV... | Read task relationships. | [
"Read",
"task",
"relationships",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L480-L494 |
156,805 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.setFields | private void setFields(Map<String, FieldType> map, MapRow row, FieldContainer container)
{
if (row != null)
{
for (Map.Entry<String, FieldType> entry : map.entrySet())
{
container.set(entry.getValue(), row.getObject(entry.getKey()));
}
}
} | java | private void setFields(Map<String, FieldType> map, MapRow row, FieldContainer container)
{
if (row != null)
{
for (Map.Entry<String, FieldType> entry : map.entrySet())
{
container.set(entry.getValue(), row.getObject(entry.getKey()));
}
}
} | [
"private",
"void",
"setFields",
"(",
"Map",
"<",
"String",
",",
"FieldType",
">",
"map",
",",
"MapRow",
"row",
",",
"FieldContainer",
"container",
")",
"{",
"if",
"(",
"row",
"!=",
"null",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
","... | Set the value of one or more fields based on the contents of a database row.
@param map column to field map
@param row database row
@param container field container | [
"Set",
"the",
"value",
"of",
"one",
"or",
"more",
"fields",
"based",
"on",
"the",
"contents",
"of",
"a",
"database",
"row",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L587-L596 |
156,806 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java | P3DatabaseReader.defineField | private static void defineField(Map<String, FieldType> container, String name, FieldType type)
{
defineField(container, name, type, null);
} | java | private static void defineField(Map<String, FieldType> container, String name, FieldType type)
{
defineField(container, name, type, null);
} | [
"private",
"static",
"void",
"defineField",
"(",
"Map",
"<",
"String",
",",
"FieldType",
">",
"container",
",",
"String",
"name",
",",
"FieldType",
"type",
")",
"{",
"defineField",
"(",
"container",
",",
"name",
",",
"type",
",",
"null",
")",
";",
"}"
] | Configure the mapping between a database column and a field.
@param container column to field map
@param name column name
@param type field type | [
"Configure",
"the",
"mapping",
"between",
"a",
"database",
"column",
"and",
"a",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/P3DatabaseReader.java#L605-L608 |
156,807 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MppDump.java | MppDump.dumpTree | private static void dumpTree(PrintWriter pw, DirectoryEntry dir, String prefix, boolean showData, boolean hex, String indent) throws Exception
{
long byteCount;
for (Iterator<Entry> iter = dir.getEntries(); iter.hasNext();)
{
Entry entry = iter.next();
if (entry instanceof Direct... | java | private static void dumpTree(PrintWriter pw, DirectoryEntry dir, String prefix, boolean showData, boolean hex, String indent) throws Exception
{
long byteCount;
for (Iterator<Entry> iter = dir.getEntries(); iter.hasNext();)
{
Entry entry = iter.next();
if (entry instanceof Direct... | [
"private",
"static",
"void",
"dumpTree",
"(",
"PrintWriter",
"pw",
",",
"DirectoryEntry",
"dir",
",",
"String",
"prefix",
",",
"boolean",
"showData",
",",
"boolean",
"hex",
",",
"String",
"indent",
")",
"throws",
"Exception",
"{",
"long",
"byteCount",
";",
"... | This method recursively descends the directory structure, dumping
details of any files it finds to the output file.
@param pw Output PrintWriter
@param dir DirectoryEntry to dump
@param prefix prefix used to identify path to this object
@param showData flag indicating if data is dumped, or just structure
@param hex se... | [
"This",
"method",
"recursively",
"descends",
"the",
"directory",
"structure",
"dumping",
"details",
"of",
"any",
"files",
"it",
"finds",
"to",
"the",
"output",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MppDump.java#L109-L159 |
156,808 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MppDump.java | MppDump.hexdump | private static long hexdump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
if... | java | private static long hexdump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
if... | [
"private",
"static",
"long",
"hexdump",
"(",
"InputStream",
"is",
",",
"PrintWriter",
"pw",
")",
"throws",
"Exception",
"{",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"BUFFER_SIZE",
"]",
";",
"long",
"byteCount",
"=",
"0",
";",
"char",
"c",
... | This method dumps the entire contents of a file to an output
print writer as hex and ASCII data.
@param is Input Stream
@param pw Output PrintWriter
@return number of bytes read
@throws Exception Thrown on file read errors | [
"This",
"method",
"dumps",
"the",
"entire",
"contents",
"of",
"a",
"file",
"to",
"an",
"output",
"print",
"writer",
"as",
"hex",
"and",
"ASCII",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MppDump.java#L170-L222 |
156,809 | joniles/mpxj | src/main/java/net/sf/mpxj/sample/MppDump.java | MppDump.asciidump | private static long asciidump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
... | java | private static long asciidump(InputStream is, PrintWriter pw) throws Exception
{
byte[] buffer = new byte[BUFFER_SIZE];
long byteCount = 0;
char c;
int loop;
int count;
StringBuilder sb = new StringBuilder();
while (true)
{
count = is.read(buffer);
... | [
"private",
"static",
"long",
"asciidump",
"(",
"InputStream",
"is",
",",
"PrintWriter",
"pw",
")",
"throws",
"Exception",
"{",
"byte",
"[",
"]",
"buffer",
"=",
"new",
"byte",
"[",
"BUFFER_SIZE",
"]",
";",
"long",
"byteCount",
"=",
"0",
";",
"char",
"c",
... | This method dumps the entire contents of a file to an output
print writer as ascii data.
@param is Input Stream
@param pw Output PrintWriter
@return number of bytes read
@throws Exception Thrown on file read errors | [
"This",
"method",
"dumps",
"the",
"entire",
"contents",
"of",
"a",
"file",
"to",
"an",
"output",
"print",
"writer",
"as",
"ascii",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MppDump.java#L233-L269 |
156,810 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPTimephasedBaselineCostNormaliser.java | MPPTimephasedBaselineCostNormaliser.mergeSameCost | protected void mergeSameCost(LinkedList<TimephasedCost> list)
{
LinkedList<TimephasedCost> result = new LinkedList<TimephasedCost>();
TimephasedCost previousAssignment = null;
for (TimephasedCost assignment : list)
{
if (previousAssignment == null)
{
assignment.... | java | protected void mergeSameCost(LinkedList<TimephasedCost> list)
{
LinkedList<TimephasedCost> result = new LinkedList<TimephasedCost>();
TimephasedCost previousAssignment = null;
for (TimephasedCost assignment : list)
{
if (previousAssignment == null)
{
assignment.... | [
"protected",
"void",
"mergeSameCost",
"(",
"LinkedList",
"<",
"TimephasedCost",
">",
"list",
")",
"{",
"LinkedList",
"<",
"TimephasedCost",
">",
"result",
"=",
"new",
"LinkedList",
"<",
"TimephasedCost",
">",
"(",
")",
";",
"TimephasedCost",
"previousAssignment",
... | This method merges together assignment data for the same cost.
@param list assignment data | [
"This",
"method",
"merges",
"together",
"assignment",
"data",
"for",
"the",
"same",
"cost",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPTimephasedBaselineCostNormaliser.java#L245-L290 |
156,811 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFWriter.java | SDEFWriter.write | @Override public void write(ProjectFile projectFile, OutputStream out) throws IOException
{
m_projectFile = projectFile;
m_eventManager = projectFile.getEventManager();
m_writer = new PrintStream(out); // the print stream class is the easiest way to create a text file
m_buffer = new StringBu... | java | @Override public void write(ProjectFile projectFile, OutputStream out) throws IOException
{
m_projectFile = projectFile;
m_eventManager = projectFile.getEventManager();
m_writer = new PrintStream(out); // the print stream class is the easiest way to create a text file
m_buffer = new StringBu... | [
"@",
"Override",
"public",
"void",
"write",
"(",
"ProjectFile",
"projectFile",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"m_projectFile",
"=",
"projectFile",
";",
"m_eventManager",
"=",
"projectFile",
".",
"getEventManager",
"(",
")",
";",
"... | Write a project file in SDEF format to an output stream.
@param projectFile ProjectFile instance
@param out output stream | [
"Write",
"a",
"project",
"file",
"in",
"SDEF",
"format",
"to",
"an",
"output",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L80-L105 |
156,812 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFWriter.java | SDEFWriter.writeProjectProperties | private void writeProjectProperties(ProjectProperties record) throws IOException
{
// the ProjectProperties class from MPXJ has the details of how many days per week etc....
// so I've assigned these variables in here, but actually use them in other methods
// see the write task method, that's wher... | java | private void writeProjectProperties(ProjectProperties record) throws IOException
{
// the ProjectProperties class from MPXJ has the details of how many days per week etc....
// so I've assigned these variables in here, but actually use them in other methods
// see the write task method, that's wher... | [
"private",
"void",
"writeProjectProperties",
"(",
"ProjectProperties",
"record",
")",
"throws",
"IOException",
"{",
"// the ProjectProperties class from MPXJ has the details of how many days per week etc....",
"// so I've assigned these variables in here, but actually use them in other methods... | Write project properties.
@param record project properties
@throws IOException | [
"Write",
"project",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L143-L164 |
156,813 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFWriter.java | SDEFWriter.writeCalendars | private void writeCalendars(List<ProjectCalendar> records)
{
//
// Write project calendars
//
for (ProjectCalendar record : records)
{
m_buffer.setLength(0);
m_buffer.append("CLDR ");
m_buffer.append(SDEFmethods.lset(record.getUniqueID().toString(), 2)); // 2... | java | private void writeCalendars(List<ProjectCalendar> records)
{
//
// Write project calendars
//
for (ProjectCalendar record : records)
{
m_buffer.setLength(0);
m_buffer.append("CLDR ");
m_buffer.append(SDEFmethods.lset(record.getUniqueID().toString(), 2)); // 2... | [
"private",
"void",
"writeCalendars",
"(",
"List",
"<",
"ProjectCalendar",
">",
"records",
")",
"{",
"//",
"// Write project calendars",
"//",
"for",
"(",
"ProjectCalendar",
"record",
":",
"records",
")",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
... | This will create a line in the SDEF file for each calendar
if there are more than 9 calendars, you'll have a big error,
as USACE numbers them 0-9.
@param records list of ProjectCalendar instances | [
"This",
"will",
"create",
"a",
"line",
"in",
"the",
"SDEF",
"file",
"for",
"each",
"calendar",
"if",
"there",
"are",
"more",
"than",
"9",
"calendars",
"you",
"ll",
"have",
"a",
"big",
"error",
"as",
"USACE",
"numbers",
"them",
"0",
"-",
"9",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L173-L189 |
156,814 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFWriter.java | SDEFWriter.writeExceptions | private void writeExceptions(List<ProjectCalendar> records) throws IOException
{
for (ProjectCalendar record : records)
{
if (!record.getCalendarExceptions().isEmpty())
{
// Need to move HOLI up here and get 15 exceptions per line as per USACE spec.
// for now, w... | java | private void writeExceptions(List<ProjectCalendar> records) throws IOException
{
for (ProjectCalendar record : records)
{
if (!record.getCalendarExceptions().isEmpty())
{
// Need to move HOLI up here and get 15 exceptions per line as per USACE spec.
// for now, w... | [
"private",
"void",
"writeExceptions",
"(",
"List",
"<",
"ProjectCalendar",
">",
"records",
")",
"throws",
"IOException",
"{",
"for",
"(",
"ProjectCalendar",
"record",
":",
"records",
")",
"{",
"if",
"(",
"!",
"record",
".",
"getCalendarExceptions",
"(",
")",
... | Write calendar exceptions.
@param records list of ProjectCalendars
@throws IOException | [
"Write",
"calendar",
"exceptions",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L197-L214 |
156,815 | joniles/mpxj | src/main/java/net/sf/mpxj/sdef/SDEFWriter.java | SDEFWriter.writeTaskPredecessors | private void writeTaskPredecessors(Task record)
{
m_buffer.setLength(0);
//
// Write the task predecessor
//
if (!record.getSummary() && !record.getPredecessors().isEmpty())
{ // I don't use summary tasks for SDEF
m_buffer.append("PRED ");
List<Relation> predeces... | java | private void writeTaskPredecessors(Task record)
{
m_buffer.setLength(0);
//
// Write the task predecessor
//
if (!record.getSummary() && !record.getPredecessors().isEmpty())
{ // I don't use summary tasks for SDEF
m_buffer.append("PRED ");
List<Relation> predeces... | [
"private",
"void",
"writeTaskPredecessors",
"(",
"Task",
"record",
")",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"//",
"// Write the task predecessor",
"//",
"if",
"(",
"!",
"record",
".",
"getSummary",
"(",
")",
"&&",
"!",
"record",
".",
"ge... | Write each predecessor for a task.
@param record Task instance | [
"Write",
"each",
"predecessor",
"for",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L335-L369 |
156,816 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPAbstractTimephasedWorkNormaliser.java | MPPAbstractTimephasedWorkNormaliser.getAssignmentWork | private Duration getAssignmentWork(ProjectCalendar calendar, TimephasedWork assignment)
{
Date assignmentStart = assignment.getStart();
Date splitStart = assignmentStart;
Date splitFinishTime = calendar.getFinishTime(splitStart);
Date splitFinish = DateHelper.setTime(splitStart, splitFinishT... | java | private Duration getAssignmentWork(ProjectCalendar calendar, TimephasedWork assignment)
{
Date assignmentStart = assignment.getStart();
Date splitStart = assignmentStart;
Date splitFinishTime = calendar.getFinishTime(splitStart);
Date splitFinish = DateHelper.setTime(splitStart, splitFinishT... | [
"private",
"Duration",
"getAssignmentWork",
"(",
"ProjectCalendar",
"calendar",
",",
"TimephasedWork",
"assignment",
")",
"{",
"Date",
"assignmentStart",
"=",
"assignment",
".",
"getStart",
"(",
")",
";",
"Date",
"splitStart",
"=",
"assignmentStart",
";",
"Date",
... | Retrieves the pro-rata work carried out on a given day.
@param calendar current calendar
@param assignment current assignment.
@return assignment work duration | [
"Retrieves",
"the",
"pro",
"-",
"rata",
"work",
"carried",
"out",
"on",
"a",
"given",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPAbstractTimephasedWorkNormaliser.java#L260-L277 |
156,817 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createWorkPatternAssignmentMap | private Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows) throws ParseException
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("ID");
String workPatterns = row.getString("WORK_PATTE... | java | private Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows) throws ParseException
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("ID");
String workPatterns = row.getString("WORK_PATTE... | [
"private",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"createWorkPatternAssignmentMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"throws",
"ParseException",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"map",
"=",
"ne... | Create the work pattern assignment map.
@param rows calendar rows
@return work pattern assignment map | [
"Create",
"the",
"work",
"pattern",
"assignment",
"map",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L384-L394 |
156,818 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createWorkPatternAssignmentRowList | private List<Row> createWorkPatternAssignmentRowList(String workPatterns) throws ParseException
{
List<Row> list = new ArrayList<Row>();
String[] patterns = workPatterns.split(",|:");
int index = 1;
while (index < patterns.length)
{
Integer workPattern = Integer.valueOf(pattern... | java | private List<Row> createWorkPatternAssignmentRowList(String workPatterns) throws ParseException
{
List<Row> list = new ArrayList<Row>();
String[] patterns = workPatterns.split(",|:");
int index = 1;
while (index < patterns.length)
{
Integer workPattern = Integer.valueOf(pattern... | [
"private",
"List",
"<",
"Row",
">",
"createWorkPatternAssignmentRowList",
"(",
"String",
"workPatterns",
")",
"throws",
"ParseException",
"{",
"List",
"<",
"Row",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Row",
">",
"(",
")",
";",
"String",
"[",
"]",
"pa... | Extract a list of work pattern assignments.
@param workPatterns string representation of work pattern assignments
@return list of work pattern assignment rows | [
"Extract",
"a",
"list",
"of",
"work",
"pattern",
"assignments",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L402-L424 |
156,819 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createExceptionAssignmentMap | private Map<Integer, List<Row>> createExceptionAssignmentMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("ID");
String exceptions = row.getString("EXCEPTIONS");
map.put(calen... | java | private Map<Integer, List<Row>> createExceptionAssignmentMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("ID");
String exceptions = row.getString("EXCEPTIONS");
map.put(calen... | [
"private",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"createExceptionAssignmentMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"map",
"=",
"new",
"HashMap",
"<",
"Integer... | Create the exception assignment map.
@param rows calendar rows
@return exception assignment map | [
"Create",
"the",
"exception",
"assignment",
"map",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L432-L442 |
156,820 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createExceptionAssignmentRowList | private List<Row> createExceptionAssignmentRowList(String exceptionData)
{
List<Row> list = new ArrayList<Row>();
String[] exceptions = exceptionData.split(",|:");
int index = 1;
while (index < exceptions.length)
{
Date startDate = DatatypeConverter.parseEpochTimestamp(exceptio... | java | private List<Row> createExceptionAssignmentRowList(String exceptionData)
{
List<Row> list = new ArrayList<Row>();
String[] exceptions = exceptionData.split(",|:");
int index = 1;
while (index < exceptions.length)
{
Date startDate = DatatypeConverter.parseEpochTimestamp(exceptio... | [
"private",
"List",
"<",
"Row",
">",
"createExceptionAssignmentRowList",
"(",
"String",
"exceptionData",
")",
"{",
"List",
"<",
"Row",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Row",
">",
"(",
")",
";",
"String",
"[",
"]",
"exceptions",
"=",
"exceptionDat... | Extract a list of exception assignments.
@param exceptionData string representation of exception assignments
@return list of exception assignment rows | [
"Extract",
"a",
"list",
"of",
"exception",
"assignments",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L450-L471 |
156,821 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createTimeEntryMap | private Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows) throws ParseException
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("ID");
String shifts = row.getString("SHIFTS");
map.pu... | java | private Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows) throws ParseException
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("ID");
String shifts = row.getString("SHIFTS");
map.pu... | [
"private",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"createTimeEntryMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"throws",
"ParseException",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"map",
"=",
"new",
"HashM... | Create the time entry map.
@param rows work pattern rows
@return time entry map | [
"Create",
"the",
"time",
"entry",
"map",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L479-L489 |
156,822 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java | AstaDatabaseFileReader.createTimeEntryRowList | private List<Row> createTimeEntryRowList(String shiftData) throws ParseException
{
List<Row> list = new ArrayList<Row>();
String[] shifts = shiftData.split(",|:");
int index = 1;
while (index < shifts.length)
{
index += 2;
int entryCount = Integer.parseInt(shifts[index... | java | private List<Row> createTimeEntryRowList(String shiftData) throws ParseException
{
List<Row> list = new ArrayList<Row>();
String[] shifts = shiftData.split(",|:");
int index = 1;
while (index < shifts.length)
{
index += 2;
int entryCount = Integer.parseInt(shifts[index... | [
"private",
"List",
"<",
"Row",
">",
"createTimeEntryRowList",
"(",
"String",
"shiftData",
")",
"throws",
"ParseException",
"{",
"List",
"<",
"Row",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Row",
">",
"(",
")",
";",
"String",
"[",
"]",
"shifts",
"=",
... | Extract a list of time entries.
@param shiftData string representation of time entries
@return list of time entry rows | [
"Extract",
"a",
"list",
"of",
"time",
"entries",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaDatabaseFileReader.java#L497-L526 |
156,823 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java | AbstractFileFormat.tableDefinitions | public Map<Integer, TableDefinition> tableDefinitions()
{
Map<Integer, TableDefinition> result = new HashMap<Integer, TableDefinition>();
result.put(Integer.valueOf(2), new TableDefinition("PROJECT_SUMMARY", columnDefinitions(PROJECT_SUMMARY_COLUMNS, projectSummaryColumnsOrder())));
result.put(Int... | java | public Map<Integer, TableDefinition> tableDefinitions()
{
Map<Integer, TableDefinition> result = new HashMap<Integer, TableDefinition>();
result.put(Integer.valueOf(2), new TableDefinition("PROJECT_SUMMARY", columnDefinitions(PROJECT_SUMMARY_COLUMNS, projectSummaryColumnsOrder())));
result.put(Int... | [
"public",
"Map",
"<",
"Integer",
",",
"TableDefinition",
">",
"tableDefinitions",
"(",
")",
"{",
"Map",
"<",
"Integer",
",",
"TableDefinition",
">",
"result",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
"TableDefinition",
">",
"(",
")",
";",
"result",
".",... | Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure
for a specific version of the Asta PP file.
@return PP file table structure | [
"Retrieves",
"the",
"table",
"structure",
"for",
"an",
"Asta",
"PP",
"file",
".",
"Subclasses",
"determine",
"the",
"exact",
"contents",
"of",
"the",
"structure",
"for",
"a",
"specific",
"version",
"of",
"the",
"Asta",
"PP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java#L41-L64 |
156,824 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java | AbstractFileFormat.columnDefinitions | private ColumnDefinition[] columnDefinitions(ColumnDefinition[] columns, String[] order)
{
Map<String, ColumnDefinition> map = makeColumnMap(columns);
ColumnDefinition[] result = new ColumnDefinition[order.length];
for (int index = 0; index < order.length; index++)
{
result[index] = ... | java | private ColumnDefinition[] columnDefinitions(ColumnDefinition[] columns, String[] order)
{
Map<String, ColumnDefinition> map = makeColumnMap(columns);
ColumnDefinition[] result = new ColumnDefinition[order.length];
for (int index = 0; index < order.length; index++)
{
result[index] = ... | [
"private",
"ColumnDefinition",
"[",
"]",
"columnDefinitions",
"(",
"ColumnDefinition",
"[",
"]",
"columns",
",",
"String",
"[",
"]",
"order",
")",
"{",
"Map",
"<",
"String",
",",
"ColumnDefinition",
">",
"map",
"=",
"makeColumnMap",
"(",
"columns",
")",
";",... | Generate an ordered set of column definitions from an ordered set of column names.
@param columns column definitions
@param order column names
@return ordered set of column definitions | [
"Generate",
"an",
"ordered",
"set",
"of",
"column",
"definitions",
"from",
"an",
"ordered",
"set",
"of",
"column",
"names",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java#L200-L209 |
156,825 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java | AbstractFileFormat.makeColumnMap | private Map<String, ColumnDefinition> makeColumnMap(ColumnDefinition[] columns)
{
Map<String, ColumnDefinition> map = new HashMap<String, ColumnDefinition>();
for (ColumnDefinition def : columns)
{
map.put(def.getName(), def);
}
return map;
} | java | private Map<String, ColumnDefinition> makeColumnMap(ColumnDefinition[] columns)
{
Map<String, ColumnDefinition> map = new HashMap<String, ColumnDefinition>();
for (ColumnDefinition def : columns)
{
map.put(def.getName(), def);
}
return map;
} | [
"private",
"Map",
"<",
"String",
",",
"ColumnDefinition",
">",
"makeColumnMap",
"(",
"ColumnDefinition",
"[",
"]",
"columns",
")",
"{",
"Map",
"<",
"String",
",",
"ColumnDefinition",
">",
"map",
"=",
"new",
"HashMap",
"<",
"String",
",",
"ColumnDefinition",
... | Convert an array of column definitions into a map keyed by column name.
@param columns array of column definitions
@return map of column definitions | [
"Convert",
"an",
"array",
"of",
"column",
"definitions",
"into",
"a",
"map",
"keyed",
"by",
"column",
"name",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java#L217-L225 |
156,826 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeProjectExtendedAttributes | private void writeProjectExtendedAttributes(Project project)
{
Project.ExtendedAttributes attributes = m_factory.createProjectExtendedAttributes();
project.setExtendedAttributes(attributes);
List<Project.ExtendedAttributes.ExtendedAttribute> list = attributes.getExtendedAttribute();
Set<Fiel... | java | private void writeProjectExtendedAttributes(Project project)
{
Project.ExtendedAttributes attributes = m_factory.createProjectExtendedAttributes();
project.setExtendedAttributes(attributes);
List<Project.ExtendedAttributes.ExtendedAttribute> list = attributes.getExtendedAttribute();
Set<Fiel... | [
"private",
"void",
"writeProjectExtendedAttributes",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"ExtendedAttributes",
"attributes",
"=",
"m_factory",
".",
"createProjectExtendedAttributes",
"(",
")",
";",
"project",
".",
"setExtendedAttributes",
"(",
"attribut... | This method writes project extended attribute data into an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"writes",
"project",
"extended",
"attribute",
"data",
"into",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L295-L341 |
156,827 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeCalendars | private void writeCalendars(Project project)
{
//
// Create the new MSPDI calendar list
//
Project.Calendars calendars = m_factory.createProjectCalendars();
project.setCalendars(calendars);
List<Project.Calendars.Calendar> calendar = calendars.getCalendar();
//
// Pro... | java | private void writeCalendars(Project project)
{
//
// Create the new MSPDI calendar list
//
Project.Calendars calendars = m_factory.createProjectCalendars();
project.setCalendars(calendars);
List<Project.Calendars.Calendar> calendar = calendars.getCalendar();
//
// Pro... | [
"private",
"void",
"writeCalendars",
"(",
"Project",
"project",
")",
"{",
"//",
"// Create the new MSPDI calendar list",
"//",
"Project",
".",
"Calendars",
"calendars",
"=",
"m_factory",
".",
"createProjectCalendars",
"(",
")",
";",
"project",
".",
"setCalendars",
"... | This method writes calendar data to an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"writes",
"calendar",
"data",
"to",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L348-L364 |
156,828 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeCalendar | private Project.Calendars.Calendar writeCalendar(ProjectCalendar bc)
{
//
// Create a calendar
//
Project.Calendars.Calendar calendar = m_factory.createProjectCalendarsCalendar();
calendar.setUID(NumberHelper.getBigInteger(bc.getUniqueID()));
calendar.setIsBaseCalendar(Boolean.val... | java | private Project.Calendars.Calendar writeCalendar(ProjectCalendar bc)
{
//
// Create a calendar
//
Project.Calendars.Calendar calendar = m_factory.createProjectCalendarsCalendar();
calendar.setUID(NumberHelper.getBigInteger(bc.getUniqueID()));
calendar.setIsBaseCalendar(Boolean.val... | [
"private",
"Project",
".",
"Calendars",
".",
"Calendar",
"writeCalendar",
"(",
"ProjectCalendar",
"bc",
")",
"{",
"//",
"// Create a calendar",
"//",
"Project",
".",
"Calendars",
".",
"Calendar",
"calendar",
"=",
"m_factory",
".",
"createProjectCalendarsCalendar",
"... | This method writes data for a single calendar to an MSPDI file.
@param bc Base calendar data
@return New MSPDI calendar instance | [
"This",
"method",
"writes",
"data",
"for",
"a",
"single",
"calendar",
"to",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L372-L459 |
156,829 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeExceptions | private void writeExceptions(Project.Calendars.Calendar calendar, List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
// Always write legacy exception data:
// Powerproject appears not to recognise new format data at all,
// and legacy data is ign... | java | private void writeExceptions(Project.Calendars.Calendar calendar, List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
// Always write legacy exception data:
// Powerproject appears not to recognise new format data at all,
// and legacy data is ign... | [
"private",
"void",
"writeExceptions",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"calendar",
",",
"List",
"<",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
">",
"dayList",
",",
"List",
"<",
"ProjectCalendarException",
... | Main entry point used to determine the format used to write
calendar exceptions.
@param calendar parent calendar
@param dayList list of calendar days
@param exceptions list of exceptions | [
"Main",
"entry",
"point",
"used",
"to",
"determine",
"the",
"format",
"used",
"to",
"write",
"calendar",
"exceptions",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L469-L480 |
156,830 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeExceptions9 | private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
for (ProjectCalendarException exception : exceptions)
{
boolean working = exception.getWorking();
Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa... | java | private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
{
for (ProjectCalendarException exception : exceptions)
{
boolean working = exception.getWorking();
Project.Calendars.Calendar.WeekDays.WeekDay day = m_fa... | [
"private",
"void",
"writeExceptions9",
"(",
"List",
"<",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
">",
"dayList",
",",
"List",
"<",
"ProjectCalendarException",
">",
"exceptions",
")",
"{",
"for",
"(",
"ProjectCalendarExcepti... | Write exceptions in the format used by MSPDI files prior to Project 2007.
@param dayList list of calendar days
@param exceptions list of exceptions | [
"Write",
"exceptions",
"in",
"the",
"format",
"used",
"by",
"MSPDI",
"files",
"prior",
"to",
"Project",
"2007",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L488-L520 |
156,831 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeExceptions12 | private void writeExceptions12(Project.Calendars.Calendar calendar, List<ProjectCalendarException> exceptions)
{
Exceptions ce = m_factory.createProjectCalendarsCalendarExceptions();
calendar.setExceptions(ce);
List<Exceptions.Exception> el = ce.getException();
for (ProjectCalendarException ... | java | private void writeExceptions12(Project.Calendars.Calendar calendar, List<ProjectCalendarException> exceptions)
{
Exceptions ce = m_factory.createProjectCalendarsCalendarExceptions();
calendar.setExceptions(ce);
List<Exceptions.Exception> el = ce.getException();
for (ProjectCalendarException ... | [
"private",
"void",
"writeExceptions12",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"calendar",
",",
"List",
"<",
"ProjectCalendarException",
">",
"exceptions",
")",
"{",
"Exceptions",
"ce",
"=",
"m_factory",
".",
"createProjectCalendarsCalendarExceptions",
"("... | Write exceptions into the format used by MSPDI files from
Project 2007 onwards.
@param calendar parent calendar
@param exceptions list of exceptions | [
"Write",
"exceptions",
"into",
"the",
"format",
"used",
"by",
"MSPDI",
"files",
"from",
"Project",
"2007",
"onwards",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L529-L576 |
156,832 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.populateRecurringException | private void populateRecurringException(ProjectCalendarException mpxjException, Exceptions.Exception xmlException)
{
RecurringData data = mpxjException.getRecurring();
xmlException.setEnteredByOccurrences(Boolean.TRUE);
xmlException.setOccurrences(NumberHelper.getBigInteger(data.getOccurrences()));... | java | private void populateRecurringException(ProjectCalendarException mpxjException, Exceptions.Exception xmlException)
{
RecurringData data = mpxjException.getRecurring();
xmlException.setEnteredByOccurrences(Boolean.TRUE);
xmlException.setOccurrences(NumberHelper.getBigInteger(data.getOccurrences()));... | [
"private",
"void",
"populateRecurringException",
"(",
"ProjectCalendarException",
"mpxjException",
",",
"Exceptions",
".",
"Exception",
"xmlException",
")",
"{",
"RecurringData",
"data",
"=",
"mpxjException",
".",
"getRecurring",
"(",
")",
";",
"xmlException",
".",
"s... | Writes the details of a recurring exception.
@param mpxjException source MPXJ calendar exception
@param xmlException target MSPDI exception | [
"Writes",
"the",
"details",
"of",
"a",
"recurring",
"exception",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L584-L640 |
156,833 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getDaysOfTheWeek | private BigInteger getDaysOfTheWeek(RecurringData data)
{
int value = 0;
for (Day day : Day.values())
{
if (data.getWeeklyDay(day))
{
value = value | DAY_MASKS[day.getValue()];
}
}
return BigInteger.valueOf(value);
} | java | private BigInteger getDaysOfTheWeek(RecurringData data)
{
int value = 0;
for (Day day : Day.values())
{
if (data.getWeeklyDay(day))
{
value = value | DAY_MASKS[day.getValue()];
}
}
return BigInteger.valueOf(value);
} | [
"private",
"BigInteger",
"getDaysOfTheWeek",
"(",
"RecurringData",
"data",
")",
"{",
"int",
"value",
"=",
"0",
";",
"for",
"(",
"Day",
"day",
":",
"Day",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"data",
".",
"getWeeklyDay",
"(",
"day",
")",
")",... | Converts days of the week into a bit field.
@param data recurring data
@return bit field | [
"Converts",
"days",
"of",
"the",
"week",
"into",
"a",
"bit",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L648-L659 |
156,834 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeWorkWeeks | private void writeWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
List<ProjectCalendarWeek> weeks = mpxjCalendar.getWorkWeeks();
if (!weeks.isEmpty())
{
WorkWeeks xmlWorkWeeks = m_factory.createProjectCalendarsCalendarWorkWeeks();
xmlCalendar.setW... | java | private void writeWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
List<ProjectCalendarWeek> weeks = mpxjCalendar.getWorkWeeks();
if (!weeks.isEmpty())
{
WorkWeeks xmlWorkWeeks = m_factory.createProjectCalendarsCalendarWorkWeeks();
xmlCalendar.setW... | [
"private",
"void",
"writeWorkWeeks",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"xmlCalendar",
",",
"ProjectCalendar",
"mpxjCalendar",
")",
"{",
"List",
"<",
"ProjectCalendarWeek",
">",
"weeks",
"=",
"mpxjCalendar",
".",
"getWorkWeeks",
"(",
")",
";",
"i... | Write the work weeks associated with this calendar.
@param xmlCalendar XML calendar instance
@param mpxjCalendar MPXJ calendar instance | [
"Write",
"the",
"work",
"weeks",
"associated",
"with",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L667-L729 |
156,835 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeResources | private void writeResources(Project project)
{
Project.Resources resources = m_factory.createProjectResources();
project.setResources(resources);
List<Project.Resources.Resource> list = resources.getResource();
for (Resource resource : m_projectFile.getResources())
{
list.add(... | java | private void writeResources(Project project)
{
Project.Resources resources = m_factory.createProjectResources();
project.setResources(resources);
List<Project.Resources.Resource> list = resources.getResource();
for (Resource resource : m_projectFile.getResources())
{
list.add(... | [
"private",
"void",
"writeResources",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"Resources",
"resources",
"=",
"m_factory",
".",
"createProjectResources",
"(",
")",
";",
"project",
".",
"setResources",
"(",
"resources",
")",
";",
"List",
"<",
"Projec... | This method writes resource data to an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"writes",
"resource",
"data",
"to",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L736-L746 |
156,836 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeResourceBaselines | private void writeResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource)
{
Project.Resources.Resource.Baseline baseline = m_factory.createProjectResourcesResourceBaseline();
boolean populated = false;
Number cost = mpxjResource.getBaselineCost();
if (cost != null &&... | java | private void writeResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource)
{
Project.Resources.Resource.Baseline baseline = m_factory.createProjectResourcesResourceBaseline();
boolean populated = false;
Number cost = mpxjResource.getBaselineCost();
if (cost != null &&... | [
"private",
"void",
"writeResourceBaselines",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xmlResource",
",",
"Resource",
"mpxjResource",
")",
"{",
"Project",
".",
"Resources",
".",
"Resource",
".",
"Baseline",
"baseline",
"=",
"m_factory",
".",
"createProje... | Writes resource baseline data.
@param xmlResource MSPDI resource
@param mpxjResource MPXJ resource | [
"Writes",
"resource",
"baseline",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L857-L907 |
156,837 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeResourceExtendedAttributes | private void writeResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx)
{
Project.Resources.Resource.ExtendedAttribute attrib;
List<Project.Resources.Resource.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (ResourceField mpxFieldID : getAllResourceExtend... | java | private void writeResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx)
{
Project.Resources.Resource.ExtendedAttribute attrib;
List<Project.Resources.Resource.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (ResourceField mpxFieldID : getAllResourceExtend... | [
"private",
"void",
"writeResourceExtendedAttributes",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xml",
",",
"Resource",
"mpx",
")",
"{",
"Project",
".",
"Resources",
".",
"Resource",
".",
"ExtendedAttribute",
"attrib",
";",
"List",
"<",
"Project",
".",
... | This method writes extended attribute data for a resource.
@param xml MSPDI resource
@param mpx MPXJ resource | [
"This",
"method",
"writes",
"extended",
"attribute",
"data",
"for",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L915-L937 |
156,838 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeCostRateTables | private void writeCostRateTables(Project.Resources.Resource xml, Resource mpx)
{
//Rates rates = m_factory.createProjectResourcesResourceRates();
//xml.setRates(rates);
//List<Project.Resources.Resource.Rates.Rate> ratesList = rates.getRate();
List<Project.Resources.Resource.Rates.Rate> rate... | java | private void writeCostRateTables(Project.Resources.Resource xml, Resource mpx)
{
//Rates rates = m_factory.createProjectResourcesResourceRates();
//xml.setRates(rates);
//List<Project.Resources.Resource.Rates.Rate> ratesList = rates.getRate();
List<Project.Resources.Resource.Rates.Rate> rate... | [
"private",
"void",
"writeCostRateTables",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xml",
",",
"Resource",
"mpx",
")",
"{",
"//Rates rates = m_factory.createProjectResourcesResourceRates();",
"//xml.setRates(rates);",
"//List<Project.Resources.Resource.Rates.Rate> ratesLi... | Writes a resource's cost rate tables.
@param xml MSPDI resource
@param mpx MPXJ resource | [
"Writes",
"a",
"resource",
"s",
"cost",
"rate",
"tables",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L945-L986 |
156,839 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.costRateTableWriteRequired | private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from)
{
boolean fromDate = (DateHelper.compare(from, DateHelper.FIRST_DATE) > 0);
boolean toDate = (DateHelper.compare(entry.getEndDate(), DateHelper.LAST_DATE) > 0);
boolean costPerUse = (NumberHelper.getDouble(entry.getCost... | java | private boolean costRateTableWriteRequired(CostRateTableEntry entry, Date from)
{
boolean fromDate = (DateHelper.compare(from, DateHelper.FIRST_DATE) > 0);
boolean toDate = (DateHelper.compare(entry.getEndDate(), DateHelper.LAST_DATE) > 0);
boolean costPerUse = (NumberHelper.getDouble(entry.getCost... | [
"private",
"boolean",
"costRateTableWriteRequired",
"(",
"CostRateTableEntry",
"entry",
",",
"Date",
"from",
")",
"{",
"boolean",
"fromDate",
"=",
"(",
"DateHelper",
".",
"compare",
"(",
"from",
",",
"DateHelper",
".",
"FIRST_DATE",
")",
">",
"0",
")",
";",
... | This method determines whether the cost rate table should be written.
A default cost rate table should not be written to the file.
@param entry cost rate table entry
@param from from date
@return boolean flag | [
"This",
"method",
"determines",
"whether",
"the",
"cost",
"rate",
"table",
"should",
"be",
"written",
".",
"A",
"default",
"cost",
"rate",
"table",
"should",
"not",
"be",
"written",
"to",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L996-L1004 |
156,840 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAvailability | private void writeAvailability(Project.Resources.Resource xml, Resource mpx)
{
AvailabilityPeriods periods = m_factory.createProjectResourcesResourceAvailabilityPeriods();
xml.setAvailabilityPeriods(periods);
List<AvailabilityPeriod> list = periods.getAvailabilityPeriod();
for (Availability a... | java | private void writeAvailability(Project.Resources.Resource xml, Resource mpx)
{
AvailabilityPeriods periods = m_factory.createProjectResourcesResourceAvailabilityPeriods();
xml.setAvailabilityPeriods(periods);
List<AvailabilityPeriod> list = periods.getAvailabilityPeriod();
for (Availability a... | [
"private",
"void",
"writeAvailability",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xml",
",",
"Resource",
"mpx",
")",
"{",
"AvailabilityPeriods",
"periods",
"=",
"m_factory",
".",
"createProjectResourcesResourceAvailabilityPeriods",
"(",
")",
";",
"xml",
".... | This method writes a resource's availability table.
@param xml MSPDI resource
@param mpx MPXJ resource | [
"This",
"method",
"writes",
"a",
"resource",
"s",
"availability",
"table",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1012-L1027 |
156,841 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeTasks | private void writeTasks(Project project)
{
Project.Tasks tasks = m_factory.createProjectTasks();
project.setTasks(tasks);
List<Project.Tasks.Task> list = tasks.getTask();
for (Task task : m_projectFile.getTasks())
{
list.add(writeTask(task));
}
} | java | private void writeTasks(Project project)
{
Project.Tasks tasks = m_factory.createProjectTasks();
project.setTasks(tasks);
List<Project.Tasks.Task> list = tasks.getTask();
for (Task task : m_projectFile.getTasks())
{
list.add(writeTask(task));
}
} | [
"private",
"void",
"writeTasks",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"Tasks",
"tasks",
"=",
"m_factory",
".",
"createProjectTasks",
"(",
")",
";",
"project",
".",
"setTasks",
"(",
"tasks",
")",
";",
"List",
"<",
"Project",
".",
"Tasks",
... | This method writes task data to an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"writes",
"task",
"data",
"to",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1034-L1044 |
156,842 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeTaskBaselines | private void writeTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask)
{
Project.Tasks.Task.Baseline baseline = m_factory.createProjectTasksTaskBaseline();
boolean populated = false;
Number cost = mpxjTask.getBaselineCost();
if (cost != null && cost.intValue() != 0)
{
popu... | java | private void writeTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask)
{
Project.Tasks.Task.Baseline baseline = m_factory.createProjectTasksTaskBaseline();
boolean populated = false;
Number cost = mpxjTask.getBaselineCost();
if (cost != null && cost.intValue() != 0)
{
popu... | [
"private",
"void",
"writeTaskBaselines",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"xmlTask",
",",
"Task",
"mpxjTask",
")",
"{",
"Project",
".",
"Tasks",
".",
"Task",
".",
"Baseline",
"baseline",
"=",
"m_factory",
".",
"createProjectTasksTaskBaseline",
"(",
"... | Writes task baseline data.
@param xmlTask MSPDI task
@param mpxjTask MPXJ task | [
"Writes",
"task",
"baseline",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1211-L1305 |
156,843 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeTaskExtendedAttributes | private void writeTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx)
{
Project.Tasks.Task.ExtendedAttribute attrib;
List<Project.Tasks.Task.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (TaskField mpxFieldID : getAllTaskExtendedAttributes())
{
Object ... | java | private void writeTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx)
{
Project.Tasks.Task.ExtendedAttribute attrib;
List<Project.Tasks.Task.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (TaskField mpxFieldID : getAllTaskExtendedAttributes())
{
Object ... | [
"private",
"void",
"writeTaskExtendedAttributes",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"xml",
",",
"Task",
"mpx",
")",
"{",
"Project",
".",
"Tasks",
".",
"Task",
".",
"ExtendedAttribute",
"attrib",
";",
"List",
"<",
"Project",
".",
"Tasks",
".",
"Tas... | This method writes extended attribute data for a task.
@param xml MSPDI task
@param mpx MPXJ task | [
"This",
"method",
"writes",
"extended",
"attribute",
"data",
"for",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1313-L1335 |
156,844 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.printExtendedAttributeDurationFormat | private BigInteger printExtendedAttributeDurationFormat(Object value)
{
BigInteger result = null;
if (value instanceof Duration)
{
result = DatatypeConverter.printDurationTimeUnits(((Duration) value).getUnits(), false);
}
return (result);
} | java | private BigInteger printExtendedAttributeDurationFormat(Object value)
{
BigInteger result = null;
if (value instanceof Duration)
{
result = DatatypeConverter.printDurationTimeUnits(((Duration) value).getUnits(), false);
}
return (result);
} | [
"private",
"BigInteger",
"printExtendedAttributeDurationFormat",
"(",
"Object",
"value",
")",
"{",
"BigInteger",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"instanceof",
"Duration",
")",
"{",
"result",
"=",
"DatatypeConverter",
".",
"printDurationTimeUnits",
"(... | Converts a duration to duration time units.
@param value duration value
@return duration time units | [
"Converts",
"a",
"duration",
"to",
"duration",
"time",
"units",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1343-L1351 |
156,845 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getTaskCalendarID | private BigInteger getTaskCalendarID(Task mpx)
{
BigInteger result = null;
ProjectCalendar cal = mpx.getCalendar();
if (cal != null)
{
result = NumberHelper.getBigInteger(cal.getUniqueID());
}
else
{
result = NULL_CALENDAR_ID;
}
return (result);... | java | private BigInteger getTaskCalendarID(Task mpx)
{
BigInteger result = null;
ProjectCalendar cal = mpx.getCalendar();
if (cal != null)
{
result = NumberHelper.getBigInteger(cal.getUniqueID());
}
else
{
result = NULL_CALENDAR_ID;
}
return (result);... | [
"private",
"BigInteger",
"getTaskCalendarID",
"(",
"Task",
"mpx",
")",
"{",
"BigInteger",
"result",
"=",
"null",
";",
"ProjectCalendar",
"cal",
"=",
"mpx",
".",
"getCalendar",
"(",
")",
";",
"if",
"(",
"cal",
"!=",
"null",
")",
"{",
"result",
"=",
"Numbe... | This method retrieves the UID for a calendar associated with a task.
@param mpx MPX Task instance
@return calendar UID | [
"This",
"method",
"retrieves",
"the",
"UID",
"for",
"a",
"calendar",
"associated",
"with",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1359-L1372 |
156,846 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writePredecessors | private void writePredecessors(Project.Tasks.Task xml, Task mpx)
{
List<Project.Tasks.Task.PredecessorLink> list = xml.getPredecessorLink();
List<Relation> predecessors = mpx.getPredecessors();
for (Relation rel : predecessors)
{
Integer taskUniqueID = rel.getTargetTask().getUniqueI... | java | private void writePredecessors(Project.Tasks.Task xml, Task mpx)
{
List<Project.Tasks.Task.PredecessorLink> list = xml.getPredecessorLink();
List<Relation> predecessors = mpx.getPredecessors();
for (Relation rel : predecessors)
{
Integer taskUniqueID = rel.getTargetTask().getUniqueI... | [
"private",
"void",
"writePredecessors",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"xml",
",",
"Task",
"mpx",
")",
"{",
"List",
"<",
"Project",
".",
"Tasks",
".",
"Task",
".",
"PredecessorLink",
">",
"list",
"=",
"xml",
".",
"getPredecessorLink",
"(",
")... | This method writes predecessor data to an MSPDI file.
We have to deal with a slight anomaly in this method that is introduced
by the MPX file format. It would be possible for someone to create an
MPX file with both the predecessor list and the unique ID predecessor
list populated... which means that we must process bot... | [
"This",
"method",
"writes",
"predecessor",
"data",
"to",
"an",
"MSPDI",
"file",
".",
"We",
"have",
"to",
"deal",
"with",
"a",
"slight",
"anomaly",
"in",
"this",
"method",
"that",
"is",
"introduced",
"by",
"the",
"MPX",
"file",
"format",
".",
"It",
"would... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1387-L1398 |
156,847 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writePredecessor | private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag)
{
Project.Tasks.Task.PredecessorLink link = m_factory.createProjectTasksTaskPredecessorLink();
link.setPredecessorUID(NumberHelper.getBigInteger(taskID));
link.setType(BigInteger.valueOf(ty... | java | private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag)
{
Project.Tasks.Task.PredecessorLink link = m_factory.createProjectTasksTaskPredecessorLink();
link.setPredecessorUID(NumberHelper.getBigInteger(taskID));
link.setType(BigInteger.valueOf(ty... | [
"private",
"Project",
".",
"Tasks",
".",
"Task",
".",
"PredecessorLink",
"writePredecessor",
"(",
"Integer",
"taskID",
",",
"RelationType",
"type",
",",
"Duration",
"lag",
")",
"{",
"Project",
".",
"Tasks",
".",
"Task",
".",
"PredecessorLink",
"link",
"=",
"... | This method writes a single predecessor link to the MSPDI file.
@param taskID The task UID
@param type The predecessor type
@param lag The lag duration
@return A new link to be added to the MSPDI file | [
"This",
"method",
"writes",
"a",
"single",
"predecessor",
"link",
"to",
"the",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1408-L1434 |
156,848 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignments | private void writeAssignments(Project project)
{
Project.Assignments assignments = m_factory.createProjectAssignments();
project.setAssignments(assignments);
List<Project.Assignments.Assignment> list = assignments.getAssignment();
for (ResourceAssignment assignment : m_projectFile.getResourc... | java | private void writeAssignments(Project project)
{
Project.Assignments assignments = m_factory.createProjectAssignments();
project.setAssignments(assignments);
List<Project.Assignments.Assignment> list = assignments.getAssignment();
for (ResourceAssignment assignment : m_projectFile.getResourc... | [
"private",
"void",
"writeAssignments",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"Assignments",
"assignments",
"=",
"m_factory",
".",
"createProjectAssignments",
"(",
")",
";",
"project",
".",
"setAssignments",
"(",
"assignments",
")",
";",
"List",
"<... | This method writes assignment data to an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"writes",
"assignment",
"data",
"to",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1441-L1497 |
156,849 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentBaselines | private void writeAssignmentBaselines(Project.Assignments.Assignment xml, ResourceAssignment mpxj)
{
Project.Assignments.Assignment.Baseline baseline = m_factory.createProjectAssignmentsAssignmentBaseline();
boolean populated = false;
Number cost = mpxj.getBaselineCost();
if (cost != null &&... | java | private void writeAssignmentBaselines(Project.Assignments.Assignment xml, ResourceAssignment mpxj)
{
Project.Assignments.Assignment.Baseline baseline = m_factory.createProjectAssignmentsAssignmentBaseline();
boolean populated = false;
Number cost = mpxj.getBaselineCost();
if (cost != null &&... | [
"private",
"void",
"writeAssignmentBaselines",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
"xml",
",",
"ResourceAssignment",
"mpxj",
")",
"{",
"Project",
".",
"Assignments",
".",
"Assignment",
".",
"Baseline",
"baseline",
"=",
"m_factory",
".",
"createP... | Writes assignment baseline data.
@param xml MSPDI assignment
@param mpxj MPXJ assignment | [
"Writes",
"assignment",
"baseline",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1588-L1666 |
156,850 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentExtendedAttributes | private void writeAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx)
{
Project.Assignments.Assignment.ExtendedAttribute attrib;
List<Project.Assignments.Assignment.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (AssignmentField mpxFiel... | java | private void writeAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx)
{
Project.Assignments.Assignment.ExtendedAttribute attrib;
List<Project.Assignments.Assignment.ExtendedAttribute> extendedAttributes = xml.getExtendedAttribute();
for (AssignmentField mpxFiel... | [
"private",
"void",
"writeAssignmentExtendedAttributes",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
"xml",
",",
"ResourceAssignment",
"mpx",
")",
"{",
"Project",
".",
"Assignments",
".",
"Assignment",
".",
"ExtendedAttribute",
"attrib",
";",
"List",
"<",
... | This method writes extended attribute data for an assignment.
@param xml MSPDI assignment
@param mpx MPXJ assignment | [
"This",
"method",
"writes",
"extended",
"attribute",
"data",
"for",
"an",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1674-L1696 |
156,851 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentTimephasedData | private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger a... | java | private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
{
if (m_writeTimphasedData && mpx.getHasTimephasedData())
{
List<TimephasedDataType> list = xml.getTimephasedData();
ProjectCalendar calendar = mpx.getCalendar();
BigInteger a... | [
"private",
"void",
"writeAssignmentTimephasedData",
"(",
"ResourceAssignment",
"mpx",
",",
"Project",
".",
"Assignments",
".",
"Assignment",
"xml",
")",
"{",
"if",
"(",
"m_writeTimphasedData",
"&&",
"mpx",
".",
"getHasTimephasedData",
"(",
")",
")",
"{",
"List",
... | Writes the timephased data for a resource assignment.
@param mpx MPXJ assignment
@param xml MSDPI assignment | [
"Writes",
"the",
"timephased",
"data",
"for",
"a",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1704-L1750 |
156,852 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.writeAssignmentTimephasedData | private void writeAssignmentTimephasedData(BigInteger assignmentID, List<TimephasedDataType> list, List<TimephasedWork> data, int type)
{
for (TimephasedWork mpx : data)
{
TimephasedDataType xml = m_factory.createTimephasedDataType();
list.add(xml);
xml.setStart(mpx.getStart()... | java | private void writeAssignmentTimephasedData(BigInteger assignmentID, List<TimephasedDataType> list, List<TimephasedWork> data, int type)
{
for (TimephasedWork mpx : data)
{
TimephasedDataType xml = m_factory.createTimephasedDataType();
list.add(xml);
xml.setStart(mpx.getStart()... | [
"private",
"void",
"writeAssignmentTimephasedData",
"(",
"BigInteger",
"assignmentID",
",",
"List",
"<",
"TimephasedDataType",
">",
"list",
",",
"List",
"<",
"TimephasedWork",
">",
"data",
",",
"int",
"type",
")",
"{",
"for",
"(",
"TimephasedWork",
"mpx",
":",
... | Writes a list of timephased data to the MSPDI file.
@param assignmentID current assignment ID
@param list output list of timephased data items
@param data input list of timephased data
@param type list type (planned or completed) | [
"Writes",
"a",
"list",
"of",
"timephased",
"data",
"to",
"the",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1894-L1908 |
156,853 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllAssignmentExtendedAttributes | private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | java | private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | [
"private",
"List",
"<",
"AssignmentField",
">",
"getAllAssignmentExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"AssignmentField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"AssignmentField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
... | Retrieve list of assignment extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"assignment",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1915-L1935 |
156,854 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllTaskExtendedAttributes | private List<TaskField> getAllTaskExtendedAttributes()
{
ArrayList<TaskField> result = new ArrayList<TaskField>();
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_FINISH));
... | java | private List<TaskField> getAllTaskExtendedAttributes()
{
ArrayList<TaskField> result = new ArrayList<TaskField>();
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(TaskFieldLists.CUSTOM_FINISH));
... | [
"private",
"List",
"<",
"TaskField",
">",
"getAllTaskExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"TaskField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"TaskField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"("... | Retrieve list of task extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"task",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1942-L1961 |
156,855 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java | MSPDIWriter.getAllResourceExtendedAttributes | private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceF... | java | private List<ResourceField> getAllResourceExtendedAttributes()
{
ArrayList<ResourceField> result = new ArrayList<ResourceField>();
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_TEXT));
result.addAll(Arrays.asList(ResourceFieldLists.CUSTOM_START));
result.addAll(Arrays.asList(ResourceF... | [
"private",
"List",
"<",
"ResourceField",
">",
"getAllResourceExtendedAttributes",
"(",
")",
"{",
"ArrayList",
"<",
"ResourceField",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"ResourceField",
">",
"(",
")",
";",
"result",
".",
"addAll",
"(",
"Arrays",
".",
... | Retrieve list of resource extended attributes.
@return list of extended attributes | [
"Retrieve",
"list",
"of",
"resource",
"extended",
"attributes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1968-L1987 |
156,856 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.processUDF | private void processUDF(UDFTypeType udf)
{
FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
if (fieldType != null)
{
UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
String name = udf.getTitle();
FieldType field... | java | private void processUDF(UDFTypeType udf)
{
FieldTypeClass fieldType = FIELD_TYPE_MAP.get(udf.getSubjectArea());
if (fieldType != null)
{
UserFieldDataType dataType = UserFieldDataType.getInstanceFromXmlName(udf.getDataType());
String name = udf.getTitle();
FieldType field... | [
"private",
"void",
"processUDF",
"(",
"UDFTypeType",
"udf",
")",
"{",
"FieldTypeClass",
"fieldType",
"=",
"FIELD_TYPE_MAP",
".",
"get",
"(",
"udf",
".",
"getSubjectArea",
"(",
")",
")",
";",
"if",
"(",
"fieldType",
"!=",
"null",
")",
"{",
"UserFieldDataType"... | Process an individual UDF.
@param udf UDF definition | [
"Process",
"an",
"individual",
"UDF",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L251-L264 |
156,857 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.addUserDefinedField | private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
FieldType field = null;
try
{
switch (fieldType)
{
case TASK:
{
do
{
field = m_taskUdfCounters.... | java | private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
FieldType field = null;
try
{
switch (fieldType)
{
case TASK:
{
do
{
field = m_taskUdfCounters.... | [
"private",
"FieldType",
"addUserDefinedField",
"(",
"FieldTypeClass",
"fieldType",
",",
"UserFieldDataType",
"dataType",
",",
"String",
"name",
")",
"{",
"FieldType",
"field",
"=",
"null",
";",
"try",
"{",
"switch",
"(",
"fieldType",
")",
"{",
"case",
"TASK",
... | Map the Primavera UDF to a custom field.
@param fieldType parent object type
@param dataType UDF data type
@param name UDF name
@return FieldType instance | [
"Map",
"the",
"Primavera",
"UDF",
"to",
"a",
"custom",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L274-L328 |
156,858 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.zeroIsNull | private Double zeroIsNull(Double value)
{
if (value != null && value.doubleValue() == 0)
{
value = null;
}
return value;
} | java | private Double zeroIsNull(Double value)
{
if (value != null && value.doubleValue() == 0)
{
value = null;
}
return value;
} | [
"private",
"Double",
"zeroIsNull",
"(",
"Double",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
"&&",
"value",
".",
"doubleValue",
"(",
")",
"==",
"0",
")",
"{",
"value",
"=",
"null",
";",
"}",
"return",
"value",
";",
"}"
] | Render a zero Double as null.
@param value double value
@return null if the double value is zero | [
"Render",
"a",
"zero",
"Double",
"as",
"null",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L995-L1002 |
156,859 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.getDuration | private Duration getDuration(Double duration)
{
Duration result = null;
if (duration != null)
{
result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS);
}
return result;
} | java | private Duration getDuration(Double duration)
{
Duration result = null;
if (duration != null)
{
result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS);
}
return result;
} | [
"private",
"Duration",
"getDuration",
"(",
"Double",
"duration",
")",
"{",
"Duration",
"result",
"=",
"null",
";",
"if",
"(",
"duration",
"!=",
"null",
")",
"{",
"result",
"=",
"Duration",
".",
"getInstance",
"(",
"NumberHelper",
".",
"getDouble",
"(",
"du... | Extracts a duration from a JAXBElement instance.
@param duration duration expressed in hours
@return duration instance | [
"Extracts",
"a",
"duration",
"from",
"a",
"JAXBElement",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1010-L1020 |
156,860 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.readUDFTypes | private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs)
{
for (UDFAssignmentType udf : udfs)
{
FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId()));
if (fieldType != null)
{
mpxj.set(fieldType, getUdfValue(udf));
... | java | private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs)
{
for (UDFAssignmentType udf : udfs)
{
FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId()));
if (fieldType != null)
{
mpxj.set(fieldType, getUdfValue(udf));
... | [
"private",
"void",
"readUDFTypes",
"(",
"FieldContainer",
"mpxj",
",",
"List",
"<",
"UDFAssignmentType",
">",
"udfs",
")",
"{",
"for",
"(",
"UDFAssignmentType",
"udf",
":",
"udfs",
")",
"{",
"FieldType",
"fieldType",
"=",
"m_fieldTypeMap",
".",
"get",
"(",
"... | Process UDFs for a specific object.
@param mpxj field container
@param udfs UDF values | [
"Process",
"UDFs",
"for",
"a",
"specific",
"object",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1052-L1062 |
156,861 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.getUdfValue | private Object getUdfValue(UDFAssignmentType udf)
{
if (udf.getCostValue() != null)
{
return udf.getCostValue();
}
if (udf.getDoubleValue() != null)
{
return udf.getDoubleValue();
}
if (udf.getFinishDateValue() != null)
{
return... | java | private Object getUdfValue(UDFAssignmentType udf)
{
if (udf.getCostValue() != null)
{
return udf.getCostValue();
}
if (udf.getDoubleValue() != null)
{
return udf.getDoubleValue();
}
if (udf.getFinishDateValue() != null)
{
return... | [
"private",
"Object",
"getUdfValue",
"(",
"UDFAssignmentType",
"udf",
")",
"{",
"if",
"(",
"udf",
".",
"getCostValue",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"udf",
".",
"getCostValue",
"(",
")",
";",
"}",
"if",
"(",
"udf",
".",
"getDoubleValue",
"... | Retrieve the value of a UDF.
@param udf UDF value holder
@return UDF value | [
"Retrieve",
"the",
"value",
"of",
"a",
"UDF",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1070-L1108 |
156,862 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java | PrimaveraPMFileReader.mapTaskID | private Integer mapTaskID(Integer id)
{
Integer mappedID = m_clashMap.get(id);
if (mappedID == null)
{
mappedID = id;
}
return (mappedID);
} | java | private Integer mapTaskID(Integer id)
{
Integer mappedID = m_clashMap.get(id);
if (mappedID == null)
{
mappedID = id;
}
return (mappedID);
} | [
"private",
"Integer",
"mapTaskID",
"(",
"Integer",
"id",
")",
"{",
"Integer",
"mappedID",
"=",
"m_clashMap",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"mappedID",
"==",
"null",
")",
"{",
"mappedID",
"=",
"id",
";",
"}",
"return",
"(",
"mappedID",
"... | Deals with the case where we have had to map a task ID to a new value.
@param id task ID from database
@return mapped task ID | [
"Deals",
"with",
"the",
"case",
"where",
"we",
"have",
"had",
"to",
"map",
"a",
"task",
"ID",
"to",
"a",
"new",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1165-L1173 |
156,863 | joniles/mpxj | src/main/java/net/sf/mpxj/GraphicalIndicator.java | GraphicalIndicator.evaluate | public int evaluate(FieldContainer container)
{
//
// First step - determine the list of criteria we are should use
//
List<GraphicalIndicatorCriteria> criteria;
if (container instanceof Task)
{
Task task = (Task) container;
if (NumberHelper.getInt(task.getUnique... | java | public int evaluate(FieldContainer container)
{
//
// First step - determine the list of criteria we are should use
//
List<GraphicalIndicatorCriteria> criteria;
if (container instanceof Task)
{
Task task = (Task) container;
if (NumberHelper.getInt(task.getUnique... | [
"public",
"int",
"evaluate",
"(",
"FieldContainer",
"container",
")",
"{",
"//",
"// First step - determine the list of criteria we are should use",
"//",
"List",
"<",
"GraphicalIndicatorCriteria",
">",
"criteria",
";",
"if",
"(",
"container",
"instanceof",
"Task",
")",
... | This method evaluates a if a graphical indicator should
be displayed, given a set of Task or Resource data. The
method will return -1 if no indicator should be displayed.
@param container Task or Resource instance
@return indicator index | [
"This",
"method",
"evaluates",
"a",
"if",
"a",
"graphical",
"indicator",
"should",
"be",
"displayed",
"given",
"a",
"set",
"of",
"Task",
"or",
"Resource",
"data",
".",
"The",
"method",
"will",
"return",
"-",
"1",
"if",
"no",
"indicator",
"should",
"be",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/GraphicalIndicator.java#L48-L124 |
156,864 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeFileCreationRecord | private void writeFileCreationRecord() throws IOException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_buffer.setLength(0);
m_buffer.append("MPX");
m_buffer.append(m_delimiter);
m_buffer.append(properties.getMpxProgramName());
m_buffer.append(m_delimit... | java | private void writeFileCreationRecord() throws IOException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_buffer.setLength(0);
m_buffer.append("MPX");
m_buffer.append(m_delimiter);
m_buffer.append(properties.getMpxProgramName());
m_buffer.append(m_delimit... | [
"private",
"void",
"writeFileCreationRecord",
"(",
")",
"throws",
"IOException",
"{",
"ProjectProperties",
"properties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
... | Write file creation record.
@throws IOException | [
"Write",
"file",
"creation",
"record",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L144-L158 |
156,865 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeCalendar | private void writeCalendar(ProjectCalendar record) throws IOException
{
//
// Test used to ensure that we don't write the default calendar used for the "Unassigned" resource
//
if (record.getParent() == null || record.getResource() != null)
{
m_buffer.setLength(0);
if... | java | private void writeCalendar(ProjectCalendar record) throws IOException
{
//
// Test used to ensure that we don't write the default calendar used for the "Unassigned" resource
//
if (record.getParent() == null || record.getResource() != null)
{
m_buffer.setLength(0);
if... | [
"private",
"void",
"writeCalendar",
"(",
"ProjectCalendar",
"record",
")",
"throws",
"IOException",
"{",
"//",
"// Test used to ensure that we don't write the default calendar used for the \"Unassigned\" resource",
"//",
"if",
"(",
"record",
".",
"getParent",
"(",
")",
"==",
... | Write a calendar.
@param record calendar instance
@throws IOException | [
"Write",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L322-L385 |
156,866 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeCalendarHours | private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException
{
m_buffer.setLength(0);
int recordNumber;
if (!parentCalendar.isDerived())
{
recordNumber = MPXConstants.BASE_CALENDAR_HOURS_RECORD_NUMBER;
}
else
{
... | java | private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException
{
m_buffer.setLength(0);
int recordNumber;
if (!parentCalendar.isDerived())
{
recordNumber = MPXConstants.BASE_CALENDAR_HOURS_RECORD_NUMBER;
}
else
{
... | [
"private",
"void",
"writeCalendarHours",
"(",
"ProjectCalendar",
"parentCalendar",
",",
"ProjectCalendarHours",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"int",
"recordNumber",
";",
"if",
"(",
"!",
"parentCalend... | Write calendar hours.
@param parentCalendar parent calendar instance
@param record calendar hours instance
@throws IOException | [
"Write",
"calendar",
"hours",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L394-L446 |
156,867 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResource | private void writeResource(Resource record) throws IOException
{
m_buffer.setLength(0);
//
// Write the resource record
//
int[] fields = m_resourceModel.getModel();
m_buffer.append(MPXConstants.RESOURCE_RECORD_NUMBER);
for (int loop = 0; loop < fields.length; loop++)
... | java | private void writeResource(Resource record) throws IOException
{
m_buffer.setLength(0);
//
// Write the resource record
//
int[] fields = m_resourceModel.getModel();
m_buffer.append(MPXConstants.RESOURCE_RECORD_NUMBER);
for (int loop = 0; loop < fields.length; loop++)
... | [
"private",
"void",
"writeResource",
"(",
"Resource",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"//",
"// Write the resource record",
"//",
"int",
"[",
"]",
"fields",
"=",
"m_resourceModel",
".",
"getModel",
... | Write a resource.
@param record resource instance
@throws IOException | [
"Write",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L497-L545 |
156,868 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeNotes | private void writeNotes(int recordNumber, String text) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(recordNumber);
m_buffer.append(m_delimiter);
if (text != null)
{
String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING);
boolean quote... | java | private void writeNotes(int recordNumber, String text) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(recordNumber);
m_buffer.append(m_delimiter);
if (text != null)
{
String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING);
boolean quote... | [
"private",
"void",
"writeNotes",
"(",
"int",
"recordNumber",
",",
"String",
"text",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"recordNumber",
")",
";",
"m_buffer",
".",
"append",
"(... | Write notes.
@param recordNumber record number
@param text note text
@throws IOException | [
"Write",
"notes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L554-L602 |
156,869 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResourceAssignment | private void writeResourceAssignment(ResourceAssignment record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(formatResource(record.getResource()));
m_buffer.append(m_delimiter)... | java | private void writeResourceAssignment(ResourceAssignment record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(formatResource(record.getResource()));
m_buffer.append(m_delimiter)... | [
"private",
"void",
"writeResourceAssignment",
"(",
"ResourceAssignment",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"MPXConstants",
".",
"RESOURCE_ASSIGNMENT_RECORD_NUMBER",
")",
";"... | Write resource assignment.
@param record resource assignment instance
@throws IOException | [
"Write",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L753-L796 |
156,870 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeResourceAssignmentWorkgroupFields | private void writeResourceAssignmentWorkgroupFields(ResourceAssignmentWorkgroupFields record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_WORKGROUP_FIELDS_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(format(record.getMessageUn... | java | private void writeResourceAssignmentWorkgroupFields(ResourceAssignmentWorkgroupFields record) throws IOException
{
m_buffer.setLength(0);
m_buffer.append(MPXConstants.RESOURCE_ASSIGNMENT_WORKGROUP_FIELDS_RECORD_NUMBER);
m_buffer.append(m_delimiter);
m_buffer.append(format(record.getMessageUn... | [
"private",
"void",
"writeResourceAssignmentWorkgroupFields",
"(",
"ResourceAssignmentWorkgroupFields",
"record",
")",
"throws",
"IOException",
"{",
"m_buffer",
".",
"setLength",
"(",
"0",
")",
";",
"m_buffer",
".",
"append",
"(",
"MPXConstants",
".",
"RESOURCE_ASSIGNMEN... | Write resource assignment workgroup.
@param record resource assignment workgroup instance
@throws IOException | [
"Write",
"resource",
"assignment",
"workgroup",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L804-L826 |
156,871 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.writeTasks | private void writeTasks(List<Task> tasks) throws IOException
{
for (Task task : tasks)
{
writeTask(task);
writeTasks(task.getChildTasks());
}
} | java | private void writeTasks(List<Task> tasks) throws IOException
{
for (Task task : tasks)
{
writeTask(task);
writeTasks(task.getChildTasks());
}
} | [
"private",
"void",
"writeTasks",
"(",
"List",
"<",
"Task",
">",
"tasks",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Task",
"task",
":",
"tasks",
")",
"{",
"writeTask",
"(",
"task",
")",
";",
"writeTasks",
"(",
"task",
".",
"getChildTasks",
"(",
")... | Recursively write tasks.
@param tasks list of tasks
@throws IOException | [
"Recursively",
"write",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L834-L841 |
156,872 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.getIntegerTimeInMinutes | private Integer getIntegerTimeInMinutes(Date date)
{
Integer result = null;
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
time += cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
re... | java | private Integer getIntegerTimeInMinutes(Date date)
{
Integer result = null;
if (date != null)
{
Calendar cal = DateHelper.popCalendar(date);
int time = cal.get(Calendar.HOUR_OF_DAY) * 60;
time += cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
re... | [
"private",
"Integer",
"getIntegerTimeInMinutes",
"(",
"Date",
"date",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"date",
")",
";",
"int",
"tim... | This internal method is used to convert from a Date instance to an
integer representing the number of minutes past midnight.
@param date date instance
@return minutes past midnight as an integer | [
"This",
"internal",
"method",
"is",
"used",
"to",
"convert",
"from",
"a",
"Date",
"instance",
"to",
"an",
"integer",
"representing",
"the",
"number",
"of",
"minutes",
"past",
"midnight",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L850-L862 |
156,873 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.escapeQuotes | private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
... | java | private String escapeQuotes(String value)
{
StringBuilder sb = new StringBuilder();
int length = value.length();
char c;
sb.append('"');
for (int index = 0; index < length; index++)
{
c = value.charAt(index);
sb.append(c);
if (c == '"')
{
... | [
"private",
"String",
"escapeQuotes",
"(",
"String",
"value",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"length",
"=",
"value",
".",
"length",
"(",
")",
";",
"char",
"c",
";",
"sb",
".",
"append",
"(",
"'",
"'... | This method is called when double quotes are found as part of
a value. The quotes are escaped by adding a second quote character
and the entire value is quoted.
@param value text containing quote characters
@return escaped and quoted text | [
"This",
"method",
"is",
"called",
"when",
"double",
"quotes",
"are",
"found",
"as",
"part",
"of",
"a",
"value",
".",
"The",
"quotes",
"are",
"escaped",
"by",
"adding",
"a",
"second",
"quote",
"character",
"and",
"the",
"entire",
"value",
"is",
"quoted",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L872-L892 |
156,874 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.stripLineBreaks | private String stripLineBreaks(String text, String replacement)
{
if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
{
StringBuilder sb = new StringBuilder(text);
int index;
while ((index = sb.indexOf("\r\n")) != -1)
{
sb.replace(index, index + 2, ... | java | private String stripLineBreaks(String text, String replacement)
{
if (text.indexOf('\r') != -1 || text.indexOf('\n') != -1)
{
StringBuilder sb = new StringBuilder(text);
int index;
while ((index = sb.indexOf("\r\n")) != -1)
{
sb.replace(index, index + 2, ... | [
"private",
"String",
"stripLineBreaks",
"(",
"String",
"text",
",",
"String",
"replacement",
")",
"{",
"if",
"(",
"text",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
"||",
"text",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
")",
"... | This method removes line breaks from a piece of text, and replaces
them with the supplied text.
@param text source text
@param replacement line break replacement text
@return text with line breaks removed. | [
"This",
"method",
"removes",
"line",
"breaks",
"from",
"a",
"piece",
"of",
"text",
"and",
"replaces",
"them",
"with",
"the",
"supplied",
"text",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L902-L934 |
156,875 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.format | private String format(Object o)
{
String result;
if (o == null)
{
result = "";
}
else
{
if (o instanceof Boolean == true)
{
result = LocaleData.getString(m_locale, (((Boolean) o).booleanValue() == true ? LocaleData.YES : LocaleData.NO));
... | java | private String format(Object o)
{
String result;
if (o == null)
{
result = "";
}
else
{
if (o instanceof Boolean == true)
{
result = LocaleData.getString(m_locale, (((Boolean) o).booleanValue() == true ? LocaleData.YES : LocaleData.NO));
... | [
"private",
"String",
"format",
"(",
"Object",
"o",
")",
"{",
"String",
"result",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"result",
"=",
"\"\"",
";",
"}",
"else",
"{",
"if",
"(",
"o",
"instanceof",
"Boolean",
"==",
"true",
")",
"{",
"result",
... | This method returns the string representation of an object. In most
cases this will simply involve calling the normal toString method
on the object, but a couple of exceptions are handled here.
@param o the object to formatted
@return formatted string representing input Object | [
"This",
"method",
"returns",
"the",
"string",
"representation",
"of",
"an",
"object",
".",
"In",
"most",
"cases",
"this",
"will",
"simply",
"involve",
"calling",
"the",
"normal",
"toString",
"method",
"on",
"the",
"object",
"but",
"a",
"couple",
"of",
"excep... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L944-L1002 |
156,876 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.stripTrailingDelimiters | private void stripTrailingDelimiters(StringBuilder buffer)
{
int index = buffer.length() - 1;
while (index > 0 && buffer.charAt(index) == m_delimiter)
{
--index;
}
buffer.setLength(index + 1);
} | java | private void stripTrailingDelimiters(StringBuilder buffer)
{
int index = buffer.length() - 1;
while (index > 0 && buffer.charAt(index) == m_delimiter)
{
--index;
}
buffer.setLength(index + 1);
} | [
"private",
"void",
"stripTrailingDelimiters",
"(",
"StringBuilder",
"buffer",
")",
"{",
"int",
"index",
"=",
"buffer",
".",
"length",
"(",
")",
"-",
"1",
";",
"while",
"(",
"index",
">",
"0",
"&&",
"buffer",
".",
"charAt",
"(",
"index",
")",
"==",
"m_d... | This method removes trailing delimiter characters.
@param buffer input sring buffer | [
"This",
"method",
"removes",
"trailing",
"delimiter",
"characters",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1009-L1019 |
156,877 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTime | private String formatTime(Date value)
{
return (value == null ? null : m_formats.getTimeFormat().format(value));
} | java | private String formatTime(Date value)
{
return (value == null ? null : m_formats.getTimeFormat().format(value));
} | [
"private",
"String",
"formatTime",
"(",
"Date",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getTimeFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
";",
"}"
] | This method is called to format a time value.
@param value time value
@return formatted time value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"time",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1027-L1030 |
156,878 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatCurrency | private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | java | private String formatCurrency(Number value)
{
return (value == null ? null : m_formats.getCurrencyFormat().format(value));
} | [
"private",
"String",
"formatCurrency",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getCurrencyFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
";",
"}"
] | This method is called to format a currency value.
@param value numeric value
@return currency value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"currency",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1038-L1041 |
156,879 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatUnits | private String formatUnits(Number value)
{
return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100));
} | java | private String formatUnits(Number value)
{
return (value == null ? null : m_formats.getUnitsDecimalFormat().format(value.doubleValue() / 100));
} | [
"private",
"String",
"formatUnits",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getUnitsDecimalFormat",
"(",
")",
".",
"format",
"(",
"value",
".",
"doubleValue",
"(",
")",
"/",
"100",
")",... | This method is called to format a units value.
@param value numeric value
@return currency value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"units",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1049-L1052 |
156,880 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatDateTimeNull | private String formatDateTimeNull(Date value)
{
return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
} | java | private String formatDateTimeNull(Date value)
{
return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
} | [
"private",
"String",
"formatDateTimeNull",
"(",
"Date",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"m_formats",
".",
"getNullText",
"(",
")",
":",
"m_formats",
".",
"getDateTimeFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
")",
... | This method is called to format a date. It will return the null text
if a null value is supplied.
@param value date value
@return formatted date value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"date",
".",
"It",
"will",
"return",
"the",
"null",
"text",
"if",
"a",
"null",
"value",
"is",
"supplied",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1077-L1080 |
156,881 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatPercentage | private String formatPercentage(Number value)
{
return (value == null ? null : m_formats.getPercentageDecimalFormat().format(value) + "%");
} | java | private String formatPercentage(Number value)
{
return (value == null ? null : m_formats.getPercentageDecimalFormat().format(value) + "%");
} | [
"private",
"String",
"formatPercentage",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"m_formats",
".",
"getPercentageDecimalFormat",
"(",
")",
".",
"format",
"(",
"value",
")",
"+",
"\"%\"",
")",
";",
"}"
] | This method is called to format a percentage value.
@param value numeric value
@return percentage value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"percentage",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1099-L1102 |
156,882 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatAccrueType | private String formatAccrueType(AccrueType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.ACCRUE_TYPES)[type.getValue() - 1]);
} | java | private String formatAccrueType(AccrueType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.ACCRUE_TYPES)[type.getValue() - 1]);
} | [
"private",
"String",
"formatAccrueType",
"(",
"AccrueType",
"type",
")",
"{",
"return",
"(",
"type",
"==",
"null",
"?",
"null",
":",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
",",
"LocaleData",
".",
"ACCRUE_TYPES",
")",
"[",
"type",
".",
"getValu... | This method is called to format an accrue type value.
@param type accrue type
@return formatted accrue type | [
"This",
"method",
"is",
"called",
"to",
"format",
"an",
"accrue",
"type",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1110-L1113 |
156,883 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatConstraintType | private String formatConstraintType(ConstraintType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.CONSTRAINT_TYPES)[type.getValue()]);
} | java | private String formatConstraintType(ConstraintType type)
{
return (type == null ? null : LocaleData.getStringArray(m_locale, LocaleData.CONSTRAINT_TYPES)[type.getValue()]);
} | [
"private",
"String",
"formatConstraintType",
"(",
"ConstraintType",
"type",
")",
"{",
"return",
"(",
"type",
"==",
"null",
"?",
"null",
":",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
",",
"LocaleData",
".",
"CONSTRAINT_TYPES",
")",
"[",
"type",
"."... | This method is called to format a constraint type.
@param type constraint type
@return formatted constraint type | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"constraint",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1121-L1124 |
156,884 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatDuration | private String formatDuration(Object value)
{
String result = null;
if (value instanceof Duration)
{
Duration duration = (Duration) value;
result = m_formats.getDurationDecimalFormat().format(duration.getDuration()) + formatTimeUnit(duration.getUnits());
}
return resul... | java | private String formatDuration(Object value)
{
String result = null;
if (value instanceof Duration)
{
Duration duration = (Duration) value;
result = m_formats.getDurationDecimalFormat().format(duration.getDuration()) + formatTimeUnit(duration.getUnits());
}
return resul... | [
"private",
"String",
"formatDuration",
"(",
"Object",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"instanceof",
"Duration",
")",
"{",
"Duration",
"duration",
"=",
"(",
"Duration",
")",
"value",
";",
"result",
"=",
"m_format... | This method is called to format a duration.
@param value duration value
@return formatted duration value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"duration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1132-L1141 |
156,885 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRate | private String formatRate(Rate value)
{
String result = null;
if (value != null)
{
StringBuilder buffer = new StringBuilder(m_formats.getCurrencyFormat().format(value.getAmount()));
buffer.append("/");
buffer.append(formatTimeUnit(value.getUnits()));
result = buf... | java | private String formatRate(Rate value)
{
String result = null;
if (value != null)
{
StringBuilder buffer = new StringBuilder(m_formats.getCurrencyFormat().format(value.getAmount()));
buffer.append("/");
buffer.append(formatTimeUnit(value.getUnits()));
result = buf... | [
"private",
"String",
"formatRate",
"(",
"Rate",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
"m_formats",
".",
"getCurrencyFormat",
"(",
")... | This method is called to format a rate.
@param value rate value
@return formatted rate | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"rate",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1149-L1160 |
156,886 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatPriority | private String formatPriority(Priority value)
{
String result = null;
if (value != null)
{
String[] priorityTypes = LocaleData.getStringArray(m_locale, LocaleData.PRIORITY_TYPES);
int priority = value.getValue();
if (priority < Priority.LOWEST)
{
pri... | java | private String formatPriority(Priority value)
{
String result = null;
if (value != null)
{
String[] priorityTypes = LocaleData.getStringArray(m_locale, LocaleData.PRIORITY_TYPES);
int priority = value.getValue();
if (priority < Priority.LOWEST)
{
pri... | [
"private",
"String",
"formatPriority",
"(",
"Priority",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"priorityTypes",
"=",
"LocaleData",
".",
"getStringArray",
"(",
"m_locale",
","... | This method is called to format a priority.
@param value priority instance
@return formatted priority value | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"priority",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1168-L1194 |
156,887 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTaskType | private String formatTaskType(TaskType value)
{
return (LocaleData.getString(m_locale, (value == TaskType.FIXED_DURATION ? LocaleData.YES : LocaleData.NO)));
} | java | private String formatTaskType(TaskType value)
{
return (LocaleData.getString(m_locale, (value == TaskType.FIXED_DURATION ? LocaleData.YES : LocaleData.NO)));
} | [
"private",
"String",
"formatTaskType",
"(",
"TaskType",
"value",
")",
"{",
"return",
"(",
"LocaleData",
".",
"getString",
"(",
"m_locale",
",",
"(",
"value",
"==",
"TaskType",
".",
"FIXED_DURATION",
"?",
"LocaleData",
".",
"YES",
":",
"LocaleData",
".",
"NO"... | This method is called to format a task type.
@param value task type value
@return formatted task type | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"task",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1202-L1205 |
156,888 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRelationList | private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_... | java | private String formatRelationList(List<Relation> value)
{
String result = null;
if (value != null && value.size() != 0)
{
StringBuilder sb = new StringBuilder();
for (Relation relation : value)
{
if (sb.length() != 0)
{
sb.append(m_... | [
"private",
"String",
"formatRelationList",
"(",
"List",
"<",
"Relation",
">",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"value",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"StringBuilder",
"sb",
... | This method is called to format a relation list.
@param value relation list instance
@return formatted relation list | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"relation",
"list",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1213-L1234 |
156,889 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatRelation | private String formatRelation(Relation relation)
{
String result = null;
if (relation != null)
{
StringBuilder sb = new StringBuilder(relation.getTargetTask().getID().toString());
Duration duration = relation.getLag();
RelationType type = relation.getType();
do... | java | private String formatRelation(Relation relation)
{
String result = null;
if (relation != null)
{
StringBuilder sb = new StringBuilder(relation.getTargetTask().getID().toString());
Duration duration = relation.getLag();
RelationType type = relation.getType();
do... | [
"private",
"String",
"formatRelation",
"(",
"Relation",
"relation",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"relation",
"!=",
"null",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"relation",
".",
"getTargetTask",
"(",... | This method is called to format a relation.
@param relation relation instance
@return formatted relation instance | [
"This",
"method",
"is",
"called",
"to",
"format",
"a",
"relation",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1242-L1275 |
156,890 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatTimeUnit | private String formatTimeUnit(TimeUnit timeUnit)
{
int units = timeUnit.getValue();
String result;
String[][] unitNames = LocaleData.getStringArrays(m_locale, LocaleData.TIME_UNITS_ARRAY);
if (units < 0 || units >= unitNames.length)
{
result = "";
}
else
{
... | java | private String formatTimeUnit(TimeUnit timeUnit)
{
int units = timeUnit.getValue();
String result;
String[][] unitNames = LocaleData.getStringArrays(m_locale, LocaleData.TIME_UNITS_ARRAY);
if (units < 0 || units >= unitNames.length)
{
result = "";
}
else
{
... | [
"private",
"String",
"formatTimeUnit",
"(",
"TimeUnit",
"timeUnit",
")",
"{",
"int",
"units",
"=",
"timeUnit",
".",
"getValue",
"(",
")",
";",
"String",
"result",
";",
"String",
"[",
"]",
"[",
"]",
"unitNames",
"=",
"LocaleData",
".",
"getStringArrays",
"(... | This method formats a time unit.
@param timeUnit time unit instance
@return formatted time unit instance | [
"This",
"method",
"formats",
"a",
"time",
"unit",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1283-L1299 |
156,891 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXWriter.java | MPXWriter.formatType | @SuppressWarnings("unchecked") private Object formatType(DataType type, Object value)
{
switch (type)
{
case DATE:
{
value = formatDateTime(value);
break;
}
case CURRENCY:
{
value = formatCurrency((Number) value);
... | java | @SuppressWarnings("unchecked") private Object formatType(DataType type, Object value)
{
switch (type)
{
case DATE:
{
value = formatDateTime(value);
break;
}
case CURRENCY:
{
value = formatCurrency((Number) value);
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"Object",
"formatType",
"(",
"DataType",
"type",
",",
"Object",
"value",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"DATE",
":",
"{",
"value",
"=",
"formatDateTime",
"(",
"value",
")",
... | Converts a value to the appropriate type.
@param type target type
@param value input value
@return output value | [
"Converts",
"a",
"value",
"to",
"the",
"appropriate",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L1319-L1397 |
156,892 | joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/MapRow.java | MapRow.getBoolean | public final boolean getBoolean(String name)
{
boolean result = false;
Boolean value = (Boolean) getObject(name);
if (value != null)
{
result = BooleanHelper.getBoolean(value);
}
return result;
} | java | public final boolean getBoolean(String name)
{
boolean result = false;
Boolean value = (Boolean) getObject(name);
if (value != null)
{
result = BooleanHelper.getBoolean(value);
}
return result;
} | [
"public",
"final",
"boolean",
"getBoolean",
"(",
"String",
"name",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"Boolean",
"value",
"=",
"(",
"Boolean",
")",
"getObject",
"(",
"name",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"result",... | Retrieve a boolean value.
@param name column name
@return boolean value | [
"Retrieve",
"a",
"boolean",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/MapRow.java#L90-L99 |
156,893 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/DocumentInputStreamFactory.java | DocumentInputStreamFactory.getInstance | public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
... | java | public InputStream getInstance(DirectoryEntry directory, String name) throws IOException
{
DocumentEntry entry = (DocumentEntry) directory.getEntry(name);
InputStream stream;
if (m_encrypted)
{
stream = new EncryptedDocumentInputStream(entry, m_encryptionCode);
}
else
... | [
"public",
"InputStream",
"getInstance",
"(",
"DirectoryEntry",
"directory",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"DocumentEntry",
"entry",
"=",
"(",
"DocumentEntry",
")",
"directory",
".",
"getEntry",
"(",
"name",
")",
";",
"InputStream",
"s... | Method used to instantiate the appropriate input stream reader,
a standard one, or one which can deal with "encrypted" data.
@param directory directory entry
@param name file name
@return new input stream
@throws IOException | [
"Method",
"used",
"to",
"instantiate",
"the",
"appropriate",
"input",
"stream",
"reader",
"a",
"standard",
"one",
"or",
"one",
"which",
"can",
"deal",
"with",
"encrypted",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/DocumentInputStreamFactory.java#L59-L73 |
156,894 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/GanttBarStyleFactory14.java | GanttBarStyleFactory14.getTaskField | private TaskField getTaskField(int field)
{
TaskField result = MPPTaskField14.getInstance(field);
if (result != null)
{
switch (result)
{
case START_TEXT:
{
result = TaskField.START;
break;
}
case FINI... | java | private TaskField getTaskField(int field)
{
TaskField result = MPPTaskField14.getInstance(field);
if (result != null)
{
switch (result)
{
case START_TEXT:
{
result = TaskField.START;
break;
}
case FINI... | [
"private",
"TaskField",
"getTaskField",
"(",
"int",
"field",
")",
"{",
"TaskField",
"result",
"=",
"MPPTaskField14",
".",
"getInstance",
"(",
"field",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"switch",
"(",
"result",
")",
"{",
"case",
"STAR... | Maps an integer field ID to a field type.
@param field field ID
@return field type | [
"Maps",
"an",
"integer",
"field",
"ID",
"to",
"a",
"field",
"type",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/GanttBarStyleFactory14.java#L173-L207 |
156,895 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectConfig.java | ProjectConfig.updateUniqueCounters | public void updateUniqueCounters()
{
//
// Update task unique IDs
//
for (Task task : m_parent.getTasks())
{
int uniqueID = NumberHelper.getInt(task.getUniqueID());
if (uniqueID > m_taskUniqueID)
{
m_taskUniqueID = uniqueID;
}
}
... | java | public void updateUniqueCounters()
{
//
// Update task unique IDs
//
for (Task task : m_parent.getTasks())
{
int uniqueID = NumberHelper.getInt(task.getUniqueID());
if (uniqueID > m_taskUniqueID)
{
m_taskUniqueID = uniqueID;
}
}
... | [
"public",
"void",
"updateUniqueCounters",
"(",
")",
"{",
"//",
"// Update task unique IDs",
"//",
"for",
"(",
"Task",
"task",
":",
"m_parent",
".",
"getTasks",
"(",
")",
")",
"{",
"int",
"uniqueID",
"=",
"NumberHelper",
".",
"getInt",
"(",
"task",
".",
"ge... | This method is called to ensure that after a project file has been
read, the cached unique ID values used to generate new unique IDs
start after the end of the existing set of unique IDs. | [
"This",
"method",
"is",
"called",
"to",
"ensure",
"that",
"after",
"a",
"project",
"file",
"has",
"been",
"read",
"the",
"cached",
"unique",
"ID",
"values",
"used",
"to",
"generate",
"new",
"unique",
"IDs",
"start",
"after",
"the",
"end",
"of",
"the",
"e... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectConfig.java#L297-L346 |
156,896 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.min | public static Date min(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) < 0) ? d1 : d2;
}
return result;
... | java | public static Date min(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) < 0) ? d1 : d2;
}
return result;
... | [
"public",
"static",
"Date",
"min",
"(",
"Date",
"d1",
",",
"Date",
"d2",
")",
"{",
"Date",
"result",
";",
"if",
"(",
"d1",
"==",
"null",
")",
"{",
"result",
"=",
"d2",
";",
"}",
"else",
"if",
"(",
"d2",
"==",
"null",
")",
"{",
"result",
"=",
... | Returns the earlier of two dates, handling null values. A non-null Date
is always considered to be earlier than a null Date.
@param d1 Date instance
@param d2 Date instance
@return Date earliest date | [
"Returns",
"the",
"earlier",
"of",
"two",
"dates",
"handling",
"null",
"values",
".",
"A",
"non",
"-",
"null",
"Date",
"is",
"always",
"considered",
"to",
"be",
"earlier",
"than",
"a",
"null",
"Date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L191-L208 |
156,897 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.max | public static Date max(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) > 0) ? d1 : d2;
}
return result;
... | java | public static Date max(Date d1, Date d2)
{
Date result;
if (d1 == null)
{
result = d2;
}
else
if (d2 == null)
{
result = d1;
}
else
{
result = (d1.compareTo(d2) > 0) ? d1 : d2;
}
return result;
... | [
"public",
"static",
"Date",
"max",
"(",
"Date",
"d1",
",",
"Date",
"d2",
")",
"{",
"Date",
"result",
";",
"if",
"(",
"d1",
"==",
"null",
")",
"{",
"result",
"=",
"d2",
";",
"}",
"else",
"if",
"(",
"d2",
"==",
"null",
")",
"{",
"result",
"=",
... | Returns the later of two dates, handling null values. A non-null Date
is always considered to be later than a null Date.
@param d1 Date instance
@param d2 Date instance
@return Date latest date | [
"Returns",
"the",
"later",
"of",
"two",
"dates",
"handling",
"null",
"values",
".",
"A",
"non",
"-",
"null",
"Date",
"is",
"always",
"considered",
"to",
"be",
"later",
"than",
"a",
"null",
"Date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L218-L235 |
156,898 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getVariance | public static Duration getVariance(Task task, Date date1, Date date2, TimeUnit format)
{
Duration variance = null;
if (date1 != null && date2 != null)
{
ProjectCalendar calendar = task.getEffectiveCalendar();
if (calendar != null)
{
variance = calendar.getWor... | java | public static Duration getVariance(Task task, Date date1, Date date2, TimeUnit format)
{
Duration variance = null;
if (date1 != null && date2 != null)
{
ProjectCalendar calendar = task.getEffectiveCalendar();
if (calendar != null)
{
variance = calendar.getWor... | [
"public",
"static",
"Duration",
"getVariance",
"(",
"Task",
"task",
",",
"Date",
"date1",
",",
"Date",
"date2",
",",
"TimeUnit",
"format",
")",
"{",
"Duration",
"variance",
"=",
"null",
";",
"if",
"(",
"date1",
"!=",
"null",
"&&",
"date2",
"!=",
"null",
... | This utility method calculates the difference in working
time between two dates, given the context of a task.
@param task parent task
@param date1 first date
@param date2 second date
@param format required format for the resulting duration
@return difference in working time between the two dates | [
"This",
"utility",
"method",
"calculates",
"the",
"difference",
"in",
"working",
"time",
"between",
"two",
"dates",
"given",
"the",
"context",
"of",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L247-L266 |
156,899 | joniles/mpxj | src/main/java/net/sf/mpxj/common/DateHelper.java | DateHelper.getDateFromLong | public static Date getDateFromLong(long date)
{
TimeZone tz = TimeZone.getDefault();
return (new Date(date - tz.getRawOffset()));
} | java | public static Date getDateFromLong(long date)
{
TimeZone tz = TimeZone.getDefault();
return (new Date(date - tz.getRawOffset()));
} | [
"public",
"static",
"Date",
"getDateFromLong",
"(",
"long",
"date",
")",
"{",
"TimeZone",
"tz",
"=",
"TimeZone",
".",
"getDefault",
"(",
")",
";",
"return",
"(",
"new",
"Date",
"(",
"date",
"-",
"tz",
".",
"getRawOffset",
"(",
")",
")",
")",
";",
"}"... | Creates a date from the equivalent long value. This conversion
takes account of the time zone.
@param date date expressed as a long integer
@return new Date instance | [
"Creates",
"a",
"date",
"from",
"the",
"equivalent",
"long",
"value",
".",
"This",
"conversion",
"takes",
"account",
"of",
"the",
"time",
"zone",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L275-L279 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.