All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.xml.msofficexml.OfficeXML Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.xml.msofficexml;


import java.io.File;
import java.util.logging.Logger;

import com.hfg.xml.XMLName;
import com.hfg.xml.XMLNamespace;

//------------------------------------------------------------------------------
/**
 Office Open XML tag and attribute name definitions.

 @author J. Alex Taylor, hairyfatguy.com
 */
//------------------------------------------------------------------------------
// com.hfg XML/HTML Coding Library
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
// [email protected]
//------------------------------------------------------------------------------

public class OfficeXML
{
   public static final String       RELATIONSHIP_DIR     = "_rels";
   public static final File         PACKAGE_RELATIONSHIP_FILE = new File(RELATIONSHIP_DIR, ".rels");
   public static final String       PROPERTIES_DIR       = "docProps";
   public static final File         CORE_PROPERTIES_FILE = new File(PROPERTIES_DIR, "core.xml");
   public static final File         CONTENT_TYPES_FILE   = new File("[Content_Types].xml");


   public static final XMLNamespace CONTENT_TYPES_NAMESPACE             = XMLNamespace.getNamespace("http://schemas.openxmlformats.org/package/2006/content-types");
   public static final XMLNamespace CORE_PROP_NAMESPACE                 = XMLNamespace.getNamespace("cp",    "http://schemas.openxmlformats.org/package/2006/metadata/core-properties");
   public static final XMLNamespace EXTENDED_PROP_NAMESPACE             = XMLNamespace.getNamespace("http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties");
   public static final XMLNamespace RELATIONSHIPS_NAMESPACE             = XMLNamespace.getNamespace("r",     "http://schemas.openxmlformats.org/package/2006/relationships");
   public static final XMLNamespace OFFICE_NAMESPACE                    = XMLNamespace.getNamespace("o",     "urn:schemas-microsoft-com:office:office");
   public static final XMLNamespace MAC_OFFICE_NAMESPACE                = XMLNamespace.getNamespace("mo",    "http://schemas.microsoft.com/office/mac/office/2008/main");
   public static final XMLNamespace MARKUP_CAPABILITY_NAMESPACE         = XMLNamespace.getNamespace("mc",    "http://schemas.openxmlformats.org/markup-compatibility/2006");
   public static final XMLNamespace MATH_NAMESPACE                      = XMLNamespace.getNamespace("m",     "http://schemas.openxmlformats.org/officeDocument/2006/math");
   public static final XMLNamespace DUBLIN_CORE_NAMESPACE               = XMLNamespace.getNamespace("dc",    "http://purl.org/dc/elements/1.1/");
   public static final XMLNamespace DUBLIN_CORE_TERMS_NAMESPACE         = XMLNamespace.getNamespace("dcterms", "http://purl.org/dc/terms/");
   public static final XMLNamespace DUBLIN_CORE_TYPES_NAMESPACE         = XMLNamespace.getNamespace("dcmitype", "http://purl.org/dc/dcmitype/");
   public static final XMLNamespace VML_NAMESPACE                       = XMLNamespace.getNamespace("v",     "urn:schemas-microsoft-com:vml");
   public static final XMLNamespace MAC_VML_NAMESPACE                   = XMLNamespace.getNamespace("mv",    "urn:schemas-microsoft-com:mac:vml");
   public static final XMLNamespace XML_NAMESPACE                       = XMLNamespace.getNamespace("xml",   "");
   public static final XMLNamespace CHART_EXTENSIONS_NAMESPACE          = XMLNamespace.getNamespace("cx",    "http://schemas.microsoft.com/office/drawing/2014/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_1_NAMESPACE        = XMLNamespace.getNamespace("cx1",   "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_2_NAMESPACE        = XMLNamespace.getNamespace("cx2",   "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_3_NAMESPACE        = XMLNamespace.getNamespace("cx3",   "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_4_NAMESPACE        = XMLNamespace.getNamespace("cx4",   "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_5_NAMESPACE        = XMLNamespace.getNamespace("cx5",   "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_6_NAMESPACE        = XMLNamespace.getNamespace("cx6",   "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_7_NAMESPACE        = XMLNamespace.getNamespace("cx7",   "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex");
   public static final XMLNamespace CHART_EXTENSIONS_8_NAMESPACE        = XMLNamespace.getNamespace("cx8",   "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex");
   public static final XMLNamespace DRAWING_INK_NAMESPACE               = XMLNamespace.getNamespace("aink",  "http://schemas.microsoft.com/office/drawing/2016/ink");
   public static final XMLNamespace DRAWING_MODEL_3D_NAMESPACE          = XMLNamespace.getNamespace("am3d",  "http://schemas.microsoft.com/office/drawing/2017/model3d");



   // Tag names
   public static final XMLName TYPES                = new XMLName("Types",              CONTENT_TYPES_NAMESPACE);
   public static final XMLName DEFAULT              = new XMLName("Default",            CONTENT_TYPES_NAMESPACE);
   public static final XMLName OVERRIDE             = new XMLName("Override",           CONTENT_TYPES_NAMESPACE);

   public static final XMLName CORE_PROPERTIES      = new XMLName("coreProperties",     CORE_PROP_NAMESPACE);
   public static final XMLName DESCRIPTION          = new XMLName("description",        CORE_PROP_NAMESPACE);
   public static final XMLName KEYWORDS             = new XMLName("keywords",           CORE_PROP_NAMESPACE);
   public static final XMLName LAST_MODIFIED_BY     = new XMLName("lastModifiedBy",     CORE_PROP_NAMESPACE);
   public static final XMLName REVISION             = new XMLName("revision",           CORE_PROP_NAMESPACE);
   public static final XMLName SUBJECT              = new XMLName("subject",            DUBLIN_CORE_NAMESPACE);
   public static final XMLName TITLE                = new XMLName("title",              DUBLIN_CORE_NAMESPACE);
   public static final XMLName CREATOR              = new XMLName("creator",            DUBLIN_CORE_NAMESPACE);
   public static final XMLName CREATED              = new XMLName("created",            DUBLIN_CORE_TERMS_NAMESPACE);
   public static final XMLName MODIFIED             = new XMLName("modified",           DUBLIN_CORE_TERMS_NAMESPACE);

   public static final XMLName SPACE                = new XMLName("space",              XML_NAMESPACE);

   public static final XMLName RELATIONSHIP         = new XMLName("Relationship",       RELATIONSHIPS_NAMESPACE);
   public static final XMLName RELATIONSHIPS        = new XMLName("Relationships",      RELATIONSHIPS_NAMESPACE);


   // Attribute names
   public static final XMLName EXTENSION_ATT        = new XMLName("Extension",          CONTENT_TYPES_NAMESPACE);
   public static final XMLName CONTENT_TYPE_ATT     = new XMLName("ContentType",        CONTENT_TYPES_NAMESPACE);
   public static final XMLName PART_NAME_ATT        = new XMLName("PartName",           CONTENT_TYPES_NAMESPACE);

   public static final XMLName ID_ATT               = new XMLName("Id",                 RELATIONSHIPS_NAMESPACE);
   public static final XMLName TARGET_ATT           = new XMLName("Target",             RELATIONSHIPS_NAMESPACE);
   public static final XMLName TARGET_MODE_ATT      = new XMLName("TargetMode",         RELATIONSHIPS_NAMESPACE);
   public static final XMLName TYPE_ATT             = new XMLName("Type",               RELATIONSHIPS_NAMESPACE);

   public static final XMLName IGNORABLE_ATT        = new XMLName("Ignorable",          MARKUP_CAPABILITY_NAMESPACE);

   private final static Logger LOGGER = Logger.getLogger(OfficeXML.class.getPackage().getName());

   //###########################################################################
   // PUBLIC METHODS
   //###########################################################################

   //---------------------------------------------------------------------------
   public static Logger getLogger()
   {
      return LOGGER;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy