incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devin Han <devin...@apache.org>
Subject Re: More IP Review
Date Sat, 08 Oct 2011 10:17:54 GMT
I added licence information for all of the ODF documents with the following
code written by Simple API.

public static void main(String[] args) {
        String patch = "C:\\resources";
        File directry = new File(patch);
        File[] files = directry.listFiles(new FilenameFilter() {
            @Override
            public boolean accept(File path, String name) {
                if (name.contains(".od")||name.contains(".ot")) {
                    return true;
                } else {
                    return false;
                }
            }
        });
        String license = "Licensed to the Apache Software Foundation (ASF)
under one \n"+
                         "or more contributor license agreements.  See the
NOTICE file \n"+
                         "distributed with this work for additional
information \n"+
                         "regarding copyright ownership.  The ASF licenses
this file \n"+
                         "to you under the Apache License, Version 2.0 (the
\n"+
                         "\"License\"); you may not use this file except in
compliance \n"+
                         "with the License.  You may obtain a copy of the
License at \n"+
                         "\n"+
                         " http://www.apache.org/licenses/LICENSE-2.0 \n"+
                         "\n"+
                         "Unless required by applicable law or agreed to in
writing, \n"+
                         "software distributed under the License is
distributed on an \n"+
                         "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY \n"+
                         "KIND, either express or implied.  See the License
for the \n"+
                         "specific language governing permissions and
limitations \n"+
                         "under the License.";
        for (File file : files) {
            try {
                Document doc = Document.loadDocument(file);
                OdfFileDom metadom = doc.getMetaDom();
                Meta metadata = new Meta(metadom);
                String key = "License";
                metadata.removeUserDefinedDataByName(key);
                //
org.odftoolkit.odfdom.dom.attribute.meta.MetaValueTypeAttribute.Value
                metadata.setUserDefinedData(key, Value.STRING.toString(),
license);
                doc.save(file);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

Simple API is so cool, isn't it? ;)

2011/9/23 Rob Weir <robweir@apache.org>

> I grepped for all files with IBM or Oracle copyrights.  I then looked
> at what files remained that went beyond minor config files, pom.xml,
> etc.
>
> The files that remained are listed below.  We'll need to make some
> effort to understand these files.  For example, we can check their
> version history in Mercurial and see who checked them, and what the
> comment was.
>
> 1) If a file was an original work by an IBM employee, then IBM has the
> copyright, and an IBM project member can add the required Apache
> license and remove the IBM copyright statement
>
> 2) If a file was an original work by an Oracle employee, then Oracle
> has the copyright, and we'll look to have that file included in
> Oracle's SGA
>
> 3) If the file came from somewhere else, from another OSS project for
> example, then we should discuss further.
>
>
> trunk/odfdom/src/test/resources/xslt/concatfiles.xsl
> trunk/simple/src/test/resources/xslt/concatfiles.xsl
>
>
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/NonNegativeDecimal.java
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/OdfDataType.java
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/OdfFieldDataType.java
>
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/SignedZeroToHundredPercent.java
>
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/ZeroToHundredPercent.java
> trunk/odfdom/src/main/java/org/odftoolkit/odfdom/type/ZeroToOneDecimal.java
> trunk/odfdom/src/test/java/org/odftoolkit/odfdom/doc/GetTextTest.java
>
> trunk/odfdom/src/test/java/org/odftoolkit/odfdom/doc/draw/OdfDrawImageTest.java
>
> trunk/odfdom/src/test/java/org/odftoolkit/odfdom/dom/example/WikiExampleTest.java
>
> trunk/odfdom/src/test/java/org/odftoolkit/odfdom/integrationtest/PerformanceIT.java
> trunk/odfdom/src/test/java/org/odftoolkit/odfdom/pkg/PackagePathTest.java
>
> trunk/old-generator/codegen-maven-plugin/src/main/java/org/odftoolkit/odfdom/codegen_maven_plugin/CodegenMojo.java
> trunk/simple/src/main/java/org/odftoolkit/simple/text/Span.java
>
> trunk/simple/src/test/java/org/odftoolkit/simple/draw/AbstractTextboxContainerTest.java
> trunk/simple/src/test/java/org/odftoolkit/simple/draw/ImageTest.java
>
> trunk/simple/src/test/java/org/odftoolkit/simple/integrationtest/PerformanceIT.java
>
> trunk/simple/src/test/java/org/odftoolkit/simple/table/TableRowColumnTest.java
>
> trunk/validator/src/main/webapp/jsp/common/footer.jsp
> trunk/validator/src/main/webapp/jsp/common/header.jsp
> trunk/validator/src/main/webapp/jsp/common/supporter.jsp
> trunk/validator/src/main/webapp/jsp/index.jsp
> trunk/validator/src/main/webapp/jsp/info/index.jsp
> trunk/validator/src/main/webapp/jsp/info/info.jsp
> trunk/validator/src/main/webapp/jsp/validate.jsp
>



-- 
-Devin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message