| java.lang.Object org.opencms.xml.A_CmsXmlDocument org.opencms.xml.content.CmsXmlContent
Method Summary | |
public void | addLocale(CmsObject cms, Locale locale) | public I_CmsXmlContentValue | addValue(CmsObject cms, String path, Locale locale, int index) | protected Object | getBookmark(String bookmark) | protected Set | getBookmarks() | public CmsXmlContentDefinition | getContentDefinition() | public CmsLinkProcessor | getLinkProcessor(CmsObject cms, CmsLinkTable linkTable) | protected Element | getLocaleNode(Locale locale) | public CmsXmlContentValueSequence | getValueSequence(String name, Locale locale) | protected void | initDocument(CmsObject cms, Document document, String encoding, CmsXmlContentDefinition definition) | protected void | initDocument(Document document, String encoding, CmsXmlContentDefinition definition) | public boolean | isAutoCorrectionEnabled() | public void | removeValue(String name, Locale locale, int index) | public void | resolveMappings(CmsObject cms) | public void | setAutoCorrectionEnabled(boolean value) | protected void | setFile(CmsFile file) | public CmsXmlContentErrorHandler | validate(CmsObject cms) | public void | visitAllValuesWith(I_CmsXmlContentValueVisitor visitor) Visits all values of this XML content with the given value visitor.
Please note that the order in which the values are visited may NOT be the
order they apper in the XML document. |
AUTO_CORRECTION_ATTRIBUTE | final public static String AUTO_CORRECTION_ATTRIBUTE(Code) | | The name of the XML content auto correction runtime attribute, this must always be a Boolean.
|
XERCES_SCHEMA_PROPERTY | final public static String XERCES_SCHEMA_PROPERTY(Code) | | The property to set to enable xerces schema validation.
|
m_autoCorrectionEnabled | protected boolean m_autoCorrectionEnabled(Code) | | Flag to control if auto correction is enabled when saving this XML content.
|
m_contentDefinition | protected CmsXmlContentDefinition m_contentDefinition(Code) | | The XML content definition object (i.e. XML schema) used by this content.
|
CmsXmlContent | protected CmsXmlContent()(Code) | | Hides the public constructor.
|
CmsXmlContent | protected CmsXmlContent(CmsObject cms, Document document, String encoding, EntityResolver resolver)(Code) | | Creates a new XML content based on the provided XML document.
The given encoding is used when marshalling the XML again later.
Parameters: cms - the cms context, if null no link validation is performed Parameters: document - the document to create the xml content from Parameters: encoding - the encoding of the xml content Parameters: resolver - the XML entitiy resolver to use |
CmsXmlContent | protected CmsXmlContent(CmsObject cms, Locale locale, String modelUri) throws CmsException(Code) | | Create a new XML content based on the given default content,
that will have all language nodes of the default content and ensures the presence of the given locale.
The given encoding is used when marshalling the XML again later.
Parameters: cms - the current users OpenCms content Parameters: locale - the locale to generate the default content for Parameters: modelUri - the absolute path to the XML content file acting as model throws: CmsException - in case the model file is not found or not valid |
CmsXmlContent | protected CmsXmlContent(CmsObject cms, Locale locale, String encoding, CmsXmlContentDefinition contentDefinition)(Code) | | Create a new XML content based on the given content definiton,
that will have one language node for the given locale all initialized with default values.
The given encoding is used when marshalling the XML again later.
Parameters: cms - the current users OpenCms content Parameters: locale - the locale to generate the default content for Parameters: encoding - the encoding to use when marshalling the XML content later Parameters: contentDefinition - the content definiton to create the content for |
getLocaleNode | protected Element getLocaleNode(Locale locale) throws CmsRuntimeException(Code) | | Returns the XML root element node for the given locale.
Parameters: locale - the locale to get the root element for the XML root element node for the given locale throws: CmsRuntimeException - if no language element is found in the document |
getValueSequence | public CmsXmlContentValueSequence getValueSequence(String name, Locale locale)(Code) | | Returns the value sequence for the selected element name in this XML content.
If the given element name is not valid according to the schema of this XML content,
null is returned.
Parameters: name - the element name (XML node name) to the the value sequence for Parameters: locale - the locale to get the value sequence for the value sequence for the selected element name in this XML content |
initDocument | protected void initDocument(CmsObject cms, Document document, String encoding, CmsXmlContentDefinition definition)(Code) | | Initializes an XML document based on the provided document, encoding and content definition.
Checks the links and removes invalid ones in the initialized document.
Parameters: cms - the current users OpenCms content Parameters: document - the base XML document to use for initializing Parameters: encoding - the encoding to use when marshalling the document later Parameters: definition - the content definition to use |
removeValue | public void removeValue(String name, Locale locale, int index)(Code) | | Removes an existing XML content value of the given element name and locale at the given index position
from this XML content document.
Parameters: name - the name of the XML content value element Parameters: locale - the locale where to remove the value Parameters: index - the index where to remove the value (relative to all other values of this type) |
resolveMappings | public void resolveMappings(CmsObject cms)(Code) | | Resolves the mappings for all values of this XML content.
Parameters: cms - the current users OpenCms context |
setAutoCorrectionEnabled | public void setAutoCorrectionEnabled(boolean value)(Code) | | Sets the flag to control if auto correction is enabled when saving this XML content.
Parameters: value - the flag to control if auto correction is enabled when saving this XML content |
setFile | protected void setFile(CmsFile file)(Code) | | Sets the file this XML content is written to.
Parameters: file - the file this XML content content is written to |
visitAllValuesWith | public void visitAllValuesWith(I_CmsXmlContentValueVisitor visitor)(Code) | | Visits all values of this XML content with the given value visitor.
Please note that the order in which the values are visited may NOT be the
order they apper in the XML document. It is ensured that the the parent
of a nested value is visited before the element it contains.
Parameters: visitor - the value visitor implementation to visit the values with |
Methods inherited from org.opencms.xml.A_CmsXmlDocument | protected void addBookmark(String path, Locale locale, boolean enabled, Object value)(Code)(Java Doc) protected void addLocale(Locale locale)(Code)(Java Doc) protected void clearBookmarks()(Code)(Java Doc) public void copyLocale(List possibleSources, Locale destination) throws CmsXmlException(Code)(Java Doc) public void copyLocale(Locale source, Locale destination) throws CmsXmlException(Code)(Java Doc) public CmsFile correctXmlStructure(CmsObject cms) throws CmsXmlException(Code)(Java Doc) protected Object getBookmark(String bookmark)(Code)(Java Doc) protected Object getBookmark(String path, Locale locale)(Code)(Java Doc) final protected static String getBookmarkName(String name, Locale locale)(Code)(Java Doc) protected Set getBookmarks()(Code)(Java Doc) public String getConversion()(Code)(Java Doc) public String getEncoding()(Code)(Java Doc) public CmsFile getFile()(Code)(Java Doc) public int getIndexCount(String path, Locale locale)(Code)(Java Doc) public List getLocales()(Code)(Java Doc) public List getLocales(String path)(Code)(Java Doc) public List getNames(Locale locale)(Code)(Java Doc) public String getStringValue(CmsObject cms, String path, Locale locale)(Code)(Java Doc) public String getStringValue(CmsObject cms, String path, Locale locale, int index)(Code)(Java Doc) public I_CmsXmlContentValue getValue(String path, Locale locale)(Code)(Java Doc) public I_CmsXmlContentValue getValue(String path, Locale locale, int index)(Code)(Java Doc) public List getValues(Locale locale)(Code)(Java Doc) public List getValues(String path, Locale locale)(Code)(Java Doc) public boolean hasLocale(Locale locale)(Code)(Java Doc) public boolean hasValue(String path, Locale locale)(Code)(Java Doc) public boolean hasValue(String path, Locale locale, int index)(Code)(Java Doc) public void initDocument()(Code)(Java Doc) abstract protected void initDocument(Document document, String encoding, CmsXmlContentDefinition contentDefinition)(Code)(Java Doc) protected boolean isAutoCorrectionEnabled()(Code)(Java Doc) public boolean isEnabled(String path, Locale locale)(Code)(Java Doc) public boolean isEnabled(String path, Locale locale, int index)(Code)(Java Doc) public byte[] marshal() throws CmsXmlException(Code)(Java Doc) protected OutputStream marshal(OutputStream out, String encoding) throws CmsXmlException(Code)(Java Doc) public void moveLocale(Locale source, Locale destination) throws CmsXmlException(Code)(Java Doc) protected I_CmsXmlContentValue removeBookmark(String path, Locale locale)(Code)(Java Doc) public void removeLocale(Locale locale) throws CmsXmlException(Code)(Java Doc) public void setConversion(String conversion)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void validateXmlStructure(EntityResolver resolver) throws CmsXmlException(Code)(Java Doc)
|
|
|