Tabnine Logo
GradoopFlinkConfig.getVertexFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
getVertexFactory
method
in
org.gradoop.flink.util.GradoopFlinkConfig

Best Java code snippets using org.gradoop.flink.util.GradoopFlinkConfig.getVertexFactory (Showing top 20 results out of 315)

origin: dbs-leipzig/gradoop

/**
 * {@inheritDoc}
 *
 * The factory is passed from {@link GradoopFlinkConfig} at the moment.
 */
@Override
public EPGMVertexFactory<Vertex> getVertexFactory() {
 return config.getVertexFactory();
}
origin: org.gradoop/gradoop-flink

/**
 * {@inheritDoc}
 *
 * The factory is passed from {@link GradoopFlinkConfig} at the moment.
 */
@Override
public EPGMVertexFactory<Vertex> getVertexFactory() {
 return config.getVertexFactory();
}
origin: org.gradoop/gradoop-flink

/**
 * {@inheritDoc}
 *
 * The factory is passed from {@link GradoopFlinkConfig} at the moment.
 */
@Override
public EPGMVertexFactory<Vertex> getVertexFactory() {
 return config.getVertexFactory();
}
origin: dbs-leipzig/gradoop

/**
 * {@inheritDoc}
 *
 * The factory is passed from {@link GradoopFlinkConfig} at the moment.
 */
@Override
public EPGMVertexFactory<Vertex> getVertexFactory() {
 return config.getVertexFactory();
}
origin: org.gradoop/gradoop-flink

/**
 * Constructor.
 *
 * @param config Gradoop configuration
 */
public SubgraphDecoder(GradoopFlinkConfig config) {
 vertexFactory = config.getVertexFactory();
 graphHeadFactory = config.getGraphHeadFactory();
 edgeFactory = config.getEdgeFactory();
}
origin: org.gradoop/gradoop-flink

/**
 * Valued constructor.
 *
 * @param config gradoop flink config
 */
public GraphTransactionFromText(GradoopFlinkConfig config) {
 this.graphHeadFactory = config.getGraphHeadFactory();
 this.vertexFactory = config.getVertexFactory();
 this.edgeFactory = config.getEdgeFactory();
}
origin: dbs-leipzig/gradoop

/**
 * Valued constructor.
 *
 * @param config gradoop flink config
 */
public GraphTransactionFromText(GradoopFlinkConfig config) {
 this.graphHeadFactory = config.getGraphHeadFactory();
 this.vertexFactory = config.getVertexFactory();
 this.edgeFactory = config.getEdgeFactory();
}
origin: dbs-leipzig/gradoop

/**
 * Constructor.
 *
 * @param config Gradoop configuration
 */
public SubgraphDecoder(GradoopFlinkConfig config) {
 vertexFactory = config.getVertexFactory();
 graphHeadFactory = config.getGraphHeadFactory();
 edgeFactory = config.getEdgeFactory();
}
origin: dbs-leipzig/gradoop

/**
 * Reads the csv file specified by {@link MinimalCSVImporter#path} and converts each valid line
 * to a {@link Vertex}.
 *
 * @param propertyNames list of the property identifier names
 * @param checkReoccurringHeader set to true if each row of the file should be checked for
 *                               reoccurring of the column property names
 * @return a {@link DataSet} of all vertices from one specific file
 */
private DataSet<Vertex> readCSVFile(List<String> propertyNames, boolean checkReoccurringHeader) {
 return config.getExecutionEnvironment()
  .readTextFile(path)
  .flatMap(new CsvRowToProperties(tokenSeparator, propertyNames, checkReoccurringHeader))
  .map(new PropertiesToVertex<>(config.getVertexFactory()))
  .returns(config.getVertexFactory().getType());
}
origin: dbs-leipzig/gradoop

@Override
public LogicalGraph getLogicalGraph() {
 DataSet<Vertex> vertices = config.getExecutionEnvironment().readTextFile(jsonPath)
  .map(new MinimalJsonToVertex(config.getVertexFactory()));
 return config.getLogicalGraphFactory().fromDataSets(vertices);
}
origin: org.gradoop/gradoop-flink

/**
 * Creates a vertex dataset from a given collection.
 * Encapsulates the workaround for dataset creation from an empty collection.
 *
 * @param vertices  vertex collection
 * @return vertex dataset
 */
protected DataSet<Vertex> createVertexDataSet(Collection<Vertex> vertices) {
 ExecutionEnvironment env = getConfig().getExecutionEnvironment();
 DataSet<Vertex> vertexSet;
 if (vertices.isEmpty()) {
  vertexSet = env
   .fromElements(getConfig().getVertexFactory().createVertex())
   .filter(new False<>());
 } else {
  vertexSet = env.fromCollection(vertices);
 }
 return vertexSet;
}
origin: dbs-leipzig/gradoop

