diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-07-28 15:44:37 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-07-28 15:44:37 +0000 |
commit | f5abed20f9df95c08d962596c8683256b60ab502 (patch) | |
tree | 4c217836c776b6360262f6c29a2c459f3f40e393 /src/java/org/apache/fop/util | |
parent | 3a2f71196cc68895bef00f207228e75668631ea2 (diff) | |
download | xmlgraphics-fop-f5abed20f9df95c08d962596c8683256b60ab502.tar.gz xmlgraphics-fop-f5abed20f9df95c08d962596c8683256b60ab502.zip |
Changed license headers and updated NOTICE file according to: http://www.apache.org/legal/src-headers.html
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@426576 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/util')
16 files changed, 228 insertions, 212 deletions
diff --git a/src/java/org/apache/fop/util/CMYKColorSpace.java b/src/java/org/apache/fop/util/CMYKColorSpace.java index 139a01c40..00a3f32a2 100644 --- a/src/java/org/apache/fop/util/CMYKColorSpace.java +++ b/src/java/org/apache/fop/util/CMYKColorSpace.java @@ -1,9 +1,10 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/CharUtilities.java b/src/java/org/apache/fop/util/CharUtilities.java index 985c25df7..dc2d987f3 100644 --- a/src/java/org/apache/fop/util/CharUtilities.java +++ b/src/java/org/apache/fop/util/CharUtilities.java @@ -1,9 +1,10 @@ /* - * Copyright 1999-2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/CloseBlockerOutputStream.java b/src/java/org/apache/fop/util/CloseBlockerOutputStream.java index 8417d7eaa..5bf057c26 100644 --- a/src/java/org/apache/fop/util/CloseBlockerOutputStream.java +++ b/src/java/org/apache/fop/util/CloseBlockerOutputStream.java @@ -1,9 +1,10 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/ColorProfileUtil.java b/src/java/org/apache/fop/util/ColorProfileUtil.java index 8c0e7794f..6a849a031 100644 --- a/src/java/org/apache/fop/util/ColorProfileUtil.java +++ b/src/java/org/apache/fop/util/ColorProfileUtil.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/ColorUtil.java b/src/java/org/apache/fop/util/ColorUtil.java index dedaf0f5c..652924025 100644 --- a/src/java/org/apache/fop/util/ColorUtil.java +++ b/src/java/org/apache/fop/util/ColorUtil.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/CommandLineLogger.java b/src/java/org/apache/fop/util/CommandLineLogger.java index 20ba4e9f1..d42eadf57 100644 --- a/src/java/org/apache/fop/util/CommandLineLogger.java +++ b/src/java/org/apache/fop/util/CommandLineLogger.java @@ -1,8 +1,9 @@ -/* Copyright 2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at +/* Licensed to the Apache Software Foundation (ASF) under one or more +/* contributor license agreements. See the NOTICE file distributed with +/* this work for additional information regarding copyright ownership. +/* The ASF licenses this file to You under the Apache License, Version 2.0 +/* (the "License"); you may not use this file except in compliance with +/* the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/ContentHandlerFactory.java b/src/java/org/apache/fop/util/ContentHandlerFactory.java index a17d7a60f..30ab2374a 100644 --- a/src/java/org/apache/fop/util/ContentHandlerFactory.java +++ b/src/java/org/apache/fop/util/ContentHandlerFactory.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/ContentHandlerFactoryRegistry.java b/src/java/org/apache/fop/util/ContentHandlerFactoryRegistry.java index 3d95d91a3..3d8ef8296 100644 --- a/src/java/org/apache/fop/util/ContentHandlerFactoryRegistry.java +++ b/src/java/org/apache/fop/util/ContentHandlerFactoryRegistry.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/DOM2SAX.java b/src/java/org/apache/fop/util/DOM2SAX.java index 6c5142157..15f371b45 100644 --- a/src/java/org/apache/fop/util/DOM2SAX.java +++ b/src/java/org/apache/fop/util/DOM2SAX.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java b/src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java index 5b5dd3b48..11ac96da8 100644 --- a/src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java +++ b/src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/DefaultErrorListener.java b/src/java/org/apache/fop/util/DefaultErrorListener.java index 5e1a9cc37..cc9d24c6e 100644 --- a/src/java/org/apache/fop/util/DefaultErrorListener.java +++ b/src/java/org/apache/fop/util/DefaultErrorListener.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/DelegatingContentHandler.java b/src/java/org/apache/fop/util/DelegatingContentHandler.java index 86cfb1e41..75e82124e 100644 --- a/src/java/org/apache/fop/util/DelegatingContentHandler.java +++ b/src/java/org/apache/fop/util/DelegatingContentHandler.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/QName.java b/src/java/org/apache/fop/util/QName.java index 91c9ab812..9a0a947b9 100644 --- a/src/java/org/apache/fop/util/QName.java +++ b/src/java/org/apache/fop/util/QName.java @@ -1,137 +1,138 @@ -/* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.util; - -import java.io.Serializable; - -/** - * Represents a qualified name of an XML element or an XML attribute. - * <p> - * Note: This class allows to carry a namespace prefix but it is not used in the equals() and - * hashCode() methods. - */ -public class QName implements Serializable { - - private static final long serialVersionUID = -5225376740044770690L; - - private String namespaceURI; - private String localName; - private String prefix; - private int hashCode; - - /** - * Main constructor. - * @param namespaceURI the namespace URI - * @param prefix the namespace prefix, may be null - * @param localName the local name - */ - public QName(String namespaceURI, String prefix, String localName) { - if (localName == null) { - throw new NullPointerException("Parameter localName must not be null"); - } - if (localName.length() == 0) { - throw new IllegalArgumentException("Parameter localName must not be empty"); - } - this.namespaceURI = namespaceURI; - this.prefix = prefix; - this.localName = localName; - this.hashCode = toHashString().hashCode(); - } - - /** - * Main constructor. - * @param namespaceURI the namespace URI - * @param qName the qualified name - */ - public QName(String namespaceURI, String qName) { - if (qName == null) { - throw new NullPointerException("Parameter localName must not be null"); - } - if (qName.length() == 0) { - throw new IllegalArgumentException("Parameter localName must not be empty"); - } - this.namespaceURI = namespaceURI; - int p = qName.indexOf(':'); - if (p > 0) { - this.prefix = qName.substring(0, p); - this.localName = qName.substring(p + 1); - } else { - this.prefix = null; - this.localName = qName; - } - this.hashCode = toHashString().hashCode(); - } - - /** @return the namespace URI */ - public String getNamespaceURI() { - return this.namespaceURI; - } - - /** @return the namespace prefix */ - public String getPrefix() { - return this.prefix; - } - - /** @return the local name */ - public String getLocalName() { - return this.localName; - } - - /** @return the fully qualified name */ - public String getQName() { - return getPrefix() != null ? getPrefix() + ':' + getLocalName() : getLocalName(); - } - - /** @see java.lang.Object#hashCode() */ - public int hashCode() { - return this.hashCode; - } - - /** @see java.lang.Object#equals(java.lang.Object) */ - public boolean equals(Object obj) { - if (obj == null) { - return false; - } else if (obj == this) { - return true; - } else { - if (obj instanceof QName) { - QName other = (QName)obj; - if ((getNamespaceURI() == null && other.getNamespaceURI() == null) - || getNamespaceURI().equals(other.getNamespaceURI())) { - return getLocalName().equals(other.getLocalName()); - } - } - } - return false; - } - - /** @see java.lang.Object#toString() */ - public String toString() { - return prefix != null - ? (prefix + ":" + localName) - : toHashString(); - } - - private String toHashString() { - return (namespaceURI != null - ? ("{" + namespaceURI + "}" + localName) - : localName); - } - -} +/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.util;
+
+import java.io.Serializable;
+
+/**
+ * Represents a qualified name of an XML element or an XML attribute.
+ * <p>
+ * Note: This class allows to carry a namespace prefix but it is not used in the equals() and
+ * hashCode() methods.
+ */
+public class QName implements Serializable {
+
+ private static final long serialVersionUID = -5225376740044770690L;
+
+ private String namespaceURI;
+ private String localName;
+ private String prefix;
+ private int hashCode;
+
+ /**
+ * Main constructor.
+ * @param namespaceURI the namespace URI
+ * @param prefix the namespace prefix, may be null
+ * @param localName the local name
+ */
+ public QName(String namespaceURI, String prefix, String localName) {
+ if (localName == null) {
+ throw new NullPointerException("Parameter localName must not be null");
+ }
+ if (localName.length() == 0) {
+ throw new IllegalArgumentException("Parameter localName must not be empty");
+ }
+ this.namespaceURI = namespaceURI;
+ this.prefix = prefix;
+ this.localName = localName;
+ this.hashCode = toHashString().hashCode();
+ }
+
+ /**
+ * Main constructor.
+ * @param namespaceURI the namespace URI
+ * @param qName the qualified name
+ */
+ public QName(String namespaceURI, String qName) {
+ if (qName == null) {
+ throw new NullPointerException("Parameter localName must not be null");
+ }
+ if (qName.length() == 0) {
+ throw new IllegalArgumentException("Parameter localName must not be empty");
+ }
+ this.namespaceURI = namespaceURI;
+ int p = qName.indexOf(':');
+ if (p > 0) {
+ this.prefix = qName.substring(0, p);
+ this.localName = qName.substring(p + 1);
+ } else {
+ this.prefix = null;
+ this.localName = qName;
+ }
+ this.hashCode = toHashString().hashCode();
+ }
+
+ /** @return the namespace URI */
+ public String getNamespaceURI() {
+ return this.namespaceURI;
+ }
+
+ /** @return the namespace prefix */
+ public String getPrefix() {
+ return this.prefix;
+ }
+
+ /** @return the local name */
+ public String getLocalName() {
+ return this.localName;
+ }
+
+ /** @return the fully qualified name */
+ public String getQName() {
+ return getPrefix() != null ? getPrefix() + ':' + getLocalName() : getLocalName();
+ }
+
+ /** @see java.lang.Object#hashCode() */
+ public int hashCode() {
+ return this.hashCode;
+ }
+
+ /** @see java.lang.Object#equals(java.lang.Object) */
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ } else if (obj == this) {
+ return true;
+ } else {
+ if (obj instanceof QName) {
+ QName other = (QName)obj;
+ if ((getNamespaceURI() == null && other.getNamespaceURI() == null)
+ || getNamespaceURI().equals(other.getNamespaceURI())) {
+ return getLocalName().equals(other.getLocalName());
+ }
+ }
+ }
+ return false;
+ }
+
+ /** @see java.lang.Object#toString() */
+ public String toString() {
+ return prefix != null
+ ? (prefix + ":" + localName)
+ : toHashString();
+ }
+
+ private String toHashString() {
+ return (namespaceURI != null
+ ? ("{" + namespaceURI + "}" + localName)
+ : localName);
+ }
+
+}
diff --git a/src/java/org/apache/fop/util/UnitConv.java b/src/java/org/apache/fop/util/UnitConv.java index 939db056b..0eebb8cda 100644 --- a/src/java/org/apache/fop/util/UnitConv.java +++ b/src/java/org/apache/fop/util/UnitConv.java @@ -1,9 +1,10 @@ /* - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/XMLizable.java b/src/java/org/apache/fop/util/XMLizable.java index ea02963ef..c1213638b 100644 --- a/src/java/org/apache/fop/util/XMLizable.java +++ b/src/java/org/apache/fop/util/XMLizable.java @@ -1,9 +1,10 @@ /* - * Copyright 2002-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * diff --git a/src/java/org/apache/fop/util/package.html b/src/java/org/apache/fop/util/package.html index 94de448c5..fb73364ec 100644 --- a/src/java/org/apache/fop/util/package.html +++ b/src/java/org/apache/fop/util/package.html @@ -1,9 +1,10 @@ <!-- - Copyright 2005 The Apache Software Foundation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |