Example usage for org.apache.poi.openxml4j.opc TargetMode EXTERNAL

List of usage examples for org.apache.poi.openxml4j.opc TargetMode EXTERNAL

Introduction

In this page you can find the example usage for org.apache.poi.openxml4j.opc TargetMode EXTERNAL.

Prototype

TargetMode EXTERNAL

To view the source code for org.apache.poi.openxml4j.opc TargetMode EXTERNAL.

Click Source Link

Document

The relationship references a resource that is external to the package.

Usage

From source file:org.apache.tika.parser.microsoft.ooxml.xwpf.ml2006.RelationshipsHandler.java

License:Apache License

@Override
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
    if (uri.equals(REL_NS)) {
        if (localName.equals("Relationship")) {
            String id = atts.getValue("", "Id");
            String type = atts.getValue("", "Type");
            String target = atts.getValue("", "Target");
            String targetModeString = atts.getValue("", "TargetMode");
            TargetMode targetMode = "EXTERNAL".equals(targetModeString) ? TargetMode.EXTERNAL
                    : TargetMode.INTERNAL;
            relationshipsManager.addRelationship(getName(), id, type, target, targetMode);
        }/*from   w ww .j av  a2s  . co m*/
    }
}