Commit d7cb538a authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Fixed contributor list.



Eric was listed as the author but not in contributor list. Fixed that.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent cf373619
......@@ -7,8 +7,8 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.widgets.reactoreditor.test;
......
......@@ -7,8 +7,8 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf.test;
......@@ -20,17 +20,17 @@ import static org.junit.Assert.fail;
import java.io.File;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5Group;
import org.eclipse.ice.io.hdf.HdfFileFactory;
import org.junit.Test;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5Group;
/**
* <p>
* This class tests the HdfFileFactory class.
* </p>
*
*
* @author Eric J. Lingerfelt
*/
public class HdfFileFactoryTester {
......
......@@ -7,8 +7,8 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf.test;
......@@ -23,6 +23,12 @@ import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import org.eclipse.ice.io.hdf.HdfFileFactory;
import org.eclipse.ice.io.hdf.HdfReaderFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ncsa.hdf.hdf5lib.exceptions.HDF5Exception;
import ncsa.hdf.object.Attribute;
import ncsa.hdf.object.Dataset;
......@@ -32,15 +38,9 @@ import ncsa.hdf.object.h5.H5Datatype;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5Group;
import org.eclipse.ice.io.hdf.HdfFileFactory;
import org.eclipse.ice.io.hdf.HdfReaderFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* This class tests the HdfReaderFactory class.
*
*
* @author Eric J. Lingerfelt
*/
public class HdfReaderFactoryTester {
......@@ -252,7 +252,8 @@ public class HdfReaderFactoryTester {
// Try to grab the group as a dataset - should throw a class cast
// exception
assertNull(HdfReaderFactory.getDataset(parentH5Group, subGroupName));
assertNull(
HdfReaderFactory.getDataset(parentH5Group, subGroupName));
// Try to grab the dataset as a group - should throw a class cast
// exception
......@@ -302,25 +303,26 @@ public class HdfReaderFactoryTester {
// Check nullary and invalid values for Integer read
assertNull(HdfReaderFactory.readIntegerAttribute(parentH5Group,
integerName));
assertNull(HdfReaderFactory.readIntegerAttribute(null, integerName));
assertNull(HdfReaderFactory.readIntegerAttribute(parentH5Group,
null));
assertNull(
HdfReaderFactory.readIntegerAttribute(null, integerName));
assertNull(
HdfReaderFactory.readIntegerAttribute(parentH5Group, null));
assertNull(HdfReaderFactory.readIntegerAttribute(null, null));
// Check nullary and invalid values for Double read
assertNull(HdfReaderFactory.readDoubleAttribute(parentH5Group,
doubleName));
assertNull(HdfReaderFactory.readDoubleAttribute(null, doubleName));
assertNull(HdfReaderFactory
.readDoubleAttribute(parentH5Group, null));
assertNull(
HdfReaderFactory.readDoubleAttribute(parentH5Group, null));
assertNull(HdfReaderFactory.readDoubleAttribute(null, null));
// Check nullary and invalid values for String read
assertNull(HdfReaderFactory.readStringAttribute(parentH5Group,
stringName));
assertNull(HdfReaderFactory.readStringAttribute(null, stringName));
assertNull(HdfReaderFactory
.readStringAttribute(parentH5Group, null));
assertNull(
HdfReaderFactory.readStringAttribute(parentH5Group, null));
assertNull(HdfReaderFactory.readStringAttribute(null, null));
// Add a Integer, a Double, and a String to the parentGroup
......@@ -385,26 +387,27 @@ public class HdfReaderFactoryTester {
.getRootNode()).getUserObject();
// Now, time to read those values!
assertEquals(
intValue,
HdfReaderFactory.readIntegerAttribute(parentH5Group,
integerName).intValue());
assertEquals(
doubleValue,
HdfReaderFactory.readDoubleAttribute(parentH5Group,
doubleName).doubleValue(), 0.0);
assertEquals(stringValue, HdfReaderFactory.readStringAttribute(
parentH5Group, stringName));
assertEquals(intValue,
HdfReaderFactory
.readIntegerAttribute(parentH5Group, integerName)
.intValue());
assertEquals(doubleValue,
HdfReaderFactory
.readDoubleAttribute(parentH5Group, doubleName)
.doubleValue(),
0.0);
assertEquals(stringValue, HdfReaderFactory
.readStringAttribute(parentH5Group, stringName));
// Checking for child groups.
assertNotNull(HdfReaderFactory.getChildH5Groups(parentH5Group));
assertEquals(0, HdfReaderFactory.getChildH5Groups(parentH5Group)
.size());
assertEquals(0,
HdfReaderFactory.getChildH5Groups(parentH5Group).size());
// Check for child objects.
assertNotNull(HdfReaderFactory.getChildH5Members(parentH5Group));
assertEquals(0, HdfReaderFactory.getChildH5Members(parentH5Group)
.size());
assertEquals(0,
HdfReaderFactory.getChildH5Members(parentH5Group).size());
// Lets add something to the group
H5Group h5Group = (H5Group) h5File.createGroup(childGroupName,
......@@ -436,23 +439,20 @@ public class HdfReaderFactoryTester {
// Check for children now. There should only be one child group.
assertNotNull(HdfReaderFactory.getChildH5Groups(parentH5Group));
assertEquals(1, HdfReaderFactory.getChildH5Groups(parentH5Group)
.size());
assertEquals(childGroupName,
HdfReaderFactory.getChildH5Groups(parentH5Group).get(0)
.getName());
assertEquals(1,
HdfReaderFactory.getChildH5Groups(parentH5Group).size());
assertEquals(childGroupName, HdfReaderFactory
.getChildH5Groups(parentH5Group).get(0).getName());
// Check for child objects. There should be two (a group and a
// dataset).
assertNotNull(HdfReaderFactory.getChildH5Members(parentH5Group));
assertEquals(2, HdfReaderFactory.getChildH5Members(parentH5Group)
.size());
assertEquals(childGroupName,
HdfReaderFactory.getChildH5Members(parentH5Group).get(1)
.getName());
assertEquals(datasetName,
HdfReaderFactory.getChildH5Members(parentH5Group).get(0)
.getName());
assertEquals(2,
HdfReaderFactory.getChildH5Members(parentH5Group).size());
assertEquals(childGroupName, HdfReaderFactory
.getChildH5Members(parentH5Group).get(1).getName());
assertEquals(datasetName, HdfReaderFactory
.getChildH5Members(parentH5Group).get(0).getName());
} catch (Exception e) {
// Fail out of the test, not supposed to happen
......
......@@ -7,8 +7,8 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf.test;
......@@ -22,6 +22,12 @@ import static org.junit.Assert.fail;
import java.io.File;
import java.net.URI;
import org.eclipse.ice.io.hdf.HdfFileFactory;
import org.eclipse.ice.io.hdf.HdfWriterFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ncsa.hdf.hdf5lib.exceptions.HDF5Exception;
import ncsa.hdf.object.Attribute;
import ncsa.hdf.object.Dataset;
......@@ -31,15 +37,9 @@ import ncsa.hdf.object.h5.H5Datatype;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5Group;
import org.eclipse.ice.io.hdf.HdfFileFactory;
import org.eclipse.ice.io.hdf.HdfWriterFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* This class tests the HdfWriterFactory class.
*
*
* @author Eric J. Lingerfelt
*/
public class HdfWriterFactoryTester {
......@@ -235,20 +235,20 @@ public class HdfWriterFactoryTester {
.getRootNode()).getUserObject();
// Create a good Reactor group
H5Group reactorGroup = HdfWriterFactory.createH5Group(h5File,
"Reactor", rootH5Group);
H5Group reactorGroup = HdfWriterFactory.createH5Group(h5File, "Reactor",
rootH5Group);
assertNotNull(reactorGroup);
// Write some double attributes with bad arguments
flag = HdfWriterFactory.writeDoubleAttribute(null, null, null, number);
assertFalse(flag);
flag = HdfWriterFactory
.writeDoubleAttribute(h5File, null, null, number);
flag = HdfWriterFactory.writeDoubleAttribute(h5File, null, null,
number);
assertFalse(flag);
flag = HdfWriterFactory.writeDoubleAttribute(h5File, reactorGroup,
null, number);
flag = HdfWriterFactory.writeDoubleAttribute(h5File, reactorGroup, null,
number);
assertFalse(flag);
// Write a double attribute with good arguments
......@@ -315,8 +315,8 @@ public class HdfWriterFactoryTester {
flag = HdfWriterFactory.writeStringAttribute(h5File, null, null, null);
assertFalse(flag);
flag = HdfWriterFactory.writeStringAttribute(h5File, reactorGroup,
null, null);
flag = HdfWriterFactory.writeStringAttribute(h5File, reactorGroup, null,
null);
assertFalse(flag);
flag = HdfWriterFactory.writeStringAttribute(h5File, reactorGroup, "",
......
......@@ -7,21 +7,21 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf;
import java.io.File;
import java.net.URI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ncsa.hdf.hdf5lib.exceptions.HDF5Exception;
import ncsa.hdf.object.FileFormat;
import ncsa.hdf.object.h5.H5File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>
* The HDFFileFactory class contains static methods used to create, open, and
......@@ -49,7 +49,8 @@ public class HdfFileFactory {
* <p>
* The URI of the H5File to create and open.
* </p>
* @return <p>
* @return
* <p>
* An H5File that has been created and opened for read/write
* operations.
* </p>
......@@ -145,7 +146,8 @@ public class HdfFileFactory {
* <p>
* The URI of the H5File to open.
* </p>
* @return <p>
* @return
* <p>
* An H5File that has been opened for read/write operations.
* </p>
*/
......
......@@ -7,13 +7,16 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf;
import java.util.ArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ncsa.hdf.hdf5lib.H5;
import ncsa.hdf.hdf5lib.HDF5Constants;
import ncsa.hdf.object.Attribute;
......@@ -22,9 +25,6 @@ import ncsa.hdf.object.Datatype;
import ncsa.hdf.object.HObject;
import ncsa.hdf.object.h5.H5Group;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>
* The HdfReaderFactory class contains static methods used to read elements from
......@@ -57,7 +57,8 @@ public class HdfReaderFactory {
* <p>
* The name of the child H5Group.
* </p>
* @return <p>
* @return
* <p>
* The child H5Group.
* </p>
*/
......@@ -70,8 +71,8 @@ public class HdfReaderFactory {
}
// Get the group or return null
try {
return (H5Group) parentH5Group.getFileFormat().get(
parentH5Group.getFullName()
return (H5Group) parentH5Group.getFileFormat()
.get(parentH5Group.getFullName()
+ System.getProperty("file.separator") + name);
} catch (Exception e) {
logger.error("HdfReaderFactory Exception!", e);
......@@ -97,7 +98,8 @@ public class HdfReaderFactory {
* <p>
* The index of the child H5Group in parentH5Group's member list.
* </p>
* @return <p>
* @return
* <p>
* The child H5Group.
* </p>
*/
......@@ -133,8 +135,8 @@ public class HdfReaderFactory {
name = H5.H5Lget_name_by_idx(fileID, parentName, indexType, order,
index, linkAccessPropertyList);
childGroup = (H5Group) parentH5Group.getFileFormat().get(
parentH5Group.getFullName()
childGroup = (H5Group) parentH5Group.getFileFormat()
.get(parentH5Group.getFullName()
+ System.getProperty("file.separator") + name);
} catch (Exception e) {
// If we encounter an error, return null.
......@@ -156,7 +158,8 @@ public class HdfReaderFactory {
* <p>
* The parent H5Group to search.
* </p>
* @return <p>
* @return
* <p>
* An ArrayList of child H5Groups.
* </p>
*/
......@@ -219,8 +222,8 @@ public class HdfReaderFactory {
// Try to get the child H5Group from parentH5Group and add
// it
// to the list.
HObject hobj = parentH5Group.getFileFormat().get(
parentH5Group.getFullName()
HObject hobj = parentH5Group.getFileFormat()
.get(parentH5Group.getFullName()
+ System.getProperty("file.separator")
+ objectNames[i]);
if (hobj != null) {
......@@ -297,8 +300,8 @@ public class HdfReaderFactory {
// Add all members to the array.
for (int i = 0; i < count; i++) {
HObject hobj = parentH5Group.getFileFormat().get(
parentH5Group.getFullName()
HObject hobj = parentH5Group.getFileFormat()
.get(parentH5Group.getFullName()
+ System.getProperty("file.separator")
+ objectNames[i]);
if (hobj != null) {
......@@ -331,7 +334,8 @@ public class HdfReaderFactory {
* <p>
* The name of the Dataset to search for.
* </p>
* @return <p>
* @return
* <p>
* The located Dataset.
* </p>
*/
......@@ -345,9 +349,8 @@ public class HdfReaderFactory {
}
// Get the dataset or return null
try {
return (Dataset) h5Group.getFileFormat().get(
h5Group.getFullName()
+ System.getProperty("file.separator") + name);
return (Dataset) h5Group.getFileFormat().get(h5Group.getFullName()
+ System.getProperty("file.separator") + name);
} catch (Exception e) {
logger.error("HdfReaderFactory Exception!", e);
return null;
......@@ -373,7 +376,8 @@ public class HdfReaderFactory {
* <p>
* The name of the attribute.
* </p>
* @return <p>
* @return
* <p>
* The Attribute's value as a Double object.
* </p>
*/
......@@ -395,8 +399,8 @@ public class HdfReaderFactory {
// If the attribute is the correct name and type, return the
// Double
if (attribute.getName().equals(name)
&& attribute.getType().getDatatypeClass() == Datatype.CLASS_FLOAT) {
if (attribute.getName().equals(name) && attribute.getType()
.getDatatypeClass() == Datatype.CLASS_FLOAT) {
// Return the correct value
return ((double[]) attribute.getValue())[0];
......@@ -430,7 +434,8 @@ public class HdfReaderFactory {
* <p>
* The name of the attribute.
* </p>
* @return <p>
* @return
* <p>
* The Attribute's value as an Integer object.
* </p>
*/
......@@ -451,8 +456,8 @@ public class HdfReaderFactory {
// If the attribute is the correct name and type, return the
// Integer
if (attribute.getName().equals(name)
&& attribute.getType().getDatatypeClass() == Datatype.CLASS_INTEGER) {
if (attribute.getName().equals(name) && attribute.getType()
.getDatatypeClass() == Datatype.CLASS_INTEGER) {
// Return the correct value
return ((int[]) attribute.getValue())[0];
......@@ -485,7 +490,8 @@ public class HdfReaderFactory {
* <p>
* The name of the attribute.
* </p>
* @return <p>
* @return
* <p>
* The Attribute's value as a String object.
* </p>
*/
......@@ -506,8 +512,8 @@ public class HdfReaderFactory {
// If the attribute is the correct name and type, return the
// String
if (attribute.getName().equals(name)
&& attribute.getType().getDatatypeClass() == Datatype.CLASS_STRING) {
if (attribute.getName().equals(name) && attribute.getType()
.getDatatypeClass() == Datatype.CLASS_STRING) {
// Return the correct value
return ((String[]) attribute.getValue())[0];
......
......@@ -7,11 +7,14 @@
*
* Contributors:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
* Jordan H. Deyton, Dasha Gorin, Eric J. Lingerfelt, Alexander J. McCaskey,
* Taylor Patterson, Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.io.hdf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ncsa.hdf.object.Attribute;
import ncsa.hdf.object.Dataset;
import ncsa.hdf.object.Datatype;
......@@ -19,9 +22,6 @@ import ncsa.hdf.object.h5.H5Datatype;
import ncsa.hdf.object.h5.H5File;
import ncsa.hdf.object.h5.H5Group;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* <p>
* The HdfWriterFactory class contains static methods used to write elements to
......@@ -59,7 +59,8 @@ public class HdfWriterFactory {
* <p>
* The parent H5Group of the new H5Group.
* </p>
* @return <p>
* @return
* <p>
* An H5Group called name which is a child of parentH5Group.
* </p>
*/
......@@ -128,7 +129,8 @@ public class HdfWriterFactory {
* <p>
* An H5File.
* </p>
* @return <p>
* @return
* <p>
* A 64-bit floating point H5Datatype.
* </p>
*/
......@@ -190,7 +192,8 @@ public class HdfWriterFactory {
* <p>
* An H5File.
* </p>
* @return <p>
* @return
* <p>
* A 32-bit integer H5Datatype.
* </p>
*/
......@@ -224,9 +227,9 @@ public class HdfWriterFactory {
try {
// Create the integer datatype
H5Datatype h5Datatype = (H5Datatype) h5File
.createDatatype(Datatype.CLASS_INTEGER, 4, Datatype.NATIVE,
Datatype.NATIVE);
H5Datatype h5Datatype = (H5Datatype) h5File.createDatatype(
Datatype.CLASS_INTEGER, 4, Datatype.NATIVE,
Datatype.NATIVE);
// Return it
return h5Datatype;
......@@ -267,7 +270,8 @@ public class HdfWriterFactory {
* <p>
* The value of the Attribute.
* </p>
* @return <p>
* @return
* <p>
* If h5File is null or can not be opened, then false is returned.
* If name is null or is an empty String, then false is returned. If
* h5Group is null, then false is returned. If an exception is
......@@ -363,7 +367,8 @@ public class HdfWriterFactory {
* <p>
* The value of the Attribute.
* </p>
* @return <p>
* @return
* <p>
* If h5File is null or can not be opened, then false is returned.
* If name is null or is an empty String, then false is returned. If
* h5Group is null, then false is returned. If an exception is
......@@ -459,7 +464,8 @@ public class HdfWriterFactory {