X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FRobustDocumentType.java;fp=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FRobustDocumentType.java;h=52244837dda20bcc70de5513c7c87be487a59857;hb=e52385618670b54a5c6a4f2fbfab381bef43a905;hp=34664e848188e3636f92171738018822e0135857;hpb=0db97b9f39c69528900f915dd2bb463c27debe39;p=xmlrouter diff --git a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustDocumentType.java b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustDocumentType.java index 34664e8..5224483 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustDocumentType.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustDocumentType.java @@ -20,7 +20,6 @@ import java.util.logging.Logger; import javax.xml.transform.dom.DOMSource; -import org.wamblee.xmlrouter.common.Id; import org.wamblee.xmlrouter.config.DocumentType; /** @@ -30,12 +29,12 @@ import org.wamblee.xmlrouter.config.DocumentType; * @author Erik Brakkee * */ -public class RobustDocumentType implements DocumentType { +public class RobustDocumentType extends RobustIdentifiable + implements DocumentType { private static final Logger LOGGER = Logger .getLogger(RobustDocumentType.class.getName()); - private Id id; private DocumentType type; /** @@ -46,8 +45,8 @@ public class RobustDocumentType implements DocumentType { * @param aType * Document type to wrap. */ - public RobustDocumentType(Id aId, DocumentType aType) { - id = aId; + public RobustDocumentType(DocumentType aType) { + super(aType); type = aType; } @@ -56,13 +55,13 @@ public class RobustDocumentType implements DocumentType { try { String name = type.getName(); if (name == null) { - LOGGER.log(Level.WARNING, "Document type " + id + + LOGGER.log(Level.WARNING, "Document type " + getId() + " returned null for name"); return Constants.UNKNOWN_DOCUMENT_TYPE.toString(); } return name; } catch (Exception e) { - LOGGER.log(Level.WARNING, "Document type " + id + + LOGGER.log(Level.WARNING, "Document type " + getId() + " threw exception", e); return Constants.UNKNOWN_DOCUMENT_TYPE.toString(); } @@ -73,7 +72,7 @@ public class RobustDocumentType implements DocumentType { try { return type.isInstance(aSource); } catch (Exception e) { - LOGGER.log(Level.WARNING, "Document type " + id + + LOGGER.log(Level.WARNING, "Document type " + getId() + " threw exception", e); return false; } @@ -84,7 +83,7 @@ public class RobustDocumentType implements DocumentType { try { return type.validate(aSource); } catch (Exception e) { - LOGGER.log(Level.WARNING, "Document type " + id + + LOGGER.log(Level.WARNING, "Document type " + getId() + " threw exception", e); return false; }