Commit 723b8046 authored by Luna Riegel's avatar Luna Riegel
Browse files

Refactor: Remove abstract TopologyCheck superclass

parent 00e86ae5
...@@ -59,7 +59,6 @@ import javax.xml.transform.dom.DOMSource; ...@@ -59,7 +59,6 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult; import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamSource;
import de.hft.stuttgart.citydoctor2.checks.topology.TopologyCheck;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -211,7 +210,6 @@ public class Checker { ...@@ -211,7 +210,6 @@ public class Checker {
Future<SvrlContentHandler> handlerFuture = executor.submit(schematronThread); Future<SvrlContentHandler> handlerFuture = executor.submit(schematronThread);
executor.shutdown(); executor.shutdown();
TopologyCheck.registerCache(model.getCache());
checkCityModel(model, l); checkCityModel(model, l);
getSchematronResults(handlerFuture, l); getSchematronResults(handlerFuture, l);
......
package de.hft.stuttgart.citydoctor2.checks.topology;
import de.hft.stuttgart.citydoctor2.check.Check;
import de.hft.stuttgart.citydoctor2.check.RequirementType;
import de.hft.stuttgart.citydoctor2.database.CityObjectCache;
/** Topology checks are a specific subclass of checks which check conditions, constraints and requirements between
* different Features within the same CityModel. As such they require access to multiple CityObjects to run, necessitating
* access to the CityObject cache for efficient memory usage.
* <p>
* The following terms will be used in the documentation of topological checks:
* <ul>
* <li>Subject: The Feature that is being checked
* <li>Candidate(s): Other Features that are being checked against the subject. Candidates are selected via spatial
* proximity, as Features that are too far away from the subject can't conflict topological requirements and can thus
* be safely skipped by the checks.
* <ul/>
*
* <p/>
*/
public abstract class TopologyCheck extends Check {
protected static CityObjectCache registeredCache;
public static void registerCache(CityObjectCache cache){
registeredCache = cache;
}
@Override
public RequirementType getType() {
return RequirementType.TOPOLOGY;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment