Skip to content

Commit

Permalink
version 0.2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
nitmws committed Oct 9, 2022
1 parent f9c289e commit ccddbd2
Show file tree
Hide file tree
Showing 16 changed files with 1,226 additions and 252 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

(Latest changes at the top. Changes refer to a version provided in the "version" property of package.json.)

* 2022-10-04: ipmdchecker: enabled to find IPTC properties replacing the placeholder $anypmdproperty in the TechReference
* v 0.2.11 2022-10-09:
* ipmdchecker: enabled to find IPTC properties replacing the placeholder $anypmdproperty in the TechReference
* propnodes1: enabled to show IPTC properties found in the context of the placeholder $anypmdproperty
* v 0.2.10 2022-09-12: propnodes1: properties with an Exif value only are displayed now in the full list and the tech format list.
* v 0.2.9 2022-09-02: documentation updated
* v 0.2.8 2022-09-02
Expand Down
103 changes: 80 additions & 23 deletions dist/cjs/ipmdchecker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export declare class CompareResultRow {
dispparam3: string;
}
/**
* Class for checking if IPTC Photo Metadata embedded to an image file: do they comply and are XMP/IIM and Exif values in sync.
* Class for checking if IPTC Photo Metadata embedded into an image file: do they comply to the IPTC Standard and are existing XMP/IIM and Exif values in sync.
*/
export declare class IpmdChecker {
readonly fsdLsep: string;
Expand All @@ -45,7 +45,7 @@ export declare class IpmdChecker {
_lsep: string;
/**
* Constructor of the IpmdChecker class
* @param iptcPmdTechRefDocFp File path of the JSON file with the IPTC PMD reference data
* @param iptcPmdTechRefDocFp File path of the JSON file with the IPTC PMD TechReference data
* @param ipmdCheckerResultTemplateFp File path of the JSON file with the IPTC PMD State Data template
*/
constructor(iptcPmdTechRefDocFp: string, ipmdCheckerResultTemplateFp: string);
Expand All @@ -57,12 +57,12 @@ export declare class IpmdChecker {
set testEtJsonFp(value: string);
get readyToCheck(): boolean;
/**
* Returns all reference data about a top level IPTC PMD property
* Returns all TechReference data about a top level IPTC PMD property
* @param propertyId identifier of the property as defined for the reference data
*/
getIpmdTopPropertyData(propertyId: string): object;
/**
* Returns all reference data about an IPTC PMD structure
* Returns all TechReference data about an IPTC PMD structure
* @param structId identifier of the structure as defined for the reference data
*/
getIpmdStructData(structId: string): object;
Expand All @@ -72,56 +72,80 @@ export declare class IpmdChecker {
*/
loadTestEtJson(): object;
/**
* Checks the PMD of a test image based on the properties defined by the IPTC PMD Standard
* Checks the photo metadata of a test image based on
* the properties defined by the IPTC PMD Standard
* @param imgEtPmdInput - object with photo metadata as provided by ExifTool
* @param compareValues - "true" = if XMP and IIM values exist they are compared
* @param countOccurrences - "true" = if the XMP value may occur mulitple times: the occurrences are counted
* @param anyOtherDataRef - object referencing any non-IPTC (meta)data in the ExifTool object
* @returns Instance of the ipmdCheckerResult
*/
checkIpmdStd(imgEtPmdInput?: MdStruct, compareValues?: boolean, countOccurrences?: boolean, anyOtherDataRef?: MdStruct): IipmdCheckerResult;
/**
* Checks a specific structure of PMD of a test image based on the properties
* defined for this kind of structure by the IPTC PMD Standard.
* Checks a specific structure of the photo metadata of a test image
* based on the properties defined for this kind of structure
* by the IPTC PMD Standard.
* This method is called by the checkIpmdStd method.
* Be aware: only for the XMP format structures are defined!
* Be aware: structures are defined only for the XMP format!
* @param parentIpmdIdsStr Sequence of IPTC PMD property identifiers, separated by a slash (/)
* @param refstructId Identifier of the structure in the IPTC PMD reference object
* @param teststructEtPmd Structure of photo metadata as provided by ExifTool
* @param countOccurrences - "true" = if the XMP value may occur mulitple times: the occurrences are counted
* @param setPmdState - "true" = should the ipmdStateData be set
* @returns Instance of the ipmdCheckerResult
*/
private _checkIpmdStdStruct;
private _checkStructForAnyproperty;
/**
* Check a structure if it has any other property than those defined by the
* IPTC PMD standard
* @param refIpmdStruct Data about the to-be-checked structure from the TechReference
* @param teststructEtPmd Data of the to-be-checked structure from the ExifTool output
* @returns A metadata structure including found "other properties"
* @private
*/
private _checkStructForAnyOtherProp;
/**
* Check "sub-properties" (property inside a structure) by it ExifTool tag
* and not by its IPTC spec identifier
* @param etTag ExifTool tag of the to-be-checked property
* @param etValue Value of the property as delivered by ExifTool
* @returns A metadata structure of the checked property
* @private
*/
private _checkSubpropByEtTag;
/**
* Compares an IPMD Checker Result of a test image against the IPMD Checker Result
* of a reference image
* Returns: array of CompareResultRow objects
* @param resultRef
* @param resultTest
* @param ipmdIdFilter
* @param compareOptions
* @param resultRef IPMD Checker Result of a reference image
* @param resultTest IPMD Checker Result of a test image
* @param ipmdIdFilter Array of to-be-compared IPTC property Id, if empty all properties are compared
* @param compareOptions Instance of the CompareOptions
* @returns Array of CompareResultRow
*/
compareIpmdCheckerResults(resultRef: IipmdCheckerResult, resultTest: IipmdCheckerResult, ipmdIdFilter: string[], compareOptions: CompareOptions): CompareResultRow[];
/**
* Sub-method of compareIpmdCheckerResults. Compares a structure of an IPTC PMD property.
* The ...Struct1 method sorts out a single value vs. multiple values in an array
* @param refDataValueFsd
* @param testDataValueFsd
* @param thisImpdIdPath
* @param compareOptions
* @param refDataValueFsd Value data of a property of the reference image
* @param testDataValueFsd Value data of a property of the test image
* @param thisImpdIdPath Path of this IPTC property Id in the hierarchy of properties
* @param compareOptions Instance of CompareOptions
* @returns Array of CompareResultRow
*/
private _compareIpmdCheckerResultsStruct1;
/**
* Sub-method of compareIpmdCheckerResults and of _compareIpmdCheckerResultsStruct1.
* Compares a single value of or in a structure of an IPTC PMD property.
* @param refDataValueFsd
* @param testDataValueFsd
* @param thisImpdIdPath
* @param compareOptions
* @param refDataValueFsd Value data of a property of the reference image
* @param testDataValueFsd Value data of a property of the test image
* @param thisImpdIdPath Path of this IPTC property Id in the hierarchy of properties
* @param compareOptions Instance of CompareOptions
* @returns Array of CompareResultRow
*/
private _compareIpmdCheckerResultsStruct2;
/**
* Loads the IPTC Photo Metadata Reference document from a JSON file.
* Loads the IPTC Photo Metadata TechReference document from a JSON file.
* For class-internal use only.
*/
private static _loadIpmdRefJson;
Expand All @@ -131,7 +155,7 @@ export declare class IpmdChecker {
*/
private static _loadIpmdStateDataTemplate;
/**
* Checks if the class instance is ready for doing a check and set the property _readyToCheck
* Checks if an instance of this class is ready for doing a check and set the property _readyToCheck accordingly
*/
private _checkReadyToCheck;
/**
Expand All @@ -145,16 +169,49 @@ export declare class IpmdChecker {
* @param ipmdIdPath
*/
private _ipmdIdPath2nameSeq;
/**
* Builds a single string value from an AltLang value - which may have
* values in different languages. This single string follows a format
* enabling software to split it up into the strings in different languages
* @param etJsonData JSON object with the AltLang data
* @param basicPropId IPTC property Id of the property owning this value
* @returns A single string with text values in different languages
* @private
*/
private _buildAltLangValue;
/**
* Normalizes (= transforms) the value(s) of a property to a given data type
* Sub-methods deal with a single value and an array of values
* @param propValue The to-be-normalized value
* @param shouldbeDatatype The target data type
* @returns The normalized value
* @private
*/
private _normalizePropValue;
/**
* Sub-method of _normalizePropValue: normalizes an array of values
* @param propValueArray
* @param shouldbeDatatype
* @param propId
* @returns The normalized values
* @private
*/
private _normalizePropValueArray;
/**
* Sub-method of _normalizePropValue: normalizes a single value
* @param propValue
* @param shouldbeDatatype
* @param propId
* @returns The normalized values
* @private
*/
private _normalizePropSingleValue;
/**
* Gets all ExifTool tags of properties defined by the IPTC PMD Standard
* for a structure
* @param refIpmdStruct Data of the structure from the IPTC TechReference
* @returns Array of ExifTool tags
* @private
*/
private _getEtTagsOfStruct;
}
Loading

0 comments on commit ccddbd2

Please sign in to comment.