Class XmlComment
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
-
- net.ssehub.easy.instantiation.core.model.artifactModel.CompositeFragmentArtifact
-
- net.ssehub.easy.instantiation.core.model.artifactModel.xml.XmlNode
-
- net.ssehub.easy.instantiation.core.model.artifactModel.xml.XmlComment
-
- All Implemented Interfaces:
IArtifact,IArtifactChangedListener,IStringValueProvider,IVilType
public class XmlComment extends XmlNode
Represents an XML comment.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider
IStringValueProvider.StringComparator
-
-
Constructor Summary
Constructors Constructor Description XmlComment(XmlElement parent, org.w3c.dom.Node node)Creates a new XML comment fragment artifact.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XmlCommentcreate(XmlElement parent, java.lang.String contents)Creates a new XmlComment as child of given parent.(package private) voiddeleteChild(XmlNode child)Removes a child from this Element.java.lang.StringgetName()Returns the name of this artifact.java.lang.StringgetStringValue(IStringValueProvider.StringComparator comparator)Returns the string value of this object.voidrename(java.lang.String name)Renames this artifact.Set<? extends FragmentArtifact>selectAll()Returns all artifacts this composite artifact is composed of.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.artifactModel.xml.XmlNode
accept, artifactChanged, checkRoot, checkValidity, delete, getBinary, getCdata, getCdataDirect, getChild, getChildCount, getFile, getNameSafe, getNode, getParent, getText, getTextDirect, notifyChange, notifyChange, setCdata, setNode, sortAttributes, synchronizeAttributeSequence, update
-
Methods inherited from class net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
exists, lastModification, store
-
-
-
-
Constructor Detail
-
XmlComment
XmlComment(XmlElement parent, org.w3c.dom.Node node)
Creates a new XML comment fragment artifact.- Parameters:
parent- the parent artifactnode- the node that is represented by this XmlElement
-
-
Method Detail
-
create
public static XmlComment create(XmlElement parent, java.lang.String contents) throws VilException
Creates a new XmlComment as child of given parent.- Parameters:
parent- The parent of the new XmlComment.contents- optional initial contents, ignored if empty- Returns:
- The created XmlElement.
- Throws:
VilException- if element could not be created.
-
getStringValue
public java.lang.String getStringValue(IStringValueProvider.StringComparator comparator)
Description copied from interface:IStringValueProviderReturns the string value of this object.- Parameters:
comparator- if the sequence of elements, e.g., in case of collections, shall be ordered according to the comparator, null if the original sequence shall be returned- Returns:
- the string value
-
getName
public java.lang.String getName() throws VilExceptionDescription copied from interface:IArtifactReturns the name of this artifact.- Returns:
- the name of this artifact
- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
rename
public void rename(java.lang.String name) throws VilExceptionDescription copied from interface:IArtifactRenames this artifact.- Parameters:
name- the new name of this artifact- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
selectAll
public Set<? extends FragmentArtifact> selectAll() throws VilException
Description copied from class:CompositeFragmentArtifactReturns all artifacts this composite artifact is composed of.- Specified by:
selectAllin classCompositeFragmentArtifact- Returns:
- all fragments
- Throws:
VilException- in case that this element or query is invalid
-
deleteChild
void deleteChild(XmlNode child)
Description copied from class:XmlNodeRemoves a child from this Element.- Specified by:
deleteChildin classXmlNode- Parameters:
child- the child that is to be removed.
-
-