Class FormatXMLElements
- java.lang.Object
-
- com.io7m.coffeepick.runtime.format.xml.FormatXMLElements
-
public final class FormatXMLElements extends java.lang.ObjectFunctions to transform values into XML elements.
-
-
Constructor Summary
Constructors Constructor Description FormatXMLElements()Construct an element producer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Documentdocument()Create a new empty document.static org.w3c.dom.ElementofBranding(org.w3c.dom.Document document, RuntimeRepositoryBranding branding)Serialize the given branding, using the given document to create elements.static org.w3c.dom.ElementofBuild(org.w3c.dom.Document document, RuntimeBuild build)Serialize the given build, using the given document to create elements.static org.w3c.dom.ElementofHash(org.w3c.dom.Document document, RuntimeHash hash)Serialize the given hash, using the given document to create elements.org.w3c.dom.DocumentofRepository(RuntimeRepositoryDescription repository)Create a new document from the given repository.static org.w3c.dom.ElementofRepository(org.w3c.dom.Document document, RuntimeRepositoryDescription repository)Serialize the given repository, using the given document to create elements.static org.w3c.dom.ElementofRuntime(org.w3c.dom.Document document, RuntimeDescription runtime, boolean append_repository)Serialize the given runtime, using the given document to create elements.static org.w3c.dom.ElementofTag(org.w3c.dom.Document document, java.lang.String tag)Serialize the given tag, using the given document to create elements.static org.w3c.dom.ElementofTags(org.w3c.dom.Document document, java.util.Set<java.lang.String> tags)Serialize the given set of tags, using the given document to create elements.
-
-
-
Method Detail
-
ofRepository
public static org.w3c.dom.Element ofRepository(org.w3c.dom.Document document, RuntimeRepositoryDescription repository)Serialize the given repository, using the given document to create elements.- Parameters:
document- The target documentrepository- The repository- Returns:
- A serialized repository
-
ofBranding
public static org.w3c.dom.Element ofBranding(org.w3c.dom.Document document, RuntimeRepositoryBranding branding)Serialize the given branding, using the given document to create elements.- Parameters:
document- The target documentbranding- The branding- Returns:
- A serialized branding
-
ofRuntime
public static org.w3c.dom.Element ofRuntime(org.w3c.dom.Document document, RuntimeDescription runtime, boolean append_repository)Serialize the given runtime, using the given document to create elements.- Parameters:
document- The target documentruntime- The runtimeappend_repository- True if the repository ID should be included in the element- Returns:
- A serialized runtime
-
ofTags
public static org.w3c.dom.Element ofTags(org.w3c.dom.Document document, java.util.Set<java.lang.String> tags)Serialize the given set of tags, using the given document to create elements.- Parameters:
document- The target documenttags- The set of tags- Returns:
- A serialized set of tags
-
ofTag
public static org.w3c.dom.Element ofTag(org.w3c.dom.Document document, java.lang.String tag)Serialize the given tag, using the given document to create elements.- Parameters:
document- The target documenttag- The tag- Returns:
- A serialized tag
-
ofHash
public static org.w3c.dom.Element ofHash(org.w3c.dom.Document document, RuntimeHash hash)Serialize the given hash, using the given document to create elements.- Parameters:
document- The target documenthash- The hash- Returns:
- A serialized hash
-
ofBuild
public static org.w3c.dom.Element ofBuild(org.w3c.dom.Document document, RuntimeBuild build)Serialize the given build, using the given document to create elements.- Parameters:
document- The target documentbuild- The build- Returns:
- A serialized build
-
ofRepository
public org.w3c.dom.Document ofRepository(RuntimeRepositoryDescription repository) throws javax.xml.parsers.ParserConfigurationException
Create a new document from the given repository.- Parameters:
repository- The repository- Returns:
- A document
- Throws:
javax.xml.parsers.ParserConfigurationException- On configuration errors
-
document
public org.w3c.dom.Document document() throws javax.xml.parsers.ParserConfigurationExceptionCreate a new empty document.- Returns:
- An empty document
- Throws:
javax.xml.parsers.ParserConfigurationException- On configuration errors
-
-