Examples of StringValue


Examples of org.apache.batik.css.engine.value.StringValue

        }
        ListValue result = new ListValue();
        for (;;) {
            switch (lu.getLexicalUnitType()) {
            case LexicalUnit.SAC_STRING_VALUE:
                result.append(new StringValue(CSSPrimitiveValue.CSS_STRING,
                                              lu.getStringValue()));
                lu = lu.getNextLexicalUnit();
                break;

            case LexicalUnit.SAC_IDENT:
                StringBuffer sb = new StringBuffer(lu.getStringValue());
                lu = lu.getNextLexicalUnit();
                if (lu != null &&
                    lu.getLexicalUnitType() == LexicalUnit.SAC_IDENT) {
                    do {
                        sb.append(' ');
                        sb.append(lu.getStringValue());
                        lu = lu.getNextLexicalUnit();
                    } while (lu != null &&
                             lu.getLexicalUnitType() == LexicalUnit.SAC_IDENT);
                    result.append(new StringValue(CSSPrimitiveValue.CSS_STRING,
                                                  sb.toString()));
                } else {
                    String id = sb.toString();
                    String s = id.toLowerCase().intern();
                    Value v = (Value)values.get(s);
                    result.append((v != null)
                                  ? v
                                  : new StringValue
                                        (CSSPrimitiveValue.CSS_STRING, id));
                }
            }
            if (lu == null) {
                return result;
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    private byte[] findClassInDIT( List<Dn> searchContexts, String name ) throws ClassNotFoundException
    {
        // Set up the search filter
        BranchNode filter = new AndNode();
        AttributeType fqjcnAt = directoryService.getSchemaManager().getAttributeType( "fullyQualifiedJavaClassName" );
        filter.addNode( new EqualityNode<String>( fqjcnAt, new StringValue( name ) ) );
        filter.addNode( new EqualityNode<String>( OBJECT_CLASS_AT,
            new StringValue( ApacheSchemaConstants.JAVA_CLASS_OC ) ) );

        try
        {
            for ( Dn base : searchContexts )
            {
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    @Test
    public void testCursorIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );
        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        LessEqCursor<String> cursor = new LessEqCursor<String>( store, evaluator );
        assertNotNull( cursor );
        assertFalse( cursor.available() );
        assertFalse( cursor.isClosed() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    @Test
    public void testCursorNotIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );
        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        LessEqCursor<String> cursor = new LessEqCursor<String>( store, evaluator );
        assertNotNull( cursor );
        assertFalse( cursor.available() );
        assertFalse( cursor.isClosed() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    @Test
    public void testEvaluatorIndexed() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "3" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    @Test
    public void testEvaluatorWithDescendantValue() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "2" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

        String spUnitName = StoredProcUtils.extractStoredProcUnitName( fullSPName );

        AttributeType storeProcUnitNamAT = session.getDirectoryService()
            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( storeProcUnitNamAT,
            new StringValue( storeProcUnitNamAT, spUnitName ) );
        Dn dn = session.getDirectoryService().getDnFactory().create( storedProcContainer );
        Cursor<Entry> results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS );
       
        if ( results.first() )
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.StringValue

    @Test
    public void testEvaluatorWithoutDescendants() throws Exception
    {
        AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.C_POSTALCODE_AT_OID );
        LessEqNode<String> node = new LessEqNode<String>( at, new StringValue( at, "2" ) );

        LessEqEvaluator<String> evaluator = new LessEqEvaluator<String>( node, store, schemaManager );
        IndexEntry<String, String> indexEntry = new IndexEntry<String, String>();
        assertEquals( node, evaluator.getExpression() );
        assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.StringValue

    private EntryFilteringCursor listSchemas() throws Exception
    {
        DN base = new DN( SchemaConstants.OU_SCHEMA );
        base.normalize( schemaManager.getNormalizerMapping() );
        ExprNode filter = new EqualityNode<String>( schemaManager.getAttributeTypeRegistry().getOidByName( SchemaConstants.OBJECT_CLASS_AT ),
            new StringValue( MetaSchemaConstants.META_SCHEMA_OC ) );

        SearchOperationContext searchContext = new SearchOperationContext( null );
        searchContext.setDn( base );
        searchContext.setScope( SearchScope.ONELEVEL );
        searchContext.setReturningAttributes( schemaAttributesToReturn );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.entry.StringValue

     * @param upValue the user provided value of the Rdn
     * @throws LdapInvalidDnException if the Rdn is invalid
     */
    public Rdn( SchemaManager schemaManager, String upType, String upValue ) throws LdapInvalidDnException
    {
        addAVA( schemaManager, upType, upType, new StringValue( upValue ), new StringValue( upValue ) );

        upName = upType + '=' + upValue;

        if ( schemaManager != null )
        {
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.