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

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


  public void declareExtensions(ExtensionProfile extProfile) {
    if (extProfile.isDeclared(Event.class)) {
      return;
    }
    extProfile.declare(Event.class, new ExtensionDescription(When.class,
        new XmlNamespace("gd", "http://schemas.google.com/g/2005"), "when",
        true, false, false));
    new When().declareExtensions(extProfile);
  }
View Full Code Here


    if (extProfile.isDeclared(BasePersonEntry.class)) {
      return;
    }
    super.declareExtensions(extProfile);
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(BatchId.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "id", false, false, false));
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(BatchInterrupted.class,
        new XmlNamespace("batch", "http://schemas.google.com/gdata/batch"),
        "interrupted", false, false, false));
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(BatchOperation.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "operation", false, false,
        false));
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(BatchStatus.class, new XmlNamespace("batch",
        "http://schemas.google.com/gdata/batch"), "status", false, false,
        false));
    extProfile.declare(BasePersonEntry.class, BillingInformation.class);
    extProfile.declare(BasePersonEntry.class, Birthday.class);
    extProfile.declare(BasePersonEntry.class,
        CalendarLink.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class, DirectoryServer.class);
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(Email.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "email", false, true, false));
    extProfile.declare(BasePersonEntry.class, Event.getDefaultDescription(false,
        true));
    new Event().declareExtensions(extProfile);
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(ExtendedProperty.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "extendedProperty", false, true,
        false));
    extProfile.declare(BasePersonEntry.class,
        ExternalId.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class, FileAs.class);
    extProfile.declare(BasePersonEntry.class, Gender.class);
    extProfile.declare(BasePersonEntry.class, Hobby.getDefaultDescription(false,
        true));
    extProfile.declare(BasePersonEntry.class, Im.getDefaultDescription(false,
        true));
    extProfile.declare(BasePersonEntry.class, Initials.class);
    extProfile.declare(BasePersonEntry.class, Jot.getDefaultDescription(false,
        true));
    extProfile.declare(BasePersonEntry.class,
        Language.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class, MaidenName.class);
    extProfile.declare(BasePersonEntry.class, Mileage.class);
    extProfile.declare(BasePersonEntry.class, Name.class);
    new Name().declareExtensions(extProfile);
    extProfile.declare(BasePersonEntry.class, Nickname.class);
    extProfile.declare(BasePersonEntry.class, Occupation.class);
    extProfile.declare(BasePersonEntry.class,
        Organization.getDefaultDescription(false, true));
    new Organization().declareExtensions(extProfile);
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(PhoneNumber.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "phoneNumber", false, true,
        false));
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(PostalAddress.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "postalAddress", false, true,
        false));
    extProfile.declare(BasePersonEntry.class, Priority.class);
    extProfile.declare(BasePersonEntry.class,
        Relation.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class, Sensitivity.class);
    extProfile.declare(BasePersonEntry.class, ShortName.class);
    extProfile.declare(BasePersonEntry.class, Status.class);
    extProfile.declare(BasePersonEntry.class,
        StructuredPostalAddress.getDefaultDescription(false, true));
    new StructuredPostalAddress().declareExtensions(extProfile);
    extProfile.declare(BasePersonEntry.class, Subject.class);
    extProfile.declare(BasePersonEntry.class,
        UserDefinedField.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class,
        Website.getDefaultDescription(false, true));
    extProfile.declare(BasePersonEntry.class,
        new ExtensionDescription(Where.class, new XmlNamespace("gd",
        "http://schemas.google.com/g/2005"), "where", false, false, false));
    new Where().declareExtensions(extProfile);
  }
View Full Code Here

    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

    // 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

    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

  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

  protected AbstractExtension() {
    Class<? extends AbstractExtension> extensionClass = this.getClass();
    ExtensionDescription.Default defAnnot = extensionClass
        .getAnnotation(ExtensionDescription.Default.class);
    if (defAnnot != null) {
      this.namespace = new XmlNamespace(defAnnot.nsAlias(),
          defAnnot.nsUri());
      this.localName = defAnnot.localName();
    } else {
      this.namespace = null;
      this.localName = null;
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.