Skip to content

Commit

Permalink
Added covenience functions (#11)
Browse files Browse the repository at this point in the history
* Removed duplicated literal "Empty array name"

* Removed XMPMeta interface and merged this with the real class.

* Removed duplicated literal "Empty property name"

* Default value for PropertyOptions restored

* @Suppress("TooManyFunctions")

* Moved private methods to better places

* Added convenience methods for common properties

* ReadXmpTest.kt & WriteXmpTest.kt use convenience methods to get unit test coverage on that.

* Removed sub package "impl"

* XMPMeta.kt: Style formattings

* Removed XMPIterator.kt interface as there is only one implementation.

* Merged XMPSchemaRegistry.kt & XMPSchemaRegistryImpl.kt

* Refactor XMPRDFWriter: Pass StringBuilder into the methods

* Refactor XMPRDFWriter: Inlined write methods

* Refactor XMPRDFWriter: Pass XMPMeta into serialize()

* Refactor XMPRDFWriter: Pass SerializeOptions into serialize()

* XMPRDFWriter is now a singleton object to avoid this instance creation
  • Loading branch information
StefanOltmann authored Nov 8, 2023
1 parent 0ff63fb commit 5258c71
Show file tree
Hide file tree
Showing 29 changed files with 2,530 additions and 2,539 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It's part of [Ashampoo Photos](https://ashampoo.com/photos).
## Installation

```
implementation("com.ashampoo:xmpcore:0.1.7")
implementation("com.ashampoo:xmpcore:0.2")
```

## How to use
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.ashampoo.xmp.impl
package com.ashampoo.xmp

import com.ashampoo.xmp.XMPError
import com.ashampoo.xmp.XMPException
import nl.adaptivity.xmlutil.DomWriter
import nl.adaptivity.xmlutil.EventType
import nl.adaptivity.xmlutil.XmlStreaming
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================
package com.ashampoo.xmp.impl
package com.ashampoo.xmp

class QName {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================
package com.ashampoo.xmp.impl

import com.ashampoo.xmp.XMPConst
package com.ashampoo.xmp

/**
* Utility functions for the XMPToolkit implementation.
Expand Down
2 changes: 2 additions & 0 deletions src/commonMain/kotlin/com/ashampoo/xmp/XMPConst.kt
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ object XMPConst {

const val XMP_DC_SUBJECT: String = "subject"

const val XMP_ACDSEE_KEYWORDS: String = "keywords"

const val XMP_IPTC_EXT_PERSON_IN_IMAGE: String = "PersonInImage"

}
2 changes: 2 additions & 0 deletions src/commonMain/kotlin/com/ashampoo/xmp/XMPError.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ package com.ashampoo.xmp

object XMPError {

const val EMPTY_ARRAY_NAME_TEXT: String = "Empty array name"
const val EMPTY_SCHEMA_TEXT: String = "Empty schema namespace URI"
const val EMPTY_PROPERTY_NAME_TEXT: String = "Empty property name"
const val EMPTY_CONVERT_STRING_TEXT: String = "Empty convert-string"

const val UNKNOWN: Int = 0
Expand Down
Loading

0 comments on commit 5258c71

Please sign in to comment.