Examples of Pairs


Examples of net.emaze.dysfunctional.Tuples.Pairs

            };
        }

        @Test
        public void pairsIsNotFinal() {
            new Pairs() {
            };
        }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.util.Pairs

  private void storeAnnotationVersion(JCas jcas) {
     FSIterator<TOP> itr = jcas.getJFSIndexRepository().getAllIndexedFS(Pairs.type);
    if (itr == null || !itr.hasNext())
      return;

    Pairs props = (Pairs) itr.next();

    // create a new property array that is one item bigger
    FSArray propArr = props.getPairs();
    FSArray newPropArr = new FSArray(jcas, propArr.size() + 1);
    for (int i = 0; i < propArr.size(); i++) {
      newPropArr.set(i, propArr.get(i));
    }

    Pair annotVerProp = new Pair(jcas);       
    annotVerProp.setAttribute(iv_annotVerPropKey);
    annotVerProp.setValue(String.valueOf(iv_annotVer));

    // add annotation version prop as last item in array
    newPropArr.set(newPropArr.size() - 1, annotVerProp);
    props.setPairs(newPropArr);
  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.util.Pairs

                sa.addToIndexes();
            }
           
            // Store meta data about the document
            Pairs propAnnot = new Pairs(plaintextView);
            Map metaDataMap = dmd.getMetaData();
           
            String docID = (String)metaDataMap.get(ClinicalNotePreProcessor.MD_KEY_DOC_ID);
          if (docID!=null) {
              DocumentID newDocId = new DocumentID(plaintextView);
              newDocId.setDocumentID(docID);
              newDocId.addToIndexes();
         
          }
           
            FSArray fsArr = new FSArray(plaintextView, metaDataMap.size());
            Iterator keyItr = metaDataMap.keySet().iterator();
            int pos = 0;
            while (keyItr.hasNext()) {

                String key = (String) keyItr.next();
                Object value = metaDataMap.get(key);

                if (value instanceof String) {
                    Pair prop = new Pair(plaintextView);              
                    prop.setAttribute(key);
                    prop.setValue((String) value);
                    fsArr.set(pos++, prop);
                }
                else if (value instanceof HashSet) {
                }

            }

            propAnnot.setPairs(fsArr);
            propAnnot.addToIndexes();
        }
        catch (Exception e) {
            throw new AnalysisEngineProcessException(e);
        }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.util.Pairs

  private void storeAnnotationVersion(JCas jcas) {
     FSIterator<TOP> itr = jcas.getJFSIndexRepository().getAllIndexedFS(Pairs.type);
    if (itr == null || !itr.hasNext())
      return;

    Pairs props = (Pairs) itr.next();

    // create a new property array that is one item bigger
    FSArray propArr = props.getPairs();
    FSArray newPropArr = new FSArray(jcas, propArr.size() + 1);
    for (int i = 0; i < propArr.size(); i++) {
      newPropArr.set(i, propArr.get(i));
    }

    Pair annotVerProp = new Pair(jcas);       
    annotVerProp.setAttribute(iv_annotVerPropKey);
    annotVerProp.setValue(String.valueOf(iv_annotVer));

    // add annotation version prop as last item in array
    newPropArr.set(newPropArr.size() - 1, annotVerProp);
    props.setPairs(newPropArr);
  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.util.Pairs

  private void storeAnnotationVersion(JCas jcas) {
     FSIterator<TOP> itr = jcas.getJFSIndexRepository().getAllIndexedFS(Pairs.type);
    if (itr == null || !itr.hasNext())
      return;

    Pairs props = (Pairs) itr.next();

    // create a new property array that is one item bigger
    FSArray propArr = props.getPairs();
    FSArray newPropArr = new FSArray(jcas, propArr.size() + 1);
    for (int i = 0; i < propArr.size(); i++) {
      newPropArr.set(i, propArr.get(i));
    }

    Pair annotVerProp = new Pair(jcas);       
    annotVerProp.setAttribute(iv_annotVerPropKey);
    annotVerProp.setValue(String.valueOf(iv_annotVer));

    // add annotation version prop as last item in array
    newPropArr.set(newPropArr.size() - 1, annotVerProp);
    props.setPairs(newPropArr);
  }
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.