Package org.modeshape.sequencer.ddl.dialect.derby

Examples of org.modeshape.sequencer.ddl.dialect.derby.DerbyDdlLexicon$Namespace


      for (;;)
      {
        String url = String.format("%s?%s", repo, QueryUtil.prepareParams(params));
        Element listing = new SAXBuilder().build(new URL(url)).getRootElement();
        assert "ListBucketResult".equals(listing.getName()) : "Unexpected response";
        Namespace ns = listing.getNamespace();

        String lastkey = null;
        for (Element entry : listing.getChildren("Contents", ns))
        {
          lastkey = entry.getChildTextTrim("Key", ns);
View Full Code Here


               
                progressPanel.increment();
                /*
                 * Step 1: generate XML stub
                 */
                Namespace ns = Namespace.getNamespace("", "http://earth.google.com/kml/2.2"); //NON-NLS
                // kml
                Element kml = new Element("kml", ns); //NON-NLS
                Document kmlDocument = new Document(kml);

                // Document
View Full Code Here

    @Override
    public boolean isMyType(final Document document) {

        final Element rssRoot = document.getRootElement();
        final Namespace defaultNS = rssRoot.getNamespace();
        final List<Namespace> additionalNSs = rssRoot.getAdditionalNamespaces();

        boolean myType = false;
        if (defaultNS != null && defaultNS.equals(getRDFNamespace()) && additionalNSs != null) {
            for (final Namespace namespace : additionalNSs) {
                if (getRSSNamespace().equals(namespace)) {
                    myType = true;
                    break;
                }
View Full Code Here

        // from the foreign markup to avoid duplication in case of read/write. Note that this fix
        // will break if a content module is used
        final Iterator<Element> iterator = foreignMarkup.iterator();
        while (iterator.hasNext()) {
            final Element element = iterator.next();
            final Namespace eNamespace = element.getNamespace();
            final String eName = element.getName();
            if (getContentNamespace().equals(eNamespace) && eName.equals("encoded")) {
                iterator.remove();
            }
        }
View Full Code Here

    }

    @Override
    public boolean isMyType(final Document document) {
        final Element rssRoot = document.getRootElement();
        final Namespace defaultNS = rssRoot.getNamespace();
        return defaultNS != null && defaultNS.equals(getAtomNamespace());
    }
View Full Code Here

    }

    @Override
    public boolean isMyType(final Document document) {
        final Element rssRoot = document.getRootElement();
        final Namespace defaultNS = rssRoot.getNamespace();
        return defaultNS != null && defaultNS.equals(getAtomNamespace());
    }
View Full Code Here

        final Description description = item.getDescription();
        if (description != null) {
            eItem.addContent(generateSimpleElement("description", description.getValue()));
        }

        final Namespace contentNamespace = getContentNamespace();
        final Content content = item.getContent();
        if (item.getModule(contentNamespace.getURI()) == null && content != null) {
            final Element elem = new Element("encoded", contentNamespace);
            elem.addContent(content.getValue());
            eItem.addContent(elem);
        }
View Full Code Here

    }

    @Override
    public boolean isMyType(final Document document) {
        final Element rssRoot = document.getRootElement();
        final Namespace defaultNS = rssRoot.getNamespace();
        return defaultNS != null && defaultNS.equals(getRSSNamespace()) && super.isMyType(document);
    }
View Full Code Here

    public List<Module> parseModules(final Element root, final Locale locale) {
        final List<ModuleParser> parsers = getPlugins();
        List<Module> modules = null;
        for (final ModuleParser parser : parsers) {
            final String namespaceUri = parser.getNamespaceUri();
            final Namespace namespace = Namespace.getNamespace(namespaceUri);
            if (hasElementsFrom(root, namespace)) {
                final Module module = parser.parse(root, locale);
                if (module != null) {
                    modules = Lists.createWhenNull(modules);
                    modules.add(module);
View Full Code Here

    }

    private boolean hasElementsFrom(final Element root, final Namespace namespace) {
        boolean hasElements = false;
        for (final Element child : root.getChildren()) {
            final Namespace childNamespace = child.getNamespace();
            if (namespace.equals(childNamespace)) {
                hasElements = true;
                break;
            }
        }
View Full Code Here

TOP

Related Classes of org.modeshape.sequencer.ddl.dialect.derby.DerbyDdlLexicon$Namespace

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.