~ubuntu-branches/ubuntu/karmic/batik/karmic

« back to all changes in this revision

Viewing changes to pdf-transcoder/src/java/org/apache/fop/area/LinkResolver.java

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev, Onkar Shinde, Matvey Kozhev
  • Date: 2008-07-19 01:03:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080719010305-0b24skqy185kdsb9
Tags: 1.7.dfsg-0ubuntu1
[ Onkar Shinde ]
* New upstream version (LP: #147818)
* debian/control
  - Add Sun JDK 1.5 as build dependency. Fixes FTBFS on buildd. (LP: #150484)
    Also add Sun JRE as runtime dependencies.
  - Add ant-optional as build dependency.
  - Add libxml-commons-external-java and libxmlgraphics-commons-java as
    build and runtime dependencies.
  - Add 'Homepage' field and correct the url.
  - Change standards version to 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
* debian/rules
  - Change JAVA_HOME_DIRS for Sun JDK.
  - Add jar file names to DEB_JARS to match new build requirements.
  - Extract version from changelog.
  - Delete bundled jar files in clean target.
  - Don't use hardcoded version in install target.
  - Add get-orig-source target.
* debian/README.Debian-source
  - Change the fo tag name to the one used for this version.
* debian/watch
  - Change expression to match src distribution.
* debian/patches/
  - 01_build_xml.patch, 02_fix_jar_target.patch - Refresh for current source.
  - 03_fix_lib_dirs.patch - Fix the library and classpath references needed
    for pdf transcoder build.
  - 04_fix_transcoder_pkg.patch - Fix transcoder-pkg target to not copy
    files from other jar files.

[ Matvey Kozhev ]
* debian/changelog:
  - Added ".dfsg" to version.
* debian/control, debian/rules:
  - Build with openjdk-6-jdk, depend on openjdk-6-jre.
  - Added java-6-sun as an alternate build JAVA_HOME directory.
  - Fixed get-orig-source to not include debian/ and delete the source dir,
    and made it delete jars from lib/, as done in the current batik package.
* debian/wrappers.sh:
  - Changed java-7-icedtea reference to java-6-openjdk, as the former has been
    removed back in Hardy.
  - Added newline.
* debian/libbatik-java.install:
  - Added newline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 1999-2004 The Apache Software Foundation.
3
 
 * 
4
 
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 
 * you may not use this file except in compliance with the License.
6
 
 * You may obtain a copy of the License at
 
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
 
3
 * contributor license agreements.  See the NOTICE file distributed with
 
4
 * this work for additional information regarding copyright ownership.
 
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
6
 * (the "License"); you may not use this file except in compliance with
 
7
 * the License.  You may obtain a copy of the License at
7
8
 * 
8
9
 *      http://www.apache.org/licenses/LICENSE-2.0
9
10
 * 
14
15
 * limitations under the License.
15
16
 */
16
17
 
17
 
/* $Id: LinkResolver.java 198202 2004-12-16 23:59:13Z gmazza $ */
 
18
/* $Id: LinkResolver.java 535866 2007-05-07 12:22:22Z jeremias $ */
18
19
 
19
20
package org.apache.fop.area;
20
21
 
54
55
        return resolved;
55
56
    }
56
57
 
 
58
    /**
 
59
     * Get the references for this link.
 
60
     *
 
61
     * @return the String array of references.
 
62
     */
57
63
    public String[] getIDRefs() {
58
64
        return new String[] {idRef};
59
65
    }
60
66
 
61
67
    /**
62
 
     * Resolve by adding an internal link.
 
68
     * Resolve by adding an internal link to the first PageViewport in the list.
63
69
     *
64
 
     * @see org.apache.fop.area.Resolveable#resolveIDRef(String, List)
 
70
     * @see org.apache.fop.area.Resolvable#resolveIDRef(String, List)
65
71
     */
66
72
    public void resolveIDRef(String id, List pages) {
67
 
        if (idRef.equals(id) && pages != null) {
 
73
        resolveIDRef(id, (PageViewport)pages.get(0));
 
74
    }
 
75
 
 
76
    /**
 
77
     * Resolve by adding an InternalLink trait to the area
 
78
     *
 
79
     * @param id the target id (should be equal to the object's idRef)
 
80
     * @param pv the PageViewport containing the first area with the given id
 
81
     */
 
82
    public void resolveIDRef(String id, PageViewport pv) {
 
83
        if (idRef.equals(id) && pv != null) {
68
84
            resolved = true;
69
 
            PageViewport page = (PageViewport)pages.get(0);
70
 
            area.addTrait(Trait.INTERNAL_LINK, page.getKey());
 
85
            Trait.InternalLink iLink = new Trait.InternalLink(pv.getKey(), idRef);
 
86
            area.addTrait(Trait.INTERNAL_LINK, iLink);
71
87
        }
72
88
    }
73
89
}