Package org.apache.tika.sax

Examples of org.apache.tika.sax.XHTMLContentHandler.element()


                metadata.set(XMPDM.TRACK_NUMBER, tag.getTrackNumber());
            } else {
                xhtml.element("p", tag.getAlbum());
            }
            xhtml.element("p", tag.getYear());
            xhtml.element("p", tag.getGenre());
            for (String comment : comments) {
               xhtml.element("p", comment);
            }
        }
        if (audioAndTags.audio != null) {
View Full Code Here


                xhtml.element("p", tag.getAlbum());
            }
            xhtml.element("p", tag.getYear());
            xhtml.element("p", tag.getGenre());
            for (String comment : comments) {
               xhtml.element("p", comment);
            }
        }
        if (audioAndTags.audio != null) {
            metadata.set("samplerate", String.valueOf(audioAndTags.audio.getSampleRate()));
            metadata.set("channels", String.valueOf(audioAndTags.audio.getChannels()));
View Full Code Here

             
             
              // As text
              for (Box box : apple.getBoxes()) {
                 if (box instanceof AbstractAppleMetaDataBox) {
                    xhtml.element("p", ((AbstractAppleMetaDataBox)box).getValue());
                 }
              }
           }
          
           // TODO Check for other kinds too
View Full Code Here

                    }

                    xhtml.characters(curLine);

                    // For plain text email, each line is a real break position.
                    xhtml.element("br", "");
                }
            }
        }

        if (parseState == ParseStates.IN_HEADER) {
View Full Code Here

            Metadata metadata, ParseContext context)
            throws SAXException {
        waitIfBlocked();
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();
        xhtml.element("p", "The quick brown fox jumped over the lazy dog.");
        xhtml.endDocument();
    }

}
View Full Code Here

            int genre = (int) tag[127] & 0xff; // unsigned byte

            metadata.set(Metadata.TITLE, title);
            metadata.set(Metadata.AUTHOR, artist);

            xhtml.element("h1", title);
            xhtml.characters("\n");

            xhtml.element("p", artist);
            xhtml.characters("\n");
View Full Code Here

            metadata.set(Metadata.AUTHOR, artist);

            xhtml.element("h1", title);
            xhtml.characters("\n");

            xhtml.element("p", artist);
            xhtml.characters("\n");

            // ID3v1.1 Track addition
            // If the last two bytes of the comment field are zero and
            // non-zero, then the last byte is the track number
View Full Code Here

            // ID3v1.1 Track addition
            // If the last two bytes of the comment field are zero and
            // non-zero, then the last byte is the track number
            if (tag[125] == 0 && tag[126] != 0) {
                int track = (int) tag[126] & 0xff;
                xhtml.element("p", album + ", track " + track);
            } else {
                xhtml.element("p", album);
            }
            xhtml.characters("\n");
View Full Code Here

            // non-zero, then the last byte is the track number
            if (tag[125] == 0 && tag[126] != 0) {
                int track = (int) tag[126] & 0xff;
                xhtml.element("p", album + ", track " + track);
            } else {
                xhtml.element("p", album);
            }
            xhtml.characters("\n");

            xhtml.element("p", year);
            xhtml.characters("\n");
View Full Code Here

            } else {
                xhtml.element("p", album);
            }
            xhtml.characters("\n");

            xhtml.element("p", year);
            xhtml.characters("\n");

            xhtml.element("p", comment);
            xhtml.characters("\n");
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.