Package org.apache.abdera.filter

Examples of org.apache.abdera.filter.ParseFilter


      document.setCharsetEncoding(enc != null ? enc : "utf-8");
      document.setXMLVersion(
        parser.getVersion() != null ?
          parser.getVersion() : "1.0");
      if (parserOptions != null) {
        ParseFilter parseFilter = parserOptions.getParseFilter();
        if (parseFilter != null) {
          ignoreWhitespace = parseFilter.getIgnoreWhitespace();
          ignoreComments = parseFilter.getIgnoreComments();
          ignorePI = parseFilter.getIgnoreProcessingInstructions();
        }
      }
  }
View Full Code Here


    return ctype;
  }
 
  private boolean isAcceptableToParse(QName qname, boolean attribute) {
    if (parserOptions == null) return true;
    ParseFilter filter = parserOptions.getParseFilter();
    return (filter != null) ?
      (!attribute) ?
         filter.acceptable(qname) :
         filter.acceptable(parser.getName(), qname):
      true;
  }
View Full Code Here

      true;
  }
 
  private OMNode applyTextFilter(int type) {
    if (parserOptions != null) {
      ParseFilter parseFilter = parserOptions.getParseFilter();
      if (parseFilter != null) {
        if (parser.isWhiteSpace() &&
            parseFilter.getIgnoreWhitespace())
              return createOMText("",type);
      }
    }
    return createOMText(type);
  }
View Full Code Here

      super(factory, parser);
      this.document = (OMDocument) factory.newDocument();
      this.parserOptions = parserOptions;
      this.fomfactory = factory;
      if (parserOptions != null) {
        ParseFilter parseFilter = parserOptions.getParseFilter();
        if (parseFilter != null) {
          ignoreWhitespace = parseFilter.getIgnoreWhitespace();
          ignoreComments = parseFilter.getIgnoreComments();
          ignorePI = parseFilter.getIgnoreProcessingInstructions();
        }
      }
  }
View Full Code Here

    return ctype;
  }
 
  private boolean isAcceptableToParse(QName qname, boolean attribute) {
    if (parserOptions == null) return true;
    ParseFilter filter = parserOptions.getParseFilter();
    return (filter != null) ?
      (!attribute) ?
         filter.acceptable(qname) :
         filter.acceptable(parser.getName(), qname):
      true;
  }
View Full Code Here

      true;
  }
 
  private OMNode applyTextFilter(int type) {
    if (parserOptions != null) {
      ParseFilter parseFilter = parserOptions.getParseFilter();
      if (parseFilter != null) {
        if (parser.isWhiteSpace() &&
            parseFilter.getIgnoreWhitespace())
              return createOMText("",type);
      }
    }
    return createOMText(type);
  }
View Full Code Here

        this.fomfactory = factory;
        String enc = parser.getCharacterEncodingScheme();
        document.setCharsetEncoding(enc != null ? enc : "utf-8");
        document.setXMLVersion(parser.getVersion() != null ? parser.getVersion() : "1.0");
        if (parserOptions != null) {
            ParseFilter parseFilter = parserOptions.getParseFilter();
            if (parseFilter != null) {
                ignoreWhitespace = parseFilter.getIgnoreWhitespace();
                ignoreComments = parseFilter.getIgnoreComments();
                ignorePI = parseFilter.getIgnoreProcessingInstructions();
            }
        }
    }
View Full Code Here

    }

    private boolean isAcceptableToParse(QName qname, boolean attribute) {
        if (parserOptions == null)
            return true;
        ParseFilter filter = parserOptions.getParseFilter();
        return (filter != null) ? (!attribute) ? filter.acceptable(qname) : filter.acceptable(parser.getName(), qname)
            : true;
    }
View Full Code Here

            : true;
    }

    private OMNode applyTextFilter(int type) {
        if (parserOptions != null) {
            ParseFilter parseFilter = parserOptions.getParseFilter();
            if (parseFilter != null) {
                if (parser.isWhiteSpace() && parseFilter.getIgnoreWhitespace())
                    return createOMText("", type);
            }
        }
        return createOMText(type);
    }
View Full Code Here

   
    FOMStAXFilter(XMLStreamReader parent, ParserOptions parserOptions) {
        super(parent);
        this.parserOptions = parserOptions;
        if (parserOptions != null) {
            ParseFilter parseFilter = parserOptions.getParseFilter();
            if (parseFilter != null) {
                ignoreWhitespace = parseFilter.getIgnoreWhitespace();
                ignoreComments = parseFilter.getIgnoreComments();
                ignorePI = parseFilter.getIgnoreProcessingInstructions();
                attributeMap = new int[8];
            }
        }
        resetEvent();
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.filter.ParseFilter

Copyright © 2018 www.massapicom. 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.