org.simantics.databoard.type
Class StringType

java.lang.Object
  extended by org.simantics.databoard.type.Datatype
      extended by org.simantics.databoard.type.StringType
All Implemented Interfaces:
java.lang.Cloneable

public class StringType
extends Datatype


Nested Class Summary
 
Nested classes/interfaces inherited from class org.simantics.databoard.type.Datatype
Datatype.Visitor<T>, Datatype.Visitor1
 
Field Summary
static java.lang.String KEY_LENGTH
           
static java.lang.String KEY_MIMETYPE
           
static java.lang.String KEY_PATTERN
           
 
Fields inherited from class org.simantics.databoard.type.Datatype
metadata
 
Constructor Summary
StringType()
           
StringType(java.lang.String pattern)
           
StringType(java.lang.String pattern, java.lang.String mimeType, Range length)
           
StringType(java.lang.String pattern, java.lang.String mimeType, java.lang.String length)
           
 
Method Summary
<T> T
accept(Datatype.Visitor<T> v)
           
 void accept(Datatype.Visitor1 v, java.lang.Object obj)
           
 java.util.regex.Pattern getCompiledPattern()
          Get compiled reg exp pattern
 int getComponentCount()
          Get component type count
 Datatype getComponentType(ChildReference path)
          Get component type
 Datatype getComponentType(int index)
          Get component type
 Range getLength()
           
 java.lang.String getMimeType()
           
 java.lang.String getPattern()
           
 int hashCode()
           
 int maxLength()
           
 int minLength()
           
 void setLength(Range range)
           
 void setLength(java.lang.String length)
           
 void setMimeType(java.lang.String mimeType)
           
 void setPattern(java.lang.String pattern)
           
 
Methods inherited from class org.simantics.databoard.type.Datatype
equals, metadataHashCode, toSingleLineString, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_PATTERN

public static final java.lang.String KEY_PATTERN
See Also:
Constant Field Values

KEY_MIMETYPE

public static final java.lang.String KEY_MIMETYPE
See Also:
Constant Field Values

KEY_LENGTH

public static final java.lang.String KEY_LENGTH
See Also:
Constant Field Values
Constructor Detail

StringType

public StringType()

StringType

public StringType(java.lang.String pattern)

StringType

public StringType(java.lang.String pattern,
                  java.lang.String mimeType,
                  Range length)

StringType

public StringType(java.lang.String pattern,
                  java.lang.String mimeType,
                  java.lang.String length)
Method Detail

getComponentCount

public int getComponentCount()
Description copied from class: Datatype
Get component type count

Specified by:
getComponentCount in class Datatype
Returns:
component count

getComponentType

public Datatype getComponentType(int index)
Description copied from class: Datatype
Get component type

Specified by:
getComponentType in class Datatype
Parameters:
index - component index
Returns:
datatype

getComponentType

public Datatype getComponentType(ChildReference path)
Description copied from class: Datatype
Get component type

Specified by:
getComponentType in class Datatype
Parameters:
path - child path or null to return this.
Returns:
datatype

hashCode

public int hashCode()
Overrides:
hashCode in class Datatype

accept

public void accept(Datatype.Visitor1 v,
                   java.lang.Object obj)
Specified by:
accept in class Datatype

accept

public <T> T accept(Datatype.Visitor<T> v)
Specified by:
accept in class Datatype

getPattern

public java.lang.String getPattern()

setPattern

public void setPattern(java.lang.String pattern)
                throws java.util.regex.PatternSyntaxException
Throws:
java.util.regex.PatternSyntaxException

getMimeType

public java.lang.String getMimeType()

setMimeType

public void setMimeType(java.lang.String mimeType)

getLength

public Range getLength()

minLength

public int minLength()

maxLength

public int maxLength()

getCompiledPattern

public java.util.regex.Pattern getCompiledPattern()
Get compiled reg exp pattern

Returns:
pattern or null

setLength

public void setLength(java.lang.String length)

setLength

public void setLength(Range range)