
com.tectonica.jonix.onix3.RegionsExcluded Maven / Gradle / Ivy
/*
* Copyright (C) 2012-2024 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at [email protected]
*
* 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.tectonica.jonix.onix3;
import com.tectonica.jonix.common.JPU;
import com.tectonica.jonix.common.OnixElement;
import com.tectonica.jonix.common.codelist.RecordSourceTypes;
import com.tectonica.jonix.common.codelist.Regions;
import java.io.Serializable;
import java.util.function.Consumer;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY
*/
/**
* Regions excluded
*
* One or more ONIX codes identifying regions excluded from the territory. Successive codes must be separated by spaces.
* Optional and non-repeating, and can only occur if the <CountriesIncluded> element is also present (and
* specifies countries of which the excluded regions are a part), or if <RegionsIncluded> is present and includes
* a supra-national region code (such as ‘World’).
*
*
*
* Format
* One or more variable-length codes, each consisting of upper case letters, with or without a hyphen and further
* upper case letters or digits, and with successive codes being separated by spaces. Suggested maximum length 750
* characters
*
*
* Codelist
* List 49 Where possible and appropriate, country subdivision codes are derived from the UN LOCODE scheme based on
* ISO 3166-2
*
*
* Reference name
* <RegionsExcluded>
*
*
* Short tag
* <x452>
*
*
* Cardinality
* 0…1
*
*
* Example
* <x452>CA-QC</x452> (Excludes Quebec)
*
*
*
* This tag may be included in the following composites:
*
* - <{@link Territory}>
*
*
* Possible placements within ONIX message:
*
* - {@link Product} ⯈ {@link ContentDetail} ⯈ {@link ContentItem} ⯈ {@link SupportingResource} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link CollateralDetail} ⯈ {@link SupportingResource} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ProductSupply} ⯈ {@link SupplyDetail} ⯈ {@link Reissue} ⯈ {@link SupportingResource} ⯈
* {@link Territory} ⯈ {@link RegionsExcluded}
* - {@link Product} ⯈ {@link PromotionDetail} ⯈ {@link PromotionalEvent} ⯈ {@link EventOccurrence} ⯈
* {@link SupportingResource} ⯈ {@link Territory} ⯈ {@link RegionsExcluded}
* - {@link Product} ⯈ {@link PromotionDetail} ⯈ {@link PromotionalEvent} ⯈ {@link SupportingResource} ⯈
* {@link Territory} ⯈ {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ContentDetail} ⯈ {@link ContentItem} ⯈ {@link TextContent} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link CollateralDetail} ⯈ {@link TextContent} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ContentDetail} ⯈ {@link ContentItem} ⯈ {@link CitedContent} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link CollateralDetail} ⯈ {@link CitedContent} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ProductSupply} ⯈ {@link Market} ⯈ {@link Territory} ⯈ {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ProductSupply} ⯈ {@link SupplyDetail} ⯈ {@link Reissue} ⯈ {@link Price} ⯈
* {@link Territory} ⯈ {@link RegionsExcluded}
* - {@link Product} ⯈ {@link ProductSupply} ⯈ {@link SupplyDetail} ⯈ {@link Price} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
* - {@link Product} ⯈ {@link PublishingDetail} ⯈ {@link SalesRights} ⯈ {@link Territory} ⯈
* {@link RegionsExcluded}
*
*
* @since Onix-3.03
*/
public class RegionsExcluded implements OnixElement>, Serializable {
private static final long serialVersionUID = 1L;
public static final String refname = "RegionsExcluded";
public static final String shortname = "x452";
/////////////////////////////////////////////////////////////////////////////////
// ATTRIBUTES
/////////////////////////////////////////////////////////////////////////////////
/**
* (type: dt.DateOrDateTime)
*/
public String datestamp;
/**
* (type: dt.NonEmptyString)
*/
public String sourcename;
public RecordSourceTypes sourcetype;
/////////////////////////////////////////////////////////////////////////////////
// VALUE MEMBER
/////////////////////////////////////////////////////////////////////////////////
public java.util.Set value;
/**
* Internal API, use the {@link #value()} method or the {@link #value} field instead
*/
@Override
public java.util.Set __v() {
return value;
}
/////////////////////////////////////////////////////////////////////////////////
// SERVICES
/////////////////////////////////////////////////////////////////////////////////
private final boolean exists;
public static final RegionsExcluded EMPTY = new RegionsExcluded();
public RegionsExcluded() {
exists = false;
}
public RegionsExcluded(org.w3c.dom.Element element) {
exists = true;
datestamp = JPU.getAttribute(element, "datestamp");
sourcename = JPU.getAttribute(element, "sourcename");
sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
value = new java.util.HashSet<>();
for (String split : JPU.getContentAsString(element).split("\\s+")) {
value.add(Regions.byCode(split));
}
}
/**
* @return whether this tag (<RegionsExcluded> or <x452>) is explicitly provided in the ONIX XML
*/
@Override
public boolean exists() {
return exists;
}
public void ifExists(Consumer action) {
if (exists) {
action.accept(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy