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
partition
stringclasses
1 value
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.getActiveLayout
private Layout getActiveLayout(Project phoenixProject) { // // Start with the first layout we find // Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0); // // If this isn't active, find one which is... and if none are, // we'll just use the first. /...
java
private Layout getActiveLayout(Project phoenixProject) { // // Start with the first layout we find // Layout activeLayout = phoenixProject.getLayouts().getLayout().get(0); // // If this isn't active, find one which is... and if none are, // we'll just use the first. /...
[ "private", "Layout", "getActiveLayout", "(", "Project", "phoenixProject", ")", "{", "//", "// Start with the first layout we find", "//", "Layout", "activeLayout", "=", "phoenixProject", ".", "getLayouts", "(", ")", ".", "getLayout", "(", ")", ".", "get", "(", "0"...
Find the current active layout. @param phoenixProject phoenix project data @return current active layout
[ "Find", "the", "current", "active", "layout", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L377-L401
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.processActivities
private void processActivities(Storepoint phoenixProject) { final AlphanumComparator comparator = new AlphanumComparator(); List<Activity> activities = phoenixProject.getActivities().getActivity(); Collections.sort(activities, new Comparator<Activity>() { @Override public int compare...
java
private void processActivities(Storepoint phoenixProject) { final AlphanumComparator comparator = new AlphanumComparator(); List<Activity> activities = phoenixProject.getActivities().getActivity(); Collections.sort(activities, new Comparator<Activity>() { @Override public int compare...
[ "private", "void", "processActivities", "(", "Storepoint", "phoenixProject", ")", "{", "final", "AlphanumComparator", "comparator", "=", "new", "AlphanumComparator", "(", ")", ";", "List", "<", "Activity", ">", "activities", "=", "phoenixProject", ".", "getActivitie...
Process the set of activities from the Phoenix file. @param phoenixProject project data
[ "Process", "the", "set", "of", "activities", "from", "the", "Phoenix", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L408-L458
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.processActivity
private void processActivity(Activity activity) { Task task = getParentTask(activity).addTask(); task.setText(1, activity.getId()); task.setActualDuration(activity.getActualDuration()); task.setActualFinish(activity.getActualFinish()); task.setActualStart(activity.getActualStart()); ...
java
private void processActivity(Activity activity) { Task task = getParentTask(activity).addTask(); task.setText(1, activity.getId()); task.setActualDuration(activity.getActualDuration()); task.setActualFinish(activity.getActualFinish()); task.setActualStart(activity.getActualStart()); ...
[ "private", "void", "processActivity", "(", "Activity", "activity", ")", "{", "Task", "task", "=", "getParentTask", "(", "activity", ")", ".", "addTask", "(", ")", ";", "task", ".", "setText", "(", "1", ",", "activity", ".", "getId", "(", ")", ")", ";",...
Create a Task instance from a Phoenix activity. @param activity Phoenix activity data
[ "Create", "a", "Task", "instance", "from", "a", "Phoenix", "activity", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L465-L533
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.activityIsMilestone
private boolean activityIsMilestone(Activity activity) { String type = activity.getType(); return type != null && type.indexOf("Milestone") != -1; }
java
private boolean activityIsMilestone(Activity activity) { String type = activity.getType(); return type != null && type.indexOf("Milestone") != -1; }
[ "private", "boolean", "activityIsMilestone", "(", "Activity", "activity", ")", "{", "String", "type", "=", "activity", ".", "getType", "(", ")", ";", "return", "type", "!=", "null", "&&", "type", ".", "indexOf", "(", "\"Milestone\"", ")", "!=", "-", "1", ...
Returns true if the activity is a milestone. @param activity Phoenix activity @return true if the activity is a milestone
[ "Returns", "true", "if", "the", "activity", "is", "a", "milestone", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L541-L545
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.activityIsStartMilestone
private boolean activityIsStartMilestone(Activity activity) { String type = activity.getType(); return type != null && type.indexOf("StartMilestone") != -1; }
java
private boolean activityIsStartMilestone(Activity activity) { String type = activity.getType(); return type != null && type.indexOf("StartMilestone") != -1; }
[ "private", "boolean", "activityIsStartMilestone", "(", "Activity", "activity", ")", "{", "String", "type", "=", "activity", ".", "getType", "(", ")", ";", "return", "type", "!=", "null", "&&", "type", ".", "indexOf", "(", "\"StartMilestone\"", ")", "!=", "-"...
Returns true if the activity is a start milestone. @param activity Phoenix activity @return true if the activity is a milestone
[ "Returns", "true", "if", "the", "activity", "is", "a", "start", "milestone", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L553-L557
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.getParentTask
private ChildTaskContainer getParentTask(Activity activity) { // // Make a map of activity codes and their values for this activity // Map<UUID, UUID> map = getActivityCodes(activity); // // Work through the activity codes in sequence // ChildTaskContainer parent = m_...
java
private ChildTaskContainer getParentTask(Activity activity) { // // Make a map of activity codes and their values for this activity // Map<UUID, UUID> map = getActivityCodes(activity); // // Work through the activity codes in sequence // ChildTaskContainer parent = m_...
[ "private", "ChildTaskContainer", "getParentTask", "(", "Activity", "activity", ")", "{", "//", "// Make a map of activity codes and their values for this activity", "//", "Map", "<", "UUID", ",", "UUID", ">", "map", "=", "getActivityCodes", "(", "activity", ")", ";", ...
Retrieves the parent task for a Phoenix activity. @param activity Phoenix activity @return parent task
[ "Retrieves", "the", "parent", "task", "for", "a", "Phoenix", "activity", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L565-L600
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.findChildTaskByUUID
private Task findChildTaskByUUID(ChildTaskContainer parent, UUID uuid) { Task result = null; for (Task task : parent.getChildTasks()) { if (uuid.equals(task.getGUID())) { result = task; break; } } return result; }
java
private Task findChildTaskByUUID(ChildTaskContainer parent, UUID uuid) { Task result = null; for (Task task : parent.getChildTasks()) { if (uuid.equals(task.getGUID())) { result = task; break; } } return result; }
[ "private", "Task", "findChildTaskByUUID", "(", "ChildTaskContainer", "parent", ",", "UUID", "uuid", ")", "{", "Task", "result", "=", "null", ";", "for", "(", "Task", "task", ":", "parent", ".", "getChildTasks", "(", ")", ")", "{", "if", "(", "uuid", ".",...
Locates a task within a child task container which matches the supplied UUID. @param parent child task container @param uuid required UUID @return Task instance or null if the task is not found
[ "Locates", "a", "task", "within", "a", "child", "task", "container", "which", "matches", "the", "supplied", "UUID", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L609-L623
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.readAssignments
private void readAssignments(Resource mpxjResource, net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res) { for (Assignment assignment : res.getAssignment()) { readAssignment(mpxjResource, assignment); } }
java
private void readAssignments(Resource mpxjResource, net.sf.mpxj.phoenix.schema.Project.Storepoints.Storepoint.Resources.Resource res) { for (Assignment assignment : res.getAssignment()) { readAssignment(mpxjResource, assignment); } }
[ "private", "void", "readAssignments", "(", "Resource", "mpxjResource", ",", "net", ".", "sf", ".", "mpxj", ".", "phoenix", ".", "schema", ".", "Project", ".", "Storepoints", ".", "Storepoint", ".", "Resources", ".", "Resource", "res", ")", "{", "for", "(",...
Reads Phoenix resource assignments. @param mpxjResource MPXJ resource @param res Phoenix resource
[ "Reads", "Phoenix", "resource", "assignments", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L631-L637
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.readAssignment
private void readAssignment(Resource resource, Assignment assignment) { Task task = m_activityMap.get(assignment.getActivity()); if (task != null) { task.addResourceAssignment(resource); } }
java
private void readAssignment(Resource resource, Assignment assignment) { Task task = m_activityMap.get(assignment.getActivity()); if (task != null) { task.addResourceAssignment(resource); } }
[ "private", "void", "readAssignment", "(", "Resource", "resource", ",", "Assignment", "assignment", ")", "{", "Task", "task", "=", "m_activityMap", ".", "get", "(", "assignment", ".", "getActivity", "(", ")", ")", ";", "if", "(", "task", "!=", "null", ")", ...
Read a single resource assignment. @param resource MPXJ resource @param assignment Phoenix assignment
[ "Read", "a", "single", "resource", "assignment", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L645-L652
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.readRelationships
private void readRelationships(Storepoint phoenixProject) { for (Relationship relation : phoenixProject.getRelationships().getRelationship()) { readRelation(relation); } }
java
private void readRelationships(Storepoint phoenixProject) { for (Relationship relation : phoenixProject.getRelationships().getRelationship()) { readRelation(relation); } }
[ "private", "void", "readRelationships", "(", "Storepoint", "phoenixProject", ")", "{", "for", "(", "Relationship", "relation", ":", "phoenixProject", ".", "getRelationships", "(", ")", ".", "getRelationship", "(", ")", ")", "{", "readRelation", "(", "relation", ...
Read task relationships from a Phoenix file. @param phoenixProject Phoenix project data
[ "Read", "task", "relationships", "from", "a", "Phoenix", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L659-L665
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.readRelation
private void readRelation(Relationship relation) { Task predecessor = m_activityMap.get(relation.getPredecessor()); Task successor = m_activityMap.get(relation.getSuccessor()); if (predecessor != null && successor != null) { Duration lag = relation.getLag(); RelationType typ...
java
private void readRelation(Relationship relation) { Task predecessor = m_activityMap.get(relation.getPredecessor()); Task successor = m_activityMap.get(relation.getSuccessor()); if (predecessor != null && successor != null) { Duration lag = relation.getLag(); RelationType typ...
[ "private", "void", "readRelation", "(", "Relationship", "relation", ")", "{", "Task", "predecessor", "=", "m_activityMap", ".", "get", "(", "relation", ".", "getPredecessor", "(", ")", ")", ";", "Task", "successor", "=", "m_activityMap", ".", "get", "(", "re...
Read an individual Phoenix task relationship. @param relation Phoenix task relationship
[ "Read", "an", "individual", "Phoenix", "task", "relationship", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L672-L682
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.getActivityCodes
Map<UUID, UUID> getActivityCodes(Activity activity) { Map<UUID, UUID> map = m_activityCodeCache.get(activity); if (map == null) { map = new HashMap<UUID, UUID>(); m_activityCodeCache.put(activity, map); for (CodeAssignment ca : activity.getCodeAssignment()) { ...
java
Map<UUID, UUID> getActivityCodes(Activity activity) { Map<UUID, UUID> map = m_activityCodeCache.get(activity); if (map == null) { map = new HashMap<UUID, UUID>(); m_activityCodeCache.put(activity, map); for (CodeAssignment ca : activity.getCodeAssignment()) { ...
[ "Map", "<", "UUID", ",", "UUID", ">", "getActivityCodes", "(", "Activity", "activity", ")", "{", "Map", "<", "UUID", ",", "UUID", ">", "map", "=", "m_activityCodeCache", ".", "get", "(", "activity", ")", ";", "if", "(", "map", "==", "null", ")", "{",...
For a given activity, retrieve a map of the activity code values which have been assigned to it. @param activity target activity @return map of activity code value UUIDs
[ "For", "a", "given", "activity", "retrieve", "a", "map", "of", "the", "activity", "code", "values", "which", "have", "been", "assigned", "to", "it", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L690-L705
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java
PhoenixReader.getCurrentStorepoint
private Storepoint getCurrentStorepoint(Project phoenixProject) { List<Storepoint> storepoints = phoenixProject.getStorepoints().getStorepoint(); Collections.sort(storepoints, new Comparator<Storepoint>() { @Override public int compare(Storepoint o1, Storepoint o2) { r...
java
private Storepoint getCurrentStorepoint(Project phoenixProject) { List<Storepoint> storepoints = phoenixProject.getStorepoints().getStorepoint(); Collections.sort(storepoints, new Comparator<Storepoint>() { @Override public int compare(Storepoint o1, Storepoint o2) { r...
[ "private", "Storepoint", "getCurrentStorepoint", "(", "Project", "phoenixProject", ")", "{", "List", "<", "Storepoint", ">", "storepoints", "=", "phoenixProject", ".", "getStorepoints", "(", ")", ".", "getStorepoint", "(", ")", ";", "Collections", ".", "sort", "...
Retrieve the most recent storepoint. @param phoenixProject project data @return Storepoint instance
[ "Retrieve", "the", "most", "recent", "storepoint", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/PhoenixReader.java#L713-L724
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/TableReader.java
TableReader.read
public TableReader read() throws IOException { int tableHeader = m_stream.readInt(); if (tableHeader != 0x39AF547A) { throw new IllegalArgumentException("Unexpected file format"); } int recordCount = m_stream.readInt(); for (int loop = 0; loop < recordCount; loop++) ...
java
public TableReader read() throws IOException { int tableHeader = m_stream.readInt(); if (tableHeader != 0x39AF547A) { throw new IllegalArgumentException("Unexpected file format"); } int recordCount = m_stream.readInt(); for (int loop = 0; loop < recordCount; loop++) ...
[ "public", "TableReader", "read", "(", ")", "throws", "IOException", "{", "int", "tableHeader", "=", "m_stream", ".", "readInt", "(", ")", ";", "if", "(", "tableHeader", "!=", "0x39AF547A", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Unexpecte...
Read data from the table. Return a reference to the current instance to allow method chaining. @return reader instance
[ "Read", "data", "from", "the", "table", ".", "Return", "a", "reference", "to", "the", "current", "instance", "to", "allow", "method", "chaining", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/TableReader.java#L63-L105
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/TableReader.java
TableReader.readUUID
protected void readUUID(StreamReader stream, Map<String, Object> map) throws IOException { int unknown0Size = stream.getMajorVersion() > 5 ? 8 : 16; map.put("UNKNOWN0", stream.readBytes(unknown0Size)); map.put("UUID", stream.readUUID()); }
java
protected void readUUID(StreamReader stream, Map<String, Object> map) throws IOException { int unknown0Size = stream.getMajorVersion() > 5 ? 8 : 16; map.put("UNKNOWN0", stream.readBytes(unknown0Size)); map.put("UUID", stream.readUUID()); }
[ "protected", "void", "readUUID", "(", "StreamReader", "stream", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "throws", "IOException", "{", "int", "unknown0Size", "=", "stream", ".", "getMajorVersion", "(", ")", ">", "5", "?", "8", ":", "16"...
Read the optional row header and UUID. @param stream input stream @param map row map
[ "Read", "the", "optional", "row", "header", "and", "UUID", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/TableReader.java#L124-L129
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java
AbstractShortColumn.readShort
protected int readShort(int offset, byte[] data) { int result = 0; int i = offset + m_offset; for (int shiftBy = 0; shiftBy < 16; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
java
protected int readShort(int offset, byte[] data) { int result = 0; int i = offset + m_offset; for (int shiftBy = 0; shiftBy < 16; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "protected", "int", "readShort", "(", "int", "offset", ",", "byte", "[", "]", "data", ")", "{", "int", "result", "=", "0", ";", "int", "i", "=", "offset", "+", "m_offset", ";", "for", "(", "int", "shiftBy", "=", "0", ";", "shiftBy", "<", "16", ";...
Read a two byte integer from the data. @param offset current offset into data block @param data data block @return int value
[ "Read", "a", "two", "byte", "integer", "from", "the", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java#L49-L59
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.loadObject
public void loadObject(Object object, Set<String> excludedMethods) { m_model.setTableModel(createTableModel(object, excludedMethods)); }
java
public void loadObject(Object object, Set<String> excludedMethods) { m_model.setTableModel(createTableModel(object, excludedMethods)); }
[ "public", "void", "loadObject", "(", "Object", "object", ",", "Set", "<", "String", ">", "excludedMethods", ")", "{", "m_model", ".", "setTableModel", "(", "createTableModel", "(", "object", ",", "excludedMethods", ")", ")", ";", "}" ]
Populate the model with the object's properties. @param object object whose properties we're displaying @param excludedMethods method names to exclude
[ "Populate", "the", "model", "with", "the", "object", "s", "properties", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L62-L65
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.createTableModel
private TableModel createTableModel(Object object, Set<String> excludedMethods) { List<Method> methods = new ArrayList<Method>(); for (Method method : object.getClass().getMethods()) { if ((method.getParameterTypes().length == 0) || (method.getParameterTypes().length == 1 && method.getPara...
java
private TableModel createTableModel(Object object, Set<String> excludedMethods) { List<Method> methods = new ArrayList<Method>(); for (Method method : object.getClass().getMethods()) { if ((method.getParameterTypes().length == 0) || (method.getParameterTypes().length == 1 && method.getPara...
[ "private", "TableModel", "createTableModel", "(", "Object", "object", ",", "Set", "<", "String", ">", "excludedMethods", ")", "{", "List", "<", "Method", ">", "methods", "=", "new", "ArrayList", "<", "Method", ">", "(", ")", ";", "for", "(", "Method", "m...
Create a table model from an object's properties. @param object target object @param excludedMethods method names to exclude @return table model
[ "Create", "a", "table", "model", "from", "an", "object", "s", "properties", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L74-L126
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.filterValue
private Object filterValue(Object value) { if (value instanceof Boolean && !((Boolean) value).booleanValue()) { value = null; } if (value instanceof String && ((String) value).isEmpty()) { value = null; } if (value instanceof Double && ((Double) value).doub...
java
private Object filterValue(Object value) { if (value instanceof Boolean && !((Boolean) value).booleanValue()) { value = null; } if (value instanceof String && ((String) value).isEmpty()) { value = null; } if (value instanceof Double && ((Double) value).doub...
[ "private", "Object", "filterValue", "(", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "Boolean", "&&", "!", "(", "(", "Boolean", ")", "value", ")", ".", "booleanValue", "(", ")", ")", "{", "value", "=", "null", ";", "}", "if", "(", ...
Replace default values will null, allowing them to be ignored. @param value value to test @return filtered value
[ "Replace", "default", "values", "will", "null", "allowing", "them", "to", "be", "ignored", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L134-L158
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.getSingleValue
private void getSingleValue(Method method, Object object, Map<String, String> map) { Object value; try { value = filterValue(method.invoke(object)); } catch (Exception ex) { value = ex.toString(); } if (value != null) { map.put(getProp...
java
private void getSingleValue(Method method, Object object, Map<String, String> map) { Object value; try { value = filterValue(method.invoke(object)); } catch (Exception ex) { value = ex.toString(); } if (value != null) { map.put(getProp...
[ "private", "void", "getSingleValue", "(", "Method", "method", ",", "Object", "object", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "Object", "value", ";", "try", "{", "value", "=", "filterValue", "(", "method", ".", "invoke", "(", "...
Retrieve a single value property. @param method method definition @param object target object @param map parameter values
[ "Retrieve", "a", "single", "value", "property", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L167-L183
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.getMultipleValues
private void getMultipleValues(Method method, Object object, Map<String, String> map) { try { int index = 1; while (true) { Object value = filterValue(method.invoke(object, Integer.valueOf(index))); if (value != null) { map.put...
java
private void getMultipleValues(Method method, Object object, Map<String, String> map) { try { int index = 1; while (true) { Object value = filterValue(method.invoke(object, Integer.valueOf(index))); if (value != null) { map.put...
[ "private", "void", "getMultipleValues", "(", "Method", "method", ",", "Object", "object", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "try", "{", "int", "index", "=", "1", ";", "while", "(", "true", ")", "{", "Object", "value", "=...
Retrieve multiple properties. @param method method definition @param object target object @param map parameter values
[ "Retrieve", "multiple", "properties", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L192-L211
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java
ObjectPropertiesController.getPropertyName
private String getPropertyName(Method method) { String result = method.getName(); if (result.startsWith("get")) { result = result.substring(3); } return result; }
java
private String getPropertyName(Method method) { String result = method.getName(); if (result.startsWith("get")) { result = result.substring(3); } return result; }
[ "private", "String", "getPropertyName", "(", "Method", "method", ")", "{", "String", "result", "=", "method", ".", "getName", "(", ")", ";", "if", "(", "result", ".", "startsWith", "(", "\"get\"", ")", ")", "{", "result", "=", "result", ".", "substring",...
Convert a method name into a property name. @param method target method @return property name
[ "Convert", "a", "method", "name", "into", "a", "property", "name", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ObjectPropertiesController.java#L219-L227
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXJDateFormat.java
MPXJDateFormat.setLocale
public void setLocale(Locale locale) { List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>(); for (SimpleDateFormat format : m_formats) { formats.add(new SimpleDateFormat(format.toPattern(), locale)); } m_formats = formats.toArray(new SimpleDateFormat[formats.size...
java
public void setLocale(Locale locale) { List<SimpleDateFormat> formats = new ArrayList<SimpleDateFormat>(); for (SimpleDateFormat format : m_formats) { formats.add(new SimpleDateFormat(format.toPattern(), locale)); } m_formats = formats.toArray(new SimpleDateFormat[formats.size...
[ "public", "void", "setLocale", "(", "Locale", "locale", ")", "{", "List", "<", "SimpleDateFormat", ">", "formats", "=", "new", "ArrayList", "<", "SimpleDateFormat", ">", "(", ")", ";", "for", "(", "SimpleDateFormat", "format", ":", "m_formats", ")", "{", "...
This method is called when the locale of the parent file is updated. It resets the locale specific date attributes to the default values for the new locale. @param locale new locale
[ "This", "method", "is", "called", "when", "the", "locale", "of", "the", "parent", "file", "is", "updated", ".", "It", "resets", "the", "locale", "specific", "date", "attributes", "to", "the", "default", "values", "for", "the", "new", "locale", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXJDateFormat.java#L63-L72
train
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/p3/DatabaseReader.java
DatabaseReader.process
public Map<String, Table> process(File directory, String prefix) throws IOException { String filePrefix = prefix.toUpperCase(); Map<String, Table> tables = new HashMap<String, Table>(); File[] files = directory.listFiles(); if (files != null) { for (File file : files) ...
java
public Map<String, Table> process(File directory, String prefix) throws IOException { String filePrefix = prefix.toUpperCase(); Map<String, Table> tables = new HashMap<String, Table>(); File[] files = directory.listFiles(); if (files != null) { for (File file : files) ...
[ "public", "Map", "<", "String", ",", "Table", ">", "process", "(", "File", "directory", ",", "String", "prefix", ")", "throws", "IOException", "{", "String", "filePrefix", "=", "prefix", ".", "toUpperCase", "(", ")", ";", "Map", "<", "String", ",", "Tabl...
Main entry point. Reads a directory containing a P3 Btrieve database files and returns a map of table names and table content. @param directory directory containing the database @param prefix file name prefix used to identify files from the same database @return Map of table names to table data
[ "Main", "entry", "point", ".", "Reads", "a", "directory", "containing", "a", "P3", "Btrieve", "database", "files", "and", "returns", "a", "map", "of", "table", "names", "and", "table", "content", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/p3/DatabaseReader.java#L55-L84
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroLogger.java
SynchroLogger.openLogFile
public static void openLogFile() throws IOException { if (LOG_FILE != null) { System.out.println("SynchroLogger Configured"); LOG = new PrintWriter(new FileWriter(LOG_FILE)); } }
java
public static void openLogFile() throws IOException { if (LOG_FILE != null) { System.out.println("SynchroLogger Configured"); LOG = new PrintWriter(new FileWriter(LOG_FILE)); } }
[ "public", "static", "void", "openLogFile", "(", ")", "throws", "IOException", "{", "if", "(", "LOG_FILE", "!=", "null", ")", "{", "System", ".", "out", ".", "println", "(", "\"SynchroLogger Configured\"", ")", ";", "LOG", "=", "new", "PrintWriter", "(", "n...
Open the log file for writing.
[ "Open", "the", "log", "file", "for", "writing", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L60-L67
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroLogger.java
SynchroLogger.log
public static void log(String label, byte[] data) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(ByteArrayHelper.hexdump(data, true)); LOG.flush(); } }
java
public static void log(String label, byte[] data) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(ByteArrayHelper.hexdump(data, true)); LOG.flush(); } }
[ "public", "static", "void", "log", "(", "String", "label", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "LOG", "!=", "null", ")", "{", "LOG", ".", "write", "(", "label", ")", ";", "LOG", ".", "write", "(", "\": \"", ")", ";", "LOG", ".",...
Log a byte array. @param label label text @param data byte array
[ "Log", "a", "byte", "array", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L87-L96
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroLogger.java
SynchroLogger.log
public static void log(String label, String data) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(data); LOG.flush(); } }
java
public static void log(String label, String data) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(data); LOG.flush(); } }
[ "public", "static", "void", "log", "(", "String", "label", ",", "String", "data", ")", "{", "if", "(", "LOG", "!=", "null", ")", "{", "LOG", ".", "write", "(", "label", ")", ";", "LOG", ".", "write", "(", "\": \"", ")", ";", "LOG", ".", "println"...
Log a string. @param label label text @param data string data
[ "Log", "a", "string", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L104-L113
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroLogger.java
SynchroLogger.log
public static void log(byte[] data) { if (LOG != null) { LOG.println(ByteArrayHelper.hexdump(data, true, 16, "")); LOG.flush(); } }
java
public static void log(byte[] data) { if (LOG != null) { LOG.println(ByteArrayHelper.hexdump(data, true, 16, "")); LOG.flush(); } }
[ "public", "static", "void", "log", "(", "byte", "[", "]", "data", ")", "{", "if", "(", "LOG", "!=", "null", ")", "{", "LOG", ".", "println", "(", "ByteArrayHelper", ".", "hexdump", "(", "data", ",", "true", ",", "16", ",", "\"\"", ")", ")", ";", ...
Log a byte array as a hex dump. @param data byte array
[ "Log", "a", "byte", "array", "as", "a", "hex", "dump", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L137-L144
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroLogger.java
SynchroLogger.log
public static void log(String label, Class<?> klass, Map<String, Object> map) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(klass.getSimpleName()); for (Map.Entry<String, Object> entry : map.entrySet()) { LOG.println(entry.ge...
java
public static void log(String label, Class<?> klass, Map<String, Object> map) { if (LOG != null) { LOG.write(label); LOG.write(": "); LOG.println(klass.getSimpleName()); for (Map.Entry<String, Object> entry : map.entrySet()) { LOG.println(entry.ge...
[ "public", "static", "void", "log", "(", "String", "label", ",", "Class", "<", "?", ">", "klass", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "if", "(", "LOG", "!=", "null", ")", "{", "LOG", ".", "write", "(", "label", ")", "...
Log table contents. @param label label text @param klass reader class name @param map table data
[ "Log", "table", "contents", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroLogger.java#L153-L168
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MppBitFlag.java
MppBitFlag.setValue
public void setValue(FieldContainer container, byte[] data) { if (data != null) { container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue); } }
java
public void setValue(FieldContainer container, byte[] data) { if (data != null) { container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue); } }
[ "public", "void", "setValue", "(", "FieldContainer", "container", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "data", "!=", "null", ")", "{", "container", ".", "set", "(", "m_type", ",", "(", "(", "MPPUtility", ".", "getInt", "(", "data", ","...
Extracts the value of this bit flag from the supplied byte array and sets the value in the supplied container. @param container container @param data byte array
[ "Extracts", "the", "value", "of", "this", "bit", "flag", "from", "the", "supplied", "byte", "array", "and", "sets", "the", "value", "in", "the", "supplied", "container", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MppBitFlag.java#L37-L43
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/AbstractColumn.java
AbstractColumn.setFieldType
private void setFieldType(FastTrackTableType tableType) { switch (tableType) { case ACTBARS: { m_type = ActBarField.getInstance(m_header.getColumnType()); break; } case ACTIVITIES: { m_type = ActivityField.getInstance(m_head...
java
private void setFieldType(FastTrackTableType tableType) { switch (tableType) { case ACTBARS: { m_type = ActBarField.getInstance(m_header.getColumnType()); break; } case ACTIVITIES: { m_type = ActivityField.getInstance(m_head...
[ "private", "void", "setFieldType", "(", "FastTrackTableType", "tableType", ")", "{", "switch", "(", "tableType", ")", "{", "case", "ACTBARS", ":", "{", "m_type", "=", "ActBarField", ".", "getInstance", "(", "m_header", ".", "getColumnType", "(", ")", ")", ";...
Set the enum representing the type of this column. @param tableType type of table to which this column belongs
[ "Set", "the", "enum", "representing", "the", "type", "of", "this", "column", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/AbstractColumn.java#L107-L127
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.process
public void process(File file) throws Exception { openLogFile(); int blockIndex = 0; int length = (int) file.length(); m_buffer = new byte[length]; FileInputStream is = new FileInputStream(file); try { int bytesRead = is.read(m_buffer); if (bytesRead != le...
java
public void process(File file) throws Exception { openLogFile(); int blockIndex = 0; int length = (int) file.length(); m_buffer = new byte[length]; FileInputStream is = new FileInputStream(file); try { int bytesRead = is.read(m_buffer); if (bytesRead != le...
[ "public", "void", "process", "(", "File", "file", ")", "throws", "Exception", "{", "openLogFile", "(", ")", ";", "int", "blockIndex", "=", "0", ";", "int", "length", "=", "(", "int", ")", "file", ".", "length", "(", ")", ";", "m_buffer", "=", "new", ...
Read a FastTrack file. @param file FastTrack file
[ "Read", "a", "FastTrack", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L52-L95
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.getTable
public FastTrackTable getTable(FastTrackTableType type) { FastTrackTable result = m_tables.get(type); if (result == null) { result = EMPTY_TABLE; } return result; }
java
public FastTrackTable getTable(FastTrackTableType type) { FastTrackTable result = m_tables.get(type); if (result == null) { result = EMPTY_TABLE; } return result; }
[ "public", "FastTrackTable", "getTable", "(", "FastTrackTableType", "type", ")", "{", "FastTrackTable", "result", "=", "m_tables", ".", "get", "(", "type", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "EMPTY_TABLE", ";", "}", "retur...
Retrieve a table of data. @param type table type @return FastTrackTable instance
[ "Retrieve", "a", "table", "of", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L103-L111
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.readBlock
private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception { logBlock(blockIndex, startIndex, blockLength); if (blockLength < 128) { readTableBlock(startIndex, blockLength); } else { readColumnBlock(startIndex, blockLength); }...
java
private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception { logBlock(blockIndex, startIndex, blockLength); if (blockLength < 128) { readTableBlock(startIndex, blockLength); } else { readColumnBlock(startIndex, blockLength); }...
[ "private", "void", "readBlock", "(", "int", "blockIndex", ",", "int", "startIndex", ",", "int", "blockLength", ")", "throws", "Exception", "{", "logBlock", "(", "blockIndex", ",", "startIndex", ",", "blockLength", ")", ";", "if", "(", "blockLength", "<", "12...
Read a block of data from the FastTrack file and determine if it contains a table definition, or columns. @param blockIndex index of the current block @param startIndex start index of the block in the file @param blockLength block length
[ "Read", "a", "block", "of", "data", "from", "the", "FastTrack", "file", "and", "determine", "if", "it", "contains", "a", "table", "definition", "or", "columns", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L141-L153
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.readTableBlock
private void readTableBlock(int startIndex, int blockLength) { for (int index = startIndex; index < (startIndex + blockLength - 11); index++) { if (matchPattern(TABLE_BLOCK_PATTERNS, index)) { int offset = index + 7; int nameLength = FastTrackUtility.getInt(m_buf...
java
private void readTableBlock(int startIndex, int blockLength) { for (int index = startIndex; index < (startIndex + blockLength - 11); index++) { if (matchPattern(TABLE_BLOCK_PATTERNS, index)) { int offset = index + 7; int nameLength = FastTrackUtility.getInt(m_buf...
[ "private", "void", "readTableBlock", "(", "int", "startIndex", ",", "int", "blockLength", ")", "{", "for", "(", "int", "index", "=", "startIndex", ";", "index", "<", "(", "startIndex", "+", "blockLength", "-", "11", ")", ";", "index", "++", ")", "{", "...
Read the name of a table and prepare to populate it with column data. @param startIndex start of the block @param blockLength length of the block
[ "Read", "the", "name", "of", "a", "table", "and", "prepare", "to", "populate", "it", "with", "column", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L161-L185
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.readColumnBlock
private void readColumnBlock(int startIndex, int blockLength) throws Exception { int endIndex = startIndex + blockLength; List<Integer> blocks = new ArrayList<Integer>(); for (int index = startIndex; index < endIndex - 11; index++) { if (matchChildBlock(index)) { ...
java
private void readColumnBlock(int startIndex, int blockLength) throws Exception { int endIndex = startIndex + blockLength; List<Integer> blocks = new ArrayList<Integer>(); for (int index = startIndex; index < endIndex - 11; index++) { if (matchChildBlock(index)) { ...
[ "private", "void", "readColumnBlock", "(", "int", "startIndex", ",", "int", "blockLength", ")", "throws", "Exception", "{", "int", "endIndex", "=", "startIndex", "+", "blockLength", ";", "List", "<", "Integer", ">", "blocks", "=", "new", "ArrayList", "<", "I...
Read multiple columns from a block. @param startIndex start of the block @param blockLength length of the block
[ "Read", "multiple", "columns", "from", "a", "block", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L193-L224
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.readColumn
private void readColumn(int startIndex, int length) throws Exception { if (m_currentTable != null) { int value = FastTrackUtility.getByte(m_buffer, startIndex); Class<?> klass = COLUMN_MAP[value]; if (klass == null) { klass = UnknownColumn.class; }...
java
private void readColumn(int startIndex, int length) throws Exception { if (m_currentTable != null) { int value = FastTrackUtility.getByte(m_buffer, startIndex); Class<?> klass = COLUMN_MAP[value]; if (klass == null) { klass = UnknownColumn.class; }...
[ "private", "void", "readColumn", "(", "int", "startIndex", ",", "int", "length", ")", "throws", "Exception", "{", "if", "(", "m_currentTable", "!=", "null", ")", "{", "int", "value", "=", "FastTrackUtility", ".", "getByte", "(", "m_buffer", ",", "startIndex"...
Read data for a single column. @param startIndex block start @param length block length
[ "Read", "data", "for", "a", "single", "column", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L232-L266
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.matchPattern
private final boolean matchPattern(byte[][] patterns, int bufferIndex) { boolean match = false; for (byte[] pattern : patterns) { int index = 0; match = true; for (byte b : pattern) { if (b != m_buffer[bufferIndex + index]) { ...
java
private final boolean matchPattern(byte[][] patterns, int bufferIndex) { boolean match = false; for (byte[] pattern : patterns) { int index = 0; match = true; for (byte b : pattern) { if (b != m_buffer[bufferIndex + index]) { ...
[ "private", "final", "boolean", "matchPattern", "(", "byte", "[", "]", "[", "]", "patterns", ",", "int", "bufferIndex", ")", "{", "boolean", "match", "=", "false", ";", "for", "(", "byte", "[", "]", "pattern", ":", "patterns", ")", "{", "int", "index", ...
Locate a feature in the file by match a byte pattern. @param patterns patterns to match @param bufferIndex start index @return true if the bytes at the position match a pattern
[ "Locate", "a", "feature", "in", "the", "file", "by", "match", "a", "byte", "pattern", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L275-L297
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.matchChildBlock
private final boolean matchChildBlock(int bufferIndex) { // // Match the pattern we see at the start of the child block // int index = 0; for (byte b : CHILD_BLOCK_PATTERN) { if (b != m_buffer[bufferIndex + index]) { return false; } ...
java
private final boolean matchChildBlock(int bufferIndex) { // // Match the pattern we see at the start of the child block // int index = 0; for (byte b : CHILD_BLOCK_PATTERN) { if (b != m_buffer[bufferIndex + index]) { return false; } ...
[ "private", "final", "boolean", "matchChildBlock", "(", "int", "bufferIndex", ")", "{", "//", "// Match the pattern we see at the start of the child block", "//", "int", "index", "=", "0", ";", "for", "(", "byte", "b", ":", "CHILD_BLOCK_PATTERN", ")", "{", "if", "(...
Locate a child block by byte pattern and validate by checking the length of the string we are expecting to follow the pattern. @param bufferIndex start index @return true if a child block starts at this point
[ "Locate", "a", "child", "block", "by", "byte", "pattern", "and", "validate", "by", "checking", "the", "length", "of", "the", "string", "we", "are", "expecting", "to", "follow", "the", "pattern", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L307-L338
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.updateDurationTimeUnit
private void updateDurationTimeUnit(FastTrackColumn column) { if (m_durationTimeUnit == null && isDurationColumn(column)) { int value = ((DurationColumn) column).getTimeUnitValue(); if (value != 1) { m_durationTimeUnit = FastTrackUtility.getTimeUnit(value); ...
java
private void updateDurationTimeUnit(FastTrackColumn column) { if (m_durationTimeUnit == null && isDurationColumn(column)) { int value = ((DurationColumn) column).getTimeUnitValue(); if (value != 1) { m_durationTimeUnit = FastTrackUtility.getTimeUnit(value); ...
[ "private", "void", "updateDurationTimeUnit", "(", "FastTrackColumn", "column", ")", "{", "if", "(", "m_durationTimeUnit", "==", "null", "&&", "isDurationColumn", "(", "column", ")", ")", "{", "int", "value", "=", "(", "(", "DurationColumn", ")", "column", ")",...
Update the default time unit for durations based on data read from the file. @param column column data
[ "Update", "the", "default", "time", "unit", "for", "durations", "based", "on", "data", "read", "from", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L345-L355
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.updateWorkTimeUnit
private void updateWorkTimeUnit(FastTrackColumn column) { if (m_workTimeUnit == null && isWorkColumn(column)) { int value = ((DurationColumn) column).getTimeUnitValue(); if (value != 1) { m_workTimeUnit = FastTrackUtility.getTimeUnit(value); } } }
java
private void updateWorkTimeUnit(FastTrackColumn column) { if (m_workTimeUnit == null && isWorkColumn(column)) { int value = ((DurationColumn) column).getTimeUnitValue(); if (value != 1) { m_workTimeUnit = FastTrackUtility.getTimeUnit(value); } } }
[ "private", "void", "updateWorkTimeUnit", "(", "FastTrackColumn", "column", ")", "{", "if", "(", "m_workTimeUnit", "==", "null", "&&", "isWorkColumn", "(", "column", ")", ")", "{", "int", "value", "=", "(", "(", "DurationColumn", ")", "column", ")", ".", "g...
Update the default time unit for work based on data read from the file. @param column column data
[ "Update", "the", "default", "time", "unit", "for", "work", "based", "on", "data", "read", "from", "the", "file", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L362-L372
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.logBlock
private void logBlock(int blockIndex, int startIndex, int blockLength) { if (m_log != null) { m_log.println("Block Index: " + blockIndex); m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")"); m_log.println(); m_log.println(FastTrackU...
java
private void logBlock(int blockIndex, int startIndex, int blockLength) { if (m_log != null) { m_log.println("Block Index: " + blockIndex); m_log.println("Length: " + blockLength + " (" + Integer.toHexString(blockLength) + ")"); m_log.println(); m_log.println(FastTrackU...
[ "private", "void", "logBlock", "(", "int", "blockIndex", ",", "int", "startIndex", ",", "int", "blockLength", ")", "{", "if", "(", "m_log", "!=", "null", ")", "{", "m_log", ".", "println", "(", "\"Block Index: \"", "+", "blockIndex", ")", ";", "m_log", "...
Log block data. @param blockIndex current block index @param startIndex start index @param blockLength length
[ "Log", "block", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L436-L446
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.logColumnData
private void logColumnData(int startIndex, int length) { if (m_log != null) { m_log.println(); m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, length, true, 16, "")); m_log.println(); m_log.flush(); } }
java
private void logColumnData(int startIndex, int length) { if (m_log != null) { m_log.println(); m_log.println(FastTrackUtility.hexdump(m_buffer, startIndex, length, true, 16, "")); m_log.println(); m_log.flush(); } }
[ "private", "void", "logColumnData", "(", "int", "startIndex", ",", "int", "length", ")", "{", "if", "(", "m_log", "!=", "null", ")", "{", "m_log", ".", "println", "(", ")", ";", "m_log", ".", "println", "(", "FastTrackUtility", ".", "hexdump", "(", "m_...
Log the data for a single column. @param startIndex offset into buffer @param length length
[ "Log", "the", "data", "for", "a", "single", "column", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L454-L463
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.logUnexpectedStructure
private void logUnexpectedStructure() { if (m_log != null) { m_log.println("ABORTED COLUMN - unexpected structure: " + m_currentColumn.getClass().getSimpleName() + " " + m_currentColumn.getName()); } }
java
private void logUnexpectedStructure() { if (m_log != null) { m_log.println("ABORTED COLUMN - unexpected structure: " + m_currentColumn.getClass().getSimpleName() + " " + m_currentColumn.getName()); } }
[ "private", "void", "logUnexpectedStructure", "(", ")", "{", "if", "(", "m_log", "!=", "null", ")", "{", "m_log", ".", "println", "(", "\"ABORTED COLUMN - unexpected structure: \"", "+", "m_currentColumn", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")"...
Log unexpected column structure.
[ "Log", "unexpected", "column", "structure", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L468-L474
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.logColumn
private void logColumn(FastTrackColumn column) { if (m_log != null) { m_log.println("TABLE: " + m_currentTable.getType()); m_log.println(column.toString()); m_log.flush(); } }
java
private void logColumn(FastTrackColumn column) { if (m_log != null) { m_log.println("TABLE: " + m_currentTable.getType()); m_log.println(column.toString()); m_log.flush(); } }
[ "private", "void", "logColumn", "(", "FastTrackColumn", "column", ")", "{", "if", "(", "m_log", "!=", "null", ")", "{", "m_log", ".", "println", "(", "\"TABLE: \"", "+", "m_currentTable", ".", "getType", "(", ")", ")", ";", "m_log", ".", "println", "(", ...
Log column data. @param column column data
[ "Log", "column", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L481-L489
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateCurrencySettings
private void populateCurrencySettings(Record record, ProjectProperties properties) { properties.setCurrencySymbol(record.getString(0)); properties.setSymbolPosition(record.getCurrencySymbolPosition(1)); properties.setCurrencyDigits(record.getInteger(2)); Character c = record.getCharacter(3);...
java
private void populateCurrencySettings(Record record, ProjectProperties properties) { properties.setCurrencySymbol(record.getString(0)); properties.setSymbolPosition(record.getCurrencySymbolPosition(1)); properties.setCurrencyDigits(record.getInteger(2)); Character c = record.getCharacter(3);...
[ "private", "void", "populateCurrencySettings", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "{", "properties", ".", "setCurrencySymbol", "(", "record", ".", "getString", "(", "0", ")", ")", ";", "properties", ".", "setSymbolPosition", "(",...
Populates currency settings. @param record MPX record @param properties project properties
[ "Populates", "currency", "settings", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L483-L500
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateDefaultSettings
private void populateDefaultSettings(Record record, ProjectProperties properties) throws MPXJException { properties.setDefaultDurationUnits(record.getTimeUnit(0)); properties.setDefaultDurationIsFixed(record.getNumericBoolean(1)); properties.setDefaultWorkUnits(record.getTimeUnit(2)); propert...
java
private void populateDefaultSettings(Record record, ProjectProperties properties) throws MPXJException { properties.setDefaultDurationUnits(record.getTimeUnit(0)); properties.setDefaultDurationIsFixed(record.getNumericBoolean(1)); properties.setDefaultWorkUnits(record.getTimeUnit(2)); propert...
[ "private", "void", "populateDefaultSettings", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "throws", "MPXJException", "{", "properties", ".", "setDefaultDurationUnits", "(", "record", ".", "getTimeUnit", "(", "0", ")", ")", ";", "properties"...
Populates default settings. @param record MPX record @param properties project properties @throws MPXJException
[ "Populates", "default", "settings", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L509-L520
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateDateTimeSettings
private void populateDateTimeSettings(Record record, ProjectProperties properties) { properties.setDateOrder(record.getDateOrder(0)); properties.setTimeFormat(record.getTimeFormat(1)); Date time = getTimeFromInteger(record.getInteger(2)); if (time != null) { properties.setDefa...
java
private void populateDateTimeSettings(Record record, ProjectProperties properties) { properties.setDateOrder(record.getDateOrder(0)); properties.setTimeFormat(record.getTimeFormat(1)); Date time = getTimeFromInteger(record.getInteger(2)); if (time != null) { properties.setDefa...
[ "private", "void", "populateDateTimeSettings", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "{", "properties", ".", "setDateOrder", "(", "record", ".", "getDateOrder", "(", "0", ")", ")", ";", "properties", ".", "setTimeFormat", "(", "re...
Populates date time settings. @param record MPX record @param properties project properties
[ "Populates", "date", "time", "settings", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L528-L555
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.getTimeFromInteger
private Date getTimeFromInteger(Integer time) { Date result = null; if (time != null) { int minutes = time.intValue(); int hours = minutes / 60; minutes -= (hours * 60); Calendar cal = DateHelper.popCalendar(); cal.set(Calendar.MILLISECOND, 0); ...
java
private Date getTimeFromInteger(Integer time) { Date result = null; if (time != null) { int minutes = time.intValue(); int hours = minutes / 60; minutes -= (hours * 60); Calendar cal = DateHelper.popCalendar(); cal.set(Calendar.MILLISECOND, 0); ...
[ "private", "Date", "getTimeFromInteger", "(", "Integer", "time", ")", "{", "Date", "result", "=", "null", ";", "if", "(", "time", "!=", "null", ")", "{", "int", "minutes", "=", "time", ".", "intValue", "(", ")", ";", "int", "hours", "=", "minutes", "...
Converts a time represented as an integer to a Date instance. @param time integer time @return Date instance
[ "Converts", "a", "time", "represented", "as", "an", "integer", "to", "a", "Date", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L563-L583
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateProjectHeader
private void populateProjectHeader(Record record, ProjectProperties properties) throws MPXJException { properties.setProjectTitle(record.getString(0)); properties.setCompany(record.getString(1)); properties.setManager(record.getString(2)); properties.setDefaultCalendarName(record.getString(3)...
java
private void populateProjectHeader(Record record, ProjectProperties properties) throws MPXJException { properties.setProjectTitle(record.getString(0)); properties.setCompany(record.getString(1)); properties.setManager(record.getString(2)); properties.setDefaultCalendarName(record.getString(3)...
[ "private", "void", "populateProjectHeader", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "throws", "MPXJException", "{", "properties", ".", "setProjectTitle", "(", "record", ".", "getString", "(", "0", ")", ")", ";", "properties", ".", "...
Populates the project header. @param record MPX record @param properties project properties @throws MPXJException
[ "Populates", "the", "project", "header", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L592-L623
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateCalendarHours
private void populateCalendarHours(Record record, ProjectCalendarHours hours) throws MPXJException { hours.setDay(Day.getInstance(NumberHelper.getInt(record.getInteger(0)))); addDateRange(hours, record.getTime(1), record.getTime(2)); addDateRange(hours, record.getTime(3), record.getTime(4)); ...
java
private void populateCalendarHours(Record record, ProjectCalendarHours hours) throws MPXJException { hours.setDay(Day.getInstance(NumberHelper.getInt(record.getInteger(0)))); addDateRange(hours, record.getTime(1), record.getTime(2)); addDateRange(hours, record.getTime(3), record.getTime(4)); ...
[ "private", "void", "populateCalendarHours", "(", "Record", "record", ",", "ProjectCalendarHours", "hours", ")", "throws", "MPXJException", "{", "hours", ".", "setDay", "(", "Day", ".", "getInstance", "(", "NumberHelper", ".", "getInt", "(", "record", ".", "getIn...
Populates a calendar hours instance. @param record MPX record @param hours calendar hours instance @throws MPXJException
[ "Populates", "a", "calendar", "hours", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L632-L638
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.addDateRange
private void addDateRange(ProjectCalendarHours hours, Date start, Date end) { if (start != null && end != null) { Calendar cal = DateHelper.popCalendar(end); // If the time ends on midnight, the date should be the next day. Otherwise problems occur. if (cal.get(Calendar.HOUR_OF...
java
private void addDateRange(ProjectCalendarHours hours, Date start, Date end) { if (start != null && end != null) { Calendar cal = DateHelper.popCalendar(end); // If the time ends on midnight, the date should be the next day. Otherwise problems occur. if (cal.get(Calendar.HOUR_OF...
[ "private", "void", "addDateRange", "(", "ProjectCalendarHours", "hours", ",", "Date", "start", ",", "Date", "end", ")", "{", "if", "(", "start", "!=", "null", "&&", "end", "!=", "null", ")", "{", "Calendar", "cal", "=", "DateHelper", ".", "popCalendar", ...
Get a date range that correctly handles the case where the end time is midnight. In this instance the end time should be the start of the next day. @param hours calendar hours @param start start date @param end end date
[ "Get", "a", "date", "range", "that", "correctly", "handles", "the", "case", "where", "the", "end", "time", "is", "midnight", ".", "In", "this", "instance", "the", "end", "time", "should", "be", "the", "start", "of", "the", "next", "day", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L649-L664
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateCalendarException
private void populateCalendarException(Record record, ProjectCalendar calendar) throws MPXJException { Date fromDate = record.getDate(0); Date toDate = record.getDate(1); boolean working = record.getNumericBoolean(2); // I have found an example MPX file where a single day exception is expres...
java
private void populateCalendarException(Record record, ProjectCalendar calendar) throws MPXJException { Date fromDate = record.getDate(0); Date toDate = record.getDate(1); boolean working = record.getNumericBoolean(2); // I have found an example MPX file where a single day exception is expres...
[ "private", "void", "populateCalendarException", "(", "Record", "record", ",", "ProjectCalendar", "calendar", ")", "throws", "MPXJException", "{", "Date", "fromDate", "=", "record", ".", "getDate", "(", "0", ")", ";", "Date", "toDate", "=", "record", ".", "getD...
Populates a calendar exception instance. @param record MPX record @param calendar calendar to which the exception will be added @throws MPXJException
[ "Populates", "a", "calendar", "exception", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L673-L693
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.addExceptionRange
private void addExceptionRange(ProjectCalendarException exception, Date start, Date finish) { if (start != null && finish != null) { exception.addRange(new DateRange(start, finish)); } }
java
private void addExceptionRange(ProjectCalendarException exception, Date start, Date finish) { if (start != null && finish != null) { exception.addRange(new DateRange(start, finish)); } }
[ "private", "void", "addExceptionRange", "(", "ProjectCalendarException", "exception", ",", "Date", "start", ",", "Date", "finish", ")", "{", "if", "(", "start", "!=", "null", "&&", "finish", "!=", "null", ")", "{", "exception", ".", "addRange", "(", "new", ...
Add a range to an exception, ensure that we don't try to add null ranges. @param exception target exception @param start exception start @param finish exception finish
[ "Add", "a", "range", "to", "an", "exception", "ensure", "that", "we", "don", "t", "try", "to", "add", "null", "ranges", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L702-L708
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateCalendar
private void populateCalendar(Record record, ProjectCalendar calendar, boolean isBaseCalendar) { if (isBaseCalendar == true) { calendar.setName(record.getString(0)); } else { calendar.setParent(m_projectFile.getCalendarByName(record.getString(0))); } calen...
java
private void populateCalendar(Record record, ProjectCalendar calendar, boolean isBaseCalendar) { if (isBaseCalendar == true) { calendar.setName(record.getString(0)); } else { calendar.setParent(m_projectFile.getCalendarByName(record.getString(0))); } calen...
[ "private", "void", "populateCalendar", "(", "Record", "record", ",", "ProjectCalendar", "calendar", ",", "boolean", "isBaseCalendar", ")", "{", "if", "(", "isBaseCalendar", "==", "true", ")", "{", "calendar", ".", "setName", "(", "record", ".", "getString", "(...
Populates a calendar instance. @param record MPX record @param calendar calendar instance @param isBaseCalendar true if this is a base calendar
[ "Populates", "a", "calendar", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L717-L737
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateResource
private void populateResource(Resource resource, Record record) throws MPXJException { String falseText = LocaleData.getString(m_locale, LocaleData.NO); int length = record.getLength(); int[] model = m_resourceModel.getModel(); for (int i = 0; i < length; i++) { int mpxFieldT...
java
private void populateResource(Resource resource, Record record) throws MPXJException { String falseText = LocaleData.getString(m_locale, LocaleData.NO); int length = record.getLength(); int[] model = m_resourceModel.getModel(); for (int i = 0; i < length; i++) { int mpxFieldT...
[ "private", "void", "populateResource", "(", "Resource", "resource", ",", "Record", "record", ")", "throws", "MPXJException", "{", "String", "falseText", "=", "LocaleData", ".", "getString", "(", "m_locale", ",", "LocaleData", ".", "NO", ")", ";", "int", "lengt...
Populates a resource. @param resource resource instance @param record MPX record @throws MPXJException
[ "Populates", "a", "resource", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L746-L869
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateRelationList
private void populateRelationList(Task task, TaskField field, String data) { DeferredRelationship dr = new DeferredRelationship(); dr.setTask(task); dr.setField(field); dr.setData(data); m_deferredRelationships.add(dr); }
java
private void populateRelationList(Task task, TaskField field, String data) { DeferredRelationship dr = new DeferredRelationship(); dr.setTask(task); dr.setField(field); dr.setData(data); m_deferredRelationships.add(dr); }
[ "private", "void", "populateRelationList", "(", "Task", "task", ",", "TaskField", "field", ",", "String", "data", ")", "{", "DeferredRelationship", "dr", "=", "new", "DeferredRelationship", "(", ")", ";", "dr", ".", "setTask", "(", "task", ")", ";", "dr", ...
Populates a relation list. @param task parent task @param field target task field @param data MPX relation list data
[ "Populates", "a", "relation", "list", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L878-L885
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.processDeferredRelationship
private void processDeferredRelationship(DeferredRelationship dr) throws MPXJException { String data = dr.getData(); Task task = dr.getTask(); int length = data.length(); if (length != 0) { int start = 0; int end = 0; while (end != length) { ...
java
private void processDeferredRelationship(DeferredRelationship dr) throws MPXJException { String data = dr.getData(); Task task = dr.getTask(); int length = data.length(); if (length != 0) { int start = 0; int end = 0; while (end != length) { ...
[ "private", "void", "processDeferredRelationship", "(", "DeferredRelationship", "dr", ")", "throws", "MPXJException", "{", "String", "data", "=", "dr", ".", "getData", "(", ")", ";", "Task", "task", "=", "dr", ".", "getTask", "(", ")", ";", "int", "length", ...
This method processes a single deferred relationship list. @param dr deferred relationship list data @throws MPXJException
[ "This", "method", "processes", "a", "single", "deferred", "relationship", "list", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L907-L933
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateRelation
private void populateRelation(TaskField field, Task sourceTask, String relationship) throws MPXJException { int index = 0; int length = relationship.length(); // // Extract the identifier // while ((index < length) && (Character.isDigit(relationship.charAt(index)) == true)) ...
java
private void populateRelation(TaskField field, Task sourceTask, String relationship) throws MPXJException { int index = 0; int length = relationship.length(); // // Extract the identifier // while ((index < length) && (Character.isDigit(relationship.charAt(index)) == true)) ...
[ "private", "void", "populateRelation", "(", "TaskField", "field", ",", "Task", "sourceTask", ",", "String", "relationship", ")", "throws", "MPXJException", "{", "int", "index", "=", "0", ";", "int", "length", "=", "relationship", ".", "length", "(", ")", ";"...
Creates and populates a new task relationship. @param field which task field source of data @param sourceTask relationship source task @param relationship relationship string @throws MPXJException
[ "Creates", "and", "populates", "a", "new", "task", "relationship", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L943-L1030
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateRecurringTask
private void populateRecurringTask(Record record, RecurringTask task) throws MPXJException { //System.out.println(record); task.setStartDate(record.getDateTime(1)); task.setFinishDate(record.getDateTime(2)); task.setDuration(RecurrenceUtility.getDuration(m_projectFile.getProjectProperties(), ...
java
private void populateRecurringTask(Record record, RecurringTask task) throws MPXJException { //System.out.println(record); task.setStartDate(record.getDateTime(1)); task.setFinishDate(record.getDateTime(2)); task.setDuration(RecurrenceUtility.getDuration(m_projectFile.getProjectProperties(), ...
[ "private", "void", "populateRecurringTask", "(", "Record", "record", ",", "RecurringTask", "task", ")", "throws", "MPXJException", "{", "//System.out.println(record);", "task", ".", "setStartDate", "(", "record", ".", "getDateTime", "(", "1", ")", ")", ";", "task"...
Populates a recurring task. @param record MPX record @param task recurring task @throws MPXJException
[ "Populates", "a", "recurring", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1329-L1394
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateResourceAssignment
private void populateResourceAssignment(Record record, ResourceAssignment assignment) throws MPXJException { // // Handle malformed MPX files - ensure that we can locate the resource // using either the Unique ID attribute or the ID attribute. // Resource resource = m_projectFile.getRes...
java
private void populateResourceAssignment(Record record, ResourceAssignment assignment) throws MPXJException { // // Handle malformed MPX files - ensure that we can locate the resource // using either the Unique ID attribute or the ID attribute. // Resource resource = m_projectFile.getRes...
[ "private", "void", "populateResourceAssignment", "(", "Record", "record", ",", "ResourceAssignment", "assignment", ")", "throws", "MPXJException", "{", "//", "// Handle malformed MPX files - ensure that we can locate the resource", "// using either the Unique ID attribute or the ID att...
Populate a resource assignment. @param record MPX record @param assignment resource assignment @throws MPXJException
[ "Populate", "a", "resource", "assignment", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1403-L1449
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateResourceAssignmentWorkgroupFields
private void populateResourceAssignmentWorkgroupFields(Record record, ResourceAssignmentWorkgroupFields workgroup) throws MPXJException { workgroup.setMessageUniqueID(record.getString(0)); workgroup.setConfirmed(NumberHelper.getInt(record.getInteger(1)) == 1); workgroup.setResponsePending(NumberHel...
java
private void populateResourceAssignmentWorkgroupFields(Record record, ResourceAssignmentWorkgroupFields workgroup) throws MPXJException { workgroup.setMessageUniqueID(record.getString(0)); workgroup.setConfirmed(NumberHelper.getInt(record.getInteger(1)) == 1); workgroup.setResponsePending(NumberHel...
[ "private", "void", "populateResourceAssignmentWorkgroupFields", "(", "Record", "record", ",", "ResourceAssignmentWorkgroupFields", "workgroup", ")", "throws", "MPXJException", "{", "workgroup", ".", "setMessageUniqueID", "(", "record", ".", "getString", "(", "0", ")", "...
Populate a resource assignment workgroup instance. @param record MPX record @param workgroup workgroup instance @throws MPXJException
[ "Populate", "a", "resource", "assignment", "workgroup", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1458-L1466
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateFileCreationRecord
static void populateFileCreationRecord(Record record, ProjectProperties properties) { properties.setMpxProgramName(record.getString(0)); properties.setMpxFileVersion(FileVersion.getInstance(record.getString(1))); properties.setMpxCodePage(record.getCodePage(2)); }
java
static void populateFileCreationRecord(Record record, ProjectProperties properties) { properties.setMpxProgramName(record.getString(0)); properties.setMpxFileVersion(FileVersion.getInstance(record.getString(1))); properties.setMpxCodePage(record.getCodePage(2)); }
[ "static", "void", "populateFileCreationRecord", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "{", "properties", ".", "setMpxProgramName", "(", "record", ".", "getString", "(", "0", ")", ")", ";", "properties", ".", "setMpxFileVersion", "("...
Populate a file creation record. @param record MPX record @param properties project properties
[ "Populate", "a", "file", "creation", "record", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1474-L1479
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/RelationTypeUtility.java
RelationTypeUtility.getInstance
public static RelationType getInstance(Locale locale, String type) { int index = -1; String[] relationTypes = LocaleData.getStringArray(locale, LocaleData.RELATION_TYPES); for (int loop = 0; loop < relationTypes.length; loop++) { if (relationTypes[loop].equalsIgnoreCase(type) == tru...
java
public static RelationType getInstance(Locale locale, String type) { int index = -1; String[] relationTypes = LocaleData.getStringArray(locale, LocaleData.RELATION_TYPES); for (int loop = 0; loop < relationTypes.length; loop++) { if (relationTypes[loop].equalsIgnoreCase(type) == tru...
[ "public", "static", "RelationType", "getInstance", "(", "Locale", "locale", ",", "String", "type", ")", "{", "int", "index", "=", "-", "1", ";", "String", "[", "]", "relationTypes", "=", "LocaleData", ".", "getStringArray", "(", "locale", ",", "LocaleData", ...
This method takes the textual version of a relation type and returns an appropriate class instance. Note that unrecognised values will cause this method to return null. @param locale target locale @param type text version of the relation type @return RelationType instance
[ "This", "method", "takes", "the", "textual", "version", "of", "a", "relation", "type", "and", "returns", "an", "appropriate", "class", "instance", ".", "Note", "that", "unrecognised", "values", "will", "cause", "this", "method", "to", "return", "null", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/RelationTypeUtility.java#L53-L74
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java
DatatypeConverter.parseDuration
public static final Duration parseDuration(String value) { Duration result = null; if (value != null) { int split = value.indexOf(' '); if (split != -1) { double durationValue = Double.parseDouble(value.substring(0, split)); TimeUnit durationUnits ...
java
public static final Duration parseDuration(String value) { Duration result = null; if (value != null) { int split = value.indexOf(' '); if (split != -1) { double durationValue = Double.parseDouble(value.substring(0, split)); TimeUnit durationUnits ...
[ "public", "static", "final", "Duration", "parseDuration", "(", "String", "value", ")", "{", "Duration", "result", "=", "null", ";", "if", "(", "value", "!=", "null", ")", "{", "int", "split", "=", "value", ".", "indexOf", "(", "'", "'", ")", ";", "if...
Convert the Phoenix representation of a duration into a Duration instance. @param value Phoenix duration @return Duration instance
[ "Convert", "the", "Phoenix", "representation", "of", "a", "duration", "into", "a", "Duration", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java#L201-L217
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java
DatatypeConverter.printDuration
public static final String printDuration(Duration duration) { String result = null; if (duration != null) { result = duration.getDuration() + " " + printTimeUnits(duration.getUnits()); } return result; }
java
public static final String printDuration(Duration duration) { String result = null; if (duration != null) { result = duration.getDuration() + " " + printTimeUnits(duration.getUnits()); } return result; }
[ "public", "static", "final", "String", "printDuration", "(", "Duration", "duration", ")", "{", "String", "result", "=", "null", ";", "if", "(", "duration", "!=", "null", ")", "{", "result", "=", "duration", ".", "getDuration", "(", ")", "+", "\" \"", "+"...
Retrieve a duration in the form required by Phoenix. @param duration Duration instance @return formatted duration
[ "Retrieve", "a", "duration", "in", "the", "form", "required", "by", "Phoenix", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java#L225-L233
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java
DatatypeConverter.printFinishDateTime
public static final String printFinishDateTime(Date value) { if (value != null) { value = DateHelper.addDays(value, 1); } return (value == null ? null : DATE_FORMAT.get().format(value)); }
java
public static final String printFinishDateTime(Date value) { if (value != null) { value = DateHelper.addDays(value, 1); } return (value == null ? null : DATE_FORMAT.get().format(value)); }
[ "public", "static", "final", "String", "printFinishDateTime", "(", "Date", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "value", "=", "DateHelper", ".", "addDays", "(", "value", ",", "1", ")", ";", "}", "return", "(", "value", "==", ...
Retrieve a finish date time in the form required by Phoenix. @param value Date instance @return formatted date time
[ "Retrieve", "a", "finish", "date", "time", "in", "the", "form", "required", "by", "Phoenix", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java#L252-L259
train
joniles/mpxj
src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java
DatatypeConverter.parseFinishDateTime
public static final Date parseFinishDateTime(String value) { Date result = parseDateTime(value); if (result != null) { result = DateHelper.addDays(result, -1); } return result; }
java
public static final Date parseFinishDateTime(String value) { Date result = parseDateTime(value); if (result != null) { result = DateHelper.addDays(result, -1); } return result; }
[ "public", "static", "final", "Date", "parseFinishDateTime", "(", "String", "value", ")", "{", "Date", "result", "=", "parseDateTime", "(", "value", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "result", "=", "DateHelper", ".", "addDays", "(", "...
Convert the Phoenix representation of a finish date time into a Date instance. @param value Phoenix date time @return Date instance
[ "Convert", "the", "Phoenix", "representation", "of", "a", "finish", "date", "time", "into", "a", "Date", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/phoenix/DatatypeConverter.java#L267-L275
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/GanttChartView14.java
GanttChartView14.getFieldType
private FieldType getFieldType(byte[] data, int offset) { int fieldIndex = MPPUtility.getInt(data, offset); return FieldTypeHelper.mapTextFields(FieldTypeHelper.getInstance14(fieldIndex)); }
java
private FieldType getFieldType(byte[] data, int offset) { int fieldIndex = MPPUtility.getInt(data, offset); return FieldTypeHelper.mapTextFields(FieldTypeHelper.getInstance14(fieldIndex)); }
[ "private", "FieldType", "getFieldType", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "int", "fieldIndex", "=", "MPPUtility", ".", "getInt", "(", "data", ",", "offset", ")", ";", "return", "FieldTypeHelper", ".", "mapTextFields", "(", "Fie...
Retrieves a field type from a location in a data block. @param data data block @param offset offset into data block @return field type
[ "Retrieves", "a", "field", "type", "from", "a", "location", "in", "a", "data", "block", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/GanttChartView14.java#L127-L131
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.readFile
private ProjectFile readFile(File file) throws MPXJException { try { String url = "jdbc:sqlite:" + file.getAbsolutePath(); Properties props = new Properties(); m_connection = org.sqlite.JDBC.createConnection(url, props); m_documentBuilder = DocumentBuilderFactory.newI...
java
private ProjectFile readFile(File file) throws MPXJException { try { String url = "jdbc:sqlite:" + file.getAbsolutePath(); Properties props = new Properties(); m_connection = org.sqlite.JDBC.createConnection(url, props); m_documentBuilder = DocumentBuilderFactory.newI...
[ "private", "ProjectFile", "readFile", "(", "File", "file", ")", "throws", "MPXJException", "{", "try", "{", "String", "url", "=", "\"jdbc:sqlite:\"", "+", "file", ".", "getAbsolutePath", "(", ")", ";", "Properties", "props", "=", "new", "Properties", "(", ")...
By the time we reach this method, we should be looking at the SQLite database file itself. @param file SQLite database file @return ProjectFile instance
[ "By", "the", "time", "we", "reach", "this", "method", "we", "should", "be", "looking", "at", "the", "SQLite", "database", "file", "itself", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L160-L201
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.read
private ProjectFile read() throws Exception { m_project = new ProjectFile(); m_eventManager = m_project.getEventManager(); ProjectConfig config = m_project.getProjectConfig(); config.setAutoCalendarUniqueID(false); config.setAutoTaskUniqueID(false); config.setAutoResourceUniqueID...
java
private ProjectFile read() throws Exception { m_project = new ProjectFile(); m_eventManager = m_project.getEventManager(); ProjectConfig config = m_project.getProjectConfig(); config.setAutoCalendarUniqueID(false); config.setAutoTaskUniqueID(false); config.setAutoResourceUniqueID...
[ "private", "ProjectFile", "read", "(", ")", "throws", "Exception", "{", "m_project", "=", "new", "ProjectFile", "(", ")", ";", "m_eventManager", "=", "m_project", ".", "getEventManager", "(", ")", ";", "ProjectConfig", "config", "=", "m_project", ".", "getProj...
Read the project data and return a ProjectFile instance. @return ProjectFile instance
[ "Read", "the", "project", "data", "and", "return", "a", "ProjectFile", "instance", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L208-L232
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.populateEntityMap
private void populateEntityMap() throws SQLException { for (Row row : getRows("select * from z_primarykey")) { m_entityMap.put(row.getString("Z_NAME"), row.getInteger("Z_ENT")); } }
java
private void populateEntityMap() throws SQLException { for (Row row : getRows("select * from z_primarykey")) { m_entityMap.put(row.getString("Z_NAME"), row.getInteger("Z_ENT")); } }
[ "private", "void", "populateEntityMap", "(", ")", "throws", "SQLException", "{", "for", "(", "Row", "row", ":", "getRows", "(", "\"select * from z_primarykey\"", ")", ")", "{", "m_entityMap", ".", "put", "(", "row", ".", "getString", "(", "\"Z_NAME\"", ")", ...
Create a mapping from entity names to entity ID values.
[ "Create", "a", "mapping", "from", "entity", "names", "to", "entity", "ID", "values", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L237-L243
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processCalendars
private void processCalendars() throws Exception { List<Row> rows = getRows("select * from zcalendar where zproject=?", m_projectID); for (Row row : rows) { ProjectCalendar calendar = m_project.addCalendar(); calendar.setUniqueID(row.getInteger("Z_PK")); calendar.setName(...
java
private void processCalendars() throws Exception { List<Row> rows = getRows("select * from zcalendar where zproject=?", m_projectID); for (Row row : rows) { ProjectCalendar calendar = m_project.addCalendar(); calendar.setUniqueID(row.getInteger("Z_PK")); calendar.setName(...
[ "private", "void", "processCalendars", "(", ")", "throws", "Exception", "{", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from zcalendar where zproject=?\"", ",", "m_projectID", ")", ";", "for", "(", "Row", "row", ":", "rows", ")", "{", ...
Read calendar data.
[ "Read", "calendar", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L266-L278
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processDays
private void processDays(ProjectCalendar calendar) throws Exception { // Default all days to non-working for (Day day : Day.values()) { calendar.setWorkingDay(day, false); } List<Row> rows = getRows("select * from zcalendarrule where zcalendar1=? and z_ent=?", calendar.getUniq...
java
private void processDays(ProjectCalendar calendar) throws Exception { // Default all days to non-working for (Day day : Day.values()) { calendar.setWorkingDay(day, false); } List<Row> rows = getRows("select * from zcalendarrule where zcalendar1=? and z_ent=?", calendar.getUniq...
[ "private", "void", "processDays", "(", "ProjectCalendar", "calendar", ")", "throws", "Exception", "{", "// Default all days to non-working", "for", "(", "Day", "day", ":", "Day", ".", "values", "(", ")", ")", "{", "calendar", ".", "setWorkingDay", "(", "day", ...
Process normal calendar working and non-working days. @param calendar parent calendar
[ "Process", "normal", "calendar", "working", "and", "non", "-", "working", "days", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L285-L323
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processResources
private void processResources() throws SQLException { List<Row> rows = getRows("select * from zresource where zproject=? order by zorderinproject", m_projectID); for (Row row : rows) { Resource resource = m_project.addResource(); resource.setUniqueID(row.getInteger("Z_PK")); ...
java
private void processResources() throws SQLException { List<Row> rows = getRows("select * from zresource where zproject=? order by zorderinproject", m_projectID); for (Row row : rows) { Resource resource = m_project.addResource(); resource.setUniqueID(row.getInteger("Z_PK")); ...
[ "private", "void", "processResources", "(", ")", "throws", "SQLException", "{", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from zresource where zproject=? order by zorderinproject\"", ",", "m_projectID", ")", ";", "for", "(", "Row", "row", ":"...
Read resource data.
[ "Read", "resource", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L363-L395
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processTasks
private void processTasks() throws SQLException { // // Yes... we could probably read this in one query in the right order // using a CTE... but life's too short. // List<Row> rows = getRows("select * from zscheduleitem where zproject=? and zparentactivity_ is null and z_ent=? order by ...
java
private void processTasks() throws SQLException { // // Yes... we could probably read this in one query in the right order // using a CTE... but life's too short. // List<Row> rows = getRows("select * from zscheduleitem where zproject=? and zparentactivity_ is null and z_ent=? order by ...
[ "private", "void", "processTasks", "(", ")", "throws", "SQLException", "{", "//", "// Yes... we could probably read this in one query in the right order", "// using a CTE... but life's too short.", "//", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from z...
Read all top level tasks.
[ "Read", "all", "top", "level", "tasks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L400-L413
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processChildTasks
private void processChildTasks(Task parentTask) throws SQLException { List<Row> rows = getRows("select * from zscheduleitem where zparentactivity_=? and z_ent=? order by zorderinparentactivity", parentTask.getUniqueID(), m_entityMap.get("Activity")); for (Row row : rows) { Task task = pare...
java
private void processChildTasks(Task parentTask) throws SQLException { List<Row> rows = getRows("select * from zscheduleitem where zparentactivity_=? and z_ent=? order by zorderinparentactivity", parentTask.getUniqueID(), m_entityMap.get("Activity")); for (Row row : rows) { Task task = pare...
[ "private", "void", "processChildTasks", "(", "Task", "parentTask", ")", "throws", "SQLException", "{", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from zscheduleitem where zparentactivity_=? and z_ent=? order by zorderinparentactivity\"", ",", "parentTas...
Read all child tasks for a given parent. @param parentTask parent task
[ "Read", "all", "child", "tasks", "for", "a", "given", "parent", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L420-L429
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.populateTask
private void populateTask(Row row, Task task) { task.setUniqueID(row.getInteger("Z_PK")); task.setName(row.getString("ZTITLE")); task.setPriority(Priority.getInstance(row.getInt("ZPRIORITY"))); task.setMilestone(row.getBoolean("ZISMILESTONE")); task.setActualFinish(row.getTimestamp("ZGI...
java
private void populateTask(Row row, Task task) { task.setUniqueID(row.getInteger("Z_PK")); task.setName(row.getString("ZTITLE")); task.setPriority(Priority.getInstance(row.getInt("ZPRIORITY"))); task.setMilestone(row.getBoolean("ZISMILESTONE")); task.setActualFinish(row.getTimestamp("ZGI...
[ "private", "void", "populateTask", "(", "Row", "row", ",", "Task", "task", ")", "{", "task", ".", "setUniqueID", "(", "row", ".", "getInteger", "(", "\"Z_PK\"", ")", ")", ";", "task", ".", "setName", "(", "row", ".", "getString", "(", "\"ZTITLE\"", ")"...
Read data for an individual task. @param row task data from database @param task Task instance
[ "Read", "data", "for", "an", "individual", "task", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L437-L470
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.populateConstraints
private void populateConstraints(Row row, Task task) { Date endDateMax = row.getTimestamp("ZGIVENENDDATEMAX_"); Date endDateMin = row.getTimestamp("ZGIVENENDDATEMIN_"); Date startDateMax = row.getTimestamp("ZGIVENSTARTDATEMAX_"); Date startDateMin = row.getTimestamp("ZGIVENSTARTDATEMIN_"); ...
java
private void populateConstraints(Row row, Task task) { Date endDateMax = row.getTimestamp("ZGIVENENDDATEMAX_"); Date endDateMin = row.getTimestamp("ZGIVENENDDATEMIN_"); Date startDateMax = row.getTimestamp("ZGIVENSTARTDATEMAX_"); Date startDateMin = row.getTimestamp("ZGIVENSTARTDATEMIN_"); ...
[ "private", "void", "populateConstraints", "(", "Row", "row", ",", "Task", "task", ")", "{", "Date", "endDateMax", "=", "row", ".", "getTimestamp", "(", "\"ZGIVENENDDATEMAX_\"", ")", ";", "Date", "endDateMin", "=", "row", ".", "getTimestamp", "(", "\"ZGIVENENDD...
Populate the constraint type and constraint date. Note that Merlin allows both start and end constraints simultaneously. As we can't have both, we'll prefer the start constraint. @param row task data from database @param task Task instance
[ "Populate", "the", "constraint", "type", "and", "constraint", "date", ".", "Note", "that", "Merlin", "allows", "both", "start", "and", "end", "constraints", "simultaneously", ".", "As", "we", "can", "t", "have", "both", "we", "ll", "prefer", "the", "start", ...
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L480-L528
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processAssignments
private void processAssignments() throws SQLException { List<Row> rows = getRows("select * from zscheduleitem where zproject=? and z_ent=? order by zorderinactivity", m_projectID, m_entityMap.get("Assignment")); for (Row row : rows) { Task task = m_project.getTaskByUniqueID(row.getInteger(...
java
private void processAssignments() throws SQLException { List<Row> rows = getRows("select * from zscheduleitem where zproject=? and z_ent=? order by zorderinactivity", m_projectID, m_entityMap.get("Assignment")); for (Row row : rows) { Task task = m_project.getTaskByUniqueID(row.getInteger(...
[ "private", "void", "processAssignments", "(", ")", "throws", "SQLException", "{", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from zscheduleitem where zproject=? and z_ent=? order by zorderinactivity\"", ",", "m_projectID", ",", "m_entityMap", ".", "...
Read assignment data.
[ "Read", "assignment", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L533-L566
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.assignmentDuration
private Duration assignmentDuration(Task task, Duration work) { Duration result = work; if (result != null) { if (result.getUnits() == TimeUnit.PERCENT) { Duration taskWork = task.getWork(); if (taskWork != null) { result = Durat...
java
private Duration assignmentDuration(Task task, Duration work) { Duration result = work; if (result != null) { if (result.getUnits() == TimeUnit.PERCENT) { Duration taskWork = task.getWork(); if (taskWork != null) { result = Durat...
[ "private", "Duration", "assignmentDuration", "(", "Task", "task", ",", "Duration", "work", ")", "{", "Duration", "result", "=", "work", ";", "if", "(", "result", "!=", "null", ")", "{", "if", "(", "result", ".", "getUnits", "(", ")", "==", "TimeUnit", ...
Extract a duration amount from the assignment, converting a percentage into an actual duration. @param task parent task @param work duration from assignment @return Duration instance
[ "Extract", "a", "duration", "amount", "from", "the", "assignment", "converting", "a", "percentage", "into", "an", "actual", "duration", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L576-L592
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.processDependencies
private void processDependencies() throws SQLException { List<Row> rows = getRows("select * from zdependency where zproject=?", m_projectID); for (Row row : rows) { Task nextTask = m_project.getTaskByUniqueID(row.getInteger("ZNEXTACTIVITY_")); Task prevTask = m_project.getTaskByUn...
java
private void processDependencies() throws SQLException { List<Row> rows = getRows("select * from zdependency where zproject=?", m_projectID); for (Row row : rows) { Task nextTask = m_project.getTaskByUniqueID(row.getInteger("ZNEXTACTIVITY_")); Task prevTask = m_project.getTaskByUn...
[ "private", "void", "processDependencies", "(", ")", "throws", "SQLException", "{", "List", "<", "Row", ">", "rows", "=", "getRows", "(", "\"select * from zdependency where zproject=?\"", ",", "m_projectID", ")", ";", "for", "(", "Row", "row", ":", "rows", ")", ...
Read relation data.
[ "Read", "relation", "data", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L597-L609
train
joniles/mpxj
src/main/java/net/sf/mpxj/merlin/MerlinReader.java
MerlinReader.getNodeList
private NodeList getNodeList(String document, XPathExpression expression) throws Exception { Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document))); return (NodeList) expression.evaluate(doc, XPathConstants.NODESET); }
java
private NodeList getNodeList(String document, XPathExpression expression) throws Exception { Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document))); return (NodeList) expression.evaluate(doc, XPathConstants.NODESET); }
[ "private", "NodeList", "getNodeList", "(", "String", "document", ",", "XPathExpression", "expression", ")", "throws", "Exception", "{", "Document", "doc", "=", "m_documentBuilder", ".", "parse", "(", "new", "InputSource", "(", "new", "StringReader", "(", "document...
Retrieve a node list based on an XPath expression. @param document XML document to process @param expression compiled XPath expression @return node list
[ "Retrieve", "a", "node", "list", "based", "on", "an", "XPath", "expression", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/merlin/MerlinReader.java#L666-L670
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/FilterReader.java
FilterReader.process
public void process(ProjectProperties properties, FilterContainer filters, FixedData fixedData, Var2Data varData) { int filterCount = fixedData.getItemCount(); boolean[] criteriaType = new boolean[2]; CriteriaReader criteriaReader = getCriteriaReader(); for (int filterLoop = 0; filterLoop < ...
java
public void process(ProjectProperties properties, FilterContainer filters, FixedData fixedData, Var2Data varData) { int filterCount = fixedData.getItemCount(); boolean[] criteriaType = new boolean[2]; CriteriaReader criteriaReader = getCriteriaReader(); for (int filterLoop = 0; filterLoop < ...
[ "public", "void", "process", "(", "ProjectProperties", "properties", ",", "FilterContainer", "filters", ",", "FixedData", "fixedData", ",", "Var2Data", "varData", ")", "{", "int", "filterCount", "=", "fixedData", ".", "getItemCount", "(", ")", ";", "boolean", "[...
Entry point for processing filter definitions. @param properties project properties @param filters project filters @param fixedData filter fixed data @param varData filter var data
[ "Entry", "point", "for", "processing", "filter", "definitions", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FilterReader.java#L61-L97
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/TimeUnitUtility.java
TimeUnitUtility.getInstance
@SuppressWarnings("unchecked") public static TimeUnit getInstance(String units, Locale locale) throws MPXJException { Map<String, Integer> map = LocaleData.getMap(locale, LocaleData.TIME_UNITS_MAP); Integer result = map.get(units.toLowerCase()); if (result == null) { throw new MPXJEx...
java
@SuppressWarnings("unchecked") public static TimeUnit getInstance(String units, Locale locale) throws MPXJException { Map<String, Integer> map = LocaleData.getMap(locale, LocaleData.TIME_UNITS_MAP); Integer result = map.get(units.toLowerCase()); if (result == null) { throw new MPXJEx...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "TimeUnit", "getInstance", "(", "String", "units", ",", "Locale", "locale", ")", "throws", "MPXJException", "{", "Map", "<", "String", ",", "Integer", ">", "map", "=", "LocaleData", ".", ...
This method is used to parse a string representation of a time unit, and return the appropriate constant value. @param units string representation of a time unit @param locale target locale @return numeric constant @throws MPXJException normally thrown when parsing fails
[ "This", "method", "is", "used", "to", "parse", "a", "string", "representation", "of", "a", "time", "unit", "and", "return", "the", "appropriate", "constant", "value", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/TimeUnitUtility.java#L55-L64
train
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/BlockHeader.java
BlockHeader.read
public BlockHeader read(byte[] buffer, int offset, int postHeaderSkipBytes) { m_offset = offset; System.arraycopy(buffer, m_offset, m_header, 0, 8); m_offset += 8; int nameLength = FastTrackUtility.getInt(buffer, m_offset); m_offset += 4; if (nameLength < 1 || nameLength > 255)...
java
public BlockHeader read(byte[] buffer, int offset, int postHeaderSkipBytes) { m_offset = offset; System.arraycopy(buffer, m_offset, m_header, 0, 8); m_offset += 8; int nameLength = FastTrackUtility.getInt(buffer, m_offset); m_offset += 4; if (nameLength < 1 || nameLength > 255)...
[ "public", "BlockHeader", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "postHeaderSkipBytes", ")", "{", "m_offset", "=", "offset", ";", "System", ".", "arraycopy", "(", "buffer", ",", "m_offset", ",", "m_header", ",", "0", ",...
Reads the header data from a block. @param buffer block data @param offset current offset into block data @param postHeaderSkipBytes bytes to skip after reading the header @return current BlockHeader instance
[ "Reads", "the", "header", "data", "from", "a", "block", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/BlockHeader.java#L45-L74
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/ViewStateReader.java
ViewStateReader.process
public void process(ProjectFile file, Var2Data varData, byte[] fixedData) throws IOException { Props props = getProps(varData); //System.out.println(props); if (props != null) { String viewName = MPPUtility.removeAmpersands(props.getUnicodeString(VIEW_NAME)); byte[] listData...
java
public void process(ProjectFile file, Var2Data varData, byte[] fixedData) throws IOException { Props props = getProps(varData); //System.out.println(props); if (props != null) { String viewName = MPPUtility.removeAmpersands(props.getUnicodeString(VIEW_NAME)); byte[] listData...
[ "public", "void", "process", "(", "ProjectFile", "file", ",", "Var2Data", "varData", ",", "byte", "[", "]", "fixedData", ")", "throws", "IOException", "{", "Props", "props", "=", "getProps", "(", "varData", ")", ";", "//System.out.println(props);", "if", "(", ...
Entry point for processing saved view state. @param file project file @param varData view state var data @param fixedData view state fixed data @throws IOException
[ "Entry", "point", "for", "processing", "saved", "view", "state", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/ViewStateReader.java#L55-L86
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/MapRow.java
MapRow.getRows
@SuppressWarnings("unchecked") public final List<MapRow> getRows(String name) { return (List<MapRow>) getObject(name); }
java
@SuppressWarnings("unchecked") public final List<MapRow> getRows(String name) { return (List<MapRow>) getObject(name); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "List", "<", "MapRow", ">", "getRows", "(", "String", "name", ")", "{", "return", "(", "List", "<", "MapRow", ">", ")", "getObject", "(", "name", ")", ";", "}" ]
Retrieve row from a nested table. @param name column name @return nested table rows
[ "Retrieve", "row", "from", "a", "nested", "table", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/MapRow.java#L153-L156
train
joniles/mpxj
src/main/java/net/sf/mpxj/common/RtfHelper.java
RtfHelper.strip
public static String strip(String text) { String result = text; if (text != null && !text.isEmpty()) { try { boolean formalRTF = isFormalRTF(text); StringTextConverter stc = new StringTextConverter(); stc.convert(new RtfStringSource(text)); ...
java
public static String strip(String text) { String result = text; if (text != null && !text.isEmpty()) { try { boolean formalRTF = isFormalRTF(text); StringTextConverter stc = new StringTextConverter(); stc.convert(new RtfStringSource(text)); ...
[ "public", "static", "String", "strip", "(", "String", "text", ")", "{", "String", "result", "=", "text", ";", "if", "(", "text", "!=", "null", "&&", "!", "text", ".", "isEmpty", "(", ")", ")", "{", "try", "{", "boolean", "formalRTF", "=", "isFormalRT...
This method removes all RTF formatting from a given piece of text. @param text Text from which the RTF formatting is to be removed. @return Plain text
[ "This", "method", "removes", "all", "RTF", "formatting", "from", "a", "given", "piece", "of", "text", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/RtfHelper.java#L54-L73
train
joniles/mpxj
src/main/java/net/sf/mpxj/common/RtfHelper.java
RtfHelper.stripExtraLineEnd
private static String stripExtraLineEnd(String text, boolean formalRTF) { if (formalRTF && text.endsWith("\n")) { text = text.substring(0, text.length() - 1); } return text; }
java
private static String stripExtraLineEnd(String text, boolean formalRTF) { if (formalRTF && text.endsWith("\n")) { text = text.substring(0, text.length() - 1); } return text; }
[ "private", "static", "String", "stripExtraLineEnd", "(", "String", "text", ",", "boolean", "formalRTF", ")", "{", "if", "(", "formalRTF", "&&", "text", ".", "endsWith", "(", "\"\\n\"", ")", ")", "{", "text", "=", "text", ".", "substring", "(", "0", ",", ...
Remove the trailing line end from an RTF block. @param text source text @param formalRTF true if this is a real RTF block @return text with line end stripped
[ "Remove", "the", "trailing", "line", "end", "from", "an", "RTF", "block", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/RtfHelper.java#L82-L89
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java
AbstractCalendarAndExceptionFactory.processWorkWeeks
private void processWorkWeeks(byte[] data, int offset, ProjectCalendar cal) { // System.out.println("Calendar=" + cal.getName()); // System.out.println("Work week block start offset=" + offset); // System.out.println(ByteArrayHelper.hexdump(data, true, 16, "")); // skip 4 byte...
java
private void processWorkWeeks(byte[] data, int offset, ProjectCalendar cal) { // System.out.println("Calendar=" + cal.getName()); // System.out.println("Work week block start offset=" + offset); // System.out.println(ByteArrayHelper.hexdump(data, true, 16, "")); // skip 4 byte...
[ "private", "void", "processWorkWeeks", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "ProjectCalendar", "cal", ")", "{", "// System.out.println(\"Calendar=\" + cal.getName());", "// System.out.println(\"Work week block start offset=\" + offset);", "// S...
Read the work weeks. @param data calendar data @param offset current offset into data @param cal parent calendar
[ "Read", "the", "work", "weeks", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java#L221-L271
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java
AbstractCalendarAndExceptionFactory.processWorkWeekDay
private void processWorkWeekDay(byte[] data, int offset, ProjectCalendarWeek week, Day day) { //System.out.println(ByteArrayHelper.hexdump(data, offset, 60, false)); int dayType = MPPUtility.getShort(data, offset + 0); if (dayType == 1) { week.setWorkingDay(day, DayType.DEFAULT); ...
java
private void processWorkWeekDay(byte[] data, int offset, ProjectCalendarWeek week, Day day) { //System.out.println(ByteArrayHelper.hexdump(data, offset, 60, false)); int dayType = MPPUtility.getShort(data, offset + 0); if (dayType == 1) { week.setWorkingDay(day, DayType.DEFAULT); ...
[ "private", "void", "processWorkWeekDay", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "ProjectCalendarWeek", "week", ",", "Day", "day", ")", "{", "//System.out.println(ByteArrayHelper.hexdump(data, offset, 60, false));", "int", "dayType", "=", "MPPUtility",...
Process an individual work week day. @param data calendar data @param offset current offset into data @param week parent week @param day current day
[ "Process", "an", "individual", "work", "week", "day", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java#L281-L314
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java
AbstractCalendarAndExceptionFactory.getRecurrenceType
private RecurrenceType getRecurrenceType(int value) { RecurrenceType result; if (value < 0 || value >= RECURRENCE_TYPES.length) { result = null; } else { result = RECURRENCE_TYPES[value]; } return result; }
java
private RecurrenceType getRecurrenceType(int value) { RecurrenceType result; if (value < 0 || value >= RECURRENCE_TYPES.length) { result = null; } else { result = RECURRENCE_TYPES[value]; } return result; }
[ "private", "RecurrenceType", "getRecurrenceType", "(", "int", "value", ")", "{", "RecurrenceType", "result", ";", "if", "(", "value", "<", "0", "||", "value", ">=", "RECURRENCE_TYPES", ".", "length", ")", "{", "result", "=", "null", ";", "}", "else", "{", ...
Retrieve the recurrence type. @param value integer value @return RecurrenceType instance
[ "Retrieve", "the", "recurrence", "type", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java#L322-L335
train
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java
AbstractCalendarAndExceptionFactory.getRelative
private boolean getRelative(int value) { boolean result; if (value < 0 || value >= RELATIVE_MAP.length) { result = false; } else { result = RELATIVE_MAP[value]; } return result; }
java
private boolean getRelative(int value) { boolean result; if (value < 0 || value >= RELATIVE_MAP.length) { result = false; } else { result = RELATIVE_MAP[value]; } return result; }
[ "private", "boolean", "getRelative", "(", "int", "value", ")", "{", "boolean", "result", ";", "if", "(", "value", "<", "0", "||", "value", ">=", "RELATIVE_MAP", ".", "length", ")", "{", "result", "=", "false", ";", "}", "else", "{", "result", "=", "R...
Determine if the exception is relative based on the recurrence type integer value. @param value integer value @return true if the recurrence is relative
[ "Determine", "if", "the", "exception", "is", "relative", "based", "on", "the", "recurrence", "type", "integer", "value", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/AbstractCalendarAndExceptionFactory.java#L343-L356
train
joniles/mpxj
src/main/java/net/sf/mpxj/ganttdesigner/schema/GanttDesignerRemark.java
GanttDesignerRemark.getTask
public List<GanttDesignerRemark.Task> getTask() { if (task == null) { task = new ArrayList<GanttDesignerRemark.Task>(); } return this.task; }
java
public List<GanttDesignerRemark.Task> getTask() { if (task == null) { task = new ArrayList<GanttDesignerRemark.Task>(); } return this.task; }
[ "public", "List", "<", "GanttDesignerRemark", ".", "Task", ">", "getTask", "(", ")", "{", "if", "(", "task", "==", "null", ")", "{", "task", "=", "new", "ArrayList", "<", "GanttDesignerRemark", ".", "Task", ">", "(", ")", ";", "}", "return", "this", ...
Gets the value of the task property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the task property. <p> For example, to add a new i...
[ "Gets", "the", "value", "of", "the", "task", "property", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ganttdesigner/schema/GanttDesignerRemark.java#L76-L83
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/JTablePanel.java
JTablePanel.setLeftTableModel
public void setLeftTableModel(TableModel model) { TableModel old = m_leftTable.getModel(); m_leftTable.setModel(model); firePropertyChange("leftTableModel", old, model); }
java
public void setLeftTableModel(TableModel model) { TableModel old = m_leftTable.getModel(); m_leftTable.setModel(model); firePropertyChange("leftTableModel", old, model); }
[ "public", "void", "setLeftTableModel", "(", "TableModel", "model", ")", "{", "TableModel", "old", "=", "m_leftTable", ".", "getModel", "(", ")", ";", "m_leftTable", ".", "setModel", "(", "model", ")", ";", "firePropertyChange", "(", "\"leftTableModel\"", ",", ...
Set the model used by the left table. @param model table model
[ "Set", "the", "model", "used", "by", "the", "left", "table", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/JTablePanel.java#L91-L96
train
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/JTablePanel.java
JTablePanel.setRightTableModel
public void setRightTableModel(TableModel model) { TableModel old = m_rightTable.getModel(); m_rightTable.setModel(model); firePropertyChange("rightTableModel", old, model); }
java
public void setRightTableModel(TableModel model) { TableModel old = m_rightTable.getModel(); m_rightTable.setModel(model); firePropertyChange("rightTableModel", old, model); }
[ "public", "void", "setRightTableModel", "(", "TableModel", "model", ")", "{", "TableModel", "old", "=", "m_rightTable", ".", "getModel", "(", ")", ";", "m_rightTable", ".", "setModel", "(", "model", ")", ";", "firePropertyChange", "(", "\"rightTableModel\"", ","...
Set the model used by the right table. @param model table model
[ "Set", "the", "model", "used", "by", "the", "right", "table", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/JTablePanel.java#L113-L118
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroData.java
SynchroData.process
public void process(InputStream is) throws Exception { readHeader(is); readVersion(is); readTableData(readTableHeaders(is), is); }
java
public void process(InputStream is) throws Exception { readHeader(is); readVersion(is); readTableData(readTableHeaders(is), is); }
[ "public", "void", "process", "(", "InputStream", "is", ")", "throws", "Exception", "{", "readHeader", "(", "is", ")", ";", "readVersion", "(", "is", ")", ";", "readTableData", "(", "readTableHeaders", "(", "is", ")", ",", "is", ")", ";", "}" ]
Extract raw table data from the input stream. @param is input stream
[ "Extract", "raw", "table", "data", "from", "the", "input", "stream", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroData.java#L55-L60
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroData.java
SynchroData.getTableData
public StreamReader getTableData(String name) throws IOException { InputStream stream = new ByteArrayInputStream(m_tableData.get(name)); if (m_majorVersion > 5) { byte[] header = new byte[24]; stream.read(header); SynchroLogger.log("TABLE HEADER", header); }...
java
public StreamReader getTableData(String name) throws IOException { InputStream stream = new ByteArrayInputStream(m_tableData.get(name)); if (m_majorVersion > 5) { byte[] header = new byte[24]; stream.read(header); SynchroLogger.log("TABLE HEADER", header); }...
[ "public", "StreamReader", "getTableData", "(", "String", "name", ")", "throws", "IOException", "{", "InputStream", "stream", "=", "new", "ByteArrayInputStream", "(", "m_tableData", ".", "get", "(", "name", ")", ")", ";", "if", "(", "m_majorVersion", ">", "5", ...
Return an input stream to read the data from the named table. @param name table name @return InputStream instance @throws IOException
[ "Return", "an", "input", "stream", "to", "read", "the", "data", "from", "the", "named", "table", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroData.java#L69-L79
train
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroData.java
SynchroData.readTableHeaders
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { // Read the headers List<SynchroTable> tables = new ArrayList<SynchroTable>(); byte[] header = new byte[48]; while (true) { is.read(header); m_offset += 48; SynchroTable table = r...
java
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { // Read the headers List<SynchroTable> tables = new ArrayList<SynchroTable>(); byte[] header = new byte[48]; while (true) { is.read(header); m_offset += 48; SynchroTable table = r...
[ "private", "List", "<", "SynchroTable", ">", "readTableHeaders", "(", "InputStream", "is", ")", "throws", "IOException", "{", "// Read the headers", "List", "<", "SynchroTable", ">", "tables", "=", "new", "ArrayList", "<", "SynchroTable", ">", "(", ")", ";", "...
Read the table headers. This allows us to break the file into chunks representing the individual tables. @param is input stream @return list of tables in the file
[ "Read", "the", "table", "headers", ".", "This", "allows", "us", "to", "break", "the", "file", "into", "chunks", "representing", "the", "individual", "tables", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroData.java#L88-L132
train