Class Mapping
java.lang.Object
org.incenp.obofoundry.sssom.model.Mapping
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionMapping()
protected
Mapping
(String recordId, String subjectId, String subjectLabel, String subjectCategory, String predicateId, String predicateLabel, PredicateModifier predicateModifier, String objectId, String objectLabel, String objectCategory, String mappingJustification, List<String> authorId, List<String> authorLabel, List<String> reviewerId, List<String> reviewerLabel, List<String> creatorId, List<String> creatorLabel, String license, EntityType subjectType, String subjectSource, String subjectSourceVersion, EntityType objectType, String objectSource, String objectSourceVersion, EntityType predicateType, String mappingProvider, String mappingSource, MappingCardinality mappingCardinality, List<String> cardinalityScope, String mappingTool, String mappingToolId, String mappingToolVersion, LocalDate mappingDate, LocalDate publicationDate, Double confidence, List<String> curationRule, List<String> curationRuleText, List<String> subjectMatchField, List<String> objectMatchField, List<String> matchString, List<String> subjectPreprocessing, List<String> objectPreprocessing, Double similarityScore, String similarityMeasure, List<String> seeAlso, String issueTrackerItem, String other, String comment, Map<String, ExtensionValue> extensions) -
Method Summary
Modifier and TypeMethodDescriptionstatic Mapping.MappingBuilder
builder()
protected boolean
boolean
getAuthorId
(boolean set) Gets the list of author_id values, optionally initializing the list if needed.getAuthorLabel
(boolean set) Gets the list of author_label values, optionally initializing the list if needed.getCardinalityScope
(boolean set) Gets the list of cardinality_scope values, optionally initializing the list if needed.getCreatorId
(boolean set) Gets the list of creator_id values, optionally initializing the list if needed.getCreatorLabel
(boolean set) Gets the list of creator_label values, optionally initializing the list if needed.getCurationRule
(boolean set) Gets the list of curation_rule values, optionally initializing the list if needed.getCurationRuleText
(boolean set) Gets the list of curation_rule_text values, optionally initializing the list if needed.getExtensions
(boolean set) Gets the map of extension values, optionally initializing the map if needed.getMatchString
(boolean set) Gets the list of match_string values, optionally initializing the list if needed.getObjectMatchField
(boolean set) Gets the list of object_match_field values, optionally initializing the list if needed.getObjectPreprocessing
(boolean set) Gets the list of object_preprocessing values, optionally initializing the list if needed.getOther()
getReviewerId
(boolean set) Gets the list of reviewer_id values, optionally initializing the list if needed.getReviewerLabel
(boolean set) Gets the list of reviewer_label values, optionally initializing the list if needed.getSeeAlso
(boolean set) Gets the list of see_also values, optionally initializing the list if needed.Deprecated.Deprecated.Use#getSimilarityScore()
instead.getSubjectMatchField
(boolean set) Gets the list of subject_match_field values, optionally initializing the list if needed.getSubjectPreprocessing
(boolean set) Gets the list of subject_preprocessing values, optionally initializing the list if needed.int
hashCode()
boolean
Indicates whether the subject of this mapping is not mapped to any entity on the object side.boolean
Indicates whether the object of this mapping is not mapped to any entity on the subject side.invert()
Creates an inverted version of this mapping if possible.Creates an inverted version of this mapping with an explicit predicate.boolean
Indicates whether this mapping represents a "literal" mapping.boolean
Indicates whether this mapping represents a "missing" mapping.void
setAuthorId
(List<String> authorId) void
setAuthorLabel
(List<String> authorLabel) void
setCardinalityScope
(List<String> cardinalityScope) void
setComment
(String comment) void
setConfidence
(Double value) Sets the confidence field to a new value.void
setCreatorId
(List<String> creatorId) void
setCreatorLabel
(List<String> creatorLabel) void
setCurationRule
(List<String> curationRule) void
setCurationRuleText
(List<String> curationRuleText) void
setExtensions
(Map<String, ExtensionValue> extensions) void
setIssueTrackerItem
(String issueTrackerItem) void
setLicense
(String license) void
setMappingCardinality
(MappingCardinality mappingCardinality) void
setMappingDate
(LocalDate mappingDate) void
setMappingJustification
(String mappingJustification) void
setMappingProvider
(String mappingProvider) void
setMappingSource
(String mappingSource) void
setMappingTool
(String mappingTool) void
setMappingToolId
(String mappingToolId) void
setMappingToolVersion
(String mappingToolVersion) void
setMatchString
(List<String> matchString) void
setObjectCategory
(String objectCategory) void
setObjectId
(String objectId) void
setObjectLabel
(String objectLabel) void
setObjectMatchField
(List<String> objectMatchField) void
setObjectPreprocessing
(List<String> objectPreprocessing) void
setObjectSource
(String objectSource) void
setObjectSourceVersion
(String objectSourceVersion) void
setObjectType
(EntityType objectType) void
void
setPredicateId
(String predicateId) void
setPredicateLabel
(String predicateLabel) void
setPredicateModifier
(PredicateModifier predicateModifier) void
setPredicateType
(EntityType predicateType) void
setPublicationDate
(LocalDate publicationDate) void
setRecordId
(String recordId) void
setReviewerId
(List<String> reviewerId) void
setReviewerLabel
(List<String> reviewerLabel) void
setSeeAlso
(List<String> seeAlso) void
Deprecated.Use#setSimilarityMeasure(String)
instead.void
setSemanticSimilarityScore
(Double value) Deprecated.Use#setSimilarityScore(Double)
instead.void
setSimilarityMeasure
(String similarityMeasure) void
setSimilarityScore
(Double value) Sets the similarity_score field to a new value.void
setSubjectCategory
(String subjectCategory) void
setSubjectId
(String subjectId) void
setSubjectLabel
(String subjectLabel) void
setSubjectMatchField
(List<String> subjectMatchField) void
setSubjectPreprocessing
(List<String> subjectPreprocessing) void
setSubjectSource
(String subjectSource) void
setSubjectSourceVersion
(String subjectSourceVersion) void
setSubjectType
(EntityType subjectType) toSExpr()
Creates a canonical S-expression representing this mapping.toString()
-
Constructor Details
-
Mapping
public Mapping() -
Mapping
protected Mapping(String recordId, String subjectId, String subjectLabel, String subjectCategory, String predicateId, String predicateLabel, PredicateModifier predicateModifier, String objectId, String objectLabel, String objectCategory, String mappingJustification, List<String> authorId, List<String> authorLabel, List<String> reviewerId, List<String> reviewerLabel, List<String> creatorId, List<String> creatorLabel, String license, EntityType subjectType, String subjectSource, String subjectSourceVersion, EntityType objectType, String objectSource, String objectSourceVersion, EntityType predicateType, String mappingProvider, String mappingSource, MappingCardinality mappingCardinality, List<String> cardinalityScope, String mappingTool, String mappingToolId, String mappingToolVersion, LocalDate mappingDate, LocalDate publicationDate, Double confidence, List<String> curationRule, List<String> curationRuleText, List<String> subjectMatchField, List<String> objectMatchField, List<String> matchString, List<String> subjectPreprocessing, List<String> objectPreprocessing, Double similarityScore, String similarityMeasure, List<String> seeAlso, String issueTrackerItem, String other, String comment, Map<String, ExtensionValue> extensions)
-
-
Method Details
-
setConfidence
Sets the confidence field to a new value.- Parameters:
value
- The new confidence value to set.- Throws:
IllegalArgumentException
- If the value is outside of the valid range.
-
setSimilarityScore
Sets the similarity_score field to a new value.- Parameters:
value
- The new similarity_score value to set.- Throws:
IllegalArgumentException
- If the value is outside of the valid range.
-
getAuthorId
Gets the list of author_id values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of author_id values.
-
getAuthorLabel
Gets the list of author_label values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of author_label values.
-
getReviewerId
Gets the list of reviewer_id values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of reviewer_id values.
-
getReviewerLabel
Gets the list of reviewer_label values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of reviewer_label values.
-
getCreatorId
Gets the list of creator_id values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of creator_id values.
-
getCreatorLabel
Gets the list of creator_label values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of creator_label values.
-
getCardinalityScope
Gets the list of cardinality_scope values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of cardinality_scope values.
-
getCurationRule
Gets the list of curation_rule values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of curation_rule values.
-
getCurationRuleText
Gets the list of curation_rule_text values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of curation_rule_text values.
-
getSubjectMatchField
Gets the list of subject_match_field values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of subject_match_field values.
-
getObjectMatchField
Gets the list of object_match_field values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of object_match_field values.
-
getMatchString
Gets the list of match_string values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of match_string values.
-
getSubjectPreprocessing
Gets the list of subject_preprocessing values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of subject_preprocessing values.
-
getObjectPreprocessing
Gets the list of object_preprocessing values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of object_preprocessing values.
-
getSeeAlso
Gets the list of see_also values, optionally initializing the list if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty list if it happens to benull
.- Returns:
- The list of see_also values.
-
getExtensions
Gets the map of extension values, optionally initializing the map if needed.- Parameters:
set
- Iftrue
, the underlying field will be initialized to an empty map if it happens to benull
.- Returns:
- The map of extension values.
-
isUnmapped
public boolean isUnmapped()Indicates whether this mapping represents a "missing" mapping.A missing mapping is a mapping where the subject_id or the object_id (or both) is the special value
sssom:NoTermFound
, and indicates that an entity in one domain could not be mapped to any entity in another domain.- Returns:
True
if the mapping is a missing mapping,false
otherwise.
-
hasUnmappedSubject
public boolean hasUnmappedSubject()Indicates whether the object of this mapping is not mapped to any entity on the subject side.- Returns:
True
if the subject of this mapping issssom:NoTermFound
,false
otherwise.
-
hasUnmappedObject
public boolean hasUnmappedObject()Indicates whether the subject of this mapping is not mapped to any entity on the object side.- Returns:
True
if the object of this mapping issssom:NoTermFound
,false
otherwise.
-
isLiteral
public boolean isLiteral()Indicates whether this mapping represents a "literal" mapping.A literal mapping is a mapping where either the subject or the object (or both) is a literal, as indicated by the
subject_type
orobject_type
slot being set toEntityType.RDFS_LITERAL
.- Returns:
True
if the mapping is a literal mapping,false
otherwise.
-
invert
Creates an inverted version of this mapping with an explicit predicate.- Parameters:
predicate
- The predicate to use for the new mapping.- Returns:
- A new mapping that is the inverse of this one, or
null
if the specified predicate is itselfnull
.
-
toSExpr
Creates a canonical S-expression representing this mapping.- Returns:
- A String uniquely representing this mapping, as a canonical S-expression.
-
invert
Creates an inverted version of this mapping if possible.Inversion is possible if the predicate is one of the known "common" predicates and is invertible. To invert a mapping with an arbitrary predicate, use
invert(String)
.- Returns:
- A new mapping that is the inverse of this one, or
null
if inversion is not possible.
-
getSemanticSimilarityScore
Deprecated.Use#getSimilarityScore()
instead. -
setSemanticSimilarityScore
Deprecated.Use#setSimilarityScore(Double)
instead. -
getSemanticSimilarityMeasure
Deprecated.Use#getSimilarityMeasure()
instead. -
setSemanticSimilarityMeasure
Deprecated.Use#setSimilarityMeasure(String)
instead. -
builder
-
toBuilder
-
getRecordId
-
getSubjectId
-
getSubjectLabel
-
getSubjectCategory
-
getPredicateId
-
getPredicateLabel
-
getPredicateModifier
-
getObjectId
-
getObjectLabel
-
getObjectCategory
-
getMappingJustification
-
getAuthorId
-
getAuthorLabel
-
getReviewerId
-
getReviewerLabel
-
getCreatorId
-
getCreatorLabel
-
getLicense
-
getSubjectType
-
getSubjectSource
-
getSubjectSourceVersion
-
getObjectType
-
getObjectSource
-
getObjectSourceVersion
-
getPredicateType
-
getMappingProvider
-
getMappingSource
-
getMappingCardinality
-
getCardinalityScope
-
getMappingTool
-
getMappingToolId
-
getMappingToolVersion
-
getMappingDate
-
getPublicationDate
-
getConfidence
-
getCurationRule
-
getCurationRuleText
-
getSubjectMatchField
-
getObjectMatchField
-
getMatchString
-
getSubjectPreprocessing
-
getObjectPreprocessing
-
getSimilarityScore
-
getSimilarityMeasure
-
getSeeAlso
-
getIssueTrackerItem
-
getOther
-
getComment
-
getExtensions
-
setRecordId
-
setSubjectId
-
setSubjectLabel
-
setSubjectCategory
-
setPredicateId
-
setPredicateLabel
-
setPredicateModifier
-
setObjectId
-
setObjectLabel
-
setObjectCategory
-
setMappingJustification
-
setAuthorId
-
setAuthorLabel
-
setReviewerId
-
setReviewerLabel
-
setCreatorId
-
setCreatorLabel
-
setLicense
-
setSubjectType
-
setSubjectSource
-
setSubjectSourceVersion
-
setObjectType
-
setObjectSource
-
setObjectSourceVersion
-
setPredicateType
-
setMappingProvider
-
setMappingSource
-
setMappingCardinality
-
setCardinalityScope
-
setMappingTool
-
setMappingToolId
-
setMappingToolVersion
-
setMappingDate
-
setPublicationDate
-
setCurationRule
-
setCurationRuleText
-
setSubjectMatchField
-
setObjectMatchField
-
setMatchString
-
setSubjectPreprocessing
-
setObjectPreprocessing
-
setSimilarityMeasure
-
setSeeAlso
-
setIssueTrackerItem
-
setOther
-
setComment
-
setExtensions
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-
#getSimilarityMeasure()
instead.