List<ResourceRoot> resourceRoots,
List<PropertyPath> propertyPaths,
ExtractionContext context
) throws TripleHandlerException {
ResourceRoot currentResourceRoot;
PropertyPath currentPropertyPath;
for (int r = 0; r < resourceRoots.size(); r++) {
currentResourceRoot = resourceRoots.get(r);
for (int p = 0; p < propertyPaths.size(); p++) {
currentPropertyPath = propertyPaths.get(p);
Class<? extends MicroformatExtractor> currentResourceRootExtractor = currentResourceRoot.getExtractor();
Class<? extends MicroformatExtractor> currentPropertyPathExtractor = currentPropertyPath.getExtractor();
// Avoid wrong nesting relationships.
if (currentResourceRootExtractor.equals(currentPropertyPathExtractor)) {
continue;
}
// Avoid self declaring relationships
if(MicroformatExtractor.includes(currentPropertyPathExtractor, currentResourceRootExtractor)) {
continue;
}
if (subPath(currentResourceRoot.getPath(), currentPropertyPath.getPath())) {
createNestingRelationship(currentPropertyPath, currentResourceRoot, output, context);
}
}
}
}