Class JDFMedia

java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
All Implemented Interfaces:
Serializable, Cloneable, IMatches, IStreamWriter, Element, ElementTraversal, EventTarget, Node, NodeList, TypeInfo

public class JDFMedia extends JDFAutoMedia implements IMatches
See Also:
  • Constructor Details

    • JDFMedia

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

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

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

    • 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
    • getIsoPaperFromGrade

      public static JDFAutoMedia.EnumISOPaperSubstrate getIsoPaperFromGrade(int grade, XJDFEnums.eCoating coating)
      implementation of spec table Translation of Paper grades between [ISO12647-2:2004] and [ISO12647-2:2013]
      Parameters:
      coating - TODO
      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
    • getGradeFromIsoPaper

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

      public String toString()
      Description copied from class: KElement
      this to string, used for debug purpose mostly
      Overrides:
      toString in class KElement
      Returns:
      See Also:
    • 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(double x, double 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:
    • getCoating

      public XJDFEnums.eCoating getCoating()
    • setCoating

      public void setCoating(XJDFEnums.eCoating c)
    • setBackCoating

      public void setBackCoating(XJDFEnums.eCoating c)
    • getBackCoating

      public XJDFEnums.eCoating getBackCoating()
    • matches

      public boolean matches(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:
      IllegalArgumentException - if grade not in range 1-5
      See Also:
    • setRecycledPercentage

      public void setRecycledPercentage(double value)
      Description copied from class: JDFAutoMedia
      (36) set attribute RecycledPercentage
      Overrides:
      setRecycledPercentage in class JDFAutoMedia
      Parameters:
      value - the value to set the attribute to
      Throws:
      IllegalArgumentException - if value<0 or >100
      See Also: