@Test public void serializeSpaceReference() { EntityReference reference = resolver.resolve("wiki:space1.space2", EntityType.SPACE); assertEquals("6:space16:space2", serializer.serialize(reference)); }
@Override public String serialize(EntityReference reference, Object... parameters) { if (reference == null) { return null; } StringBuilder representation = new StringBuilder(); List<EntityReference> references = reference.getReversedReferenceChain(); EntityReference wikiReference = references.get(0); int index; if (wikiReference.getType() == EntityType.WIKI) { index = 1; } else { index = 0; } for (; index < reference.size(); ++index) { serializeEntityReference(references.get(index), representation, wikiReference, parameters); } return representation.toString(); }
LocalUidStringEntityReferenceSerializer implements EntityReferenceSerializer<String> { @Override public String serialize(EntityReference reference, Object... parameters) { if (reference == null) { return null; } StringBuilder representation = new StringBuilder(); List<EntityReference> references = reference.getReversedReferenceChain(); EntityReference wikiReference = references.get(0); int index; if (wikiReference.getType() == EntityType.WIKI) { index = 1; } else { index = 0; } for (; index < reference.size(); ++index) { serializeEntityReference(references.get(index), representation, wikiReference, parameters); } return representation.toString(); } }
LocalUidStringEntityReferenceSerializer implements EntityReferenceSerializer<String> { @Override public String serialize(EntityReference reference, Object... parameters) { if (reference == null) { return null; } StringBuilder representation = new StringBuilder(); List<EntityReference> references = reference.getReversedReferenceChain(); EntityReference wikiReference = references.get(0); int index; if (wikiReference.getType() == EntityType.WIKI) { index = 1; } else { index = 0; } for (; index < reference.size(); ++index) { serializeEntityReference(references.get(index), representation, wikiReference, parameters); } return representation.toString(); }  }
LocalUidStringEntityReferenceSerializer implements EntityReferenceSerializer<String> { @Override public String serialize(EntityReference reference, Object... parameters) { if (reference == null) { return null; } StringBuilder representation = new StringBuilder(); List<EntityReference> references = reference.getReversedReferenceChain(); EntityReference wikiReference = references.get(0); int index; if (wikiReference.getType() == EntityType.WIKI) { index = 1; } else { index = 0; } for (; index < reference.size(); ++index) { serializeEntityReference(references.get(index), representation, wikiReference, parameters); } return representation.toString(); }  @Override String serialize(EntityReference reference, Object... parameters); }
LocalUidStringEntityReferenceSerializer implements EntityReferenceSerializer<String> { @Override public String serialize(EntityReference reference, Object... parameters) { if (reference == null) { return null; } StringBuilder representation = new StringBuilder(); List<EntityReference> references = reference.getReversedReferenceChain(); EntityReference wikiReference = references.get(0); int index; if (wikiReference.getType() == EntityType.WIKI) { index = 1; } else { index = 0; } for (; index < reference.size(); ++index) { serializeEntityReference(references.get(index), representation, wikiReference, parameters); } return representation.toString(); }  @Override String serialize(EntityReference reference, Object... parameters); static final LocalUidStringEntityReferenceSerializer INSTANCE; }