Examples of ElementFilter


Examples of com.intellij.psi.filters.ElementFilter

* Another example: <code>&lt;link rel="import" href="packages/click_counter/click_counter.html"&gt;</code> is resolved to ./lib/click_counter.html if 'click_counter' is a Dart project name in pubspec.yaml
*/
public class DartPackagePathReferenceProvider extends PsiReferenceProvider {

  public static ElementFilter getFilter() {
    return new ElementFilter() {
      @Override
      public boolean isAcceptable(Object _element, PsiElement context) {
        if (!(_element instanceof PsiElement)) return false;
        final PsiElement element = (PsiElement)_element;
        final PsiElement parentElement = element.getParent();
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

     */
    public static Element getLZNDescription( Element rdfElement,
                                             boolean create )
        throws IOException
    {
        final ElementFilter filter =
            new ElementFilter(
                XMP_RDF_PREFIX + ":Description",
                "xmlns:lzn", Application.LznNamespace
            );
        Element lznDescElement =
            (Element)XMLUtil.getFirstChildOf( rdfElement, filter );
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

     * doesn't contain an <code>rdf:RDF</code> element.
     */
    public static Element getRDFElementOf( Document xmpDoc ) {
        return (Element)XMLUtil.getFirstChildOf(
            xmpDoc.getDocumentElement(),
            new ElementFilter( XMP_RDF_PREFIX + ":RDF" )
        );
    }
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

        final Element oldRDFElement = getRDFElementOf( oldXMPDoc );
        //
        // Find the rdf element containing the metadata for the given
        // directory.
        //
        final ElementFilter dirFilter = new ElementFilter(
            XMP_RDF_PREFIX + ":Description", "xmlns:" + dirPrefix, dirNS
        );
        Node newRDFDirElement =
            XMLUtil.getFirstChildOf( newRDFElement, dirFilter );
        final Element oldRDFDirElement =
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

     * @param parent The {@link XmlNode} to add child nodes to.
     */
    public ImageExportOptionXMLReader( Element parent ) throws IOException {
        final Node node = XMLUtil.getFirstChildOf(
            parent,
            new ElementFilter( ImageExportOptionXMLWriter.ExportOptionsTag )
        );
        if ( node == null )
            throw new XMLException( ImageExportOptionXMLWriter.ExportOptionsTag + "\" expected" );
        m_parent = (Element)node;
    }
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

     * @param o
     * @throws IOException
     */
    private void readImpl( ImageExportOption o ) throws IOException {
        final Node child = XMLUtil.getFirstChildOf(
            m_parent, new ElementFilter( o.getName() )
        );
        if ( child == null )
            return;
        final String value = ((Element)child).getAttribute( "value" );
        if ( value.length() == 0 )
View Full Code Here

Examples of com.lightcrafts.utils.xml.ElementFilter

            return false;

        ////////// Parse the version number ///////////////////////////////////

        final Element number = (Element)XMLUtil.getFirstChildOf(
            version, new ElementFilter( "number" )
        );
        if ( number == null )
            return false;
        m_updateVersion = XMLUtil.getTextOfFirstTextChildOf( number );

        ////////// Parse the revision number //////////////////////////////////

        final Element revision = (Element)XMLUtil.getFirstChildOf(
            version, new ElementFilter( "revision" )
        );
        if ( revision == null )
            return false;
        final String updateRevision =
            XMLUtil.getTextOfFirstTextChildOf( revision );
        try {
            m_updateRevision = Integer.parseInt( updateRevision );
        }
        catch ( NumberFormatException e ) {
            return false;
        }

        ////////// Parse the URL //////////////////////////////////////////////

        final Element url = (Element)XMLUtil.getFirstChildOf(
            version, new ElementFilter( "url" )
        );
        if ( url == null )
            return false;
        m_updateURL = XMLUtil.getTextOfFirstTextChildOf( url );
View Full Code Here

Examples of org.codehaus.staxmate.in.ElementFilter

  /**
   * {@inheritDoc}
   */
  public void stream(SMHierarchicCursor rootCursor) throws XMLStreamException {
    SMInputCursor testSuiteCursor = rootCursor.constructDescendantCursor(new ElementFilter("testsuite"));
    try{
      testSuiteCursor.getNext();
    }
    catch(com.ctc.wstx.exc.WstxEOFException eofExc){
      throw new EmptyReportException();
View Full Code Here

Examples of org.jdom.filter.ElementFilter

        }
      }
      node = (Element)_node.clone();   

      if(reorder) {
        Filter elementFilter2 = new ElementFilter( "job_chain_node.job_chain", getChain().getNamespace() );
        // gets all element nodes under the rootElement
        List elements = getChain().getContent( elementFilter2 );
        // cycle through all immediate elements under the rootElement
        //for( java.util.Iterator it = elements.iterator(); it.hasNext(); ) {
        int size = elements.size();
View Full Code Here

Examples of org.jdom.filter.ElementFilter

        }
      }
      node = (Element)_node.clone();   

      if(reorder) {
        Filter elementFilter2 = new ElementFilter( "job_chain_node", getChain().getNamespace() );
        // gets all element nodes under the rootElement
        List elements = getChain().getContent( elementFilter2 );
        // cycle through all immediate elements under the rootElement
        //for( java.util.Iterator it = elements.iterator(); it.hasNext(); ) {
        int size = elements.size();
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.