@Test public void convertStringUsingFormat() throws ParseException { final String uri = String.format("tcm:%s-%s-%s", PUBLICATION_ID, ITEM_ID, ITEM_TYPE); assertThat(testTcmUri.toString(), is(uri)); assertThat(new TCMURI(uri).toString(), is(uri)); }
@Override public String toString() { return namespace.getValue() + ":" + this.pubId + SEPARATOR + this.itemId + SEPARATOR + this.itemType; }
TCMURI implements Serializable { @Override public String toString() { return namespace.getValue() + ":" + this.pubId + SEPARATOR + this.itemId + SEPARATOR + this.itemType; } }
TCMURI implements Serializable { @Override public String toString() { return namespace.getValue() + ":" + this.pubId + SEPARATOR + this.itemId + SEPARATOR + this.itemType; } TCMURI(String uri);  TCMURI(String uri, int version);  TCMURI(int publicationId, int itemId, int itemType);  TCMURI(int publicationId, int itemId, int itemType, int version);  TCMURI(Namespace namespace, int publicationId, int itemId, int itemType, int version); private  TCMURI(Builder builder); }
TCMURI implements Serializable { @Override public String toString() { return namespace.getValue() + ":" + this.pubId + SEPARATOR + this.itemId + SEPARATOR + this.itemType; } TCMURI(String uri);  TCMURI(String uri, int version);  TCMURI(int publicationId, int itemId, int itemType);  TCMURI(int publicationId, int itemId, int itemType, int version);  TCMURI(Namespace namespace, int publicationId, int itemId, int itemType, int version); private  TCMURI(Builder builder); static boolean isValid(String tcmUri); static int safeLongToInt(long l); @Override String toString(); int getItemType(); int getItemId(); int getPublicationId(); int getVersion(); }
TCMURI implements Serializable { @Override public String toString() { return namespace.getValue() + ":" + this.pubId + SEPARATOR + this.itemId + SEPARATOR + this.itemType; } TCMURI(String uri);  TCMURI(String uri, int version);  TCMURI(int publicationId, int itemId, int itemType);  TCMURI(int publicationId, int itemId, int itemType, int version);  TCMURI(Namespace namespace, int publicationId, int itemId, int itemType, int version); private  TCMURI(Builder builder); static boolean isValid(String tcmUri); static int safeLongToInt(long l); @Override String toString(); int getItemType(); int getItemId(); int getPublicationId(); int getVersion(); static final String URI_NAMESPACE; }