Coverage Report - org.simpleframework.xml.core.Policy
 
Classes in this File Line Coverage Branch Coverage Complexity
Policy
N/A
N/A
1
 
 1  
 /*
 2  
  * Policy.java November 2010
 3  
  *
 4  
  * Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.core;
 20  
 
 21  
 /**
 22  
  * The <code>Policy</code> interface is used to represent the XML
 23  
  * mapping policy used by the current serialization schema. The
 24  
  * policies supported are strict and non-strict mappings. For the
 25  
  * strict mapping policy all attributes and elements within the
 26  
  * XML document must map to a field or method within the object
 27  
  * that is being serialized.
 28  
  * 
 29  
  * @author Niall Gallagher
 30  
  */
 31  
 interface Policy {
 32  
 
 33  
    /**
 34  
     * This method is used to determine whether strict mappings are
 35  
     * required. Strict mapping means that all labels in the class
 36  
     * schema must match the XML elements and attributes in the
 37  
     * source XML document. When strict mapping is disabled, then
 38  
     * XML elements and attributes that do not exist in the schema
 39  
     * class will be ignored without breaking the parser.
 40  
     *
 41  
     * @return true if strict parsing is enabled, false otherwise
 42  
     */ 
 43  
    boolean isStrict();
 44  
 }