Examples of DocumentSchema


Examples of org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema

    private Factory(SchemaProvider schemas) {
      this.schemas = schemas;
    }

    private DocumentSchema getSchemaForId(WaveletId waveletId, String documentId) {
      DocumentSchema result = schemas.getSchemaForId(waveletId, documentId);
      return (result != null) ? result : DocumentSchema.NO_SCHEMA_CONSTRAINTS;
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema

        logger.error().log("Error", e);
      }
      return;
    }

    DocumentSchema schema = getSchema();

    ViolationCollector vc = new ViolationCollector();
    if (!DocOpValidator.validate(vc, schema, op).isValid()) {
      logger.error().log("That content does not conform to the schema", vc);
      return;
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema

   * be the result.  If none return a value null will be returned; if more than
   * one does an {@link IllegalStateException} will be thrown.
   */
  @Override
  public DocumentSchema getSchemaForId(WaveletId waveletId, String documentId) {
    DocumentSchema result = null;
    for (SchemaProvider provider : providers) {
      // TODO(user): Change the way providers (or individual schemas) are
      //   registered to catch ambiguities earlier.
      DocumentSchema value = provider.getSchemaForId(waveletId, documentId);
      assert value != null;
      if (value != DocumentSchema.NO_SCHEMA_CONSTRAINTS) {
        // Check that only one schema matches.  This ensures that the ordering of
        // resolvers doesn't influence which schema is used which could lead to
        // some pretty horrible bugs.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.