Author: nick
Date: Wed Sep  3 13:47:50 2014
New Revision: 1622257

URL: http://svn.apache.org/r1622257
Log:
Add getters for the common xml extended properties

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/POIXMLProperties.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/POIXMLProperties.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/POIXMLProperties.java?rev=1622257&r1=1622256&r2=1622257&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/POIXMLProperties.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/POIXMLProperties.java Wed Sep  3 
13:47:50 2014
@@ -286,6 +286,116 @@ public class POIXMLProperties {
                        return props.getProperties();
                }
                
+        public String getTemplate() {
+            if (props.getProperties().isSetTemplate()) {
+                return props.getProperties().getTemplate();
+            }
+            return null;
+        }
+        public String getManager() {
+            if (props.getProperties().isSetManager()) {
+                return props.getProperties().getManager();
+            }
+            return null;
+        }
+        public String getCompany() {
+            if (props.getProperties().isSetCompany()) {
+                return props.getProperties().getCompany();
+            }
+            return null;
+        }
+        public String getPresentationFormat() {
+            if (props.getProperties().isSetPresentationFormat()) {
+                return props.getProperties().getPresentationFormat();
+            }
+            return null;
+        }
+        public String getApplication() {
+            if (props.getProperties().isSetApplication()) {
+                return props.getProperties().getApplication();
+            }
+            return null;
+        }
+        public String getAppVersion() {
+            if (props.getProperties().isSetAppVersion()) {
+                return props.getProperties().getAppVersion();
+            }
+            return null;
+        }
+
+        public int getPages() {
+            if (props.getProperties().isSetPages()) {
+                return props.getProperties().getPages();
+            }
+            return -1;
+        }
+        public int getWords() {
+            if (props.getProperties().isSetWords()) {
+                return props.getProperties().getWords();
+            }
+            return -1;
+        }
+        public int getCharacters() {
+            if (props.getProperties().isSetCharacters()) {
+                return props.getProperties().getCharacters();
+            }
+            return -1;
+        }
+        public int getCharactersWithSpaces() {
+            if (props.getProperties().isSetCharactersWithSpaces()) {
+                return props.getProperties().getCharactersWithSpaces();
+            }
+            return -1;
+        }
+        public int getLines() {
+            if (props.getProperties().isSetLines()) {
+                return props.getProperties().getLines();
+            }
+            return -1;
+        }
+        public int getParagraphs() {
+            if (props.getProperties().isSetParagraphs()) {
+                return props.getProperties().getParagraphs();
+            }
+            return -1;
+        }
+        public int getSlides() {
+            if (props.getProperties().isSetSlides()) {
+                return props.getProperties().getSlides();
+            }
+            return -1;
+        }
+        public int getNotes() {
+            if (props.getProperties().isSetNotes()) {
+                return props.getProperties().getNotes();
+            }
+            return -1;
+        }
+        public int getTotalTime()  {
+            if (props.getProperties().isSetTotalTime()) {
+                return props.getProperties().getTotalTime();
+            }
+            return -1;
+        }
+        public int getHiddenSlides()  {
+            if (props.getProperties().isSetHiddenSlides()) {
+                return props.getProperties().getHiddenSlides();
+            }
+            return -1;
+        }
+        public int getMMClips() {
+            if (props.getProperties().isSetMMClips()) {
+                return props.getProperties().getMMClips();
+            }
+            return -1;
+        }
+
+        public String getHyperlinkBase() {
+            if (props.getProperties().isSetHyperlinkBase()) {
+                return props.getProperties().getHyperlinkBase();
+            }
+            return null;
+        }
        }
 
        /**

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java?rev=1622257&r1=1622256&r2=1622257&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java 
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Wed 
Sep  3 13:47:50 2014
@@ -80,13 +80,14 @@ public final class TestPOIXMLProperties 
                org.apache.poi.POIXMLProperties.ExtendedProperties 
newProperties =
                                newProps.getExtendedProperties();
 
+        assertEquals(application, newProperties.getApplication());
+        assertEquals(appVersion, newProperties.getAppVersion());
+        
                
org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties
                                newCtProps = 
newProperties.getUnderlyingProperties();
 
                assertEquals(application, newCtProps.getApplication());
                assertEquals(appVersion, newCtProps.getAppVersion());
-
-
        }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to