.listSubjectsWithProperty(RDF.type,
HOSTCANONICALIZER.DefaultCanonicalizer);
Resource defaultCanonicalizer;
if (defaultCanonicalizerIter.hasNext()) {
defaultCanonicalizer = defaultCanonicalizerIter.nextResource();
defaultCanonicalBase = new ServerAddress(defaultCanonicalizer
.getRequiredProperty(HOSTCANONICALIZER.canonicalBase)
.getResource().getURI());
canonicalBaseSet.add(defaultCanonicalBase);
} else {
defaultCanonicalBase = null;
}
defaultCanonicalizerIter.close();
ResIterator canonicalizerIter = model.listSubjectsWithProperty(
RDF.type, HOSTCANONICALIZER.Canonicalizer);
Resource canonicalizer;
while (canonicalizerIter.hasNext()) {
try {
canonicalizer = canonicalizerIter.nextResource();
String canonicalBaseString = canonicalizer
.getRequiredProperty(
HOSTCANONICALIZER.canonicalBase)
.getResource().getURI();
String accessBase = canonicalizer.getRequiredProperty(
HOSTCANONICALIZER.accessURLBase).getResource()
.getURI();
ServerAddress canonicalBase = new ServerAddress(
canonicalBaseString);
hostReplacement.put(new ServerAddress(accessBase),
canonicalBase);
canonicalBaseSet.add(canonicalBase);
if (log.isDebugEnabled()) {
log.debug("added host replacement: " + accessBase
+ " to " + canonicalBase);