Package com.google.gxp.compiler.schema

Examples of com.google.gxp.compiler.schema.Schema


      } else {
        content = getCollapsableContent(attrMap);
      }

      String innerContentTypeString = validator.getInnerContentType();
      Schema innerSchema = (innerContentTypeString == null)
          ? null
          : schemaFactory.fromContentTypeName(innerContentTypeString);

      List<String> bundles = getBundles(attrMap);
View Full Code Here


            // if the attribute validator indicates an inner content type then
            // set this on the attribute
            String innerContentTypeString = attrValidator.getContentType();
            if (innerContentTypeString != null) {
              Schema innerSchema = schemaFactory.fromContentTypeName(innerContentTypeString);
              attr = attr.withInnerSchema(innerSchema);
            }

            result.add(attr);
          }
View Full Code Here

                                                         this)));
      }

      @Override
      public Expression visitOutputElement(OutputElement element) {
        Schema innerSchema = element.getInnerSchema();
        Visitor contentVisitor = (innerSchema == null)
            ? this : visitor(innerSchema);
        return postProcess(
            element.withAttributesAndContent(
                Util.map(element.getAttributes(), getAttributeFunction()),
View Full Code Here

      }

      @Override
      public Attribute visitAttribute(Attribute attr) {
        attrStack.push(attr);
        Schema schema = attr.getInnerSchema();
        if (schema != null) {
          Visitor visitor = visitor(schema);
          attr = attr.withValue(attr.getValue().acceptVisitor(visitor));
        }
View Full Code Here

      @Override
      public Expression visitUnextractedMessage(UnextractedMessage msg) {

        // if <gxp:msg> didn't have a content-type attribute,
        // it takes on the schema of its surrounding context
        Schema msgSchema = msg.getSchema();
        if (msgSchema == null) {
          msgSchema = schema.getMsgSchema();
        }

        Expression result = msg.withContentAndSchema(
View Full Code Here

    if (clauses.isEmpty()) {
      throw new IllegalArgumentException("At least one clause is required.");
    }
    if (schema != null) {
      for (Clause clause : clauses) {
        Schema clauseSchema = clause.getExpression().getSchema();
        if (!schema.allows(clauseSchema)) {
          throw new IllegalArgumentException(
              "Incompatible schemas: " + clauseSchema + " clause in "
              + schema + " conditional");
        }
View Full Code Here

      exactMappings.put(result.getUri(), result);
    }

    // check for a schema namespace
    if (result == null) {
      Schema schema = schemaFactory.fromNamespaceUri(nsUri);
      if (schema != null) {
        result = new OutputNamespace(schema);
        exactMappings.put(result.getUri(), result);
      }
    }
View Full Code Here

      exactMappings.put(result.getUri(), result);
    }

    // check for a schema namespace
    if (result == null) {
      Schema schema = schemaFactory.fromNamespaceUri(nsUri);
      if (schema != null) {
        result = new OutputNamespace(schema);
        exactMappings.put(result.getUri(), result);
      }
    }
View Full Code Here

      } else {
        node = attr;
        contentType = attr.getValue().getStaticString(alertSink, defaultValue);
      }

      Schema schema = (contentType == null)
          ? null
          : schemaFactory.fromContentTypeName(contentType);

      if (schema == null && contentType != null) {
        alertSink.add(new UnknownContentTypeError(node, contentType));
View Full Code Here

      boolean hidden = attrMap.getBooleanValue("hidden");
      // TODO(laurence): coerce content to HTML
      Expression content = getCollapsableContent(attrMap);

      ContentType contentType = createContentType(node, null);
      Schema schema = (contentType == null) ? null : contentType.getSchema();

      output.accumulate(
          new UnextractedMessage(node, schema, name, meaning, comment, hidden, content));
      return null;
    }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.schema.Schema

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.