Examples of Parser


Examples of org.apache.maven.doxia.parser.Parser

            throw new ConverterException( "PlexusContainerException: " + e.getMessage(), e );
        }

        try
        {
            Parser parser;
            try
            {
                parser = ConverterUtil.getParser( plexus, input.getFormat(), SUPPORTED_FROM_FORMAT );
                parser.enableLogging( log );
            }
            catch ( ComponentLookupException e )
            {
                throw new ConverterException( "ComponentLookupException: " + e.getMessage(), e );
            }

            if ( getLog().isDebugEnabled() )
            {
                getLog().debug( "Parser used: " + parser.getClass().getName() );
            }

            SinkFactory sinkFactory;
            try
            {
View Full Code Here

Examples of org.apache.nutch.parse.Parser

      }
      text = buf.toString();
    }

    try {
      Parser parser = parserFactory.getParsers(contentType, link)[0];
      parse = parser.getParse(
          new Content(link, link, text.getBytes(), contentType, contentMeta,
              conf)).get(link);
    } catch (ParserNotFound e) { /* ignore */
    }

View Full Code Here

Examples of org.apache.oodt.cas.pushpull.filerestrictions.Parser

    public void addPropFiles(String regExp, Parser parser) {
        patterns.add(new RegExpAndParser(regExp, parser));
    }

    public Parser getParserForFile(File propFile) {
        Parser parser = this.fileToParserMap == null ? null
                : this.fileToParserMap.get(propFile);
        if (parser == null)
            parser = this.getParserForFilename(propFile.getName());
        return parser;
    }
View Full Code Here

Examples of org.apache.openejb.resolver.maven.Parser

    @Override
    public String resolve(final String rawLocation) throws Exception {
        if (rawLocation.startsWith(ProvisioningUtil.MVN_PREFIX) && rawLocation.length() > ProvisioningUtil.MVN_PREFIX.length()) {

            final String info = rawLocation.substring(ProvisioningUtil.MVN_PREFIX.length());
            final Parser parser = new Parser(info);
            final File file = cacheFile(parser.getArtifactPath());
            if (!file.exists() || !file.canRead()) {
                try {
                    final URL url = new URL(ProvisioningUtil.MVN_PREFIX.substring(ProvisioningUtil.MVN_PREFIX.length() - 1), "localhost", -1, info, new Handler());
                    final File parentFile = file.getParentFile();
                    if (!parentFile.exists()) {
View Full Code Here

Examples of org.apache.shale.clay.parser.Parser

        List messages = new ArrayList();

        if (uri != null && CLAY_URI_NAMESPACE.equals(uri)) {
            try {
                StringBuffer buff = loadTemplate(page);
                Parser p = new Parser();
                List roots = p.parse(buff);

                for (int i = 0;  i < roots.size(); i++) {
                    Node node = (Node) roots.get(i);
                    validateClayTags(prefix, node, messages);
                }
View Full Code Here

Examples of org.apache.synapse.commons.evaluators.Parser

        assert conditionsElem != null;
        OMAttribute defPriorityAttr = conditionsElem.getAttribute(
                new QName(EvaluatorConstants.DEFAULT_PRIORITY));
        if (defPriorityAttr != null) {
            parser = new Parser(Integer.parseInt(defPriorityAttr.getAttributeValue()));
        } else {
            parser = new Parser();
        }

        try {
            parser.init(conditionsElem);
        } catch (EvaluatorException e) {
View Full Code Here

Examples of org.apache.tika.parser.Parser

      else
      {
         // tika-config may contain really big amount of mimetypes, but used only few,
         // so to avoid load in memory many copies of DocumentReader, we will register it
         // only if someone need it
         Parser tikaParser = conf.getParser(mimeType);
         if (tikaParser != null)
         {
            synchronized (this)
            {
               // Check if the reader has been registered since the thread is blocked
View Full Code Here

Examples of org.apache.velocity.runtime.parser.Parser

                getLog().error("Could not auto-initialize Velocity", e);
                throw new IllegalStateException("Velocity could not be initialized!");
            }
        }

        Parser parser = new Parser(this);
        parser.setDirectives(runtimeDirectives);
        return parser;
    }
View Full Code Here

Examples of org.apache.wink.json4j.internal.Parser

     * @throws JSONException Thrown when the string passed is null, or malformed JSON..
     */
    public JSONObject(String str) throws JSONException {
        super();
        StringReader reader = new StringReader(str);
        (new Parser(reader)).parse(this);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser

  }

  public static void parse(ICompilationUnit[] compilationUnits, ASTRequestor astRequestor, int apiLevel, Map options, int flags, IProgressMonitor monitor) {
    try {
      CompilerOptions compilerOptions = new CompilerOptions(options);
      Parser parser = new CommentRecorderParser(
        new ProblemReporter(
            DefaultErrorHandlingPolicies.proceedWithAllProblems(),
            compilerOptions,
            new DefaultProblemFactory()),
        false);
      int length = compilationUnits.length;
      if (monitor != null) monitor.beginTask("", length); //$NON-NLS-1$
      for (int i = 0; i < length; i++) {
        org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = (org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit) compilationUnits[i];
        CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
        CompilationUnitDeclaration compilationUnitDeclaration = parser.dietParse(sourceUnit, compilationResult);

        if (compilationUnitDeclaration.ignoreMethodBodies) {
          compilationUnitDeclaration.ignoreFurtherInvestigation = true;
          // if initial diet parse did not work, no need to dig into method bodies.
          continue;
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.