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,300 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.addClass | private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException
{
String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", ".");
writer.writeStartElement("cla... | java | private void addClass(URLClassLoader loader, JarEntry jarEntry, XMLStreamWriter writer, boolean mapClassMethods) throws ClassNotFoundException, XMLStreamException, IntrospectionException
{
String className = jarEntry.getName().replaceAll("\\.class", "").replaceAll("/", ".");
writer.writeStartElement("cla... | [
"private",
"void",
"addClass",
"(",
"URLClassLoader",
"loader",
",",
"JarEntry",
"jarEntry",
",",
"XMLStreamWriter",
"writer",
",",
"boolean",
"mapClassMethods",
")",
"throws",
"ClassNotFoundException",
",",
"XMLStreamException",
",",
"IntrospectionException",
"{",
"Str... | Add an individual class to the map file.
@param loader jar file class loader
@param jarEntry jar file entry
@param writer XML stream writer
@param mapClassMethods true if we want to produce .Net style class method names
@throws ClassNotFoundException
@throws XMLStreamException
@throws IntrospectionException | [
"Add",
"an",
"individual",
"class",
"to",
"the",
"map",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L178-L194 |
157,301 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.processProperties | private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
{
BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
... | java | private void processProperties(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass) throws IntrospectionException, XMLStreamException
{
BeanInfo beanInfo = Introspector.getBeanInfo(aClass, aClass.getSuperclass());
PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
... | [
"private",
"void",
"processProperties",
"(",
"XMLStreamWriter",
"writer",
",",
"Set",
"<",
"Method",
">",
"methodSet",
",",
"Class",
"<",
"?",
">",
"aClass",
")",
"throws",
"IntrospectionException",
",",
"XMLStreamException",
"{",
"BeanInfo",
"beanInfo",
"=",
"I... | Process class properties.
@param writer output stream
@param methodSet set of methods processed
@param aClass class being processed
@throws IntrospectionException
@throws XMLStreamException | [
"Process",
"class",
"properties",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L205-L238 |
157,302 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.addProperty | private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException
{
if (name.length() != 0)
{
writer.writeStartElement("property");
// convert property name to .NET style (i.e. first letter uppercase)
... | java | private void addProperty(XMLStreamWriter writer, String name, Class<?> propertyType, String readMethod, String writeMethod) throws XMLStreamException
{
if (name.length() != 0)
{
writer.writeStartElement("property");
// convert property name to .NET style (i.e. first letter uppercase)
... | [
"private",
"void",
"addProperty",
"(",
"XMLStreamWriter",
"writer",
",",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"propertyType",
",",
"String",
"readMethod",
",",
"String",
"writeMethod",
")",
"throws",
"XMLStreamException",
"{",
"if",
"(",
"name",
".",... | Add a simple property to the map file.
@param writer xml stream writer
@param name property name
@param propertyType property type
@param readMethod read method name
@param writeMethod write method name
@throws XMLStreamException | [
"Add",
"a",
"simple",
"property",
"to",
"the",
"map",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L250-L280 |
157,303 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.getTypeString | private String getTypeString(Class<?> c)
{
String result = TYPE_MAP.get(c);
if (result == null)
{
result = c.getName();
if (!result.endsWith(";") && !result.startsWith("["))
{
result = "L" + result + ";";
}
}
return result;
} | java | private String getTypeString(Class<?> c)
{
String result = TYPE_MAP.get(c);
if (result == null)
{
result = c.getName();
if (!result.endsWith(";") && !result.startsWith("["))
{
result = "L" + result + ";";
}
}
return result;
} | [
"private",
"String",
"getTypeString",
"(",
"Class",
"<",
"?",
">",
"c",
")",
"{",
"String",
"result",
"=",
"TYPE_MAP",
".",
"get",
"(",
"c",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"c",
".",
"getName",
"(",
")",
";",... | Converts a class into a signature token.
@param c class
@return signature token text | [
"Converts",
"a",
"class",
"into",
"a",
"signature",
"token",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L288-L300 |
157,304 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.processClassMethods | private void processClassMethods(XMLStreamWriter writer, Class<?> aClass, Set<Method> methodSet) throws XMLStreamException
{
Method[] methods = aClass.getDeclaredMethods();
for (Method method : methods)
{
if (!methodSet.contains(method) && Modifier.isPublic(method.getModifiers()) && !Modif... | java | private void processClassMethods(XMLStreamWriter writer, Class<?> aClass, Set<Method> methodSet) throws XMLStreamException
{
Method[] methods = aClass.getDeclaredMethods();
for (Method method : methods)
{
if (!methodSet.contains(method) && Modifier.isPublic(method.getModifiers()) && !Modif... | [
"private",
"void",
"processClassMethods",
"(",
"XMLStreamWriter",
"writer",
",",
"Class",
"<",
"?",
">",
"aClass",
",",
"Set",
"<",
"Method",
">",
"methodSet",
")",
"throws",
"XMLStreamException",
"{",
"Method",
"[",
"]",
"methods",
"=",
"aClass",
".",
"getD... | Hides the original Java-style method name using an attribute
which should be respected by Visual Studio, the creates a new
wrapper method using a .Net style method name.
Note that this does not work for VB as it is case insensitive. Even
though Visual Studio won't show you the Java-style method name,
the VB compiler s... | [
"Hides",
"the",
"original",
"Java",
"-",
"style",
"method",
"name",
"using",
"an",
"attribute",
"which",
"should",
"be",
"respected",
"by",
"Visual",
"Studio",
"the",
"creates",
"a",
"new",
"wrapper",
"method",
"using",
"a",
".",
"Net",
"style",
"method",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L367-L458 |
157,305 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.ignoreMethod | private boolean ignoreMethod(String name)
{
boolean result = false;
for (String ignoredName : IGNORED_METHODS)
{
if (name.matches(ignoredName))
{
result = true;
break;
}
}
return result;
} | java | private boolean ignoreMethod(String name)
{
boolean result = false;
for (String ignoredName : IGNORED_METHODS)
{
if (name.matches(ignoredName))
{
result = true;
break;
}
}
return result;
} | [
"private",
"boolean",
"ignoreMethod",
"(",
"String",
"name",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"String",
"ignoredName",
":",
"IGNORED_METHODS",
")",
"{",
"if",
"(",
"name",
".",
"matches",
"(",
"ignoredName",
")",
")",
"{",
"r... | Used to determine if the current method should be ignored.
@param name method name
@return true if the method should be ignored | [
"Used",
"to",
"determine",
"if",
"the",
"current",
"method",
"should",
"be",
"ignored",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L466-L480 |
157,306 | joniles/mpxj | src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java | MapFileGenerator.createMethodSignature | private String createMethodSignature(Method method)
{
StringBuilder sb = new StringBuilder();
sb.append("(");
for (Class<?> type : method.getParameterTypes())
{
sb.append(getTypeString(type));
}
sb.append(")");
Class<?> type = method.getReturnType();
if (type.... | java | private String createMethodSignature(Method method)
{
StringBuilder sb = new StringBuilder();
sb.append("(");
for (Class<?> type : method.getParameterTypes())
{
sb.append(getTypeString(type));
}
sb.append(")");
Class<?> type = method.getReturnType();
if (type.... | [
"private",
"String",
"createMethodSignature",
"(",
"Method",
"method",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"type",
":",
"method",
... | Creates a method signature.
@param method Method instance
@return method signature | [
"Creates",
"a",
"method",
"signature",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L488-L507 |
157,307 | joniles/mpxj | src/main/java/net/sf/mpxj/ProjectCalendarException.java | ProjectCalendarException.contains | public boolean contains(Date date)
{
boolean result = false;
if (date != null)
{
result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0);
}
return (result);
} | java | public boolean contains(Date date)
{
boolean result = false;
if (date != null)
{
result = (DateHelper.compare(getFromDate(), getToDate(), date) == 0);
}
return (result);
} | [
"public",
"boolean",
"contains",
"(",
"Date",
"date",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"if",
"(",
"date",
"!=",
"null",
")",
"{",
"result",
"=",
"(",
"DateHelper",
".",
"compare",
"(",
"getFromDate",
"(",
")",
",",
"getToDate",
"(",
... | This method determines whether the given date falls in the range of
dates covered by this exception. Note that this method assumes that both
the start and end date of this exception have been set.
@param date Date to be tested
@return Boolean value | [
"This",
"method",
"determines",
"whether",
"the",
"given",
"date",
"falls",
"in",
"the",
"range",
"of",
"dates",
"covered",
"by",
"this",
"exception",
".",
"Note",
"that",
"this",
"method",
"assumes",
"that",
"both",
"the",
"start",
"and",
"end",
"date",
"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarException.java#L129-L139 |
157,308 | joniles/mpxj | src/main/java/net/sf/mpxj/explorer/JTableExtra.java | JTableExtra.setModel | @Override public void setModel(TableModel model)
{
super.setModel(model);
int columns = model.getColumnCount();
TableColumnModel tableColumnModel = getColumnModel();
for (int index = 0; index < columns; index++)
{
tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidt... | java | @Override public void setModel(TableModel model)
{
super.setModel(model);
int columns = model.getColumnCount();
TableColumnModel tableColumnModel = getColumnModel();
for (int index = 0; index < columns; index++)
{
tableColumnModel.getColumn(index).setPreferredWidth(m_columnWidt... | [
"@",
"Override",
"public",
"void",
"setModel",
"(",
"TableModel",
"model",
")",
"{",
"super",
".",
"setModel",
"(",
"model",
")",
";",
"int",
"columns",
"=",
"model",
".",
"getColumnCount",
"(",
")",
";",
"TableColumnModel",
"tableColumnModel",
"=",
"getColu... | Updates the model. Ensures that we reset the columns widths.
@param model table model | [
"Updates",
"the",
"model",
".",
"Ensures",
"that",
"we",
"reset",
"the",
"columns",
"widths",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/JTableExtra.java#L139-L148 |
157,309 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.process | @Override public void process(MPPReader reader, ProjectFile file, DirectoryEntry root) throws MPXJException, IOException
{
try
{
populateMemberData(reader, file, root);
processProjectProperties();
if (!reader.getReadPropertiesOnly())
{
processSubProjectDat... | java | @Override public void process(MPPReader reader, ProjectFile file, DirectoryEntry root) throws MPXJException, IOException
{
try
{
populateMemberData(reader, file, root);
processProjectProperties();
if (!reader.getReadPropertiesOnly())
{
processSubProjectDat... | [
"@",
"Override",
"public",
"void",
"process",
"(",
"MPPReader",
"reader",
",",
"ProjectFile",
"file",
",",
"DirectoryEntry",
"root",
")",
"throws",
"MPXJException",
",",
"IOException",
"{",
"try",
"{",
"populateMemberData",
"(",
"reader",
",",
"file",
",",
"ro... | This method is used to process an MPP14 file. This is the file format
used by Project 14.
@param reader parent file reader
@param file parent MPP file
@param root Root of the POI file system. | [
"This",
"method",
"is",
"used",
"to",
"process",
"an",
"MPP14",
"file",
".",
"This",
"is",
"the",
"file",
"format",
"used",
"by",
"Project",
"14",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L80-L115 |
157,310 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.processGraphicalIndicators | private void processGraphicalIndicators()
{
GraphicalIndicatorReader graphicalIndicatorReader = new GraphicalIndicatorReader();
graphicalIndicatorReader.process(m_file.getCustomFields(), m_file.getProjectProperties(), m_projectProps);
} | java | private void processGraphicalIndicators()
{
GraphicalIndicatorReader graphicalIndicatorReader = new GraphicalIndicatorReader();
graphicalIndicatorReader.process(m_file.getCustomFields(), m_file.getProjectProperties(), m_projectProps);
} | [
"private",
"void",
"processGraphicalIndicators",
"(",
")",
"{",
"GraphicalIndicatorReader",
"graphicalIndicatorReader",
"=",
"new",
"GraphicalIndicatorReader",
"(",
")",
";",
"graphicalIndicatorReader",
".",
"process",
"(",
"m_file",
".",
"getCustomFields",
"(",
")",
",... | Process the graphical indicator data. | [
"Process",
"the",
"graphical",
"indicator",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L230-L234 |
157,311 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.readSubProjects | private void readSubProjects(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex)
{
while (uniqueIDOffset < filePathOffset)
{
readSubProject(data, uniqueIDOffset, filePathOffset, fileNameOffset, subprojectIndex++);
uniqueIDOffset += 4;
}
... | java | private void readSubProjects(byte[] data, int uniqueIDOffset, int filePathOffset, int fileNameOffset, int subprojectIndex)
{
while (uniqueIDOffset < filePathOffset)
{
readSubProject(data, uniqueIDOffset, filePathOffset, fileNameOffset, subprojectIndex++);
uniqueIDOffset += 4;
}
... | [
"private",
"void",
"readSubProjects",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"uniqueIDOffset",
",",
"int",
"filePathOffset",
",",
"int",
"fileNameOffset",
",",
"int",
"subprojectIndex",
")",
"{",
"while",
"(",
"uniqueIDOffset",
"<",
"filePathOffset",
")",
... | Read a list of sub projects.
@param data byte array
@param uniqueIDOffset offset of unique ID
@param filePathOffset offset of file path
@param fileNameOffset offset of file name
@param subprojectIndex index of the subproject, used to calculate unique id offset | [
"Read",
"a",
"list",
"of",
"sub",
"projects",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L559-L566 |
157,312 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.processBaseFonts | private void processBaseFonts(byte[] data)
{
int offset = 0;
int blockCount = MPPUtility.getShort(data, 0);
offset += 2;
int size;
String name;
for (int loop = 0; loop < blockCount; loop++)
{
/*unknownAttribute = MPPUtility.getShort(data, offset);*/
offs... | java | private void processBaseFonts(byte[] data)
{
int offset = 0;
int blockCount = MPPUtility.getShort(data, 0);
offset += 2;
int size;
String name;
for (int loop = 0; loop < blockCount; loop++)
{
/*unknownAttribute = MPPUtility.getShort(data, offset);*/
offs... | [
"private",
"void",
"processBaseFonts",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"int",
"blockCount",
"=",
"MPPUtility",
".",
"getShort",
"(",
"data",
",",
"0",
")",
";",
"offset",
"+=",
"2",
";",
"int",
"size",
";",
... | Create an index of base font numbers and their associated base
font instances.
@param data property data | [
"Create",
"an",
"index",
"of",
"base",
"font",
"numbers",
"and",
"their",
"associated",
"base",
"font",
"instances",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L773-L800 |
157,313 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.createTaskMap | private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData)
{
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID);
Integer taskNameKe... | java | private TreeMap<Integer, Integer> createTaskMap(FieldMap fieldMap, FixedMeta taskFixedMeta, FixedData taskFixedData, Var2Data taskVarData)
{
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
int uniqueIdOffset = fieldMap.getFixedDataOffset(TaskField.UNIQUE_ID);
Integer taskNameKe... | [
"private",
"TreeMap",
"<",
"Integer",
",",
"Integer",
">",
"createTaskMap",
"(",
"FieldMap",
"fieldMap",
",",
"FixedMeta",
"taskFixedMeta",
",",
"FixedData",
"taskFixedData",
",",
"Var2Data",
"taskVarData",
")",
"{",
"TreeMap",
"<",
"Integer",
",",
"Integer",
">... | This method maps the task unique identifiers to their index number
within the FixedData block.
@param fieldMap field map
@param taskFixedMeta Fixed meta data for this task
@param taskFixedData Fixed data for this task
@param taskVarData Variable task data
@return Mapping between task identifiers and block position | [
"This",
"method",
"maps",
"the",
"task",
"unique",
"identifiers",
"to",
"their",
"index",
"number",
"within",
"the",
"FixedData",
"block",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L812-L890 |
157,314 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.postProcessTasks | private void postProcessTasks() throws MPXJException
{
//
// Renumber ID values using a large increment to allow
// space for later inserts.
//
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
// I've found a pathological case of an MPP file with around 102k b... | java | private void postProcessTasks() throws MPXJException
{
//
// Renumber ID values using a large increment to allow
// space for later inserts.
//
TreeMap<Integer, Integer> taskMap = new TreeMap<Integer, Integer>();
// I've found a pathological case of an MPP file with around 102k b... | [
"private",
"void",
"postProcessTasks",
"(",
")",
"throws",
"MPXJException",
"{",
"//",
"// Renumber ID values using a large increment to allow",
"// space for later inserts.",
"//",
"TreeMap",
"<",
"Integer",
",",
"Integer",
">",
"taskMap",
"=",
"new",
"TreeMap",
"<",
"... | MPP14 files seem to exhibit some occasional weirdness
with duplicate ID values which leads to the task structure
being reported incorrectly. The following method attempts to correct this.
The method uses ordering data embedded in the file to reconstruct
the correct ID order of the tasks. | [
"MPP14",
"files",
"seem",
"to",
"exhibit",
"some",
"occasional",
"weirdness",
"with",
"duplicate",
"ID",
"values",
"which",
"leads",
"to",
"the",
"task",
"structure",
"being",
"reported",
"incorrectly",
".",
"The",
"following",
"method",
"attempts",
"to",
"corre... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1317-L1376 |
157,315 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.processHyperlinkData | private void processHyperlinkData(Resource resource, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hy... | java | private void processHyperlinkData(Resource resource, byte[] data)
{
if (data != null)
{
int offset = 12;
String hyperlink;
String address;
String subaddress;
offset += 12;
hyperlink = MPPUtility.getUnicodeString(data, offset);
offset += ((hy... | [
"private",
"void",
"processHyperlinkData",
"(",
"Resource",
"resource",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"int",
"offset",
"=",
"12",
";",
"String",
"hyperlink",
";",
"String",
"address",
";",
"String",
... | This method is used to extract the resource hyperlink attributes
from a block of data and call the appropriate modifier methods
to configure the specified task object.
@param resource resource instance
@param data hyperlink data block | [
"This",
"method",
"is",
"used",
"to",
"extract",
"the",
"resource",
"hyperlink",
"attributes",
"from",
"a",
"block",
"of",
"data",
"and",
"call",
"the",
"appropriate",
"modifier",
"methods",
"to",
"configure",
"the",
"specified",
"task",
"object",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1547-L1571 |
157,316 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPP14Reader.java | MPP14Reader.readBitFields | private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data)
{
for (MppBitFlag flag : flags)
{
flag.setValue(container, data);
}
} | java | private void readBitFields(MppBitFlag[] flags, FieldContainer container, byte[] data)
{
for (MppBitFlag flag : flags)
{
flag.setValue(container, data);
}
} | [
"private",
"void",
"readBitFields",
"(",
"MppBitFlag",
"[",
"]",
"flags",
",",
"FieldContainer",
"container",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"for",
"(",
"MppBitFlag",
"flag",
":",
"flags",
")",
"{",
"flag",
".",
"setValue",
"(",
"container",
",... | Iterate through a set of bit field flags and set the value for each one
in the supplied container.
@param flags bit field flags
@param container field container
@param data source data | [
"Iterate",
"through",
"a",
"set",
"of",
"bit",
"field",
"flags",
"and",
"set",
"the",
"value",
"for",
"each",
"one",
"in",
"the",
"supplied",
"container",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L2039-L2045 |
157,317 | joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/Table.java | Table.read | public void read(InputStream is) throws IOException
{
byte[] headerBlock = new byte[20];
is.read(headerBlock);
int headerLength = PEPUtility.getShort(headerBlock, 8);
int recordCount = PEPUtility.getInt(headerBlock, 10);
int recordLength = PEPUtility.getInt(headerBlock, 16);
Stre... | java | public void read(InputStream is) throws IOException
{
byte[] headerBlock = new byte[20];
is.read(headerBlock);
int headerLength = PEPUtility.getShort(headerBlock, 8);
int recordCount = PEPUtility.getInt(headerBlock, 10);
int recordLength = PEPUtility.getInt(headerBlock, 16);
Stre... | [
"public",
"void",
"read",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"headerBlock",
"=",
"new",
"byte",
"[",
"20",
"]",
";",
"is",
".",
"read",
"(",
"headerBlock",
")",
";",
"int",
"headerLength",
"=",
"PEPUtility",
... | Reads the table data from an input stream and breaks
it down into rows.
@param is input stream | [
"Reads",
"the",
"table",
"data",
"from",
"an",
"input",
"stream",
"and",
"breaks",
"it",
"down",
"into",
"rows",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/Table.java#L59-L75 |
157,318 | joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/Table.java | Table.addRow | protected void addRow(int uniqueID, Map<String, Object> map)
{
m_rows.put(Integer.valueOf(uniqueID), new MapRow(map));
} | java | protected void addRow(int uniqueID, Map<String, Object> map)
{
m_rows.put(Integer.valueOf(uniqueID), new MapRow(map));
} | [
"protected",
"void",
"addRow",
"(",
"int",
"uniqueID",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"m_rows",
".",
"put",
"(",
"Integer",
".",
"valueOf",
"(",
"uniqueID",
")",
",",
"new",
"MapRow",
"(",
"map",
")",
")",
";",
"}"
... | Adds a row to the internal storage, indexed by primary key.
@param uniqueID unique ID of the row
@param map row data as a simpe map | [
"Adds",
"a",
"row",
"to",
"the",
"internal",
"storage",
"indexed",
"by",
"primary",
"key",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/Table.java#L106-L109 |
157,319 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java | TimephasedDataFactory.getCompleteWork | public List<TimephasedWork> getCompleteWork(ProjectCalendar calendar, ResourceAssignment resourceAssignment, byte[] data)
{
LinkedList<TimephasedWork> list = new LinkedList<TimephasedWork>();
if (calendar != null && data != null && data.length > 2 && MPPUtility.getShort(data, 0) > 0)
{
Da... | java | public List<TimephasedWork> getCompleteWork(ProjectCalendar calendar, ResourceAssignment resourceAssignment, byte[] data)
{
LinkedList<TimephasedWork> list = new LinkedList<TimephasedWork>();
if (calendar != null && data != null && data.length > 2 && MPPUtility.getShort(data, 0) > 0)
{
Da... | [
"public",
"List",
"<",
"TimephasedWork",
">",
"getCompleteWork",
"(",
"ProjectCalendar",
"calendar",
",",
"ResourceAssignment",
"resourceAssignment",
",",
"byte",
"[",
"]",
"data",
")",
"{",
"LinkedList",
"<",
"TimephasedWork",
">",
"list",
"=",
"new",
"LinkedList... | Given a block of data representing completed work, this method will
retrieve a set of TimephasedWork instances which represent
the day by day work carried out for a specific resource assignment.
@param calendar calendar on which date calculations are based
@param resourceAssignment resource assignment
@param data comp... | [
"Given",
"a",
"block",
"of",
"data",
"representing",
"completed",
"work",
"this",
"method",
"will",
"retrieve",
"a",
"set",
"of",
"TimephasedWork",
"instances",
"which",
"represent",
"the",
"day",
"by",
"day",
"work",
"carried",
"out",
"for",
"a",
"specific",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L61-L149 |
157,320 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java | TimephasedDataFactory.getWorkModified | public boolean getWorkModified(List<TimephasedWork> list)
{
boolean result = false;
for (TimephasedWork assignment : list)
{
result = assignment.getModified();
if (result)
{
break;
}
}
return result;
} | java | public boolean getWorkModified(List<TimephasedWork> list)
{
boolean result = false;
for (TimephasedWork assignment : list)
{
result = assignment.getModified();
if (result)
{
break;
}
}
return result;
} | [
"public",
"boolean",
"getWorkModified",
"(",
"List",
"<",
"TimephasedWork",
">",
"list",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"TimephasedWork",
"assignment",
":",
"list",
")",
"{",
"result",
"=",
"assignment",
".",
"getModified",
"("... | Test the list of TimephasedWork instances to see
if any of them have been modified.
@param list list of TimephasedWork instances
@return boolean flag | [
"Test",
"the",
"list",
"of",
"TimephasedWork",
"instances",
"to",
"see",
"if",
"any",
"of",
"them",
"have",
"been",
"modified",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L304-L316 |
157,321 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java | TimephasedDataFactory.getBaselineWork | public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedWorkContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedWork> list = null;
... | java | public TimephasedWorkContainer getBaselineWork(ResourceAssignment assignment, ProjectCalendar calendar, TimephasedWorkNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedWorkContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedWork> list = null;
... | [
"public",
"TimephasedWorkContainer",
"getBaselineWork",
"(",
"ResourceAssignment",
"assignment",
",",
"ProjectCalendar",
"calendar",
",",
"TimephasedWorkNormaliser",
"normaliser",
",",
"byte",
"[",
"]",
"data",
",",
"boolean",
"raw",
")",
"{",
"TimephasedWorkContainer",
... | Extracts baseline work from the MPP file for a specific baseline.
Returns null if no baseline work is present, otherwise returns
a list of timephased work items.
@param assignment parent assignment
@param calendar baseline calendar
@param normaliser normaliser associated with this data
@param data timephased baseline ... | [
"Extracts",
"baseline",
"work",
"from",
"the",
"MPP",
"file",
"for",
"a",
"specific",
"baseline",
".",
"Returns",
"null",
"if",
"no",
"baseline",
"work",
"is",
"present",
"otherwise",
"returns",
"a",
"list",
"of",
"timephased",
"work",
"items",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L330-L392 |
157,322 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java | TimephasedDataFactory.getBaselineCost | public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedCostContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedCost> list = null;
//System.out.println(By... | java | public TimephasedCostContainer getBaselineCost(ProjectCalendar calendar, TimephasedCostNormaliser normaliser, byte[] data, boolean raw)
{
TimephasedCostContainer result = null;
if (data != null && data.length > 0)
{
LinkedList<TimephasedCost> list = null;
//System.out.println(By... | [
"public",
"TimephasedCostContainer",
"getBaselineCost",
"(",
"ProjectCalendar",
"calendar",
",",
"TimephasedCostNormaliser",
"normaliser",
",",
"byte",
"[",
"]",
"data",
",",
"boolean",
"raw",
")",
"{",
"TimephasedCostContainer",
"result",
"=",
"null",
";",
"if",
"(... | Extracts baseline cost from the MPP file for a specific baseline.
Returns null if no baseline cost is present, otherwise returns
a list of timephased work items.
@param calendar baseline calendar
@param normaliser normaliser associated with this data
@param data timephased baseline work data block
@param raw flag indi... | [
"Extracts",
"baseline",
"cost",
"from",
"the",
"MPP",
"file",
"for",
"a",
"specific",
"baseline",
".",
"Returns",
"null",
"if",
"no",
"baseline",
"cost",
"is",
"present",
"otherwise",
"returns",
"a",
"list",
"of",
"timephased",
"work",
"items",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/TimephasedDataFactory.java#L405-L453 |
157,323 | joniles/mpxj | src/main/java/net/sf/mpxj/common/SplitTaskFactory.java | SplitTaskFactory.processSplitData | public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned)
{
Date splitsComplete = null;
TimephasedWork lastComplete = null;
TimephasedWork firstPlanned = null;
if (!timephasedComplete.isEmpty())
{
lastComplete = tim... | java | public void processSplitData(Task task, List<TimephasedWork> timephasedComplete, List<TimephasedWork> timephasedPlanned)
{
Date splitsComplete = null;
TimephasedWork lastComplete = null;
TimephasedWork firstPlanned = null;
if (!timephasedComplete.isEmpty())
{
lastComplete = tim... | [
"public",
"void",
"processSplitData",
"(",
"Task",
"task",
",",
"List",
"<",
"TimephasedWork",
">",
"timephasedComplete",
",",
"List",
"<",
"TimephasedWork",
">",
"timephasedPlanned",
")",
"{",
"Date",
"splitsComplete",
"=",
"null",
";",
"TimephasedWork",
"lastCom... | Process the timephased resource assignment data to work out the
split structure of the task.
@param task parent task
@param timephasedComplete completed resource assignment work
@param timephasedPlanned planned resource assignment work | [
"Process",
"the",
"timephased",
"resource",
"assignment",
"data",
"to",
"work",
"out",
"the",
"split",
"structure",
"of",
"the",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/SplitTaskFactory.java#L48-L131 |
157,324 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.updateScheduleSource | private void updateScheduleSource(ProjectProperties properties)
{
// Rudimentary identification of schedule source
if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd"))
{
properties.setFileApplication("Synchro");
}
else
{
... | java | private void updateScheduleSource(ProjectProperties properties)
{
// Rudimentary identification of schedule source
if (properties.getCompany() != null && properties.getCompany().equals("Synchro Software Ltd"))
{
properties.setFileApplication("Synchro");
}
else
{
... | [
"private",
"void",
"updateScheduleSource",
"(",
"ProjectProperties",
"properties",
")",
"{",
"// Rudimentary identification of schedule source",
"if",
"(",
"properties",
".",
"getCompany",
"(",
")",
"!=",
"null",
"&&",
"properties",
".",
"getCompany",
"(",
")",
".",
... | Populate the properties indicating the source of this schedule.
@param properties project properties | [
"Populate",
"the",
"properties",
"indicating",
"the",
"source",
"of",
"this",
"schedule",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L357-L376 |
157,325 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readCalendars | private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map)
{
Project.Calendars calendars = project.getCalendars();
if (calendars != null)
{
LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>();
... | java | private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map)
{
Project.Calendars calendars = project.getCalendars();
if (calendars != null)
{
LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>();
... | [
"private",
"void",
"readCalendars",
"(",
"Project",
"project",
",",
"HashMap",
"<",
"BigInteger",
",",
"ProjectCalendar",
">",
"map",
")",
"{",
"Project",
".",
"Calendars",
"calendars",
"=",
"project",
".",
"getCalendars",
"(",
")",
";",
"if",
"(",
"calendar... | This method extracts calendar data from an MSPDI file.
@param project Root node of the MSPDI file
@param map Map of calendar UIDs to names | [
"This",
"method",
"extracts",
"calendar",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L384-L409 |
157,326 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.updateBaseCalendarNames | private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
BigInteger baseCalendarID = pair.getSecond... | java | private static void updateBaseCalendarNames(List<Pair<ProjectCalendar, BigInteger>> baseCalendars, HashMap<BigInteger, ProjectCalendar> map)
{
for (Pair<ProjectCalendar, BigInteger> pair : baseCalendars)
{
ProjectCalendar cal = pair.getFirst();
BigInteger baseCalendarID = pair.getSecond... | [
"private",
"static",
"void",
"updateBaseCalendarNames",
"(",
"List",
"<",
"Pair",
"<",
"ProjectCalendar",
",",
"BigInteger",
">",
">",
"baseCalendars",
",",
"HashMap",
"<",
"BigInteger",
",",
"ProjectCalendar",
">",
"map",
")",
"{",
"for",
"(",
"Pair",
"<",
... | The way calendars are stored in an MSPDI file means that there
can be forward references between the base calendar unique ID for a
derived calendar, and the base calendar itself. To get around this,
we initially populate the base calendar name attribute with the
base calendar unique ID, and now in this method we can co... | [
"The",
"way",
"calendars",
"are",
"stored",
"in",
"an",
"MSPDI",
"file",
"means",
"that",
"there",
"can",
"be",
"forward",
"references",
"between",
"the",
"base",
"calendar",
"unique",
"ID",
"for",
"a",
"derived",
"calendar",
"and",
"the",
"base",
"calendar"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L422-L435 |
157,327 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readCalendar | private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars)
{
ProjectCalendar bc = m_projectFile.addCalendar();
bc.setUniqueID(NumberHelper.getInteger(calendar.getUID()));
bc.setName(calendar.getName... | java | private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars)
{
ProjectCalendar bc = m_projectFile.addCalendar();
bc.setUniqueID(NumberHelper.getInteger(calendar.getUID()));
bc.setName(calendar.getName... | [
"private",
"void",
"readCalendar",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"calendar",
",",
"HashMap",
"<",
"BigInteger",
",",
"ProjectCalendar",
">",
"map",
",",
"List",
"<",
"Pair",
"<",
"ProjectCalendar",
",",
"BigInteger",
">",
">",
"baseCalenda... | This method extracts data for a single calendar from an MSPDI file.
@param calendar Calendar data
@param map Map of calendar UIDs to names
@param baseCalendars list of base calendars | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"calendar",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L444-L482 |
157,328 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readDay | private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays)
{
BigInteger dayType = day.getDayType();
if (dayType != null)
{
if (dayType.intValue() == 0)
{
if (readExceptionsFromDays)
{
... | java | private void readDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day, boolean readExceptionsFromDays)
{
BigInteger dayType = day.getDayType();
if (dayType != null)
{
if (dayType.intValue() == 0)
{
if (readExceptionsFromDays)
{
... | [
"private",
"void",
"readDay",
"(",
"ProjectCalendar",
"calendar",
",",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
"day",
",",
"boolean",
"readExceptionsFromDays",
")",
"{",
"BigInteger",
"dayType",
"=",
"day",
".",
"getDayType... | This method extracts data for a single day from an MSPDI file.
@param calendar Calendar data
@param day Day data
@param readExceptionsFromDays read exceptions form day definitions | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"day",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L491-L508 |
157,329 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readNormalDay | private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay)
{
int dayNumber = weekDay.getDayType().intValue();
Day day = Day.getInstance(dayNumber);
calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking()));
ProjectCalendarHour... | java | private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay)
{
int dayNumber = weekDay.getDayType().intValue();
Day day = Day.getInstance(dayNumber);
calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking()));
ProjectCalendarHour... | [
"private",
"void",
"readNormalDay",
"(",
"ProjectCalendar",
"calendar",
",",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
"weekDay",
")",
"{",
"int",
"dayNumber",
"=",
"weekDay",
".",
"getDayType",
"(",
")",
".",
"intValue",
... | This method extracts data for a normal working day from an MSPDI file.
@param calendar Calendar data
@param weekDay Day data | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"normal",
"working",
"day",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L516-L542 |
157,330 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readExceptionDay | private void readExceptionDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day)
{
Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod timePeriod = day.getTimePeriod();
Date fromDate = timePeriod.getFromDate();
Date toDate = timePeriod.getToDate();
Project.Calendars... | java | private void readExceptionDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay day)
{
Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod timePeriod = day.getTimePeriod();
Date fromDate = timePeriod.getFromDate();
Date toDate = timePeriod.getToDate();
Project.Calendars... | [
"private",
"void",
"readExceptionDay",
"(",
"ProjectCalendar",
"calendar",
",",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
"day",
")",
"{",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"WeekDays",
".",
"WeekDay",
".",
... | This method extracts data for an exception day from an MSPDI file.
@param calendar Calendar data
@param day Day data | [
"This",
"method",
"extracts",
"data",
"for",
"an",
"exception",
"day",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L550-L577 |
157,331 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readExceptions | private void readExceptions(Project.Calendars.Calendar calendar, ProjectCalendar bc)
{
Project.Calendars.Calendar.Exceptions exceptions = calendar.getExceptions();
if (exceptions != null)
{
for (Project.Calendars.Calendar.Exceptions.Exception exception : exceptions.getException())
... | java | private void readExceptions(Project.Calendars.Calendar calendar, ProjectCalendar bc)
{
Project.Calendars.Calendar.Exceptions exceptions = calendar.getExceptions();
if (exceptions != null)
{
for (Project.Calendars.Calendar.Exceptions.Exception exception : exceptions.getException())
... | [
"private",
"void",
"readExceptions",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"calendar",
",",
"ProjectCalendar",
"bc",
")",
"{",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"Exceptions",
"exceptions",
"=",
"calendar",
".",
"getExceptions",
"(",... | Reads any exceptions present in the file. This is only used in MSPDI
file versions saved by Project 2007 and later.
@param calendar XML calendar
@param bc MPXJ calendar | [
"Reads",
"any",
"exceptions",
"present",
"in",
"the",
"file",
".",
"This",
"is",
"only",
"used",
"in",
"MSPDI",
"file",
"versions",
"saved",
"by",
"Project",
"2007",
"and",
"later",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L586-L596 |
157,332 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readException | private void readException(ProjectCalendar bc, Project.Calendars.Calendar.Exceptions.Exception exception)
{
Date fromDate = exception.getTimePeriod().getFromDate();
Date toDate = exception.getTimePeriod().getToDate();
// Vico Schedule Planner seems to write start and end dates to FromTime and ToTi... | java | private void readException(ProjectCalendar bc, Project.Calendars.Calendar.Exceptions.Exception exception)
{
Date fromDate = exception.getTimePeriod().getFromDate();
Date toDate = exception.getTimePeriod().getToDate();
// Vico Schedule Planner seems to write start and end dates to FromTime and ToTi... | [
"private",
"void",
"readException",
"(",
"ProjectCalendar",
"bc",
",",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"Exceptions",
".",
"Exception",
"exception",
")",
"{",
"Date",
"fromDate",
"=",
"exception",
".",
"getTimePeriod",
"(",
")",
".",
"getFrom... | Read a single calendar exception.
@param bc parent calendar
@param exception exception data | [
"Read",
"a",
"single",
"calendar",
"exception",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L604-L638 |
157,333 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readRecurringData | private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception)
{
RecurrenceType rt = getRecurrenceType(NumberHelper.getInt(exception.getType()));
if (rt != null)
{
RecurringData rd = new RecurringData();
rd.setStartDate(bce.... | java | private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception)
{
RecurrenceType rt = getRecurrenceType(NumberHelper.getInt(exception.getType()));
if (rt != null)
{
RecurringData rd = new RecurringData();
rd.setStartDate(bce.... | [
"private",
"void",
"readRecurringData",
"(",
"ProjectCalendarException",
"bce",
",",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"Exceptions",
".",
"Exception",
"exception",
")",
"{",
"RecurrenceType",
"rt",
"=",
"getRecurrenceType",
"(",
"NumberHelper",
".",... | Read recurring data for a calendar exception.
@param bce MPXJ calendar exception
@param exception XML calendar exception | [
"Read",
"recurring",
"data",
"for",
"a",
"calendar",
"exception",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L646-L709 |
157,334 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.getFrequency | private Integer getFrequency(Project.Calendars.Calendar.Exceptions.Exception exception)
{
Integer period = NumberHelper.getInteger(exception.getPeriod());
if (period == null)
{
period = Integer.valueOf(1);
}
return period;
} | java | private Integer getFrequency(Project.Calendars.Calendar.Exceptions.Exception exception)
{
Integer period = NumberHelper.getInteger(exception.getPeriod());
if (period == null)
{
period = Integer.valueOf(1);
}
return period;
} | [
"private",
"Integer",
"getFrequency",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
".",
"Exceptions",
".",
"Exception",
"exception",
")",
"{",
"Integer",
"period",
"=",
"NumberHelper",
".",
"getInteger",
"(",
"exception",
".",
"getPeriod",
"(",
")",
")",... | Retrieve the frequency of an exception.
@param exception XML calendar exception
@return frequency | [
"Retrieve",
"the",
"frequency",
"of",
"an",
"exception",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L759-L767 |
157,335 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readWorkWeeks | private void readWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
WorkWeeks ww = xmlCalendar.getWorkWeeks();
if (ww != null)
{
for (WorkWeek xmlWeek : ww.getWorkWeek())
{
ProjectCalendarWeek week = mpxjCalendar.addWorkWeek();
... | java | private void readWorkWeeks(Project.Calendars.Calendar xmlCalendar, ProjectCalendar mpxjCalendar)
{
WorkWeeks ww = xmlCalendar.getWorkWeeks();
if (ww != null)
{
for (WorkWeek xmlWeek : ww.getWorkWeek())
{
ProjectCalendarWeek week = mpxjCalendar.addWorkWeek();
... | [
"private",
"void",
"readWorkWeeks",
"(",
"Project",
".",
"Calendars",
".",
"Calendar",
"xmlCalendar",
",",
"ProjectCalendar",
"mpxjCalendar",
")",
"{",
"WorkWeeks",
"ww",
"=",
"xmlCalendar",
".",
"getWorkWeeks",
"(",
")",
";",
"if",
"(",
"ww",
"!=",
"null",
... | Read the work weeks associated with this calendar.
@param xmlCalendar XML calendar object
@param mpxjCalendar MPXJ calendar object | [
"Read",
"the",
"work",
"weeks",
"associated",
"with",
"this",
"calendar",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L775-L821 |
157,336 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readProjectExtendedAttributes | private void readProjectExtendedAttributes(Project project)
{
Project.ExtendedAttributes attributes = project.getExtendedAttributes();
if (attributes != null)
{
for (Project.ExtendedAttributes.ExtendedAttribute ea : attributes.getExtendedAttribute())
{
readFieldAlias(e... | java | private void readProjectExtendedAttributes(Project project)
{
Project.ExtendedAttributes attributes = project.getExtendedAttributes();
if (attributes != null)
{
for (Project.ExtendedAttributes.ExtendedAttribute ea : attributes.getExtendedAttribute())
{
readFieldAlias(e... | [
"private",
"void",
"readProjectExtendedAttributes",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"ExtendedAttributes",
"attributes",
"=",
"project",
".",
"getExtendedAttributes",
"(",
")",
";",
"if",
"(",
"attributes",
"!=",
"null",
")",
"{",
"for",
"(",... | This method extracts project extended attribute data from an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"extracts",
"project",
"extended",
"attribute",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L828-L838 |
157,337 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readFieldAlias | private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute)
{
String alias = attribute.getAlias();
if (alias != null && alias.length() != 0)
{
FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID()));
m_projectFile.getCustomFi... | java | private void readFieldAlias(Project.ExtendedAttributes.ExtendedAttribute attribute)
{
String alias = attribute.getAlias();
if (alias != null && alias.length() != 0)
{
FieldType field = FieldTypeHelper.getInstance(Integer.parseInt(attribute.getFieldID()));
m_projectFile.getCustomFi... | [
"private",
"void",
"readFieldAlias",
"(",
"Project",
".",
"ExtendedAttributes",
".",
"ExtendedAttribute",
"attribute",
")",
"{",
"String",
"alias",
"=",
"attribute",
".",
"getAlias",
"(",
")",
";",
"if",
"(",
"alias",
"!=",
"null",
"&&",
"alias",
".",
"lengt... | Read a single field alias from an extended attribute.
@param attribute extended attribute | [
"Read",
"a",
"single",
"field",
"alias",
"from",
"an",
"extended",
"attribute",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L845-L853 |
157,338 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readResources | private void readResources(Project project, HashMap<BigInteger, ProjectCalendar> calendarMap)
{
Project.Resources resources = project.getResources();
if (resources != null)
{
for (Project.Resources.Resource resource : resources.getResource())
{
readResource(resource, c... | java | private void readResources(Project project, HashMap<BigInteger, ProjectCalendar> calendarMap)
{
Project.Resources resources = project.getResources();
if (resources != null)
{
for (Project.Resources.Resource resource : resources.getResource())
{
readResource(resource, c... | [
"private",
"void",
"readResources",
"(",
"Project",
"project",
",",
"HashMap",
"<",
"BigInteger",
",",
"ProjectCalendar",
">",
"calendarMap",
")",
"{",
"Project",
".",
"Resources",
"resources",
"=",
"project",
".",
"getResources",
"(",
")",
";",
"if",
"(",
"... | This method extracts resource data from an MSPDI file.
@param project Root node of the MSPDI file
@param calendarMap Map of calendar UIDs to names | [
"This",
"method",
"extracts",
"resource",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L861-L871 |
157,339 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readResourceBaselines | private void readResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource)
{
for (Project.Resources.Resource.Baseline baseline : xmlResource.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
Double cost = DatatypeConverter.parseCurrency(bas... | java | private void readResourceBaselines(Project.Resources.Resource xmlResource, Resource mpxjResource)
{
for (Project.Resources.Resource.Baseline baseline : xmlResource.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
Double cost = DatatypeConverter.parseCurrency(bas... | [
"private",
"void",
"readResourceBaselines",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xmlResource",
",",
"Resource",
"mpxjResource",
")",
"{",
"for",
"(",
"Project",
".",
"Resources",
".",
"Resource",
".",
"Baseline",
"baseline",
":",
"xmlResource",
".... | Reads baseline values for the current resource.
@param xmlResource MSPDI resource instance
@param mpxjResource MPXJ resource instance | [
"Reads",
"baseline",
"values",
"for",
"the",
"current",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L978-L998 |
157,340 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readResourceExtendedAttributes | private void readResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx)
{
for (Project.Resources.Resource.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
ResourceField mpxFieldID = MPPResourc... | java | private void readResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx)
{
for (Project.Resources.Resource.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
ResourceField mpxFieldID = MPPResourc... | [
"private",
"void",
"readResourceExtendedAttributes",
"(",
"Project",
".",
"Resources",
".",
"Resource",
"xml",
",",
"Resource",
"mpx",
")",
"{",
"for",
"(",
"Project",
".",
"Resources",
".",
"Resource",
".",
"ExtendedAttribute",
"attrib",
":",
"xml",
".",
"get... | This method processes any extended attributes associated with a resource.
@param xml MSPDI resource instance
@param mpx MPX resource instance | [
"This",
"method",
"processes",
"any",
"extended",
"attributes",
"associated",
"with",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1006-L1015 |
157,341 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readCostRateTables | private void readCostRateTables(Resource resource, Rates rates)
{
if (rates == null)
{
CostRateTable table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(0, table);
table = new CostRateTable();
table.add(CostRate... | java | private void readCostRateTables(Resource resource, Rates rates)
{
if (rates == null)
{
CostRateTable table = new CostRateTable();
table.add(CostRateTableEntry.DEFAULT_ENTRY);
resource.setCostRateTable(0, table);
table = new CostRateTable();
table.add(CostRate... | [
"private",
"void",
"readCostRateTables",
"(",
"Resource",
"resource",
",",
"Rates",
"rates",
")",
"{",
"if",
"(",
"rates",
"==",
"null",
")",
"{",
"CostRateTable",
"table",
"=",
"new",
"CostRateTable",
"(",
")",
";",
"table",
".",
"add",
"(",
"CostRateTabl... | Reads the cost rate tables from the file.
@param resource parent resource
@param rates XML cot rate tables | [
"Reads",
"the",
"cost",
"rate",
"tables",
"from",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1023-L1078 |
157,342 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readAvailabilityTable | private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods)
{
if (periods != null)
{
AvailabilityTable table = resource.getAvailability();
List<AvailabilityPeriod> list = periods.getAvailabilityPeriod();
for (AvailabilityPeriod period : list)
{
... | java | private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods)
{
if (periods != null)
{
AvailabilityTable table = resource.getAvailability();
List<AvailabilityPeriod> list = periods.getAvailabilityPeriod();
for (AvailabilityPeriod period : list)
{
... | [
"private",
"void",
"readAvailabilityTable",
"(",
"Resource",
"resource",
",",
"AvailabilityPeriods",
"periods",
")",
"{",
"if",
"(",
"periods",
"!=",
"null",
")",
"{",
"AvailabilityTable",
"table",
"=",
"resource",
".",
"getAvailability",
"(",
")",
";",
"List",
... | Reads the availability table from the file.
@param resource MPXJ resource instance
@param periods MSPDI availability periods | [
"Reads",
"the",
"availability",
"table",
"from",
"the",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1086-L1102 |
157,343 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readTasks | private void readTasks(Project project)
{
Project.Tasks tasks = project.getTasks();
if (tasks != null)
{
int tasksWithoutIDCount = 0;
for (Project.Tasks.Task task : tasks.getTask())
{
Task mpxjTask = readTask(task);
if (mpxjTask.getID() == null)
... | java | private void readTasks(Project project)
{
Project.Tasks tasks = project.getTasks();
if (tasks != null)
{
int tasksWithoutIDCount = 0;
for (Project.Tasks.Task task : tasks.getTask())
{
Task mpxjTask = readTask(task);
if (mpxjTask.getID() == null)
... | [
"private",
"void",
"readTasks",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"Tasks",
"tasks",
"=",
"project",
".",
"getTasks",
"(",
")",
";",
"if",
"(",
"tasks",
"!=",
"null",
")",
"{",
"int",
"tasksWithoutIDCount",
"=",
"0",
";",
"for",
"(",
... | This method extracts task data from an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"extracts",
"task",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1109-L1142 |
157,344 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.updateProjectProperties | private void updateProjectProperties(Task task)
{
ProjectProperties props = m_projectFile.getProjectProperties();
props.setComments(task.getNotes());
} | java | private void updateProjectProperties(Task task)
{
ProjectProperties props = m_projectFile.getProjectProperties();
props.setComments(task.getNotes());
} | [
"private",
"void",
"updateProjectProperties",
"(",
"Task",
"task",
")",
"{",
"ProjectProperties",
"props",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"props",
".",
"setComments",
"(",
"task",
".",
"getNotes",
"(",
")",
")",
";",
"}"
] | Update the project properties from the project summary task.
@param task project summary task | [
"Update",
"the",
"project",
"properties",
"from",
"the",
"project",
"summary",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1363-L1367 |
157,345 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readTaskBaselines | private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat)
{
for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
Double cost = DatatypeConverter.parseCurrency(baseline.getCo... | java | private void readTaskBaselines(Project.Tasks.Task xmlTask, Task mpxjTask, TimeUnit durationFormat)
{
for (Project.Tasks.Task.Baseline baseline : xmlTask.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
Double cost = DatatypeConverter.parseCurrency(baseline.getCo... | [
"private",
"void",
"readTaskBaselines",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"xmlTask",
",",
"Task",
"mpxjTask",
",",
"TimeUnit",
"durationFormat",
")",
"{",
"for",
"(",
"Project",
".",
"Tasks",
".",
"Task",
".",
"Baseline",
"baseline",
":",
"xmlTask",... | Reads baseline values for the current task.
@param xmlTask MSPDI task instance
@param mpxjTask MPXJ task instance
@param durationFormat duration format to use | [
"Reads",
"baseline",
"values",
"for",
"the",
"current",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1407-L1436 |
157,346 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readTaskExtendedAttributes | private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx)
{
for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
TaskField mpxFieldID = MPPTaskField.getInstance(xmlFieldID);
... | java | private void readTaskExtendedAttributes(Project.Tasks.Task xml, Task mpx)
{
for (Project.Tasks.Task.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
TaskField mpxFieldID = MPPTaskField.getInstance(xmlFieldID);
... | [
"private",
"void",
"readTaskExtendedAttributes",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"xml",
",",
"Task",
"mpx",
")",
"{",
"for",
"(",
"Project",
".",
"Tasks",
".",
"Task",
".",
"ExtendedAttribute",
"attrib",
":",
"xml",
".",
"getExtendedAttribute",
"(... | This method processes any extended attributes associated with a task.
@param xml MSPDI task instance
@param mpx MPX task instance | [
"This",
"method",
"processes",
"any",
"extended",
"attributes",
"associated",
"with",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1444-L1453 |
157,347 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.getTaskCalendar | private ProjectCalendar getTaskCalendar(Project.Tasks.Task task)
{
ProjectCalendar calendar = null;
BigInteger calendarID = task.getCalendarUID();
if (calendarID != null)
{
calendar = m_projectFile.getCalendarByUniqueID(Integer.valueOf(calendarID.intValue()));
}
return ... | java | private ProjectCalendar getTaskCalendar(Project.Tasks.Task task)
{
ProjectCalendar calendar = null;
BigInteger calendarID = task.getCalendarUID();
if (calendarID != null)
{
calendar = m_projectFile.getCalendarByUniqueID(Integer.valueOf(calendarID.intValue()));
}
return ... | [
"private",
"ProjectCalendar",
"getTaskCalendar",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"task",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"null",
";",
"BigInteger",
"calendarID",
"=",
"task",
".",
"getCalendarUID",
"(",
")",
";",
"if",
"(",
"calendarID... | This method is used to retrieve the calendar associated
with a task. If no calendar is associated with a task, this method
returns null.
@param task MSPDI task
@return calendar instance | [
"This",
"method",
"is",
"used",
"to",
"retrieve",
"the",
"calendar",
"associated",
"with",
"a",
"task",
".",
"If",
"no",
"calendar",
"is",
"associated",
"with",
"a",
"task",
"this",
"method",
"returns",
"null",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1463-L1474 |
157,348 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readPredecessors | private void readPredecessors(Project.Tasks.Task task)
{
Integer uid = task.getUID();
if (uid != null)
{
Task currTask = m_projectFile.getTaskByUniqueID(uid);
if (currTask != null)
{
for (Project.Tasks.Task.PredecessorLink link : task.getPredecessorLink())
... | java | private void readPredecessors(Project.Tasks.Task task)
{
Integer uid = task.getUID();
if (uid != null)
{
Task currTask = m_projectFile.getTaskByUniqueID(uid);
if (currTask != null)
{
for (Project.Tasks.Task.PredecessorLink link : task.getPredecessorLink())
... | [
"private",
"void",
"readPredecessors",
"(",
"Project",
".",
"Tasks",
".",
"Task",
"task",
")",
"{",
"Integer",
"uid",
"=",
"task",
".",
"getUID",
"(",
")",
";",
"if",
"(",
"uid",
"!=",
"null",
")",
"{",
"Task",
"currTask",
"=",
"m_projectFile",
".",
... | This method extracts predecessor data from an MSPDI file.
@param task Task data | [
"This",
"method",
"extracts",
"predecessor",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1481-L1495 |
157,349 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readPredecessor | private void readPredecessor(Task currTask, Project.Tasks.Task.PredecessorLink link)
{
BigInteger uid = link.getPredecessorUID();
if (uid != null)
{
Task prevTask = m_projectFile.getTaskByUniqueID(Integer.valueOf(uid.intValue()));
if (prevTask != null)
{
Relat... | java | private void readPredecessor(Task currTask, Project.Tasks.Task.PredecessorLink link)
{
BigInteger uid = link.getPredecessorUID();
if (uid != null)
{
Task prevTask = m_projectFile.getTaskByUniqueID(Integer.valueOf(uid.intValue()));
if (prevTask != null)
{
Relat... | [
"private",
"void",
"readPredecessor",
"(",
"Task",
"currTask",
",",
"Project",
".",
"Tasks",
".",
"Task",
".",
"PredecessorLink",
"link",
")",
"{",
"BigInteger",
"uid",
"=",
"link",
".",
"getPredecessorUID",
"(",
")",
";",
"if",
"(",
"uid",
"!=",
"null",
... | This method extracts data for a single predecessor from an MSPDI file.
@param currTask Current task object
@param link Predecessor data | [
"This",
"method",
"extracts",
"data",
"for",
"a",
"single",
"predecessor",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1503-L1545 |
157,350 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readAssignments | private void readAssignments(Project project)
{
Project.Assignments assignments = project.getAssignments();
if (assignments != null)
{
SplitTaskFactory splitFactory = new SplitTaskFactory();
TimephasedWorkNormaliser normaliser = new MSPDITimephasedWorkNormaliser();
for (P... | java | private void readAssignments(Project project)
{
Project.Assignments assignments = project.getAssignments();
if (assignments != null)
{
SplitTaskFactory splitFactory = new SplitTaskFactory();
TimephasedWorkNormaliser normaliser = new MSPDITimephasedWorkNormaliser();
for (P... | [
"private",
"void",
"readAssignments",
"(",
"Project",
"project",
")",
"{",
"Project",
".",
"Assignments",
"assignments",
"=",
"project",
".",
"getAssignments",
"(",
")",
";",
"if",
"(",
"assignments",
"!=",
"null",
")",
"{",
"SplitTaskFactory",
"splitFactory",
... | This method extracts assignment data from an MSPDI file.
@param project Root node of the MSPDI file | [
"This",
"method",
"extracts",
"assignment",
"data",
"from",
"an",
"MSPDI",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1552-L1564 |
157,351 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readAssignmentBaselines | private void readAssignmentBaselines(Project.Assignments.Assignment assignment, ResourceAssignment mpx)
{
for (Project.Assignments.Assignment.Baseline baseline : assignment.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
//baseline.getBCWP()
//baseline... | java | private void readAssignmentBaselines(Project.Assignments.Assignment assignment, ResourceAssignment mpx)
{
for (Project.Assignments.Assignment.Baseline baseline : assignment.getBaseline())
{
int number = NumberHelper.getInt(baseline.getNumber());
//baseline.getBCWP()
//baseline... | [
"private",
"void",
"readAssignmentBaselines",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
"assignment",
",",
"ResourceAssignment",
"mpx",
")",
"{",
"for",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
".",
"Baseline",
"baseline",
":",
"assignme... | Extracts assignment baseline data.
@param assignment xml assignment
@param mpx mpxj assignment | [
"Extracts",
"assignment",
"baseline",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1683-L1712 |
157,352 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readAssignmentExtendedAttributes | private void readAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx)
{
for (Project.Assignments.Assignment.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
AssignmentField m... | java | private void readAssignmentExtendedAttributes(Project.Assignments.Assignment xml, ResourceAssignment mpx)
{
for (Project.Assignments.Assignment.ExtendedAttribute attrib : xml.getExtendedAttribute())
{
int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF;
AssignmentField m... | [
"private",
"void",
"readAssignmentExtendedAttributes",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
"xml",
",",
"ResourceAssignment",
"mpx",
")",
"{",
"for",
"(",
"Project",
".",
"Assignments",
".",
"Assignment",
".",
"ExtendedAttribute",
"attrib",
":",
... | This method processes any extended attributes associated with a
resource assignment.
@param xml MSPDI resource assignment instance
@param mpx MPX task instance | [
"This",
"method",
"processes",
"any",
"extended",
"attributes",
"associated",
"with",
"a",
"resource",
"assignment",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1721-L1730 |
157,353 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.isSplit | private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list)
{
boolean result = false;
for (TimephasedWork assignment : list)
{
if (calendar != null && assignment.getTotalAmount().getDuration() == 0)
{
Duration calendarWork = calendar.getWork(assignment... | java | private boolean isSplit(ProjectCalendar calendar, List<TimephasedWork> list)
{
boolean result = false;
for (TimephasedWork assignment : list)
{
if (calendar != null && assignment.getTotalAmount().getDuration() == 0)
{
Duration calendarWork = calendar.getWork(assignment... | [
"private",
"boolean",
"isSplit",
"(",
"ProjectCalendar",
"calendar",
",",
"List",
"<",
"TimephasedWork",
">",
"list",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"TimephasedWork",
"assignment",
":",
"list",
")",
"{",
"if",
"(",
"calendar",
... | Test to determine if this is a split task.
@param calendar current calendar
@param list timephased resource assignment list
@return boolean flag | [
"Test",
"to",
"determine",
"if",
"this",
"is",
"a",
"split",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1739-L1755 |
157,354 | joniles/mpxj | src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java | MSPDIReader.readTimephasedAssignment | private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type)
{
LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
for (TimephasedDataType item : assignment.getTimephasedData())
{
if (NumberHel... | java | private LinkedList<TimephasedWork> readTimephasedAssignment(ProjectCalendar calendar, Project.Assignments.Assignment assignment, int type)
{
LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
for (TimephasedDataType item : assignment.getTimephasedData())
{
if (NumberHel... | [
"private",
"LinkedList",
"<",
"TimephasedWork",
">",
"readTimephasedAssignment",
"(",
"ProjectCalendar",
"calendar",
",",
"Project",
".",
"Assignments",
".",
"Assignment",
"assignment",
",",
"int",
"type",
")",
"{",
"LinkedList",
"<",
"TimephasedWork",
">",
"result"... | Reads timephased assignment data.
@param calendar current calendar
@param assignment assignment data
@param type flag indicating if this is planned or complete work
@return list of timephased resource assignment instances | [
"Reads",
"timephased",
"assignment",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1765-L1805 |
157,355 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.deriveResourceCalendar | private ProjectCalendar deriveResourceCalendar(Integer parentCalendarID)
{
ProjectCalendar calendar = m_project.addDefaultDerivedCalendar();
calendar.setUniqueID(Integer.valueOf(m_project.getProjectConfig().getNextCalendarUniqueID()));
calendar.setParent(m_project.getCalendarByUniqueID(parentCalend... | java | private ProjectCalendar deriveResourceCalendar(Integer parentCalendarID)
{
ProjectCalendar calendar = m_project.addDefaultDerivedCalendar();
calendar.setUniqueID(Integer.valueOf(m_project.getProjectConfig().getNextCalendarUniqueID()));
calendar.setParent(m_project.getCalendarByUniqueID(parentCalend... | [
"private",
"ProjectCalendar",
"deriveResourceCalendar",
"(",
"Integer",
"parentCalendarID",
")",
"{",
"ProjectCalendar",
"calendar",
"=",
"m_project",
".",
"addDefaultDerivedCalendar",
"(",
")",
";",
"calendar",
".",
"setUniqueID",
"(",
"Integer",
".",
"valueOf",
"(",... | Derive a calendar for a resource.
@param parentCalendarID calendar from which resource calendar is derived
@return new calendar for a resource | [
"Derive",
"a",
"calendar",
"for",
"a",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L182-L188 |
157,356 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.processTasks | public void processTasks(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones)
{
List<Row> parentBars = buildRowHierarchy(bars, expandedTasks, tasks, milestones);
createTasks(m_project, "", parentBars);
deriveProjectCalendar();
updateStructure();
} | java | public void processTasks(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones)
{
List<Row> parentBars = buildRowHierarchy(bars, expandedTasks, tasks, milestones);
createTasks(m_project, "", parentBars);
deriveProjectCalendar();
updateStructure();
} | [
"public",
"void",
"processTasks",
"(",
"List",
"<",
"Row",
">",
"bars",
",",
"List",
"<",
"Row",
">",
"expandedTasks",
",",
"List",
"<",
"Row",
">",
"tasks",
",",
"List",
"<",
"Row",
">",
"milestones",
")",
"{",
"List",
"<",
"Row",
">",
"parentBars",... | Organises the data from Asta into a hierarchy and converts this into tasks.
@param bars bar data
@param expandedTasks expanded task data
@param tasks task data
@param milestones milestone data | [
"Organises",
"the",
"data",
"from",
"Asta",
"into",
"a",
"hierarchy",
"and",
"converts",
"this",
"into",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L198-L204 |
157,357 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.buildRowHierarchy | private List<Row> buildRowHierarchy(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones)
{
//
// Create a list of leaf nodes by merging the task and milestone lists
//
List<Row> leaves = new ArrayList<Row>();
leaves.addAll(tasks);
leaves.addAll(milestone... | java | private List<Row> buildRowHierarchy(List<Row> bars, List<Row> expandedTasks, List<Row> tasks, List<Row> milestones)
{
//
// Create a list of leaf nodes by merging the task and milestone lists
//
List<Row> leaves = new ArrayList<Row>();
leaves.addAll(tasks);
leaves.addAll(milestone... | [
"private",
"List",
"<",
"Row",
">",
"buildRowHierarchy",
"(",
"List",
"<",
"Row",
">",
"bars",
",",
"List",
"<",
"Row",
">",
"expandedTasks",
",",
"List",
"<",
"Row",
">",
"tasks",
",",
"List",
"<",
"Row",
">",
"milestones",
")",
"{",
"//",
"// Creat... | Builds the task hierarchy.
Note that there are two distinct levels of organisation going on here. The first is the
Asta "summary" organisation, where the user organises bars into summary groups. We are using this
to create our hierarchy of tasks.
The second level displayed within a summary group (or at the project le... | [
"Builds",
"the",
"task",
"hierarchy",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L222-L313 |
157,358 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.createTasks | private void createTasks(ChildTaskContainer parent, String parentName, List<Row> rows)
{
for (Row row : rows)
{
boolean rowIsBar = (row.getInteger("BARID") != null);
//
// Don't export hammock tasks.
//
if (rowIsBar && row.getChildRows().isEmpty())
{... | java | private void createTasks(ChildTaskContainer parent, String parentName, List<Row> rows)
{
for (Row row : rows)
{
boolean rowIsBar = (row.getInteger("BARID") != null);
//
// Don't export hammock tasks.
//
if (rowIsBar && row.getChildRows().isEmpty())
{... | [
"private",
"void",
"createTasks",
"(",
"ChildTaskContainer",
"parent",
",",
"String",
"parentName",
",",
"List",
"<",
"Row",
">",
"rows",
")",
"{",
"for",
"(",
"Row",
"row",
":",
"rows",
")",
"{",
"boolean",
"rowIsBar",
"=",
"(",
"row",
".",
"getInteger"... | Recursively descend through the hierarchy creating tasks.
@param parent parent task
@param parentName parent name
@param rows rows to add as tasks to this parent | [
"Recursively",
"descend",
"through",
"the",
"hierarchy",
"creating",
"tasks",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L322-L363 |
157,359 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.skipBar | private boolean skipBar(Row row)
{
List<Row> childRows = row.getChildRows();
return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty();
} | java | private boolean skipBar(Row row)
{
List<Row> childRows = row.getChildRows();
return childRows.size() == 1 && childRows.get(0).getChildRows().isEmpty();
} | [
"private",
"boolean",
"skipBar",
"(",
"Row",
"row",
")",
"{",
"List",
"<",
"Row",
">",
"childRows",
"=",
"row",
".",
"getChildRows",
"(",
")",
";",
"return",
"childRows",
".",
"size",
"(",
")",
"==",
"1",
"&&",
"childRows",
".",
"get",
"(",
"0",
")... | Returns true if we should skip this bar, i.e. the bar only has a single child task.
@param row bar row to test
@return true if this bar should be skipped | [
"Returns",
"true",
"if",
"we",
"should",
"skip",
"this",
"bar",
"i",
".",
"e",
".",
"the",
"bar",
"only",
"has",
"a",
"single",
"child",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L371-L375 |
157,360 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.populateLeaf | private void populateLeaf(String parentName, Row row, Task task)
{
if (row.getInteger("TASKID") != null)
{
populateTask(row, task);
}
else
{
populateMilestone(row, task);
}
String name = task.getName();
if (name == null || name.isEmpty())
{
... | java | private void populateLeaf(String parentName, Row row, Task task)
{
if (row.getInteger("TASKID") != null)
{
populateTask(row, task);
}
else
{
populateMilestone(row, task);
}
String name = task.getName();
if (name == null || name.isEmpty())
{
... | [
"private",
"void",
"populateLeaf",
"(",
"String",
"parentName",
",",
"Row",
"row",
",",
"Task",
"task",
")",
"{",
"if",
"(",
"row",
".",
"getInteger",
"(",
"\"TASKID\"",
")",
"!=",
"null",
")",
"{",
"populateTask",
"(",
"row",
",",
"task",
")",
";",
... | Adds a leaf node, which could be a task or a milestone.
@param parentName parent bar name
@param row row to add
@param task task to populate with data from the row | [
"Adds",
"a",
"leaf",
"node",
"which",
"could",
"be",
"a",
"task",
"or",
"a",
"milestone",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L384-L400 |
157,361 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.populateTask | private void populateTask(Row row, Task task)
{
//"PROJID"
task.setUniqueID(row.getInteger("TASKID"));
//GIVEN_DURATIONTYPF
//GIVEN_DURATIONELA_MONTHS
task.setDuration(row.getDuration("GIVEN_DURATIONHOURS"));
task.setResume(row.getDate("RESUME"));
//task.setStart(row.getDate... | java | private void populateTask(Row row, Task task)
{
//"PROJID"
task.setUniqueID(row.getInteger("TASKID"));
//GIVEN_DURATIONTYPF
//GIVEN_DURATIONELA_MONTHS
task.setDuration(row.getDuration("GIVEN_DURATIONHOURS"));
task.setResume(row.getDate("RESUME"));
//task.setStart(row.getDate... | [
"private",
"void",
"populateTask",
"(",
"Row",
"row",
",",
"Task",
"task",
")",
"{",
"//\"PROJID\"",
"task",
".",
"setUniqueID",
"(",
"row",
".",
"getInteger",
"(",
"\"TASKID\"",
")",
")",
";",
"//GIVEN_DURATIONTYPF",
"//GIVEN_DURATIONELA_MONTHS",
"task",
".",
... | Populate a task from a Row instance.
@param row Row instance
@param task Task instance | [
"Populate",
"a",
"task",
"from",
"a",
"Row",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L408-L481 |
157,362 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.populateBar | private void populateBar(Row row, Task task)
{
Integer calendarID = row.getInteger("CALENDAU");
ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID);
//PROJID
task.setUniqueID(row.getInteger("BARID"));
task.setStart(row.getDate("STARV"));
task.setFinish(row.getD... | java | private void populateBar(Row row, Task task)
{
Integer calendarID = row.getInteger("CALENDAU");
ProjectCalendar calendar = m_project.getCalendarByUniqueID(calendarID);
//PROJID
task.setUniqueID(row.getInteger("BARID"));
task.setStart(row.getDate("STARV"));
task.setFinish(row.getD... | [
"private",
"void",
"populateBar",
"(",
"Row",
"row",
",",
"Task",
"task",
")",
"{",
"Integer",
"calendarID",
"=",
"row",
".",
"getInteger",
"(",
"\"CALENDAU\"",
")",
";",
"ProjectCalendar",
"calendar",
"=",
"m_project",
".",
"getCalendarByUniqueID",
"(",
"cale... | Uses data from a bar to populate a task.
@param row bar data
@param task task to populate | [
"Uses",
"data",
"from",
"a",
"bar",
"to",
"populate",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L489-L520 |
157,363 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.populateMilestone | private void populateMilestone(Row row, Task task)
{
task.setMilestone(true);
//PROJID
task.setUniqueID(row.getInteger("MILESTONEID"));
task.setStart(row.getDate("GIVEN_DATE_TIME"));
task.setFinish(row.getDate("GIVEN_DATE_TIME"));
//PROGREST_PERIOD
//SYMBOL_APPEARANCE
... | java | private void populateMilestone(Row row, Task task)
{
task.setMilestone(true);
//PROJID
task.setUniqueID(row.getInteger("MILESTONEID"));
task.setStart(row.getDate("GIVEN_DATE_TIME"));
task.setFinish(row.getDate("GIVEN_DATE_TIME"));
//PROGREST_PERIOD
//SYMBOL_APPEARANCE
... | [
"private",
"void",
"populateMilestone",
"(",
"Row",
"row",
",",
"Task",
"task",
")",
"{",
"task",
".",
"setMilestone",
"(",
"true",
")",
";",
"//PROJID",
"task",
".",
"setUniqueID",
"(",
"row",
".",
"getInteger",
"(",
"\"MILESTONEID\"",
")",
")",
";",
"t... | Populate a milestone from a Row instance.
@param row Row instance
@param task Task instance | [
"Populate",
"a",
"milestone",
"from",
"a",
"Row",
"instance",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L528-L586 |
157,364 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.getInitials | private String getInitials(String name)
{
String result = null;
if (name != null && name.length() != 0)
{
StringBuilder sb = new StringBuilder();
sb.append(name.charAt(0));
int index = 1;
while (true)
{
index = name.indexOf(' ', index);
... | java | private String getInitials(String name)
{
String result = null;
if (name != null && name.length() != 0)
{
StringBuilder sb = new StringBuilder();
sb.append(name.charAt(0));
int index = 1;
while (true)
{
index = name.indexOf(' ', index);
... | [
"private",
"String",
"getInitials",
"(",
"String",
"name",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"name",
"!=",
"null",
"&&",
"name",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
... | Convert a name into initials.
@param name source name
@return initials | [
"Convert",
"a",
"name",
"into",
"initials",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L886-L916 |
157,365 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.deriveProjectCalendar | private void deriveProjectCalendar()
{
//
// Count the number of times each calendar is used
//
Map<ProjectCalendar, Integer> map = new HashMap<ProjectCalendar, Integer>();
for (Task task : m_project.getTasks())
{
ProjectCalendar calendar = task.getCalendar();
In... | java | private void deriveProjectCalendar()
{
//
// Count the number of times each calendar is used
//
Map<ProjectCalendar, Integer> map = new HashMap<ProjectCalendar, Integer>();
for (Task task : m_project.getTasks())
{
ProjectCalendar calendar = task.getCalendar();
In... | [
"private",
"void",
"deriveProjectCalendar",
"(",
")",
"{",
"//",
"// Count the number of times each calendar is used",
"//",
"Map",
"<",
"ProjectCalendar",
",",
"Integer",
">",
"map",
"=",
"new",
"HashMap",
"<",
"ProjectCalendar",
",",
"Integer",
">",
"(",
")",
";... | Asta Powerproject assigns an explicit calendar for each task. This method
is used to find the most common calendar and use this as the default project
calendar. This allows the explicitly assigned task calendars to be removed. | [
"Asta",
"Powerproject",
"assigns",
"an",
"explicit",
"calendar",
"for",
"each",
"task",
".",
"This",
"method",
"is",
"used",
"to",
"find",
"the",
"most",
"common",
"calendar",
"and",
"use",
"this",
"as",
"the",
"default",
"project",
"calendar",
".",
"This",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L923-L974 |
157,366 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.processConstraints | private void processConstraints(Row row, Task task)
{
ConstraintType constraintType = ConstraintType.AS_SOON_AS_POSSIBLE;
Date constraintDate = null;
switch (row.getInt("CONSTRAINU"))
{
case 0:
{
if (row.getInt("PLACEMENT") == 0)
{
con... | java | private void processConstraints(Row row, Task task)
{
ConstraintType constraintType = ConstraintType.AS_SOON_AS_POSSIBLE;
Date constraintDate = null;
switch (row.getInt("CONSTRAINU"))
{
case 0:
{
if (row.getInt("PLACEMENT") == 0)
{
con... | [
"private",
"void",
"processConstraints",
"(",
"Row",
"row",
",",
"Task",
"task",
")",
"{",
"ConstraintType",
"constraintType",
"=",
"ConstraintType",
".",
"AS_SOON_AS_POSSIBLE",
";",
"Date",
"constraintDate",
"=",
"null",
";",
"switch",
"(",
"row",
".",
"getInt"... | Determines the constraints relating to a task.
@param row row data
@param task Task instance | [
"Determines",
"the",
"constraints",
"relating",
"to",
"a",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L982-L1053 |
157,367 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.createWorkPatternMap | public Map<Integer, Row> createWorkPatternMap(List<Row> rows)
{
Map<Integer, Row> map = new HashMap<Integer, Row>();
for (Row row : rows)
{
map.put(row.getInteger("WORK_PATTERNID"), row);
}
return map;
} | java | public Map<Integer, Row> createWorkPatternMap(List<Row> rows)
{
Map<Integer, Row> map = new HashMap<Integer, Row>();
for (Row row : rows)
{
map.put(row.getInteger("WORK_PATTERNID"), row);
}
return map;
} | [
"public",
"Map",
"<",
"Integer",
",",
"Row",
">",
"createWorkPatternMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"{",
"Map",
"<",
"Integer",
",",
"Row",
">",
"map",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
"Row",
">",
"(",
")",
";",
"for",
... | Creates a map of work pattern rows indexed by the primary key.
@param rows work pattern rows
@return work pattern map | [
"Creates",
"a",
"map",
"of",
"work",
"pattern",
"rows",
"indexed",
"by",
"the",
"primary",
"key",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1101-L1109 |
157,368 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.createWorkPatternAssignmentMap | public Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("WORK_PATTERN_ASSIGNMENTID");
List<Row> list = map.get(calendarID);
... | java | public Map<Integer, List<Row>> createWorkPatternAssignmentMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer calendarID = row.getInteger("WORK_PATTERN_ASSIGNMENTID");
List<Row> list = map.get(calendarID);
... | [
"public",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"createWorkPatternAssignmentMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"map",
"=",
"new",
"HashMap",
"<",
"Intege... | Creates a map between a calendar ID and a list of
work pattern assignment rows.
@param rows work pattern assignment rows
@return work pattern assignment map | [
"Creates",
"a",
"map",
"between",
"a",
"calendar",
"ID",
"and",
"a",
"list",
"of",
"work",
"pattern",
"assignment",
"rows",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1118-L1133 |
157,369 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.createTimeEntryMap | public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("TIME_ENTRYID");
List<Row> list = map.get(workPatternID);
if (list == null)
... | java | public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("TIME_ENTRYID");
List<Row> list = map.get(workPatternID);
if (list == null)
... | [
"public",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"createTimeEntryMap",
"(",
"List",
"<",
"Row",
">",
"rows",
")",
"{",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"map",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
... | Creates a map between a work pattern ID and a list of time entry rows.
@param rows time entry rows
@return time entry map | [
"Creates",
"a",
"map",
"between",
"a",
"work",
"pattern",
"ID",
"and",
"a",
"list",
"of",
"time",
"entry",
"rows",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1164-L1179 |
157,370 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.processCalendar | public void processCalendar(Row calendarRow, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> workPatternAssignmentMap, Map<Integer, List<Row>> exceptionAssignmentMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap)
{
//
// Create the calendar and add the default wo... | java | public void processCalendar(Row calendarRow, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> workPatternAssignmentMap, Map<Integer, List<Row>> exceptionAssignmentMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap)
{
//
// Create the calendar and add the default wo... | [
"public",
"void",
"processCalendar",
"(",
"Row",
"calendarRow",
",",
"Map",
"<",
"Integer",
",",
"Row",
">",
"workPatternMap",
",",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"workPatternAssignmentMap",
",",
"Map",
"<",
"Integer",
",",
"List... | Creates a ProjectCalendar instance from the Asta data.
@param calendarRow basic calendar data
@param workPatternMap work pattern map
@param workPatternAssignmentMap work pattern assignment map
@param exceptionAssignmentMap exception assignment map
@param timeEntryMap time entry map
@param exceptionTypeMap exception ty... | [
"Creates",
"a",
"ProjectCalendar",
"instance",
"from",
"the",
"Asta",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1191-L1235 |
157,371 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.processWorkPattern | private void processWorkPattern(ProjectCalendarWeek week, Integer workPatternID, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap)
{
Row workPatternRow = workPatternMap.get(workPatternID);
if (workPatternRow != null)
{
week.setN... | java | private void processWorkPattern(ProjectCalendarWeek week, Integer workPatternID, Map<Integer, Row> workPatternMap, Map<Integer, List<Row>> timeEntryMap, Map<Integer, DayType> exceptionTypeMap)
{
Row workPatternRow = workPatternMap.get(workPatternID);
if (workPatternRow != null)
{
week.setN... | [
"private",
"void",
"processWorkPattern",
"(",
"ProjectCalendarWeek",
"week",
",",
"Integer",
"workPatternID",
",",
"Map",
"<",
"Integer",
",",
"Row",
">",
"workPatternMap",
",",
"Map",
"<",
"Integer",
",",
"List",
"<",
"Row",
">",
">",
"timeEntryMap",
",",
"... | Populates a ProjectCalendarWeek instance from Asta work pattern data.
@param week target ProjectCalendarWeek instance
@param workPatternID target work pattern ID
@param workPatternMap work pattern data
@param timeEntryMap time entry map
@param exceptionTypeMap exception type map | [
"Populates",
"a",
"ProjectCalendarWeek",
"instance",
"from",
"Asta",
"work",
"pattern",
"data",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1246-L1297 |
157,372 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaReader.java | AstaReader.getNotes | private String getNotes(Row row)
{
String notes = row.getString("NOTET");
if (notes != null)
{
if (notes.isEmpty())
{
notes = null;
}
else
{
if (notes.indexOf(LINE_BREAK) != -1)
{
notes = notes.replace(L... | java | private String getNotes(Row row)
{
String notes = row.getString("NOTET");
if (notes != null)
{
if (notes.isEmpty())
{
notes = null;
}
else
{
if (notes.indexOf(LINE_BREAK) != -1)
{
notes = notes.replace(L... | [
"private",
"String",
"getNotes",
"(",
"Row",
"row",
")",
"{",
"String",
"notes",
"=",
"row",
".",
"getString",
"(",
"\"NOTET\"",
")",
";",
"if",
"(",
"notes",
"!=",
"null",
")",
"{",
"if",
"(",
"notes",
".",
"isEmpty",
"(",
")",
")",
"{",
"notes",
... | Extract note text.
@param row task data
@return note text | [
"Extract",
"note",
"text",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaReader.java#L1305-L1323 |
157,373 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaFileReader.java | AstaFileReader.addListeners | private void addListeners(ProjectReader reader)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
reader.addProjectListener(listener);
}
}
} | java | private void addListeners(ProjectReader reader)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
reader.addProjectListener(listener);
}
}
} | [
"private",
"void",
"addListeners",
"(",
"ProjectReader",
"reader",
")",
"{",
"if",
"(",
"m_projectListeners",
"!=",
"null",
")",
"{",
"for",
"(",
"ProjectListener",
"listener",
":",
"m_projectListeners",
")",
"{",
"reader",
".",
"addProjectListener",
"(",
"liste... | Adds any listeners attached to this reader to the reader created internally.
@param reader internal project reader | [
"Adds",
"any",
"listeners",
"attached",
"to",
"this",
"reader",
"to",
"the",
"reader",
"created",
"internally",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L93-L102 |
157,374 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaFileReader.java | AstaFileReader.readTextFile | private ProjectFile readTextFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaTextFileReader();
addListeners(reader);
return reader.read(inputStream);
} | java | private ProjectFile readTextFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaTextFileReader();
addListeners(reader);
return reader.read(inputStream);
} | [
"private",
"ProjectFile",
"readTextFile",
"(",
"InputStream",
"inputStream",
")",
"throws",
"MPXJException",
"{",
"ProjectReader",
"reader",
"=",
"new",
"AstaTextFileReader",
"(",
")",
";",
"addListeners",
"(",
"reader",
")",
";",
"return",
"reader",
".",
"read",
... | Process a text-based PP file.
@param inputStream file input stream
@return ProjectFile instance | [
"Process",
"a",
"text",
"-",
"based",
"PP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L110-L115 |
157,375 | joniles/mpxj | src/main/java/net/sf/mpxj/asta/AstaFileReader.java | AstaFileReader.readDatabaseFile | private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaDatabaseFileReader();
addListeners(reader);
return reader.read(inputStream);
} | java | private ProjectFile readDatabaseFile(InputStream inputStream) throws MPXJException
{
ProjectReader reader = new AstaDatabaseFileReader();
addListeners(reader);
return reader.read(inputStream);
} | [
"private",
"ProjectFile",
"readDatabaseFile",
"(",
"InputStream",
"inputStream",
")",
"throws",
"MPXJException",
"{",
"ProjectReader",
"reader",
"=",
"new",
"AstaDatabaseFileReader",
"(",
")",
";",
"addListeners",
"(",
"reader",
")",
";",
"return",
"reader",
".",
... | Process a SQLite database PP file.
@param inputStream file input stream
@return ProjectFile instance | [
"Process",
"a",
"SQLite",
"database",
"PP",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AstaFileReader.java#L123-L128 |
157,376 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPReader.java | MPPReader.getFileFormat | public static String getFileFormat(POIFSFileSystem fs) throws IOException
{
String fileFormat = "";
DirectoryEntry root = fs.getRoot();
if (root.getEntryNames().contains("\1CompObj"))
{
CompObj compObj = new CompObj(new DocumentInputStream((DocumentEntry) root.getEntry("\1CompObj")))... | java | public static String getFileFormat(POIFSFileSystem fs) throws IOException
{
String fileFormat = "";
DirectoryEntry root = fs.getRoot();
if (root.getEntryNames().contains("\1CompObj"))
{
CompObj compObj = new CompObj(new DocumentInputStream((DocumentEntry) root.getEntry("\1CompObj")))... | [
"public",
"static",
"String",
"getFileFormat",
"(",
"POIFSFileSystem",
"fs",
")",
"throws",
"IOException",
"{",
"String",
"fileFormat",
"=",
"\"\"",
";",
"DirectoryEntry",
"root",
"=",
"fs",
".",
"getRoot",
"(",
")",
";",
"if",
"(",
"root",
".",
"getEntryNam... | This method allows us to peek into the OLE compound document to extract the file format.
This allows the UniversalProjectReader to determine if this is an MPP file, or if
it is another type of OLE compound document.
@param fs POIFSFileSystem instance
@return file format name
@throws IOException | [
"This",
"method",
"allows",
"us",
"to",
"peek",
"into",
"the",
"OLE",
"compound",
"document",
"to",
"extract",
"the",
"file",
"format",
".",
"This",
"allows",
"the",
"UniversalProjectReader",
"to",
"determine",
"if",
"this",
"is",
"an",
"MPP",
"file",
"or",
... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L100-L110 |
157,377 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPReader.java | MPPReader.read | public ProjectFile read(POIFSFileSystem fs) throws MPXJException
{
try
{
ProjectFile projectFile = new ProjectFile();
ProjectConfig config = projectFile.getProjectConfig();
config.setAutoTaskID(false);
config.setAutoTaskUniqueID(false);
config.setAutoResource... | java | public ProjectFile read(POIFSFileSystem fs) throws MPXJException
{
try
{
ProjectFile projectFile = new ProjectFile();
ProjectConfig config = projectFile.getProjectConfig();
config.setAutoTaskID(false);
config.setAutoTaskUniqueID(false);
config.setAutoResource... | [
"public",
"ProjectFile",
"read",
"(",
"POIFSFileSystem",
"fs",
")",
"throws",
"MPXJException",
"{",
"try",
"{",
"ProjectFile",
"projectFile",
"=",
"new",
"ProjectFile",
"(",
")",
";",
"ProjectConfig",
"config",
"=",
"projectFile",
".",
"getProjectConfig",
"(",
"... | Alternative entry point allowing an MPP file to be read from
a user-supplied POI file stream.
@param fs POI file stream
@return ProjectFile instance
@throws MPXJException | [
"Alternative",
"entry",
"point",
"allowing",
"an",
"MPP",
"file",
"to",
"be",
"read",
"from",
"a",
"user",
"-",
"supplied",
"POI",
"file",
"stream",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L120-L220 |
157,378 | joniles/mpxj | src/main/java/net/sf/mpxj/mpp/MPPReader.java | MPPReader.validationRelations | private void validationRelations(Task task)
{
List<Relation> predecessors = task.getPredecessors();
if (!predecessors.isEmpty())
{
ArrayList<Relation> invalid = new ArrayList<Relation>();
for (Relation relation : predecessors)
{
Task sourceTask = relation.getS... | java | private void validationRelations(Task task)
{
List<Relation> predecessors = task.getPredecessors();
if (!predecessors.isEmpty())
{
ArrayList<Relation> invalid = new ArrayList<Relation>();
for (Relation relation : predecessors)
{
Task sourceTask = relation.getS... | [
"private",
"void",
"validationRelations",
"(",
"Task",
"task",
")",
"{",
"List",
"<",
"Relation",
">",
"predecessors",
"=",
"task",
".",
"getPredecessors",
"(",
")",
";",
"if",
"(",
"!",
"predecessors",
".",
"isEmpty",
"(",
")",
")",
"{",
"ArrayList",
"<... | This method validates all relationships for a task, removing
any which have been incorrectly read from the MPP file and
point to a parent task.
@param task task under test | [
"This",
"method",
"validates",
"all",
"relationships",
"for",
"a",
"task",
"removing",
"any",
"which",
"have",
"been",
"incorrectly",
"read",
"from",
"the",
"MPP",
"file",
"and",
"point",
"to",
"a",
"parent",
"task",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPPReader.java#L229-L254 |
157,379 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXTaskField.java | MPXTaskField.getMpxjField | public static TaskField getMpxjField(int value)
{
TaskField result = null;
if (value >= 0 && value < MPX_MPXJ_ARRAY.length)
{
result = MPX_MPXJ_ARRAY[value];
}
return (result);
} | java | public static TaskField getMpxjField(int value)
{
TaskField result = null;
if (value >= 0 && value < MPX_MPXJ_ARRAY.length)
{
result = MPX_MPXJ_ARRAY[value];
}
return (result);
} | [
"public",
"static",
"TaskField",
"getMpxjField",
"(",
"int",
"value",
")",
"{",
"TaskField",
"result",
"=",
"null",
";",
"if",
"(",
"value",
">=",
"0",
"&&",
"value",
"<",
"MPX_MPXJ_ARRAY",
".",
"length",
")",
"{",
"result",
"=",
"MPX_MPXJ_ARRAY",
"[",
"... | Retrieve an instance of the TaskField class based on the data read from an
MPX file.
@param value value from an MS Project file
@return TaskField instance | [
"Retrieve",
"an",
"instance",
"of",
"the",
"TaskField",
"class",
"based",
"on",
"the",
"data",
"read",
"from",
"an",
"MPX",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXTaskField.java#L42-L52 |
157,380 | joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXTaskField.java | MPXTaskField.getMpxField | public static int getMpxField(int value)
{
int result = 0;
if (value >= 0 && value < MPXJ_MPX_ARRAY.length)
{
result = MPXJ_MPX_ARRAY[value];
}
return (result);
} | java | public static int getMpxField(int value)
{
int result = 0;
if (value >= 0 && value < MPXJ_MPX_ARRAY.length)
{
result = MPXJ_MPX_ARRAY[value];
}
return (result);
} | [
"public",
"static",
"int",
"getMpxField",
"(",
"int",
"value",
")",
"{",
"int",
"result",
"=",
"0",
";",
"if",
"(",
"value",
">=",
"0",
"&&",
"value",
"<",
"MPXJ_MPX_ARRAY",
".",
"length",
")",
"{",
"result",
"=",
"MPXJ_MPX_ARRAY",
"[",
"value",
"]",
... | Retrieve the integer value used to represent a task field in an
MPX file.
@param value MPXJ task field value
@return MPX field value | [
"Retrieve",
"the",
"integer",
"value",
"used",
"to",
"represent",
"a",
"task",
"field",
"in",
"an",
"MPX",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXTaskField.java#L61-L70 |
157,381 | joniles/mpxj | src/main/java/net/sf/mpxj/TaskContainer.java | TaskContainer.add | public Task add()
{
Task task = new Task(m_projectFile, (Task) null);
add(task);
m_projectFile.getChildTasks().add(task);
return task;
} | java | public Task add()
{
Task task = new Task(m_projectFile, (Task) null);
add(task);
m_projectFile.getChildTasks().add(task);
return task;
} | [
"public",
"Task",
"add",
"(",
")",
"{",
"Task",
"task",
"=",
"new",
"Task",
"(",
"m_projectFile",
",",
"(",
"Task",
")",
"null",
")",
";",
"add",
"(",
"task",
")",
";",
"m_projectFile",
".",
"getChildTasks",
"(",
")",
".",
"add",
"(",
"task",
")",
... | Add a task to the project.
@return new task instance | [
"Add",
"a",
"task",
"to",
"the",
"project",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L52-L58 |
157,382 | joniles/mpxj | src/main/java/net/sf/mpxj/TaskContainer.java | TaskContainer.synchronizeTaskIDToHierarchy | public void synchronizeTaskIDToHierarchy()
{
clear();
int currentID = (getByID(Integer.valueOf(0)) == null ? 1 : 0);
for (Task task : m_projectFile.getChildTasks())
{
task.setID(Integer.valueOf(currentID++));
add(task);
currentID = synchroizeTaskIDToHierarchy(task,... | java | public void synchronizeTaskIDToHierarchy()
{
clear();
int currentID = (getByID(Integer.valueOf(0)) == null ? 1 : 0);
for (Task task : m_projectFile.getChildTasks())
{
task.setID(Integer.valueOf(currentID++));
add(task);
currentID = synchroizeTaskIDToHierarchy(task,... | [
"public",
"void",
"synchronizeTaskIDToHierarchy",
"(",
")",
"{",
"clear",
"(",
")",
";",
"int",
"currentID",
"=",
"(",
"getByID",
"(",
"Integer",
".",
"valueOf",
"(",
"0",
")",
")",
"==",
"null",
"?",
"1",
":",
"0",
")",
";",
"for",
"(",
"Task",
"t... | Microsoft Project bases the order of tasks displayed on their ID
value. This method takes the hierarchical structure of tasks
represented in MPXJ and renumbers the ID values to ensure that
this structure is displayed as expected in Microsoft Project. This
is typically used to deal with the case where a hierarchical tas... | [
"Microsoft",
"Project",
"bases",
"the",
"order",
"of",
"tasks",
"displayed",
"on",
"their",
"ID",
"value",
".",
"This",
"method",
"takes",
"the",
"hierarchical",
"structure",
"of",
"tasks",
"represented",
"in",
"MPXJ",
"and",
"renumbers",
"the",
"ID",
"values"... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L122-L133 |
157,383 | joniles/mpxj | src/main/java/net/sf/mpxj/TaskContainer.java | TaskContainer.synchroizeTaskIDToHierarchy | private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID)
{
for (Task task : parentTask.getChildTasks())
{
task.setID(Integer.valueOf(currentID++));
add(task);
currentID = synchroizeTaskIDToHierarchy(task, currentID);
}
return currentID;
} | java | private int synchroizeTaskIDToHierarchy(Task parentTask, int currentID)
{
for (Task task : parentTask.getChildTasks())
{
task.setID(Integer.valueOf(currentID++));
add(task);
currentID = synchroizeTaskIDToHierarchy(task, currentID);
}
return currentID;
} | [
"private",
"int",
"synchroizeTaskIDToHierarchy",
"(",
"Task",
"parentTask",
",",
"int",
"currentID",
")",
"{",
"for",
"(",
"Task",
"task",
":",
"parentTask",
".",
"getChildTasks",
"(",
")",
")",
"{",
"task",
".",
"setID",
"(",
"Integer",
".",
"valueOf",
"(... | Called recursively to renumber child task IDs.
@param parentTask parent task instance
@param currentID current task ID
@return updated current task ID | [
"Called",
"recursively",
"to",
"renumber",
"child",
"task",
"IDs",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L142-L151 |
157,384 | joniles/mpxj | src/main/java/net/sf/mpxj/TaskContainer.java | TaskContainer.updateStructure | public void updateStructure()
{
if (size() > 1)
{
Collections.sort(this);
m_projectFile.getChildTasks().clear();
Task lastTask = null;
int lastLevel = -1;
boolean autoWbs = m_projectFile.getProjectConfig().getAutoWBS();
boolean autoOutlineNumber = m_... | java | public void updateStructure()
{
if (size() > 1)
{
Collections.sort(this);
m_projectFile.getChildTasks().clear();
Task lastTask = null;
int lastLevel = -1;
boolean autoWbs = m_projectFile.getProjectConfig().getAutoWBS();
boolean autoOutlineNumber = m_... | [
"public",
"void",
"updateStructure",
"(",
")",
"{",
"if",
"(",
"size",
"(",
")",
">",
"1",
")",
"{",
"Collections",
".",
"sort",
"(",
"this",
")",
";",
"m_projectFile",
".",
"getChildTasks",
"(",
")",
".",
"clear",
"(",
")",
";",
"Task",
"lastTask",
... | This method is used to recreate the hierarchical structure of the
project file from scratch. The method sorts the list of all tasks,
then iterates through it creating the parent-child structure defined
by the outline level field. | [
"This",
"method",
"is",
"used",
"to",
"recreate",
"the",
"hierarchical",
"structure",
"of",
"the",
"project",
"file",
"from",
"scratch",
".",
"The",
"method",
"sorts",
"the",
"list",
"of",
"all",
"tasks",
"then",
"iterates",
"through",
"it",
"creating",
"the... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/TaskContainer.java#L159-L234 |
157,385 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/MppCleanUtility.java | MppCleanUtility.process | private void process(String input, String output) throws MPXJException, IOException
{
//
// Extract the project data
//
MPPReader reader = new MPPReader();
m_project = reader.read(input);
String varDataFileName;
String projectDirName;
int mppFileType = NumberHelper.ge... | java | private void process(String input, String output) throws MPXJException, IOException
{
//
// Extract the project data
//
MPPReader reader = new MPPReader();
m_project = reader.read(input);
String varDataFileName;
String projectDirName;
int mppFileType = NumberHelper.ge... | [
"private",
"void",
"process",
"(",
"String",
"input",
",",
"String",
"output",
")",
"throws",
"MPXJException",
",",
"IOException",
"{",
"//",
"// Extract the project data",
"//",
"MPPReader",
"reader",
"=",
"new",
"MPPReader",
"(",
")",
";",
"m_project",
"=",
... | Process an MPP file to make it anonymous.
@param input input file name
@param output output file name
@throws Exception | [
"Process",
"an",
"MPP",
"file",
"to",
"make",
"it",
"anonymous",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L108-L219 |
157,386 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/MppCleanUtility.java | MppCleanUtility.mapText | private void mapText(String oldText, Map<String, String> replacements)
{
char c2 = 0;
if (oldText != null && oldText.length() != 0 && !replacements.containsKey(oldText))
{
StringBuilder newText = new StringBuilder(oldText.length());
for (int loop = 0; loop < oldText.length(); loop... | java | private void mapText(String oldText, Map<String, String> replacements)
{
char c2 = 0;
if (oldText != null && oldText.length() != 0 && !replacements.containsKey(oldText))
{
StringBuilder newText = new StringBuilder(oldText.length());
for (int loop = 0; loop < oldText.length(); loop... | [
"private",
"void",
"mapText",
"(",
"String",
"oldText",
",",
"Map",
"<",
"String",
",",
"String",
">",
"replacements",
")",
"{",
"char",
"c2",
"=",
"0",
";",
"if",
"(",
"oldText",
"!=",
"null",
"&&",
"oldText",
".",
"length",
"(",
")",
"!=",
"0",
"... | Converts plan text into anonymous text. Preserves upper case, lower case,
punctuation, whitespace and digits while making the text unreadable.
@param oldText text to replace
@param replacements map of find/replace pairs | [
"Converts",
"plan",
"text",
"into",
"anonymous",
"text",
".",
"Preserves",
"upper",
"case",
"lower",
"case",
"punctuation",
"whitespace",
"and",
"digits",
"while",
"making",
"the",
"text",
"unreadable",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L282-L332 |
157,387 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/MppCleanUtility.java | MppCleanUtility.getBytes | private byte[] getBytes(String value, boolean unicode)
{
byte[] result;
if (unicode)
{
int start = 0;
// Get the bytes in UTF-16
byte[] bytes;
try
{
bytes = value.getBytes("UTF-16");
}
catch (UnsupportedEncodingException e)... | java | private byte[] getBytes(String value, boolean unicode)
{
byte[] result;
if (unicode)
{
int start = 0;
// Get the bytes in UTF-16
byte[] bytes;
try
{
bytes = value.getBytes("UTF-16");
}
catch (UnsupportedEncodingException e)... | [
"private",
"byte",
"[",
"]",
"getBytes",
"(",
"String",
"value",
",",
"boolean",
"unicode",
")",
"{",
"byte",
"[",
"]",
"result",
";",
"if",
"(",
"unicode",
")",
"{",
"int",
"start",
"=",
"0",
";",
"// Get the bytes in UTF-16",
"byte",
"[",
"]",
"bytes... | Convert a Java String instance into the equivalent array of single or
double bytes.
@param value Java String instance representing text
@param unicode true if double byte characters are required
@return byte array representing the supplied text | [
"Convert",
"a",
"Java",
"String",
"instance",
"into",
"the",
"equivalent",
"array",
"of",
"single",
"or",
"double",
"bytes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L373-L410 |
157,388 | joniles/mpxj | src/main/java/net/sf/mpxj/utility/MppCleanUtility.java | MppCleanUtility.compareBytes | private boolean compareBytes(byte[] lhs, byte[] rhs, int rhsOffset)
{
boolean result = true;
for (int loop = 0; loop < lhs.length; loop++)
{
if (lhs[loop] != rhs[rhsOffset + loop])
{
result = false;
break;
}
}
return (result);
} | java | private boolean compareBytes(byte[] lhs, byte[] rhs, int rhsOffset)
{
boolean result = true;
for (int loop = 0; loop < lhs.length; loop++)
{
if (lhs[loop] != rhs[rhsOffset + loop])
{
result = false;
break;
}
}
return (result);
} | [
"private",
"boolean",
"compareBytes",
"(",
"byte",
"[",
"]",
"lhs",
",",
"byte",
"[",
"]",
"rhs",
",",
"int",
"rhsOffset",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"for",
"(",
"int",
"loop",
"=",
"0",
";",
"loop",
"<",
"lhs",
".",
"length",... | Compare an array of bytes with a subsection of a larger array of bytes.
@param lhs small array of bytes
@param rhs large array of bytes
@param rhsOffset offset into larger array of bytes
@return true if a match is found | [
"Compare",
"an",
"array",
"of",
"bytes",
"with",
"a",
"subsection",
"of",
"a",
"larger",
"array",
"of",
"bytes",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/MppCleanUtility.java#L420-L432 |
157,389 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeCurrency | private void writeCurrency()
{
ProjectProperties props = m_projectFile.getProjectProperties();
CurrencyType currency = m_factory.createCurrencyType();
m_apibo.getCurrency().add(currency);
String positiveSymbol = getCurrencyFormat(props.getSymbolPosition());
String negativeSymbol = "(" ... | java | private void writeCurrency()
{
ProjectProperties props = m_projectFile.getProjectProperties();
CurrencyType currency = m_factory.createCurrencyType();
m_apibo.getCurrency().add(currency);
String positiveSymbol = getCurrencyFormat(props.getSymbolPosition());
String negativeSymbol = "(" ... | [
"private",
"void",
"writeCurrency",
"(",
")",
"{",
"ProjectProperties",
"props",
"=",
"m_projectFile",
".",
"getProjectProperties",
"(",
")",
";",
"CurrencyType",
"currency",
"=",
"m_factory",
".",
"createCurrencyType",
"(",
")",
";",
"m_apibo",
".",
"getCurrency"... | Create a handful of default currencies to keep Primavera happy. | [
"Create",
"a",
"handful",
"of",
"default",
"currencies",
"to",
"keep",
"Primavera",
"happy",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L239-L258 |
157,390 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getSymbolName | private String getSymbolName(char c)
{
String result = null;
switch (c)
{
case ',':
{
result = "Comma";
break;
}
case '.':
{
result = "Period";
break;
}
}
return result;
} | java | private String getSymbolName(char c)
{
String result = null;
switch (c)
{
case ',':
{
result = "Comma";
break;
}
case '.':
{
result = "Period";
break;
}
}
return result;
} | [
"private",
"String",
"getSymbolName",
"(",
"char",
"c",
")",
"{",
"String",
"result",
"=",
"null",
";",
"switch",
"(",
"c",
")",
"{",
"case",
"'",
"'",
":",
"{",
"result",
"=",
"\"Comma\"",
";",
"break",
";",
"}",
"case",
"'",
"'",
":",
"{",
"res... | Map the currency separator character to a symbol name.
@param c currency separator character
@return symbol name | [
"Map",
"the",
"currency",
"separator",
"character",
"to",
"a",
"symbol",
"name",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L266-L286 |
157,391 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.getCurrencyFormat | private String getCurrencyFormat(CurrencySymbolPosition position)
{
String result;
switch (position)
{
case AFTER:
{
result = "1.1#";
break;
}
case AFTER_WITH_SPACE:
{
result = "1.1 #";
break;
}
... | java | private String getCurrencyFormat(CurrencySymbolPosition position)
{
String result;
switch (position)
{
case AFTER:
{
result = "1.1#";
break;
}
case AFTER_WITH_SPACE:
{
result = "1.1 #";
break;
}
... | [
"private",
"String",
"getCurrencyFormat",
"(",
"CurrencySymbolPosition",
"position",
")",
"{",
"String",
"result",
";",
"switch",
"(",
"position",
")",
"{",
"case",
"AFTER",
":",
"{",
"result",
"=",
"\"1.1#\"",
";",
"break",
";",
"}",
"case",
"AFTER_WITH_SPACE... | Generate a currency format.
@param position currency symbol position
@return currency format | [
"Generate",
"a",
"currency",
"format",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L294-L327 |
157,392 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeUserFieldDefinitions | private void writeUserFieldDefinitions()
{
for (CustomField cf : m_sortedCustomFieldsList)
{
if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null)
{
UDFTypeType udf = m_factory.createUDFTypeType();
udf.setObjectId(Integer.valueOf(FieldTypeHelp... | java | private void writeUserFieldDefinitions()
{
for (CustomField cf : m_sortedCustomFieldsList)
{
if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null)
{
UDFTypeType udf = m_factory.createUDFTypeType();
udf.setObjectId(Integer.valueOf(FieldTypeHelp... | [
"private",
"void",
"writeUserFieldDefinitions",
"(",
")",
"{",
"for",
"(",
"CustomField",
"cf",
":",
"m_sortedCustomFieldsList",
")",
"{",
"if",
"(",
"cf",
".",
"getFieldType",
"(",
")",
"!=",
"null",
"&&",
"cf",
".",
"getFieldType",
"(",
")",
".",
"getDat... | Add UDFType objects to a PM XML file.
@author kmahan
@date 2014-09-24
@author lsong
@date 2015-7-24 | [
"Add",
"UDFType",
"objects",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L337-L352 |
157,393 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeCalendar | private void writeCalendar(ProjectCalendar mpxj)
{
CalendarType xml = m_factory.createCalendarType();
m_apibo.getCalendar().add(xml);
String type = mpxj.getResource() == null ? "Global" : "Resource";
xml.setBaseCalendarObjectId(getCalendarUniqueID(mpxj.getParent()));
xml.setIsPersonal(... | java | private void writeCalendar(ProjectCalendar mpxj)
{
CalendarType xml = m_factory.createCalendarType();
m_apibo.getCalendar().add(xml);
String type = mpxj.getResource() == null ? "Global" : "Resource";
xml.setBaseCalendarObjectId(getCalendarUniqueID(mpxj.getParent()));
xml.setIsPersonal(... | [
"private",
"void",
"writeCalendar",
"(",
"ProjectCalendar",
"mpxj",
")",
"{",
"CalendarType",
"xml",
"=",
"m_factory",
".",
"createCalendarType",
"(",
")",
";",
"m_apibo",
".",
"getCalendar",
"(",
")",
".",
"add",
"(",
"xml",
")",
";",
"String",
"type",
"=... | This method writes data for an individual calendar to a PM XML file.
@param mpxj ProjectCalander instance | [
"This",
"method",
"writes",
"data",
"for",
"an",
"individual",
"calendar",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L439-L503 |
157,394 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeResources | private void writeResources()
{
for (Resource resource : m_projectFile.getResources())
{
if (resource.getUniqueID().intValue() != 0)
{
writeResource(resource);
}
}
} | java | private void writeResources()
{
for (Resource resource : m_projectFile.getResources())
{
if (resource.getUniqueID().intValue() != 0)
{
writeResource(resource);
}
}
} | [
"private",
"void",
"writeResources",
"(",
")",
"{",
"for",
"(",
"Resource",
"resource",
":",
"m_projectFile",
".",
"getResources",
"(",
")",
")",
"{",
"if",
"(",
"resource",
".",
"getUniqueID",
"(",
")",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
... | This method writes resource data to a PM XML file. | [
"This",
"method",
"writes",
"resource",
"data",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L508-L517 |
157,395 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeResource | private void writeResource(Resource mpxj)
{
ResourceType xml = m_factory.createResourceType();
m_apibo.getResource().add(xml);
xml.setAutoComputeActuals(Boolean.TRUE);
xml.setCalculateCostFromUnits(Boolean.TRUE);
xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));... | java | private void writeResource(Resource mpxj)
{
ResourceType xml = m_factory.createResourceType();
m_apibo.getResource().add(xml);
xml.setAutoComputeActuals(Boolean.TRUE);
xml.setCalculateCostFromUnits(Boolean.TRUE);
xml.setCalendarObjectId(getCalendarUniqueID(mpxj.getResourceCalendar()));... | [
"private",
"void",
"writeResource",
"(",
"Resource",
"mpxj",
")",
"{",
"ResourceType",
"xml",
"=",
"m_factory",
".",
"createResourceType",
"(",
")",
";",
"m_apibo",
".",
"getResource",
"(",
")",
".",
"add",
"(",
"xml",
")",
";",
"xml",
".",
"setAutoCompute... | Write a single resource.
@param mpxj Resource instance | [
"Write",
"a",
"single",
"resource",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L524-L545 |
157,396 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeTask | private void writeTask(Task task)
{
if (!task.getNull())
{
if (extractAndConvertTaskType(task) == null || task.getSummary())
{
writeWBS(task);
}
else
{
writeActivity(task);
}
}
} | java | private void writeTask(Task task)
{
if (!task.getNull())
{
if (extractAndConvertTaskType(task) == null || task.getSummary())
{
writeWBS(task);
}
else
{
writeActivity(task);
}
}
} | [
"private",
"void",
"writeTask",
"(",
"Task",
"task",
")",
"{",
"if",
"(",
"!",
"task",
".",
"getNull",
"(",
")",
")",
"{",
"if",
"(",
"extractAndConvertTaskType",
"(",
"task",
")",
"==",
"null",
"||",
"task",
".",
"getSummary",
"(",
")",
")",
"{",
... | Given a Task instance, this task determines if it should be written to the
PM XML file as an activity or as a WBS item, and calls the appropriate
method.
@param task Task instance | [
"Given",
"a",
"Task",
"instance",
"this",
"task",
"determines",
"if",
"it",
"should",
"be",
"written",
"to",
"the",
"PM",
"XML",
"file",
"as",
"an",
"activity",
"or",
"as",
"a",
"WBS",
"item",
"and",
"calls",
"the",
"appropriate",
"method",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L579-L592 |
157,397 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeWBS | private void writeWBS(Task mpxj)
{
if (mpxj.getUniqueID().intValue() != 0)
{
WBSType xml = m_factory.createWBSType();
m_project.getWBS().add(xml);
String code = mpxj.getWBS();
code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code;
Task parentTas... | java | private void writeWBS(Task mpxj)
{
if (mpxj.getUniqueID().intValue() != 0)
{
WBSType xml = m_factory.createWBSType();
m_project.getWBS().add(xml);
String code = mpxj.getWBS();
code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code;
Task parentTas... | [
"private",
"void",
"writeWBS",
"(",
"Task",
"mpxj",
")",
"{",
"if",
"(",
"mpxj",
".",
"getUniqueID",
"(",
")",
".",
"intValue",
"(",
")",
"!=",
"0",
")",
"{",
"WBSType",
"xml",
"=",
"m_factory",
".",
"createWBSType",
"(",
")",
";",
"m_project",
".",
... | Writes a WBS entity to the PM XML file.
@param mpxj MPXJ Task entity | [
"Writes",
"a",
"WBS",
"entity",
"to",
"the",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L599-L624 |
157,398 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.writeActivity | private void writeActivity(Task mpxj)
{
ActivityType xml = m_factory.createActivityType();
m_project.getActivity().add(xml);
Task parentTask = mpxj.getParentTask();
Integer parentObjectID = parentTask == null ? null : parentTask.getUniqueID();
xml.setActualStartDate(mpxj.getActualStar... | java | private void writeActivity(Task mpxj)
{
ActivityType xml = m_factory.createActivityType();
m_project.getActivity().add(xml);
Task parentTask = mpxj.getParentTask();
Integer parentObjectID = parentTask == null ? null : parentTask.getUniqueID();
xml.setActualStartDate(mpxj.getActualStar... | [
"private",
"void",
"writeActivity",
"(",
"Task",
"mpxj",
")",
"{",
"ActivityType",
"xml",
"=",
"m_factory",
".",
"createActivityType",
"(",
")",
";",
"m_project",
".",
"getActivity",
"(",
")",
".",
"add",
"(",
"xml",
")",
";",
"Task",
"parentTask",
"=",
... | Writes an activity to a PM XML file.
@param mpxj MPXJ Task instance | [
"Writes",
"an",
"activity",
"to",
"a",
"PM",
"XML",
"file",
"."
] | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L631-L672 |
157,399 | joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java | PrimaveraPMFileWriter.extractAndConvertTaskType | private String extractAndConvertTaskType(Task task)
{
String activityType = (String) task.getCachedValue(m_activityTypeField);
if (activityType == null)
{
activityType = "Resource Dependent";
}
else
{
if (ACTIVITY_TYPE_MAP.containsKey(activityType))
{
... | java | private String extractAndConvertTaskType(Task task)
{
String activityType = (String) task.getCachedValue(m_activityTypeField);
if (activityType == null)
{
activityType = "Resource Dependent";
}
else
{
if (ACTIVITY_TYPE_MAP.containsKey(activityType))
{
... | [
"private",
"String",
"extractAndConvertTaskType",
"(",
"Task",
"task",
")",
"{",
"String",
"activityType",
"=",
"(",
"String",
")",
"task",
".",
"getCachedValue",
"(",
"m_activityTypeField",
")",
";",
"if",
"(",
"activityType",
"==",
"null",
")",
"{",
"activit... | Attempts to locate the activity type value extracted from an existing P6 schedule.
If necessary converts to the form which can be used in the PMXML file.
Returns "Resource Dependent" as the default value.
@param task parent task
@return activity type | [
"Attempts",
"to",
"locate",
"the",
"activity",
"type",
"value",
"extracted",
"from",
"an",
"existing",
"P6",
"schedule",
".",
"If",
"necessary",
"converts",
"to",
"the",
"form",
"which",
"can",
"be",
"used",
"in",
"the",
"PMXML",
"file",
".",
"Returns",
"R... | 143ea0e195da59cd108f13b3b06328e9542337e8 | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileWriter.java#L682-L697 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.