public string FormatSelectFull(DocSelect docSelect, Dictionary<string, DocObject> map, Dictionary<DocObject, bool> included, bool fullListing)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("ifc:" + docSelect.Name);
sb.AppendLine("\trdf:type owl:Class ;");
if (!fullListing)
{
//possibly add the individuals here as a union
sb.AppendLine("\towl:equivalentClass");
sb.AppendLine("\t\t[");
sb.AppendLine("\t\t\trdf:type owl:Class ;");
sb.AppendLine("\t\t\towl:unionOf ");
sb.AppendLine("\t\t\t\t( ");
// entities
foreach (DocSelectItem docItem in docSelect.Selects)
{
DocObject mapDef = null;
if (map.TryGetValue(docItem.Name, out mapDef))
{
if (included == null || included.ContainsKey(mapDef))
{
sb.AppendLine("\t\t\t\t\tifc:" + docItem.Name + " ");
}
}
}
//close unionof
sb.AppendLine("\t\t\t\t) ");
sb.AppendLine("\t\t] ; ");
}
sb.AppendLine("\trdfs:subClassOf expr:SELECT .");
sb.AppendLine();
// add members of SELECT as subclasses
if (fullListing)
{
foreach (DocSelectItem docItem in docSelect.Selects)
{
DocObject mapDef = null;
if (map.TryGetValue(docItem.Name, out mapDef))
{
if (included == null || included.ContainsKey(mapDef))
{
sb.AppendLine("ifc:" + docItem.Name);
sb.AppendLine("\trdfs:subClassOf ifc:" + docSelect.Name + " .");
sb.AppendLine();
}
}
}
}
return sb.ToString();
}