Examples of copyFromArray()


Examples of org.apache.uima.jcas.cas.FSArray.copyFromArray()

      }
      uimaChildren.add(convert(child, jCas, childNode, uimaNode));
      childNode.addToIndexes();
    }
    FSArray uimaChildrenFSArray = new FSArray(jCas, uimaChildren.size());
    uimaChildrenFSArray.copyFromArray(
        uimaChildren.toArray(new FeatureStructure[uimaChildren.size()]),
        0,
        0,
        uimaChildren.size());
    uimaNode.setChildren(uimaChildrenFSArray);
View Full Code Here

Examples of org.apache.uima.jcas.cas.FSArray.copyFromArray()

    }
    FSArray sTypeArray = new FSArray(jCas, semTypeArray.size());
    FeatureStructure[] semTypeFtrStructArray = new FeatureStructure[semTypeArray
        .size()];
    semTypeArray.toArray(semTypeFtrStructArray);
    sTypeArray.copyFromArray(semTypeFtrStructArray, 0, 0,
        semTypeFtrStructArray.length);
    tgtConcept.setTuis(sTypeArray);
  }

  private void populateSynonyms(JCas jCas, Concept c,
View Full Code Here

Examples of org.apache.uima.jcas.cas.FSArray.copyFromArray()

    if (matchedTokensFeature != null) {
      FSArray matchedTokens = new FSArray(getJCas(), matched.size());
      FeatureStructure[] featureStructArray = new FeatureStructure[matched.size()];
      matched.toArray(featureStructArray);
      matchedTokens.copyFromArray(featureStructArray, 0, 0, featureStructArray.length);
      annotation.setFeatureValue(matchedTokensFeature, matchedTokens);
      /*
       * FSArray tmp = (FSArray) annotation.getFeatureValue (matchedTokensFeature); FeatureStructure []
       * tmpfs = tmp.toArray (); System.err.println ("FSArray: begin"); for (int i = 0; i <
       * tmpfs.length; i++) { System.err.println (((Annotation) tmpfs[i]).getCoveredText ()); }
View Full Code Here

Examples of org.apache.uima.jcas.cas.FSArray.copyFromArray()

    if (matchedTokensFeature != null) {
      FSArray matchedTokens = new FSArray(getJCas(), matched.size());
      FeatureStructure[] featureStructArray = new FeatureStructure[matched.size()];
      matched.toArray(featureStructArray);
      matchedTokens.copyFromArray(featureStructArray, 0, 0, featureStructArray.length);
      annotation.setFeatureValue(matchedTokensFeature, matchedTokens);
      /*
       * FSArray tmp = (FSArray) annotation.getFeatureValue (matchedTokensFeature); FeatureStructure []
       * tmpfs = tmp.toArray (); System.err.println ("FSArray: begin"); for (int i = 0; i <
       * tmpfs.length; i++) { System.err.println (((Annotation) tmpfs[i]).getCoveredText ()); }
View Full Code Here

Examples of org.apache.uima.jcas.cas.IntegerArray.copyFromArray()

    return uimaSArray;
  }

  public static IntegerArray toIntegerArray(JCas jCas, int[] sArray) {
    IntegerArray uimaSArray = new IntegerArray(jCas, sArray.length);
    uimaSArray.copyFromArray(sArray, 0, 0, sArray.length);
    return uimaSArray;
  }

  public static <T extends FeatureStructure> List<T> toList(FSArray fsArray, Class<T> cls) {
    List<T> list = new ArrayList<T>();
View Full Code Here

Examples of org.apache.uima.jcas.cas.StringArray.copyFromArray()

          valuesClassicStringArray[i] = valueString;
          i++;
        }
        //System.out.println("Debug: this.values.size()>"+this.values.size()+"< valuesClassicStringArray.length>"+valuesClassicStringArray.length+"<");
        StringArray valuesStringArray = new StringArray( aJCas, i);
        valuesStringArray.copyFromArray(valuesClassicStringArray, 0, 0, i) ;
        featuresHashMap.put(arrayFeatureName, valuesStringArray);
      }

      //
      Set<Integer> colIdFeatNameKeySet = colIdFeatNameHashMap.keySet();
View Full Code Here

Examples of org.apache.uima.jcas.cas.StringArray.copyFromArray()

    return fsArray;
  }

  public static StringArray toStringArray(JCas jCas, String[] sArray) {
    StringArray uimaSArray = new StringArray(jCas, sArray.length);
    uimaSArray.copyFromArray(sArray, 0, 0, sArray.length);
    return uimaSArray;
  }

  public static DoubleArray toDoubleArray(JCas jCas, double[] sArray) {
    DoubleArray uimaSArray = new DoubleArray(jCas, sArray.length);
View Full Code Here

Examples of org.apache.uima.jcas.cas.StringArray.copyFromArray()

  private void populateSynonyms(JCas jCas, Concept c,
      edu.pitt.dbmi.nlp.noble.uima.types.Concept tgtConcept) {
    StringArray synonymStringArray = new StringArray(jCas,
        c.getSynonyms().length);
    synonymStringArray.copyFromArray(c.getSynonyms(), 0, 0,
        c.getSynonyms().length);
    tgtConcept.setSynonyms(synonymStringArray);
  }

  @SuppressWarnings("unused")
View Full Code Here

Examples of org.apache.uima.jcas.cas.StringArray.copyFromArray()

  private void populateSynonyms(JCas jCas, Concept c,
      edu.pitt.dbmi.nobletools.uima.types.Concept tgtConcept) {
    StringArray synonymStringArray = new StringArray(jCas,
        c.getSynonyms().length);
    synonymStringArray.copyFromArray(c.getSynonyms(), 0, 0,
        c.getSynonyms().length);
    tgtConcept.setSynonyms(synonymStringArray);
  }

  @SuppressWarnings("unused")
View Full Code Here

Examples of quicktime.util.QTHandle.copyFromArray()

    // than 00:00:00;00.  You need to adjust for endianness, as
    // seen in the revised (uncommented) line.
    // frameNums[0] = frameNumber;
    frameNums[0] = EndianOrder.flipNativeToBigEndian32(frameNumber);
    QTHandle frameNumHandle = new QTHandle (4, false);
    frameNumHandle.copyFromArray(0, frameNums, 0, 1);

    // create a time code description (sample to be added)
    TimeCodeDescription tcDesc = new TimeCodeDescription();
    tcDesc.setTimeCodeDef (tcDef);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.