com.google.code.mojo.license.header
Class AdditionalHeaderDefinition

java.lang.Object
  extended by com.google.code.mojo.license.header.AdditionalHeaderDefinition

public final class AdditionalHeaderDefinition
extends java.lang.Object

The class AdditionalHeaderDefinition is used to collect header definitions declared in an "external" XML document configuration.

The XML document must respect the following XML schema:

 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
          xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="additionalHeaders" type="additionalHeadersType"/>
   <xs:complexType name="additionalHeadersType">
       <xs:sequence>
           <xs:annotation>
               <xs:documentation>
               Replace typeName tag name with the name of the type of header definition you are defining.
               </xs:documentation>
           </xs:annotation>
           <xs:element type="textType" name="typeName"/>
       </xs:sequence>
   </xs:complexType>
   <xs:complexType name="textType">
       <xs:sequence>
          <xs:annotation>
              <xs:documentation>
               Do not forget that you can use CDATA format as element value.
              </xs:documentation>
           </xs:annotation>
           <xs:element type="xs:string" name="firstLine" minOccurs="1" maxOccurs="1"/>
           <xs:element type="xs:string" name="beforeEachLine" minOccurs="1" maxOccurs="1"/>
           <xs:element type="xs:string" name="endLine" minOccurs="1" maxOccurs="1"/>
           <xs:element type="xs:string" name="skipLine" minOccurs="0" maxOccurs="1"/>
           <xs:element type="xs:string" name="firstLineDetectionPattern" minOccurs="1" maxOccurs="1"/>
           <xs:element type="xs:string" name="lastLineDetectionPattern" minOccurs="1" maxOccurs="1"/>
       </xs:sequence>
   </xs:complexType>
  </xs:schema>
 

Author:
Cedric Pronzato

Constructor Summary
AdditionalHeaderDefinition(com.mycila.xmltool.XMLTag doc)
          Construct an AdditionalHeaderDefinition object using the given XML document as header definitions input.
 
Method Summary
 java.util.Map<java.lang.String,HeaderDefinition> getDefinitions()
          Returns the header definitions declared by the external header definition as a map using the header type name as key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdditionalHeaderDefinition

public AdditionalHeaderDefinition(com.mycila.xmltool.XMLTag doc)
Construct an AdditionalHeaderDefinition object using the given XML document as header definitions input.

Parameters:
doc - The XML definition to read.
Method Detail

getDefinitions

public java.util.Map<java.lang.String,HeaderDefinition> getDefinitions()
Returns the header definitions declared by the external header definition as a map using the header type name as key.

Returns:
The header definitions declared.


Copyright © 2008-2011 Mathieu Carbou. All Rights Reserved.