Package edu.harvard.hul.ois.ots.schemas.TextMD

Examples of edu.harvard.hul.ois.ots.schemas.TextMD.TextMD


    protected MarkupLanguage ml;
    protected MarkupBasis mb;
    protected CharacterInfo ci;
   
    protected TextMDModel () {
        textMD = new TextMD ();
        ml = null;
    }
View Full Code Here


        elem = new Element ("markupLanguage");
        elem.addContent (mln);
        textElem.addContent (elem);
       
        XmlContentConverter conv = new XmlContentConverter ();
        TextMD tmd = (TextMD) conv.toTextMD (textElem);
       
        List<CharacterInfo> chinfos = tmd.getCharacterInfos();
        assertTrue (chinfos.size() == 1);
        CharacterInfo chinfo = chinfos.get(0);
        assertEquals ("US-ASCII", chinfo.getCharset());
        assertEquals ("LF", chinfo.getLinebreak ());
       
        List<MarkupBasis> mkbases = tmd.getMarkupBases();
        assertTrue (mkbases.size () == 1);
        MarkupBasis mkbas = mkbases.get(0);
        assertEquals ("HTML", mkbas.getValue());
        assertEquals ("1.0", mkbas.getVersion());
       
        List<MarkupLanguage> mklangs = tmd.getMarkupLanguages();
        assertTrue (mklangs.size() == 1);
        MarkupLanguage mklang = mklangs.get(0);
        assertEquals (mln, mklang.getValue());
    }
View Full Code Here

      FitsOutput fitsOut = fits.examine(input);
     
    XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat());
    serializer.output(fitsOut.getFitsXml(), System.out);
   
    TextMD textmd = (TextMD)fitsOut.getStandardXmlContent();
    textmd.setRoot(true);
   
    XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
    XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
   
    textmd.output(writer);
     
  }
View Full Code Here

TOP

Related Classes of edu.harvard.hul.ois.ots.schemas.TextMD.TextMD

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.