/*
 * Copyright (c) 2015 Sacred Scripture Foundation.
 * "All scripture is given by inspiration of God, and is profitable for
 * doctrine, for reproof, for correction, for instruction in righteousness:
 * That the man of God may be perfect, throughly furnished unto all good
 * works." (2 Tim 3:16-17)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sacredscripture.platform.ws.api.rest.v1;

import java.util.Locale;

import javax.xml.bind.annotation.XmlAccessOrder;
import javax.xml.bind.annotation.XmlAccessorOrder;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * This class represents a book from a {@link BibleBean}.
 *
 * @author Paul Benedict
 * @since Sacred Scripture Platform 1.0
 */
@XmlRootElement
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
public class BookBean {

    @XmlElement(name = "id")
    private String id;

    @XmlElement(name = "native")
    private boolean nativeFlag;

    @XmlElement(name = "locale")
    private Locale locale;

    @XmlElement(name = "nativeLocale")
    private Locale nativeLocale;

    @XmlElement(name = "abbreviation")
    private String abbreviation;

    @XmlElement(name = "nativeAbbreviation")
    private String nativeAbbreviation;

    @XmlElement(name = "name")
    private String name;

    @XmlElement(name = "nativeName")
    private String nativeName;

    @XmlElement(name = "title")
    private String title;

    @XmlElement(name = "nativeTitle")
    private String nativeTitle;

    public final String getAbbreviation() {
        return abbreviation;
    }

    public final String getId() {
        return id;
    }

    public final Locale getLocale() {
        return locale;
    }

    public final String getName() {
        return name;
    }

    public final String getNativeAbbreviation() {
        return nativeAbbreviation;
    }

    public final Locale getNativeLocale() {
        return nativeLocale;
    }

    public final String getNativeName() {
        return nativeName;
    }

    public final String getNativeTitle() {
        return nativeTitle;
    }

    public final String getTitle() {
        return title;
    }

    public final boolean isNativeFlag() {
        return nativeFlag;
    }

    public final void setAbbreviation(String abbreviation) {
        this.abbreviation = abbreviation;
    }

    public final void setId(String id) {
        this.id = id;
    }

    public final void setLocale(Locale locale) {
        this.locale = locale;
    }

    public final void setName(String name) {
        this.name = name;
    }

    public final void setNativeAbbreviation(String nativeAbbreviation) {
        this.nativeAbbreviation = nativeAbbreviation;
    }

    public final void setNativeFlag(boolean nativeFlag) {
        this.nativeFlag = nativeFlag;
    }

    public final void setNativeLocale(Locale nativeLocale) {
        this.nativeLocale = nativeLocale;
    }

    public final void setNativeName(String nativeName) {
        this.nativeName = nativeName;
    }

    public final void setNativeTitle(String nativeTitle) {
        this.nativeTitle = nativeTitle;
    }

    public final void setTitle(String title) {
        this.title = title;
    }

}

@@ -964,110 +964,8 @@
 %0D%0A%0D%0A
-import javax.xml.bind.annotation.XmlAccessOrder;%0D%0Aimport javax.xml.bind.annotation.XmlAccessorOrder;%0D%0A
 impo
@@ -1219,79 +1219,260 @@
 nt%0D%0A
-@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)%0D%0Apublic class BookBean %7B
+public class BookBean extends AbstractHypermediaBean %7B%0D%0A%0D%0A    // IMPLEMENTATION NOTE: field order matters!%0D%0A    // Order listed here is the order rendered in XML/JSON; don't rearrange them%0D%0A    // unless you are intending to change the rendering order.
 %0D%0A%0D%0A
@@ -1551,21 +1551,21 @@
 name = %22
-nativ
+local
 e%22)%0D%0A   
@@ -1573,34 +1573,29 @@
 private 
-boolean nativeFlag
+Locale locale
 ;%0D%0A%0D%0A   
@@ -1607,37 +1607,35 @@
 Element(name = %22
-local
+nam
 e%22)%0D%0A    private
@@ -1631,36 +1631,34 @@
     private 
-Locale local
+String nam
 e;%0D%0A%0D%0A    @X
@@ -1675,26 +1675,19 @@
 name = %22
-nativeLoca
+tit
 le%22)%0D%0A  
@@ -1696,33 +1696,26 @@
 private 
-Locale nativeLoca
+String tit
 le;%0D%0A%0D%0A 
@@ -1819,28 +1819,16 @@
  %22native
-Abbreviation
 %22)%0D%0A    
@@ -1839,33 +1839,26 @@
 ate 
-String nativeAbbreviation
+boolean nativeFlag
 ;%0D%0A%0D
@@ -1876,33 +1876,41 @@
 ement(name = %22na
-m
+tiveLocal
 e%22)%0D%0A    private
@@ -1906,34 +1906,42 @@
     private 
-String nam
+Locale nativeLocal
 e;%0D%0A%0D%0A    @X
@@ -1964,20 +1964,28 @@
  %22native
-Name
+Abbreviation
 %22)%0D%0A    
@@ -2005,20 +2005,28 @@
 g native
-Name
+Abbreviation
 ;%0D%0A%0D%0A   
@@ -2038,36 +2038,41 @@
 Element(name = %22
-titl
+nativeNam
 e%22)%0D%0A    private
@@ -2071,36 +2071,41 @@
  private String 
-titl
+nativeNam
 e;%0D%0A%0D%0A    @XmlEl

Order elements