Returns the XML content type manager.<p>

@return the XML content type manager
505708
protected CmsXmlContentTypeManager getXmlContentTypeManager() {

        if (m_xmlContentTypeManager != null) {
            return m_xmlContentTypeManager;
        }
        if (getRunLevel() == OpenCms.RUNLEVEL_1_CORE_OBJECT) {
            // this is only to enable test cases to run
            m_xmlContentTypeManager = CmsXmlContentTypeManager.createTypeManagerForTestCases();
        }
        return m_xmlContentTypeManager;
    }
968604
public String getNormalisedContentTypeValue() {
        String contentType = getHeader(CONTENT_TYPE);
        if (contentType != null) {
            return contentType.toLowerCase(Locale.ROOT);
        }
        return null;
    }
54749
public String getXml() {
        try {
            return ((ByteArrayOutputStream) outputStream).toString(StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            return outputStream.toString();
        }
    }
1038460
@Override
    public String getType(String xmlName) {
        int index = getIndex(xmlName);

        if (index < 0) {
            return null;
        }
        return getType(index);
    }
789793
public boolean getIsXml() {

        if (m_isXml == null) {
            m_isXml = Boolean.valueOf(
                CmsResourceTypeXmlPage.isXmlPage(this) || CmsResourceTypeXmlContent.isXmlContent(this));
        }
        return m_isXml.booleanValue();
    }
1066481
@Override
	public List<String> contentTypes() {
		List<String> contentTypes = null;
		final HttpServletRequest request = getHttpRequest();

		if (favorParameterOverAcceptHeader) {
			contentTypes = getFavoredParameterValueAsList(request);
		} else {
			contentTypes = getAcceptHeaderValues(request);
		}

		if (isEmpty(contentTypes)) {
			logger.debug("Setting content types to default: {}.", DEFAULT_SUPPORTED_CONTENT_TYPES);

			contentTypes = DEFAULT_SUPPORTED_CONTENT_TYPES;
		}

		return unmodifiableList(contentTypes);
	}
538990
public Document generateXml(I_CmsXmlConfiguration configuration) {

        // create a new document
        Document result = DocumentHelper.createDocument();

        // set the document type
        DOMDocumentType docType = new DOMDocumentType();
        docType.setElementName(N_ROOT);
        docType.setSystemID(configuration.getDtdUrlPrefix() + configuration.getDtdFilename());
        result.setDocType(docType);

        Element root = result.addElement(N_ROOT);
        // start the XML generation
        configuration.generateXml(root);

        // return the resulting document
        return result;
    }
1228112
public String getContentType() {
		ContentTypeHeader cth = (ContentTypeHeader) this.message
				.getHeader(getCorrectHeaderName(ContentTypeHeader.NAME));
		if (cth != null) {
			// Fix For Issue http://code.google.com/p/mobicents/issues/detail?id=2659
			// getContentType doesn't return the full header value
//			String contentType = cth.getContentType();
//			String contentSubType = cth.getContentSubType();
//			if(contentSubType != null)
//				return contentType + "/" + contentSubType;
			return ((HeaderExt)cth).getValue();
		}
		return null;
	}
302358
public String getXML()
    {
        if (m_message != null)
        {
        	BaseMessage message = m_message.getMessage();
        	return message.getXML(false);
        }
        return super.getXML();	// Null
    }
1289113
public String toXML() {
        StringBuilder buf = new StringBuilder();
        buf.append("<item");
        if (this.isAllow()) {
        	buf.append(" action=\"allow\"");
        } else {
        	buf.append(" action=\"deny\"");
        }
        buf.append(" order=\"").append(getOrder()).append('"');
        if (getType() != null) {
            buf.append(" type=\"").append(getType()).append('"');
        }
        if (getValue() != null) {
            buf.append(" value=\"").append(getValue()).append('"');
        }
        if (isFilterEverything()) {
        	buf.append("/>");
        } else {
        	buf.append('>');
        	if (this.isFilterIQ()) {
            	buf.append("<iq/>");
            }
        	if (this.isFilterMessage()) {
            	buf.append("<message/>");
            }
        	if (this.isFilterPresenceIn()) {
            	buf.append("<presence-in/>");
            }
        	if (this.isFilterPresenceOut()) {
            	buf.append("<presence-out/>");
            }
        	buf.append("</item>");
        }
        // CHECKSTYLE:ON
        return buf.toString();
    }
875772
public CmsLoginManager getLoginManager() {

        if (m_loginManager == null) {
            // no login manager configured, create default
            m_loginManager = new CmsLoginManager(
                CmsLoginManager.DISABLE_MINUTES_DEFAULT,
                CmsLoginManager.MAX_BAD_ATTEMPTS_DEFAULT,
                CmsLoginManager.ENABLE_SECURITY_DEFAULT,
                null,
                null,
                null,
                null);
        }
        return m_loginManager;
    }
964427
public ContentKeyType getContentKeyType() {
        Integer contentKeyTypeInteger = getContent().getContentKeyType();
        ContentKeyType contentKeyType = null;
        if (contentKeyTypeInteger != null) {
            contentKeyType = ContentKeyType.fromCode(contentKeyTypeInteger);
        }
        return contentKeyType;
    }
381084
public ServletMappingType<WebFragmentType<T>> getOrCreateServletMapping()
   {
      List<Node> nodeList = childNode.get("servlet-mapping");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ServletMappingTypeImpl<WebFragmentType<T>>(this, "servlet-mapping", childNode, nodeList.get(0));
      }
      return createServletMapping();
   }
1125465
public I_CmsResourceType getResourceType() {

        if (m_resourceType == null) {
            m_resourceType = OpenCms.getResourceManager().getResourceType(m_resource);
        }
        return m_resourceType;
    }
713079
public Map<?, ?> getByType() {

        if (m_byType == null) {
            m_byType = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {

                @SuppressWarnings("synthetic-access")
                public Object transform(Object arg0) {

                    String key = (String)arg0;
                    List<CmsContainerElementBean> result = Lists.newArrayList();
                    for (Map.Entry<String, CmsContainerBean> entry : getPage().getContainers().entrySet()) {
                        CmsContainerBean value = entry.getValue();
                        for (CmsContainerElementBean element : value.getElements()) {
                            try {
                                element.initResource(m_cms);
                                if (key.equals(element.getTypeName())) {
                                    result.add(element);
                                }
                            } catch (CmsException e) {
                                LOG.error(
                                    "Could not initialize resource with site path \""
                                        + element.getSitePath()
                                        + "\" to determine the container elements type.",
                                    e);
                            }
                        }
                    }
                    return result;
                }
            });
        }
        return m_byType;
    }
675600
public String getCharset(String contentType) {
    String charSet = knownCharsets.get(contentType);
    if (charSet != null) {
      return charSet;
    }

    // Special cases
    if (contentType.startsWith("text/") || contentType.endsWith("+json") || contentType.endsWith("+xml")) {
      return "UTF-8";
    }

    return "BINARY";
  }
183504
public String getXML()
    {
        SOAPMessage message = (SOAPMessage)this.getRawData();
        if (message != null)
            return SOAPMessageTransport.messageToString(message);
        return super.getXML();
    }