@@ -72,10 +72,12 @@ class OntologyReader
7272 val name = getName(page.title, _.capitalize(page.title.language.locale))
7373
7474 ontologyBuilder.classes ::= loadClass(name, templateNode)
75+ // Fill the equivalentClass map
7576
76- for (specificProperty <- loadSpecificProperties(name, templateNode))
77+ for (specificProperty <- loadSpecificProperties(name, templateNode))
7778 {
7879 ontologyBuilder.specializedProperties ::= specificProperty
80+ // To check for equivalent Property Map
7981 }
8082 }
8183 else if (templateName == OntologyReader .OBJECTPROPERTY_NAME || templateName == OntologyReader .DATATYPEPROPERTY_NAME )
@@ -85,6 +87,7 @@ class OntologyReader
8587 for (property <- loadOntologyProperty(name, templateNode))
8688 {
8789 ontologyBuilder.properties ::= property
90+ // Fill the equivalentProperty map
8891 }
8992 }
9093 // TODO: read datatypes
@@ -298,6 +301,8 @@ class OntologyReader
298301 var properties = List [PropertyBuilder ]()
299302 var datatypes = List [Datatype ]()
300303 var specializedProperties = List [SpecificPropertyBuilder ]()
304+ var equivalentPropertiesMap = Map [OntologyProperty ,Set [OntologyProperty ]] ()
305+ var equivalentClassesMap = Map [OntologyProperty ,Set [OntologyProperty ]] ()
301306
302307 def build () : Ontology =
303308 {
@@ -308,7 +313,9 @@ class OntologyReader
308313 new Ontology ( classes.flatMap(_.build(classMap)).map(c => (c.name, c)).toMap,
309314 properties.flatMap(_.build(classMap, typeMap)).map(p => (p.name, p)).toMap,
310315 datatypes.map(t => (t.name, t)).toMap,
311- specializedProperties.flatMap(_.build(classMap, propertyMap, typeMap)).toMap )
316+ specializedProperties.flatMap(_.build(classMap, propertyMap, typeMap)).toMap,
317+ equivalentPropertiesMap,
318+ equivalentClassesMap)
312319 }
313320 }
314321
0 commit comments