Package com.ikanow.infinit.e.harvest.extraction.document.file

Examples of com.ikanow.infinit.e.harvest.extraction.document.file.XmlToMetadataParser.parseDocument()


          factory.setProperty(XMLInputFactory.IS_COALESCING, true);
          factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
          XMLStreamReader reader = null;
          try {             
            reader = factory.createXMLStreamReader(new ByteArrayInputStream(text.getBytes()));
            docs = parser.parseDocument(reader, textNotObject);
          }
          finally {
            if (null != reader) reader.close();
          }
        }//TESTED (meta_stream_test, test1)
View Full Code Here


          JsonReader jsonReader = null;
          try {         
            JsonToMetadataParser parser = new JsonToMetadataParser(null, levelOneFields, null, null, Integer.MAX_VALUE);
            jsonReader = new JsonReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes()), "UTF-8"));
            jsonReader.setLenient(true);
            docs = parser.parseDocument(jsonReader, textNotObject);
          }
          finally {
            if (null != jsonReader) jsonReader.close();
          }
        }//TESTED (meta_stream_test test2)
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.