o

ch.swisscollections

KafkaTopologyUtils

object KafkaTopologyUtils extends Logging

Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaTopologyUtils
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def buildHierarchies(record: String): String

    Add, when relevant, the following fields to the record <field name="hierarchy_top_id"> <field name="hierarchy_top_title"> <field name="hierarchytype"> <field name="hierarchy_parent_id">

    Add, when relevant, the following fields to the record <field name="hierarchy_top_id"> <field name="hierarchy_top_title"> <field name="hierarchytype"> <field name="hierarchy_parent_id">

    To do this we need to climb up the hierarchy up to the top ancestor We do this using an already populated solr index

    The current hierarchy_parent_id is replaced by a solr id

    See https://vufind.org/wiki/indexing:hierarchies_and_collections for more info

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def get2ndLevelFacetValues(recordAsXml: Node, facet: String): Seq[String]

    Returns an array of the values of the 2nd level (starting with 1) of a facet For example for <field name="topic_tectonic_str_mv">1/Bildende Kunst/Amberg, Anton (1802-1883)/</field> <field name="topic_tectonic_str_mv">0/Bildende Kunst/</field>

    Returns an array of the values of the 2nd level (starting with 1) of a facet For example for <field name="topic_tectonic_str_mv">1/Bildende Kunst/Amberg, Anton (1802-1883)/</field> <field name="topic_tectonic_str_mv">0/Bildende Kunst/</field>

    <field name="topic_tectonic_str_mv">1/Musik/Amberg, Anton (1802-1883)/</field> <field name="topic_tectonic_str_mv">0/Musik/</field>

    It will return [ "1/Bildende Kunst/Amberg, Anton (1802-1883)/", "1/Musik/Amberg, Anton (1802-1883)/" ]

    recordAsXml

    the record

    facet

    the facet we want to retrieve

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def getDocumentBasedOnAnyIdentifier(possibleIdentifier: String): Option[SolrDocument]

    Get a record based on a solr identifier or another identifier (which should be in ctrlnum solr field)

    Get a record based on a solr identifier or another identifier (which should be in ctrlnum solr field)

    returns

    the document

  12. def getId(record: String): String

    Get the id of the record

  13. def getLowestFacetValue(recordAsXml: Node, facet: String): Option[String]

    Returns the lowest facet value of a hierarchical facet For example for <field name="tectonics_str_mv">2/LUZHB/Archive von Personen und Organisationen/Amberg, Anton (1802-1883)/</field> <field name="tectonics_str_mv">1/LUZHB/Archive von Personen und Organisationen/</field> <field name="tectonics_str_mv">0/LUZHB/</field>

    Returns the lowest facet value of a hierarchical facet For example for <field name="tectonics_str_mv">2/LUZHB/Archive von Personen und Organisationen/Amberg, Anton (1802-1883)/</field> <field name="tectonics_str_mv">1/LUZHB/Archive von Personen und Organisationen/</field> <field name="tectonics_str_mv">0/LUZHB/</field>

    That will be the first one (starting with 2)

    recordAsXml

    the record

    facet

    the facet we want to retrieve

  14. def getParentId(record: String): String

    Get the parent id from the solr document Return empty string if no parent id found

  15. def getSolrClient: SolrJClientWrapper
  16. def getTopAncestorId(parentId: String, level: Int = 1): String

    Return top ancestor id if available If some parents are not in solr returns ""

    Return top ancestor id if available If some parents are not in solr returns ""

    parentId

    the id of the parent record

    level

    the number of level we climb before we exit the loop

    returns

    string, the solr id of the top ancestor

  17. def hasChildren(recordId: String): Boolean

    Check if there are records in Solr where the hierarchy_parent_id has the value of the current record

  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  19. def hierarchyEnriched(record: String): String

    Main method.

    Main method. Build the hierarchies and mark the archives without children

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. val logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  22. def markArchivesWithoutChildren(record: String): String

    Some archives don't have children.

    Some archives don't have children. Only the "Fonds=Bestand" is in the catalog, not the child records. To ensure a good tectonics display, we need to mark such records.

    Decision is to change the facet value of the fields tectonics_str_mv and topic_tectonic_str_mv to add an underscore at the end

    Archives with children are not changed at all

    returns

    the record modified for archives without children

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped