test_class.file: anhalytics-commons/src/test/java/fr/inria/anhalytics/commons/utilities/UtilitiesTest.java
test_class.identifier: UtilitiesTest
test_case.body: @Test
      public void testDaysInMonth_february_nbOfDaysShouldAdaptAccordingToYear() throws Exception {
          assertThat(Utilities.daysInMonth(2400, 2), is(29));
          assertThat(Utilities.daysInMonth(1996, 2), is(29));
          assertThat(Utilities.daysInMonth(2003, 2), is(28));
      }
test_case.class_method_signature: UtilitiesTest.testDaysInMonth_february_nbOfDaysShouldAdaptAccordingToYear()
test_case.full_signature: @Test public void testDaysInMonth_february_nbOfDaysShouldAdaptAccordingToYear()
test_case.identifier: testDaysInMonth_february_nbOfDaysShouldAdaptAccordingToYear
test_case.invocations: assertThat daysInMonth is assertThat daysInMonth is assertThat daysInMonth is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDaysInMonth_february_nbOfDaysShouldAdaptAccordingToYear()
focal_class.declarator: logger = LoggerFactory.getLogger(Utilities.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(Utilities.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: dates = new LinkedHashSet<String>()
focal_class.modifier: private static
focal_class.original_string: private static Set<String> dates = new LinkedHashSet<String>();
focal_class.type: Set<String>
focal_class.var_name: dates
focal_class.declarator: tmpPath
focal_class.modifier: private static
focal_class.original_string: private static String tmpPath;
focal_class.type: String
focal_class.var_name: tmpPath
focal_class.declarator: toDay = Calendar.getInstance()
focal_class.modifier: static
focal_class.original_string: static Calendar toDay = Calendar.getInstance();
focal_class.type: Calendar
focal_class.var_name: toDay
focal_class.declarator: todayYear = toDay.get(Calendar.YEAR)
focal_class.modifier: static
focal_class.original_string: static int todayYear = toDay.get(Calendar.YEAR);
focal_class.type: int
focal_class.var_name: todayYear
focal_class.declarator: minYear = 1900
focal_class.modifier: static
focal_class.original_string: static int minYear = 1900;
focal_class.type: int
focal_class.var_name: minYear
focal_class.declarator: fields
              = Arrays.asList("title", "term", "funder", "classCode", "p", "head", "figDesc", "item")
focal_class.modifier: private static
focal_class.original_string: private static List<String> fields
              = Arrays.asList("title", "term", "funder", "classCode", "p", "head", "figDesc", "item");
focal_class.type: List<String>
focal_class.var_name: fields
focal_class.file: anhalytics-commons/src/main/java/fr/inria/anhalytics/commons/utilities/Utilities.java
focal_class.identifier: Utilities
focal_class.class_method_signature: Utilities.setTmpPath(String tmp_path)
focal_class.full_signature: public static void setTmpPath(String tmp_path)
focal_class.identifier: setTmpPath
focal_class.modifiers: public static
focal_class.parameters: (String tmp_path)
focal_class.return: void
focal_class.signature: void setTmpPath(String tmp_path)
focal_class.class_method_signature: Utilities.getTmpPath()
focal_class.full_signature: public static String getTmpPath()
focal_class.identifier: getTmpPath
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTmpPath()
focal_class.class_method_signature: Utilities.updateDates(String fromDate, String untilDate)
focal_class.full_signature: public static void updateDates(String fromDate, String untilDate)
focal_class.identifier: updateDates
focal_class.modifiers: public static
focal_class.parameters: (String fromDate, String untilDate)
focal_class.return: void
focal_class.signature: void updateDates(String fromDate, String untilDate)
focal_class.class_method_signature: Utilities.daysInMonth(int year, int month)
focal_class.full_signature: protected static int daysInMonth(int year, int month)
focal_class.identifier: daysInMonth
focal_class.modifiers: protected static
focal_class.parameters: (int year, int month)
focal_class.return: int
focal_class.signature: int daysInMonth(int year, int month)
focal_class.class_method_signature: Utilities.isValidDate(String dateString)
focal_class.full_signature: public static boolean isValidDate(String dateString)
focal_class.identifier: isValidDate
focal_class.modifiers: public static
focal_class.parameters: (String dateString)
focal_class.return: boolean
focal_class.signature: boolean isValidDate(String dateString)
focal_class.class_method_signature: Utilities.completeDate(String date)
focal_class.full_signature: public static String completeDate(String date)
focal_class.identifier: completeDate
focal_class.modifiers: public static
focal_class.parameters: (String date)
focal_class.return: String
focal_class.signature: String completeDate(String date)
focal_class.class_method_signature: Utilities.toString(Document doc)
focal_class.full_signature: public static String toString(Document doc)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (Document doc)
focal_class.return: String
focal_class.signature: String toString(Document doc)
focal_class.class_method_signature: Utilities.innerXmlToString(Node node)
focal_class.full_signature: public static String innerXmlToString(Node node)
focal_class.identifier: innerXmlToString
focal_class.modifiers: public static
focal_class.parameters: (Node node)
focal_class.return: String
focal_class.signature: String innerXmlToString(Node node)
focal_class.class_method_signature: Utilities.findNode(String attribut, String value, NodeList orgs)
focal_class.full_signature: public static Element findNode(String attribut, String value, NodeList orgs)
focal_class.identifier: findNode
focal_class.modifiers: public static
focal_class.parameters: (String attribut, String value, NodeList orgs)
focal_class.return: Element
focal_class.signature: Element findNode(String attribut, String value, NodeList orgs)
focal_class.class_method_signature: Utilities.generateIDs(Document doc)
focal_class.full_signature: public static void generateIDs(Document doc)
focal_class.identifier: generateIDs
focal_class.modifiers: public static
focal_class.parameters: (Document doc)
focal_class.return: void
focal_class.signature: void generateIDs(Document doc)
focal_class.class_method_signature: Utilities.generateID(NodeList theNodes)
focal_class.full_signature: private static void generateID(NodeList theNodes)
focal_class.identifier: generateID
focal_class.modifiers: private static
focal_class.parameters: (NodeList theNodes)
focal_class.return: void
focal_class.signature: void generateID(NodeList theNodes)
focal_class.class_method_signature: Utilities.trimEOL(Node node, Document doc)
focal_class.full_signature: public static void trimEOL(Node node, Document doc)
focal_class.identifier: trimEOL
focal_class.modifiers: public static
focal_class.parameters: (Node node, Document doc)
focal_class.return: void
focal_class.signature: void trimEOL(Node node, Document doc)
focal_class.class_method_signature: Utilities.clearTmpDirectory()
focal_class.full_signature: public static void clearTmpDirectory()
focal_class.identifier: clearTmpDirectory
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearTmpDirectory()
focal_class.class_method_signature: Utilities.storeTmpFile(InputStream inBinary)
focal_class.full_signature: public static String storeTmpFile(InputStream inBinary)
focal_class.identifier: storeTmpFile
focal_class.modifiers: public static
focal_class.parameters: (InputStream inBinary)
focal_class.return: String
focal_class.signature: String storeTmpFile(InputStream inBinary)
focal_class.class_method_signature: Utilities.storeToTmpXmlFile(InputStream inBinary)
focal_class.full_signature: public static String storeToTmpXmlFile(InputStream inBinary)
focal_class.identifier: storeToTmpXmlFile
focal_class.modifiers: public static
focal_class.parameters: (InputStream inBinary)
focal_class.return: String
focal_class.signature: String storeToTmpXmlFile(InputStream inBinary)
focal_class.class_method_signature: Utilities.getBinaryURLContent(File file, InputStream in)
focal_class.full_signature: public static void getBinaryURLContent(File file, InputStream in)
focal_class.identifier: getBinaryURLContent
focal_class.modifiers: public static
focal_class.parameters: (File file, InputStream in)
focal_class.return: void
focal_class.signature: void getBinaryURLContent(File file, InputStream in)
focal_class.class_method_signature: Utilities.formatDate(Date date)
focal_class.full_signature: public static String formatDate(Date date)
focal_class.identifier: formatDate
focal_class.modifiers: public static
focal_class.parameters: (Date date)
focal_class.return: String
focal_class.signature: String formatDate(Date date)
focal_class.class_method_signature: Utilities.parseStringDate(String dateString)
focal_class.full_signature: public static Date parseStringDate(String dateString)
focal_class.identifier: parseStringDate
focal_class.modifiers: public static
focal_class.parameters: (String dateString)
focal_class.return: Date
focal_class.signature: Date parseStringDate(String dateString)
focal_class.class_method_signature: Utilities.getHalIDFromHalDocID(String halDocID)
focal_class.full_signature: public static String getHalIDFromHalDocID(String halDocID)
focal_class.identifier: getHalIDFromHalDocID
focal_class.modifiers: public static
focal_class.parameters: (String halDocID)
focal_class.return: String
focal_class.signature: String getHalIDFromHalDocID(String halDocID)
focal_class.class_method_signature: Utilities.getVersionFromURI(String uri)
focal_class.full_signature: public static String getVersionFromURI(String uri)
focal_class.identifier: getVersionFromURI
focal_class.modifiers: public static
focal_class.parameters: (String uri)
focal_class.return: String
focal_class.signature: String getVersionFromURI(String uri)
focal_class.class_method_signature: Utilities.getHalURIFromFilename(String filename)
focal_class.full_signature: public static String getHalURIFromFilename(String filename)
focal_class.identifier: getHalURIFromFilename
focal_class.modifiers: public static
focal_class.parameters: (String filename)
focal_class.return: String
focal_class.signature: String getHalURIFromFilename(String filename)
focal_class.class_method_signature: Utilities.getDates()
focal_class.full_signature: public static Set<String> getDates()
focal_class.identifier: getDates
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getDates()
focal_class.class_method_signature: Utilities.trimEncodedCharaters(String string)
focal_class.full_signature: public static String trimEncodedCharaters(String string)
focal_class.identifier: trimEncodedCharaters
focal_class.modifiers: public static
focal_class.parameters: (String string)
focal_class.return: String
focal_class.signature: String trimEncodedCharaters(String string)
focal_class.class_method_signature: Utilities.unzipIt(String file, String outPath)
focal_class.full_signature: public static void unzipIt(String file, String outPath)
focal_class.identifier: unzipIt
focal_class.modifiers: public static
focal_class.parameters: (String file, String outPath)
focal_class.return: void
focal_class.signature: void unzipIt(String file, String outPath)
focal_class.class_method_signature: Utilities.readFile(String fileName)
focal_class.full_signature: public static String readFile(String fileName)
focal_class.identifier: readFile
focal_class.modifiers: public static
focal_class.parameters: (String fileName)
focal_class.return: String
focal_class.signature: String readFile(String fileName)
focal_class.class_method_signature: Utilities.request(String request)
focal_class.full_signature: public static InputStream request(String request)
focal_class.identifier: request
focal_class.modifiers: public static
focal_class.parameters: (String request)
focal_class.return: InputStream
focal_class.signature: InputStream request(String request)
focal_class.class_method_signature: Utilities.getConnection(URL url)
focal_class.full_signature: private static final HttpURLConnection getConnection(URL url)
focal_class.identifier: getConnection
focal_class.modifiers: private static final
focal_class.parameters: (URL url)
focal_class.return: HttpURLConnection
focal_class.signature: HttpURLConnection getConnection(URL url)
focal_class.class_method_signature: Utilities.formatXMLString(String xmlString)
focal_class.full_signature: public static String formatXMLString(String xmlString)
focal_class.identifier: formatXMLString
focal_class.modifiers: public static
focal_class.parameters: (String xmlString)
focal_class.return: String
focal_class.signature: String formatXMLString(String xmlString)
focal_class.class_method_signature: Utilities.checkPath(String path)
focal_class.full_signature: public static void checkPath(String path)
focal_class.identifier: checkPath
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: void
focal_class.signature: void checkPath(String path)
focal_class.class_method_signature: Utilities.convertStreamToString(InputStream is)
focal_class.full_signature: static public String convertStreamToString(InputStream is)
focal_class.identifier: convertStreamToString
focal_class.modifiers: static public
focal_class.parameters: (InputStream is)
focal_class.return: String
focal_class.signature: String convertStreamToString(InputStream is)
focal_class.class_method_signature: Utilities.removeAccents(String input)
focal_class.full_signature: public final static String removeAccents(String input)
focal_class.identifier: removeAccents
focal_class.modifiers: public final static
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String removeAccents(String input)
focal_class.class_method_signature: Utilities.getElementByAttribute(String attr, String value, Element root)
focal_class.full_signature: public final static Element getElementByAttribute(String attr, String value, Element root)
focal_class.identifier: getElementByAttribute
focal_class.modifiers: public final static
focal_class.parameters: (String attr, String value, Element root)
focal_class.return: Element
focal_class.signature: Element getElementByAttribute(String attr, String value, Element root)
focal_class.class_method_signature: Utilities.matchAuthor(String fullname, NodeList authorsFromfulltextTeiHeader)
focal_class.full_signature: public static Element matchAuthor(String fullname, NodeList authorsFromfulltextTeiHeader)
focal_class.identifier: matchAuthor
focal_class.modifiers: public static
focal_class.parameters: (String fullname, NodeList authorsFromfulltextTeiHeader)
focal_class.return: Element
focal_class.signature: Element matchAuthor(String fullname, NodeList authorsFromfulltextTeiHeader)
focal_method.body: protected static int daysInMonth(int year, int month) {
          int daysInMonth;
          switch (month) {
              case 1:
              case 3:
              case 5:
              case 7:
              case 8:
              case 10:
              case 12:
                  daysInMonth = 31;
                  break;
              case 2:
                  if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {
                      daysInMonth = 29;
                  } else {
                      daysInMonth = 28;
                  }
                  break;
              default:
                  // returns 30 even for nonexistant months 
                  daysInMonth = 30;
          }
          return daysInMonth;
      }
focal_method.class_method_signature: Utilities.daysInMonth(int year, int month)
focal_method.full_signature: protected static int daysInMonth(int year, int month)
focal_method.identifier: daysInMonth
focal_method.modifiers: protected static
focal_method.parameters: (int year, int month)
focal_method.return: int
focal_method.signature: int daysInMonth(int year, int month)