forked from dragon66/pixymeta-android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6 common api via IMetadataDirectory and IMetadataTag: reduced redund…
…ant code
- Loading branch information
Showing
15 changed files
with
71 additions
and
394 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
* @author Wen Yu, [email protected] | ||
* @version 1.0 03/13/2014 | ||
*/ | ||
public abstract class Exif extends Metadata implements IMetadataDirectory { | ||
public abstract class Exif extends Metadata { | ||
private final String MODUL_NAME; | ||
|
||
protected IFD imageIFD; | ||
|
@@ -273,7 +273,8 @@ public void showMetadata() { | |
private MetadataDirectoryImpl metaData = null; | ||
|
||
// calculate metaData on demand | ||
private MetadataDirectoryImpl get() { | ||
@Override | ||
protected IMetadataDirectory get() { | ||
if ((metaData == null)) { | ||
metaData = new MetadataDirectoryImpl().setName(MODUL_NAME); | ||
|
||
|
@@ -295,31 +296,4 @@ private MetadataDirectoryImpl get() { | |
} | ||
return metaData; | ||
} | ||
|
||
/** | ||
* Provides the name of the directory, for display purposes. E.g. <code>Exif</code> | ||
* | ||
* @return the name of the directory | ||
*/ | ||
@Override | ||
public String getName() { | ||
return get().getName(); | ||
} | ||
|
||
/** | ||
* @return sub-directories that belong to this Directory or null if there are no sub-directories | ||
*/ | ||
@Override | ||
public List<IMetadataDirectory> getSubdirectories() { | ||
return get().getSubdirectories(); | ||
} | ||
|
||
/** | ||
* @return Tags that belong to this Directory or null if there are no tags | ||
*/ | ||
@Override | ||
public List<IMetadataTag> getTags() { | ||
return get().getTags(); | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -39,7 +39,7 @@ | |
* @author Wen Yu, [email protected] | ||
* @version 1.0 07/02/2013 | ||
*/ | ||
public class ICCProfile extends Metadata implements IMetadataDirectory { | ||
public class ICCProfile extends Metadata { | ||
|
||
private static final String MODUL_NAME = "ICC"; | ||
|
||
|
@@ -340,7 +340,8 @@ private void showTagTable() { | |
private MetadataDirectoryImpl metaData = null; | ||
|
||
// calculate metaData on demand | ||
private MetadataDirectoryImpl get() { | ||
@Override | ||
protected IMetadataDirectory get() { | ||
if ((metaData == null)) { | ||
metaData = new MetadataDirectoryImpl().setName(MODUL_NAME); | ||
|
||
|
@@ -354,30 +355,4 @@ private MetadataDirectoryImpl get() { | |
return metaData; | ||
} | ||
|
||
/** | ||
* Provides the name of the directory, for display purposes. E.g. <code>Exif</code> | ||
* | ||
* @return the name of the directory | ||
*/ | ||
@Override | ||
public String getName() { | ||
return get().getName(); | ||
} | ||
|
||
/** | ||
* @return sub-directories that belong to this Directory or null if there are no sub-directories | ||
*/ | ||
@Override | ||
public List<IMetadataDirectory> getSubdirectories() { | ||
return get().getSubdirectories(); | ||
} | ||
|
||
/** | ||
* @return Tags that belong to this Directory or null if there are no tags | ||
*/ | ||
@Override | ||
public List<IMetadataTag> getTags() { | ||
return get().getTags(); | ||
} | ||
|
||
} |
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.