Search in sources :

Example 1 with DefaultTemporalNode

use of org.geotoolkit.temporal.object.DefaultTemporalNode in project geotoolkit by Geomatys.

the class DefaultOrdinalEra method getEndd.

/**
 * Returns a {@link TemporalNode} create from {@link #end} object, use for XML binding.
 *
 * @return a {@link TemporalNode} create from {@link #end} object, use for XML binding.
 */
@XmlElement(name = "end")
private DefaultTemporalNode getEndd() {
    final Identifier iden = getName();
    final Map<String, Object> instantProp = new HashMap<>();
    instantProp.put(NAME_KEY, new NamedIdentifier(null, iden.getCode() + "_end instant"));
    final Map<String, Object> nodeProp = new HashMap<>();
    nodeProp.put(NAME_KEY, new NamedIdentifier(null, iden.getCode() + "_end node"));
    final DefaultTemporalNode start = new DefaultTemporalNode(nodeProp, new DefaultInstant(instantProp, begin), null, null);
    return start;
}
Also used : NamedIdentifier(org.apache.sis.referencing.NamedIdentifier) Identifier(org.opengis.metadata.Identifier) HashMap(java.util.HashMap) NamedIdentifier(org.apache.sis.referencing.NamedIdentifier) DefaultInstant(org.geotoolkit.temporal.object.DefaultInstant) NilReferencingObject(org.apache.sis.internal.referencing.NilReferencingObject) AbstractIdentifiedObject(org.apache.sis.referencing.AbstractIdentifiedObject) DefaultTemporalNode(org.geotoolkit.temporal.object.DefaultTemporalNode) XmlElement(javax.xml.bind.annotation.XmlElement)

Example 2 with DefaultTemporalNode

use of org.geotoolkit.temporal.object.DefaultTemporalNode in project geotoolkit by Geomatys.

the class DefaultOrdinalEra method getStart.

/**
 * Returns a {@link TemporalNode} create from {@link #begin} object, use for XML binding.
 *
 * @return a {@link TemporalNode} create from {@link #begin} object, use for XML binding.
 */
@XmlElement(name = "start")
private DefaultTemporalNode getStart() {
    final Identifier iden = getName();
    final Map<String, Object> instantProp = new HashMap<>();
    instantProp.put(NAME_KEY, new NamedIdentifier(null, iden.getCode() + "_begin instant"));
    final Map<String, Object> nodeProp = new HashMap<>();
    nodeProp.put(NAME_KEY, new NamedIdentifier(null, iden.getCode() + "_start node"));
    final DefaultTemporalNode start = new DefaultTemporalNode(nodeProp, new DefaultInstant(instantProp, begin), null, null);
    return start;
}
Also used : NamedIdentifier(org.apache.sis.referencing.NamedIdentifier) Identifier(org.opengis.metadata.Identifier) HashMap(java.util.HashMap) NamedIdentifier(org.apache.sis.referencing.NamedIdentifier) DefaultInstant(org.geotoolkit.temporal.object.DefaultInstant) NilReferencingObject(org.apache.sis.internal.referencing.NilReferencingObject) AbstractIdentifiedObject(org.apache.sis.referencing.AbstractIdentifiedObject) DefaultTemporalNode(org.geotoolkit.temporal.object.DefaultTemporalNode) XmlElement(javax.xml.bind.annotation.XmlElement)

Aggregations

HashMap (java.util.HashMap)2 XmlElement (javax.xml.bind.annotation.XmlElement)2 NilReferencingObject (org.apache.sis.internal.referencing.NilReferencingObject)2 AbstractIdentifiedObject (org.apache.sis.referencing.AbstractIdentifiedObject)2 NamedIdentifier (org.apache.sis.referencing.NamedIdentifier)2 DefaultInstant (org.geotoolkit.temporal.object.DefaultInstant)2 DefaultTemporalNode (org.geotoolkit.temporal.object.DefaultTemporalNode)2 Identifier (org.opengis.metadata.Identifier)2