# 1) Fjern genreSplit

SPARQL
PREFIX : <http://data.deichman.no/ontology#>
PREFIX migration: <http://migration.deichman.no>

WITH <http://deichman.no/migration>

DELETE {
	?publication migration:genreSplit ?genreSplit .
	?genreSplit ?p ?o .
}

WHERE {
	?publication migration:genreSplit ?genreSplit ;
	 a :Publication .
	?genreSplit ?p ?o .
}
;

# 1) Fjern genreSplit

SPARQL
PREFIX : <http://data.deichman.no/ontology#>
PREFIX migration: <http://migration.deichman.no/>

WITH <http://deichman.no/migration>

DELETE {
	?publication migration:genreSplit ?genreSplit .
	?genreSplit ?p ?o .
}

WHERE {
	?publication migration:genreSplit ?genreSplit ;
	 a :Publication .
	?genreSplit ?p ?o .
}
;


# 2) Fjern overflødige sjangrer

SPARQL
PREFIX : <http://data.deichman.no/ontology#>
PREFIX migration: <http://migration.deichman.no/>

WITH <http://deichman.no/migration>

DELETE {
	?genre ?p ?o .
}

WHERE {
	?genre a :Genre ;
		?p ?o .
	MINUS {?s :genre ?genre}
}
;


# 3) Fjern overflødige emner

SPARQL
PREFIX : <http://data.deichman.no/ontology#>
PREFIX migration: <http://migration.deichman.no/>

WITH <http://deichman.no/migration>

DELETE {
	?subject ?p ?o .
}

WHERE {
	?subject a :Subject ;
		?p ?o .
	MINUS {?s :subject ?subject}
}
;
