本文整理汇总了Java中net.opengis.eml.x001.ViewType.UserDefinedView类的典型用法代码示例。如果您正苦于以下问题:Java UserDefinedView类的具体用法?Java UserDefinedView怎么用?Java UserDefinedView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UserDefinedView类属于net.opengis.eml.x001.ViewType包,在下文中一共展示了UserDefinedView类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseView
import net.opengis.eml.x001.ViewType.UserDefinedView; //导入依赖的package包/类
/**
* parses a view
*
* @param view
* @return an internal representation for the view
*/
private DataView parseView(ViewType view) {
DataView result = new DataView();
/*
* parse view
*/
//check LengthView
if (view.isSetLengthView()) {
result.setViewName(Constants.VIEW_LENGTH_NAME);
LengthView lv = view.getLengthView();
if (lv.isSetIsBatch()) {
result.setBatch(lv.getIsBatch());
}
result.addParameter(Constants.VIEW_PARAM_EVENT_COUNT_NAME, lv.getEventCount());
}
//check TimeView
else if (view.isSetTimeView()) {
result.setViewName(Constants.VIEW_TIME_NAME);
TimeView tv = view.getTimeView();
if (tv.isSetIsBatch()) {
result.setBatch(tv.getIsBatch());
}
result.addParameter(Constants.VIEW_PARAM_DURATION_NAME, this.parseTimerDuration(tv.getDuration()));
}
//check TimeLengthView
else if (view.isSetTimeLengthView()) {
result.setViewName(Constants.VIEW_TIME_LENGTH_NAME);
TimeLengthView tlv = view.getTimeLengthView();
if (tlv.isSetIsBatch()) {
result.setBatch(tlv.getIsBatch());
}
result.addParameter(Constants.VIEW_PARAM_EVENT_COUNT_NAME, tlv.getEventCount());
result.addParameter(Constants.VIEW_PARAM_DURATION_NAME, this.parseTimerDuration(tlv.getDuration()));
}
//check AllView
else if (view.isSetAllView()) {
result.setViewName(Constants.VIEW_ALL_NAME);
}
//else user defined view
else {
UserDefinedView udv = view.getUserDefinedView();
result.setViewName(udv.getName());
UserParameterType[] parameters = udv.getViewParameters().getViewParameterArray();
for (UserParameterType param : parameters) {
result.addParameter(param.getUserParameterName(), param.getUserParameterValue());
}
}
return result;
}
示例2: processDurationValue
import net.opengis.eml.x001.ViewType.UserDefinedView; //导入依赖的package包/类
private void processDurationValue(SimplePatternType incomingObservationCount, Rule rule) {
UserDefinedView userDefinedView = incomingObservationCount.getView().getUserDefinedView();
UserParameterType durationParameter = userDefinedView.getViewParameters().getViewParameterArray(2);
durationParameter.setUserParameterValue("PT" + rule.getEntryTime() + rule.getEntryTimeUnit()); // XXX period or iso?
}