Package ch.rabanti.picoxlsx4j
Class Metadata
- java.lang.Object
-
- ch.rabanti.picoxlsx4j.Metadata
-
public class Metadata extends Object
Class representing the meta data of a workbook- Author:
- Raphael Stoeckli
-
-
Constructor Summary
Constructors Constructor Description Metadata()
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApplication()
Gets the application which created the workbook.String
getApplicationVersion()
Gets the version of the creation application.String
getCategory()
Gets the category of the document.String
getCompany()
Gets the company owning the document.String
getContentStatus()
Gets the status of the document.String
getCreator()
Gets the creator of the workbook.String
getDescription()
Gets the description of the document or comment about itString
getHyperlinkBase()
Gets the hyper-link base of the documentString
getKeywords()
Gets the keyword for the workbook.String
getManager()
Gets the responsible manager of the document.String
getSubject()
Gets the subject of the workbookString
getTitle()
Gets the title of the workbookboolean
isUseColorMRU()
If true, custom defined colors (in styles) will be added as recent colors (MRU)static String
parseVersion(int major, int minor, int build, int revision)
Method to parse a common version (major.minor.revision.build) into the compatible format (major.minor).void
setApplication(String application)
Sets the application which created the workbook.void
setApplicationVersion(String applicationVersion)
Sets the version of the creation application.void
setCategory(String category)
Sets the category of the document.void
setCompany(String company)
Sets the company owning the document.void
setContentStatus(String contentStatus)
Sets the status of the document.void
setCreator(String creator)
Sets the creator of the workbook.void
setDescription(String description)
Sets the description of the document or comment about itvoid
setHyperlinkBase(String hyperlinkBase)
Sets the hyper-link base of the documentvoid
setKeywords(String keywords)
Sets the keywords for the workbook.void
setManager(String manager)
Sets the responsible manager of the document.void
setSubject(String subject)
Sets the subject of the workbookvoid
setTitle(String title)
Sets the title of the workbookvoid
setUseColorMRU(boolean useColorMRU)
If true, custom defined colors (in styles) will be added as recent colors (MRU)
-
-
-
Method Detail
-
getApplication
public String getApplication()
Gets the application which created the workbook. Default is PicoXLSX4j- Returns:
- Application which created the workbook
-
setApplication
public void setApplication(String application)
Sets the application which created the workbook. Default is PicoXLSX4j- Parameters:
application
- Application which created the workbook
-
getApplicationVersion
public String getApplicationVersion()
Gets the version of the creation application. Default is the library version of PicoXLSjX. Use the format xxxxx.yyyyy (e.g. 1.0 or 55.9875) in case of a custom value.- Returns:
- Version of the creation application
-
setApplicationVersion
public void setApplicationVersion(String applicationVersion)
Sets the version of the creation application. Default is the library version of PicoXLSX4j. Use the format xxxxx.yyyyy (e.g. 1.0 or 55.9875) in case of a custom value.- Parameters:
applicationVersion
- Version of the creation application- Throws:
FormatException
- Thrown if the passed version results in a higher major or minor number of 99999
-
getCategory
public String getCategory()
Gets the category of the document. There are no predefined values or restrictions about the content of this field- Returns:
- Category of the document
-
setCategory
public void setCategory(String category)
Sets the category of the document. There are no predefined values or restrictions about the content of this field- Parameters:
category
- Category of the document
-
getCompany
public String getCompany()
Gets the company owning the document. This value is for organizational purpose. Add more than one manager by using the semicolon (;) between the words- Returns:
- Company owning the document
-
setCompany
public void setCompany(String company)
Sets the company owning the document. This value is for organizational purpose. Add more than one manager by using the semicolon (;) between the words- Parameters:
company
- Company owning the document
-
getContentStatus
public String getContentStatus()
Gets the status of the document. There are no predefined values or restrictions about the content of this field- Returns:
- Status of the document
-
setContentStatus
public void setContentStatus(String contentStatus)
Sets the status of the document. There are no predefined values or restrictions about the content of this field- Parameters:
contentStatus
- Status of the document
-
getCreator
public String getCreator()
Gets the creator of the workbook. Add more than one creator by using the semicolon (;) between the authors- Returns:
- Creator of the workbook
-
setCreator
public void setCreator(String creator)
Sets the creator of the workbook. Add more than one creator by using the semicolon (;) between the authors- Parameters:
creator
- Creator of the workbook
-
getDescription
public String getDescription()
Gets the description of the document or comment about it- Returns:
- Description of the document
-
setDescription
public void setDescription(String description)
Sets the description of the document or comment about it- Parameters:
description
- Description of the document
-
getHyperlinkBase
public String getHyperlinkBase()
Gets the hyper-link base of the document- Returns:
- Hyper-link base of the document
-
setHyperlinkBase
public void setHyperlinkBase(String hyperlinkBase)
Sets the hyper-link base of the document- Parameters:
hyperlinkBase
- Hyper-link base of the document
-
getKeywords
public String getKeywords()
Gets the keyword for the workbook. Separate the keywords with semicolons (;)- Returns:
- Keywords for the workbook
-
setKeywords
public void setKeywords(String keywords)
Sets the keywords for the workbook. Separate the keywords with semicolons (;)- Parameters:
keywords
- Keywords for the workbook
-
getManager
public String getManager()
Gets the responsible manager of the document. This value is for organizational purpose.- Returns:
- Responsible manager of the document
-
setManager
public void setManager(String manager)
Sets the responsible manager of the document. This value is for organizational purpose.- Parameters:
manager
- Responsible manager of the document
-
getSubject
public String getSubject()
Gets the subject of the workbook- Returns:
- Subject of the workbook
-
setSubject
public void setSubject(String subject)
Sets the subject of the workbook- Parameters:
subject
- Subject of the workbook
-
getTitle
public String getTitle()
Gets the title of the workbook- Returns:
- Title of the workbook
-
setTitle
public void setTitle(String title)
Sets the title of the workbook- Parameters:
title
- Title of the workbook
-
isUseColorMRU
public boolean isUseColorMRU()
If true, custom defined colors (in styles) will be added as recent colors (MRU)- Returns:
- True if color MRU is used
-
setUseColorMRU
public void setUseColorMRU(boolean useColorMRU)
If true, custom defined colors (in styles) will be added as recent colors (MRU)- Parameters:
useColorMRU
- True if color MRU is used otherwise false
-
parseVersion
public static String parseVersion(int major, int minor, int build, int revision)
Method to parse a common version (major.minor.revision.build) into the compatible format (major.minor). The minimum value is 0.0 and the maximum value is 99999.99999
The minor, revision and build number are joined if possible. If the number is too long, the additional characters will be removed from the right side down to five characters (e.g. 785563 will be 78556)- Parameters:
major
- Major number from 0 to 99999minor
- Minor numberbuild
- Build numberrevision
- Revision number- Returns:
- Formatted version number (e.g. 1.0 or 55.987)
- Throws:
FormatException
- Thrown if the major number is too long or one of the numbers is negative
-
-