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 boolean
createPlatformIndependentXML
static 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 "'"static int
ESCAPE_BEST_PRACTICE
Same as ESCAPE_APOS|ESCAPE_GTstatic 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 ">"static 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
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copy(InputStream in, OutputStream out)
static AbstractInvoice
createInvoiceInstance(String specificationIdentifier)
static boolean
equals(Object o1, Object o2)
static String
escapeJavaString(String s)
static String
escapeXMLAttribute(String s)
Short for ecapeXMLAttribute(s,ESCAPE_BEST_PRACTICE)static String
escapeXMLAttribute(String s, int escapeMask)
static String
escapeXMLString(String s)
static <E> E
get(E value, E defaultValue)
static com.fourjs.report.facturx.util.Util.Profile
getProfile(String specificationIdentifier)
static File
getSchematronXSLTFile(String specificationIdentifier)
static File
getXSDFile(String specificationIdentifier)
static String
joinVeryLongString(String[] chunks)
to be used for strings exceeding the compiler limit of 2^16 bytes for a string constantstatic LocalDate
parseDate(String s)
parses dates in the Factur-x format YYYYMMDDstatic String
produceCodeForAStringConstant(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
-
-