cz.cuni.mff.ksi.jinfer.base.objects.nodes
Class SimpleData
java.lang.Object
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractStructuralNode
cz.cuni.mff.ksi.jinfer.base.objects.nodes.SimpleData
- All Implemented Interfaces:
- ContentNode, NamedNode, StructuralNode
public class SimpleData
- extends AbstractStructuralNode
- implements ContentNode
Class representing a simple text XML node.
SimpleData
public SimpleData(List<String> context,
String name,
Map<String,Object> metadata,
String contentType,
List<String> content)
- Create text node given all members (immutable)
- Parameters:
context
- context of the in the document (if any)name
- name of the nodemetadata
- any metadata associated with the nodecontentType
- type of the contentcontent
- content of the node
getMutable
public static SimpleData getMutable()
- Standard way of obtaining empty mutable text node.
Be sure to set all fields properly after creating.
- Returns:
- empty mutable text node
getType
public StructuralNodeType getType()
- Specified by:
getType
in interface StructuralNode
- Specified by:
getType
in class AbstractStructuralNode
- Returns:
- enum value of type of actual instance.
getContentType
public String getContentType()
- Description copied from interface:
ContentNode
- General way o describing content of node.
Reserved for further extensibility by content analyzing module developers.
- Specified by:
getContentType
in interface ContentNode
- Returns:
- future developer defined name of content type.
getContent
public List<String> getContent()
- Description copied from interface:
ContentNode
- General way o describing content of node.
Reserved for further extensibility by content analyzing module developers.
At initial crawling, each content node may have only one element in this list.
Inferrence methods can take advantage of list by groups similar contents
to one node.
- Specified by:
getContent
in interface ContentNode
- Returns:
- list of strings - content assigned to this node.
setImmutable
public void setImmutable()
- Description copied from class:
AbstractNamedNode
- Set object to immutable mode (cannot be changed back to mutable).
Lock the node for changing.
- Overrides:
setImmutable
in class AbstractNamedNode
toString
public String toString()
- Overrides:
toString
in class AbstractStructuralNode
Generated on Fri Dec 9 00:01:25 CET 2011