Liking cljdoc? Tell your friends :D

com.eldrix.hermes.impl.mapdb

A store implemented using mapdb

A store implemented using mapdb
raw docstring

closeclj

(close store)
source

compactclj

(compact store)
source

ConceptSerializerclj

source

default-optsclj

source

DescriptionSerializerclj

source

get-component-refset-idsclj

(get-component-refset-ids store component-id)

Return the refset-ids to which this component belongs.

Return the refset-ids to which this component belongs.
sourceraw docstring

get-component-refset-itemsclj

(get-component-refset-items store component-id)
(get-component-refset-items store component-id refset-id)

Get the refset items for the given component, optionally limited to the refset specified.

  • store : MapDBStore
  • component-id : id of the component (e.g concept-id or description-id)
  • refset-id : (optional) - limit to this refset.
Get the refset items for the given component, optionally
limited to the refset specified.
- store        : MapDBStore
- component-id : id of the component (e.g concept-id or description-id)
- refset-id    : (optional) - limit to this refset.
sourceraw docstring

get-conceptclj

(get-concept store concept-id)

Returns the concept specified.

Returns the concept specified.
sourceraw docstring

get-concept-descriptionsclj

(get-concept-descriptions store concept-id)

Return the descriptions for the concept specified.

Return the descriptions for the concept specified.
sourceraw docstring

get-descriptionclj

(get-description store description-id)

Return the description with the given description-id. This uses the descriptionId-conceptId index to determine the concept-id, as all descriptions are actually stored by conceptId-descriptionId-concept because that's a more common operation that finding a description by identifier alone.

Return the description with the given `description-id`.
This uses the descriptionId-conceptId index to determine the concept-id,
as all descriptions are actually stored by conceptId-descriptionId-concept because
that's a more common operation that finding a description by identifier alone.
sourceraw docstring

get-installed-reference-setsclj

(get-installed-reference-sets store)

Returns a set of identifiers representing installed reference sets.

While it is possible to use the SNOMED ontology to find all reference sets:

(get-leaves store (get-all-children store 900000000000455006))

That might return reference sets with no actual members in the installed edition. Instead, we keep track of installed reference sets as we import reference set items, thus ensuring we have a list that contains only reference sets with members.

Returns a set of identifiers representing installed reference sets.

While it is possible to use the SNOMED ontology to find all reference sets:
  ```
  (get-leaves store (get-all-children store 900000000000455006))
  ```
That might return reference sets with no actual members in the installed
edition. Instead, we keep track of installed reference sets as we import
reference set items, thus ensuring we have a list that contains only
reference sets with members.
sourceraw docstring

get-raw-child-relationshipsclj

(get-raw-child-relationships store concept-id)
(get-raw-child-relationships store concept-id type-id)

Return the child relationships of the given concept. Returns a list of tuples (from--type--group--to).

Return the child relationships of the given concept.
Returns a list of tuples (from--type--group--to).
sourceraw docstring

get-raw-parent-relationshipsclj

(get-raw-parent-relationships store concept-id)
(get-raw-parent-relationships store concept-id type-id)

Return the parent relationships of the given concept. Returns a list of tuples (from--type--group--to).

Return the parent relationships of the given concept.
Returns a list of tuples (from--type--group--to).
sourceraw docstring

get-refset-field-namesclj

(get-refset-field-names store refset-id)

Returns the field names for the given reference set.

The reference set descriptors provide a human-readable description and a type for each column in a reference set, but do not include the camel-cased column identifier in the original source file. On import, we store those column names and provide the lookup here.

Returns the field names for the given reference set.

The reference set descriptors provide a human-readable description and a type
for each column in a reference set, but do not include the camel-cased column
identifier in the original source file. On import, we store those column names
and provide the lookup here.
sourceraw docstring

get-refset-itemclj

(get-refset-item store uuid)
(get-refset-item store msb lsb)

Get the specified refset item. Parameters:

  • store : MapDBStore
  • UUID : the UUID of the refset item to fetch
  • msb/lsb : the most and least significant 64-bit longs representing the UUID.
Get the specified refset item.
Parameters:
- store : MapDBStore
- UUID  : the UUID of the refset item to fetch
- msb/lsb : the most and least significant 64-bit longs representing the UUID.
sourceraw docstring

get-relationshipclj

(get-relationship store relationship-id)
source

get-source-association-referenced-componentsclj

(get-source-association-referenced-components store component-id refset-id)

Returns a sequence of component identifiers that reference the specified component in the specified association reference set.

Returns a sequence of component identifiers that reference the specified
component in the specified association reference set.
sourceraw docstring

get-source-associationsclj

(get-source-associations store component-id)
(get-source-associations store component-id refset-id)

Returns the associations in which this component is the target. targetComponentId - refsetId - itemId1 -itemId2.

Returns the associations in which this component is the target.
targetComponentId - refsetId - itemId1 -itemId2.
sourceraw docstring

