Package org.openbel.framework.common.protonetwork.model.AnnotationValueTable

Examples of org.openbel.framework.common.protonetwork.model.AnnotationValueTable.TableAnnotationValue


            Map<Integer, TableAnnotationValue> annotationIndex = avt
                    .getIndexValue();
            Set<Integer> annotationIds = annotationIndex.keySet();
            for (Integer annotationId : annotationIds) {
                TableAnnotationValue value = annotationIndex.get(annotationId);

                tdvWriter.writeNext(new String[] {
                        String.valueOf(annotationId),
                        String.valueOf(value.getAnnotationDefinitionId()),
                        value.getAnnotationValue() });
                allWriter.writeNext(new String[] {
                        String.valueOf(annotationId),
                        String.valueOf(value.getAnnotationDefinitionId()),
                        value.getAnnotationValue() });
            }

            tdvWriter.close();
        } catch (IOException e) {
            final String name = avfile.getAbsolutePath();
View Full Code Here


                                        ap.getAnnotationDefinitionId());
                int newadid = protoNetwork1.getAnnotationDefinitionTable()
                        .addAnnotationDefinition(ad, documentId);

                // add original annotation value to acquire new id
                TableAnnotationValue av =
                        protoNetwork2.getAnnotationValueTable().getIndexValue()
                                .get(ap.getAnnotationValueId());
                int newavid = protoNetwork1.getAnnotationValueTable()
                        .addAnnotationValue(newadid,
                                av.getAnnotationValue());

                newaps.add(new AnnotationPair(newadid, newavid));
            }
        }
View Full Code Here

        Set<Entry<Integer, TableAnnotationValue>> annotationEntries = avt
                .getIndexValue().entrySet();
        for (Entry<Integer, TableAnnotationValue> annotationEntry : annotationEntries) {
            aps.setInt(1, (annotationEntry.getKey() + 1));

            TableAnnotationValue tableValue = annotationEntry.getValue();
            String value = tableValue.getAnnotationValue();

            int oid;
            Integer objectId = valueIndexMap.get(value);
            if (objectId != null) {
                oid = objectId;
            } else {
                oid = saveObject(1, value);
                valueIndexMap.put(value, oid);
            }

            aps.setInt(2, oid);
            aps.setInt(3, (tableValue.getAnnotationDefinitionId() + 1));
            aps.addBatch();
        }

        aps.executeBatch();
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.protonetwork.model.AnnotationValueTable.TableAnnotationValue

Copyright © 2018 www.massapicom. 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.