Compare commits
15 commits
Author | SHA1 | Date | |
---|---|---|---|
13731fdeab | |||
4543221aee | |||
d1bbae3330 | |||
c720cfc63d | |||
c15a64eb1d | |||
6efdf7d39e | |||
be88c759fa | |||
c1e1ab7207 | |||
ec64a05d90 | |||
e5457f3964 | |||
ae47bef967 | |||
39f12e3470 | |||
c556585d6c | |||
643e6e84de | |||
92d5c02692 |
38 changed files with 99 additions and 81 deletions
22
.classpath
22
.classpath
|
@ -2,20 +2,20 @@
|
|||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar" sourcepath="lib/commons-lang3-3.1-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/joda-time-2.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar" sourcepath="lib/Logs/log4j-1.2.17-source.zip"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.5.jar" sourcepath="lib/Logs/slf4j-api-1.7.5-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.5.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.5-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.11.jar" sourcepath="lib/UnitTesting/junit-4.11-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-xml-0.4.1.jar" sourcepath="lib/devinsy-xml-0.4.1-sources.zip"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-strings-0.4.1.jar" sourcepath="lib/devinsy-strings-0.4.1-sources.zip"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/log4j-1.2.17.jar" sourcepath="lib/Logs/log4j-1.2.17-source.zip"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/hamcrest-core-1.3.jar" sourcepath="lib/UnitTesting/hamcrest-core-1.3-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-api-1.7.25.jar" sourcepath="lib/Logs/slf4j-api-1.7.25-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/Logs/slf4j-log4j12-1.7.25.jar" sourcepath="lib/Logs/slf4j-log4j12-1.7.25-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/UnitTesting/junit-4.12.jar" sourcepath="lib/UnitTesting/junit-4.12-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-lang3-3.12.0.jar" sourcepath="lib/commons-lang3-3.12.0-sources.jar"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-strings-0.17.0.jar" sourcepath="lib/devinsy-strings-0.17.0-sources.zip"/>
|
||||
<classpathentry kind="lib" path="lib/devinsy-xml-0.17.0.jar" sourcepath="lib/devinsy-xml-0.17.0-sources.zip"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -10,16 +10,20 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
|||
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
@ -27,17 +31,20 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_c
|
|||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
|
@ -121,11 +128,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
|||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
|
@ -155,6 +163,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
|
|||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
|
@ -179,13 +189,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
|||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
|
@ -232,6 +246,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
|
|||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
|
@ -268,9 +284,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
|
|||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
|
@ -296,6 +315,10 @@ org.eclipse.jdt.core.formatter.tabulation.char=tab
|
|||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<fixed facet="jst.java"/>
|
||||
<fixed facet="jst.utility"/>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
<installed facet="jst.java" version="6.0"/>
|
||||
<installed facet="jst.java" version="17"/>
|
||||
</faceted-project>
|
||||
|
|
|
@ -11,8 +11,8 @@ This software is released under the GNU LGPL.
|
|||
|
||||
## Requirements
|
||||
|
||||
- Java 1.6
|
||||
- Eclipse Kepler
|
||||
- Java 17
|
||||
- Eclipse > 202306.
|
||||
|
||||
## Context
|
||||
Several useful Java classes.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#Build Number for ANT. Do not edit!
|
||||
#Tue May 02 19:18:06 CEST 2017
|
||||
build.number=1
|
||||
#Fri Aug 23 06:33:15 CEST 2024
|
||||
build.number=3
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
product.name=devinsy-rss
|
||||
product.revision.major=0
|
||||
product.revision.minor=4
|
||||
product.revision.minor=17
|
||||
|
|
BIN
lib/Logs/slf4j-api-1.7.25-sources.jar
Normal file
BIN
lib/Logs/slf4j-api-1.7.25-sources.jar
Normal file
Binary file not shown.
BIN
lib/Logs/slf4j-api-1.7.25.jar
Normal file
BIN
lib/Logs/slf4j-api-1.7.25.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/Logs/slf4j-log4j12-1.7.25-sources.jar
Normal file
BIN
lib/Logs/slf4j-log4j12-1.7.25-sources.jar
Normal file
Binary file not shown.
BIN
lib/Logs/slf4j-log4j12-1.7.25.jar
Normal file
BIN
lib/Logs/slf4j-log4j12-1.7.25.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/UnitTesting/junit-4.12-sources.jar
Normal file
BIN
lib/UnitTesting/junit-4.12-sources.jar
Normal file
Binary file not shown.
BIN
lib/UnitTesting/junit-4.12.jar
Normal file
BIN
lib/UnitTesting/junit-4.12.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/commons-lang3-3.12.0-sources.jar
Normal file
BIN
lib/commons-lang3-3.12.0-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-lang3-3.12.0.jar
Normal file
BIN
lib/commons-lang3-3.12.0.jar
Normal file
Binary file not shown.
BIN
lib/devinsy-strings-0.17.0-sources.zip
Normal file
BIN
lib/devinsy-strings-0.17.0-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-strings-0.17.0.jar
Normal file
BIN
lib/devinsy-strings-0.17.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/devinsy-xml-0.17.0-sources.zip
Normal file
BIN
lib/devinsy-xml-0.17.0-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-xml-0.17.0.jar
Normal file
BIN
lib/devinsy-xml-0.17.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2014,2017 Christian Pierre MOMON
|
||||
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
|
||||
*
|
||||
* This file is part of Devinsy-rss.
|
||||
*
|
||||
|
@ -16,18 +16,16 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Devinsy-rss. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package fr.devinsy.util.rss;
|
||||
package fr.devinsy.rss;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import fr.devinsy.util.strings.StringList;
|
||||
import fr.devinsy.strings.StringList;
|
||||
|
||||
/**
|
||||
* The Class RSSCache.
|
||||
*
|
||||
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||
*/
|
||||
public class RSSCache
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2014,2017 Christian Pierre MOMON
|
||||
* Copyright (C) 2013-2024 Christian Pierre MOMON
|
||||
*
|
||||
* This file is part of Devinsy-rss.
|
||||
*
|
||||
|
@ -16,14 +16,13 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Devinsy-rss. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package fr.devinsy.util.rss;
|
||||
package fr.devinsy.rss;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* The Class RSSElement.
|
||||
*
|
||||
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||
*/
|
||||
public class RSSElement
|
||||
{
|
||||
|
@ -33,28 +32,6 @@ public class RSSElement
|
|||
private String value;
|
||||
private String[] attributes;
|
||||
|
||||
/**
|
||||
* Instantiates a new RSS element.
|
||||
*
|
||||
* @param name
|
||||
* the name
|
||||
* @param value
|
||||
* the value
|
||||
*/
|
||||
public RSSElement(final String name, final DateTime value)
|
||||
{
|
||||
setName(name);
|
||||
if (value == null)
|
||||
{
|
||||
this.value = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.value = value.toString(DATE_PATTERN);
|
||||
}
|
||||
this.attributes = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new RSS element.
|
||||
*
|
||||
|
@ -119,6 +96,28 @@ public class RSSElement
|
|||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new RSS element.
|
||||
*
|
||||
* @param name
|
||||
* the name
|
||||
* @param value
|
||||
* the value
|
||||
*/
|
||||
public RSSElement(final String name, final ZonedDateTime value)
|
||||
{
|
||||
setName(name);
|
||||
if (value == null)
|
||||
{
|
||||
this.value = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.value = value.format(DateTimeFormatter.ofPattern(DATE_PATTERN));
|
||||
}
|
||||
this.attributes = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the attributes.
|
||||
*
|
||||
|
@ -188,5 +187,4 @@ public class RSSElement
|
|||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2014,2017 Christian Pierre MOMON
|
||||
* Copyright (C) 2013-2024 Christian Pierre MOMON
|
||||
*
|
||||
* This file is part of Devinsy-rss.
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Devinsy-rss. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package fr.devinsy.util.rss;
|
||||
package fr.devinsy.rss;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -25,12 +25,10 @@ import java.io.OutputStream;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.io.Writer;
|
||||
|
||||
import fr.devinsy.util.xml.XMLWriter;
|
||||
import fr.devinsy.xml.XMLWriter;
|
||||
|
||||
/**
|
||||
* The Class RSSWriter.
|
||||
*
|
||||
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
|
||||
*/
|
||||
public class RSSWriter
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Christian Pierre MOMON
|
||||
* Copyright (C) 2017-2024 Christian Pierre MOMON
|
||||
*
|
||||
* This file is part of Devinsy-rss.
|
||||
*
|
||||
|
@ -16,9 +16,10 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Devinsy-rss. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package fr.devinsy.util.rss.demo;
|
||||
package fr.devinsy.rss.demo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -27,13 +28,12 @@ import javax.xml.stream.XMLStreamException;
|
|||
import org.apache.log4j.BasicConfigurator;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import fr.devinsy.util.rss.RSSElement;
|
||||
import fr.devinsy.util.rss.RSSWriter;
|
||||
import fr.devinsy.util.strings.StringListWriter;
|
||||
import fr.devinsy.util.xml.XMLBadFormatException;
|
||||
import fr.devinsy.util.xml.XMLTools;
|
||||
import fr.devinsy.rss.RSSElement;
|
||||
import fr.devinsy.rss.RSSWriter;
|
||||
import fr.devinsy.strings.StringListWriter;
|
||||
import fr.devinsy.xml.XMLBadFormatException;
|
||||
import fr.devinsy.xml.XMLTools;
|
||||
|
||||
/**
|
||||
* The Class RssDemo.
|
||||
|
@ -42,12 +42,15 @@ public class RSSDemo
|
|||
{
|
||||
/**
|
||||
* The main method.
|
||||
*
|
||||
*
|
||||
* @param args
|
||||
* the arguments
|
||||
* @throws IOException
|
||||
* @throws XMLBadFormatException
|
||||
* Signals that an I/O exception has occurred.
|
||||
* @throws XMLStreamException
|
||||
* the XML stream exception
|
||||
* @throws XMLBadFormatException
|
||||
* the XML bad format exception
|
||||
*/
|
||||
public static void main(final String[] args) throws IOException, XMLStreamException, XMLBadFormatException
|
||||
{
|
||||
|
@ -64,9 +67,10 @@ public class RSSDemo
|
|||
|
||||
//
|
||||
List<RSSElement> elements = new ArrayList<RSSElement>();
|
||||
elements.add(new RSSElement("pubDate", DateTime.now()));
|
||||
elements.add(new RSSElement("lastBuildDate", DateTime.now()));
|
||||
elements.add(new RSSElement("generator", "Generated by Kiwa"));
|
||||
ZonedDateTime now = ZonedDateTime.now();
|
||||
elements.add(new RSSElement("pubDate", now));
|
||||
elements.add(new RSSElement("lastBuildDate", now));
|
||||
elements.add(new RSSElement("generator", "Generated by Foo"));
|
||||
|
||||
//
|
||||
out.writeChannel("my FEED_TITLE", "https://www.devinsy.fr/rss/news-en.rss", "my FEED_DESCRIPTION", elements.toArray(new RSSElement[0]));
|
||||
|
@ -74,7 +78,7 @@ public class RSSDemo
|
|||
//
|
||||
elements.clear();
|
||||
elements.add(new RSSElement("guid", "devinsy-news-000001", "isPermaLink", "false"));
|
||||
elements.add(new RSSElement("pubDate", DateTime.now()));
|
||||
elements.add(new RSSElement("pubDate", now));
|
||||
elements.add(new RSSElement("author", "Christian P. MOMON <christian.momon@devinsy.fr>"));
|
||||
elements.add(new RSSElement("category", "Announce"));
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2014,2017 Christian Pierre MOMON
|
||||
* Copyright (C) 2014-2024 Christian Pierre MOMON
|
||||
*
|
||||
* This file is part of Devinsy-rss.
|
||||
*
|
||||
|
@ -16,7 +16,7 @@
|
|||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Devinsy-rss. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package fr.devinsy.util.rss;
|
||||
package fr.devinsy.rss;
|
||||
|
||||
import org.apache.log4j.BasicConfigurator;
|
||||
import org.apache.log4j.Level;
|
Loading…
Reference in a new issue