@Override public GradoopId getKey(Tuple2<K, GradoopId> value) throws Exception { return value.f0.getId(); } }
@Override public GradoopId getKey(EL element) throws Exception { return element.getId(); }
@Override public GradoopId getKey(Tuple2<K, GradoopId> value) throws Exception { return value.f0.getId(); } }
@Override public GradoopId map(EL element) throws Exception { return element.getId(); }
@Override public GradoopId map(EL element) throws Exception { return element.getId(); }
@Override public GradoopId getKey(EL element) throws Exception { return element.getId(); }
@Override public boolean filter(EL identifiable) throws Exception { return !ids.contains(identifiable.getId()); } }
@Override public boolean filter(EL identifiable) throws Exception { return ids.contains(identifiable.getId()); } }
@Override public boolean filter(EL identifiable) throws Exception { return !ids.contains(identifiable.getId()); } }
@Override public boolean filter(EL identifiable) throws Exception { return ids.contains(identifiable.getId()); } }
/** * Adds label and properties of an EPGM element to id-label and id-properties maps. * * @param element EPGM element * @param labels id-label map * @param properties id-properties map */ private static void addLabelsAndProperties( EPGMElement element, Map<GradoopId, String> labels, Map<GradoopId, Properties> properties ) { labels.put(element.getId(), element.getLabel()); Properties propertyList = element.getProperties(); if (propertyList != null && !propertyList.isEmpty()) { properties.put(element.getId(), propertyList); } }
/** * Adds label and properties of an EPGM element to id-label and id-properties maps. * * @param element EPGM element * @param labels id-label map * @param properties id-properties map */ private static void addLabelsAndProperties( EPGMElement element, Map<GradoopId, String> labels, Map<GradoopId, Properties> properties ) { labels.put(element.getId(), element.getLabel()); Properties propertyList = element.getProperties(); if (propertyList != null && !propertyList.isEmpty()) { properties.put(element.getId(), propertyList); } }
String id = elem.getId().toString(); Properties properties = elem.getProperties(); String lbl = StringUtils.isEmpty(label) ? id : label;
String id = elem.getId().toString(); Properties properties = elem.getProperties(); String lbl = StringUtils.isEmpty(label) ? id : label;
/** * Write an EPGM Element instance into table * * @param record gradoop EPGM element * @param writer accumulo batch writer * @param handler accumulo row handler * @param <T> element type */ private <T extends EPGMElement> void writeRecord( @Nonnull T record, @Nonnull BatchWriter writer, @Nonnull AccumuloRowHandler handler ) { Mutation mutation = new Mutation(record.getId().toString()); //noinspection unchecked mutation = handler.writeRow(mutation, record); try { writer.addMutation(mutation); if (autoFlush) { writer.flush(); } } catch (MutationsRejectedException e) { throw new RuntimeException(e); } }