Giter Club home page Giter Club logo

angulillos's Introduction

Angulillos<?>

Angulillos is a Java 8 library for working with strongly typed graph data in a generic way.

You write graph schemas using the Java type system, with graph traversals being statically checked over graph schemas. The same schemas and traversals can then be used with any graph technology implementing the Angulillos API.

See also the bio4j/angulillos-titan repo with the implementation of Angulillos API for the Titan graph database.

This library was developed for the Bio4j bioinformatics graph data platform. But it can be used for working with any kind of graph structured data.

Some notes about the code

If you are going to read the code and probably use it, you may find these notes useful.

General notes about types

  • Edge source and target vertices don't have to be from the same graph (note the wildcards in the API). This allows you to have a graph with edges that connect vertices of two other independent graphs.
  • But all vertices and edges that interact through this API have to have the same raw types (RV,RE).

Type variables naming convention

Most frequently used things:

  • V stands for Vertex
  • E stands for Edge. Plus in the context of an edge
    • S stands for its Source vertex
    • T stands for its Target vertex
  • *T suffix stands for Type for any of the above (e.g. VT is Vertex Type)
  • G stands for Graph
  • R* prefix means Raw. These are shared among all other types in the API:
    • RV stands for Raw Vertex type
    • RE stands for Raw Edge type

Now less frequently used things have not so nice, but unambiguous names:

  • F for Element, because E is used for Edge and F is just the closes letter
  • X for the property value type, because V is used for Vertex and X looks like an arbitrary type variable

Type variables order convention

  1. All graph element types (i.e. vertices and edges) come in pairs: typed element and its type. For example:

    • Vertex and its type:

      <
        V  extends      TypedVertex<V,VT, G,RV,RE>,
        VT extends TypedVertex.Type<V,VT, G,RV,RE>
      >
    • Edge and its type:

      <
        E  extends      TypedEdge<S,ST, E,ET, T,TT, G,RV,RE>,
        ET extends TypedEdge.Type<S,ST, E,ET, T,TT, G,RV,RE>
      >
  2. The order of edge primary parameters is source, then edge itself, then target. And in general, when you mention edge and its source or target, you put source-related things before the edge and target-related things after it.

  3. Almost all types have graph G, raw vertex RV and raw edge RE types and they are placed in the end of the list (see examples above). To improve readability, it's recommended to put a space between the paired type variables and these three.

angulillos's People

Contributors

eparejatobes avatar laughedelic avatar pablopareja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.