Research Article

Using Data Crawlers and Semantic Web to Build Financial XBRL Data Generators: The SONAR Extension Approach

Algorithm 3

Algorithm to create instances of a particular class or group of classes.
CREATE_INSTANCES (R,G) {
For each Class “C” of G {
Instance c = new Instance from Class “C”;
Number num = 0; Indicates the number of attributes initialized on c.
   For each Datatype Property “P” of Class “C” {
    For each Tuple “TUPLE<attribute, literal>” from Row “R” {
     If the Class “C” contain the “attribute” {
       For each label “L” from “attribute” from Class “C” {
         If (“L” == “literal”) {
           Add “literal” to “attribute” of Instance “c”;
           num = num + 1;
         }
       }
     }
    }
   }
}
If (num > 0) {
   Add the Instance to Domain Ontology;
}
}