本文整理了Java中org.opengis.annotation.UML
类的一些代码示例,展示了UML
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UML
类的具体详情如下:
包路径:org.opengis.annotation.UML
类名称:UML
暂无
代码示例来源:origin: geotools/geotools
/**
* Returns the URI of the namespace for this name.
*
* <p>In ISO 19103 this is known as <b>scope</b> and containes a backpointer to the containing
* namespace. This solution is too heavy for our purposes, and we expect applications to provide
* their own lookup mechanism through which they can use this URI. The namespace URI does serve
* to make this name unique and is checked as part of the equals operation.
*
* @since GeoAPI 2.1
*/
@UML(identifier = "scope", obligation = MANDATORY, specification = ISO_19103)
String getNamespaceURI();
代码示例来源:origin: geotools/geotools
final UML annotation = field.getAnnotation(UML.class);
if (annotation != null) {
identifier = annotation.identifier();
代码示例来源:origin: org.apache.sis.core/sis-referencing
final UML uml = type.getAnnotation(UML.class);
if (uml != null) {
final Specification spec = uml.specification();
if (spec == Specification.ISO_19111) {
final String name = uml.identifier();
final int length = name.length();
final StringBuilder buffer = new StringBuilder(length).append(name, name.indexOf('_') + 1, length);
代码示例来源:origin: org.apache.sis.core/sis-metadata
/**
* Returns a higher number for obligation which should be first.
*/
private static int order(final UML uml) {
final Obligation obligation = uml.obligation();
if (obligation != null) {
switch (obligation) {
case MANDATORY: return 1;
case CONDITIONAL: return 2;
case OPTIONAL: return 3;
case FORBIDDEN: return 4;
}
}
return 5;
}
代码示例来源:origin: geotools/geotools
final UML annotation = getter.getAnnotation(UML.class);
if (annotation != null) {
addMapping(annotation.identifier(), index);
代码示例来源:origin: apache/sis
final UML uml = type.getAnnotation(UML.class);
if (uml != null) {
final Specification spec = uml.specification();
if (spec == Specification.ISO_19111) {
final String name = uml.identifier();
final int length = name.length();
final StringBuilder buffer = new StringBuilder(length).append(name, name.indexOf('_') + 1, length);
代码示例来源:origin: org.geotoolkit/geotk-metadata
/**
* Returns a higher number for obligation which should be first.
*/
private int order(final UML uml) {
final Obligation obligation = uml.obligation();
if (obligation != null) {
switch (obligation) {
case MANDATORY: return 1;
case CONDITIONAL: return 2;
case OPTIONAL: return 3;
case FORBIDDEN: return 4;
}
}
return 5;
}
}
代码示例来源:origin: opengeospatial/geoapi
/**
* Returns the {@code identifier()} value of the given annotation or {@code null} if none or empty.
*/
private static String identifier(final UML uml) {
if (uml != null) {
final String id = uml.identifier();
if (!id.isEmpty()) return id;
}
return null;
}
代码示例来源:origin: geotools/geotools
/**
* Returns a point value that is guaranteed to be on this {@code Geometry}. The default logic
* may be to use the {@linkplain DirectPosition direct position} of the point returned by {@link
* #getCentroid} if that point is on the object. Another use of representative point may be for
* the placement of labels in systems based on graphic presentation.
*
* @return The representative point.
* @see #getCentroid
*/
@UML(identifier = "representativePoint", obligation = MANDATORY, specification = ISO_19107)
DirectPosition getRepresentativePoint();
代码示例来源:origin: apache/sis
final String identifier = uml.identifier();
switch (identifier) {
case "SV_CoupledResource":
case "SV_OperationChainMetadata":
case "SV_ServiceIdentification": { // Historical reasons (other standard integrated into ISO 19115)
assertEquals("Unexpected @Specification value.", Specification.ISO_19115, uml.specification());
return Namespaces.SRV;
assertEquals("Unexpected @Specification value.", Specification.ISO_19115, uml.specification());
return LegacyNamespaces.GMD;
assertEquals("Unexpected @Specification value.", Specification.ISO_19115, uml.specification());
return Namespaces.MDQ;
assertEquals("Unexpected @Specification value.", Specification.ISO_19115_2, uml.specification());
switch (/*uml.version()*/ 0) {
case 0: return Namespaces.MDQ;
switch (uml.specification()) {
case ISO_19115: return LegacyNamespaces.GMD;
case ISO_19115_2: return LegacyNamespaces.GMI;
switch (uml.specification()) {
case ISO_19115:
case ISO_19115_2: return Schemas.METADATA_ROOT;
代码示例来源:origin: apache/sis
/**
* Returns a higher number for obligation which should be first.
*/
private static int order(final UML uml) {
final Obligation obligation = uml.obligation();
if (obligation != null) {
switch (obligation) {
case MANDATORY: return 1;
case CONDITIONAL: return 2;
case OPTIONAL: return 3;
case FORBIDDEN: return 4;
}
}
return 5;
}
代码示例来源:origin: opengeospatial/geoapi
/**
* Returns {@code true} if the given property shall be ignored.
*/
private boolean isIgnored(final Class<?> type, final UML property) {
final Set<String> properties = ignore.get(type);
return (properties != null) && properties.contains(property.identifier());
}
代码示例来源:origin: geotools/geotools
/**
* Returns the set of maximal complexes within which this {@code Geometry} is contained. As a
* set of primitives, a {@linkplain Complex complex} may be contained as a set in another larger
* {@linkplain Complex complex}, referred to as a "super complex" of the original. A {@linkplain
* Complex complex} is maximal if there is no such larger super complex.
*
* @return The set of maximal complexes within which this {@code Geometry} is contained.
*/
@UML(identifier = "maximalComplex", obligation = MANDATORY, specification = ISO_19107)
Set<? extends Complex> getMaximalComplex();
代码示例来源:origin: org.apache.sis.core/sis-metadata
byte maximumOccurs = 1;
if (uml != null) {
switch (uml.obligation()) {
case MANDATORY: minimumOccurs = 1; break;
case FORBIDDEN: maximumOccurs = 0; break;
代码示例来源:origin: org.apache.sis.core/sis-metadata
/**
* Returns the table name for the specified class.
* This is usually the ISO 19115 name.
*/
static String getTableName(final Class<?> type) {
final UML annotation = type.getAnnotation(UML.class);
if (annotation == null) {
return type.getSimpleName();
}
final String name = annotation.identifier();
return name.substring(name.lastIndexOf('.') + 1);
}
代码示例来源:origin: geotools/geotools
/**
* Returns the mathematical centroid for this {@code Geometry}. The result is not guaranteed to
* be on the object. For heterogeneous collections of primitives, the centroid only takes into
* account those of the largest dimension. For example, when calculating the centroid of
* surfaces, an average is taken weighted by area. Since curves have no area they do not
* contribute to the average.
*
* @return The centroid.
* @see #getRepresentativePoint
*/
@UML(identifier = "centroid", obligation = MANDATORY, specification = ISO_19107)
DirectPosition getCentroid();
代码示例来源:origin: apache/sis
byte maximumOccurs = 1;
if (uml != null) {
switch (uml.obligation()) {
case MANDATORY: minimumOccurs = 1; break;
case FORBIDDEN: maximumOccurs = 0; break;
代码示例来源:origin: org.geotoolkit/geotk-metadata
/**
* Creates a description map for the specified accessor.
*
* @param accessor The accessor to use for the metadata.
* @param packageBase The base package of interfaces. Must end with {@code '.'}.
* @param locale Determines the locale of values in this map.
* @param keyNames Determines the string representation of keys in the map.
* @throws MissingResourceException If no resource bundle is found.
*/
DescriptionMap(final PropertyAccessor accessor, final String packageBase,
final Locale locale, final KeyNamePolicy keyNames) throws MissingResourceException
{
super(accessor, keyNames);
final Class<?> type = accessor.type;
final UML uml = type.getAnnotation(UML.class);
classname = (uml != null) ? uml.identifier() : type.getSimpleName();
descriptions = ResourceBundle.getBundle(packageBase + "Descriptions", locale);
}
代码示例来源:origin: geotools/geotools
/**
* The abbreviation used for this coordinate system axes. This abbreviation is also used to
* identify the ordinates in coordinate tuple. Examples are "<var>X</var>" and "<var>Y</var>".
*
* @return The coordinate system axis abbreviation.
*/
@UML(identifier = "axisAbbrev", obligation = MANDATORY, specification = ISO_19111)
String getAbbreviation();
代码示例来源:origin: org.geotoolkit/geotk-metadata
while (true) {
if (uml != null) {
obligation = uml.obligation();
内容来源于网络,如有侵权,请联系作者删除!