<commit_before>/**
 * Copyright Intellectual Reserve, Inc.
 *
 * 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 org.familysearch.platform.ordinances;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.webcohesion.enunciate.metadata.qname.XmlQNameEnumRef;

import org.gedcomx.common.ResourceReference;
import org.gedcomx.common.URI;
import org.gedcomx.conclusion.Conclusion;
import org.gedcomx.conclusion.Date;
import org.gedcomx.rt.json.JsonElementWrapper;

@XmlRootElement(name = "ordinance")
@JsonElementWrapper(name = "ordinances")
// todo GenericOrdinanceTerms ordinances  get rid of ordinanceType and other deprecated fields
@XmlType( name = "Ordinance", propOrder = {"ordinanceType",
                                           "type", "status", "statusReasons", "participants", "reservation", "date", "templeCode",
                                           "living", "spouse", "father", "mother", "assignee"})
@JsonInclude ( JsonInclude.Include.NON_NULL )
public class Ordinance extends Conclusion {

  private URI type;
  private URI status;

  private List<URI> statusReasons;
  private List<OrdinanceParticipant> participants;
  private OrdinanceReservation reservation;

  private Date date;
  private String templeCode;

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // todo GenericOrdinanceTerms ordinances cleanup    remove @Deprecated values and methods   (also remove from propOrder above)
  @Deprecated
  private ResourceReference spouse;
  @Deprecated
  private ResourceReference father;
  @Deprecated
  private ResourceReference mother;
  @Deprecated
  private ResourceReference assignee;
  @Deprecated
  private Boolean living;

  /////////////////////////////////////////////////////////////////////////////////////////////////


  /**
   * Gets the type of ordinance<commit_msg>add some annotations to try and incude OrdinanceStatusReason docs<commit_after>/**
 * Copyright Intellectual Reserve, Inc.
 *
 * 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 org.familysearch.platform.ordinances;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.webcohesion.enunciate.metadata.json.JsonSeeAlso;
import com.webcohesion.enunciate.metadata.qname.XmlQNameEnumRef;

import org.gedcomx.common.ResourceReference;
import org.gedcomx.common.URI;
import org.gedcomx.conclusion.Conclusion;
import org.gedcomx.conclusion.Date;
import org.gedcomx.rt.json.JsonElementWrapper;

@XmlRootElement(name = "ordinance")
@JsonElementWrapper(name = "ordinances")
// todo GenericOrdinanceTerms ordinances  get rid of ordinanceType and other deprecated fields
@XmlType( name = "Ordinance", propOrder = {"ordinanceType",
                                           "type", "status", "statusReasons", "participants", "reservation", "date", "templeCode",
                                           "living", "spouse", "father", "mother", "assignee"})
@JsonInclude ( JsonInclude.Include.NON_NULL )
//
// @XmlQNameEnumRef(OrdinanceStatusReason.class)   Cannot be used on getStatusReasons() because of enunciate bug and the OrdinanceStatusReason docs
//    were not included by enunciate.  In order to get those OrdinanceStatusReason docs we add @XmlSeeAlso and @JsonSeeAlso at the class level.
@XmlSeeAlso(OrdinanceStatusReason.class)
@JsonSeeAlso(OrdinanceStatusReason.class)
public class Ordinance extends Conclusion {

  private URI type;
  private URI status;

  private List<URI> statusReasons;
  private List<OrdinanceParticipant> participants;
  private OrdinanceReservation reservation;

  private Date date;
  private String templeCode;

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // todo GenericOrdinanceTerms ordinances cleanup    remove @Deprecated values and methods   (also remove from propOrder above)
  @Deprecated
  private ResourceReference spouse;
  @Deprecated
  private ResourceReference father;
  @Deprecated
  private ResourceReference mother;
  @Deprecated
  private ResourceReference assignee;
  @Deprecated
  private Boolean living;
  /////////////////////////////////////////////////////////////////////////////////////////////////


  /**
   * Gets the type of ordinance
{'fraction_non_alphanumeric': 0.14259868421052632, 'fraction_numerical': 0.0013157894736842105, 'mean_word_length': 3.2170596393897366, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 17}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6083385', 'n_tokens_mistral': 1597, 'n_tokens_neox': 1499, 'n_words': 481}