jInfer

cz.cuni.mff.ksi.jinfer.base.objects.nodes
Class SimpleData

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
      extended by cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractStructuralNode
          extended by 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.


Field Summary
 
Fields inherited from class cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
mutable
 
Constructor Summary
SimpleData(List<String> context, String name, Map<String,Object> metadata, String contentType, List<String> content)
          Create text node given all members (immutable)
 
Method Summary
 List<String> getContent()
          General way o describing content of node.
 String getContentType()
          General way o describing content of node.
static SimpleData getMutable()
          Standard way of obtaining empty mutable text node.
 StructuralNodeType getType()
           
 void setImmutable()
          Set object to immutable mode (cannot be changed back to mutable).
 String toString()
           
 
Methods inherited from class cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractStructuralNode
isElement, isSimpleData
 
Methods inherited from class cz.cuni.mff.ksi.jinfer.base.objects.nodes.AbstractNamedNode
getContext, getMetadata, getName, isMutable, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.mff.ksi.jinfer.base.interfaces.nodes.NamedNode
getContext, getMetadata, getName
 

Constructor Detail

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 node
metadata - any metadata associated with the node
contentType - type of the content
content - content of the node
Method Detail

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

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011