forked from kitodo/kitodo-production
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/video-editor' into av
- Loading branch information
Showing
37 changed files
with
1,820 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
Kitodo-API/src/main/java/org/kitodo/api/dataformat/MediaPartialView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* (c) Kitodo. Key to digital objects e. V. <[email protected]> | ||
* | ||
* This file is part of the Kitodo project. | ||
* | ||
* It is licensed under GNU General Public License version 3 or later. | ||
* | ||
* For the full copyright and license information, please read the | ||
* GPL3-License.txt file that was distributed with this source code. | ||
*/ | ||
|
||
package org.kitodo.api.dataformat; | ||
|
||
import java.util.Objects; | ||
|
||
public class MediaPartialView extends View { | ||
|
||
private String begin; | ||
|
||
private String extent; | ||
|
||
public MediaPartialView(String begin) { | ||
this.begin = begin; | ||
} | ||
|
||
public MediaPartialView(String begin, String extent) { | ||
this(begin); | ||
this.extent = extent; | ||
} | ||
|
||
public void setBegin(String begin) { | ||
this.begin = begin; | ||
} | ||
|
||
public String getBegin() { | ||
return begin; | ||
} | ||
|
||
public String getExtent() { | ||
return extent; | ||
} | ||
|
||
public void setExtent(String extent) { | ||
this.extent = extent; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || !getClass().isInstance(o)) { | ||
return false; | ||
} | ||
|
||
MediaPartialView mediaPartialView = (MediaPartialView) o; | ||
|
||
// prevent endless loop and not calling super.equals | ||
if (Objects.isNull(getPhysicalDivision()) && Objects.nonNull( | ||
mediaPartialView.getPhysicalDivision()) || Objects.nonNull(getPhysicalDivision()) && Objects.isNull( | ||
mediaPartialView.getPhysicalDivision()) || getPhysicalDivision().hashCode() != mediaPartialView.getPhysicalDivision() | ||
.hashCode()) { | ||
return false; | ||
} | ||
|
||
return (Objects.isNull(begin) && Objects.isNull(mediaPartialView.begin)) || begin.equals( | ||
mediaPartialView.getBegin()); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.