001/* 002 * ModeShape (http://www.modeshape.org) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.modeshape.schematic.internal.schema; 017 018import org.modeshape.schematic.annotation.Immutable; 019import org.modeshape.schematic.document.Document; 020 021/** 022 * A Schema is a Document containing a description of the structure of other JSON/BSON documents. 023 * 024 * @author Randall Hauch <rhauch@redhat.com> (C) 2011 Red Hat Inc. 025 */ 026@Immutable 027public class SchemaDocument { 028 029 private final String uri; 030 private final Document document; 031 private final Validator validator; 032 033 public SchemaDocument( String uri, 034 Document document, 035 Validator validator ) { 036 this.uri = uri; 037 this.validator = validator; 038 this.document = document; 039 } 040 041 public String getUri() { 042 return uri; 043 } 044 045 public Document getDocument() { 046 return document; 047 } 048 049 public Validator getValidator() { 050 return validator; 051 } 052}