incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1172446 - in /incubator/odf/trunk/validator: nbproject/ src/org/odftoolkit/odfvalidator/
Date Mon, 19 Sep 2011 05:35:56 GMT
Author: devinhan
Date: Mon Sep 19 05:35:55 2011
New Revision: 1172446

URL: http://svn.apache.org/viewvc?rev=1172446&view=rev
Log:
changeset:   15:f7d1d55aec83
user:        Frank Meies <frank.meies@oracle.com>
date:        Fri Oct 29 12:17:37 2010 +0200
Adjusted code for recent ODFDOM API.

Modified:
    incubator/odf/trunk/validator/nbproject/genfiles.properties
    incubator/odf/trunk/validator/nbproject/project.properties
    incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ContentFilter.java
    incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ForeignContentFilter.java
    incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/MetaFilter.java
    incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ODFRootPackageValidator.java

Modified: incubator/odf/trunk/validator/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/nbproject/genfiles.properties?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/nbproject/genfiles.properties (original)
+++ incubator/odf/trunk/validator/nbproject/genfiles.properties Mon Sep 19 05:35:55 2011
@@ -5,4 +5,4 @@ build.xml.stylesheet.CRC32=be360661
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files
for you.
 nbproject/build-impl.xml.data.CRC32=6a1772d4
 nbproject/build-impl.xml.script.CRC32=28f641de
-nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.1.45
+nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.2.45

Modified: incubator/odf/trunk/validator/nbproject/project.properties
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/nbproject/project.properties?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/nbproject/project.properties (original)
+++ incubator/odf/trunk/validator/nbproject/project.properties Mon Sep 19 05:35:55 2011
@@ -21,13 +21,13 @@ dist.dir=dist
 dist.jar=${dist.dir}/odfvalidator.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 excludes=
-file.reference.isorelax-jaxp-bridge-1.0.jar=../lib/isorelax-jaxp-bridge-1.0.jar
-file.reference.isorelax.jar=../lib/isorelax.jar
-file.reference.msv.jar=../lib/msv.jar
-file.reference.odfdom.jar=../lib/odfdom.jar
-file.reference.relaxngDatatype.jar=../lib/relaxngDatatype.jar
-file.reference.xercesImpl.jar=../lib/xercesImpl.jar
-file.reference.xsdlib.jar=../lib/xsdlib.jar
+file.reference.isorelax-jaxp-bridge-1.0.jar=lib/isorelax-jaxp-bridge-1.0.jar
+file.reference.isorelax.jar=lib/isorelax.jar
+file.reference.msv.jar=lib/msv.jar
+file.reference.odfdom.jar=lib/odfdom.jar
+file.reference.relaxngDatatype.jar=lib/relaxngDatatype.jar
+file.reference.xercesImpl.jar=lib/xercesImpl.jar
+file.reference.xsdlib.jar=lib/xsdlib.jar
 includes=**
 jar.compress=false
 javac.classpath=\

Modified: incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ContentFilter.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ContentFilter.java?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ContentFilter.java (original)
+++ incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ContentFilter.java Mon Sep
19 05:35:55 2011
@@ -22,7 +22,7 @@
 
 package org.odftoolkit.odfvalidator;
 
-import org.odftoolkit.odfdom.dom.OdfNamespaceNames;
+import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
@@ -34,12 +34,12 @@ class ContentFilter extends NamespaceFil
     private static final String CD2_SMIL_NAMESPACE_URI = "http://www.w3.org/2001/SMIL20/";
     private static final String BASE_OFFICE_NAMESPACE_URI = "http://openoffice.org/2004/office";
     private static final String BASE_DB_NAMESPACE_URI = "http://openoffice.org/2004/database";
-    private static final String SVG_NAMESPACE_URI = OdfNamespaceNames.SVG.getUri();
-    private static final String XSL_NAMESPACE_URI = OdfNamespaceNames.FO.getUri();
-    private static final String SMIL_NAMESPACE_URI = OdfNamespaceNames.SMIL.getUri();
-    private static final String DRAW_NAMESPACE_URI = OdfNamespaceNames.DRAW.getUri();
-    private static final String OFFICE_NAMESPACE_URI = OdfNamespaceNames.OFFICE.getUri();
-    private static final String DB_NAMESPACE_URI = OdfNamespaceNames.DB.getUri();
+    private static final String SVG_NAMESPACE_URI = OdfDocumentNamespace.SVG.getUri();
+    private static final String XSL_NAMESPACE_URI = OdfDocumentNamespace.FO.getUri();
+    private static final String SMIL_NAMESPACE_URI = OdfDocumentNamespace.SMIL.getUri();
+    private static final String DRAW_NAMESPACE_URI = OdfDocumentNamespace.DRAW.getUri();
+    private static final String OFFICE_NAMESPACE_URI = OdfDocumentNamespace.OFFICE.getUri();
+    private static final String DB_NAMESPACE_URI = OdfDocumentNamespace.DB.getUri();
     private static final String BASE_OFFICE_NAMESPACE_PREFIX = "office";
     private static final String POLYGON = "polygon";
     private static final String CONTOUR_POLYGON = "contour-polygon";

