Examples of Normalizer


Examples of org.apache.directory.shared.ldap.schema.Normalizer

        // The parent DN must be ou=normalizers,cn=<schemaName>,ou=schema
        checkParent( parentDn, schemaManager, SchemaConstants.NORMALIZER );

        // Get the Normalizer from the given entry ( it has been grabbed from the server earlier)
        String schemaName = getSchemaName( entry.getDn() );
        Normalizer normalizer = factory.getNormalizer( schemaManager, entry, schemaManager.getRegistries(), schemaName );

        String oid = normalizer.getOid();

        if ( isSchemaEnabled( schemaName ) )
        {
            if ( schemaManager.getRegistries().isReferenced( normalizer ) )
            {
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Normalizer

            DN newDn = new DN( targetEntry.getDn() );
            newDn.remove( newDn.size() - 1 );
            newDn.add( newRdn );
            targetEntry.setDn( newDn );

            Normalizer normalizer = factory.getNormalizer( schemaManager, targetEntry, schemaManager.getRegistries(),
                schemaName );
            schemaManager.unregisterNormalizer( oldOid );
            schemaManager.add( normalizer );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Normalizer

                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        String oid = ( String ) newRdn.getNormValue();
        checkOidIsUniqueForNormalizer( oid );
        Normalizer normalizer = factory.getNormalizer( schemaManager, entry, schemaManager.getRegistries(),
            newSchemaName );

        if ( isSchemaEnabled( oldSchemaName ) )
        {
            schemaManager.unregisterNormalizer( oldOid );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Normalizer

        {
            throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_368, oid ),
                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        Normalizer normalizer = factory.getNormalizer( schemaManager, entry, schemaManager.getRegistries(),
            newSchemaName );

        if ( isSchemaEnabled( oldSchemaName ) )
        {
            schemaManager.unregisterNormalizer( oid );
View Full Code Here

Examples of org.apache.ldap.common.schema.Normalizer

    {
        RE regex = null;
        Index idx = null;
        final SubstringNode snode = ( SubstringNode ) node;
        AttributeType type = attributeTypeRegistry.lookup( snode.getAttribute() );
        Normalizer normalizer = type.getSubstr().getNormalizer();

        if ( db.hasUserIndexOn( snode.getAttribute() ) )
        {
            /*
             * Build out regex in this block so we do not do it twice in the
View Full Code Here

Examples of org.encog.ml.data.versatile.normalizers.Normalizer

   * @param colDef The column definition.
   * @param isInput True if the column is input.
   * @return The normalizer to use.
   */
  private Normalizer findNormalizer(ColumnDefinition colDef, boolean isInput) {
    Normalizer norm = null;
   
    if(isInput) {
      if( this.inputNormalizers.containsKey(colDef.getDataType())) {
        norm = this.inputNormalizers.get(colDef.getDataType());
      }
View Full Code Here

Examples of org.folg.places.standardize.Normalizer

      }
   }

   private void doMain() throws SAXParseException, IOException {

      Normalizer normalizer = null;
      if (useTokenizer) {
         normalizer = Normalizer.getInstance();
      }


      PrintWriter reversedWordsWriter = analysisPlacesOut != null ? new PrintWriter(new File(analysisPlacesOut, "reversedWords.txt")) : new PrintWriter(System.out);

      BufferedReader bufferedReader = new BufferedReader(new FileReader(placesIn));

      int lineCount = 0;
      while (bufferedReader.ready()) {
         String nextLine = bufferedReader.readLine();
         nextLine = nextLine.trim().toLowerCase();
         if (nextLine.length() == 0)
            continue;

         lineCount++;
         if (lineCount % 5000 == 0)
            System.out.println("indexing line " + lineCount);

         placesCountCC.add(nextLine);
         totalPlacesCount++;

         String[] placeList = nextLine.split(SPLIT_REGEX);

         for (String place : placeList) {
            place = place.trim();

            if (place.length() == 0)
               continue;

            if (NumberUtils.isNumber(place)) {
               numbersCountCC.add(place);
               totalNumbersCount++;
            } else {
               wordsCountCC.add(place);
               totalWordsCount++;
            }
         }

         int lastCommaIndx = nextLine.lastIndexOf(",");
         String lastWord = nextLine.substring(lastCommaIndx + 1).trim();
         if (lastWord.length() > 0) {
            endingsOfPlacesCC.add(lastWord);
            endingsOfPlacesTotalCount++;
         }

         if (lineCount % REVERSE_EVERY_N == 0) {
            StringBuilder reversedWord = new StringBuilder(nextLine);
            reversedWordsWriter.println(reversedWord.reverse());
         }

         if ( (useTokenizer) && (lineCount % TOKENIZE_EVERY_N == 0) ){
            List<List<String>> levels = normalizer.tokenize(nextLine);
            for (List<String> levelWords : levels) {
               tokenizerPlacesCountCC.addAll(levelWords);
               totalTokenizerPlacesCount += levelWords.size();
            }
         }
View Full Code Here

Examples of org.jfree.layouting.normalizer.content.Normalizer

     * @throws StateException
     */
    public StatefullComponent restore(final LayoutProcess layoutProcess)
            throws StateException
    {
      final Normalizer normalizer = (Normalizer)
              chainedNormalizerState.restore(layoutProcess);
      return new ChainingNormalizer(normalizer);
    }
View Full Code Here

Examples of org.pdf4j.saxon.codenorm.Normalizer

            XPathException err = new XPathException("Unknown normalization form " + form);
            err.setErrorCode("SESU0011");
            throw err;
        }

        normalizer = new Normalizer(fb);
    }
View Full Code Here

Examples of org.unicode.Normalizer

        // File.toURL() ends up with sth. like "file:/Volumes/Claude/..." omitting the two initial slashes
//        final String[] cmdArray = { "osascript", "-e", "tell application \"Finder\"", "-e", "activate",
//                      "-e", "open location \"" + f.getAbsoluteFile().toURL().toString() + "\"",
//                      "-e", "end tell" };
        // make sure space characters are escaped as %20 in URL stylee
        final Normalizer n    = new Normalizer( Normalizer.C, false );
//        final String parentDir  = n.normalize( f.getParentFile().getAbsolutePath() ).replaceAll( " ", "%20" );
        String path        = n.normalize( f.getParentFile().getAbsoluteFile().toURI().toURL().toExternalForm() ); // getAbsolutePath() ).replaceAll( " ", "%20" );
//        String path        = n.normalize( f.getAbsoluteFile().toURL().toExternalForm() ); // getAbsolutePath() ).replaceAll( " ", "%20" );
        path          = path.substring( 5 );
StringBuffer sb = new StringBuffer();
//char ch;
int  chI;
byte[] hex = "0123456789abcdef".getBytes();
byte[] enc = path.getBytes( "UTF-8" );
for( int i = 0; i < enc.length; i++ ) {
  chI = enc[ i ]; // parentDir.charAt( i );
//  chI = (int) ch;
  if( (chI < 33) || (chI > 127) ) {
    sb.append( "%" + (char) hex[ (chI >> 4) & 0x0F ] + (char) hex[ chI & 0x0F ]);
  } else {
    sb.append( (char) chI );
  }
}
path = sb.toString();
//int i = path.lastIndexOf( '/' ) + 1;
final String parentDir = path;
final String fileName = n.normalize( f.getName() ); // .getBytes( "ISO-8859-1" ));
//final String parentDir = path.substring( 0, i );
//final String fileName = path.substring( i );
//System.err.println( "'" + parentDir + "'" );       
//System.err.println( "'" + fileName + "'" );       
        final String[] cmdArray = { "osascript", "-e", "tell application \"Finder\"", "-e", "activate",
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.