Class Mapping
java.lang.Object
org.incenp.obofoundry.sssom.model.Mapping
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionMapping()protectedMapping(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.MappingBuilderbuilder()protected booleanbooleangetAuthorId(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.inthashCode()booleanIndicates whether the subject of this mapping is not mapped to any entity on the object side.booleanIndicates 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.booleanIndicates whether this mapping represents a "literal" mapping.booleanIndicates whether this mapping represents a "missing" mapping.voidsetAuthorId(List<String> authorId) voidsetAuthorLabel(List<String> authorLabel) voidsetCardinalityScope(List<String> cardinalityScope) voidsetComment(String comment) voidsetConfidence(Double value) Sets the confidence field to a new value.voidsetCreatorId(List<String> creatorId) voidsetCreatorLabel(List<String> creatorLabel) voidsetCurationRule(List<String> curationRule) voidsetCurationRuleText(List<String> curationRuleText) voidsetExtensions(Map<String, ExtensionValue> extensions) voidsetIssueTrackerItem(String issueTrackerItem) voidsetLicense(String license) voidsetMappingCardinality(MappingCardinality mappingCardinality) voidsetMappingDate(LocalDate mappingDate) voidsetMappingJustification(String mappingJustification) voidsetMappingProvider(String mappingProvider) voidsetMappingSource(String mappingSource) voidsetMappingTool(String mappingTool) voidsetMappingToolId(String mappingToolId) voidsetMappingToolVersion(String mappingToolVersion) voidsetMatchString(List<String> matchString) voidsetObjectCategory(String objectCategory) voidsetObjectId(String objectId) voidsetObjectLabel(String objectLabel) voidsetObjectMatchField(List<String> objectMatchField) voidsetObjectPreprocessing(List<String> objectPreprocessing) voidsetObjectSource(String objectSource) voidsetObjectSourceVersion(String objectSourceVersion) voidsetObjectType(EntityType objectType) voidvoidsetPredicateId(String predicateId) voidsetPredicateLabel(String predicateLabel) voidsetPredicateModifier(PredicateModifier predicateModifier) voidsetPredicateType(EntityType predicateType) voidsetPublicationDate(LocalDate publicationDate) voidsetRecordId(String recordId) voidsetReviewerId(List<String> reviewerId) voidsetReviewerLabel(List<String> reviewerLabel) voidsetSeeAlso(List<String> seeAlso) voidDeprecated.Use#setSimilarityMeasure(String)instead.voidsetSemanticSimilarityScore(Double value) Deprecated.Use#setSimilarityScore(Double)instead.voidsetSimilarityMeasure(String similarityMeasure) voidsetSimilarityScore(Double value) Sets the similarity_score field to a new value.voidsetSubjectCategory(String subjectCategory) voidsetSubjectId(String subjectId) voidsetSubjectLabel(String subjectLabel) voidsetSubjectMatchField(List<String> subjectMatchField) voidsetSubjectPreprocessing(List<String> subjectPreprocessing) voidsetSubjectSource(String subjectSource) voidsetSubjectSourceVersion(String subjectSourceVersion) voidsetSubjectType(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:
Trueif the mapping is a missing mapping,falseotherwise.
-
hasUnmappedSubject
public boolean hasUnmappedSubject()Indicates whether the object of this mapping is not mapped to any entity on the subject side.- Returns:
Trueif the subject of this mapping issssom:NoTermFound,falseotherwise.
-
hasUnmappedObject
public boolean hasUnmappedObject()Indicates whether the subject of this mapping is not mapped to any entity on the object side.- Returns:
Trueif the object of this mapping issssom:NoTermFound,falseotherwise.
-
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_typeorobject_typeslot being set toEntityType.RDFS_LITERAL.- Returns:
Trueif the mapping is a literal mapping,falseotherwise.
-
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
nullif 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
nullif 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.