Examples of MarkupLanguage


Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

    throws Exception {

        final String id = source.getURI();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Loading serverpage systemId=[" + id + "]" +
                    " markupLanguageName=[" + markupLanguageName + "]" +
                    " programmingLanguageName=[" + programmingLanguageName + "]" +
                    " -> normalizedName=[" + normalizedName + "]");
            }

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
            } catch (Exception e) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("The serverpage [" + id + "] is not in the cache yet");
                }
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    program = programmingLanguage.preload(normalizedName,
                                                          this.workDir,
                                                          markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent) this.cache.select(normalizedName);

                    if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

        throws Exception {

        final String id = source.getURI();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Loading serverpage systemId=[" + id + "]" +
                    " markupLanguageName=[" + markupLanguageName + "]" +
                    " programmingLanguageName=[" + programmingLanguageName + "]" +
                    " -> normalizedName=[" + normalizedName + "]");
            }

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
            } catch (Exception e) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("The serverpage [" + id + "] is not in the cache yet");
                }
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    program = programmingLanguage.preload(normalizedName, this.workDir, markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent) this.cache.select(normalizedName);

                    if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

            throws Exception {

        final String id = source.getURI();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Loading serverpage systemId=[" + id + "]" +
                    " markupLanguageName=[" + markupLanguageName + "]" +
                    " programmingLanguageName=[" + programmingLanguageName + "]" +
                    " -> normalizedName=[" + normalizedName + "]");
            }

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
            } catch (Exception e) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("The serverpage [" + id + "] is not in the cache yet");
                }
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    program = programmingLanguage.preload(normalizedName,
                                                          this.workDir,
                                                          markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent) this.cache.select(normalizedName);

                    if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

        throws Exception {

        final String id = source.getSystemId();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            // Ensure no 2 requests for the same file overlap
            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent)this.cache.select(normalizedName);
            } catch (Exception e) {
                getLogger().debug("The instance was not accessible from the internal cache. Proceeding.");
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    markupLanguage =
                            (MarkupLanguage)this.markupSelector.select(markupLanguageName);
                    programmingLanguage =
                            (ProgrammingLanguage)this.languageSelector.select(programmingLanguageName);
                    programmingLanguage.setLanguageName(programmingLanguageName);
                    program = programmingLanguage.preload(normalizedName,
                            this.workDir, markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent)this.cache.select(normalizedName);
                } catch (Exception e) {
                    getLogger().debug("The program was not preloaded");
View Full Code Here

Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

    throws Exception {

        final String id = source.getURI();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Loading serverpage systemId=[" + id + "]" +
                    " markupLanguageName=[" + markupLanguageName + "]" +
                    " programmingLanguageName=[" + programmingLanguageName + "]" +
                    " -> normalizedName=[" + normalizedName + "]");
            }

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
            } catch (Exception e) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("The serverpage [" + id + "] is not in the cache yet");
                }
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    program = programmingLanguage.preload(normalizedName,
                                                          this.workDir,
                                                          markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent) this.cache.select(normalizedName);

                    if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.apache.cocoon.components.language.markup.MarkupLanguage

    throws Exception {

        final String id = source.getURI();

        ProgrammingLanguage programmingLanguage = null;
        MarkupLanguage markupLanguage = null;
        try {
            // Create file name for the program generated from the provided source.
            final String normalizedName = getNormalizedName(id);

            if (getLogger().isDebugEnabled()) {
                getLogger().debug("Loading serverpage systemId=[" + id + "]" +
                    " markupLanguageName=[" + markupLanguageName + "]" +
                    " programmingLanguageName=[" + programmingLanguageName + "]" +
                    " -> normalizedName=[" + normalizedName + "]");
            }

            markupLanguage = (MarkupLanguage) this.markupSelector.select(markupLanguageName);
            programmingLanguage = (ProgrammingLanguage) this.languageSelector.select(programmingLanguageName);
            programmingLanguage.setLanguageName(programmingLanguageName);

            Program program = null;
            CompiledComponent programInstance = null;

            // Attempt to load program object from cache
            try {
                programInstance = (CompiledComponent) this.cache.select(normalizedName);
            } catch (Exception e) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("The serverpage [" + id + "] is not in the cache yet");
                }
            }

            if (programInstance == null && this.preload) {
                // Preloading: Load program if its source/[object file] is available
                try {
                    program = programmingLanguage.preload(normalizedName,
                                                          this.workDir,
                                                          markupLanguage.getEncoding());

                    this.cache.addGenerator(newManager, normalizedName, program);
                    programInstance = (CompiledComponent) this.cache.select(normalizedName);

                    if (getLogger().isDebugEnabled()) {
View Full Code Here

Examples of org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage

                    HtmlDocumentBuilder builder = new HtmlDocumentBuilder(writer);
                    // avoid the <html> and <body> tags
                    builder.setEmitAsDocument(false);
                   
                    WikiText wikitext = (WikiText) nomarkdown;
                    MarkupLanguage lang;
                    switch (wikitext.syntax){
                    case TWIKI:
                      lang = new TWikiLanguage();
                      break;
                    case TEXTILE:
View Full Code Here

Examples of org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage

  protected MarkupLanguage createMarkupLanguage() throws BuildException {
    if (markupLanguage == null) {
      throw new BuildException(Messages.getString("MarkupTask.0")); //$NON-NLS-1$
    }
    try {
      MarkupLanguage language = ServiceLocator.getInstance(getClass().getClassLoader()).getMarkupLanguage(
          markupLanguage);
      if (internalLinkPattern != null) {
        language.setInternalLinkPattern(internalLinkPattern);
      }
      if (markupLanguageConfiguration != null) {
        language.configure(markupLanguageConfiguration);
      }
      return language;
    } catch (IllegalArgumentException e) {
      throw new BuildException(e.getMessage(), e);
    }
View Full Code Here

Examples of org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage

      default:
        filenameFormat = "$1.ditamap"; //$NON-NLS-1$
      }
    }

    MarkupLanguage markupLanguage = createMarkupLanguage();

    for (FileSet fileset : filesets) {

      File filesetBaseDir = fileset.getDir(getProject());
      DirectoryScanner ds = fileset.getDirectoryScanner(getProject());
View Full Code Here

Examples of org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage

      } else if (!file.canRead()) {
        throw new BuildException(MessageFormat.format(Messages.getString("MarkupToXslfoTask.4"), file)); //$NON-NLS-1$
      }
    }

    MarkupLanguage markupLanguage = createMarkupLanguage();

    for (FileSet fileset : filesets) {

      File filesetBaseDir = fileset.getDir(getProject());
      DirectoryScanner ds = fileset.getDirectoryScanner(getProject());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.