1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 package org.apache.openoffice.ooxml.framework.part; 23 24 public enum RelationshipType 25 { 26 ExtendedProperties, 27 CoreProperties, 28 OfficeDocument, 29 Image, 30 Header, 31 Hyperlink, 32 Styles, 33 EndNotes, 34 Footer, 35 Numbering, 36 CustomXML, 37 FootNotes, 38 WebSettings, 39 Theme, 40 Settings, 41 FontTable, 42 Thumbnail, 43 Slide, 44 ViewProperties, 45 PresentationProperties, 46 HandoutMaster, 47 TableStyles, 48 SlideMaster, 49 NotesMaster, 50 SlideLayout, 51 NotesSlide, 52 VMLDrawing, 53 OLE, 54 Chart, 55 Package, 56 ThemeOverride, 57 58 Unknown 59 ; 60 CreateFromString(final String sType)61 public static RelationshipType CreateFromString (final String sType) 62 { 63 switch(sType) 64 { 65 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties": 66 return ExtendedProperties; 67 case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties": 68 return CoreProperties; 69 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument": 70 return OfficeDocument; 71 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image": 72 return Image; 73 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header": 74 return Header; 75 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink": 76 return Hyperlink; 77 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles": 78 return Styles; 79 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes": 80 return EndNotes; 81 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer": 82 return Footer; 83 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering": 84 return Numbering; 85 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml": 86 return CustomXML; 87 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes": 88 return FootNotes; 89 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings": 90 return WebSettings; 91 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme": 92 return Theme; 93 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings": 94 return Settings; 95 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable": 96 return FontTable; 97 case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail": 98 return Thumbnail; 99 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide": 100 return Slide; 101 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps": 102 return ViewProperties; 103 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps": 104 return PresentationProperties; 105 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster": 106 return HandoutMaster; 107 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles": 108 return TableStyles; 109 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster": 110 return SlideMaster; 111 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster": 112 return NotesMaster; 113 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout": 114 return SlideLayout; 115 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide": 116 return NotesSlide; 117 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing": 118 return VMLDrawing; 119 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject": 120 return OLE; 121 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart": 122 return Chart; 123 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package": 124 return Package; 125 case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride": 126 return ThemeOverride; 127 128 default: 129 System.err.printf(sType +" is not yet supported\n"); 130 return Unknown; 131 } 132 } 133 } 134