Package com.google.gdata.util.common.xml

Examples of com.google.gdata.util.common.xml.XmlNamespace


    if (mapping == null) {
      mapping = new Stack<NamespaceDecl>();
      namespaceMap.put(alias, mapping);
    }

    XmlNamespace ns = new XmlNamespace(alias, uri);
    NamespaceDecl nsDecl = new NamespaceDecl(ns);
    mapping.push(nsDecl);
    elementNamespaces.add(ns);
  }
View Full Code Here


    // originally declared externally to it
    if (nsDecl != null && !nsDecl.inBlob && nsDecl.ns != null &&
        !handler.blobNamespaces.contains(alias)) {
      handler.blobNamespaces.add(alias);
      handler.xmlBlob.namespaces.add(
          new XmlNamespace(alias, nsDecl.ns.getUri()));
    }
  }
View Full Code Here

            pe.setInternalReason(
                      "NamespaceDescription uri attribute is missing");
            throw pe;
          }

          XmlNamespace declaredNs = new XmlNamespace(alias, uri);
          namespaces.add(declaredNs);
          declareAdditionalNamespace(declaredNs);
          return new XmlParser.ElementHandler();

        } else if (localName.equals("extensionPoint")) {
View Full Code Here

  public void generateFeedStart(ExtensionProfile extProfile,
                                XmlWriter w,
                                Collection<XmlNamespace> namespaces) throws
      IOException {

    XmlNamespace openSearchNs = Namespaces.getOpenSearchNs();

    Set<XmlNamespace> nsDecls = new LinkedHashSet<XmlNamespace>();
    nsDecls.add(Namespaces.atomNs);
    nsDecls.add(openSearchNs);
    nsDecls.addAll(extProfile.getNamespaceDecls());
View Full Code Here

   * @throws  IOException
   */
  public void generateRss(XmlWriter w,
                          ExtensionProfile extProfile) throws IOException {

    XmlNamespace openSearchNs = Namespaces.getOpenSearchNs();

    Vector<XmlNamespace> nsDecls = new Vector<XmlNamespace>();
    nsDecls.add(Namespaces.atomNs);
    nsDecls.add(openSearchNs);
    nsDecls.addAll(extProfile.getNamespaceDecls());
View Full Code Here

      w.write(xmlBlob.getBlob());
    }

    if (manifest != null) {
      for (XmlNamespace ns : manifest.getNamespaceDecls()) {
        XmlNamespace newNs = new XmlNamespace(ns.getAlias(), ns.getUri());
        if (!namespaces.contains(newNs)) {
          namespaces.add(newNs);
        }
      }
    }
View Full Code Here

      throw new IllegalArgumentException("No default description found for "
          + extensionClass);
    }
    return new ExtensionDescription(
        extensionClass,
        new XmlNamespace(defAnnot.nsAlias(), defAnnot.nsUri()),
        defAnnot.localName(),
        defAnnot.isRequired(),
        defAnnot.isRepeatable(),
        defAnnot.isAggregate());
  }
View Full Code Here

    if (extProfile.isDeclared(ContactGroupEntry.class)) {
      return;
    }
    super.declareExtensions(extProfile);
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(BatchId.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "id", false, false, false));
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(BatchInterrupted.class,
        new XmlNamespace("batch", "http://schemas.google.com/gdata/batch"),
        "interrupted", false, false, false));
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(BatchOperation.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "operation", false, false,
        false));
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(BatchStatus.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "status", false, false,
        false));
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(Deleted.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "deleted", false, false, false));
    extProfile.declare(ContactGroupEntry.class,
        new ExtensionDescription(ExtendedProperty.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "extendedProperty", false, true,
        false));
    extProfile.declare(ContactGroupEntry.class, SystemGroup.class);
  }
View Full Code Here

  public void declareExtensions(ExtensionProfile extProfile) {
    if (extProfile.isDeclared(AdditionalRoleSet.class)) {
      return;
    }
    extProfile.declare(AdditionalRoleSet.class,
        new ExtensionDescription(AdditionalRole.class, new XmlNamespace("gAcl",
        "http://schemas.google.com/acl/2007"), "additionalRole", false, true,
        false));
  }
View Full Code Here

    if (extProfile.isDeclared(ContactEntry.class)) {
      return;
    }
    super.declareExtensions(extProfile);
    extProfile.declare(ContactEntry.class,
        new ExtensionDescription(Deleted.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "deleted", false, false, false));
    extProfile.declare(ContactEntry.class,
        GroupMembershipInfo.getDefaultDescription(false, true));
    extProfile.declare(ContactEntry.class, YomiName.class);
  }
View Full Code Here

TOP

Related Classes of com.google.gdata.util.common.xml.XmlNamespace

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.