Class ScholixFlat

java.lang.Object
eu.dnetlib.dhp.schema.sx.scholix.flat.ScholixFlat

public class ScholixFlat extends Object
Flat representation of a Scholix link stored in the ScholExplorer ElasticSearch index.

The standard Scholix data model is hierarchical: a Scholix object contains nested ScholixResource objects for the source and target, each carrying structured sub-objects (identifiers, publishers, collected-from information, etc.). Indexing nested objects in ElasticSearch introduces complexity when querying across parent/child boundaries, so this bean denormalises the full link into a single, flat document that is easy to index, filter and aggregate directly.

Each instance describes one directed relationship between two scholarly research objects (e.g. a dataset linked to a publication). Source and target descriptors are stored as parallel lists where positional correspondence is preserved: element i of sourcePid belongs to the PID scheme stored at element i of sourcePidType, and likewise for the target.

Typical usage:


 ScholixFlat link = new ScholixFlat();
 link.setIdentifier("abc123");
 link.setRelationType("isSupplementTo");
 link.setSourceId("50|doi_dedup_____::...");
 link.setSourceType("dataset");
 link.setTargetId("50|doi_dedup_____::...");
 link.setTargetType("publication");
 
See Also:
  • Constructor Details

    • ScholixFlat

      public ScholixFlat()
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Returns the unique identifier of this link record.
      Returns:
      the link identifier, or null if not set
    • setIdentifier

      public void setIdentifier(String identifier)
      Sets the unique identifier of this link record.
      Parameters:
      identifier - the link identifier
    • getRelationType

      public String getRelationType()
      Returns the type of relationship between source and target.
      Returns:
      the relation type (e.g. "isSupplementTo"), or null if not set
    • setRelationType

      public void setRelationType(String relationType)
      Sets the type of relationship between source and target.
      Parameters:
      relationType - the relation type
    • getSourceId

      public String getSourceId()
      Returns the internal D-Net identifier of the source resource.
      Returns:
      the source D-Net identifier, or null if not set
    • setSourceId

      public void setSourceId(String sourceId)
      Sets the internal D-Net identifier of the source resource.
      Parameters:
      sourceId - the source D-Net identifier
    • getSourceType

      public String getSourceType()
      Returns the high-level object type of the source resource.
      Returns:
      the source object type (e.g. "dataset"), or null if not set
    • setSourceType

      public void setSourceType(String sourceType)
      Sets the high-level object type of the source resource.
      Parameters:
      sourceType - the source object type
    • getSourceSubType

      public String getSourceSubType()
      Returns the sub-type of the source resource.
      Returns:
      the source sub-type, or null if not available
    • setSourceSubType

      public void setSourceSubType(String sourceSubType)
      Sets the sub-type of the source resource.
      Parameters:
      sourceSubType - the source sub-type
    • getSourcePid

      public List<String> getSourcePid()
      Returns the list of PID values for the source resource. Positionally aligned with getSourcePidType().
      Returns:
      list of source PIDs, or null if not set
    • setSourcePid

      public void setSourcePid(List<String> sourcePid)
      Sets the list of PID values for the source resource. Must be kept positionally aligned with sourcePidType.
      Parameters:
      sourcePid - list of source PID values
    • getSourcePidType

      public List<String> getSourcePidType()
      Returns the list of PID scheme names for the source resource. Positionally aligned with getSourcePid().
      Returns:
      list of source PID types (e.g. "doi"), or null if not set
    • setSourcePidType

      public void setSourcePidType(List<String> sourcePidType)
      Sets the list of PID scheme names for the source resource. Must be kept positionally aligned with sourcePid.
      Parameters:
      sourcePidType - list of source PID scheme names
    • getSourcePublisher

      public List<String> getSourcePublisher()
      Returns the names of the publishers of the source resource.
      Returns:
      list of source publisher names, or null if not set
    • setSourcePublisher

      public void setSourcePublisher(List<String> sourcePublisher)
      Sets the names of the publishers of the source resource.
      Parameters:
      sourcePublisher - list of source publisher names
    • getTargetId

      public String getTargetId()
      Returns the internal D-Net identifier of the target resource.
      Returns:
      the target D-Net identifier, or null if not set
    • setTargetId

      public void setTargetId(String targetId)
      Sets the internal D-Net identifier of the target resource.
      Parameters:
      targetId - the target D-Net identifier
    • getTargetType

      public String getTargetType()
      Returns the high-level object type of the target resource.
      Returns:
      the target object type (e.g. "literature"), or null if not set
    • setTargetType

      public void setTargetType(String targetType)
      Sets the high-level object type of the target resource.
      Parameters:
      targetType - the target object type
    • getTargetSubType

      public String getTargetSubType()
      Returns the sub-type of the target resource.
      Returns:
      the target sub-type, or null if not available
    • setTargetSubType

      public void setTargetSubType(String targetSubType)
      Sets the sub-type of the target resource.
      Parameters:
      targetSubType - the target sub-type
    • getTargetPid

      public List<String> getTargetPid()
      Returns the list of PID values for the target resource. Positionally aligned with getTargetPidType().
      Returns:
      list of target PIDs, or null if not set
    • setTargetPid

      public void setTargetPid(List<String> targetPid)
      Sets the list of PID values for the target resource. Must be kept positionally aligned with targetPidType.
      Parameters:
      targetPid - list of target PID values
    • getTargetPidType

      public List<String> getTargetPidType()
      Returns the list of PID scheme names for the target resource. Positionally aligned with getTargetPid().
      Returns:
      list of target PID types (e.g. "doi"), or null if not set
    • setTargetPidType

      public void setTargetPidType(List<String> targetPidType)
      Sets the list of PID scheme names for the target resource. Must be kept positionally aligned with targetPid.
      Parameters:
      targetPidType - list of target PID scheme names
    • getTargetPublisher

      public List<String> getTargetPublisher()
      Returns the names of the publishers of the target resource.
      Returns:
      list of target publisher names, or null if not set
    • setTargetPublisher

      public void setTargetPublisher(List<String> targetPublisher)
      Sets the names of the publishers of the target resource.
      Parameters:
      targetPublisher - list of target publisher names
    • getLinkProviders

      public List<String> getLinkProviders()
      Returns the names of the link providers that asserted this relationship.
      Returns:
      list of link provider names, or null if not set
    • setLinkProviders

      public void setLinkProviders(List<String> linkProviders)
      Sets the names of the link providers that asserted this relationship.
      Parameters:
      linkProviders - list of link provider names
    • getPublicationDate

      public String getPublicationDate()
      Returns the publication or assertion date of the link.
      Returns:
      the publication date as a free-form string, or null if not available
    • setPublicationDate

      public void setPublicationDate(String publicationDate)
      Sets the publication or assertion date of the link.
      Parameters:
      publicationDate - the publication date as a free-form string
    • getSourceCitationCount

      public Long getSourceCitationCount()
      Returns the pre-computed citation count of the source resource.
      Returns:
      the number of citations of the source, or null if not available
    • setSourceCitationCount

      public void setSourceCitationCount(Long sourceCitationCount)
      Sets the pre-computed citation count of the source resource.
      Parameters:
      sourceCitationCount - the number of citations of the source
    • getTargetCitationCount

      public Long getTargetCitationCount()
      Returns the pre-computed citation count of the target resource.
      Returns:
      the number of citations of the target, or null if not available
    • setTargetCitationCount

      public void setTargetCitationCount(Long targetCitationCount)
      Sets the pre-computed citation count of the target resource.
      Parameters:
      targetCitationCount - the number of citations of the target