Java Code Examples for javax.imageio.metadata.IIOMetadata#getExtraMetadataFormatNames()

The following examples show how to use javax.imageio.metadata.IIOMetadata#getExtraMetadataFormatNames() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageReader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 2
Source File: ImageReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 3
Source File: ImageReader.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set<String> nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 4
Source File: GIFImageWriter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 5
Source File: ImageReader.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 6
Source File: ImageReader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 7
Source File: GIFImageWriter.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Merges {@code inData} into {@code outData}. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 8
Source File: ImageReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 9
Source File: GIFImageWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 10
Source File: ImageReader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 11
Source File: GIFImageWriter.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 12
Source File: ImageReader.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 13
Source File: GIFImageWriter.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 14
Source File: GIFImageWriter.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 15
Source File: GIFImageWriter.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 16
Source File: ImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 17
Source File: ImageReader.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 18
Source File: ImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}
 
Example 19
Source File: GIFImageWriter.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Merges <code>inData</code> into <code>outData</code>. The supplied
 * metadata format name is attempted first and failing that the standard
 * metadata format name is attempted.
 */
private void convertMetadata(String metadataFormatName,
                             IIOMetadata inData,
                             IIOMetadata outData) {
    String formatName = null;

    String nativeFormatName = inData.getNativeMetadataFormatName();
    if (nativeFormatName != null &&
        nativeFormatName.equals(metadataFormatName)) {
        formatName = metadataFormatName;
    } else {
        String[] extraFormatNames = inData.getExtraMetadataFormatNames();

        if (extraFormatNames != null) {
            for (int i = 0; i < extraFormatNames.length; i++) {
                if (extraFormatNames[i].equals(metadataFormatName)) {
                    formatName = metadataFormatName;
                    break;
                }
            }
        }
    }

    if (formatName == null &&
        inData.isStandardMetadataFormatSupported()) {
        formatName = STANDARD_METADATA_NAME;
    }

    if (formatName != null) {
        try {
            Node root = inData.getAsTree(formatName);
            outData.mergeTree(formatName, root);
        } catch(IIOInvalidTreeException e) {
            // ignore
        }
    }
}
 
Example 20
Source File: ImageReader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private IIOMetadata getMetadata(String formatName,
                                Set nodeNames,
                                boolean wantStream,
                                int imageIndex) throws IOException {
    if (formatName == null) {
        throw new IllegalArgumentException("formatName == null!");
    }
    if (nodeNames == null) {
        throw new IllegalArgumentException("nodeNames == null!");
    }
    IIOMetadata metadata =
        wantStream
        ? getStreamMetadata()
        : getImageMetadata(imageIndex);
    if (metadata != null) {
        if (metadata.isStandardMetadataFormatSupported() &&
            formatName.equals
            (IIOMetadataFormatImpl.standardMetadataFormatName)) {
            return metadata;
        }
        String nativeName = metadata.getNativeMetadataFormatName();
        if (nativeName != null && formatName.equals(nativeName)) {
            return metadata;
        }
        String[] extraNames = metadata.getExtraMetadataFormatNames();
        if (extraNames != null) {
            for (int i = 0; i < extraNames.length; i++) {
                if (formatName.equals(extraNames[i])) {
                    return metadata;
                }
            }
        }
    }
    return null;
}