Package org.ametys.odf.lheo
Class LHEOUtils
- java.lang.Object
-
- org.ametys.odf.lheo.LHEOUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createAddressLHEOElements(ContentHandler contentHandler, Content content, String address, String zipCode, String town, String department, String codeINSEEtown, String codeINSEEdistrict, String zone, String country, String latitude, String longitude)
Create some LHEO elements for tag >adresse<
Contains the following XML tags:
[0,1] <ligne>
[0,1] <codepostal>
[0,1] <ville>
[0,3] <departement>
[0,1] <code-INSEE-commune>
[0,1] <code-INSEE-canton>
[0,1] <region>
[0,1] <pays>
[0,1] <geolocalisation>static void
createAddressLHEOElements(ContentHandler contentHandler, Content content, List<String> lines, String zipCode, String town, String department, String codeINSEEtown, String codeINSEEdistrict, String zone, String country, String latitude, String longitude)
Create some LHEO elements for tag >adresse<
Contains the following XML tags:
[0,1] <ligne>
[0,1] <codepostal>
[0,1] <ville>
[0,3] <departement>
[0,1] <code-INSEE-commune>
[0,1] <code-INSEE-canton>
[0,1] <region>
[0,1] <pays>
[0,1] <geolocalisation>static void
createCoordinateLHEOElementsPart1(ContentHandler contentHandler, Content content, String civility, String lastname, String firstname, String address)
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <civilite>
[0,1] <nom>
[0,1] <prenom>
[0,3] <ligne>static void
createCoordinateLHEOElementsPart1(ContentHandler contentHandler, Content content, String civility, String lastname, String firstname, List<String> lines)
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <civilite>
[0,1] <nom>
[0,1] <prenom>
[0,3] <ligne>static void
createCoordinateLHEOElementsPart2(ContentHandler contentHandler, Content content, String telFix, String portable, String fax, String mail, String urlWeb)
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <telfixe>
[0,1] <portable>
[0,1] <fax>
[0,1] <courriel>
[0,1] <web>static void
createLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value)
Create the LHEO elementstatic void
createLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength)
Create the LHEO elementstatic void
createLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value)
Create the LHEO elementstatic void
createLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength)
Create the LHEO elementstatic void
createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value)
Create the mandatory LHEO elementstatic void
createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength)
Create the mandatory LHEO elementstatic void
createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value)
Create the mandatory LHEO elementstatic void
createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength)
Create the mandatory LHEO element
-
-
-
Method Detail
-
createCoordinateLHEOElementsPart1
public static void createCoordinateLHEOElementsPart1(ContentHandler contentHandler, Content content, String civility, String lastname, String firstname, String address) throws SAXException
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <civilite>
[0,1] <nom>
[0,1] <prenom>
[0,3] <ligne>- Parameters:
contentHandler
- the content handlercontent
- the saxed contentcivility
- the civility. Can be null.lastname
- the lastname. Can be null.firstname
- the firstname. Can be null.address
- the address. Can be null.- Throws:
SAXException
- if a saxing exception occurred
-
createCoordinateLHEOElementsPart1
public static void createCoordinateLHEOElementsPart1(ContentHandler contentHandler, Content content, String civility, String lastname, String firstname, List<String> lines) throws SAXException
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <civilite>
[0,1] <nom>
[0,1] <prenom>
[0,3] <ligne>- Parameters:
contentHandler
- the content handlercontent
- the saxed contentcivility
- the civility. Can be null.lastname
- the lastname. Can be null.firstname
- the firstname. Can be null.lines
- the address line. Can be empty.- Throws:
SAXException
- if a saxing exception occurred
-
createCoordinateLHEOElementsPart2
public static void createCoordinateLHEOElementsPart2(ContentHandler contentHandler, Content content, String telFix, String portable, String fax, String mail, String urlWeb) throws SAXException
Create some LHEO elements for tag >coordonnees<
Contains the following XML tags:
[0,1] <telfixe>
[0,1] <portable>
[0,1] <fax>
[0,1] <courriel>
[0,1] <web>- Parameters:
contentHandler
- the content handlercontent
- the saxed contenttelFix
- the telFix. Can be null.portable
- the portable. Can be null.fax
- the fax. Can be null.mail
- the mail. Can be null.urlWeb
- the url web. Can be null.- Throws:
SAXException
- if a saxing exception occurred
-
createAddressLHEOElements
public static void createAddressLHEOElements(ContentHandler contentHandler, Content content, String address, String zipCode, String town, String department, String codeINSEEtown, String codeINSEEdistrict, String zone, String country, String latitude, String longitude) throws SAXException
Create some LHEO elements for tag >adresse<
Contains the following XML tags:
[0,1] <ligne>
[0,1] <codepostal>
[0,1] <ville>
[0,3] <departement>
[0,1] <code-INSEE-commune>
[0,1] <code-INSEE-canton>
[0,1] <region>
[0,1] <pays>
[0,1] <geolocalisation>- Parameters:
contentHandler
- the content handlercontent
- the saxed contentaddress
- the address. Is mandatory.zipCode
- the zip code. Is mandatory.town
- the town. Is mandatory.department
- the department. Can be null.codeINSEEtown
- the code INSEE for the town. Can be null.codeINSEEdistrict
- the code INSEE for the district. Can be null.zone
- the zone. Can be null.country
- the country. Can be null.latitude
- the latitude. Can be null.longitude
- the longitude. Can be null.- Throws:
SAXException
- if a saxing exception occurred
-
createAddressLHEOElements
public static void createAddressLHEOElements(ContentHandler contentHandler, Content content, List<String> lines, String zipCode, String town, String department, String codeINSEEtown, String codeINSEEdistrict, String zone, String country, String latitude, String longitude) throws SAXException
Create some LHEO elements for tag >adresse<
Contains the following XML tags:
[0,1] <ligne>
[0,1] <codepostal>
[0,1] <ville>
[0,3] <departement>
[0,1] <code-INSEE-commune>
[0,1] <code-INSEE-canton>
[0,1] <region>
[0,1] <pays>
[0,1] <geolocalisation>- Parameters:
contentHandler
- the content handlercontent
- the saxed contentlines
- the address lines. Is mandatory.zipCode
- the zip code. Is mandatory.town
- the town. Is mandatory.department
- the department. Can be null.codeINSEEtown
- the code INSEE for the town. Can be null.codeINSEEdistrict
- the code INSEE for the district. Can be null.zone
- the zone. Can be null.country
- the country. Can be null.latitude
- the latitude. Can be null.longitude
- the longitude. Can be null.- Throws:
SAXException
- if a saxing exception occurred
-
createMandatoryLHEOElement
public static void createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value) throws SAXException
Create the mandatory LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element namevalue
- the value to sax- Throws:
SAXException
- if a saxing error occurred
-
createMandatoryLHEOElement
public static void createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength) throws SAXException
Create the mandatory LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element namevalue
- the value to saxminLength
- the min length of the value (0 if there is no min length). If the value length is lower than minLength, a warning will be loggedmaxLength
- the max length of the value (0 if there is no max length). If the value length is greater than maxLength, a warning will be logged and the value will be troncated- Throws:
SAXException
- if a saxing error occurred
-
createMandatoryLHEOElement
public static void createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value) throws SAXException
Create the mandatory LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element nameattrs
- the attributesvalue
- the value to sax- Throws:
SAXException
- if a saxing error occurred
-
createMandatoryLHEOElement
public static void createMandatoryLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength) throws SAXException
Create the mandatory LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element nameattrs
- the attributesvalue
- the value to saxminLength
- the min length of the value (0 if there is no min length). If the value length is lower than minLength, a warning will be loggedmaxLength
- the max length of the value (0 if there is no max length). If the value length is greater than maxLength, a warning will be logged and the value will be troncated- Throws:
SAXException
- if a saxing error occurred
-
createLHEOElement
public static void createLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value) throws SAXException
Create the LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element namevalue
- the value to sax- Throws:
SAXException
- if a saxing error occurred
-
createLHEOElement
public static void createLHEOElement(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength) throws SAXException
Create the LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element namevalue
- the value to saxminLength
- the min length of the value (0 if there is no min length). If the value length is lower than minLength, a warning will be loggedmaxLength
- the max length of the value (0 if there is no max length). If the value length is greater than maxLength, a warning will be logged and the value will be troncated- Throws:
SAXException
- if a saxing error occurred
-
createLHEOElement
public static void createLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value) throws SAXException
Create the LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element nameattrs
- the attributesvalue
- the value to sax- Throws:
SAXException
- if a saxing error occurred
-
createLHEOElement
public static void createLHEOElement(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength) throws SAXException
Create the LHEO element- Parameters:
contentHandler
- the content handlercontent
- the saxed contentelementName
- the element nameattrs
- the attributesvalue
- the value to saxminLength
- the min length of the value (0 if there is no min length). If the value length is lower than minLength, a warning will be loggedmaxLength
- the max length of the value (0 if there is no max length). If the value length is greater than maxLength, a warning will be logged and the value will be troncated- Throws:
SAXException
- if a saxing error occurred
-
-