public class AdaptedMetacard extends Object implements Metacard
http://stackoverflow.com/a/11967459,
Serialized FormANY_DATE, ANY_GEO, ANY_TEXT, CHECKSUM, CHECKSUM_ALGORITHM, CONTENT_TYPE, CONTENT_TYPE_VERSION, CREATED, DEFAULT_TAG, DERIVED, DERIVED_RESOURCE_DOWNLOAD_URL, DERIVED_RESOURCE_URI, DESCRIPTION, EFFECTIVE, EXPIRATION, GEOGRAPHY, ID, METADATA, MODIFIED, POINT_OF_CONTACT, RELATED, RESOURCE_DOWNLOAD_URL, RESOURCE_SIZE, RESOURCE_URI, SECURITY, SECURITY_MATCH_ALL, SECURITY_MATCH_ONE, SOURCE_ID, TAGS, TARGET_NAMESPACE, THUMBNAIL, TITLE| Constructor and Description |
|---|
AdaptedMetacard() |
AdaptedMetacard(Metacard metacard) |
| Modifier and Type | Method and Description |
|---|---|
Attribute |
getAttribute(String name)
Returns
Attribute for given attribute name. |
protected Set<Attribute> |
getAttributes() |
String |
getContentTypeName()
Returns the name of the content type of the
Metacard. |
URI |
getContentTypeNamespace()
Some types of metadata use different content types.
|
String |
getContentTypeVersion()
Returns the version of the content type of the
Metacard. |
Date |
getCreatedDate()
Returns the date/time this
Metacard was created. |
Date |
getEffectiveDate()
Returns the date/time this
Metacard was last known to be valid. |
Date |
getExpirationDate()
Returns the date/time this
Metacard is no longer valid and could be removed. |
String |
getId()
Returns the ID of this
Metacard. |
String |
getLocation()
Returns the WKT representation of the geometry.
|
MetacardType |
getMetacardType()
Return the
MetacardType of this Metacard. |
String |
getMetadata()
Returns the metadata associated with this
Metacard. |
Date |
getModifiedDate()
Returns the date/time this
Metacard was last modifed. |
String |
getResourceSize()
This is the size of the resource which may or may not contain a unit.
|
URI |
getResourceURI()
|
String |
getSourceId()
Returns the source ID of the source the metacard is located.
|
byte[] |
getThumbnail()
Returns the thumbnail associated with this
Metacard. |
String |
getTitle()
Returns the title of this
Metacard. |
void |
setAttribute(Attribute attribute)
Sets
Attribute with new attribute. |
protected void |
setId(String id) |
protected void |
setMetacardType(MetacardType metacardType) |
void |
setSourceId(String sourceId)
Sets the source ID of the source the metacard is located.
|
public AdaptedMetacard(Metacard metacard)
public AdaptedMetacard()
public String getId()
MetacardgetId in interface MetacardMetacard.IDprotected void setId(String id)
id - the id to setpublic String getSourceId()
MetacardgetSourceId in interface Metacardpublic void setSourceId(String sourceId)
MetacardsetSourceId in interface MetacardsourceId - the sourceId to setpublic MetacardType getMetacardType()
MetacardMetacardType of this Metacard.getMetacardType in interface MetacardMetacardType - the type of this Metacard, MetacardType is required and
must not be nullprotected void setMetacardType(MetacardType metacardType)
metacardType - the metacardType to setpublic final Attribute getAttribute(String name)
MetacardAttribute for given attribute name.getAttribute in interface Metacardname - name of attributeAttribute for given name, or null if not availablepublic final void setAttribute(@Nullable Attribute attribute)
MetacardAttribute with new attribute.setAttribute in interface Metacardattribute - new Attribute to set. If the getValue() call on the passed in
attribute returns null, the attribute will be removed from this Metacard.public String getContentTypeName()
MetacardMetacard.
getAttribute(Metacard.CONTENT_TYPE)
getContentTypeName in interface MetacardMetacard.getContentTypeName()public URI getContentTypeNamespace()
MetacardURI of the
content type.
getAttribute(Metacard.TARGET_NAMESPACE)
getContentTypeNamespace in interface MetacardMetacard.getContentTypeNamespace()public String getContentTypeVersion()
MetacardMetacard.
getAttribute(Metacard.CONTENT_TYPE_VERSION)
getContentTypeVersion in interface MetacardMetacard.getContentTypeVersion()public Date getCreatedDate()
MetacardMetacard was created.
getAttribute(Metacard.CREATED)
getCreatedDate in interface MetacardMetacard.getCreatedDate()public Date getEffectiveDate()
MetacardMetacard was last known to be valid.
getAttribute(Metacard.EFFECTIVE)
getEffectiveDate in interface MetacardMetacard.getEffectiveDate()public Date getExpirationDate()
MetacardMetacard is no longer valid and could be removed.
getAttribute(Metacard.EXPIRATION)
getExpirationDate in interface MetacardMetacard.getExpirationDate()public String getLocation()
Metacard
getAttribute(Metacard.GEOGRAPHY)
getLocation in interface MetacardMetacard.getLocation()public String getMetadata()
MetacardMetacard.
getAttribute(Metacard.METADATA)
getMetadata in interface MetacardMetacard.getMetadata()public Date getModifiedDate()
MetacardMetacard was last modifed.
getAttribute(Metacard.MODIFIED)
getModifiedDate in interface MetacardMetacard.getModifiedDate()public String getResourceSize()
MetacardgetResourceSize in interface MetacardMetacard.getResourceSize()public URI getResourceURI()
MetacardMetacards Resource URI and in the form of a URI Object.
new URI(getAttribute(Metacard.RESOURCE_URI));
getResourceURI in interface MetacardMetacard.getResourceURI()public byte[] getThumbnail()
MetacardMetacard.
getAttribute(Metacard.THUMBNAIL)
getThumbnail in interface MetacardMetacard.getThumbnail()public String getTitle()
MetacardgetTitle in interface MetacardMetacard.getTitle()This work is licensed under a Creative Commons Attribution 4.0 International License.