Ejemplo n.º 1
0
 private static bool AllCharsHaveMatch(ReverseCodeTable rct, String str)
 {
     foreach (var c in str)
     {
         if (!rct.CharHasMatch(c))
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs an instance with the specified input stream.
 ///
 /// Use this constructor to create an instance with a customized code table
 /// mapping. The mapping file should follow the structure of LC's XML MARC-8
 /// to Unicode mapping (see:
 /// http://www.loc.gov/marc/specifications/codetables.xml).
 /// </summary>
 /// <param name="?"></param>
 public UnicodeToAnsel(Stream stream)
 {
     rct = new ReverseCodeTableHash(stream);
 }
Ejemplo n.º 3
0
 /// <summary>
 ///  Constructs an instance with the specified pathname.
 ///
 ///  Use this constructor to create an instance with a customized code table
 ///  mapping. The mapping file should follow the structure of LC's XML MARC-8
 ///  to Unicode mapping (see:
 ///  http://www.loc.gov/marc/specifications/codetables.xml).
 /// </summary>
 /// <param name="pathname"></param>
 public UnicodeToAnsel(String pathname)
 {
     rct = new ReverseCodeTableHash(pathname);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance and loads the MARC4J supplied Ansel/Unicode
 /// conversion tables based on the official LC tables. Loads in the generated class
 /// ReverseCodeTableGenerated which contains switch statements to lookup
 /// the MARC-8 encodings for given Unicode characters.
 /// </summary>
 public UnicodeToAnsel()
 {
     rct = LoadGeneratedTable();
     //this(UnicodeToAnsel.class
     //        .getResourceAsStream("resources/codetables.xml"));
 }