Modified: incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ForeignContentFilter.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ForeignContentFilter.java?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ForeignContentFilter.java
(original)
+++ incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ForeignContentFilter.java
Mon Sep 19 05:35:55 2011
@@ -24,7 +24,7 @@ package org.odftoolkit.odfvalidator;
 
 import java.util.HashSet;
 import java.util.Vector;
-import org.odftoolkit.odfdom.dom.OdfNamespaceNames;
+import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
@@ -32,8 +32,8 @@ import org.xml.sax.helpers.XMLFilterImpl
 
 class ForeignContentFilter extends XMLFilterImpl {
 
-    private static final String OFFICE_NAMESPACE_URI = OdfNamespaceNames.OFFICE.getUri();
-    private static final String TEXT_NAMESPACE_URI = OdfNamespaceNames.TEXT.getUri();
+    private static final String OFFICE_NAMESPACE_URI = OdfDocumentNamespace.OFFICE.getUri();
+    private static final String TEXT_NAMESPACE_URI = OdfDocumentNamespace.TEXT.getUri();
 
     private static final String H = "h";
     private static final String P = "p";
@@ -68,30 +68,30 @@ class ForeignContentFilter extends XMLFi
         m_aParagraphAncestorElements = new Vector<Boolean>();
         
         m_aODFNamespaceSet = new HashSet<String>();
-        m_aODFNamespaceSet.add( OdfNamespaceNames.OFFICE.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.STYLE.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.TEXT.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.TABLE.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.DRAW.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.FO.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.DC.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.META.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.NUMBER.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.SVG.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.CHART.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.DR3D.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.FORM.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.PRESENTATION.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.SMIL.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.CONFIG.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.SCRIPT.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.XLINK.getUri() );
-        m_aODFNamespaceSet.add( OdfNamespaceNames.XFORMS.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.OFFICE.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.STYLE.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.TEXT.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.TABLE.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.DRAW.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.FO.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.DC.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.META.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.NUMBER.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.SVG.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.CHART.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.DR3D.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.FORM.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.PRESENTATION.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.SMIL.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.CONFIG.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.SCRIPT.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.XLINK.getUri() );
+        m_aODFNamespaceSet.add( OdfDocumentNamespace.XFORMS.getUri() );
         if( m_aVersion.compareTo( OdfVersion.V1_2 ) >= 0 )
         {
-            m_aODFNamespaceSet.add( OdfNamespaceNames.XHTML.getUri() );
-            m_aODFNamespaceSet.add( OdfNamespaceNames.GRDDL.getUri() );
-            m_aODFNamespaceSet.add( OdfNamespaceNames.DB.getUri() );
+            m_aODFNamespaceSet.add( OdfDocumentNamespace.XHTML.getUri() );
+            m_aODFNamespaceSet.add( OdfDocumentNamespace.GRDDL.getUri() );
+            m_aODFNamespaceSet.add( OdfDocumentNamespace.DB.getUri() );
             m_aODFNamespaceSet.add( javax.xml.XMLConstants.XML_NS_URI );
         }
     }

Modified: incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/MetaFilter.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/MetaFilter.java?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/MetaFilter.java (original)
+++ incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/MetaFilter.java Mon Sep
19 05:35:55 2011
@@ -22,7 +22,7 @@
 
 package org.odftoolkit.odfvalidator;
 
-import org.odftoolkit.odfdom.dom.OdfNamespaceNames;
+import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.XMLFilterImpl;
@@ -33,8 +33,8 @@ class MetaFilter extends XMLFilterImpl {
     private String m_aGenerator = "";
     private boolean m_bRoot = true;
     
-    private static final String META_NAMESPACE_URI = OdfNamespaceNames.META.getUri();
-    private static final String OFFICE_NAMESPACE_URI = OdfNamespaceNames.OFFICE.getUri();
+    private static final String META_NAMESPACE_URI = OdfDocumentNamespace.META.getUri();
+    private static final String OFFICE_NAMESPACE_URI = OdfDocumentNamespace.OFFICE.getUri();
     private static final String GENERATOR = "generator";
     private static final String DOCUMENT_META = "document-meta";
 

Modified: incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ODFRootPackageValidator.java
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ODFRootPackageValidator.java?rev=1172446&r1=1172445&r2=1172446&view=diff
==============================================================================
--- incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ODFRootPackageValidator.java
(original)
+++ incubator/odf/trunk/validator/src/org/odftoolkit/odfvalidator/ODFRootPackageValidator.java
Mon Sep 19 05:35:55 2011
@@ -184,7 +184,7 @@ public abstract class ODFRootPackageVali
             }
         }
 
-        String aMimetype=getPackage(aLogger).getMediaType();
+        String aMimetype=getPackage(aLogger).getMediaTypeString();
         if( (aMimetype == null) || aMimetype.length() == 0 ) {
             aLogger.logFatalError("file is not a zip file, or has no mimetype.");
             return true;



Mime
View raw message