List<PBInstance> pbList = PBLib.getPBInstanceList(ontoPBFile, ontoDir, false);
Map<String,String> semMap = getSemlinkMap(ontoDir, semDir, semVNFile);
PVMap pvMap = new PVMap(new FileInputStream(pvMapFile));
int mono = 0, poly = 0, subcls = 0, supcls = 0, none = 0, skip = 0;
PVRoleset pvRoleset;
PVRoles pvRoles;
String vncls;
for (PBInstance inst : pbList)
{
pvRoleset = pvMap.getRoleset(inst.roleset);
if (pvRoleset != null)
{
pvRoles = null;
if (pvRoleset.size() == 1)
{
pvRoles = pvRoleset.getSubVNRoles("");
inst.annotator = "mono";
mono++;
}
else
{
vncls = semMap.get(getKey(inst.treePath, inst.treeId, inst.predId));
if (vncls != null)
{
if ((pvRoles = pvRoleset.get(vncls)) != null)
{
inst.annotator = "poly";
poly++;
}
else if ((pvRoles = pvRoleset.getSubVNRoles(vncls)) != null)
{
inst.annotator = "subcls";
subcls++;
}
else if ((pvRoles = pvRoleset.getSuperVNRoles(vncls)) != null)
{
inst.annotator = "supcls";
supcls++;
}
}
}
if (pvRoles == null)
{
inst.annotator = "skip";
skip++;
}
else
{
pvRoles.addVBRoles(inst);
}
}
else
none++;
}