UIMA
  1. UIMA
  2. UIMA-2379

can't intuit meaning of copyFromArray and copyToArray methods on FSArray

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4.1SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      Regarding this method on org.apache.uima.jcas.cas.FSArray:

      public void copyFromArray(String[] src, int srcOffset, int destOffset, int length)

      I read in the 2.3.0 documentation, "Description copied from interface: CommonArrayFS. Copy the contents of an external string array into this array. The strings are parsed and converted to floats."

      This seems incorrect.

      It also does not seem informative enough. If I have a feature that is an FSArray of feature structures, what does it mean to copy from an array of strings?

      Related is what it means to copy such an FSArray of feature structures to an array of strings. Is there some contract implied here?

        Activity

        Hide
        Marshall Schor added a comment -

        updated the Javadocs. In the case of copyFromArray - it says not supported. In the case of copyToArray it clarifies what is produced.

        Show
        Marshall Schor added a comment - updated the Javadocs. In the case of copyFromArray - it says not supported. In the case of copyToArray it clarifies what is produced.

          People

          • Assignee:
            Marshall Schor
            Reporter:
            Mike Barborak
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development