Namespace funnyqt.edn

Printing/persisting and reading/loading query results and transformation traces as EDN.

Other Namespaces

Show/Hide
funnyqt.bidi
Bidirectional transformations (BX).
funnyqt.coevo.tg
Co-Evolution transformations on TGraphs.
funnyqt.emf
Core functions for accessing and manipulating EMF models.
funnyqt.extensional
Specify models extensionally.
funnyqt.generic
Generic protocols extended upon many different types, and generic functions.
funnyqt.in-place
In-place transformation stuff.
funnyqt.model2model
Rule-base out-place transformations similar to ATL or QVTo.
funnyqt.pmatch
Graph Pattern Matching on arbitrary models.
funnyqt.polyfns
Polymorphic functions dispatching on types of model elements.
funnyqt.query
Generic query functions like regular path expressions & quantified expressions.
funnyqt.query.emf
EMF-specific query functions
funnyqt.query.tg
TG-specific query functions
funnyqt.relational
Relational Model Querying.
funnyqt.tg
Core functions for accessing and manipulating TGraphs.
funnyqt.utils
Generic utility functions, e.g., for signaling errors, debugging, and profiling,
funnyqt.visualization
Model visualization functions.
funnyqt.xmltg
Convert XML to DOM-like TGraphs.
Index Page
Alphabetic Var Index

Public Vars

Usage Documentation

Show/Hide
Printing/persisting and reading/loading query results and transformation
  traces as EDN.
Back to top

Details of Public Vars

Dynamic Var: *edn-emf-store-resources-by-simple-name*

  If true, store references to EMF resources as simple names only.
  If false, store such references as URIs.

  Storing as simple names makes the EDN representation agnostic from the actual
  paths where the resources reside, i.e., even after a resource has been moved,
  the EDN data is still readable.  However, you can't have links to different
  resources with have the same simple name but are located in different
  directories.

  Storing as URIs considers the complete path (including file name).  Thus, you
  can store references to resources with the same simple name residing in
  different folders.  However, moving a resource will make the EDN unreadable.

  In both cases, renaming a resource makes the EDN unreadable.  In an ideal
  world, resources would have a unique identifier that gets intialized when a
  resource is created and then never changes afterwards, but that's just
  dreaming.
Back to top View Source

Dynamic Var: *models*

  Bound to a set of models during calls to `read-edn`, `read-string`, and
  `slurp`.
Back to top View Source

Protocol: IWriteEDN

Docstring:
==========

  Protocol for writing data as EDN.

  By default, all EDN types listed on http://edn-format.org are supported, plus
  several JGraLab types (Graph, Vertex, Edge) and EMF types (ResourceSet,
  Resource, EObject).

  To support other modeling frameworks, simply extend this protocol to its
  types, and also provide corresponding reader functions in `edn-readers`.

Extenders:
==========

  - nil
  - interface java.util.Map
  - class java.lang.Number
  - interface de.uni_koblenz.jgralab.Edge
  - interface java.util.Set
  - class java.lang.Boolean
  - interface org.eclipse.emf.ecore.resource.ResourceSet
  - class java.lang.Character
  - interface de.uni_koblenz.jgralab.Graph
  - interface org.eclipse.emf.ecore.EObject
  - interface de.uni_koblenz.jgralab.Vertex
  - interface java.util.Collection
  - class org.eclipse.emf.common.util.URI
  - class java.lang.String
  - interface org.eclipse.emf.ecore.resource.Resource
  - class clojure.lang.Symbol
  - class clojure.lang.Keyword

Signatures:
===========

  (write-edn obj out)
  
    Write the EDN representation of `obj` to `out` (a java.util.Writer).

Back to top View Source

Var: edn-readers

  A map of FunnyQT EDN tags to vars of functions that should be used for such
  an EDN data element.

  To add support for other data types, add readers here and implement the
  writing part by extending the `IWriteEDN` protocol upon these types.
Back to top View Source

Function: pr

Arglists:
=========

  (pr obj)

Docstring:
==========

  Prints `obj`s EDN representation to the current value of `*out*`.
Back to top View Source

Function: pr-str

Arglists:
=========

  (pr-str obj)

Docstring:
==========

  Returns `obj`s EDN representation as a string.
Back to top View Source

Function: prn

Arglists:
=========

  (prn obj)

Docstring:
==========

  Prints `obj`s EDN representation + newline to the current value of `*out*`.
Back to top View Source

Function: read

Arglists:
=========

  (read stream models)
  (read opts stream models)

Docstring:
==========

  Read and return one object from `stream` and consider references into/to `models`.
  For `opts` see `clojure.edn/read`.
Back to top View Source

Function: read-string

Arglists:
=========

  (read-string string models)
  (read-string opts string models)

Docstring:
==========

  Read and return one object from `string` and consider references into/to `models`.
  For `opts` see `clojure.edn/read-string`.
Back to top View Source

Function: slurp

Arglists:
=========

  (slurp file models)
  (slurp opts file models)

Docstring:
==========

  Read and return one object from `stream` and consider references into/to `models`.
  For `opts` see `clojure.edn/read`.
Back to top View Source

Function: spit

Arglists:
=========

  (spit obj file)

Docstring:
==========

  Spits `obj`s EDN representation to `file`.
  If the file already exists, it will be overwritten.
Back to top View Source

Method: write-edn

Specified by protocol IWriteEDN.

Arglists:
=========

  (write-edn obj out)

Docstring:
==========

  Write the EDN representation of `obj` to `out` (a java.util.Writer).
Back to top View Source