📄 cswmetadatadocument.java
字号:
package com.esri.solutions.jitk.common.metadata.csw;
import com.esri.solutions.jitk.common.metadata.IMetadataDocument;
import com.esri.solutions.jitk.common.metadata.IMetadataExporter;
import com.esri.solutions.jitk.common.metadata.IMetadataID;
import com.esri.solutions.jitk.datasources.ogc.csw.CswRecord;
/**
* Concrete implementation of the {@link IMetadataDocument} that represents
* an OGC CS/W record.
*/
public class CSWMetadataDocument implements IMetadataDocument {
/**
* {@link IMetadataID} of the CS/W metadata document.
*/
private IMetadataID _id = null;
/**
* Reference to the {@link CSWMetadataProfile} object.
*/
private CSWMetadataProfile _profile = null;
/**
* Reference to the {@link CswRecord}.
*/
private CswRecord _record = null;
/*
* (non-Javadoc)
* @see com.esri.solutions.jitk.common.metadata.IMetadataDocument#export(com.esri.solutions.jitk.common.metadata.IMetadataExporter)
*/
public void export(IMetadataExporter exporter) {
if (exporter == null) {
throw new NullPointerException("exporter cannot be null");
}
exporter.setRaw(_record);
exporter.begin();
exporter.export();
exporter.end();
}
/*
* (non-Javadoc)
* @see com.esri.solutions.jitk.common.metadata.IMetadataDocument#getMetadataID()
*/
public IMetadataID getMetadataID() {
return _id;
}
/**
* Sets the {@link IMetadataID} for this document.
*
* @param id {@link IMetadataID} of the CS/W metadata document.
* @throws NullPointerException Thrown if the <code>id</code> argument is <code>null</code>.
*/
public void setMetadataID(IMetadataID id) {
if (id == null) {
throw new NullPointerException("id cannot be null");
}
_id = id;
}
/*
* (non-Javadoc)
* @see com.esri.solutions.jitk.common.metadata.IMetadataDocument#getMetadataProfile()
*/
public CSWMetadataProfile getMetadataProfile() {
return _profile;
}
/**
* Sets the reference to the {@link CSWMetadataProfile} object.
*
* @param profile Reference to the {@link CSWMetadataProfile} object.
* @throws NullPointerException Thrown if the <code>profile</code> argument is
* <code>null</code>.
*/
public void setMetadataProfile(CSWMetadataProfile profile) {
if (profile == null) {
throw new NullPointerException("profile cannot be null");
}
_profile = profile;
}
/**
* Sets the reference to the {@link CswRecord} object.
*
* @param record Reference to the underlying {@link CswRecord}.
* @throws NullPointerException Thrown if the <code>record</code> argument is
* <code>null</code>.
*/
public void setRecord(CswRecord record) {
if (record == null) {
throw new NullPointerException("record cannot be null");
}
_record = record;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -