本文整理汇总了Java中net.opengis.gml.PointType类的典型用法代码示例。如果您正苦于以下问题:Java PointType类的具体用法?Java PointType怎么用?Java PointType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PointType类属于net.opengis.gml包,在下文中一共展示了PointType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: copyTo
import net.opengis.gml.PointType; //导入依赖的package包/类
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof TridasLocationGeometry) {
final TridasLocationGeometry copy = ((TridasLocationGeometry) draftCopy);
if (this.isSetPolygon()) {
PolygonType sourcePolygon;
sourcePolygon = this.getPolygon();
PolygonType copyPolygon = ((PolygonType) strategy.copy(LocatorUtils.property(locator, "polygon", sourcePolygon), sourcePolygon));
copy.setPolygon(copyPolygon);
} else {
copy.polygon = null;
}
if (this.isSetPoint()) {
PointType sourcePoint;
sourcePoint = this.getPoint();
PointType copyPoint = ((PointType) strategy.copy(LocatorUtils.property(locator, "point", sourcePoint), sourcePoint));
copy.setPoint(copyPoint);
} else {
copy.point = null;
}
}
return draftCopy;
}
示例2: getPositionFromSamplingPoint
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* Parse the position from a given {@link SamplingPointType}
* @throws com.vividsolutions.jts.io.ParseException
*/
private Geometry getPositionFromSamplingPoint(SamplingPointType spt) throws com.vividsolutions.jts.io.ParseException {
if (spt.getPosition().isSetPoint()) {
PointType point = spt.getPosition().getPoint();
if (point.isSetPos()) {
WKTReader reader = new WKTReader();
return reader.read("POINT("+ point.getPos().getStringValue() + ")");
}
}
else if (spt.isSetBoundedBy()) {
BoundingShapeType bb = spt.getBoundedBy();
EnvelopeType env = bb.getEnvelope();
return getGeometryFromEnvelope(env);
}
return null;
}
示例3: getPositionFromSamplingPoint
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* Parse the position from a given {@link SamplingPointType}
*/
private Geometry getPositionFromSamplingPoint(SamplingPointType spt) throws com.vividsolutions.jts.io.ParseException {
if (spt.getPosition().isSetPoint()) {
PointType point = spt.getPosition().getPoint();
if (point.isSetPos()) {
WKTReader reader = new WKTReader();
return reader.read("POINT("+ point.getPos().getStringValue() + ")");
}
}
else if (spt.isSetBoundedBy()) {
BoundingShapeType bb = spt.getBoundedBy();
EnvelopeType env = bb.getEnvelope();
return getGeometryFromEnvelope(env);
}
return null;
}
示例4: appendFields
import net.opengis.gml.PointType; //导入依赖的package包/类
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
PolygonType thePolygon;
thePolygon = this.getPolygon();
strategy.appendField(locator, this, "polygon", buffer, thePolygon);
}
{
PointType thePoint;
thePoint = this.getPoint();
strategy.appendField(locator, this, "point", buffer, thePoint);
}
return buffer;
}
示例5: equals
import net.opengis.gml.PointType; //导入依赖的package包/类
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof TridasLocationGeometry)) {
return false;
}
if (this == object) {
return true;
}
final TridasLocationGeometry that = ((TridasLocationGeometry) object);
{
PolygonType lhsPolygon;
lhsPolygon = this.getPolygon();
PolygonType rhsPolygon;
rhsPolygon = that.getPolygon();
if (!strategy.equals(LocatorUtils.property(thisLocator, "polygon", lhsPolygon), LocatorUtils.property(thatLocator, "polygon", rhsPolygon), lhsPolygon, rhsPolygon)) {
return false;
}
}
{
PointType lhsPoint;
lhsPoint = this.getPoint();
PointType rhsPoint;
rhsPoint = that.getPoint();
if (!strategy.equals(LocatorUtils.property(thisLocator, "point", lhsPoint), LocatorUtils.property(thatLocator, "point", rhsPoint), lhsPoint, rhsPoint)) {
return false;
}
}
return true;
}
示例6: hashCode
import net.opengis.gml.PointType; //导入依赖的package包/类
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
PolygonType thePolygon;
thePolygon = this.getPolygon();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "polygon", thePolygon), currentHashCode, thePolygon);
}
{
PointType thePoint;
thePoint = this.getPoint();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "point", thePoint), currentHashCode, thePoint);
}
return currentHashCode;
}
示例7: getText
import net.opengis.gml.PointType; //导入依赖的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 = ((PointType)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_PointType_type") :
getString("_UI_PointType_type") + " " + label;
}
示例8: notifyChanged
import net.opengis.gml.PointType; //导入依赖的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(PointType.class)) {
case GmlPackage.POINT_TYPE__POS:
case GmlPackage.POINT_TYPE__COORDINATES:
case GmlPackage.POINT_TYPE__COORD:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
示例9: getPoint
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PointType> getPoint() {
if (point == null) {
point = new EObjectContainmentEList<PointType>(PointType.class, this, GmlPackage.POINT_ARRAY_PROPERTY_TYPE__POINT);
}
return point;
}
示例10: eSet
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case GmlPackage.POINT_ARRAY_PROPERTY_TYPE__POINT:
getPoint().clear();
getPoint().addAll((Collection<? extends PointType>)newValue);
return;
}
super.eSet(featureID, newValue);
}
示例11: basicSetPoint
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPoint(PointType newPoint, NotificationChain msgs) {
PointType oldPoint = point;
point = newPoint;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GmlPackage.POINT_PROPERTY_TYPE__POINT, oldPoint, newPoint);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
示例12: setPoint
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPoint(PointType newPoint) {
if (newPoint != point) {
NotificationChain msgs = null;
if (point != null)
msgs = ((InternalEObject)point).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GmlPackage.POINT_PROPERTY_TYPE__POINT, null, msgs);
if (newPoint != null)
msgs = ((InternalEObject)newPoint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GmlPackage.POINT_PROPERTY_TYPE__POINT, null, msgs);
msgs = basicSetPoint(newPoint, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, GmlPackage.POINT_PROPERTY_TYPE__POINT, newPoint, newPoint));
}
示例13: eSet
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case GmlPackage.POINT_PROPERTY_TYPE__POINT:
setPoint((PointType)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__ACTUATE:
setActuate((ActuateType)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__ARCROLE:
setArcrole((String)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__HREF:
setHref((String)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__REMOTE_SCHEMA:
setRemoteSchema((String)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__ROLE:
setRole((String)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__SHOW:
setShow((ShowType)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__TITLE:
setTitle((String)newValue);
return;
case GmlPackage.POINT_PROPERTY_TYPE__TYPE:
setType((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
示例14: eUnset
import net.opengis.gml.PointType; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case GmlPackage.POINT_PROPERTY_TYPE__POINT:
setPoint((PointType)null);
return;
case GmlPackage.POINT_PROPERTY_TYPE__ACTUATE:
unsetActuate();
return;
case GmlPackage.POINT_PROPERTY_TYPE__ARCROLE:
setArcrole(ARCROLE_EDEFAULT);
return;
case GmlPackage.POINT_PROPERTY_TYPE__HREF:
setHref(HREF_EDEFAULT);
return;
case GmlPackage.POINT_PROPERTY_TYPE__REMOTE_SCHEMA:
setRemoteSchema(REMOTE_SCHEMA_EDEFAULT);
return;
case GmlPackage.POINT_PROPERTY_TYPE__ROLE:
setRole(ROLE_EDEFAULT);
return;
case GmlPackage.POINT_PROPERTY_TYPE__SHOW:
unsetShow();
return;
case GmlPackage.POINT_PROPERTY_TYPE__TITLE:
setTitle(TITLE_EDEFAULT);
return;
case GmlPackage.POINT_PROPERTY_TYPE__TYPE:
unsetType();
return;
}
super.eUnset(featureID);
}
示例15: handle
import net.opengis.gml.PointType; //导入依赖的package包/类
public String handle(PuntOfVlak puntOfVlak)
{
try
{
if (puntOfVlak.getPoint() != null)
return XMLMessageBuilder.getInstance(PointType.class).handle(new ObjectFactory().createPoint(puntOfVlak.getPoint()));
else if (puntOfVlak.getSurface() != null)
return XMLMessageBuilder.getInstance(PolygonType.class).handle(new ObjectFactory().createPolygon((PolygonType)puntOfVlak.getSurface().getValue()));
return null;
}
catch (JAXBException e)
{
throw new HandlerException(e);
}
}