diff --git a/common/Makefile b/common/Makefile index 789dfccc..43a2b464 100644 --- a/common/Makefile +++ b/common/Makefile @@ -6,6 +6,7 @@ update-irp-protocols.xsd: update-girr: wget -O schemas/girr_ns-1.1.xsd https://raw.githubusercontent.com/bengtmartensson/Girr/master/src/main/schemas/girr_ns-1.1.xsd + wget -O schemas/girr_ns-1.2.xsd https://raw.githubusercontent.com/bengtmartensson/Girr/master/src/main/schemas/girr_ns-1.2.xsd wget -O schemas/girr_ns.xsd https://raw.githubusercontent.com/bengtmartensson/Girr/master/src/main/schemas/girr_ns.xsd wget -O schemas/girr.xsd https://raw.githubusercontent.com/bengtmartensson/Girr/master/src/main/schemas/girr.xsd diff --git a/common/schemas/girr_ns-1.2.xsd b/common/schemas/girr_ns-1.2.xsd new file mode 100644 index 00000000..ceb9d084 --- /dev/null +++ b/common/schemas/girr_ns-1.2.xsd @@ -0,0 +1,461 @@ + + + + + + + + The Girr format + is documented at www.harctoolbox.org/Girr.html + + + + + + + + + + + + Determines whether the raw representation, the ccf, or the protocol with parameters is the master of the data. + + + + + + + + + + + A parameter value, either a decimal, nonnegative number, or a hexadecimal number preceeded by 0x. + + + + + + + + + Data type describing a four-digit hexadecimal number. + + + + + + + + + Data type describing a Pronto Hex CCF string. + + + + + + + Number between 0 and 1. + + + + + + + + + + + This element models a set of remotes. It may act as a data base for a program or device. + + + + + + + + + + + + + + + + + + + + + + + Textual title of the document. + + + + + + + + Version of the Girr specification the document claims to follow. + + + + + + + + Name that is used to identify the element. + Should therefore be unique in the context. + Even though arbitrary strings are allowed, C-syntax type strings, + in the English language, are recommended. + + + + + + Name of the command as being displayed to the user. + Special characters and non-English languages are here appropriate. + + + + + + Textual comment. + + + + + + + + + + + + + + + + + + + + + Describes how, from what, and by whom the document was created. + + + + + Name of creating user + + + + + Source of the information, for example, another document that was converted to the present one. + + + + + Date of creation, or last modification. + + + + + Name of creating tool. + + + + + Version of creating tool. + + + + + Name of secondary creating tool, if applicable. + + + + + Version of creating tool. + + + + + + + + Versioning data; semanics is still to be determined. + + + + + + + + + + + Textual notes, possibly using formatting in HTML. + + + + + + + + + + + + The element models an abstract remote, which is basically a collection of commands. + + + + + + + + + + + + + + + + + + + + + + + Name of captured remote control as a component. Normally different from the name. + + + + + + + + + + + + + + + + + + + + + + Data, only relevant for a particular application or domain, can be embedded here. + + + + + + + + + Name of application or domain the application data is intended for. + + + + + + + + + + + + + + Numerical value for a parameter. Nonnegative integer with base 10. + + + + + + + + + String value for a parameter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Protocol name as known to e.g. IrpMaster. + + + + + + + + + + + + + + + + A command is essentially an IR signal with a name. + + + + + + + + + + + + + Value of the F parameter for the current command in the current protocol (if applicable). + + + + + + + + + + + + + + + + + + + + + + + + Models a raw IR signal, with into, repeat, and ending sequence (any of these may be empty). + + + + + + + + + + + + Carrier frequency in Hz. + + + + + Duty cycle of modulation signal, between 0 and 1. + + + + + + + + + + Toggle value, the "T" parameter in many protocols. + + + + + + + Models a raw IR sequence, defined by its durations. + This should be either a sequence of numbers, or alternating flash and gap elements. + Unfortunately, this cannot be described in XML Schemas :-(. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/schemas/girr_ns.xsd b/common/schemas/girr_ns.xsd index cf8c153d..ceb9d084 100644 --- a/common/schemas/girr_ns.xsd +++ b/common/schemas/girr_ns.xsd @@ -7,10 +7,12 @@ --> @@ -24,6 +26,7 @@ + @@ -81,6 +84,7 @@ + @@ -88,7 +92,7 @@ - + @@ -102,7 +106,7 @@ - + Version of the Girr specification the document claims to follow. @@ -122,7 +126,7 @@ Name of the command as being displayed to the user. - Special characters and non-english languages are here appropriate. + Special characters and non-English languages are here appropriate. @@ -142,7 +146,7 @@ - + @@ -226,6 +230,7 @@ + @@ -241,17 +246,18 @@ + - + - + - + @@ -272,7 +278,7 @@ - + @@ -301,24 +307,28 @@ - + + + + + - - - - - - - + + + + + + + @@ -334,11 +344,11 @@ - + - + @@ -349,7 +359,8 @@ - + + @@ -366,15 +377,15 @@ - + - + - + @@ -447,5 +458,4 @@ - - + \ No newline at end of file diff --git a/common/xslt/mkProps.xsl b/common/xslt/mkProps.xsl index 58f8d312..736453ee 100644 --- a/common/xslt/mkProps.xsl +++ b/common/xslt/mkProps.xsl @@ -39,6 +39,7 @@ import java.util.Properties; /** * This class handles the properties of the program, saved to a file between program invocations. */ +@SuppressWarnings("UseOfSystemOutOrSystemErr") public final class Props { private final static boolean useXml = public void set(String str) { String oldValue = props.getProperty(""); - if (!oldValue.equals(str)) { - props.setProperty("", mkPathRelative(str)); - firePropertyChange("", oldValue, str); + String newValue = mkPathRelative(str); + if (!oldValue.equals(newValue)) { + props.setProperty("", newValue); + firePropertyChange("", oldValue, newValue); needSave = true; } }