• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TimeInstantType类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中net.opengis.gml.TimeInstantType的典型用法代码示例。如果您正苦于以下问题:Java TimeInstantType类的具体用法?Java TimeInstantType怎么用?Java TimeInstantType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

TimeInstantType类属于net.opengis.gml包,在下文中一共展示了TimeInstantType类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getText

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
	String label = ((TimeInstantType)object).getId();
	return label == null || label.length() == 0 ?
		getString("_UI_TimeInstantType_type") :
		getString("_UI_TimeInstantType_type") + " " + label;
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:14,
代码来源:TimeInstantTypeItemProvider.java

示例2: notifyChanged

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification) {
	updateChildren(notification);

	switch (notification.getFeatureID(TimeInstantType.class)) {
		case GmlPackage.TIME_INSTANT_TYPE__TIME_POSITION:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:19,
代码来源:TimeInstantTypeItemProvider.java

示例3: basicSetTimeInstant

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetTimeInstant(TimeInstantType newTimeInstant, NotificationChain msgs) {
	TimeInstantType oldTimeInstant = timeInstant;
	timeInstant = newTimeInstant;
	if (eNotificationRequired()) {
		ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT, oldTimeInstant, newTimeInstant);
		if (msgs == null) msgs = notification; else msgs.add(notification);
	}
	return msgs;
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:15,
代码来源:TimeInstantPropertyTypeImpl.java

示例4: setTimeInstant

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setTimeInstant(TimeInstantType newTimeInstant) {
	if (newTimeInstant != timeInstant) {
		NotificationChain msgs = null;
		if (timeInstant != null)
			msgs = ((InternalEObject)timeInstant).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT, null, msgs);
		if (newTimeInstant != null)
			msgs = ((InternalEObject)newTimeInstant).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT, null, msgs);
		msgs = basicSetTimeInstant(newTimeInstant, msgs);
		if (msgs != null) msgs.dispatch();
	}
	else if (eNotificationRequired())
		eNotify(new ENotificationImpl(this, Notification.SET, GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT, newTimeInstant, newTimeInstant));
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:19,
代码来源:TimeInstantPropertyTypeImpl.java

示例5: eSet

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eSet(int featureID, Object newValue) {
	switch (featureID) {
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT:
			setTimeInstant((TimeInstantType)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ACTUATE:
			setActuate((ActuateType)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ARCROLE:
			setArcrole((String)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__HREF:
			setHref((String)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__REMOTE_SCHEMA:
			setRemoteSchema((String)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ROLE:
			setRole((String)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__SHOW:
			setShow((ShowType)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TITLE:
			setTitle((String)newValue);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TYPE:
			setType((String)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:39,
代码来源:TimeInstantPropertyTypeImpl.java

示例6: eUnset

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID) {
	switch (featureID) {
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TIME_INSTANT:
			setTimeInstant((TimeInstantType)null);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ACTUATE:
			unsetActuate();
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ARCROLE:
			setArcrole(ARCROLE_EDEFAULT);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__HREF:
			setHref(HREF_EDEFAULT);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__REMOTE_SCHEMA:
			setRemoteSchema(REMOTE_SCHEMA_EDEFAULT);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__ROLE:
			setRole(ROLE_EDEFAULT);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__SHOW:
			unsetShow();
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TITLE:
			setTitle(TITLE_EDEFAULT);
			return;
		case GmlPackage.TIME_INSTANT_PROPERTY_TYPE__TYPE:
			unsetType();
			return;
	}
	super.eUnset(featureID);
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:39,
代码来源:TimeInstantPropertyTypeImpl.java

示例7: buildRequest

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
private GetObservationDocument buildRequest() {
    // build the request
    final GetObservationDocument getObs = GetObservationDocument.Factory.newInstance();
    final GetObservation obs = getObs.addNewGetObservation();
    final EventTime eventTime = obs.addNewEventTime();

    // TM_Equals
    final TMEqualsDocument tmEqDoc = TMEqualsDocument.Factory.newInstance();

    final BinaryTemporalOpType tmEq = tmEqDoc.addNewTMEquals();
    final AbstractTimeObjectType timeInstType = tmEq.addNewTimeObject();
    final TimeInstantType timeInst = net.opengis.gml.TimeInstantType.Factory.newInstance();
    final TimePositionType timePos = timeInst.addNewTimePosition();
    timePos.setStringValue(LATEST_OBSERVATION_VALUE);
    timeInstType.set(timeInst);
    tmEq.addNewPropertyName();

    // workaround
    final XmlCursor tmEqualsCursor = tmEq.newCursor();
    if (tmEqualsCursor.toChild(new QName("http://www.opengis.net/gml", "_TimeObject"))) {
        tmEqualsCursor.setName(new QName("http://www.opengis.net/gml", "TimeInstant"));
    }
    final XmlCursor tmEqualsCursor2 = tmEq.newCursor();
    if (tmEqualsCursor2.toChild(new QName("http://www.opengis.net/ogc", "PropertyName"))) {
        tmEqualsCursor2.setTextValue(TEMP_OP_PROPERTY_NAME);
    }

    eventTime.addNewTemporalOps();

    eventTime.setTemporalOps(tmEqDoc.getTemporalOps());

    final XmlCursor cursor = eventTime.newCursor();
    if (cursor.toChild(new QName("http://www.opengis.net/ogc", "temporalOps"))) {
        cursor.setName(new QName("http://www.opengis.net/ogc", "TM_Equals"));
    }
    // binOp.set(tmEqDoc);

    obs.addProcedure(theCheck().getProcedure());
    obs.setOffering(theCheck().getOffering());
    obs.addObservedProperty(theCheck().getObservedProperty());
    obs.setService(SOS_SERVICE);
    obs.setVersion(SOS_VERSION);
    // obs.addNewFeatureOfInterest().addNewObjectID().setStringValue(foi);
    obs.setResponseFormat(GET_OBS_RESPONSE_FORMAT);
    obs.setResultModel(GET_OBS_RESULT_MODEL);

    return getObs;
}
 

开发者ID:52North,
项目名称:Supervisor,
代码行数:49,
代码来源:SosLatestObservationCheckRunner.java

示例8: checkObservationCollection

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
private boolean checkObservationCollection(final Date maxAge, final ObservationCollectionDocument obsColl) {
    final ObservationPropertyType observation = obsColl.getObservationCollection().getMemberArray(0);

    final TimeObjectPropertyType samplingTime = observation.getObservation().getSamplingTime();
    final AbstractTimeObjectType timeObj = samplingTime.getTimeObject();

    if (timeObj instanceof TimeInstantType) {
        final TimeInstantType timeInstant = (TimeInstantType) timeObj;
        final String timeString = timeInstant.getTimePosition().getStringValue();
        log.debug("Parsed response, latest observation was at " + timeString);

        try {
            final Date timeToCheck = ISO8601LocalFormat.parse(timeString);
            if (timeToCheck.after(maxAge)) {
                // ALL OKAY - save the result
            	final ServiceCheckResult r = new ServiceCheckResult(
            			ID_GENERATOR.generate(),
            			check.getIdentifier(),
            			POSITIVE_TEXT,
            			new Date(),
            			CheckResult.ResultType.POSITIVE,
            			check.getServiceIdentifier());
                addResult(r);
                return true;
            }

            // to old!
            return saveAndReturnNegativeResult(
            		String.format("%s %s %s  -- latest observation is too old (%s)!",
            				NEGATIVE_TEXT,
            				theCheck().getOffering(),
            				theCheck().getProcedure(),
            				timeString));
        }
        catch (final ParseException e) {
            log.error("Could not parse sampling time " + timeString, e);
            return saveAndReturnNegativeResult(NEGATIVE_TEXT + getObservationString()
                    + " -- Could not parse the given time " + timeString + ".");
        }
    }
    log.warn("Response does not contain time instant, not handling this!");
    return saveAndReturnNegativeResult(NEGATIVE_TEXT + getObservationString()
            + " -- Response did not contain TimeInstant as samplingTime!");
}
 

开发者ID:52North,
项目名称:Supervisor,
代码行数:45,
代码来源:SosLatestObservationCheckRunner.java

示例9: createGmlTimeInstantType

点赞 2

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
@Provides
@Override
public TimeInstantType createGmlTimeInstantType() {
    return TimeInstantType.Factory.newInstance();
}
 

开发者ID:moosbusch,
项目名称:xbLIDO,
代码行数:6,
代码来源:DefaultLidoModule.java

示例10: getTimeInstant

点赞 1

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public TimeInstantType getTimeInstant() {
	return timeInstant;
}
 

开发者ID:markus1978,
项目名称:citygml4emf,
代码行数:9,
代码来源:TimeInstantPropertyTypeImpl.java

示例11: createGmlTimeInstantType

点赞 1

import net.opengis.gml.TimeInstantType; //导入依赖的package包/类
public TimeInstantType createGmlTimeInstantType(); 

开发者ID:moosbusch,
项目名称:xbLIDO,
代码行数:2,
代码来源:GmlModule.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)