
org.verapdf.gf.model.impl.arlington.GFAMediaScreenParametersMHBE Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-model-arlington Show documentation
Show all versions of validation-model-arlington Show documentation
veraPDF PDF/A validation model implementation based on PDF parser.
The newest version!
/**
* This file is part of veraPDF Validation, a module of the veraPDF project.
* Copyright (c) 2015, veraPDF Consortium
* All rights reserved.
*
* veraPDF Validation is free software: you can redistribute it and/or modify
* it under the terms of either:
*
* The GNU General public license GPLv3+.
* You should have received a copy of the GNU General Public License
* along with veraPDF Validation as the LICENSE.GPL file in the root of the source
* tree. If not, see http://www.gnu.org/licenses/ or
* https://www.gnu.org/licenses/gpl-3.0.en.html.
*
* The Mozilla Public License MPLv2+.
* You should have received a copy of the Mozilla Public License along with
* veraPDF Validation as the LICENSE.MPL file in the root of the source tree.
* If a copy of the MPL was not distributed with this file, you can obtain one at
* http://mozilla.org/MPL/2.0/.
*/
package org.verapdf.gf.model.impl.arlington;
import org.verapdf.cos.*;
import org.verapdf.model.alayer.*;
import org.verapdf.gf.model.impl.containers.StaticContainers;
import org.verapdf.tools.StaticResources;
import java.util.*;
import org.verapdf.pd.PDNameTreeNode;
import org.verapdf.as.ASAtom;
import java.util.stream.Collectors;
import org.verapdf.pd.structure.PDNumberTreeNode;
public class GFAMediaScreenParametersMHBE extends GFAObject implements AMediaScreenParametersMHBE {
public GFAMediaScreenParametersMHBE(COSBase baseObject, COSBase parentObject, String keyName) {
super(baseObject, parentObject, keyName, "AMediaScreenParametersMHBE");
}
@Override
public List extends org.verapdf.model.baselayer.Object> getLinkedObjects(String link) {
switch (link) {
case "B":
return getB();
case "F":
return getF();
default:
return super.getLinkedObjects(link);
}
}
private List getB() {
switch (StaticContainers.getFlavour()) {
case ARLINGTON1_5:
case ARLINGTON1_6:
case ARLINGTON1_7:
case ARLINGTON2_0:
return getB1_5();
default:
return Collections.emptyList();
}
}
private List getB1_5() {
COSObject object = getBValue();
if (object == null) {
return Collections.emptyList();
}
if (object.getType() == COSObjType.COS_ARRAY) {
List list = new ArrayList<>(1);
list.add(new GFAArrayOf_3RGBNumbers((COSArray)object.getDirectBase(), this.baseObject, "B"));
return Collections.unmodifiableList(list);
}
return Collections.emptyList();
}
private List getF() {
switch (StaticContainers.getFlavour()) {
case ARLINGTON1_5:
case ARLINGTON1_6:
case ARLINGTON1_7:
case ARLINGTON2_0:
return getF1_5();
default:
return Collections.emptyList();
}
}
private List getF1_5() {
COSObject object = getFValue();
if (object == null) {
return Collections.emptyList();
}
if (object.getType() == COSObjType.COS_DICT) {
List list = new ArrayList<>(1);
list.add(new GFAFloatingWindowParameters((COSDictionary)object.getDirectBase(), this.baseObject, "F"));
return Collections.unmodifiableList(list);
}
return Collections.emptyList();
}
@Override
public Boolean getcontainsB() {
return this.baseObject.knownKey(ASAtom.getASAtom("B"));
}
public COSObject getBValue() {
COSObject object = this.baseObject.getKey(ASAtom.getASAtom("B"));
return object;
}
@Override
public String getBType() {
COSObject B = getBValue();
return getObjectType(B);
}
@Override
public Boolean getBHasTypeArray() {
COSObject B = getBValue();
return getHasTypeArray(B);
}
@Override
public Boolean getcontainsF() {
return this.baseObject.knownKey(ASAtom.getASAtom("F"));
}
public COSObject getFValue() {
COSObject object = this.baseObject.getKey(ASAtom.getASAtom("F"));
return object;
}
@Override
public String getFType() {
COSObject F = getFValue();
return getObjectType(F);
}
@Override
public Boolean getFHasTypeDictionary() {
COSObject F = getFValue();
return getHasTypeDictionary(F);
}
@Override
public Boolean getcontainsM() {
return this.baseObject.knownKey(ASAtom.getASAtom("M"));
}
public COSObject getMDefaultValue() {
switch (StaticContainers.getFlavour()) {
case ARLINGTON1_5:
case ARLINGTON1_6:
case ARLINGTON1_7:
case ARLINGTON2_0:
return COSInteger.construct(0L);
}
return null;
}
public COSObject getMValue() {
COSObject object = this.baseObject.getKey(ASAtom.getASAtom("M"));
if (object == null || object.empty()) {
object = getMDefaultValue();
}
return object;
}
@Override
public String getMType() {
COSObject M = getMValue();
return getObjectType(M);
}
@Override
public Boolean getMHasTypeInteger() {
COSObject M = getMValue();
return getHasTypeInteger(M);
}
@Override
public Long getMIntegerValue() {
COSObject M = getMValue();
return getIntegerValue(M);
}
@Override
public Boolean getcontainsO() {
return this.baseObject.knownKey(ASAtom.getASAtom("O"));
}
public COSObject getODefaultValue() {
switch (StaticContainers.getFlavour()) {
case ARLINGTON1_5:
case ARLINGTON1_6:
case ARLINGTON1_7:
case ARLINGTON2_0:
return COSReal.construct(1.0D);
}
return null;
}
public COSObject getOValue() {
COSObject object = this.baseObject.getKey(ASAtom.getASAtom("O"));
if (object == null || object.empty()) {
object = getODefaultValue();
}
return object;
}
@Override
public String getOType() {
COSObject O = getOValue();
return getObjectType(O);
}
@Override
public Boolean getOHasTypeNumber() {
COSObject O = getOValue();
return getHasTypeNumber(O);
}
@Override
public Double getONumberValue() {
COSObject O = getOValue();
return getNumberValue(O);
}
@Override
public Boolean getcontainsW() {
return this.baseObject.knownKey(ASAtom.getASAtom("W"));
}
public COSObject getWDefaultValue() {
switch (StaticContainers.getFlavour()) {
case ARLINGTON1_5:
case ARLINGTON1_6:
case ARLINGTON1_7:
case ARLINGTON2_0:
return COSInteger.construct(3L);
}
return null;
}
public COSObject getWValue() {
COSObject object = this.baseObject.getKey(ASAtom.getASAtom("W"));
if (object == null || object.empty()) {
object = getWDefaultValue();
}
return object;
}
@Override
public String getWType() {
COSObject W = getWValue();
return getObjectType(W);
}
@Override
public Boolean getWHasTypeInteger() {
COSObject W = getWValue();
return getHasTypeInteger(W);
}
@Override
public Long getWIntegerValue() {
COSObject W = getWValue();
return getIntegerValue(W);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy