Skip to content

Commit

Permalink
fix(api-v2): Cache base class IRIs correctly when creating/updating c…
Browse files Browse the repository at this point in the history
…lass (#1311)

Fixes #1310.
  • Loading branch information
Benjamin Geer authored Apr 30, 2019
1 parent 20736f7 commit db8b938
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ object KnoraBaseToApiV2SimpleTransformationRules extends OntologyTransformationR
iri: IRI => iri.toSmartIri
},
ontologySchema = ApiV2Simple
)
),
allBaseClasses = subClassOf.map(_.toSmartIri).toSet + datatypeIri.toSmartIri
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ sealed trait ReadEntityInfoV2 {
* @param fileValueProperties a [[Set]] of IRIs of properties in `allCardinalities` that point to `FileValue` objects.
*/
case class ReadClassInfoV2(entityInfoContent: ClassInfoContentV2,
allBaseClasses: Set[SmartIri] = Set.empty[SmartIri],
allBaseClasses: Set[SmartIri],
isResourceClass: Boolean = false,
isStandoffClass: Boolean = false,
isValueClass: Boolean = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@ class OntologyResponderV2(responderData: ResponderData) extends Responder(respon

readClassInfo = ReadClassInfoV2(
entityInfoContent = unescapedClassDefWithLinkValueProps,
allBaseClasses = allBaseClassIris,
isResourceClass = true,
canBeInstantiated = true,
inheritedCardinalities = inheritedCardinalities,
Expand Down Expand Up @@ -2269,6 +2270,7 @@ class OntologyResponderV2(responderData: ResponderData) extends Responder(respon

readClassInfo = ReadClassInfoV2(
entityInfoContent = newInternalClassDefWithLinkValueProps,
allBaseClasses = allBaseClassIris,
isResourceClass = true,
canBeInstantiated = true,
inheritedCardinalities = inheritedCardinalities,
Expand Down Expand Up @@ -2433,6 +2435,7 @@ class OntologyResponderV2(responderData: ResponderData) extends Responder(respon

readClassInfo = ReadClassInfoV2(
entityInfoContent = newInternalClassDefWithLinkValueProps,
allBaseClasses = allBaseClassIris,
isResourceClass = true,
canBeInstantiated = true,
inheritedCardinalities = inheritedCardinalities,
Expand Down
Loading

0 comments on commit db8b938

Please sign in to comment.