Package org.outerj.daisy.repository

Examples of org.outerj.daisy.repository.Version


        String query = "select id, name where InCollection('" + collection + "') and branch = '" + branch + "'";
        VariantKey[] keys = queryManager.performQueryReturnKeys(query, Locale.getDefault());

        for (VariantKey key : keys) {
            Document doc = repository.getDocument(key, false);
            Version version = doc.getLiveVersion();
            if (version == null) {
                continue;
            }

            for (Part part : version.getParts().getArray()) {
                if (schema.getPartTypeById(part.getTypeId(), false).isDaisyHtml()) {
                    InputStream is = part.getDataStream();
                    org.w3c.dom.Document domDoc = DocumentHelper.parse(is);
                    NodeList links = XPathUtils.evalNodeList("//a/@href", domDoc.getDocumentElement());
                    for (int j = 0; j < links.getLength(); j++) {
                        String link = ((Attr)links.item(j)).getValue();
                        System.out.printf("[%1$10.10s][%2$30.30s][%3$10.10s] %4$s\n", key.getDocumentId(),
                                version.getDocumentName(), part.getTypeName(), link);
                    }
                    is.close();
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.outerj.daisy.repository.Version

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.