📄 imetadatacatalog.java
字号:
package com.esri.solutions.jitk.common.metadata;
import java.util.List;
import java.util.Map;
/**
* Interface definining an object that is a catalog of metadata.
* <p>
* A metadata catalog is an abstraction for any repository or location in which metadata can be stored.
* This interface defines a minimum number of operations that apply to any metadata catalog.
* </p>
* <p>
* A metadata catalog is assigned an ID, which should be unique amongst the system. It requires an
* {@link IMetadataProfile}, which defines the format of the metadata stored within as well as operations
* to export that metadata to some meaningful entity, such as a POJO or Bean.
* </p>
*/
public interface IMetadataCatalog {
/**
* Retrieves the ID of this metadata catalog.
* @return {@link String} containing the ID. Will not be {@code null}.
*/
public String getId();
/**
* Retrieves the name of this metadata catalog.
*
* @return {@link String} containing the name.
*/
public String getName();
/**
* Sets the Metadata Data Access Object that is used to perform
* search for and retrieve metadata
* @param dao {@link IMetadataDAO} to be utilized by this metadata catalog
*/
public void setMetadataDAO(IMetadataDAO dao);
/**
* Sets a attribute within this metadata catalog.
* The attribute will not outlive the scope of this object.
*
* @param key Name of the attribute, cannot be <code>null</code>.
* @param value Value of the attribute, can be <code>null</code>.
*/
public void setAttribute(String key, Object value);
/**
* Sets multiple attributes within this metadata
* catalog. The attributes will not outlive the scope of this
* object.
*
* @param attrs Contains multiple attributes and their values, cannot
* be <code>null</code>.
*/
public void setAttributes(Map<?extends String, ?extends Object> attrs);
/**
* Returns the metadata catalog attribute value given its name.
*
* @param key Name of the attribute, cannot be <code>null</code>.
* @return
*/
public Object getAttribute(String key);
/**
* Returns all of the metadata catalog attributes and their values.
*
* @return Metadata catalog attributes and values. <code>null</code> will
* never be returned.
*/
public Map<String, Object> getAttributes();
/**
* Searches this metadata catalog for the metadata with the given {@link IMetadataID}.
* @param id {@link IMetadataID} representing the ID of the metadata for which we should search. Cannot be {@code null}.
* @return {@link IMetadataDocument} represented by the given {@link IMetadataID}, could be {@code null} if no metadata is found.
*/
public IMetadataDocument lookup(IMetadataID id);
/**
* Searches this metadata catalog for the metadata with the given {@link IMetadataID}.
*
* @param id {@link IMetadataID} representing the ID of the metadata for which we should search. Cannot be {@code null}.
* @return {@link IMetadataDocument} that is the actual repository item stored in the metadata repository.
*/
public IMetadataDocument lookupRepositoryItem(IMetadataID id)
throws InvalidMetadataOperationException;
/**
* Searches this metadata catalog for the metadata that meets the given search criteria.
*
* @param criteria {@link Map} of search criteria.
* @return {@link List} of {@link IMetadataDocument} that meet the given search criteria.
*/
public List<IMetadataDocument> lookup(Map<String, Object> criteria);
/**
* Retrieves the metadata profile associated with this catalog.
* @return The associated {@link IMetadataProfile}, which cannot be {@code null}.
*/
public IMetadataProfile getMetadataProfile();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -