Package com.fourjs.report.facturx.util
Class Util
- java.lang.Object
-
- com.fourjs.report.facturx.util.Util
-
public class Util extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static booleancreatePlatformIndependentXMLstatic intESCAPE_APOSIf "anded" to the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), it will cause any apostroph character ("'") in s to be quoted by the character entiry "'"static intESCAPE_BEST_PRACTICESame as ESCAPE_APOS|ESCAPE_GTstatic intESCAPE_GTIf "anded" to the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), it will cause any "greater" character (">") in s to be quoted by the character entiry ">"static intESCAPE_MINIMALIf passed as value for the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), neither apostrop characters "'" not "greater" characters (">") will be quoted by character entities
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(InputStream in, OutputStream out)static AbstractInvoicecreateInvoiceInstance(String specificationIdentifier)static booleanequals(Object o1, Object o2)static StringescapeJavaString(String s)static StringescapeXMLAttribute(String s)Short for ecapeXMLAttribute(s,ESCAPE_BEST_PRACTICE)static StringescapeXMLAttribute(String s, int escapeMask)static StringescapeXMLString(String s)static <E> Eget(E value, E defaultValue)static com.fourjs.report.facturx.util.Util.ProfilegetProfile(String specificationIdentifier)static FilegetSchematronXSLTFile(String specificationIdentifier)static FilegetXSDFile(String specificationIdentifier)static StringjoinVeryLongString(String[] chunks)to be used for strings exceeding the compiler limit of 2^16 bytes for a string constantstatic LocalDateparseDate(String s)parses dates in the Factur-x format YYYYMMDDstatic StringproduceCodeForAStringConstant(String value, Vector<String> longStrings)
-
-
-
Field Detail
-
createPlatformIndependentXML
public static final boolean createPlatformIndependentXML
-
ESCAPE_APOS
public static final int ESCAPE_APOS
If "anded" to the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), it will cause any apostroph character ("'") in s to be quoted by the character entiry "'"- See Also:
- Constant Field Values
-
ESCAPE_GT
public static final int ESCAPE_GT
If "anded" to the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), it will cause any "greater" character (">") in s to be quoted by the character entiry ">"- See Also:
- Constant Field Values
-
ESCAPE_BEST_PRACTICE
public static final int ESCAPE_BEST_PRACTICE
Same as ESCAPE_APOS|ESCAPE_GT- See Also:
- Constant Field Values
-
ESCAPE_MINIMAL
public static final int ESCAPE_MINIMAL
If passed as value for the escapeMask argument in calls to escapeXMLAttribute(String s,int escapeMask), neither apostrop characters "'" not "greater" characters (">") will be quoted by character entities- See Also:
- Constant Field Values
-
-
Method Detail
-
parseDate
public static LocalDate parseDate(String s) throws DateTimeParseException
parses dates in the Factur-x format YYYYMMDD- Throws:
DateTimeParseException
-
joinVeryLongString
public static String joinVeryLongString(String[] chunks)
to be used for strings exceeding the compiler limit of 2^16 bytes for a string constant
-
produceCodeForAStringConstant
public static String produceCodeForAStringConstant(String value, Vector<String> longStrings)
-
escapeXMLAttribute
public static String escapeXMLAttribute(String s)
Short for ecapeXMLAttribute(s,ESCAPE_BEST_PRACTICE)
-
createInvoiceInstance
public static AbstractInvoice createInvoiceInstance(String specificationIdentifier)
-
getProfile
public static com.fourjs.report.facturx.util.Util.Profile getProfile(String specificationIdentifier)
-
get
public static <E> E get(E value, E defaultValue)
-
copy
public static void copy(InputStream in, OutputStream out) throws IOException
- Throws:
IOException
-
-