de.folt.models.datamodel.sql
Class SQLTmxProp

java.lang.Object
  extended by java.util.Observable
      extended by de.folt.models.datamodel.sql.SQLTmxProp
All Implemented Interfaces:
java.io.Serializable

@Entity
public class SQLTmxProp
extends java.util.Observable
implements java.io.Serializable

This class implements the linguistic properties reflecting the prop (from prop-grop) or note from tmx. e.g. Radblocksysteme Actually the class is identical to the class de.folt.documentmodel.tmx.TmxProp. The only difference is that this version contains the Hibernate mappings.

 content = the value of the property ("Radblocksysteme")
 lang = language of the property ("de")
 o_encoding = encoding of the property
 propType = type of the property (PROP or NOTE)
 type = the type of the property ("Att::Maschinentyp")
 </prep>

Author:
klemens
See Also:
Serialized Form

Constructor Summary
SQLTmxProp()
           
SQLTmxProp(org.jdom.Element prop)
          Creates a TmxProp from a given Tmx prop element.
SQLTmxProp(java.lang.String type, java.lang.String content)
          Creates a TmxProp from the given parameters.
SQLTmxProp(java.lang.String type, java.lang.String lang, java.lang.String o_encoding, java.lang.String content)
          Creates a TmxProp from the given parameters.
 
Method Summary
 java.lang.String createCSVString()
          createCSVString generates aString representation useful for csv export; separator = tab
 java.lang.String createCSVString(java.lang.String separator)
          createCSVString generates aString representation useful for csv export; separator supplied
 java.lang.String createCSVString(java.lang.String separator, java.lang.String nullValue, java.lang.String terminator)
          createCSVString
 java.lang.String format()
          format
 java.lang.String getContent()
           
 java.lang.Integer getId()
           
 java.lang.String getLang()
           
 java.lang.String getO_encoding()
           
 SQLMonoLingualObject getParentMonoLingualObject()
           
 SQLMultiLingualObject getParentMultiLingualObject()
           
 TmxProp.PropType getPropType()
           
 java.lang.String getType()
           
static void main(java.lang.String[] args)
          main
 TmxProp mapFrom()
          mapFrom maps the SQLTmxProp to a standard TmxProp
static SQLTmxProp mapTo(TmxProp tmxprop)
           
 void setContent(java.lang.String content)
           
 void setId(java.lang.Integer id)
           
 void setLang(java.lang.String lang)
           
 void setO_encoding(java.lang.String o_encoding)
           
 void setParentMonoLingualObject(SQLMonoLingualObject parentMonoLingualObject)
           
 void setParentMultiLingualObject(SQLMultiLingualObject parentMultiLingualObject)
           
 void setPropType(TmxProp.PropType propType)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLTmxProp

public SQLTmxProp()

SQLTmxProp

public SQLTmxProp(org.jdom.Element prop)
Creates a TmxProp from a given Tmx prop element.

Parameters:
prop - the property of a TMX element (either a prop or a note)

SQLTmxProp

public SQLTmxProp(java.lang.String type,
                  java.lang.String content)
Creates a TmxProp from the given parameters.

Parameters:
type - the TMX type
content - the content of the property or note

SQLTmxProp

public SQLTmxProp(java.lang.String type,
                  java.lang.String lang,
                  java.lang.String o_encoding,
                  java.lang.String content)
Creates a TmxProp from the given parameters.

Parameters:
type - the TMX type
lang - the TMX lang or xml:lang
o_encoding - the o-encoding of the property
content - the content of the property or note
Method Detail

main

public static void main(java.lang.String[] args)
main

Parameters:
args -

mapTo

public static SQLTmxProp mapTo(TmxProp tmxprop)

createCSVString

public java.lang.String createCSVString()
createCSVString generates aString representation useful for csv export; separator = tab

Returns:
the csv export string terminated with \n

createCSVString

public java.lang.String createCSVString(java.lang.String separator)
createCSVString generates aString representation useful for csv export; separator supplied

Parameters:
separator - the separator to use
Returns:
the csv export string terminated with \n

createCSVString

public java.lang.String createCSVString(java.lang.String separator,
                                        java.lang.String nullValue,
                                        java.lang.String terminator)
createCSVString

Parameters:
separator - the separator to use
nullValue - the null value to use
terminator - the terminator to use
Returns:
the csv export string terminated with terminator

format

public java.lang.String format()
format

Returns:
a formatted version of the prop

getContent

public java.lang.String getContent()
Returns:
the content

getId

public java.lang.Integer getId()
Returns:
the id

getLang

public java.lang.String getLang()
Returns:
the lang

getO_encoding

public java.lang.String getO_encoding()
Returns:
the o_encoding

getParentMonoLingualObject

public SQLMonoLingualObject getParentMonoLingualObject()
Returns:
the parentMonoLingualObject

getParentMultiLingualObject

public SQLMultiLingualObject getParentMultiLingualObject()
Returns:
the parentMultiLingualObject

getPropType

public TmxProp.PropType getPropType()
Returns:
the propType

getType

public java.lang.String getType()
Returns:
the type

mapFrom

public TmxProp mapFrom()
mapFrom maps the SQLTmxProp to a standard TmxProp

Returns:
the new TmxProp

setContent

public void setContent(java.lang.String content)
Parameters:
content - the content to set

setId

public void setId(java.lang.Integer id)
Parameters:
id - the id to set

setLang

public void setLang(java.lang.String lang)
Parameters:
lang - the lang to set

setO_encoding

public void setO_encoding(java.lang.String o_encoding)
Parameters:
o_encoding - the o_encoding to set

setParentMonoLingualObject

public void setParentMonoLingualObject(SQLMonoLingualObject parentMonoLingualObject)
Parameters:
parentMonoLingualObject - the parentMonoLingualObject to set

setParentMultiLingualObject

public void setParentMultiLingualObject(SQLMultiLingualObject parentMultiLingualObject)
Parameters:
parentMultiLingualObject - the parentMultiLingualObject to set

setPropType

public void setPropType(TmxProp.PropType propType)
Parameters:
propType - the propType to set

setType

public void setType(java.lang.String type)
Parameters:
type - the type to set