Package org.ametys.odf.lheo
Class LHEOUtils
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.lheo.LHEOUtils
- All Implemented Interfaces:
LogEnabled
,Component
Class utils for LHEO XML export
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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>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>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>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>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>void
createLHEOElement
(ContentHandler contentHandler, Content content, String elementName, String value) Create the LHEO elementvoid
createLHEOElement
(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength) Create the LHEO elementvoid
createLHEOElement
(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value) Create the LHEO elementvoid
createLHEOElement
(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength) Create the LHEO elementvoid
createMandatoryLHEOElement
(ContentHandler contentHandler, Content content, String elementName, String value) Create the mandatory LHEO elementvoid
createMandatoryLHEOElement
(ContentHandler contentHandler, Content content, String elementName, String value, int minLength, int maxLength) Create the mandatory LHEO elementvoid
createMandatoryLHEOElement
(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value) Create the mandatory LHEO elementvoid
createMandatoryLHEOElement
(ContentHandler contentHandler, Content content, String elementName, AttributesImpl attrs, String value, int minLength, int maxLength) Create the mandatory LHEO elementvoid
createPeriodLHEOElments
(ContentHandler contentHandler, Content content, LocalDate startDate, LocalDate endDate) Create LHEO elements for tag >periode<
Contains the following XML tags:
[1,1] <debut>
[1,1] <fin>Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
LHEOUtils
public LHEOUtils()
-
-
Method Details
-
createCoordinateLHEOElementsPart1
public 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 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 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 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 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
-
createPeriodLHEOElments
public void createPeriodLHEOElments(ContentHandler contentHandler, Content content, LocalDate startDate, LocalDate endDate) throws SAXException Create LHEO elements for tag >periode<
Contains the following XML tags:
[1,1] <debut>
[1,1] <fin>- Parameters:
contentHandler
- the content handlercontent
- the saxed contentstartDate
- the start date. Can be null. If null a warning will be logged.endDate
- the end date. Can be null. If null a warning will be logged.- Throws:
SAXException
- if a saxing exception occurred
-
createMandatoryLHEOElement
public 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 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 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 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 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 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 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 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
-