Examples of NodeFilter


Examples of org.htmlparser.NodeFilter

        return (false);
    }

    private NodeFilter parse ()
    {
        NodeFilter ret;
       
        ret = null;
        do
        {
            switch (tokentype)
View Full Code Here

Examples of org.htmlparser.NodeFilter

    }

    private NodeFilter parseSimple ()
    {
        boolean done = false;
        NodeFilter ret = null;

        if (token != null)
            do
            {
                switch (tokentype)
View Full Code Here

Examples of org.htmlparser.NodeFilter

        throw new IllegalArgumentException ("pseudoclasses not implemented yet");
    }

    private NodeFilter parseAttributeExp ()
    {
        NodeFilter ret = null;
        if (tokentype == NAME)
        {
            String attrib = token;
            nextToken ();
            if ("]".equals (token))
View Full Code Here

Examples of org.htmlparser.NodeFilter

    public TableColumn[] getColumns ()
    {
        NodeList kids;
        NodeClassFilter cls;
        HasParentFilter recursion;
        NodeFilter filter;
        TableColumn[] ret;

        kids = getChildren ();
        if (null != kids)
        {
View Full Code Here

Examples of org.htmlparser.NodeFilter

    public TableHeader[] getHeaders ()
    {
        NodeList kids;
        NodeClassFilter cls;
        HasParentFilter recursion;
        NodeFilter filter;
        TableHeader[] ret;

        kids = getChildren ();
        if (null != kids)
        {
View Full Code Here

Examples of org.htmlparser.NodeFilter

    public TableRow[] getRows ()
    {
        NodeList kids;
        NodeClassFilter cls;
        HasParentFilter recursion;
        NodeFilter filter;
        TableRow[] ret;

        kids = getChildren ();
        if (null != kids)
        {
View Full Code Here

Examples of org.htmlparser.NodeFilter

      setContent(sb.toString());
     
      par.reset();
      _links.clear();
     
      NodeFilter filter = new OrFilter( new NodeFilter[] {
          new TagNameFilter("A"),
          new TagNameFilter("META")
          }
      );
      NodeList list = par.parse( filter );
View Full Code Here

Examples of org.htmlparser.NodeFilter

     */
    public void extractLinks(Asset asset, InputStream content)
    {
        ByteArrayOutputStream output = null;
        Parser                parser = null;
        NodeFilter            filter = null;
        NodeList              list   = null;
       
       
        // PRECONDITIONS
        assert asset != null : "asset must not be null.";
       
        // Body
        if (content != null)
        {
            try
            {
                IOUtils.copy(content, output);
               
                //####TODO: Dependency inject this crap
                filter = new AndFilter(new NodeClassFilter(LinkTag.class),
                                       new NodeFilter()
                                       {
                                           public boolean accept(Node node)
                                           {
                                               return(!((LinkTag)node).isMailLink());
                                           }
View Full Code Here

Examples of org.htmlparser.NodeFilter

            // recurseHtmlNodes(nodelist, base);
        } // else maybe it is a parsed Flash document? Anyone? :-)
    }
   
    private void processHtml(HttpUrl base, NodeList nodelist) {
        NodeFilter filter = new HasAttributeFilter("href");
        filter = new OrFilter(filter, new HasAttributeFilter("src"));
        filter = new OrFilter(filter, new HasAttributeFilter("onclick"));
        filter = new OrFilter(filter, new HasAttributeFilter("onblur"));
        try {
            NodeList links = nodelist.extractAllNodesThatMatch(filter);
View Full Code Here

Examples of org.modeshape.jcr.cache.document.NodeCacheIterator.NodeFilter

        this.repo = repository;
        this.nodeTypes = nodeTypes;
        this.workspaceName = workspaceName;
        this.includeSystemContent = includeSystemContent;
        this.systemWorkspaceName = includeSystemContent ? repo.getSystemWorkspaceName() : null;
        this.queryableFilter = new NodeFilter() {
            @Override
            public final boolean includeNode( CachedNode node,
                                              NodeCache cache ) {
                // Include only queryable nodes ...
                return node.isQueryable(cache);
            }

            @Override
            public String toString() {
                return "(queryable nodes)";
            }
        };
        if (!this.includeSystemContent) {
            final String systemWorkspaceKey = repo.getSystemWorkspaceKey();
            this.queryableAndNonSystemFilter = new NodeFilter() {
                @Override
                public final boolean includeNode( CachedNode node,
                                                  NodeCache cache ) {
                    // Include only queryable nodes that are NOT in the system workspace ...
                    return node.isQueryable(cache) && !node.getKey().getWorkspaceKey().equals(systemWorkspaceKey);
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.