try { Attribute attribute = attributes.get(substringElement.getAttribute()); if (attribute == null) { getNormalizer(); StringBuffer sb = new StringBuffer(); String initial = substringElement.getInitial(); String finalSegment = substringElement.getFinal(); if (initial != null && !initial.isEmpty()) { sb.append(Pattern.quote((String) normalizer.normalize(initial))); for (Object segment : substringElement.getAny()) { if (segment instanceof String) { sb.append(Pattern.quote((String) normalizer.normalize(segment))); + substringElement.toString()); throw new DirectoryException("could not retrieve value for attribute: " + substringElement.getAttribute());
SubstringNode node = new SubstringNode( attr ); node.setInitial( initialStr ); node.setFinal( finalStr ); node.addAny( anyStr );
Index idx = null; final SubstringNode snode = ( SubstringNode ) node; AttributeType type = attributeTypeRegistry.lookup( snode.getAttribute() ); Normalizer normalizer = type.getSubstr().getNormalizer(); if ( db.hasUserIndexOn( snode.getAttribute() ) ) regex = snode.getRegex( normalizer ); idx = db.getUserIndex( snode.getAttribute() ); if ( null == snode.getInitial() ) return idx.listIndices( regex, snode.getInitial() );
String oid = oidRegistry.getOid( snode.getAttribute() ); AttributeType type = attributeTypeRegistry.lookup( oid ); Normalizer normalizer = type.getSubstr().getNormalizer(); Attribute attr = entry.get( snode.getAttribute() ); regex = snode.getRegex( normalizer );
case( LeafNode.SUBSTRING ): SubstringNode substringNode = ( SubstringNode ) leaf; newLeaf = new SubstringNode( descendant.getOid(), substringNode.getInitial(), substringNode.getFinal() ); break; case( LeafNode.APPROXIMATE ):
String initialString = ((SubstringNode)exprNode).getInitial(); String finalString = ((SubstringNode)exprNode).getFinal(); List<String> anyStrings = ((SubstringNode)exprNode).getAny();
buf.append( '(' ).append( getAttribute() ).append( '=' );
branch = new SubstringNode( anyString, filter.getType(), initialString, finalString );
case( LeafNode.SUBSTRING ): SubstringNode substringNode = ( SubstringNode ) leaf; newLeaf = new SubstringNode( descendant.getOid(), substringNode.getInitial(), substringNode.getFinal() ); break; case( LeafNode.APPROXIMATE ):
String oid = oidRegistry.getOid( snode.getAttribute() ); AttributeType type = attributeTypeRegistry.lookup( oid ); if ( db.hasUserIndexOn( snode.getAttribute() ) ) Index idx = db.getUserIndex( snode.getAttribute() ); regex = snode.getRegex( normalizer ); regex = snode.getRegex( normalizer );