Class JDFMedia

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, IMatches, IStreamWriter, org.w3c.dom.Element, org.w3c.dom.ElementTraversal, org.w3c.dom.events.EventTarget, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.TypeInfo

    public class JDFMedia
    extends JDFAutoMedia
    implements IMatches
    See Also:
    Serialized Form
    • Constructor Detail

      • JDFMedia

        public JDFMedia​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                        java.lang.String qualifiedName)
        Constructor for JDFMedia
        Parameters:
        myOwnerDocument -
        qualifiedName -
      • JDFMedia

        public JDFMedia​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                        java.lang.String myNamespaceURI,
                        java.lang.String qualifiedName)
        Constructor for JDFMedia
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
      • JDFMedia

        public JDFMedia​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                        java.lang.String myNamespaceURI,
                        java.lang.String qualifiedName,
                        java.lang.String myLocalName)
        Constructor for JDFMedia
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
        myLocalName -
    • Method Detail

      • getIsoPaperFromGrade

        public static JDFAutoMedia.EnumISOPaperSubstrate getIsoPaperFromGrade​(int grade)
        implementation of spec table Translation of Paper grades between [ISO12647-2:2004] and [ISO12647-2:2013]
        Parameters:
        iso -
        Returns:
        1-5 if valid; else null
      • getGradeFromIsoPaper

        public static int getGradeFromIsoPaper​(JDFAutoMedia.EnumISOPaperSubstrate iso)
        implementation of spec table Translation of Paper grades between [ISO12647-2:2004] and [ISO12647-2:2013]
        Parameters:
        iso -
        Returns:
        1-5 if valid; else null
      • setThicknessFromWeight

        public void setThicknessFromWeight​(boolean bLocal,
                                           boolean bRecurse)
        calculates paper thickness from weight, if and only if weight exists but not thickness
        Parameters:
        bLocal - if true, only evaluate locally set attributes in this partition, else check inherited attributes
        bRecurse - if true, do for all children, grandchildren rtc, else only local
      • setDimensionCM

        public void setDimensionCM​(JDFXYPair value)
        Set attribute Dimension (in cm)
        Parameters:
        value - the value (in centimeter) to set the dimension to
      • setDimensionCM

        public void setDimensionCM​(int x,
                                   int y)
        Set attribute Dimension (in cm)
        Parameters:
        value - the value (in centimeter) to set the dimension to
      • getDimensionCM

        public JDFXYPair getDimensionCM()
        Get attribute Dimension in centimeter
        Returns:
        JDFXYPair the dimension in centimeter
      • setDimensionInch

        public void setDimensionInch​(JDFXYPair value)
        Set attribute Dimension (in inch)
        Parameters:
        value - the value (in inch) to set the dimension to
      • getDimensionInch

        public JDFXYPair getDimensionInch()
        Get attribute Dimension in inch
        Returns:
        JDFXYPair the dimension in inch
      • getBackGrade

        public int getBackGrade()
        Get the ISO grade of the back side based on backCoatings
        Returns:
        1-5: the grade of the back 0 if no grade value is specified note that front is always assumed to have a better coating
      • getGrade

        public int getGrade​(boolean checkIsoPaper)
        Parameters:
        checkIsoPaper -
        Returns:
      • matches

        public boolean matches​(java.lang.Object subset)
        Description copied from interface: IMatches
        returns true if subset somehow matches this the semantics are defined by the filtering algorithm, thus it could be a filter or a subset i.e. subset contains either equivalent elements or null and no non-matching elements matches(null) always returns true
        Specified by:
        matches in interface IMatches
        Parameters:
        subset - the object to filter against
        Returns:
        true if it matches
      • isComponentMedia

        public boolean isComponentMedia()
        return true if we are a media used for printing
        Returns:
      • setGrade

        public void setGrade​(int grade)
        Description copied from class: JDFAutoMedia
        (36) set attribute Grade
        Overrides:
        setGrade in class JDFAutoMedia
        Parameters:
        grade - the value to set the attribute to
        Throws:
        java.lang.IllegalArgumentException - if grade not in range 1-5
        See Also:
        JDFAutoMedia.setGrade(int)