open-bucketclj

(open-bucket db nm key-serializer value-serializer)

Create or open the named b-tree map with the specified value and key serializers.

Parameters:

  • db - mapdb database (org.mapdb.DB)
  • key-serializer - serializer for key
  • value-serializer - serializer for value.
Create or open the named b-tree map with the specified value and key
serializers.

Parameters:
- db               - mapdb database (org.mapdb.DB)
- key-serializer   - serializer for key
- value-serializer - serializer for value.
sourceraw docstring

open-indexclj

(open-index db nm)
(open-index db nm serializer)

Create or open the named set, by default, made up of an array of java long primitives.

  • db : mapdb database
  • nm : name of index
  • serializer : serializer to use, by default LONG_ARRAY
Create or open the named set, by default, made up of an array of java long primitives.
- db         : mapdb database
- nm         : name of index
- serializer : serializer to use, by default LONG_ARRAY
sourceraw docstring

open-storeclj

(open-store)
(open-store filename)
(open-store filename opts)
source

RefsetFieldNamesSerializerclj

source

RefsetItemSerializerclj

source

RelationshipSerializerclj

source

statusclj

(status store)
source

stream-all-conceptsclj

(stream-all-concepts store ch)
(stream-all-concepts store ch close?)

Asynchronously stream all concepts to the channel specified, and, by default, closing the channel when done unless specified. Returns a channel which, by default, will be closed when done.

Asynchronously stream all concepts to the channel specified, and, by default,
closing the channel when done unless specified.
Returns a channel which, by default, will be closed when done.
sourceraw docstring

stream-all-refset-itemsclj

(stream-all-refset-items store ch)
(stream-all-refset-items store ch close?)
source

write-conceptsclj

(write-concepts store concepts)
source

write-descriptionsclj

(write-descriptions store descriptions)

Write a batch of descriptions, updating indices when appropriate.

Note unlike other indices, we write in both active and inactive. | Index | Compound key | |:------------------------|:-----------------------------| | .descriptionsConcept | descriptionId -- conceptId |

Write a batch of descriptions, updating indices when appropriate.

Note unlike other indices, we write in both active and inactive.
| Index                   | Compound key                 |
|:------------------------|:-----------------------------|
| .descriptionsConcept    | descriptionId -- conceptId   |
sourceraw docstring

write-objectclj

(write-object bucket o)
(write-object bucket o k)
(write-object bucket o k attempt)

Write an object into a bucket. Parameters:

  • bucket : bucket to which to write
  • o : object
  • k : (optional; the key to use). Correctly handles atomicity and only writes the object if the effectiveTime of the entity is newer than the version that already exists in that bucket. Returns true if object was written.
Write an object into a bucket.
Parameters:
- bucket : bucket to which to write
- o      : object
- k      : (optional; the key to use).
Correctly handles atomicity and only writes the object if the effectiveTime of
the entity is newer than the version that already exists in that bucket.
Returns true if object was written.
sourceraw docstring

write-refset-itemsclj

(write-refset-items store headings items)

Write a batch of refset items, updating indices when appropriate.

Processes each refset item, recording an index to allow lookup of items in the following buckets using the defined keys: | index | simple or compound key | |:--------------------|:-----------------------------------------------------| | .componentRefsets | referencedComponentId - refsetId - itemId1 - itemId2 | | .refsetFieldNames | refsetId -- headings | .associations | targetComponentId - refsetId - | | | - referencedComponentId - itemId1 -itemId2 |

An itemID is a 128 bit integer (UUID) so is stored as two longs (itemId1 itemId2).

Write a batch of refset items, updating indices when appropriate.

Processes each refset item, recording an index to allow lookup of items in the
following buckets using the defined keys:
| index               | simple or compound key                               |
|:--------------------|:-----------------------------------------------------|
| .componentRefsets   | referencedComponentId - refsetId - itemId1 - itemId2 |
| .refsetFieldNames   | refsetId -- headings
| .associations       | targetComponentId - refsetId -                       |
|                     |  - referencedComponentId - itemId1 -itemId2          |

 An itemID is a 128 bit integer (UUID) so is stored as two longs (itemId1
itemId2).
sourceraw docstring

write-relationshipsclj

(write-relationships store relationships)

Write a batch of relationships, updating indices when appropriate.

This populates the child and parent relationship indices. | Index | Compound key | |:----------------------------|:---------------------------------------------| | .conceptChildRelationships | destinationId -- typeId -- group -- sourceId | | .conceptParentRelationships | sourceId -- typeId -- group -- destinationId |

Write a batch of relationships, updating indices when appropriate.

 This populates the child and parent relationship indices.
| Index                       | Compound key                                 |
|:----------------------------|:---------------------------------------------|
| .conceptChildRelationships  | destinationId -- typeId -- group -- sourceId |
| .conceptParentRelationships | sourceId -- typeId -- group -- destinationId |
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close