/**
 * Creates a vertex dataset from a given collection.
 * Encapsulates the workaround for dataset creation from an empty collection.
 *
 * @param vertices  vertex collection
 * @return vertex dataset
 */
protected DataSet<Vertex> createVertexDataSet(Collection<Vertex> vertices) {
 ExecutionEnvironment env = getConfig().getExecutionEnvironment();
 DataSet<Vertex> vertexSet;
 if (vertices.isEmpty()) {
  vertexSet = env
   .fromElements(getConfig().getVertexFactory().createVertex())
   .filter(new False<>());
 } else {
  vertexSet = env.fromCollection(vertices);
 }
 return vertexSet;
}
origin: org.gradoop/gradoop-flink

@Override
public LogicalGraph getLogicalGraph() throws IOException {
 MetaData metaData = MetaData.fromFile(getMetaDataPath(), hdfsConfig);
 ExecutionEnvironment env = getConfig().getExecutionEnvironment();
 VertexFactory vertexFactory = getConfig().getVertexFactory();
 EdgeFactory edgeFactory = getConfig().getEdgeFactory();
 Map<String, DataSet<Vertex>> vertices = metaData.getVertexLabels().stream()
  .map(l -> Tuple2.of(l, env.readTextFile(getVertexCSVPath(l))
   .map(new CSVLineToVertex(vertexFactory))
   .withBroadcastSet(MetaData.fromFile(getMetaDataPath(), getConfig()), BC_METADATA)))
  .collect(Collectors.toMap(t -> t.f0, t -> t.f1));
 Map<String, DataSet<Edge>> edges = metaData.getEdgeLabels().stream()
  .map(l -> Tuple2.of(l, env.readTextFile(getEdgeCSVPath(l))
   .map(new CSVLineToEdge(edgeFactory))
   .withBroadcastSet(MetaData.fromFile(getMetaDataPath(), getConfig()), BC_METADATA)))
  .collect(Collectors.toMap(t -> t.f0, t -> t.f1));
 return getConfig().getLogicalGraphFactory().fromIndexedDataSets(vertices, edges);
}
origin: dbs-leipzig/gradoop

@Override
public LogicalGraph getLogicalGraph() throws IOException {
 MetaData metaData = MetaData.fromFile(getMetaDataPath(), hdfsConfig);
 ExecutionEnvironment env = getConfig().getExecutionEnvironment();
 VertexFactory vertexFactory = getConfig().getVertexFactory();
 EdgeFactory edgeFactory = getConfig().getEdgeFactory();
 Map<String, DataSet<Vertex>> vertices = metaData.getVertexLabels().stream()
  .map(l -> Tuple2.of(l, env.readTextFile(getVertexCSVPath(l))
   .map(new CSVLineToVertex(vertexFactory))
   .withBroadcastSet(MetaData.fromFile(getMetaDataPath(), getConfig()), BC_METADATA)))
  .collect(Collectors.toMap(t -> t.f0, t -> t.f1));
 Map<String, DataSet<Edge>> edges = metaData.getEdgeLabels().stream()
  .map(l -> Tuple2.of(l, env.readTextFile(getEdgeCSVPath(l))
   .map(new CSVLineToEdge(edgeFactory))
   .withBroadcastSet(MetaData.fromFile(getMetaDataPath(), getConfig()), BC_METADATA)))
  .collect(Collectors.toMap(t -> t.f0, t -> t.f1));
 return getConfig().getLogicalGraphFactory().fromIndexedDataSets(vertices, edges);
}
origin: dbs-leipzig/gradoop

/**
 * Initialize this test.
 */
@Before
public void setUp() {
 vertexFactory = getConfig().getVertexFactory();
 expectedValue = vertexFactory.createVertex(MinimalJsonToVertex.JSON_VERTEX_LABEL);
 function = new MinimalJsonToVertex(vertexFactory);
}
origin: org.gradoop/gradoop-flink

/**
 * Extracts a {@link GraphCollection} from a set of {@link Element}.
 *
 * @param elements  EPGM elements
 * @param config        Gradoop Flink config
 * @param mayOverlap    elements may be contained in multiple graphs
 * @return Graph collection
 */
@SuppressWarnings("unchecked")
public static GraphCollection extractGraphCollection(
 DataSet<Element> elements, GradoopFlinkConfig config, boolean mayOverlap) {
 Class<GraphHead> graphHeadType = config.getGraphHeadFactory().getType();
 Class<Vertex> vertexType = config.getVertexFactory().getType();
 Class<Edge> edgeType = config.getEdgeFactory().getType();
 return config.getGraphCollectionFactory().fromDataSets(
  extractGraphHeads(elements, graphHeadType),
  extractVertices(elements, vertexType, mayOverlap),
  extractEdges(elements, edgeType, mayOverlap)
 );
}
origin: dbs-leipzig/gradoop

