object KafkaTopologyUtils extends Logging
- Alphabetic
- By Inheritance
- KafkaTopologyUtils
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- 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
- def getId(record: String): String
Get the id of the record
- 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
- def getParentId(record: String): String
Get the parent id from the solr document Return empty string if no parent id found
- def getSolrClient: SolrJClientWrapper
- 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
- def hasChildren(recordId: String): Boolean
Check if there are records in Solr where the hierarchy_parent_id has the value of the current record
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hierarchyEnriched(record: String): String
Main method.
Main method. Build the hierarchies and mark the archives without children
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)