Touchatag.block.uri resource identifier replacer

uri-resource-identifier-replacer

uri-resource-identifier-replacer
"urn:touchatag:block:uri-resource-identifier-replacer"

Replaces all placeholders with their respective resource identifier values in the provided URI.

Following list of resource identifiers are supported:

  • &touchatag.tag.id; - The tag's id. This is not guaranteed to be unique.
  • &touchatag.tag.hash; - A hash made of several attributes of the tag, this value is guaranteed to be unique.
  • &touchatag.reader.id; - The reader's physical id. This is not guaranteed to be unique.
  • &touchatag.reader.hash; - A hash made of several attributes of the reader, this value is guaranteed to be unique.
  • &touchatag.client.name; - The name of the touchatag software client from which the tag event occurred. You can set the name of a touchatag client in its options menu.

Note Touchatag strongly advises developers to use hash values rather than plain id values. Differences between manufacturers of various tags and readers can result in duplicate id values. Hash values are guaranteed unique.

Example

Following snippet demonstrates the usage of this block

 ...
 <breakdown>
      <block id="uri" ref="urn:touchatag:block:uri-source">
          <property name="Value">
              <uri>http://www.touchatag.com/test?tagid=&touchatag.tag.id;</uri>
          </property>
      </block>
      <block id="replacer" ref="urn:touchatag:block:uri-resource-identifier-replacer"/>
 </breakdown>
 <wiringscheme>
      <wire from="uri:out" to="replacer:in" />
 </wiringscheme>
 ...
 

Our example URI will look like this after passing through the block with following parameters:

  • tag id - 0x12345
 <uri>http://www.touchatag.com/test?tagid=0x12345</uri>
 

=======

Example

Following snippet demonstrates the usage of this block

 ...
 <breakdown>
      <block id="uri" ref="urn:touchatag:block:uri-source">
          <property name="Value">
              <uri>http://www.touchatag.com/test?tagid=&touchatag.tag.id;</uri>
          </property>
      </block>
      <block id="replacer" ref="urn:touchatag:block:uri-resource-identifier-replacer"/>
 </breakdown>
 <wiring>
      <wire from="uri:out" to="replacer:in" />
 </wiring>
 ...
 

Our example URI will look like this after passing through the block with following parameters:

  • tag id - 0x12345
 <uri>http://www.touchatag.com/test?tagid=0x12345</uri>
 

>>>>>>> .merge-right.r3940

<block id="uri-resource-identifier-replacer" 
    ref="urn:touchatag:block:uri-resource-identifier-replacer"/>