@Override
public LogicalGraph getLogicalGraph() {
 DataSet<Tuple3<String, String, String>> metaData =
  MetaData.fromFile(getMetaDataPath(), getConfig());
 DataSet<Vertex> vertices = getConfig().getExecutionEnvironment()
  .readTextFile(getVertexCSVPath())
  .map(new CSVLineToVertex(getConfig().getVertexFactory()))
  .withBroadcastSet(metaData, BC_METADATA);
 DataSet<Edge> edges = getConfig().getExecutionEnvironment()
  .readTextFile(getEdgeCSVPath())
  .map(new CSVLineToEdge(getConfig().getEdgeFactory()))
  .withBroadcastSet(metaData, BC_METADATA);
 return getConfig().getLogicalGraphFactory().fromDataSets(vertices, edges);
}
origin: org.gradoop/gradoop-flink

@Override
public LogicalGraph getLogicalGraph() {
 DataSet<Tuple3<String, String, String>> metaData =
  MetaData.fromFile(getMetaDataPath(), getConfig());
 DataSet<Vertex> vertices = getConfig().getExecutionEnvironment()
  .readTextFile(getVertexCSVPath())
  .map(new CSVLineToVertex(getConfig().getVertexFactory()))
  .withBroadcastSet(metaData, BC_METADATA);
 DataSet<Edge> edges = getConfig().getExecutionEnvironment()
  .readTextFile(getEdgeCSVPath())
  .map(new CSVLineToEdge(getConfig().getEdgeFactory()))
  .withBroadcastSet(metaData, BC_METADATA);
 return getConfig().getLogicalGraphFactory().fromDataSets(vertices, edges);
}
origin: dbs-leipzig/gradoop

@BeforeClass
public static void setup() {
 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env);
 g0 = config.getGraphHeadFactory().createGraphHead("A");
 g1 = config.getGraphHeadFactory().createGraphHead("B");
 v0 = config.getVertexFactory().createVertex("A");
 v1 = config.getVertexFactory().createVertex("B");
 v2 = config.getVertexFactory().createVertex("C");
 e0 = config.getEdgeFactory().createEdge("a", v0.getId(), v1.getId());
 e1 = config.getEdgeFactory().createEdge("b", v1.getId(), v2.getId());
 v0.addGraphId(g0.getId());
 v1.addGraphId(g0.getId());
 v1.addGraphId(g1.getId());
 v2.addGraphId(g1.getId());
 e0.addGraphId(g0.getId());
 e1.addGraphId(g1.getId());
}
origin: org.gradoop/gradoop-flink

 @Override
 public GraphCollection getGraphCollection() {
  DataSet<Tuple3<String, String, String>> metaData =
   new CSVMetaDataSource().readDistributed(getMetaDataPath(), getConfig());

  DataSet<GraphHead> graphHeads = getConfig().getExecutionEnvironment()
   .readTextFile(getGraphHeadCSVPath())
   .map(new CSVLineToGraphHead(getConfig().getGraphHeadFactory()))
   .withBroadcastSet(metaData, BC_METADATA);

  DataSet<Vertex> vertices = getConfig().getExecutionEnvironment()
   .readTextFile(getVertexCSVPath())
   .map(new CSVLineToVertex(getConfig().getVertexFactory()))
   .withBroadcastSet(metaData, BC_METADATA);

  DataSet<Edge> edges = getConfig().getExecutionEnvironment()
   .readTextFile(getEdgeCSVPath())
   .map(new CSVLineToEdge(getConfig().getEdgeFactory()))
   .withBroadcastSet(metaData, BC_METADATA);


  return getConfig().getGraphCollectionFactory().fromDataSets(graphHeads, vertices, edges);
 }
}
org.gradoop.flink.utilGradoopFlinkConfiggetVertexFactory

Popular methods of GradoopFlinkConfig

  • getGraphCollectionFactory
    Returns a factory that is able to create graph collection layouts.
  • getExecutionEnvironment
    Returns the Flink execution environment.
  • getEdgeFactory
  • getLogicalGraphFactory
    Returns a factory that is able to create logical graph layouts.
  • createConfig
    Creates a Gradoop Flink configuration using the given parameters.
  • getGraphHeadFactory
  • <init>
    Creates a new Configuration.
  • setGraphCollectionLayoutFactory
    Sets the layout factory for building layouts that represent a GraphCollection.
  • setLogicalGraphLayoutFactory
    Sets the layout factory for building layouts that represent a LogicalGraph.

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JOptionPane (javax.swing)
  • JPanel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now