001
014
015 package com.liferay.portal.xml;
016
017 import com.liferay.portal.kernel.util.StringPool;
018 import com.liferay.portal.kernel.xml.DocumentType;
019
020
023 public class DocumentTypeImpl implements DocumentType {
024
025 public DocumentTypeImpl(org.dom4j.DocumentType documentType) {
026 _documentType = documentType;
027 }
028
029 @Override
030 public String getName() {
031 return _documentType.getName();
032 }
033
034 @Override
035 public String getPublicId() {
036 if (_documentType == null) {
037 return null;
038 }
039
040 return _documentType.getPublicID();
041 }
042
043 @Override
044 public String getSystemId() {
045 if (_documentType == null) {
046 return null;
047 }
048
049 return _documentType.getSystemID();
050 }
051
052 public org.dom4j.DocumentType getWrappedDocumentType() {
053 return _documentType;
054 }
055
056 @Override
057 public int hashCode() {
058 if (_documentType == null) {
059 return super.hashCode();
060 }
061
062 return _documentType.hashCode();
063 }
064
065 @Override
066 public String toString() {
067 if (_documentType == null) {
068 return StringPool.BLANK;
069 }
070
071 return _documentType.toString();
072 }
073
074 private org.dom4j.DocumentType _documentType;
075
076 }