Search in sources :

Example 1 with CTMap

use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMap in project poi by apache.

the class MapInfo method readFrom.

public void readFrom(InputStream is) throws IOException {
    try {
        MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
        mapInfo = doc.getMapInfo();
        maps = new HashMap<Integer, XSSFMap>();
        for (CTMap map : mapInfo.getMapArray()) {
            maps.put((int) map.getID(), new XSSFMap(map, this));
        }
    } catch (XmlException e) {
        throw new IOException(e.getLocalizedMessage());
    }
}
Also used : XmlException(org.apache.xmlbeans.XmlException) XSSFMap(org.apache.poi.xssf.usermodel.XSSFMap) MapInfoDocument(org.openxmlformats.schemas.spreadsheetml.x2006.main.MapInfoDocument) IOException(java.io.IOException) CTMap(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMap)

Aggregations

IOException (java.io.IOException)1 XSSFMap (org.apache.poi.xssf.usermodel.XSSFMap)1 XmlException (org.apache.xmlbeans.XmlException)1 CTMap (org.openxmlformats.schemas.spreadsheetml.x2006.main.CTMap)1 MapInfoDocument (org.openxmlformats.schemas.spreadsheetml.x2006.main.MapInfoDocument)1