de.init.its.process.re
Class XLIFFReader.XLIFF2ITSMapperService

java.lang.Object
  extended by de.init.its.process.re.XLIFFReader.XLIFF2ITSMapperService
Enclosing class:
XLIFFReader

public static class XLIFFReader.XLIFF2ITSMapperService
extends java.lang.Object

XLIFF to ITS Mapper Class. This service class provides a bunch of method to detect ITS annotated content in an XLIFF File.

Author:
mkandora

Field Summary
(package private) static java.lang.String prefixExt
          the 'extended' xliff its prefix
(package private) static java.lang.String prefixNor
          the 'normal' its prefix
 
Constructor Summary
XLIFFReader.XLIFF2ITSMapperService()
           
 
Method Summary
static java.util.Map<ItsAttributes,java.util.List<java.lang.String>> convert(ItsTree<Element> t, ItsAttributes.DataCategories dc)
          Returns a mapping for the respective data category and the XLIFF mapping The mapping returned by this method refers to this document: http://www.w3.org/International/its/wiki/XLIFF_1.2_Mapping#Localization_Note
static ItsAttributes.DataCategories detect(ItsTree<Element> t)
          Tries to detect a certain data category
static boolean isLocFilter(ItsTree<Element> t)
          Returns true, if subtree elements head is a localization filter
static boolean isLocNote(ItsTree<Element> t)
          Returns true, if subtree elements head is a localization note
static boolean isTerminology(ItsTree<Element> t)
          Returns true, if subtree elements head is a term
static boolean isTranslate(ItsTree<Element> t)
          Returns true, if subtree elements head is a translate dc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefixExt

static final java.lang.String prefixExt
the 'extended' xliff its prefix

See Also:
Constant Field Values

prefixNor

static final java.lang.String prefixNor
the 'normal' its prefix

See Also:
Constant Field Values
Constructor Detail

XLIFFReader.XLIFF2ITSMapperService

public XLIFFReader.XLIFF2ITSMapperService()
Method Detail

isLocNote

public static boolean isLocNote(ItsTree<Element> t)
Returns true, if subtree elements head is a localization note

Parameters:
t - the subtree
Returns:
true, if localization note dc

isTranslate

public static boolean isTranslate(ItsTree<Element> t)
Returns true, if subtree elements head is a translate dc

Parameters:
t - the subtree
Returns:
true, if translate dc

isLocFilter

public static boolean isLocFilter(ItsTree<Element> t)
Returns true, if subtree elements head is a localization filter

Parameters:
t - the subtree
Returns:
true, if localization filter dc

isTerminology

public static boolean isTerminology(ItsTree<Element> t)
Returns true, if subtree elements head is a term

Parameters:
t - the subtree
Returns:
true, if term dc

detect

public static ItsAttributes.DataCategories detect(ItsTree<Element> t)
Tries to detect a certain data category

Parameters:
t - the tree, that possibly contains an ITS data category
Returns:
the detected ItsAttributes.DataCategories or null

convert

public static java.util.Map<ItsAttributes,java.util.List<java.lang.String>> convert(ItsTree<Element> t,
                                                                                    ItsAttributes.DataCategories dc)
Returns a mapping for the respective data category and the XLIFF mapping The mapping returned by this method refers to this document:

http://www.w3.org/International/its/wiki/XLIFF_1.2_Mapping#Localization_Note

Parameters:
t - the current its annotated tree element to convert
dc - the infered data category
Returns:
the mapping for its attributes