code: public static DataEntry getStringField(String name, String expected,
              boolean matchCase) {
          DataEntry de = new DataEntry();
          DataEntryType det = DataEntryTypeServer.getType("type.string.name");
          de.setEntryName(name);
          de.setDataEntryPropertyList(getDefaultProperties(det));
          de.setDataEntryType(det);
          if (expected != null) {
              getProperty(de, "property.expected.result")
                      .setPropertyValue(expected);
              getProperty(de, "property.match.case")
                      .setPropertyValue(matchCase ? "true" : "false");
          }
          return de;
      }
docs: Create a default string field
  
  @param name Field name
  @param expected Expected result.
  @param matchCase True if answer must match the case of the expected
  result. False otherwise.
  @return DataEntry. The entry is not persisted into the database yet.