id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
157,100 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createFieldMap | private void createFieldMap(byte[] data)
{
int index = 0;
int lastDataBlockOffset = 0;
int dataBlockIndex = 0;
while (index < data.length)
{
long mask = MPPUtility.getInt(data, index + 0);
//mask = mask << 4;
int dataBlockOffset = MPPUtility.getShort(data, i... | java | private void createFieldMap(byte[] data)
{
int index = 0;
int lastDataBlockOffset = 0;
int dataBlockIndex = 0;
while (index < data.length)
{
long mask = MPPUtility.getInt(data, index + 0);
//mask = mask << 4;
int dataBlockOffset = MPPUtility.getShort(data, i... | [
"private",
"void",
"createFieldMap",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"int",
"index",
"=",
"0",
";",
"int",
"lastDataBlockOffset",
"=",
"0",
";",
"int",
"dataBlockIndex",
"=",
"0",
";",
"while",
"(",
"index",
"<",
"data",
".",
"length",
")",
... | Generic method used to create a field map from a block of data.
@param data field map data | [
"Generic",
"method",
"used",
"to",
"create",
"a",
"field",
"map",
"from",
"a",
"block",
"of",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L88-L200 |
157,101 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createTaskFieldMap | public void createTaskFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : TASK_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
populateDe... | java | public void createTaskFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : TASK_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
populateDe... | [
"public",
"void",
"createTaskFieldMap",
"(",
"Props",
"props",
")",
"{",
"byte",
"[",
"]",
"fieldMapData",
"=",
"null",
";",
"for",
"(",
"Integer",
"key",
":",
"TASK_KEYS",
")",
"{",
"fieldMapData",
"=",
"props",
".",
"getByteArray",
"(",
"key",
")",
";"... | Creates a field map for tasks.
@param props props data | [
"Creates",
"a",
"field",
"map",
"for",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L261-L281 |
157,102 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createRelationFieldMap | public void createRelationFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : RELATION_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
po... | java | public void createRelationFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : RELATION_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
po... | [
"public",
"void",
"createRelationFieldMap",
"(",
"Props",
"props",
")",
"{",
"byte",
"[",
"]",
"fieldMapData",
"=",
"null",
";",
"for",
"(",
"Integer",
"key",
":",
"RELATION_KEYS",
")",
"{",
"fieldMapData",
"=",
"props",
".",
"getByteArray",
"(",
"key",
")... | Creates a field map for relations.
@param props props data | [
"Creates",
"a",
"field",
"map",
"for",
"relations",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L288-L308 |
157,103 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createEnterpriseCustomFieldMap | public void createEnterpriseCustomFieldMap(Props props, Class<?> c)
{
byte[] fieldMapData = null;
for (Integer key : ENTERPRISE_CUSTOM_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData... | java | public void createEnterpriseCustomFieldMap(Props props, Class<?> c)
{
byte[] fieldMapData = null;
for (Integer key : ENTERPRISE_CUSTOM_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData... | [
"public",
"void",
"createEnterpriseCustomFieldMap",
"(",
"Props",
"props",
",",
"Class",
"<",
"?",
">",
"c",
")",
"{",
"byte",
"[",
"]",
"fieldMapData",
"=",
"null",
";",
"for",
"(",
"Integer",
"key",
":",
"ENTERPRISE_CUSTOM_KEYS",
")",
"{",
"fieldMapData",
... | Create a field map for enterprise custom fields.
@param props props data
@param c target class | [
"Create",
"a",
"field",
"map",
"for",
"enterprise",
"custom",
"fields",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L316-L349 |
157,104 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createResourceFieldMap | public void createResourceFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : RESOURCE_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
po... | java | public void createResourceFieldMap(Props props)
{
byte[] fieldMapData = null;
for (Integer key : RESOURCE_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if (fieldMapData == null)
{
po... | [
"public",
"void",
"createResourceFieldMap",
"(",
"Props",
"props",
")",
"{",
"byte",
"[",
"]",
"fieldMapData",
"=",
"null",
";",
"for",
"(",
"Integer",
"key",
":",
"RESOURCE_KEYS",
")",
"{",
"fieldMapData",
"=",
"props",
".",
"getByteArray",
"(",
"key",
")... | Creates a field map for resources.
@param props props data | [
"Creates",
"a",
"field",
"map",
"for",
"resources",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L356-L376 |
157,105 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.createAssignmentFieldMap | public void createAssignmentFieldMap(Props props)
{
//System.out.println("ASSIGN");
byte[] fieldMapData = null;
for (Integer key : ASSIGNMENT_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if ... | java | public void createAssignmentFieldMap(Props props)
{
//System.out.println("ASSIGN");
byte[] fieldMapData = null;
for (Integer key : ASSIGNMENT_KEYS)
{
fieldMapData = props.getByteArray(key);
if (fieldMapData != null)
{
break;
}
}
if ... | [
"public",
"void",
"createAssignmentFieldMap",
"(",
"Props",
"props",
")",
"{",
"//System.out.println(\"ASSIGN\");",
"byte",
"[",
"]",
"fieldMapData",
"=",
"null",
";",
"for",
"(",
"Integer",
"key",
":",
"ASSIGNMENT_KEYS",
")",
"{",
"fieldMapData",
"=",
"props",
... | Creates a field map for assignments.
@param props props data | [
"Creates",
"a",
"field",
"map",
"for",
"assignments",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L383-L404 |
157,106 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.populateDefaultData | private void populateDefaultData(FieldItem[] defaultData)
{
for (FieldItem item : defaultData)
{
m_map.put(item.getType(), item);
}
} | java | private void populateDefaultData(FieldItem[] defaultData)
{
for (FieldItem item : defaultData)
{
m_map.put(item.getType(), item);
}
} | [
"private",
"void",
"populateDefaultData",
"(",
"FieldItem",
"[",
"]",
"defaultData",
")",
"{",
"for",
"(",
"FieldItem",
"item",
":",
"defaultData",
")",
"{",
"m_map",
".",
"put",
"(",
"item",
".",
"getType",
"(",
")",
",",
"item",
")",
";",
"}",
"}"
] | This method takes an array of data and uses this to populate the
field map.
@param defaultData field map default data | [
"This",
"method",
"takes",
"an",
"array",
"of",
"data",
"and",
"uses",
"this",
"to",
"populate",
"the",
"field",
"map",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L412-L418 |
157,107 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.populateContainer | public void populateContainer(Class<? extends FieldType> type, FieldContainer container, Integer id, byte[][] fixedData, Var2Data varData)
{
//System.out.println(container.getClass().getSimpleName()+": " + id);
for (FieldItem item : m_map.values())
{
if (item.getType().getClass().equals(ty... | java | public void populateContainer(Class<? extends FieldType> type, FieldContainer container, Integer id, byte[][] fixedData, Var2Data varData)
{
//System.out.println(container.getClass().getSimpleName()+": " + id);
for (FieldItem item : m_map.values())
{
if (item.getType().getClass().equals(ty... | [
"public",
"void",
"populateContainer",
"(",
"Class",
"<",
"?",
"extends",
"FieldType",
">",
"type",
",",
"FieldContainer",
"container",
",",
"Integer",
"id",
",",
"byte",
"[",
"]",
"[",
"]",
"fixedData",
",",
"Var2Data",
"varData",
")",
"{",
"//System.out.pr... | Given a container, and a set of raw data blocks, this method extracts
the field data and writes it into the container.
@param type expected type
@param container field container
@param id entity ID
@param fixedData fixed data block
@param varData var data block | [
"Given",
"a",
"container",
"and",
"a",
"set",
"of",
"raw",
"data",
"blocks",
"this",
"method",
"extracts",
"the",
"field",
"data",
"and",
"writes",
"it",
"into",
"the",
"container",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L430-L443 |
157,108 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getFixedDataOffset | public int getFixedDataOffset(FieldType type)
{
int result;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getFixedDataOffset();
}
else
{
result = -1;
}
return result;
} | java | public int getFixedDataOffset(FieldType type)
{
int result;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getFixedDataOffset();
}
else
{
result = -1;
}
return result;
} | [
"public",
"int",
"getFixedDataOffset",
"(",
"FieldType",
"type",
")",
"{",
"int",
"result",
";",
"FieldItem",
"item",
"=",
"m_map",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"result",
"=",
"item",
".",
"getFixedDataO... | Retrieve the fixed data offset for a specific field.
@param type field type
@return offset | [
"Retrieve",
"the",
"fixed",
"data",
"offset",
"for",
"a",
"specific",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L462-L475 |
157,109 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getVarDataKey | public Integer getVarDataKey(FieldType type)
{
Integer result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getVarDataKey();
}
return result;
} | java | public Integer getVarDataKey(FieldType type)
{
Integer result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getVarDataKey();
}
return result;
} | [
"public",
"Integer",
"getVarDataKey",
"(",
"FieldType",
"type",
")",
"{",
"Integer",
"result",
"=",
"null",
";",
"FieldItem",
"item",
"=",
"m_map",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"result",
"=",
"item",
"... | Retrieve the var data key for a specific field.
@param type field type
@return var data key | [
"Retrieve",
"the",
"var",
"data",
"key",
"for",
"a",
"specific",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L483-L492 |
157,110 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getFieldTypeFromVarDataKey | public FieldType getFieldTypeFromVarDataKey(Integer key)
{
FieldType result = null;
for (Entry<FieldType, FieldMap.FieldItem> entry : m_map.entrySet())
{
if (entry.getValue().getFieldLocation() == FieldLocation.VAR_DATA && entry.getValue().getVarDataKey().equals(key))
{
... | java | public FieldType getFieldTypeFromVarDataKey(Integer key)
{
FieldType result = null;
for (Entry<FieldType, FieldMap.FieldItem> entry : m_map.entrySet())
{
if (entry.getValue().getFieldLocation() == FieldLocation.VAR_DATA && entry.getValue().getVarDataKey().equals(key))
{
... | [
"public",
"FieldType",
"getFieldTypeFromVarDataKey",
"(",
"Integer",
"key",
")",
"{",
"FieldType",
"result",
"=",
"null",
";",
"for",
"(",
"Entry",
"<",
"FieldType",
",",
"FieldMap",
".",
"FieldItem",
">",
"entry",
":",
"m_map",
".",
"entrySet",
"(",
")",
... | Used to map from a var data key to a field type. Note this
is designed for diagnostic use only, and uses an inefficient search.
@param key var data key
@return field type | [
"Used",
"to",
"map",
"from",
"a",
"var",
"data",
"key",
"to",
"a",
"field",
"type",
".",
"Note",
"this",
"is",
"designed",
"for",
"diagnostic",
"use",
"only",
"and",
"uses",
"an",
"inefficient",
"search",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L501-L513 |
157,111 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getFieldLocation | public FieldLocation getFieldLocation(FieldType type)
{
FieldLocation result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getFieldLocation();
}
return result;
} | java | public FieldLocation getFieldLocation(FieldType type)
{
FieldLocation result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.getFieldLocation();
}
return result;
} | [
"public",
"FieldLocation",
"getFieldLocation",
"(",
"FieldType",
"type",
")",
"{",
"FieldLocation",
"result",
"=",
"null",
";",
"FieldItem",
"item",
"=",
"m_map",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"result",
"="... | Retrieve the field location for a specific field.
@param type field type
@return field location | [
"Retrieve",
"the",
"field",
"location",
"for",
"a",
"specific",
"field",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L521-L531 |
157,112 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getFieldData | protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Var2Data varData)
{
Object result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.read(id, fixedData, varData);
}
return result;
} | java | protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Var2Data varData)
{
Object result = null;
FieldItem item = m_map.get(type);
if (item != null)
{
result = item.read(id, fixedData, varData);
}
return result;
} | [
"protected",
"Object",
"getFieldData",
"(",
"Integer",
"id",
",",
"FieldType",
"type",
",",
"byte",
"[",
"]",
"[",
"]",
"fixedData",
",",
"Var2Data",
"varData",
")",
"{",
"Object",
"result",
"=",
"null",
";",
"FieldItem",
"item",
"=",
"m_map",
".",
"get"... | Retrieve a single field value.
@param id parent entity ID
@param type field type
@param fixedData fixed data block
@param varData var data block
@return field value | [
"Retrieve",
"a",
"single",
"field",
"value",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L542-L553 |
157,113 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.dumpKnownFieldMaps | public void dumpKnownFieldMaps(Props props)
{
//for (int key=131092; key < 131098; key++)
for (int key = 50331668; key < 50331674; key++)
{
byte[] fieldMapData = props.getByteArray(Integer.valueOf(key));
if (fieldMapData != null)
{
System.out.println("KEY: " +... | java | public void dumpKnownFieldMaps(Props props)
{
//for (int key=131092; key < 131098; key++)
for (int key = 50331668; key < 50331674; key++)
{
byte[] fieldMapData = props.getByteArray(Integer.valueOf(key));
if (fieldMapData != null)
{
System.out.println("KEY: " +... | [
"public",
"void",
"dumpKnownFieldMaps",
"(",
"Props",
"props",
")",
"{",
"//for (int key=131092; key < 131098; key++)",
"for",
"(",
"int",
"key",
"=",
"50331668",
";",
"key",
"<",
"50331674",
";",
"key",
"++",
")",
"{",
"byte",
"[",
"]",
"fieldMapData",
"=",
... | Diagnostic method used to dump known field map data.
@param props props block containing field map data | [
"Diagnostic",
"method",
"used",
"to",
"dump",
"known",
"field",
"map",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L579-L593 |
157,114 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/FieldMap.java | FieldMap.getFixedDataFieldSize | private int getFixedDataFieldSize(FieldType type)
{
int result = 0;
DataType dataType = type.getDataType();
if (dataType != null)
{
switch (dataType)
{
case DATE:
case INTEGER:
case DURATION:
{
result = 4;
... | java | private int getFixedDataFieldSize(FieldType type)
{
int result = 0;
DataType dataType = type.getDataType();
if (dataType != null)
{
switch (dataType)
{
case DATE:
case INTEGER:
case DURATION:
{
result = 4;
... | [
"private",
"int",
"getFixedDataFieldSize",
"(",
"FieldType",
"type",
")",
"{",
"int",
"result",
"=",
"0",
";",
"DataType",
"dataType",
"=",
"type",
".",
"getDataType",
"(",
")",
";",
"if",
"(",
"dataType",
"!=",
"null",
")",
"{",
"switch",
"(",
"dataType... | Determine the size of a field in a fixed data block.
@param type field data type
@return field size in bytes | [
"Determine",
"the",
"size",
"of",
"a",
"field",
"in",
"a",
"fixed",
"data",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L601-L665 |
157,115 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.setParent | void setParent(ProjectCalendarWeek parent)
{
m_parent = parent;
for (int loop = 0; loop < m_days.length; loop++)
{
if (m_days[loop] == null)
{
m_days[loop] = DayType.DEFAULT;
}
}
} | java | void setParent(ProjectCalendarWeek parent)
{
m_parent = parent;
for (int loop = 0; loop < m_days.length; loop++)
{
if (m_days[loop] == null)
{
m_days[loop] = DayType.DEFAULT;
}
}
} | [
"void",
"setParent",
"(",
"ProjectCalendarWeek",
"parent",
")",
"{",
"m_parent",
"=",
"parent",
";",
"for",
"(",
"int",
"loop",
"=",
"0",
";",
"loop",
"<",
"m_days",
".",
"length",
";",
"loop",
"++",
")",
"{",
"if",
"(",
"m_days",
"[",
"loop",
"]",
... | Set the parent from which this week is derived.
@param parent parent week | [
"Set",
"the",
"parent",
"from",
"which",
"this",
"week",
"is",
"derived",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L94-L105 |
157,116 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.getHours | public ProjectCalendarHours getHours(Day day)
{
ProjectCalendarHours result = getCalendarHours(day);
if (result == null)
{
//
// If this is a base calendar and we have no hours, then we
// have a problem - so we add the default hours and try again
//
if ... | java | public ProjectCalendarHours getHours(Day day)
{
ProjectCalendarHours result = getCalendarHours(day);
if (result == null)
{
//
// If this is a base calendar and we have no hours, then we
// have a problem - so we add the default hours and try again
//
if ... | [
"public",
"ProjectCalendarHours",
"getHours",
"(",
"Day",
"day",
")",
"{",
"ProjectCalendarHours",
"result",
"=",
"getCalendarHours",
"(",
"day",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"//",
"// If this is a base calendar and we have no hours, then we"... | This method retrieves the calendar hours for the specified day.
Note that if this is a derived calendar, then this method
will refer to the base calendar where no hours are specified
in the derived calendar.
@param day Day instance
@return calendar hours | [
"This",
"method",
"retrieves",
"the",
"calendar",
"hours",
"for",
"the",
"specified",
"day",
".",
"Note",
"that",
"if",
"this",
"is",
"a",
"derived",
"calendar",
"then",
"this",
"method",
"will",
"refer",
"to",
"the",
"base",
"calendar",
"where",
"no",
"ho... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L162-L183 |
157,117 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.addDefaultCalendarHours | public void addDefaultCalendarHours(Day day)
{
ProjectCalendarHours hours = addCalendarHours(day);
if (day != Day.SATURDAY && day != Day.SUNDAY)
{
hours.addRange(DEFAULT_WORKING_MORNING);
hours.addRange(DEFAULT_WORKING_AFTERNOON);
}
} | java | public void addDefaultCalendarHours(Day day)
{
ProjectCalendarHours hours = addCalendarHours(day);
if (day != Day.SATURDAY && day != Day.SUNDAY)
{
hours.addRange(DEFAULT_WORKING_MORNING);
hours.addRange(DEFAULT_WORKING_AFTERNOON);
}
} | [
"public",
"void",
"addDefaultCalendarHours",
"(",
"Day",
"day",
")",
"{",
"ProjectCalendarHours",
"hours",
"=",
"addCalendarHours",
"(",
"day",
")",
";",
"if",
"(",
"day",
"!=",
"Day",
".",
"SATURDAY",
"&&",
"day",
"!=",
"Day",
".",
"SUNDAY",
")",
"{",
"... | This is a convenience method used to add a default set of calendar
hours to a calendar.
@param day Day for which to add default hours for | [
"This",
"is",
"a",
"convenience",
"method",
"used",
"to",
"add",
"a",
"default",
"set",
"of",
"calendar",
"hours",
"to",
"a",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L203-L212 |
157,118 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.addCalendarHours | public ProjectCalendarHours addCalendarHours(Day day)
{
ProjectCalendarHours bch = new ProjectCalendarHours(this);
bch.setDay(day);
m_hours[day.getValue() - 1] = bch;
return (bch);
} | java | public ProjectCalendarHours addCalendarHours(Day day)
{
ProjectCalendarHours bch = new ProjectCalendarHours(this);
bch.setDay(day);
m_hours[day.getValue() - 1] = bch;
return (bch);
} | [
"public",
"ProjectCalendarHours",
"addCalendarHours",
"(",
"Day",
"day",
")",
"{",
"ProjectCalendarHours",
"bch",
"=",
"new",
"ProjectCalendarHours",
"(",
"this",
")",
";",
"bch",
".",
"setDay",
"(",
"day",
")",
";",
"m_hours",
"[",
"day",
".",
"getValue",
"... | Used to add working hours to the calendar. Note that the MPX file
definition allows a maximum of 7 calendar hours records to be added to
a single calendar.
@param day day number
@return new ProjectCalendarHours instance | [
"Used",
"to",
"add",
"working",
"hours",
"to",
"the",
"calendar",
".",
"Note",
"that",
"the",
"MPX",
"file",
"definition",
"allows",
"a",
"maximum",
"of",
"7",
"calendar",
"hours",
"records",
"to",
"be",
"added",
"to",
"a",
"single",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L222-L228 |
157,119 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.attachHoursToDay | public void attachHoursToDay(ProjectCalendarHours hours)
{
if (hours.getParentCalendar() != this)
{
throw new IllegalArgumentException();
}
m_hours[hours.getDay().getValue() - 1] = hours;
} | java | public void attachHoursToDay(ProjectCalendarHours hours)
{
if (hours.getParentCalendar() != this)
{
throw new IllegalArgumentException();
}
m_hours[hours.getDay().getValue() - 1] = hours;
} | [
"public",
"void",
"attachHoursToDay",
"(",
"ProjectCalendarHours",
"hours",
")",
"{",
"if",
"(",
"hours",
".",
"getParentCalendar",
"(",
")",
"!=",
"this",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"m_hours",
"[",
"hours",
"."... | Attaches a pre-existing set of hours to the correct
day within the calendar.
@param hours calendar hours instance | [
"Attaches",
"a",
"pre",
"-",
"existing",
"set",
"of",
"hours",
"to",
"the",
"correct",
"day",
"within",
"the",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L236-L243 |
157,120 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.removeHoursFromDay | public void removeHoursFromDay(ProjectCalendarHours hours)
{
if (hours.getParentCalendar() != this)
{
throw new IllegalArgumentException();
}
m_hours[hours.getDay().getValue() - 1] = null;
} | java | public void removeHoursFromDay(ProjectCalendarHours hours)
{
if (hours.getParentCalendar() != this)
{
throw new IllegalArgumentException();
}
m_hours[hours.getDay().getValue() - 1] = null;
} | [
"public",
"void",
"removeHoursFromDay",
"(",
"ProjectCalendarHours",
"hours",
")",
"{",
"if",
"(",
"hours",
".",
"getParentCalendar",
"(",
")",
"!=",
"this",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"m_hours",
"[",
"hours",
"... | Removes a set of calendar hours from the day to which they
are currently attached.
@param hours calendar hours instance | [
"Removes",
"a",
"set",
"of",
"calendar",
"hours",
"from",
"the",
"day",
"to",
"which",
"they",
"are",
"currently",
"attached",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L251-L258 |
157,121 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.setWorkingDay | public void setWorkingDay(Day day, boolean working)
{
setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING));
} | java | public void setWorkingDay(Day day, boolean working)
{
setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING));
} | [
"public",
"void",
"setWorkingDay",
"(",
"Day",
"day",
",",
"boolean",
"working",
")",
"{",
"setWorkingDay",
"(",
"day",
",",
"(",
"working",
"?",
"DayType",
".",
"WORKING",
":",
"DayType",
".",
"NON_WORKING",
")",
")",
";",
"}"
] | convenience method for setting working or non-working days.
@param day required day
@param working flag indicating if the day is a working day | [
"convenience",
"method",
"for",
"setting",
"working",
"or",
"non",
"-",
"working",
"days",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L294-L297 |
157,122 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarWeek.java | ProjectCalendarWeek.setWorkingDay | public void setWorkingDay(Day day, DayType working)
{
DayType value;
if (working == null)
{
if (isDerived())
{
value = DayType.DEFAULT;
}
else
{
value = DayType.WORKING;
}
}
else
{
value = work... | java | public void setWorkingDay(Day day, DayType working)
{
DayType value;
if (working == null)
{
if (isDerived())
{
value = DayType.DEFAULT;
}
else
{
value = DayType.WORKING;
}
}
else
{
value = work... | [
"public",
"void",
"setWorkingDay",
"(",
"Day",
"day",
",",
"DayType",
"working",
")",
"{",
"DayType",
"value",
";",
"if",
"(",
"working",
"==",
"null",
")",
"{",
"if",
"(",
"isDerived",
"(",
")",
")",
"{",
"value",
"=",
"DayType",
".",
"DEFAULT",
";"... | This is a convenience method provided to allow a day to be set
as working or non-working, by using the day number to
identify the required day.
@param day required day
@param working flag indicating if the day is a working day | [
"This",
"is",
"a",
"convenience",
"method",
"provided",
"to",
"allow",
"a",
"day",
"to",
"be",
"set",
"as",
"working",
"or",
"non",
"-",
"working",
"by",
"using",
"the",
"day",
"number",
"to",
"identify",
"the",
"required",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L307-L328 |
157,123 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.readCalendar | private void readCalendar(Gantt gantt)
{
Gantt.Calendar ganttCalendar = gantt.getCalendar();
m_projectFile.getProjectProperties().setWeekStartDay(ganttCalendar.getWeekStart());
ProjectCalendar calendar = m_projectFile.addCalendar();
calendar.setName("Standard");
m_projectFile.setDefaul... | java | private void readCalendar(Gantt gantt)
{
Gantt.Calendar ganttCalendar = gantt.getCalendar();
m_projectFile.getProjectProperties().setWeekStartDay(ganttCalendar.getWeekStart());
ProjectCalendar calendar = m_projectFile.addCalendar();
calendar.setName("Standard");
m_projectFile.setDefaul... | [
"private",
"void",
"readCalendar",
"(",
"Gantt",
"gantt",
")",
"{",
"Gantt",
".",
"Calendar",
"ganttCalendar",
"=",
"gantt",
".",
"getCalendar",
"(",
")",
";",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
".",
"setWeekStartDay",
"(",
"ganttCalendar",
... | Read the calendar data from a Gantt Designer file.
@param gantt Gantt Designer file. | [
"Read",
"the",
"calendar",
"data",
"from",
"a",
"Gantt",
"Designer",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L162-L196 |
157,124 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.processTasks | private void processTasks(Gantt gantt)
{
ProjectCalendar calendar = m_projectFile.getDefaultCalendar();
for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())
{
String wbs = ganttTask.getID();
ChildTaskContainer parentTask = getParentTask(wbs);
Task task = parent... | java | private void processTasks(Gantt gantt)
{
ProjectCalendar calendar = m_projectFile.getDefaultCalendar();
for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())
{
String wbs = ganttTask.getID();
ChildTaskContainer parentTask = getParentTask(wbs);
Task task = parent... | [
"private",
"void",
"processTasks",
"(",
"Gantt",
"gantt",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"m_projectFile",
".",
"getDefaultCalendar",
"(",
")",
";",
"for",
"(",
"Gantt",
".",
"Tasks",
".",
"Task",
"ganttTask",
":",
"gantt",
".",
"getTasks",
"("... | Read task data from a Gantt Designer file.
@param gantt Gantt Designer file | [
"Read",
"task",
"data",
"from",
"a",
"Gantt",
"Designer",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L215-L242 |
157,125 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.processPredecessors | private void processPredecessors(Gantt gantt)
{
for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())
{
String predecessors = ganttTask.getP();
if (predecessors != null && !predecessors.isEmpty())
{
String wbs = ganttTask.getID();
Task task = m_t... | java | private void processPredecessors(Gantt gantt)
{
for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())
{
String predecessors = ganttTask.getP();
if (predecessors != null && !predecessors.isEmpty())
{
String wbs = ganttTask.getID();
Task task = m_t... | [
"private",
"void",
"processPredecessors",
"(",
"Gantt",
"gantt",
")",
"{",
"for",
"(",
"Gantt",
".",
"Tasks",
".",
"Task",
"ganttTask",
":",
"gantt",
".",
"getTasks",
"(",
")",
".",
"getTask",
"(",
")",
")",
"{",
"String",
"predecessors",
"=",
"ganttTask... | Read predecessors from a Gantt Designer file.
@param gantt Gantt Designer file | [
"Read",
"predecessors",
"from",
"a",
"Gantt",
"Designer",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L249-L265 |
157,126 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.processRemarks | private void processRemarks(Gantt gantt)
{
processRemarks(gantt.getRemarks());
processRemarks(gantt.getRemarks1());
processRemarks(gantt.getRemarks2());
processRemarks(gantt.getRemarks3());
processRemarks(gantt.getRemarks4());
} | java | private void processRemarks(Gantt gantt)
{
processRemarks(gantt.getRemarks());
processRemarks(gantt.getRemarks1());
processRemarks(gantt.getRemarks2());
processRemarks(gantt.getRemarks3());
processRemarks(gantt.getRemarks4());
} | [
"private",
"void",
"processRemarks",
"(",
"Gantt",
"gantt",
")",
"{",
"processRemarks",
"(",
"gantt",
".",
"getRemarks",
"(",
")",
")",
";",
"processRemarks",
"(",
"gantt",
".",
"getRemarks1",
"(",
")",
")",
";",
"processRemarks",
"(",
"gantt",
".",
"getRe... | Read remarks from a Gantt Designer file.
@param gantt Gantt Designer file | [
"Read",
"remarks",
"from",
"a",
"Gantt",
"Designer",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L272-L279 |
157,127 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.processRemarks | private void processRemarks(GanttDesignerRemark remark)
{
for (GanttDesignerRemark.Task remarkTask : remark.getTask())
{
Integer id = remarkTask.getRow();
Task task = m_projectFile.getTaskByID(id);
String notes = task.getNotes();
if (notes.isEmpty())
{
... | java | private void processRemarks(GanttDesignerRemark remark)
{
for (GanttDesignerRemark.Task remarkTask : remark.getTask())
{
Integer id = remarkTask.getRow();
Task task = m_projectFile.getTaskByID(id);
String notes = task.getNotes();
if (notes.isEmpty())
{
... | [
"private",
"void",
"processRemarks",
"(",
"GanttDesignerRemark",
"remark",
")",
"{",
"for",
"(",
"GanttDesignerRemark",
".",
"Task",
"remarkTask",
":",
"remark",
".",
"getTask",
"(",
")",
")",
"{",
"Integer",
"id",
"=",
"remarkTask",
".",
"getRow",
"(",
")",... | Read an individual remark type from a Gantt Designer file.
@param remark remark type | [
"Read",
"an",
"individual",
"remark",
"type",
"from",
"a",
"Gantt",
"Designer",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L286-L303 |
157,128 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.getParentWBS | private String getParentWBS(String wbs)
{
String result;
int index = wbs.lastIndexOf('.');
if (index == -1)
{
result = null;
}
else
{
result = wbs.substring(0, index);
}
return result;
} | java | private String getParentWBS(String wbs)
{
String result;
int index = wbs.lastIndexOf('.');
if (index == -1)
{
result = null;
}
else
{
result = wbs.substring(0, index);
}
return result;
} | [
"private",
"String",
"getParentWBS",
"(",
"String",
"wbs",
")",
"{",
"String",
"result",
";",
"int",
"index",
"=",
"wbs",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"result",
"=",
"null",
";",
"}",
... | Extract the parent WBS from a WBS.
@param wbs current WBS
@return parent WBS | [
"Extract",
"the",
"parent",
"WBS",
"from",
"a",
"WBS",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L311-L324 |
157,129 | joniles/mpxj | src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java | GanttDesignerReader.getParentTask | private ChildTaskContainer getParentTask(String wbs)
{
ChildTaskContainer result;
String parentWbs = getParentWBS(wbs);
if (parentWbs == null)
{
result = m_projectFile;
}
else
{
result = m_taskMap.get(parentWbs);
}
return result;
} | java | private ChildTaskContainer getParentTask(String wbs)
{
ChildTaskContainer result;
String parentWbs = getParentWBS(wbs);
if (parentWbs == null)
{
result = m_projectFile;
}
else
{
result = m_taskMap.get(parentWbs);
}
return result;
} | [
"private",
"ChildTaskContainer",
"getParentTask",
"(",
"String",
"wbs",
")",
"{",
"ChildTaskContainer",
"result",
";",
"String",
"parentWbs",
"=",
"getParentWBS",
"(",
"wbs",
")",
";",
"if",
"(",
"parentWbs",
"==",
"null",
")",
"{",
"result",
"=",
"m_projectFi... | Retrieve the parent task based on its WBS.
@param wbs parent WBS
@return parent task | [
"Retrieve",
"the",
"parent",
"task",
"based",
"on",
"its",
"WBS",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/GanttDesignerReader.java#L332-L345 |
157,130 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/PoiTreeModel.java | PoiTreeModel.getChildNodes | private List<Entry> getChildNodes(DirectoryEntry parent)
{
List<Entry> result = new ArrayList<Entry>();
Iterator<Entry> entries = parent.getEntries();
while (entries.hasNext())
{
result.add(entries.next());
}
return result;
} | java | private List<Entry> getChildNodes(DirectoryEntry parent)
{
List<Entry> result = new ArrayList<Entry>();
Iterator<Entry> entries = parent.getEntries();
while (entries.hasNext())
{
result.add(entries.next());
}
return result;
} | [
"private",
"List",
"<",
"Entry",
">",
"getChildNodes",
"(",
"DirectoryEntry",
"parent",
")",
"{",
"List",
"<",
"Entry",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"Entry",
">",
"(",
")",
";",
"Iterator",
"<",
"Entry",
">",
"entries",
"=",
"parent",
"... | Retrieves child nodes from a directory entry.
@param parent parent directory entry
@return list of child nodes | [
"Retrieves",
"child",
"nodes",
"from",
"a",
"directory",
"entry",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/PoiTreeModel.java#L136-L145 |
157,131 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/PoiTreeModel.java | PoiTreeModel.fireTreeStructureChanged | private void fireTreeStructureChanged()
{
// Guaranteed to return a non-null array
Object[] listeners = m_listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.le... | java | private void fireTreeStructureChanged()
{
// Guaranteed to return a non-null array
Object[] listeners = m_listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.le... | [
"private",
"void",
"fireTreeStructureChanged",
"(",
")",
"{",
"// Guaranteed to return a non-null array",
"Object",
"[",
"]",
"listeners",
"=",
"m_listenerList",
".",
"getListenerList",
"(",
")",
";",
"TreeModelEvent",
"e",
"=",
"null",
";",
"// Process the listeners la... | Notify listeners that the tree structure has changed. | [
"Notify",
"listeners",
"that",
"the",
"tree",
"structure",
"has",
"changed",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/PoiTreeModel.java#L150-L172 |
157,132 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getMinutesPerDay | public int getMinutesPerDay()
{
return m_minutesPerDay == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerDay()) : m_minutesPerDay.intValue();
} | java | public int getMinutesPerDay()
{
return m_minutesPerDay == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerDay()) : m_minutesPerDay.intValue();
} | [
"public",
"int",
"getMinutesPerDay",
"(",
")",
"{",
"return",
"m_minutesPerDay",
"==",
"null",
"?",
"NumberHelper",
".",
"getInt",
"(",
"getParentFile",
"(",
")",
".",
"getProjectProperties",
"(",
")",
".",
"getMinutesPerDay",
"(",
")",
")",
":",
"m_minutesPer... | Retrieve the number of minutes per day for this calendar.
@return minutes per day | [
"Retrieve",
"the",
"number",
"of",
"minutes",
"per",
"day",
"for",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L67-L70 |
157,133 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getMinutesPerWeek | public int getMinutesPerWeek()
{
return m_minutesPerWeek == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerWeek()) : m_minutesPerWeek.intValue();
} | java | public int getMinutesPerWeek()
{
return m_minutesPerWeek == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerWeek()) : m_minutesPerWeek.intValue();
} | [
"public",
"int",
"getMinutesPerWeek",
"(",
")",
"{",
"return",
"m_minutesPerWeek",
"==",
"null",
"?",
"NumberHelper",
".",
"getInt",
"(",
"getParentFile",
"(",
")",
".",
"getProjectProperties",
"(",
")",
".",
"getMinutesPerWeek",
"(",
")",
")",
":",
"m_minutes... | Retrieve the number of minutes per week for this calendar.
@return minutes per week | [
"Retrieve",
"the",
"number",
"of",
"minutes",
"per",
"week",
"for",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L77-L80 |
157,134 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getMinutesPerMonth | public int getMinutesPerMonth()
{
return m_minutesPerMonth == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerMonth()) : m_minutesPerMonth.intValue();
} | java | public int getMinutesPerMonth()
{
return m_minutesPerMonth == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerMonth()) : m_minutesPerMonth.intValue();
} | [
"public",
"int",
"getMinutesPerMonth",
"(",
")",
"{",
"return",
"m_minutesPerMonth",
"==",
"null",
"?",
"NumberHelper",
".",
"getInt",
"(",
"getParentFile",
"(",
")",
".",
"getProjectProperties",
"(",
")",
".",
"getMinutesPerMonth",
"(",
")",
")",
":",
"m_minu... | Retrieve the number of minutes per month for this calendar.
@return minutes per month | [
"Retrieve",
"the",
"number",
"of",
"minutes",
"per",
"month",
"for",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L87-L90 |
157,135 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getMinutesPerYear | public int getMinutesPerYear()
{
return m_minutesPerYear == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerYear()) : m_minutesPerYear.intValue();
} | java | public int getMinutesPerYear()
{
return m_minutesPerYear == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerYear()) : m_minutesPerYear.intValue();
} | [
"public",
"int",
"getMinutesPerYear",
"(",
")",
"{",
"return",
"m_minutesPerYear",
"==",
"null",
"?",
"NumberHelper",
".",
"getInt",
"(",
"getParentFile",
"(",
")",
".",
"getProjectProperties",
"(",
")",
".",
"getMinutesPerYear",
"(",
")",
")",
":",
"m_minutes... | Retrieve the number of minutes per year for this calendar.
@return minutes per year | [
"Retrieve",
"the",
"number",
"of",
"minutes",
"per",
"year",
"for",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L97-L100 |
157,136 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.addWorkWeek | public ProjectCalendarWeek addWorkWeek()
{
ProjectCalendarWeek week = new ProjectCalendarWeek();
week.setParent(this);
m_workWeeks.add(week);
m_weeksSorted = false;
clearWorkingDateCache();
return week;
} | java | public ProjectCalendarWeek addWorkWeek()
{
ProjectCalendarWeek week = new ProjectCalendarWeek();
week.setParent(this);
m_workWeeks.add(week);
m_weeksSorted = false;
clearWorkingDateCache();
return week;
} | [
"public",
"ProjectCalendarWeek",
"addWorkWeek",
"(",
")",
"{",
"ProjectCalendarWeek",
"week",
"=",
"new",
"ProjectCalendarWeek",
"(",
")",
";",
"week",
".",
"setParent",
"(",
"this",
")",
";",
"m_workWeeks",
".",
"add",
"(",
"week",
")",
";",
"m_weeksSorted",
... | Add an empty work week.
@return new work week | [
"Add",
"an",
"empty",
"work",
"week",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L147-L155 |
157,137 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.addCalendarException | public ProjectCalendarException addCalendarException(Date fromDate, Date toDate)
{
ProjectCalendarException bce = new ProjectCalendarException(fromDate, toDate);
m_exceptions.add(bce);
m_expandedExceptions.clear();
m_exceptionsSorted = false;
clearWorkingDateCache();
return bce;
... | java | public ProjectCalendarException addCalendarException(Date fromDate, Date toDate)
{
ProjectCalendarException bce = new ProjectCalendarException(fromDate, toDate);
m_exceptions.add(bce);
m_expandedExceptions.clear();
m_exceptionsSorted = false;
clearWorkingDateCache();
return bce;
... | [
"public",
"ProjectCalendarException",
"addCalendarException",
"(",
"Date",
"fromDate",
",",
"Date",
"toDate",
")",
"{",
"ProjectCalendarException",
"bce",
"=",
"new",
"ProjectCalendarException",
"(",
"fromDate",
",",
"toDate",
")",
";",
"m_exceptions",
".",
"add",
"... | Used to add exceptions to the calendar. The MPX standard defines
a limit of 250 exceptions per calendar.
@param fromDate exception start date
@param toDate exception end date
@return ProjectCalendarException instance | [
"Used",
"to",
"add",
"exceptions",
"to",
"the",
"calendar",
".",
"The",
"MPX",
"standard",
"defines",
"a",
"limit",
"of",
"250",
"exceptions",
"per",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L185-L193 |
157,138 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.setParent | public void setParent(ProjectCalendar calendar)
{
// I've seen a malformed MSPDI file which sets the parent calendar to itself.
// Silently ignore this here.
if (calendar != this)
{
if (getParent() != null)
{
getParent().removeDerivedCalendar(this);
}
... | java | public void setParent(ProjectCalendar calendar)
{
// I've seen a malformed MSPDI file which sets the parent calendar to itself.
// Silently ignore this here.
if (calendar != this)
{
if (getParent() != null)
{
getParent().removeDerivedCalendar(this);
}
... | [
"public",
"void",
"setParent",
"(",
"ProjectCalendar",
"calendar",
")",
"{",
"// I've seen a malformed MSPDI file which sets the parent calendar to itself.",
"// Silently ignore this here.",
"if",
"(",
"calendar",
"!=",
"this",
")",
"{",
"if",
"(",
"getParent",
"(",
")",
... | Sets the ProjectCalendar instance from which this calendar is derived.
@param calendar base calendar instance | [
"Sets",
"the",
"ProjectCalendar",
"instance",
"from",
"which",
"this",
"calendar",
"is",
"derived",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L260-L279 |
157,139 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.isWorkingDay | public boolean isWorkingDay(Day day)
{
DayType value = getWorkingDay(day);
boolean result;
if (value == DayType.DEFAULT)
{
ProjectCalendar cal = getParent();
if (cal != null)
{
result = cal.isWorkingDay(day);
}
else
{
... | java | public boolean isWorkingDay(Day day)
{
DayType value = getWorkingDay(day);
boolean result;
if (value == DayType.DEFAULT)
{
ProjectCalendar cal = getParent();
if (cal != null)
{
result = cal.isWorkingDay(day);
}
else
{
... | [
"public",
"boolean",
"isWorkingDay",
"(",
"Day",
"day",
")",
"{",
"DayType",
"value",
"=",
"getWorkingDay",
"(",
"day",
")",
";",
"boolean",
"result",
";",
"if",
"(",
"value",
"==",
"DayType",
".",
"DEFAULT",
")",
"{",
"ProjectCalendar",
"cal",
"=",
"get... | Method indicating whether a day is a working or non-working day.
@param day required day
@return true if this is a working day | [
"Method",
"indicating",
"whether",
"a",
"day",
"is",
"a",
"working",
"or",
"non",
"-",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L292-L315 |
157,140 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getDuration | public Duration getDuration(Date startDate, Date endDate)
{
Calendar cal = DateHelper.popCalendar(startDate);
int days = getDaysInRange(startDate, endDate);
int duration = 0;
Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
while (days > 0)
{
if (isWorkingDate(c... | java | public Duration getDuration(Date startDate, Date endDate)
{
Calendar cal = DateHelper.popCalendar(startDate);
int days = getDaysInRange(startDate, endDate);
int duration = 0;
Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
while (days > 0)
{
if (isWorkingDate(c... | [
"public",
"Duration",
"getDuration",
"(",
"Date",
"startDate",
",",
"Date",
"endDate",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"startDate",
")",
";",
"int",
"days",
"=",
"getDaysInRange",
"(",
"startDate",
",",
"endDate",
")"... | This method is provided to allow an absolute period of time
represented by start and end dates into a duration in working
days based on this calendar instance. This method takes account
of any exceptions defined for this calendar.
@param startDate start of the period
@param endDate end of the period
@return new Durati... | [
"This",
"method",
"is",
"provided",
"to",
"allow",
"an",
"absolute",
"period",
"of",
"time",
"represented",
"by",
"start",
"and",
"end",
"dates",
"into",
"a",
"duration",
"in",
"working",
"days",
"based",
"on",
"this",
"calendar",
"instance",
".",
"This",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L327-L348 |
157,141 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getStartTime | public Date getStartTime(Date date)
{
Date result = m_startTimeCache.get(date);
if (result == null)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
if (ranges == null)
{
result = getParentFile().getProjectProperties().getDefaultStartTime();
... | java | public Date getStartTime(Date date)
{
Date result = m_startTimeCache.get(date);
if (result == null)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
if (ranges == null)
{
result = getParentFile().getProjectProperties().getDefaultStartTime();
... | [
"public",
"Date",
"getStartTime",
"(",
"Date",
"date",
")",
"{",
"Date",
"result",
"=",
"m_startTimeCache",
".",
"get",
"(",
"date",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getRanges",
"(",
"date"... | Retrieves the time at which work starts on the given date, or returns
null if this is a non-working day.
@param date Date instance
@return start time, or null for non-working day | [
"Retrieves",
"the",
"time",
"at",
"which",
"work",
"starts",
"on",
"the",
"given",
"date",
"or",
"returns",
"null",
"if",
"this",
"is",
"a",
"non",
"-",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L357-L375 |
157,142 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getFinishTime | public Date getFinishTime(Date date)
{
Date result = null;
if (date != null)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
if (ranges == null)
{
result = getParentFile().getProjectProperties().getDefaultEndTime();
result = Date... | java | public Date getFinishTime(Date date)
{
Date result = null;
if (date != null)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
if (ranges == null)
{
result = getParentFile().getProjectProperties().getDefaultEndTime();
result = Date... | [
"public",
"Date",
"getFinishTime",
"(",
"Date",
"date",
")",
"{",
"Date",
"result",
"=",
"null",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getRanges",
"(",
"date",
",",
"null",
",",
"null",
")",
";",
"... | Retrieves the time at which work finishes on the given date, or returns
null if this is a non-working day.
@param date Date instance
@return finish time, or null for non-working day | [
"Retrieves",
"the",
"time",
"at",
"which",
"work",
"finishes",
"on",
"the",
"given",
"date",
"or",
"returns",
"null",
"if",
"this",
"is",
"a",
"non",
"-",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L384-L416 |
157,143 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.updateToNextWorkStart | private void updateToNextWorkStart(Calendar cal)
{
Date originalDate = cal.getTime();
//
// Find the date ranges for the current day
//
ProjectCalendarDateRanges ranges = getRanges(originalDate, cal, null);
if (ranges != null)
{
//
// Do we have a start t... | java | private void updateToNextWorkStart(Calendar cal)
{
Date originalDate = cal.getTime();
//
// Find the date ranges for the current day
//
ProjectCalendarDateRanges ranges = getRanges(originalDate, cal, null);
if (ranges != null)
{
//
// Do we have a start t... | [
"private",
"void",
"updateToNextWorkStart",
"(",
"Calendar",
"cal",
")",
"{",
"Date",
"originalDate",
"=",
"cal",
".",
"getTime",
"(",
")",
";",
"//",
"// Find the date ranges for the current day",
"//",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getRanges",
"(",
... | This method finds the start of the next working period.
@param cal current Calendar instance | [
"This",
"method",
"finds",
"the",
"start",
"of",
"the",
"next",
"working",
"period",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L770-L838 |
157,144 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getNextWorkStart | public Date getNextWorkStart(Date date)
{
Calendar cal = Calendar.getInstance();
cal.setTime(date);
updateToNextWorkStart(cal);
return cal.getTime();
} | java | public Date getNextWorkStart(Date date)
{
Calendar cal = Calendar.getInstance();
cal.setTime(date);
updateToNextWorkStart(cal);
return cal.getTime();
} | [
"public",
"Date",
"getNextWorkStart",
"(",
"Date",
"date",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTime",
"(",
"date",
")",
";",
"updateToNextWorkStart",
"(",
"cal",
")",
";",
"return",
"cal",
".",... | Utility method to retrieve the next working date start time, given
a date and time as a starting point.
@param date date and time start point
@return date and time of next work start | [
"Utility",
"method",
"to",
"retrieve",
"the",
"next",
"working",
"date",
"start",
"time",
"given",
"a",
"date",
"and",
"time",
"as",
"a",
"starting",
"point",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L913-L919 |
157,145 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getPreviousWorkFinish | public Date getPreviousWorkFinish(Date date)
{
Calendar cal = Calendar.getInstance();
cal.setTime(date);
updateToPreviousWorkFinish(cal);
return cal.getTime();
} | java | public Date getPreviousWorkFinish(Date date)
{
Calendar cal = Calendar.getInstance();
cal.setTime(date);
updateToPreviousWorkFinish(cal);
return cal.getTime();
} | [
"public",
"Date",
"getPreviousWorkFinish",
"(",
"Date",
"date",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTime",
"(",
"date",
")",
";",
"updateToPreviousWorkFinish",
"(",
"cal",
")",
";",
"return",
"ca... | Utility method to retrieve the previous working date finish time, given
a date and time as a starting point.
@param date date and time start point
@return date and time of previous work finish | [
"Utility",
"method",
"to",
"retrieve",
"the",
"previous",
"working",
"date",
"finish",
"time",
"given",
"a",
"date",
"and",
"time",
"as",
"a",
"starting",
"point",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L928-L934 |
157,146 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.isWorkingDate | public boolean isWorkingDate(Date date)
{
Calendar cal = DateHelper.popCalendar(date);
Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
DateHelper.pushCalendar(cal);
return isWorkingDate(date, day);
} | java | public boolean isWorkingDate(Date date)
{
Calendar cal = DateHelper.popCalendar(date);
Day day = Day.getInstance(cal.get(Calendar.DAY_OF_WEEK));
DateHelper.pushCalendar(cal);
return isWorkingDate(date, day);
} | [
"public",
"boolean",
"isWorkingDate",
"(",
"Date",
"date",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"date",
")",
";",
"Day",
"day",
"=",
"Day",
".",
"getInstance",
"(",
"cal",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_WEEK... | This method allows the caller to determine if a given date is a
working day. This method takes account of calendar exceptions.
@param date Date to be tested
@return boolean value | [
"This",
"method",
"allows",
"the",
"caller",
"to",
"determine",
"if",
"a",
"given",
"date",
"is",
"a",
"working",
"day",
".",
"This",
"method",
"takes",
"account",
"of",
"calendar",
"exceptions",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L943-L949 |
157,147 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.isWorkingDate | private boolean isWorkingDate(Date date, Day day)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, day);
return ranges.getRangeCount() != 0;
} | java | private boolean isWorkingDate(Date date, Day day)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, day);
return ranges.getRangeCount() != 0;
} | [
"private",
"boolean",
"isWorkingDate",
"(",
"Date",
"date",
",",
"Day",
"day",
")",
"{",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getRanges",
"(",
"date",
",",
"null",
",",
"day",
")",
";",
"return",
"ranges",
".",
"getRangeCount",
"(",
")",
"!=",
"0",... | This private method allows the caller to determine if a given date is a
working day. This method takes account of calendar exceptions. It assumes
that the caller has already calculated the day of the week on which
the given day falls.
@param date Date to be tested
@param day Day of the week for the date under test
@re... | [
"This",
"private",
"method",
"allows",
"the",
"caller",
"to",
"determine",
"if",
"a",
"given",
"date",
"is",
"a",
"working",
"day",
".",
"This",
"method",
"takes",
"account",
"of",
"calendar",
"exceptions",
".",
"It",
"assumes",
"that",
"the",
"caller",
"h... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L961-L965 |
157,148 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getDaysInRange | private int getDaysInRange(Date startDate, Date endDate)
{
int result;
Calendar cal = DateHelper.popCalendar(endDate);
int endDateYear = cal.get(Calendar.YEAR);
int endDateDayOfYear = cal.get(Calendar.DAY_OF_YEAR);
cal.setTime(startDate);
if (endDateYear == cal.get(Calendar.YEAR... | java | private int getDaysInRange(Date startDate, Date endDate)
{
int result;
Calendar cal = DateHelper.popCalendar(endDate);
int endDateYear = cal.get(Calendar.YEAR);
int endDateDayOfYear = cal.get(Calendar.DAY_OF_YEAR);
cal.setTime(startDate);
if (endDateYear == cal.get(Calendar.YEAR... | [
"private",
"int",
"getDaysInRange",
"(",
"Date",
"startDate",
",",
"Date",
"endDate",
")",
"{",
"int",
"result",
";",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"endDate",
")",
";",
"int",
"endDateYear",
"=",
"cal",
".",
"get",
"(",
"... | This method calculates the absolute number of days between two dates.
Note that where two date objects are provided that fall on the same
day, this method will return one not zero. Note also that this method
assumes that the dates are passed in the correct order, i.e.
startDate < endDate.
@param startDate Start date
@... | [
"This",
"method",
"calculates",
"the",
"absolute",
"number",
"of",
"days",
"between",
"two",
"dates",
".",
"Note",
"that",
"where",
"two",
"date",
"objects",
"are",
"provided",
"that",
"fall",
"on",
"the",
"same",
"day",
"this",
"method",
"will",
"return",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L978-L1006 |
157,149 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.setUniqueID | @Override public void setUniqueID(Integer uniqueID)
{
ProjectFile parent = getParentFile();
if (m_uniqueID != null)
{
parent.getCalendars().unmapUniqueID(m_uniqueID);
}
parent.getCalendars().mapUniqueID(uniqueID, this);
m_uniqueID = uniqueID;
} | java | @Override public void setUniqueID(Integer uniqueID)
{
ProjectFile parent = getParentFile();
if (m_uniqueID != null)
{
parent.getCalendars().unmapUniqueID(m_uniqueID);
}
parent.getCalendars().mapUniqueID(uniqueID, this);
m_uniqueID = uniqueID;
} | [
"@",
"Override",
"public",
"void",
"setUniqueID",
"(",
"Integer",
"uniqueID",
")",
"{",
"ProjectFile",
"parent",
"=",
"getParentFile",
"(",
")",
";",
"if",
"(",
"m_uniqueID",
"!=",
"null",
")",
"{",
"parent",
".",
"getCalendars",
"(",
")",
".",
"unmapUniqu... | Modifier method to set the unique ID of this calendar.
@param uniqueID unique identifier | [
"Modifier",
"method",
"to",
"set",
"the",
"unique",
"ID",
"of",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1013-L1025 |
157,150 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.setResource | public void setResource(Resource resource)
{
m_resource = resource;
String name = m_resource.getName();
if (name == null || name.length() == 0)
{
name = "Unnamed Resource";
}
setName(name);
} | java | public void setResource(Resource resource)
{
m_resource = resource;
String name = m_resource.getName();
if (name == null || name.length() == 0)
{
name = "Unnamed Resource";
}
setName(name);
} | [
"public",
"void",
"setResource",
"(",
"Resource",
"resource",
")",
"{",
"m_resource",
"=",
"resource",
";",
"String",
"name",
"=",
"m_resource",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
"==",
"null",
"||",
"name",
".",
"length",
"(",
")",
"=="... | Sets the resource to which this calendar is linked. Note that this
method updates the calendar's name to be the same as the resource name.
If the resource does not yet have a name, then the calendar is given
a default name.
@param resource resource instance | [
"Sets",
"the",
"resource",
"to",
"which",
"this",
"calendar",
"is",
"linked",
".",
"Note",
"that",
"this",
"method",
"updates",
"the",
"calendar",
"s",
"name",
"to",
"be",
"the",
"same",
"as",
"the",
"resource",
"name",
".",
"If",
"the",
"resource",
"doe... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1055-L1064 |
157,151 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getException | public ProjectCalendarException getException(Date date)
{
ProjectCalendarException exception = null;
// We're working with expanded exceptions, which includes any recurring exceptions
// expanded into individual entries.
populateExpandedExceptions();
if (!m_expandedExceptions.isEmpty()... | java | public ProjectCalendarException getException(Date date)
{
ProjectCalendarException exception = null;
// We're working with expanded exceptions, which includes any recurring exceptions
// expanded into individual entries.
populateExpandedExceptions();
if (!m_expandedExceptions.isEmpty()... | [
"public",
"ProjectCalendarException",
"getException",
"(",
"Date",
"date",
")",
"{",
"ProjectCalendarException",
"exception",
"=",
"null",
";",
"// We're working with expanded exceptions, which includes any recurring exceptions",
"// expanded into individual entries.",
"populateExpande... | Retrieve a calendar exception which applies to this date.
@param date target date
@return calendar exception, or null if none match this date | [
"Retrieve",
"a",
"calendar",
"exception",
"which",
"applies",
"to",
"this",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1080-L1126 |
157,152 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getWorkWeek | public ProjectCalendarWeek getWorkWeek(Date date)
{
ProjectCalendarWeek week = null;
if (!m_workWeeks.isEmpty())
{
sortWorkWeeks();
int low = 0;
int high = m_workWeeks.size() - 1;
long targetDate = date.getTime();
while (low <= high)
{
... | java | public ProjectCalendarWeek getWorkWeek(Date date)
{
ProjectCalendarWeek week = null;
if (!m_workWeeks.isEmpty())
{
sortWorkWeeks();
int low = 0;
int high = m_workWeeks.size() - 1;
long targetDate = date.getTime();
while (low <= high)
{
... | [
"public",
"ProjectCalendarWeek",
"getWorkWeek",
"(",
"Date",
"date",
")",
"{",
"ProjectCalendarWeek",
"week",
"=",
"null",
";",
"if",
"(",
"!",
"m_workWeeks",
".",
"isEmpty",
"(",
")",
")",
"{",
"sortWorkWeeks",
"(",
")",
";",
"int",
"low",
"=",
"0",
";"... | Retrieve a work week which applies to this date.
@param date target date
@return work week, or null if none match this date | [
"Retrieve",
"a",
"work",
"week",
"which",
"applies",
"to",
"this",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1134-L1176 |
157,153 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getWork | public Duration getWork(Date date, TimeUnit format)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
long time = getTotalTime(ranges);
return convertFormat(time, format);
} | java | public Duration getWork(Date date, TimeUnit format)
{
ProjectCalendarDateRanges ranges = getRanges(date, null, null);
long time = getTotalTime(ranges);
return convertFormat(time, format);
} | [
"public",
"Duration",
"getWork",
"(",
"Date",
"date",
",",
"TimeUnit",
"format",
")",
"{",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getRanges",
"(",
"date",
",",
"null",
",",
"null",
")",
";",
"long",
"time",
"=",
"getTotalTime",
"(",
"ranges",
")",
";... | Retrieves the amount of work on a given day, and
returns it in the specified format.
@param date target date
@param format required format
@return work duration | [
"Retrieves",
"the",
"amount",
"of",
"work",
"on",
"a",
"given",
"day",
"and",
"returns",
"it",
"in",
"the",
"specified",
"format",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1186-L1191 |
157,154 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getWork | public Duration getWork(Date startDate, Date endDate, TimeUnit format)
{
DateRange range = new DateRange(startDate, endDate);
Long cachedResult = m_workingDateCache.get(range);
long totalTime = 0;
if (cachedResult == null)
{
//
// We want the start date to be the earl... | java | public Duration getWork(Date startDate, Date endDate, TimeUnit format)
{
DateRange range = new DateRange(startDate, endDate);
Long cachedResult = m_workingDateCache.get(range);
long totalTime = 0;
if (cachedResult == null)
{
//
// We want the start date to be the earl... | [
"public",
"Duration",
"getWork",
"(",
"Date",
"startDate",
",",
"Date",
"endDate",
",",
"TimeUnit",
"format",
")",
"{",
"DateRange",
"range",
"=",
"new",
"DateRange",
"(",
"startDate",
",",
"endDate",
")",
";",
"Long",
"cachedResult",
"=",
"m_workingDateCache"... | This method retrieves a Duration instance representing the amount of
work between two dates based on this calendar.
@param startDate start date
@param endDate end date
@param format required duration format
@return amount of work | [
"This",
"method",
"retrieves",
"a",
"Duration",
"instance",
"representing",
"the",
"amount",
"of",
"work",
"between",
"two",
"dates",
"based",
"on",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1202-L1314 |
157,155 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.convertFormat | private Duration convertFormat(long totalTime, TimeUnit format)
{
double duration = totalTime;
switch (format)
{
case MINUTES:
case ELAPSED_MINUTES:
{
duration /= (60 * 1000);
break;
}
case HOURS:
case ELAPSED_HOURS:
... | java | private Duration convertFormat(long totalTime, TimeUnit format)
{
double duration = totalTime;
switch (format)
{
case MINUTES:
case ELAPSED_MINUTES:
{
duration /= (60 * 1000);
break;
}
case HOURS:
case ELAPSED_HOURS:
... | [
"private",
"Duration",
"convertFormat",
"(",
"long",
"totalTime",
",",
"TimeUnit",
"format",
")",
"{",
"double",
"duration",
"=",
"totalTime",
";",
"switch",
"(",
"format",
")",
"{",
"case",
"MINUTES",
":",
"case",
"ELAPSED_MINUTES",
":",
"{",
"duration",
"/... | Utility method used to convert an integer time representation into a
Duration instance.
@param totalTime integer time representation
@param format required time format
@return new Duration instance | [
"Utility",
"method",
"used",
"to",
"convert",
"an",
"integer",
"time",
"representation",
"into",
"a",
"Duration",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1324-L1412 |
157,156 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTotalTime | private long getTotalTime(ProjectCalendarDateRanges exception, Date date, boolean after)
{
long currentTime = DateHelper.getCanonicalTime(date).getTime();
long total = 0;
for (DateRange range : exception)
{
total += getTime(range.getStart(), range.getEnd(), currentTime, after);
... | java | private long getTotalTime(ProjectCalendarDateRanges exception, Date date, boolean after)
{
long currentTime = DateHelper.getCanonicalTime(date).getTime();
long total = 0;
for (DateRange range : exception)
{
total += getTime(range.getStart(), range.getEnd(), currentTime, after);
... | [
"private",
"long",
"getTotalTime",
"(",
"ProjectCalendarDateRanges",
"exception",
",",
"Date",
"date",
",",
"boolean",
"after",
")",
"{",
"long",
"currentTime",
"=",
"DateHelper",
".",
"getCanonicalTime",
"(",
"date",
")",
".",
"getTime",
"(",
")",
";",
"long"... | Retrieves the amount of time represented by a calendar exception
before or after an intersection point.
@param exception calendar exception
@param date intersection time
@param after true to report time after intersection, false to report time before
@return length of time in milliseconds | [
"Retrieves",
"the",
"amount",
"of",
"time",
"represented",
"by",
"a",
"calendar",
"exception",
"before",
"or",
"after",
"an",
"intersection",
"point",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1423-L1432 |
157,157 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTotalTime | private long getTotalTime(ProjectCalendarDateRanges exception)
{
long total = 0;
for (DateRange range : exception)
{
total += getTime(range.getStart(), range.getEnd());
}
return (total);
} | java | private long getTotalTime(ProjectCalendarDateRanges exception)
{
long total = 0;
for (DateRange range : exception)
{
total += getTime(range.getStart(), range.getEnd());
}
return (total);
} | [
"private",
"long",
"getTotalTime",
"(",
"ProjectCalendarDateRanges",
"exception",
")",
"{",
"long",
"total",
"=",
"0",
";",
"for",
"(",
"DateRange",
"range",
":",
"exception",
")",
"{",
"total",
"+=",
"getTime",
"(",
"range",
".",
"getStart",
"(",
")",
","... | Retrieves the amount of working time represented by
a calendar exception.
@param exception calendar exception
@return length of time in milliseconds | [
"Retrieves",
"the",
"amount",
"of",
"working",
"time",
"represented",
"by",
"a",
"calendar",
"exception",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1441-L1449 |
157,158 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTotalTime | private long getTotalTime(ProjectCalendarDateRanges hours, Date startDate, Date endDate)
{
long total = 0;
if (startDate.getTime() != endDate.getTime())
{
Date start = DateHelper.getCanonicalTime(startDate);
Date end = DateHelper.getCanonicalTime(endDate);
for (DateRange... | java | private long getTotalTime(ProjectCalendarDateRanges hours, Date startDate, Date endDate)
{
long total = 0;
if (startDate.getTime() != endDate.getTime())
{
Date start = DateHelper.getCanonicalTime(startDate);
Date end = DateHelper.getCanonicalTime(endDate);
for (DateRange... | [
"private",
"long",
"getTotalTime",
"(",
"ProjectCalendarDateRanges",
"hours",
",",
"Date",
"startDate",
",",
"Date",
"endDate",
")",
"{",
"long",
"total",
"=",
"0",
";",
"if",
"(",
"startDate",
".",
"getTime",
"(",
")",
"!=",
"endDate",
".",
"getTime",
"("... | This method calculates the total amount of working time in a single
day, which intersects with the supplied time range.
@param hours collection of working hours in a day
@param startDate time range start
@param endDate time range end
@return length of time in milliseconds | [
"This",
"method",
"calculates",
"the",
"total",
"amount",
"of",
"working",
"time",
"in",
"a",
"single",
"day",
"which",
"intersects",
"with",
"the",
"supplied",
"time",
"range",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1460-L1502 |
157,159 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTime | private long getTime(Date start, Date end, long target, boolean after)
{
long total = 0;
if (start != null && end != null)
{
Date startTime = DateHelper.getCanonicalTime(start);
Date endTime = DateHelper.getCanonicalTime(end);
Date startDay = DateHelper.getDayStartDate(s... | java | private long getTime(Date start, Date end, long target, boolean after)
{
long total = 0;
if (start != null && end != null)
{
Date startTime = DateHelper.getCanonicalTime(start);
Date endTime = DateHelper.getCanonicalTime(end);
Date startDay = DateHelper.getDayStartDate(s... | [
"private",
"long",
"getTime",
"(",
"Date",
"start",
",",
"Date",
"end",
",",
"long",
"target",
",",
"boolean",
"after",
")",
"{",
"long",
"total",
"=",
"0",
";",
"if",
"(",
"start",
"!=",
"null",
"&&",
"end",
"!=",
"null",
")",
"{",
"Date",
"startT... | Calculates how much of a time range is before or after a
target intersection point.
@param start time range start
@param end time range end
@param target target intersection point
@param after true if time after target required, false for time before
@return length of time in milliseconds | [
"Calculates",
"how",
"much",
"of",
"a",
"time",
"range",
"is",
"before",
"or",
"after",
"a",
"target",
"intersection",
"point",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1514-L1555 |
157,160 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTime | private long getTime(Date start, Date end)
{
long total = 0;
if (start != null && end != null)
{
Date startTime = DateHelper.getCanonicalTime(start);
Date endTime = DateHelper.getCanonicalTime(end);
Date startDay = DateHelper.getDayStartDate(start);
Date finishD... | java | private long getTime(Date start, Date end)
{
long total = 0;
if (start != null && end != null)
{
Date startTime = DateHelper.getCanonicalTime(start);
Date endTime = DateHelper.getCanonicalTime(end);
Date startDay = DateHelper.getDayStartDate(start);
Date finishD... | [
"private",
"long",
"getTime",
"(",
"Date",
"start",
",",
"Date",
"end",
")",
"{",
"long",
"total",
"=",
"0",
";",
"if",
"(",
"start",
"!=",
"null",
"&&",
"end",
"!=",
"null",
")",
"{",
"Date",
"startTime",
"=",
"DateHelper",
".",
"getCanonicalTime",
... | Retrieves the amount of time between two date time values. Note that
these values are converted into canonical values to remove the
date component.
@param start start time
@param end end time
@return length of time | [
"Retrieves",
"the",
"amount",
"of",
"time",
"between",
"two",
"date",
"time",
"values",
".",
"Note",
"that",
"these",
"values",
"are",
"converted",
"into",
"canonical",
"values",
"to",
"remove",
"the",
"date",
"component",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1566-L1589 |
157,161 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getTime | private long getTime(Date start1, Date end1, Date start2, Date end2)
{
long total = 0;
if (start1 != null && end1 != null && start2 != null && end2 != null)
{
long start;
long end;
if (start1.getTime() < start2.getTime())
{
start = start2.getTime();... | java | private long getTime(Date start1, Date end1, Date start2, Date end2)
{
long total = 0;
if (start1 != null && end1 != null && start2 != null && end2 != null)
{
long start;
long end;
if (start1.getTime() < start2.getTime())
{
start = start2.getTime();... | [
"private",
"long",
"getTime",
"(",
"Date",
"start1",
",",
"Date",
"end1",
",",
"Date",
"start2",
",",
"Date",
"end2",
")",
"{",
"long",
"total",
"=",
"0",
";",
"if",
"(",
"start1",
"!=",
"null",
"&&",
"end1",
"!=",
"null",
"&&",
"start2",
"!=",
"nu... | This method returns the length of overlapping time between two time
ranges.
@param start1 start of first range
@param end1 end of first range
@param start2 start start of second range
@param end2 end of second range
@return overlapping time in milliseconds | [
"This",
"method",
"returns",
"the",
"length",
"of",
"overlapping",
"time",
"between",
"two",
"time",
"ranges",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1601-L1635 |
157,162 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.copy | public void copy(ProjectCalendar cal)
{
setName(cal.getName());
setParent(cal.getParent());
System.arraycopy(cal.getDays(), 0, getDays(), 0, getDays().length);
for (ProjectCalendarException ex : cal.m_exceptions)
{
addCalendarException(ex.getFromDate(), ex.getToDate());
... | java | public void copy(ProjectCalendar cal)
{
setName(cal.getName());
setParent(cal.getParent());
System.arraycopy(cal.getDays(), 0, getDays(), 0, getDays().length);
for (ProjectCalendarException ex : cal.m_exceptions)
{
addCalendarException(ex.getFromDate(), ex.getToDate());
... | [
"public",
"void",
"copy",
"(",
"ProjectCalendar",
"cal",
")",
"{",
"setName",
"(",
"cal",
".",
"getName",
"(",
")",
")",
";",
"setParent",
"(",
"cal",
".",
"getParent",
"(",
")",
")",
";",
"System",
".",
"arraycopy",
"(",
"cal",
".",
"getDays",
"(",
... | Copy the settings from another calendar to this calendar.
@param cal calendar data source | [
"Copy",
"the",
"settings",
"from",
"another",
"calendar",
"to",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1837-L1862 |
157,163 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.clearWorkingDateCache | private void clearWorkingDateCache()
{
m_workingDateCache.clear();
m_startTimeCache.clear();
m_getDateLastResult = null;
for (ProjectCalendar calendar : m_derivedCalendars)
{
calendar.clearWorkingDateCache();
}
} | java | private void clearWorkingDateCache()
{
m_workingDateCache.clear();
m_startTimeCache.clear();
m_getDateLastResult = null;
for (ProjectCalendar calendar : m_derivedCalendars)
{
calendar.clearWorkingDateCache();
}
} | [
"private",
"void",
"clearWorkingDateCache",
"(",
")",
"{",
"m_workingDateCache",
".",
"clear",
"(",
")",
";",
"m_startTimeCache",
".",
"clear",
"(",
")",
";",
"m_getDateLastResult",
"=",
"null",
";",
"for",
"(",
"ProjectCalendar",
"calendar",
":",
"m_derivedCale... | Utility method to clear cached calendar data. | [
"Utility",
"method",
"to",
"clear",
"cached",
"calendar",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1867-L1876 |
157,164 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.getRanges | private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day)
{
ProjectCalendarDateRanges ranges = getException(date);
if (ranges == null)
{
ProjectCalendarWeek week = getWorkWeek(date);
if (week == null)
{
week = this;
}
if ... | java | private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day)
{
ProjectCalendarDateRanges ranges = getException(date);
if (ranges == null)
{
ProjectCalendarWeek week = getWorkWeek(date);
if (week == null)
{
week = this;
}
if ... | [
"private",
"ProjectCalendarDateRanges",
"getRanges",
"(",
"Date",
"date",
",",
"Calendar",
"cal",
",",
"Day",
"day",
")",
"{",
"ProjectCalendarDateRanges",
"ranges",
"=",
"getException",
"(",
"date",
")",
";",
"if",
"(",
"ranges",
"==",
"null",
")",
"{",
"Pr... | Retrieves the working hours on the given date.
@param date required date
@param cal optional calendar instance
@param day optional day instance
@return working hours | [
"Retrieves",
"the",
"working",
"hours",
"on",
"the",
"given",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1886-L1910 |
157,165 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendar.java | ProjectCalendar.populateExpandedExceptions | private void populateExpandedExceptions()
{
if (!m_exceptions.isEmpty() && m_expandedExceptions.isEmpty())
{
for (ProjectCalendarException exception : m_exceptions)
{
RecurringData recurring = exception.getRecurring();
if (recurring == null)
{
... | java | private void populateExpandedExceptions()
{
if (!m_exceptions.isEmpty() && m_expandedExceptions.isEmpty())
{
for (ProjectCalendarException exception : m_exceptions)
{
RecurringData recurring = exception.getRecurring();
if (recurring == null)
{
... | [
"private",
"void",
"populateExpandedExceptions",
"(",
")",
"{",
"if",
"(",
"!",
"m_exceptions",
".",
"isEmpty",
"(",
")",
"&&",
"m_expandedExceptions",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"ProjectCalendarException",
"exception",
":",
"m_exceptions",
... | Populate the expanded exceptions list based on the main exceptions list.
Where we find recurring exception definitions, we generate individual
exceptions for each recurrence to ensure that we account for them correctly. | [
"Populate",
"the",
"expanded",
"exceptions",
"list",
"based",
"on",
"the",
"main",
"exceptions",
"list",
".",
"Where",
"we",
"find",
"recurring",
"exception",
"definitions",
"we",
"generate",
"individual",
"exceptions",
"for",
"each",
"recurrence",
"to",
"ensure",... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1929-L1958 |
157,166 | joniles/mpxj | src/main/java/net/sf/mpxj/TableContainer.java | TableContainer.getIndex | private Map<String, Table> getIndex(Table table)
{
Map<String, Table> result;
if (!table.getResourceFlag())
{
result = m_taskTablesByName;
}
else
{
result = m_resourceTablesByName;
}
return result;
} | java | private Map<String, Table> getIndex(Table table)
{
Map<String, Table> result;
if (!table.getResourceFlag())
{
result = m_taskTablesByName;
}
else
{
result = m_resourceTablesByName;
}
return result;
} | [
"private",
"Map",
"<",
"String",
",",
"Table",
">",
"getIndex",
"(",
"Table",
"table",
")",
"{",
"Map",
"<",
"String",
",",
"Table",
">",
"result",
";",
"if",
"(",
"!",
"table",
".",
"getResourceFlag",
"(",
")",
")",
"{",
"result",
"=",
"m_taskTables... | Retrieve the correct index for the supplied Table instance.
@param table Table instance
@return index | [
"Retrieve",
"the",
"correct",
"index",
"for",
"the",
"supplied",
"Table",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TableContainer.java#L74-L87 |
157,167 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/ProjectFilePanel.java | ProjectFilePanel.saveFile | public void saveFile(File file, String type)
{
if (file != null)
{
m_treeController.saveFile(file, type);
}
} | java | public void saveFile(File file, String type)
{
if (file != null)
{
m_treeController.saveFile(file, type);
}
} | [
"public",
"void",
"saveFile",
"(",
"File",
"file",
",",
"String",
"type",
")",
"{",
"if",
"(",
"file",
"!=",
"null",
")",
"{",
"m_treeController",
".",
"saveFile",
"(",
"file",
",",
"type",
")",
";",
"}",
"}"
] | Saves the project file displayed in this panel.
@param file target file
@param type file type | [
"Saves",
"the",
"project",
"file",
"displayed",
"in",
"this",
"panel",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectFilePanel.java#L104-L110 |
157,168 | joniles/mpxj | src/main/java/net/sf/mpxj/FilterContainer.java | FilterContainer.addFilter | public void addFilter(Filter filter)
{
if (filter.isTaskFilter())
{
m_taskFilters.add(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.add(filter);
}
m_filtersByName.put(filter.getName(), filter);
m_filtersByID.put(filter.getID(), filte... | java | public void addFilter(Filter filter)
{
if (filter.isTaskFilter())
{
m_taskFilters.add(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.add(filter);
}
m_filtersByName.put(filter.getName(), filter);
m_filtersByID.put(filter.getID(), filte... | [
"public",
"void",
"addFilter",
"(",
"Filter",
"filter",
")",
"{",
"if",
"(",
"filter",
".",
"isTaskFilter",
"(",
")",
")",
"{",
"m_taskFilters",
".",
"add",
"(",
"filter",
")",
";",
"}",
"if",
"(",
"filter",
".",
"isResourceFilter",
"(",
")",
")",
"{... | Adds a filter definition to this project file.
@param filter filter definition | [
"Adds",
"a",
"filter",
"definition",
"to",
"this",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/FilterContainer.java#L41-L55 |
157,169 | joniles/mpxj | src/main/java/net/sf/mpxj/FilterContainer.java | FilterContainer.removeFilter | public void removeFilter(String filterName)
{
Filter filter = getFilterByName(filterName);
if (filter != null)
{
if (filter.isTaskFilter())
{
m_taskFilters.remove(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.remo... | java | public void removeFilter(String filterName)
{
Filter filter = getFilterByName(filterName);
if (filter != null)
{
if (filter.isTaskFilter())
{
m_taskFilters.remove(filter);
}
if (filter.isResourceFilter())
{
m_resourceFilters.remo... | [
"public",
"void",
"removeFilter",
"(",
"String",
"filterName",
")",
"{",
"Filter",
"filter",
"=",
"getFilterByName",
"(",
"filterName",
")",
";",
"if",
"(",
"filter",
"!=",
"null",
")",
"{",
"if",
"(",
"filter",
".",
"isTaskFilter",
"(",
")",
")",
"{",
... | Removes a filter from this project file.
@param filterName The name of the filter | [
"Removes",
"a",
"filter",
"from",
"this",
"project",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/FilterContainer.java#L62-L79 |
157,170 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeProjectProperties | private void writeProjectProperties()
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_plannerProject.setCompany(properties.getCompany());
m_plannerProject.setManager(properties.getManager());
m_plannerProject.setName(getString(properties.getName()));
m_plannerP... | java | private void writeProjectProperties()
{
ProjectProperties properties = m_projectFile.getProjectProperties();
m_plannerProject.setCompany(properties.getCompany());
m_plannerProject.setManager(properties.getManager());
m_plannerProject.setName(getString(properties.getName()));
m_plannerP... | [
"private",
"void",
"writeProjectProperties",
"(",
")",
"{",
"ProjectProperties",
"properties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"m_plannerProject",
".",
"setCompany",
"(",
"properties",
".",
"getCompany",
"(",
")",
")",
";",
"m_pla... | This method writes project properties to a Planner file. | [
"This",
"method",
"writes",
"project",
"properties",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L141-L151 |
157,171 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeCalendars | private void writeCalendars() throws JAXBException
{
//
// Create the new Planner calendar list
//
Calendars calendars = m_factory.createCalendars();
m_plannerProject.setCalendars(calendars);
writeDayTypes(calendars);
List<net.sf.mpxj.planner.schema.Calendar> calendar = cale... | java | private void writeCalendars() throws JAXBException
{
//
// Create the new Planner calendar list
//
Calendars calendars = m_factory.createCalendars();
m_plannerProject.setCalendars(calendars);
writeDayTypes(calendars);
List<net.sf.mpxj.planner.schema.Calendar> calendar = cale... | [
"private",
"void",
"writeCalendars",
"(",
")",
"throws",
"JAXBException",
"{",
"//",
"// Create the new Planner calendar list",
"//",
"Calendars",
"calendars",
"=",
"m_factory",
".",
"createCalendars",
"(",
")",
";",
"m_plannerProject",
".",
"setCalendars",
"(",
"cale... | This method writes calendar data to a Planner file.
@throws JAXBException on xml creation errors | [
"This",
"method",
"writes",
"calendar",
"data",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L158-L177 |
157,172 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeDayTypes | private void writeDayTypes(Calendars calendars)
{
DayTypes dayTypes = m_factory.createDayTypes();
calendars.setDayTypes(dayTypes);
List<DayType> typeList = dayTypes.getDayType();
DayType dayType = m_factory.createDayType();
typeList.add(dayType);
dayType.setId("0");
dayType... | java | private void writeDayTypes(Calendars calendars)
{
DayTypes dayTypes = m_factory.createDayTypes();
calendars.setDayTypes(dayTypes);
List<DayType> typeList = dayTypes.getDayType();
DayType dayType = m_factory.createDayType();
typeList.add(dayType);
dayType.setId("0");
dayType... | [
"private",
"void",
"writeDayTypes",
"(",
"Calendars",
"calendars",
")",
"{",
"DayTypes",
"dayTypes",
"=",
"m_factory",
".",
"createDayTypes",
"(",
")",
";",
"calendars",
".",
"setDayTypes",
"(",
"dayTypes",
")",
";",
"List",
"<",
"DayType",
">",
"typeList",
... | Write the standard set of day types.
@param calendars parent collection of calendars | [
"Write",
"the",
"standard",
"set",
"of",
"day",
"types",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L184-L207 |
157,173 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeCalendar | private void writeCalendar(ProjectCalendar mpxjCalendar, net.sf.mpxj.planner.schema.Calendar plannerCalendar) throws JAXBException
{
//
// Populate basic details
//
plannerCalendar.setId(getIntegerString(mpxjCalendar.getUniqueID()));
plannerCalendar.setName(getString(mpxjCalendar.getNam... | java | private void writeCalendar(ProjectCalendar mpxjCalendar, net.sf.mpxj.planner.schema.Calendar plannerCalendar) throws JAXBException
{
//
// Populate basic details
//
plannerCalendar.setId(getIntegerString(mpxjCalendar.getUniqueID()));
plannerCalendar.setName(getString(mpxjCalendar.getNam... | [
"private",
"void",
"writeCalendar",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Calendar",
"plannerCalendar",
")",
"throws",
"JAXBException",
"{",
"//",
"// Populate basic details",
"//",
"planne... | This method writes data for a single calendar to a Planner file.
@param mpxjCalendar MPXJ calendar instance
@param plannerCalendar Planner calendar instance
@throws JAXBException on xml creation errors | [
"This",
"method",
"writes",
"data",
"for",
"a",
"single",
"calendar",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L216-L285 |
157,174 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.processWorkingHours | private void processWorkingHours(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList)
{
if (isWorkingDay(mpxjCalendar, day))
{
ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day);
if (mpxjHours != null)
{
Overri... | java | private void processWorkingHours(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList)
{
if (isWorkingDay(mpxjCalendar, day))
{
ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day);
if (mpxjHours != null)
{
Overri... | [
"private",
"void",
"processWorkingHours",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"Sequence",
"uniqueID",
",",
"Day",
"day",
",",
"List",
"<",
"OverriddenDayType",
">",
"typeList",
")",
"{",
"if",
"(",
"isWorkingDay",
"(",
"mpxjCalendar",
",",
"day",
")",
... | Process the standard working hours for a given day.
@param mpxjCalendar MPXJ Calendar instance
@param uniqueID unique ID sequence generation
@param day Day instance
@param typeList Planner list of days | [
"Process",
"the",
"standard",
"working",
"hours",
"for",
"a",
"given",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L295-L321 |
157,175 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeResources | private void writeResources()
{
Resources resources = m_factory.createResources();
m_plannerProject.setResources(resources);
List<net.sf.mpxj.planner.schema.Resource> resourceList = resources.getResource();
for (Resource mpxjResource : m_projectFile.getResources())
{
net.sf.mpx... | java | private void writeResources()
{
Resources resources = m_factory.createResources();
m_plannerProject.setResources(resources);
List<net.sf.mpxj.planner.schema.Resource> resourceList = resources.getResource();
for (Resource mpxjResource : m_projectFile.getResources())
{
net.sf.mpx... | [
"private",
"void",
"writeResources",
"(",
")",
"{",
"Resources",
"resources",
"=",
"m_factory",
".",
"createResources",
"(",
")",
";",
"m_plannerProject",
".",
"setResources",
"(",
"resources",
")",
";",
"List",
"<",
"net",
".",
"sf",
".",
"mpxj",
".",
"pl... | This method writes resource data to a Planner file. | [
"This",
"method",
"writes",
"resource",
"data",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L375-L386 |
157,176 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeResource | private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plannerResource)
{
ProjectCalendar resourceCalendar = mpxjResource.getResourceCalendar();
if (resourceCalendar != null)
{
plannerResource.setCalendar(getIntegerString(resourceCalendar.getUniqueID()));
... | java | private void writeResource(Resource mpxjResource, net.sf.mpxj.planner.schema.Resource plannerResource)
{
ProjectCalendar resourceCalendar = mpxjResource.getResourceCalendar();
if (resourceCalendar != null)
{
plannerResource.setCalendar(getIntegerString(resourceCalendar.getUniqueID()));
... | [
"private",
"void",
"writeResource",
"(",
"Resource",
"mpxjResource",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Resource",
"plannerResource",
")",
"{",
"ProjectCalendar",
"resourceCalendar",
"=",
"mpxjResource",
".",
"getResourceCalen... | This method writes data for a single resource to a Planner file.
@param mpxjResource MPXJ Resource instance
@param plannerResource Planner Resource instance | [
"This",
"method",
"writes",
"data",
"for",
"a",
"single",
"resource",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L394-L413 |
157,177 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeTasks | private void writeTasks() throws JAXBException
{
Tasks tasks = m_factory.createTasks();
m_plannerProject.setTasks(tasks);
List<net.sf.mpxj.planner.schema.Task> taskList = tasks.getTask();
for (Task task : m_projectFile.getChildTasks())
{
writeTask(task, taskList);
}
} | java | private void writeTasks() throws JAXBException
{
Tasks tasks = m_factory.createTasks();
m_plannerProject.setTasks(tasks);
List<net.sf.mpxj.planner.schema.Task> taskList = tasks.getTask();
for (Task task : m_projectFile.getChildTasks())
{
writeTask(task, taskList);
}
} | [
"private",
"void",
"writeTasks",
"(",
")",
"throws",
"JAXBException",
"{",
"Tasks",
"tasks",
"=",
"m_factory",
".",
"createTasks",
"(",
")",
";",
"m_plannerProject",
".",
"setTasks",
"(",
"tasks",
")",
";",
"List",
"<",
"net",
".",
"sf",
".",
"mpxj",
"."... | This method writes task data to a Planner file.
@throws JAXBException on xml creation errors | [
"This",
"method",
"writes",
"task",
"data",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L420-L429 |
157,178 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeTask | private void writeTask(Task mpxjTask, List<net.sf.mpxj.planner.schema.Task> taskList) throws JAXBException
{
net.sf.mpxj.planner.schema.Task plannerTask = m_factory.createTask();
taskList.add(plannerTask);
plannerTask.setEnd(getDateTimeString(mpxjTask.getFinish()));
plannerTask.setId(getInteg... | java | private void writeTask(Task mpxjTask, List<net.sf.mpxj.planner.schema.Task> taskList) throws JAXBException
{
net.sf.mpxj.planner.schema.Task plannerTask = m_factory.createTask();
taskList.add(plannerTask);
plannerTask.setEnd(getDateTimeString(mpxjTask.getFinish()));
plannerTask.setId(getInteg... | [
"private",
"void",
"writeTask",
"(",
"Task",
"mpxjTask",
",",
"List",
"<",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Task",
">",
"taskList",
")",
"throws",
"JAXBException",
"{",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
... | This method writes data for a single task to a Planner file.
@param mpxjTask MPXJ Task instance
@param taskList list of child tasks for current parent | [
"This",
"method",
"writes",
"data",
"for",
"a",
"single",
"task",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L437-L495 |
157,179 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writePredecessors | private void writePredecessors(Task mpxjTask, net.sf.mpxj.planner.schema.Task plannerTask)
{
Predecessors plannerPredecessors = m_factory.createPredecessors();
plannerTask.setPredecessors(plannerPredecessors);
List<Predecessor> predecessorList = plannerPredecessors.getPredecessor();
int id = ... | java | private void writePredecessors(Task mpxjTask, net.sf.mpxj.planner.schema.Task plannerTask)
{
Predecessors plannerPredecessors = m_factory.createPredecessors();
plannerTask.setPredecessors(plannerPredecessors);
List<Predecessor> predecessorList = plannerPredecessors.getPredecessor();
int id = ... | [
"private",
"void",
"writePredecessors",
"(",
"Task",
"mpxjTask",
",",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Task",
"plannerTask",
")",
"{",
"Predecessors",
"plannerPredecessors",
"=",
"m_factory",
".",
"createPredecessors",
"(",
"... | This method writes predecessor data to a Planner 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 bo... | [
"This",
"method",
"writes",
"predecessor",
"data",
"to",
"a",
"Planner",
"file",
".",
"We",
"have",
"to",
"deal",
"with",
"a",
"slight",
"anomaly",
"in",
"this",
"method",
"that",
"is",
"introduced",
"by",
"the",
"MPX",
"file",
"format",
".",
"It",
"woul... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L510-L529 |
157,180 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.writeAssignments | private void writeAssignments()
{
Allocations allocations = m_factory.createAllocations();
m_plannerProject.setAllocations(allocations);
List<Allocation> allocationList = allocations.getAllocation();
for (ResourceAssignment mpxjAssignment : m_projectFile.getResourceAssignments())
{
... | java | private void writeAssignments()
{
Allocations allocations = m_factory.createAllocations();
m_plannerProject.setAllocations(allocations);
List<Allocation> allocationList = allocations.getAllocation();
for (ResourceAssignment mpxjAssignment : m_projectFile.getResourceAssignments())
{
... | [
"private",
"void",
"writeAssignments",
"(",
")",
"{",
"Allocations",
"allocations",
"=",
"m_factory",
".",
"createAllocations",
"(",
")",
";",
"m_plannerProject",
".",
"setAllocations",
"(",
"allocations",
")",
";",
"List",
"<",
"Allocation",
">",
"allocationList"... | This method writes assignment data to a Planner file. | [
"This",
"method",
"writes",
"assignment",
"data",
"to",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L535-L552 |
157,181 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getIntegerString | private String getIntegerString(Number value)
{
return (value == null ? null : Integer.toString(value.intValue()));
} | java | private String getIntegerString(Number value)
{
return (value == null ? null : Integer.toString(value.intValue()));
} | [
"private",
"String",
"getIntegerString",
"(",
"Number",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
"?",
"null",
":",
"Integer",
".",
"toString",
"(",
"value",
".",
"intValue",
"(",
")",
")",
")",
";",
"}"
] | Convert an Integer value into a String.
@param value Integer value
@return String value | [
"Convert",
"an",
"Integer",
"value",
"into",
"a",
"String",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L589-L592 |
157,182 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.isWorkingDay | private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day)
{
boolean result = false;
net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day);
if (type == null)
{
type = net.sf.mpxj.DayType.DEFAULT;
}
switch (type)
{
case WORKING:
{
... | java | private boolean isWorkingDay(ProjectCalendar mpxjCalendar, Day day)
{
boolean result = false;
net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day);
if (type == null)
{
type = net.sf.mpxj.DayType.DEFAULT;
}
switch (type)
{
case WORKING:
{
... | [
"private",
"boolean",
"isWorkingDay",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"Day",
"day",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"net",
".",
"sf",
".",
"mpxj",
".",
"DayType",
"type",
"=",
"mpxjCalendar",
".",
"getWorkingDay",
"(",
"day",
... | Used to determine if a particular day of the week is normally
a working day.
@param mpxjCalendar ProjectCalendar instance
@param day Day instance
@return boolean flag | [
"Used",
"to",
"determine",
"if",
"a",
"particular",
"day",
"of",
"the",
"week",
"is",
"normally",
"a",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L613-L651 |
157,183 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getWorkingDayString | private String getWorkingDayString(ProjectCalendar mpxjCalendar, Day day)
{
String result = null;
net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day);
if (type == null)
{
type = net.sf.mpxj.DayType.DEFAULT;
}
switch (type)
{
case WORKING:
{... | java | private String getWorkingDayString(ProjectCalendar mpxjCalendar, Day day)
{
String result = null;
net.sf.mpxj.DayType type = mpxjCalendar.getWorkingDay(day);
if (type == null)
{
type = net.sf.mpxj.DayType.DEFAULT;
}
switch (type)
{
case WORKING:
{... | [
"private",
"String",
"getWorkingDayString",
"(",
"ProjectCalendar",
"mpxjCalendar",
",",
"Day",
"day",
")",
"{",
"String",
"result",
"=",
"null",
";",
"net",
".",
"sf",
".",
"mpxj",
".",
"DayType",
"type",
"=",
"mpxjCalendar",
".",
"getWorkingDay",
"(",
"day... | Returns a flag represented as a String, indicating if
the supplied day is a working day.
@param mpxjCalendar MPXJ ProjectCalendar instance
@param day Day instance
@return boolean flag as a string | [
"Returns",
"a",
"flag",
"represented",
"as",
"a",
"String",
"indicating",
"if",
"the",
"supplied",
"day",
"is",
"a",
"working",
"day",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L661-L692 |
157,184 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getTimeString | private String getTimeString(Date value)
{
Calendar cal = DateHelper.popCalendar(value);
int hours = cal.get(Calendar.HOUR_OF_DAY);
int minutes = cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
StringBuilder sb = new StringBuilder(4);
sb.append(m_twoDigitFormat.form... | java | private String getTimeString(Date value)
{
Calendar cal = DateHelper.popCalendar(value);
int hours = cal.get(Calendar.HOUR_OF_DAY);
int minutes = cal.get(Calendar.MINUTE);
DateHelper.pushCalendar(cal);
StringBuilder sb = new StringBuilder(4);
sb.append(m_twoDigitFormat.form... | [
"private",
"String",
"getTimeString",
"(",
"Date",
"value",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"value",
")",
";",
"int",
"hours",
"=",
"cal",
".",
"get",
"(",
"Calendar",
".",
"HOUR_OF_DAY",
")",
";",
"int",
"minutes... | Convert a Java date into a Planner time.
0800
@param value Java Date instance
@return Planner time value | [
"Convert",
"a",
"Java",
"date",
"into",
"a",
"Planner",
"time",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L702-L714 |
157,185 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getDateString | private String getDateString(Date value)
{
Calendar cal = DateHelper.popCalendar(value);
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
DateHelper.pushCalendar(cal);
StringBuilder sb = new StringBuilder(... | java | private String getDateString(Date value)
{
Calendar cal = DateHelper.popCalendar(value);
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
DateHelper.pushCalendar(cal);
StringBuilder sb = new StringBuilder(... | [
"private",
"String",
"getDateString",
"(",
"Date",
"value",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"value",
")",
";",
"int",
"year",
"=",
"cal",
".",
"get",
"(",
"Calendar",
".",
"YEAR",
")",
";",
"int",
"month",
"=",
... | Convert a Java date into a Planner date.
20070222
@param value Java Date instance
@return Planner date | [
"Convert",
"a",
"Java",
"date",
"into",
"a",
"Planner",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L724-L738 |
157,186 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getDateTimeString | private String getDateTimeString(Date value)
{
String result = null;
if (value != null)
{
Calendar cal = DateHelper.popCalendar(value);
StringBuilder sb = new StringBuilder(16);
sb.append(m_fourDigitFormat.format(cal.get(Calendar.YEAR)));
sb.append(m_twoDigitForm... | java | private String getDateTimeString(Date value)
{
String result = null;
if (value != null)
{
Calendar cal = DateHelper.popCalendar(value);
StringBuilder sb = new StringBuilder(16);
sb.append(m_fourDigitFormat.format(cal.get(Calendar.YEAR)));
sb.append(m_twoDigitForm... | [
"private",
"String",
"getDateTimeString",
"(",
"Date",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"Calendar",
"cal",
"=",
"DateHelper",
".",
"popCalendar",
"(",
"value",
")",
";",
"StringBuilder",
... | Convert a Java date into a Planner date-time string.
20070222T080000Z
@param value Java date
@return Planner date-time string | [
"Convert",
"a",
"Java",
"date",
"into",
"a",
"Planner",
"date",
"-",
"time",
"string",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L748-L767 |
157,187 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerWriter.java | PlannerWriter.getDurationString | private String getDurationString(Duration value)
{
String result = null;
if (value != null)
{
double seconds = 0;
switch (value.getUnits())
{
case MINUTES:
case ELAPSED_MINUTES:
{
seconds = value.getDuration() * 60;
... | java | private String getDurationString(Duration value)
{
String result = null;
if (value != null)
{
double seconds = 0;
switch (value.getUnits())
{
case MINUTES:
case ELAPSED_MINUTES:
{
seconds = value.getDuration() * 60;
... | [
"private",
"String",
"getDurationString",
"(",
"Duration",
"value",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"double",
"seconds",
"=",
"0",
";",
"switch",
"(",
"value",
".",
"getUnits",
"(",
")",
")",
... | Converts an MPXJ Duration instance into the string representation
of a Planner duration.
Planner represents durations as a number of seconds in its
file format, however it displays durations as days and hours,
and seems to assume that a working day is 8 hours.
@param value string representation of a duration
@return ... | [
"Converts",
"an",
"MPXJ",
"Duration",
"instance",
"into",
"the",
"string",
"representation",
"of",
"a",
"Planner",
"duration",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerWriter.java#L780-L868 |
157,188 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readProjectProperties | private void readProjectProperties(Project project) throws MPXJException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
properties.setCompany(project.getCompany());
properties.setManager(project.getManager());
properties.setName(project.getName());
properties.se... | java | private void readProjectProperties(Project project) throws MPXJException
{
ProjectProperties properties = m_projectFile.getProjectProperties();
properties.setCompany(project.getCompany());
properties.setManager(project.getManager());
properties.setName(project.getName());
properties.se... | [
"private",
"void",
"readProjectProperties",
"(",
"Project",
"project",
")",
"throws",
"MPXJException",
"{",
"ProjectProperties",
"properties",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"properties",
".",
"setCompany",
"(",
"project",
".",
"ge... | This method extracts project properties from a Planner file.
@param project Root node of the Planner file | [
"This",
"method",
"extracts",
"project",
"properties",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L189-L197 |
157,189 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readCalendars | private void readCalendars(Project project) throws MPXJException
{
Calendars calendars = project.getCalendars();
if (calendars != null)
{
for (net.sf.mpxj.planner.schema.Calendar cal : calendars.getCalendar())
{
readCalendar(cal, null);
}
Integer def... | java | private void readCalendars(Project project) throws MPXJException
{
Calendars calendars = project.getCalendars();
if (calendars != null)
{
for (net.sf.mpxj.planner.schema.Calendar cal : calendars.getCalendar())
{
readCalendar(cal, null);
}
Integer def... | [
"private",
"void",
"readCalendars",
"(",
"Project",
"project",
")",
"throws",
"MPXJException",
"{",
"Calendars",
"calendars",
"=",
"project",
".",
"getCalendars",
"(",
")",
";",
"if",
"(",
"calendars",
"!=",
"null",
")",
"{",
"for",
"(",
"net",
".",
"sf",
... | This method extracts calendar data from a Planner file.
@param project Root node of the Planner file | [
"This",
"method",
"extracts",
"calendar",
"data",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L204-L221 |
157,190 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readCalendar | private void readCalendar(net.sf.mpxj.planner.schema.Calendar plannerCalendar, ProjectCalendar parentMpxjCalendar) throws MPXJException
{
//
// Create a calendar instance
//
ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
//
// Populate basic details
//
mp... | java | private void readCalendar(net.sf.mpxj.planner.schema.Calendar plannerCalendar, ProjectCalendar parentMpxjCalendar) throws MPXJException
{
//
// Create a calendar instance
//
ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
//
// Populate basic details
//
mp... | [
"private",
"void",
"readCalendar",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Calendar",
"plannerCalendar",
",",
"ProjectCalendar",
"parentMpxjCalendar",
")",
"throws",
"MPXJException",
"{",
"//",
"// Create a calendar instance",
"//",
... | This method extracts data for a single calendar from a Planner file.
@param plannerCalendar Calendar data
@param parentMpxjCalendar parent of derived calendar | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"calendar",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L229-L275 |
157,191 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readResources | private void readResources(Project plannerProject) throws MPXJException
{
Resources resources = plannerProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.planner.schema.Resource res : resources.getResource())
{
readResource(res);
}
}
} | java | private void readResources(Project plannerProject) throws MPXJException
{
Resources resources = plannerProject.getResources();
if (resources != null)
{
for (net.sf.mpxj.planner.schema.Resource res : resources.getResource())
{
readResource(res);
}
}
} | [
"private",
"void",
"readResources",
"(",
"Project",
"plannerProject",
")",
"throws",
"MPXJException",
"{",
"Resources",
"resources",
"=",
"plannerProject",
".",
"getResources",
"(",
")",
";",
"if",
"(",
"resources",
"!=",
"null",
")",
"{",
"for",
"(",
"net",
... | This method extracts resource data from a Planner file.
@param plannerProject Root node of the Planner file | [
"This",
"method",
"extracts",
"resource",
"data",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L463-L473 |
157,192 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readResource | private void readResource(net.sf.mpxj.planner.schema.Resource plannerResource) throws MPXJException
{
Resource mpxjResource = m_projectFile.addResource();
//mpxjResource.setResourceCalendar(m_projectFile.getBaseCalendarByUniqueID(getInteger(plannerResource.getCalendar())));
mpxjResource.setEmailAd... | java | private void readResource(net.sf.mpxj.planner.schema.Resource plannerResource) throws MPXJException
{
Resource mpxjResource = m_projectFile.addResource();
//mpxjResource.setResourceCalendar(m_projectFile.getBaseCalendarByUniqueID(getInteger(plannerResource.getCalendar())));
mpxjResource.setEmailAd... | [
"private",
"void",
"readResource",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Resource",
"plannerResource",
")",
"throws",
"MPXJException",
"{",
"Resource",
"mpxjResource",
"=",
"m_projectFile",
".",
"addResource",
"(",
")",
";",
... | This method extracts data for a single resource from a Planner file.
@param plannerResource Resource data | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"resource",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L480-L514 |
157,193 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readTasks | private void readTasks(Project plannerProject) throws MPXJException
{
Tasks tasks = plannerProject.getTasks();
if (tasks != null)
{
for (net.sf.mpxj.planner.schema.Task task : tasks.getTask())
{
readTask(null, task);
}
for (net.sf.mpxj.planner.schema... | java | private void readTasks(Project plannerProject) throws MPXJException
{
Tasks tasks = plannerProject.getTasks();
if (tasks != null)
{
for (net.sf.mpxj.planner.schema.Task task : tasks.getTask())
{
readTask(null, task);
}
for (net.sf.mpxj.planner.schema... | [
"private",
"void",
"readTasks",
"(",
"Project",
"plannerProject",
")",
"throws",
"MPXJException",
"{",
"Tasks",
"tasks",
"=",
"plannerProject",
".",
"getTasks",
"(",
")",
";",
"if",
"(",
"tasks",
"!=",
"null",
")",
"{",
"for",
"(",
"net",
".",
"sf",
".",... | This method extracts task data from a Planner file.
@param plannerProject Root node of the Planner file | [
"This",
"method",
"extracts",
"task",
"data",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L521-L538 |
157,194 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readPredecessors | private void readPredecessors(net.sf.mpxj.planner.schema.Task plannerTask)
{
Task mpxjTask = m_projectFile.getTaskByUniqueID(getInteger(plannerTask.getId()));
Predecessors predecessors = plannerTask.getPredecessors();
if (predecessors != null)
{
List<Predecessor> predecessorList = p... | java | private void readPredecessors(net.sf.mpxj.planner.schema.Task plannerTask)
{
Task mpxjTask = m_projectFile.getTaskByUniqueID(getInteger(plannerTask.getId()));
Predecessors predecessors = plannerTask.getPredecessors();
if (predecessors != null)
{
List<Predecessor> predecessorList = p... | [
"private",
"void",
"readPredecessors",
"(",
"net",
".",
"sf",
".",
"mpxj",
".",
"planner",
".",
"schema",
".",
"Task",
"plannerTask",
")",
"{",
"Task",
"mpxjTask",
"=",
"m_projectFile",
".",
"getTaskByUniqueID",
"(",
"getInteger",
"(",
"plannerTask",
".",
"g... | This method extracts predecessor data from a Planner file.
@param plannerTask Task data | [
"This",
"method",
"extracts",
"predecessor",
"data",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L660-L693 |
157,195 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.readAssignments | private void readAssignments(Project plannerProject)
{
Allocations allocations = plannerProject.getAllocations();
List<Allocation> allocationList = allocations.getAllocation();
Set<Task> tasksWithAssignments = new HashSet<Task>();
for (Allocation allocation : allocationList)
{
... | java | private void readAssignments(Project plannerProject)
{
Allocations allocations = plannerProject.getAllocations();
List<Allocation> allocationList = allocations.getAllocation();
Set<Task> tasksWithAssignments = new HashSet<Task>();
for (Allocation allocation : allocationList)
{
... | [
"private",
"void",
"readAssignments",
"(",
"Project",
"plannerProject",
")",
"{",
"Allocations",
"allocations",
"=",
"plannerProject",
".",
"getAllocations",
"(",
")",
";",
"List",
"<",
"Allocation",
">",
"allocationList",
"=",
"allocations",
".",
"getAllocation",
... | This method extracts assignment data from a Planner file.
@param plannerProject Root node of the Planner file | [
"This",
"method",
"extracts",
"assignment",
"data",
"from",
"a",
"Planner",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L700-L781 |
157,196 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.getDateTime | private Date getDateTime(String value) throws MPXJException
{
try
{
Number year = m_fourDigitFormat.parse(value.substring(0, 4));
Number month = m_twoDigitFormat.parse(value.substring(4, 6));
Number day = m_twoDigitFormat.parse(value.substring(6, 8));
Number hours = m... | java | private Date getDateTime(String value) throws MPXJException
{
try
{
Number year = m_fourDigitFormat.parse(value.substring(0, 4));
Number month = m_twoDigitFormat.parse(value.substring(4, 6));
Number day = m_twoDigitFormat.parse(value.substring(6, 8));
Number hours = m... | [
"private",
"Date",
"getDateTime",
"(",
"String",
"value",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"Number",
"year",
"=",
"m_fourDigitFormat",
".",
"parse",
"(",
"value",
".",
"substring",
"(",
"0",
",",
"4",
")",
")",
";",
"Number",
"month",
"="... | Convert a Planner date-time value into a Java date.
20070222T080000Z
@param value Planner date-time
@return Java Date instance | [
"Convert",
"a",
"Planner",
"date",
"-",
"time",
"value",
"into",
"a",
"Java",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L791-L822 |
157,197 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.getTime | private Date getTime(String value) throws MPXJException
{
try
{
Number hours = m_twoDigitFormat.parse(value.substring(0, 2));
Number minutes = m_twoDigitFormat.parse(value.substring(2, 4));
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hours.i... | java | private Date getTime(String value) throws MPXJException
{
try
{
Number hours = m_twoDigitFormat.parse(value.substring(0, 2));
Number minutes = m_twoDigitFormat.parse(value.substring(2, 4));
Calendar cal = DateHelper.popCalendar();
cal.set(Calendar.HOUR_OF_DAY, hours.i... | [
"private",
"Date",
"getTime",
"(",
"String",
"value",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"Number",
"hours",
"=",
"m_twoDigitFormat",
".",
"parse",
"(",
"value",
".",
"substring",
"(",
"0",
",",
"2",
")",
")",
";",
"Number",
"minutes",
"=",
... | Convert a Planner time into a Java date.
0800
@param value Planner time
@return Java Date instance | [
"Convert",
"a",
"Planner",
"time",
"into",
"a",
"Java",
"date",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L869-L891 |
157,198 | joniles/mpxj | src/main/java/net/sf/mpxj/planner/PlannerReader.java | PlannerReader.getDuration | private Duration getDuration(String value)
{
Duration result = null;
if (value != null && value.length() != 0)
{
double seconds = getLong(value);
double hours = seconds / (60 * 60);
double days = hours / 8;
if (days < 1)
{
result = Duration... | java | private Duration getDuration(String value)
{
Duration result = null;
if (value != null && value.length() != 0)
{
double seconds = getLong(value);
double hours = seconds / (60 * 60);
double days = hours / 8;
if (days < 1)
{
result = Duration... | [
"private",
"Duration",
"getDuration",
"(",
"String",
"value",
")",
"{",
"Duration",
"result",
"=",
"null",
";",
"if",
"(",
"value",
"!=",
"null",
"&&",
"value",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"double",
"seconds",
"=",
"getLong",
"(",
"... | Converts the string representation of a Planner duration into
an MPXJ Duration instance.
Planner represents durations as a number of seconds in its
file format, however it displays durations as days and hours,
and seems to assume that a working day is 8 hours.
@param value string representation of a duration
@return ... | [
"Converts",
"the",
"string",
"representation",
"of",
"a",
"Planner",
"duration",
"into",
"an",
"MPXJ",
"Duration",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L954-L976 |
157,199 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/TimephasedUtility.java | TimephasedUtility.segmentWork | public ArrayList<Duration> segmentWork(ProjectCalendar projectCalendar, List<TimephasedWork> work, TimescaleUnits rangeUnits, List<DateRange> dateList)
{
ArrayList<Duration> result = new ArrayList<Duration>(dateList.size());
int lastStartIndex = 0;
//
// Iterate through the list of dates ran... | java | public ArrayList<Duration> segmentWork(ProjectCalendar projectCalendar, List<TimephasedWork> work, TimescaleUnits rangeUnits, List<DateRange> dateList)
{
ArrayList<Duration> result = new ArrayList<Duration>(dateList.size());
int lastStartIndex = 0;
//
// Iterate through the list of dates ran... | [
"public",
"ArrayList",
"<",
"Duration",
">",
"segmentWork",
"(",
"ProjectCalendar",
"projectCalendar",
",",
"List",
"<",
"TimephasedWork",
">",
"work",
",",
"TimescaleUnits",
"rangeUnits",
",",
"List",
"<",
"DateRange",
">",
"dateList",
")",
"{",
"ArrayList",
"<... | This is the main entry point used to convert the internal representation
of timephased work into an external form which can
be displayed to the user.
@param projectCalendar calendar used by the resource assignment
@param work timephased resource assignment data
@param rangeUnits timescale units
@param dateList timesca... | [
"This",
"is",
"the",
"main",
"entry",
"point",
"used",
"to",
"convert",
"the",
"internal",
"representation",
"of",
"timephased",
"work",
"into",
"an",
"external",
"form",
"which",
"can",
"be",
"displayed",
"to",
"the",
"user",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L59-L95 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.