Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary methods #337

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public class PBCosDocument extends PBCosObject implements CosDocument {
private final boolean isOptionalContentPresent;
private final boolean isLinearised;
private final int postEOFDataSize;
private final Boolean doesInfoMatchXMP;
private final String firstPageID;
private final String lastID;
private final boolean needsRendering;
Expand Down Expand Up @@ -131,7 +130,6 @@ public PBCosDocument(COSDocument cosDocument, PDFAFlavour flavour) {
this.firstPageID = null;
}
this.isLinearised = cosDocument.getTrailer() != cosDocument.getLastTrailer() && cosDocument.isLinearized();
this.doesInfoMatchXMP = XMPChecker.doesInfoMatchXMP(cosDocument);
this.needsRendering = this.getNeedsRenderingValue();
}

Expand Down Expand Up @@ -255,14 +253,6 @@ public Boolean getisLinearized() {
return Boolean.valueOf(this.isLinearised);
}

/**
* @return true if XMP content matches Info dictionary content
*/
@Override
public Boolean getdoesInfoMatchXMP() {
return this.doesInfoMatchXMP;
}

@Override
public Boolean getMarked() {
if (this.catalog != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ public Boolean getcontainsAlternatePresentations() {
return Boolean.FALSE;
}

@Override
public Boolean getvalidPDF() {
// TODO: implement me
return Boolean.TRUE;
}

private List<PDOCProperties> getOCProperties() {
if (this.catalog != null) {
PDOptionalContentProperties pBoxOCProperties = this.catalog.getOCProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,6 @@ public PBoxPDStructElem(COSDictionary structElemDictionary, TaggedPDFRoleMapHelp
this.roleMapHelper = roleMapHelper;
}

/**
* @return Type entry of current structure element
*/
@Override
public String getType() {
COSBase value = ((COSDictionary) this.simplePDObject).getDictionaryObject(COSName.TYPE);
if (value instanceof COSName) {
return ((COSName) value).getName();
}
LOGGER.log(java.util.logging.Level.INFO, "In struct element type expected 'COSName' but got: " + value.getClass().getSimpleName());
return null;
}

@Override
public String getkidsStandardTypes() {
return this.getChildrenStandardTypes()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,6 @@ private List<CosUnicodeName> getRoleMapNames() {
return Collections.emptyList();
}

@Override
public String gettopLevelFirstElementStandardType() {
if (this.children == null) {
this.children = parseChildren();
}

if (!this.children.isEmpty()) {
return this.children.get(0).getstandardType();
}
return null;
}

@Override
public String getfirstChildStandardTypeNamespaceURL() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ public void testIsLinearized() {
Assert.assertFalse(((CosDocument) actual).getisLinearized().booleanValue());
}

@Test
public void testInfoMatchXMP() {
Assert.assertTrue(((CosDocument) actual).getdoesInfoMatchXMP().booleanValue());
}

@Test
public void testTrailerLink() {
List<? extends Object> trailer = actual.getLinkedObjects(PBCosDocument.TRAILER);
Expand Down
Loading