Package org.jboss.dna.graph.property

Examples of org.jboss.dna.graph.property.NamespaceRegistry$Namespace


    @Override
    public boolean applyChange(MavenProject project, Element root) throws ProjectRewriteException
    {
        boolean modified = false;

        Namespace ns = getNamespaceOrNull(root);

        Element versionElement = root.getChild("version", ns);
        String projectId = ArtifactUtils.versionlessKey(project.getGroupId(), project.getArtifactId());
        String releaseVersion = releaseVersions.get(projectId);
       
View Full Code Here


      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

TOP

Related Classes of org.jboss.dna.graph.property.NamespaceRegistry$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.