Tabnine Logo
CmsXmlContent.getEncoding
Code IndexAdd Tabnine to your IDE (free)

How to use
getEncoding
method
in
org.opencms.xml.content.CmsXmlContent

Best Java code snippets using org.opencms.xml.content.CmsXmlContent.getEncoding (Showing top 10 results out of 315)

origin: org.opencms/opencms-core

/**
 * @see org.opencms.xml.A_CmsXmlDocument#getLinkProcessor(org.opencms.file.CmsObject, org.opencms.staticexport.CmsLinkTable)
 */
public CmsLinkProcessor getLinkProcessor(CmsObject cms, CmsLinkTable linkTable) {
  // initialize link processor
  String relativeRoot = null;
  if (m_file != null) {
    relativeRoot = CmsResource.getParentFolder(cms.getSitePath(m_file));
  }
  return new CmsLinkProcessor(cms, linkTable, getEncoding(), relativeRoot);
}
origin: org.opencms/opencms-solr

/**
 * @see org.opencms.xml.A_CmsXmlDocument#getLinkProcessor(org.opencms.file.CmsObject, org.opencms.staticexport.CmsLinkTable)
 */
public CmsLinkProcessor getLinkProcessor(CmsObject cms, CmsLinkTable linkTable) {
  // initialize link processor
  String relativeRoot = null;
  if (m_file != null) {
    relativeRoot = CmsResource.getParentFolder(cms.getSitePath(m_file));
  }
  return new CmsLinkProcessor(cms, linkTable, getEncoding(), relativeRoot);
}
origin: org.opencms/opencms-core

/**
 * Builds the diff view for the XML text.<p>
 *
 * @param cms the CMS context
 * @param file1 the first file
 * @param file2 the second file
 *
 * @return the diff view
 */
private Component buildWholeFileDiffView(CmsObject cms, CmsFile file1, CmsFile file2) {
  String encoding = "UTF-8";
  try {
    CmsXmlContent content1 = CmsXmlContentFactory.unmarshal(cms, file1);
    encoding = content1.getEncoding();
  } catch (CmsException e) {
    String rootPath = file1.getRootPath();
    LOG.error(
      "Could not unmarshal file " + rootPath + " for determining encoding: " + e.getLocalizedMessage(),
      e);
  }
  String text1 = decode(file1.getContents(), encoding);
  String text2 = decode(file2.getContents(), encoding);
  CmsTextDiffPanel diffPanel = new CmsTextDiffPanel(text1, text2, false, true);
  return diffPanel;
}
origin: org.opencms/opencms-solr

  file.setContents(decodedContent.getBytes(content.getEncoding()));
} catch (UnsupportedEncodingException e) {
  throw new CmsException(Messages.get().container(
origin: org.opencms/opencms-core

    cms,
    locale,
    template.getEncoding(),
    template.getContentDefinition());
} else {
origin: org.opencms/opencms-core

  file.setContents(decodedContent.getBytes(content.getEncoding()));
} catch (UnsupportedEncodingException e) {
  throw new CmsException(
origin: org.opencms/opencms-solr

getCms(),
locale,
template.getEncoding(),
template.getContentDefinition());
origin: org.opencms/opencms-core

initDocument(cms, document, model.getEncoding(), m_contentDefinition);
origin: org.opencms/opencms-solr

initDocument(cms, document, model.getEncoding(), m_contentDefinition);
origin: org.opencms/org.opencms.workplace.tools.content

  parser.process(content, xmlcontent.getEncoding());
  value.setStringValue(getCms(), parser.getResult());
} catch (ParserException e) {
org.opencms.xml.contentCmsXmlContentgetEncoding

Popular methods of CmsXmlContent

  • getValue
  • getStringValue
  • getValues
  • hasLocale
  • getFile
  • getLocales
  • marshal
  • addValue
    Adds a new XML schema type with the default value to the given parent node.
  • getIndexCount
  • hasValue
  • addLocale
  • copyLocale
    Copies the content of the given source locale to the given destination locale in this XML document.
  • addLocale,
  • copyLocale,
  • correctXmlStructure,
  • getLocaleNode,
  • initDocument,
  • removeLocale,
  • setAutoCorrectionEnabled,
  • toString,
  • visitAllValuesWith

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • setContentView (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now