1 9 package org.jboss.portal.setup.impl.dl.cmsloader; 10 11 import org.w3c.dom.Element ; 12 import org.jboss.portal.setup.CmsSetupException; 13 import org.jboss.portal.common.util.XML; 14 15 import java.util.List ; 16 17 23 public class ContentMetaData 24 { 25 private static final String DEFAULT_CONTENT_LOCATION = "content/files"; 26 private String m_contentLoaction = DEFAULT_CONTENT_LOCATION; 27 private String m_contentEncoding = "UTF-8"; 28 private String m_parentNodeUri = "/files"; 29 30 ContentMetaData(Element content) 31 { 32 parseContentConfig(content); 33 } 34 35 private void parseContentConfig(Element content) 36 { 37 Element location = XML.getUniqueChild(content, "content-location", false); 38 if (location != null) 39 { 40 m_contentLoaction = XML.asString(location); 41 } 42 Element parentNodeURI = XML.getUniqueChild(content, "parent-uri", false); 43 if (parentNodeURI != null) 44 { 45 m_parentNodeUri = XML.asString(parentNodeURI); 46 } 47 Element contentEncoding = XML.getUniqueChild(content, "content-encoding", false); 48 if (contentEncoding != null) 49 { 50 m_contentEncoding = XML.asString(contentEncoding); 51 } 52 } 53 54 public String getContentLoaction() 55 { 56 return m_contentLoaction; 57 } 58 59 public String getContentEncoding() 60 { 61 return m_contentEncoding; 62 } 63 64 public String getParentNodeUri() 65 { 66 return m_parentNodeUri; 67 } 68 } 69 | Popular Tags |