Package gr.ekt.bte.core

Examples of gr.ekt.bte.core.RecordSet


    public RecordSet getRecords(DataLoadingSpec spec)
            throws MalformedSourceException
    {
        if (spec.getOffset() > 0)
        {
            return new RecordSet();
        }
        return getRecords();
    }
View Full Code Here


     */
    @Override
    public RecordSet getRecords() throws MalformedSourceException
    {

        RecordSet recordSet = new RecordSet();

        try
        {
            InputStream inputStream = new FileInputStream(new File(filename));

            DocumentBuilderFactory factory = DocumentBuilderFactory
                    .newInstance();
            factory.setValidating(false);
            factory.setIgnoringComments(true);
            factory.setIgnoringElementContentWhitespace(true);

            DocumentBuilder db = factory.newDocumentBuilder();
            Document inDoc = db.parse(inputStream);

            Element xmlRoot = inDoc.getDocumentElement();
            Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
            Element body        = XMLUtils.getSingleElement(queryResult, "body");
            Element dataRoot    = XMLUtils.getSingleElement(body, "query");
            Record record = CrossRefUtils.convertCrossRefDomToRecord(dataRoot);
            recordSet.addRecord(convertFields(record));

        }
        catch (FileNotFoundException e)
        {
            e.printStackTrace();
View Full Code Here

    public RecordSet getRecords(DataLoadingSpec spec)
            throws MalformedSourceException
    {
        if (spec.getOffset() > 0)
        {
            return new RecordSet();
        }
        return getRecords();
    }
View Full Code Here

TOP

Related Classes of gr.ekt.bte.core.RecordSet

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.