Examples of AttributeComparator


Examples of com.crawljax.oraclecomparator.comparators.AttributeComparator

      }
      // create collection comparators
      if (attributes.size() > 0)
        rules.addOracleComparator(new OracleComparator(
                "attribute",
                new AttributeComparator(attributes.toArray(new String[attributes.size()]))));
      if (regexs.size() > 0)
        rules.addOracleComparator(new OracleComparator("regex", new RegexComparator(
                regexs.toArray(new String[regexs.size()]))));
      if (xpaths.size() > 0)
        rules.addOracleComparator(new OracleComparator("xpath",
View Full Code Here

Examples of com.crawljax.oraclecomparator.comparators.AttributeComparator

  @Test
  public void testAttributeOracle() {
    String control = "<HTML><A href=\"foo.html\" myattr=\"true\">foo</A><HTML>";
    String test = "<HTML><A href=\"foo.html\" myattr=\"false\">foo</A><HTML>";
    compareTwoDomsWithComparatorEqual(control, test, new AttributeComparator("myattr"));
  }
View Full Code Here

Examples of com.liferay.util.xml.AttributeComparator

    }

    for (int i = 0; i < el1Attrs.size(); i++) {
      Attribute attr = (Attribute)el1Attrs.get(i);

      int value = _contains(el2Attrs, attr, new AttributeComparator());
      if (value != 0) {
        return value;
      }
    }
    return -1;
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.AttributeComparator

            IAttribute[] attributes = ( IAttribute[] ) attributeMap.values().toArray(
                new IAttribute[attributeMap.size()] );

            if ( attributes.length > 0 )
            {
                AttributeComparator comparator = new AttributeComparator( entries[0].getConnection() );
                Arrays.sort( attributes, comparator );
            }

            returningAttributes = new String[attributes.length];
            for ( int i = 0; i < attributes.length; i++ )
            {
                returningAttributes[i] = attributes[i].getDescription();
            }
        }

        // header
        if ( this.mode != MODE_TABLE
            || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
        {
            text.append( quoteCharacter );
            text.append( "DN" );
            text.append( quoteCharacter );
            text.append( attributeDelimiter );
        }
        for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
        {
            text.append( quoteCharacter );
            text.append( returningAttributes[a] );
            text.append( quoteCharacter );
            if ( a + 1 < returningAttributes.length )
            {
                text.append( attributeDelimiter );
            }
        }
        text.append( lineSeparator );

        for ( int e = 0; entries != null && e < entries.length; e++ )
        {

            if ( this.mode != MODE_TABLE
                || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                    BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
            {
                text.append( quoteCharacter );
                text.append( entries[e].getDn().toString() );
                text.append( quoteCharacter );
                text.append( attributeDelimiter );

            }
            for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
            {

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                AttributeHierarchy ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
                if ( ah != null )
                {

                    StringBuffer valueSB = new StringBuffer();
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.AttributeComparator

                        }
                    }
                }
                IValue[] values = ( IValue[] ) valueList.toArray( new IValue[valueList.size()] );

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                Arrays.sort( values, comparator );

                for ( int i = 0; i < values.length; i++ )
                {
                    serializeValue( values[i], text );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.AttributeComparator

        int count, ExtendedProgressMonitor monitor ) throws IOException, ConnectionException
    {
        try
        {

            AttributeComparator comparator = new AttributeComparator( connection );
            LdifEnumeration enumeration = connection.exportLdif( searchParameter, monitor );
            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
            {
                LdifContainer container = enumeration.next( monitor );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.AttributeComparator

            IAttribute[] attributes = ( IAttribute[] ) attributeMap.values().toArray(
                new IAttribute[attributeMap.size()] );

            if ( attributes.length > 0 )
            {
                AttributeComparator comparator = new AttributeComparator( entries[0].getConnection() );
                Arrays.sort( attributes, comparator );
            }

            returningAttributes = new String[attributes.length];
            for ( int i = 0; i < attributes.length; i++ )
            {
                returningAttributes[i] = attributes[i].getDescription();
            }
        }

        // header
        if ( this.mode != MODE_TABLE
            || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
        {
            text.append( quoteCharacter );
            text.append( "DN" );
            text.append( quoteCharacter );
            text.append( attributeDelimiter );
        }
        for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
        {
            text.append( quoteCharacter );
            text.append( returningAttributes[a] );
            text.append( quoteCharacter );
            if ( a + 1 < returningAttributes.length )
            {
                text.append( attributeDelimiter );
            }
        }
        text.append( lineSeparator );

        for ( int e = 0; entries != null && e < entries.length; e++ )
        {

            if ( this.mode != MODE_TABLE
                || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                    BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
            {
                text.append( quoteCharacter );
                text.append( entries[e].getDn().toString() );
                text.append( quoteCharacter );
                text.append( attributeDelimiter );

            }
            for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
            {

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                AttributeHierarchy ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
                if ( ah != null )
                {

                    StringBuffer valueSB = new StringBuffer();
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeComparator

        int count, StudioProgressMonitor monitor ) throws IOException, ConnectionException
    {
        try
        {

            AttributeComparator comparator = new AttributeComparator( connection );
            LdifEnumeration enumeration = connection.exportLdif( searchParameter, monitor );
            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
            {
                LdifContainer container = enumeration.next( monitor );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeComparator

            IAttribute[] attributes = ( IAttribute[] ) attributeMap.values().toArray(
                new IAttribute[attributeMap.size()] );

            if ( attributes.length > 0 )
            {
                AttributeComparator comparator = new AttributeComparator( entries[0].getBrowserConnection() );
                Arrays.sort( attributes, comparator );
            }

            returningAttributes = new String[attributes.length];
            for ( int i = 0; i < attributes.length; i++ )
            {
                returningAttributes[i] = attributes[i].getDescription();
            }
        }

        // header
        if ( this.mode != MODE_TABLE
            || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
        {
            text.append( quoteCharacter );
            text.append( "DN" );
            text.append( quoteCharacter );
            text.append( attributeDelimiter );
        }
        for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
        {
            text.append( quoteCharacter );
            text.append( returningAttributes[a] );
            text.append( quoteCharacter );
            if ( a + 1 < returningAttributes.length )
            {
                text.append( attributeDelimiter );
            }
        }
        text.append( lineSeparator );

        for ( int e = 0; entries != null && e < entries.length; e++ )
        {

            if ( this.mode != MODE_TABLE
                || BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                    BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN ) )
            {
                text.append( quoteCharacter );
                text.append( entries[e].getDn().toString() );
                text.append( quoteCharacter );
                text.append( attributeDelimiter );

            }
            for ( int a = 0; returningAttributes != null && a < returningAttributes.length; a++ )
            {

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                AttributeHierarchy ah = entries[e].getAttributeWithSubtypes( returningAttributes[a] );
                if ( ah != null )
                {

                    StringBuffer valueSB = new StringBuffer();
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeComparator

                        }
                    }
                }
                IValue[] values = ( IValue[] ) valueList.toArray( new IValue[valueList.size()] );

                AttributeComparator comparator = new AttributeComparator( entries[e] );
                Arrays.sort( values, comparator );

                for ( int i = 0; i < values.length; i++ )
                {
                    serializeValue( values[i], text );
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.