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()
Metacard
getId
in interface Metacard
Metacard.ID
protected void setId(String id)
id
- the id to setpublic String getSourceId()
Metacard
getSourceId
in interface Metacard
public void setSourceId(String sourceId)
Metacard
setSourceId
in interface Metacard
sourceId
- the sourceId to setpublic MetacardType getMetacardType()
Metacard
MetacardType
of this Metacard
.getMetacardType
in interface Metacard
MetacardType
- the type of this Metacard
, MetacardType is required and
must not be null
protected void setMetacardType(MetacardType metacardType)
metacardType
- the metacardType to setpublic final Attribute getAttribute(String name)
Metacard
Attribute
for given attribute name.getAttribute
in interface Metacard
name
- name of attributeAttribute
for given name, or null
if not availablepublic final void setAttribute(@Nullable Attribute attribute)
Metacard
Attribute
with new attribute.setAttribute
in interface Metacard
attribute
- 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()
Metacard
Metacard
.
getAttribute
(Metacard.CONTENT_TYPE
)
getContentTypeName
in interface Metacard
Metacard.getContentTypeName()
public URI getContentTypeNamespace()
Metacard
URI
of the
content type.
getAttribute
(Metacard.TARGET_NAMESPACE
)
getContentTypeNamespace
in interface Metacard
Metacard.getContentTypeNamespace()
public String getContentTypeVersion()
Metacard
Metacard
.
getAttribute
(Metacard.CONTENT_TYPE_VERSION
)
getContentTypeVersion
in interface Metacard
Metacard.getContentTypeVersion()
public Date getCreatedDate()
Metacard
Metacard
was created.
getAttribute
(Metacard.CREATED
)
getCreatedDate
in interface Metacard
Metacard.getCreatedDate()
public Date getEffectiveDate()
Metacard
Metacard
was last known to be valid.
getAttribute
(Metacard.EFFECTIVE
)
getEffectiveDate
in interface Metacard
Metacard.getEffectiveDate()
public Date getExpirationDate()
Metacard
Metacard
is no longer valid and could be removed.
getAttribute
(Metacard.EXPIRATION
)
getExpirationDate
in interface Metacard
Metacard.getExpirationDate()
public String getLocation()
Metacard
getAttribute
(Metacard.GEOGRAPHY
)
getLocation
in interface Metacard
Metacard.getLocation()
public String getMetadata()
Metacard
Metacard
.
getAttribute
(Metacard.METADATA
)
getMetadata
in interface Metacard
Metacard.getMetadata()
public Date getModifiedDate()
Metacard
Metacard
was last modifed.
getAttribute
(Metacard.MODIFIED
)
getModifiedDate
in interface Metacard
Metacard.getModifiedDate()
public String getResourceSize()
Metacard
getResourceSize
in interface Metacard
Metacard.getResourceSize()
public URI getResourceURI()
Metacard
Metacard
s Resource URI and in the form of a URI
Object.
new URI(getAttribute
(Metacard.RESOURCE_URI
));
getResourceURI
in interface Metacard
Metacard.getResourceURI()
public byte[] getThumbnail()
Metacard
Metacard
.
getAttribute
(Metacard.THUMBNAIL
)
getThumbnail
in interface Metacard
Metacard.getThumbnail()
public String getTitle()
Metacard
getTitle
in interface Metacard
Metacard.getTitle()
This work is licensed under a Creative Commons Attribution 4.0 International License.