Package org.verapdf.gf.model.impl.sa
Class GFSAStructElem
- java.lang.Object
-
- org.verapdf.model.GenericModelObject
-
- org.verapdf.gf.model.impl.sa.GFSAStructElem
-
- All Implemented Interfaces:
Object,SAStructElem
- Direct Known Subclasses:
GFSAAnnot,GFSAArt,GFSAArtifact,GFSAAside,GFSABibEntry,GFSABlockQuote,GFSACaption,GFSACode,GFSADiv,GFSADocument,GFSADocumentFragment,GFSAEm,GFSAFENote,GFSAFigure,GFSAForm,GFSAFormula,GFSAH,GFSAHn,GFSAIndex,GFSAL,GFSALbl,GFSALBody,GFSALI,GFSALink,GFSANonStandard,GFSANonStruct,GFSANote,GFSAP,GFSAPart,GFSAPrivate,GFSAQuote,GFSARB,GFSAReference,GFSARP,GFSART,GFSARuby,GFSASect,GFSASpan,GFSAStrong,GFSASub,GFSATable,GFSATBody,GFSATD,GFSATFoot,GFSATH,GFSATHead,GFSATitle,GFSATOC,GFSATOCI,GFSATR,GFSAWarichu,GFSAWP,GFSAWT
public class GFSAStructElem extends GenericModelObject implements SAStructElem
- Author:
- Maxim Plushchov
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Object>childrenstatic StringCHILDRENprotected PDStructElemstructElemDictionary-
Fields inherited from class org.verapdf.model.GenericModelObject
contextDependent
-
-
Constructor Summary
Constructors Constructor Description GFSAStructElem(PDStructElem structElemDictionary, String standardType, String type, String parentsStandardTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddTextChunk(int number, List<IChunk> chunks)List<Object>getChildren()StringgetContext()DoublegetcorrectSemanticScore()number ranging from 0 to 1 indicating the probability that the correct type is right definedStringgetcorrectType()supposed correct element typeBooleangethasLowestDepthError()true, if this element has wrong type and all parents of this element have right typesStringgetID()BooleangetisLeafElem()false, if structure element contains other structure elementsBooleangetisListChild()true, if this is list child elementBooleangetisListElem()true, if this is list struct elementBooleangetisTableChild()true, if this is table child elementBooleangetisTableElem()true, if this is table struct elementStringgetkidsStandardTypes()ampersand separated list of child element types, role mapped to the standard typesLonggetlastPage()number of the last page that contains the structure elementList<? extends Object>getLinkedObjects(String link)INodegetNode()Longgetpage()number of the first page that contains the structure elementCOSKeygetPageObjectNumber()StringgetparentsStandardTypes()ampersand separated list of all standard types of parents element of this structure element in the structure hierarchyStringgetparentStandardType()parent element type, role mapped to the standard typeStringgetstandardType()standard type of struct elementLonggetstructureID()id of struct elementStringgetStructureType()StringgetTextValue()StringgetType()StringgetvalueS()structure typeprotected voidparseChildren()voidsetNode(INode node)-
Methods inherited from class org.verapdf.model.GenericModelObject
getExtraContext, getLinks, getObjectType, getProperties, getSuperTypes, isContextDependent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.verapdf.model.baselayer.Object
getExtraContext, getLinks, getObjectType, getProperties, getSuperTypes, isContextDependent
-
-
-
-
Field Detail
-
CHILDREN
public static final String CHILDREN
- See Also:
- Constant Field Values
-
structElemDictionary
protected final PDStructElem structElemDictionary
-
-
Constructor Detail
-
GFSAStructElem
public GFSAStructElem(PDStructElem structElemDictionary, String standardType, String type, String parentsStandardTypes)
-
-
Method Detail
-
setNode
public void setNode(INode node)
-
getNode
public INode getNode()
-
getLinkedObjects
public List<? extends Object> getLinkedObjects(String link)
- Specified by:
getLinkedObjectsin interfaceObject- Overrides:
getLinkedObjectsin classGenericModelObject- Parameters:
link- - the name of a link- Returns:
- List of objects with the given link
-
getType
public String getType()
-
getStructureType
public String getStructureType()
-
getstandardType
public String getstandardType()
Description copied from interface:SAStructElemstandard type of struct element- Specified by:
getstandardTypein interfaceSAStructElem
-
getisTableElem
public Boolean getisTableElem()
Description copied from interface:SAStructElemtrue, if this is table struct element- Specified by:
getisTableElemin interfaceSAStructElem
-
getisListElem
public Boolean getisListElem()
Description copied from interface:SAStructElemtrue, if this is list struct element- Specified by:
getisListElemin interfaceSAStructElem
-
getisTableChild
public Boolean getisTableChild()
Description copied from interface:SAStructElemtrue, if this is table child element- Specified by:
getisTableChildin interfaceSAStructElem
-
getisListChild
public Boolean getisListChild()
Description copied from interface:SAStructElemtrue, if this is list child element- Specified by:
getisListChildin interfaceSAStructElem
-
getisLeafElem
public Boolean getisLeafElem()
Description copied from interface:SAStructElemfalse, if structure element contains other structure elements- Specified by:
getisLeafElemin interfaceSAStructElem
-
getstructureID
public Long getstructureID()
Description copied from interface:SAStructElemid of struct element- Specified by:
getstructureIDin interfaceSAStructElem
-
parseChildren
protected void parseChildren()
-
getContext
public String getContext()
- Specified by:
getContextin interfaceObject- Overrides:
getContextin classGenericModelObject- Returns:
- context of the current object
-
getcorrectSemanticScore
public Double getcorrectSemanticScore()
Description copied from interface:SAStructElemnumber ranging from 0 to 1 indicating the probability that the correct type is right defined- Specified by:
getcorrectSemanticScorein interfaceSAStructElem
-
getvalueS
public String getvalueS()
Description copied from interface:SAStructElemstructure type- Specified by:
getvalueSin interfaceSAStructElem
-
getcorrectType
public String getcorrectType()
Description copied from interface:SAStructElemsupposed correct element type- Specified by:
getcorrectTypein interfaceSAStructElem
-
getID
public String getID()
- Specified by:
getIDin interfaceObject- Overrides:
getIDin classGenericModelObject- Returns:
- id of the current object
-
getPageObjectNumber
public COSKey getPageObjectNumber()
-
getparentsStandardTypes
public String getparentsStandardTypes()
Description copied from interface:SAStructElemampersand separated list of all standard types of parents element of this structure element in the structure hierarchy- Specified by:
getparentsStandardTypesin interfaceSAStructElem
-
getkidsStandardTypes
public String getkidsStandardTypes()
Description copied from interface:SAStructElemampersand separated list of child element types, role mapped to the standard types- Specified by:
getkidsStandardTypesin interfaceSAStructElem
-
getparentStandardType
public String getparentStandardType()
Description copied from interface:SAStructElemparent element type, role mapped to the standard type- Specified by:
getparentStandardTypein interfaceSAStructElem
-
getTextValue
public String getTextValue()
-
gethasLowestDepthError
public Boolean gethasLowestDepthError()
Description copied from interface:SAStructElemtrue, if this element has wrong type and all parents of this element have right types- Specified by:
gethasLowestDepthErrorin interfaceSAStructElem
-
getpage
public Long getpage()
Description copied from interface:SAStructElemnumber of the first page that contains the structure element- Specified by:
getpagein interfaceSAStructElem
-
getlastPage
public Long getlastPage()
Description copied from interface:SAStructElemnumber of the last page that contains the structure element- Specified by:
getlastPagein interfaceSAStructElem
-
-