Package nz.govt.natlib.fx

Examples of nz.govt.natlib.fx.Element


        long reportedLength = 0;
        // read the type;
        String st = FXUtil.getFixedStringValue(ftk, 4);
 
        // 3. process the chunk...
        Element parser = null;
        // get data for the type of block it is...
        if ("fmt ".equals(st)) {
          ctx.fireStartParseEvent("Wave");
          ctx.fireParseEvent("type", st);
          wavElement.read(ftk, ctx);
View Full Code Here


  // File position offset to the NFib
  private static final int Offset_To_NFib = 0x2;

  public static void getHeader(DataSource ftk, ParserContext ctx)
      throws java.io.IOException {
    Element wordHeader = new CompoundElement(new String[] { "MagicNumber",
        "FIBNumber", "ProductVersion" }, new Element[] {
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT), });

    wordHeader.read(ftk, ctx);
  }
View Full Code Here

  public static void getDOPProperties(DataSource ftk, int iDopFP,
      ParserContext ctx) throws java.io.IOException {
    // Set to the Dop + offset to start of relevant information
    ftk.setPosition((iDopFP + 0x14));
    Element DocumentProperties = new CompoundElement(new String[] {
        "created", "revision", "printed", "revisioncount",
        "timeediting", "pages", "words", "characters" }, new Element[] {
        new DTTM(),
        new DTTM(),
        new DTTM(),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT), });
    DocumentProperties.read(ftk, ctx);
  }
View Full Code Here

  // File position offset to the NFib
  private static final int Offset_To_NFib = 0x2;

  public static void getHeader(DataSource ftk, ParserContext ctx)
      throws java.io.IOException {
    Element wordHeader = new CompoundElement(new String[] { "MagicNumber",
        "FIBNumber", "ProductVersion" }, new Element[] {
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT), });

    wordHeader.read(ftk, ctx);
  }
View Full Code Here

  public static void getDOPProperties(DataSource ftk, int iDopFP,
      ParserContext ctx) throws java.io.IOException {
    // Set to the Dop + offset to start of relevant information
    ftk.setPosition((iDopFP + 0x14));
    Element DocumentProperties = new CompoundElement(new String[] {
        "created", "revision", "printed", "revisioncount",
        "timeediting", "pages", "words", "characters" }, new Element[] {
        new DTTM(),
        new DTTM(),
        new DTTM(),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT), });
    DocumentProperties.read(ftk, ctx);
  }
View Full Code Here

                  // value...
      }

      Object result = null;
      if (offset) {
        Element tiffElement = null;
        switch (type) {
        case 0x01:
          tiffElement = new IntegerElement(1, (int) length,
              bigEndian, IntegerElement.DECIMAL_FORMAT);
          break;
View Full Code Here

  // File position offset to the NFib
  private static final int Offset_To_NFib = 0x2;

  public static void getHeader(DataSource ftk, ParserContext ctx)
      throws java.io.IOException {
    Element wordHeader = new CompoundElement(new String[] { "MagicNumber",
        "FIBNumber", "ProductVersion" }, new Element[] {
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.HEX_FORMAT), });

    wordHeader.read(ftk, ctx);
  }
View Full Code Here

  public static void getDOPProperties(DataSource ftk, int iDopFP,
      ParserContext ctx) throws java.io.IOException {
    // Set to the Dop + offset to start of relevant information
    ftk.setPosition((iDopFP + 0x14));
    Element DocumentProperties = new CompoundElement(new String[] {
        "created", "revision", "printed", "revisioncount",
        "timeediting", "pages", "words", "characters" }, new Element[] {
        new DTTM(),
        new DTTM(),
        new DTTM(),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.INT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT),
        new IntegerElement(IntegerElement.SHORT_SIZE, false,
            IntegerElement.DECIMAL_FORMAT), });
    DocumentProperties.read(ftk, ctx);
  }
View Full Code Here

                              // value...

      String name = TIFFUtil.getTagName(tag);
      Object result = null;
      if ((TIFFUtil.getUnitLength(type) * length) > 4) {
        Element tiffElement = null;
        // need to go into the file to get the value.
        // Note: some other special types may be compounded into this
        // one...
        if (tag == 32932) {
          tiffElement = new MSAnnotationBlock(length);
View Full Code Here

          bigEndian);
 
      // READ THE IFD DIRECTORIES
      while (next != 0x00) {
        ftk.setPosition(next);
        Element tiffIFDRecord = new ImageFileDirectory(bigEndian);
        ctx.fireStartParseEvent("ImageFileDirectory");
        tiffIFDRecord.read(ftk, ctx);
        ctx.fireEndParseEvent("ImageFileDirectory");
 
        // read where the next record is.
        next = FXUtil.getNumericalValue(ftk, IntegerElement.INT_SIZE,
            bigEndian);
View Full Code Here

TOP

Related Classes of nz.govt.natlib.fx.Element

Copyright © 2018 www.massapicom. 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.