Codota Logo
IdentifierMap.put
Code IndexAdd Codota to your IDE (free)

How to use
put
method
in
org.apache.sis.xml.IdentifierMap

Best Java code snippets using org.apache.sis.xml.IdentifierMap.put (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: apache/sis

  /**
   * Invoked by JAXB for specifying the unique identifier.
   *
   * @see org.apache.sis.metadata.iso.ISOMetadata#setUUID(String)
   */
  @SuppressWarnings("unused")
  private void setUUID(final String id) {
    getIdentifierMap().put(IdentifierSpace.UUID, id);
  }
}
origin: org.apache.sis.core/sis-metadata

  /**
   * Invoked by JAXB for specifying the unique identifier.
   *
   * @see org.apache.sis.metadata.iso.ISOMetadata#setUUID(String)
   */
  private void setUUID(final String id) {
    getIdentifierMap().put(IdentifierSpace.UUID, id);
  }
}
origin: apache/sis

  /**
   * Sets an unique identifier.
   * This method is invoked automatically by JAXB and should never be invoked explicitly.
   */
  private void setUUID(final String id) {
    /*
     * IdentifierMapAdapter will take care of converting the String to UUID if possible, or
     * will store the value as a plain String if it can not be converted. In the later case,
     * a warning will be emitted (logged or processed by listeners).
     */
    getIdentifierMap().put(IdentifierSpace.UUID, id);
  }
}
origin: org.apache.sis.core/sis-metadata

  /**
   * Sets an unique identifier.
   * This method is invoked automatically by JAXB and should never be invoked explicitely.
   */
  private void setUUID(final String id) {
    /*
     * IdentifierMapAdapter will take care of converting the String to UUID if possible, or
     * will store the value as a plain String if it can not be converted. In the later case,
     * a warning will be emitted (logged or processed by listeners).
     */
    getIdentifierMap().put(IdentifierSpace.UUID, id);
  }
}
origin: apache/sis

  /**
   * Assigns the {@link #id} value (if non-null) to the given object. This method
   * is typically invoked at unmarshalling time in order to assign the ID of this
   * temporary wrapper to the "real" GeoAPI implementation instance.
   *
   * @param  wrapped  the GeoAPI implementation for which to assign the ID.
   */
  public final void copyIdTo(final Object wrapped) {
    if (id != null && wrapped instanceof IdentifiedObject) {
      final IdentifierMap map = ((IdentifiedObject) wrapped).getIdentifierMap();
      if (map != null) {                                  // Should not be null, but let be safe.
        map.put(IdentifierSpace.ID, id);
      }
    }
  }
}
origin: org.apache.sis.core/sis-utility

  /**
   * Assigns the {@link #id} value (if non-null) to the given object. This method
   * is typically invoked at unmarshalling time in order to assign the ID of this
   * temporary wrapper to the "real" GeoAPI implementation instance.
   *
   * @param  wrapped  the GeoAPI implementation for which to assign the ID.
   */
  public final void copyIdTo(final Object wrapped) {
    if (id != null && wrapped instanceof IdentifiedObject) {
      final IdentifierMap map = ((IdentifiedObject) wrapped).getIdentifierMap();
      if (map != null) {                                  // Should not be null, but let be safe.
        map.put(IdentifierSpace.ID, id);
      }
    }
  }
}
origin: apache/sis

/**
 * Tests read operations on an {@link IdentifierMap} using specific API.
 */
@Test
public void testGetSpecialized() {
  final List<Identifier> identifiers = new ArrayList<>();
  final IdentifierMap map = new ModifiableIdentifierMap(identifiers);
  assertNull(map.put(ID,   "myID"));
  assertNull(map.put(UUID, "a1eb6e53-93db-4942-84a6-d9e7fb9db2c7"));
  assertNull(map.put(HREF, "http://mylink"));
  assertMapEquals("{gml:id=“myID”,"
      + " gco:uuid=“a1eb6e53-93db-4942-84a6-d9e7fb9db2c7”,"
      + " xlink:href=“http://mylink”}", map);
  assertEquals("myID",                                             map.get           (ID));
  assertEquals("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7",             map.get           (UUID));
  assertEquals("http://mylink",                                    map.get           (HREF));
  assertEquals("myID",                                             map.getSpecialized(ID));
  assertEquals(URI.create("http://mylink"),                        map.getSpecialized(HREF));
  assertEquals(fromString("a1eb6e53-93db-4942-84a6-d9e7fb9db2c7"), map.getSpecialized(UUID));
}
origin: apache/sis

/**
 * Tests explicitly the special handling of {@code href} values.
 */
@Test
public void testHRefSubstitution() {
  final List<Identifier> identifiers = new ArrayList<>();
  final IdentifierMap map = new ModifiableIdentifierMap(identifiers);
  assertNull(map.put(HREF, "myHREF"));
  assertEquals("Shall contain the entry we added.", "myHREF", map.get(HREF));
  // Check the XLink object
  final XLink link = map.getSpecialized(XLINK);
  assertEquals("Added href shall be stored as XLink attribute.", "myHREF", String.valueOf(link.getHRef()));
  assertEquals("Identifier list shall contain the XLink.", link.toString(), getSingleton(identifiers).getCode());
  // Modidfy the XLink object directly
  link.setHRef(URI.create("myNewHREF"));
  assertEquals("Change in XLink shall be reflected in href.", "myNewHREF", map.get(HREF));
}
origin: apache/sis

/**
 * Compares the marshalling and unmarshalling of a {@link DefaultExtent} with XML in the given file.
 */
private void roundtrip(final String filename, final Version version) throws JAXBException {
  final DefaultGeographicBoundingBox bbox = new DefaultGeographicBoundingBox(-99, -79, 14.9844, 31);
  bbox.getIdentifierMap().put(IdentifierSpace.ID, "bbox");
  final DefaultTemporalExtent temporal = new DefaultTemporalExtent();
  if (PENDING_FUTURE_SIS_VERSION) {
    // This block needs sis-temporal module.
    temporal.setBounds(date("2010-01-27 13:26:10"), date("2010-08-27 13:26:10"));
  }
  final DefaultExtent extent = new DefaultExtent(null, bbox, null, temporal);
  assertMarshalEqualsFile(filename, extent, version, "xmlns:*", "xsi:schemaLocation");
  assertEquals(extent, unmarshalFile(DefaultExtent.class, filename));
}
org.apache.sis.xmlIdentifierMapput

Javadoc

Associates the given identifier with the given namespace in this map (optional operation). If the map previously contained a mapping for the namespace, then the old value is replaced by the specified value.

Popular methods of IdentifierMap

  • putSpecialized
    Associates the given identifier with the given namespace in this map (optional operation). If the ma
  • get
  • getSpecialized
    Returns the identifier associated to the given namespace, or null if this map contains no mapping of
  • keySet
  • size

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now