@Test public void testGetLastSpaceReferenceWhenOneSpace() { DocumentReference documentReference = new DocumentReference("wiki", "space", "page"); SpaceReference spaceReference = documentReference.getLastSpaceReference(); Assert.assertEquals(new SpaceReference("space", new WikiReference("wiki")), spaceReference); }
public SpaceReference getLastSpaceReference() { return (SpaceReference) extractReference(EntityType.SPACE); }
DocumentReference extends EntityReference { public SpaceReference getLastSpaceReference() { return (SpaceReference) extractReference(EntityType.SPACE); } }
DocumentReference extends EntityReference { public SpaceReference getLastSpaceReference() { return (SpaceReference) extractReference(EntityType.SPACE); } DocumentReference(EntityReference reference);  DocumentReference(String wikiName, String spaceName, String pageName);  DocumentReference(String wikiName, List<String> spaceNames, String pageName);  DocumentReference(String pageName, SpaceReference parent); }
DocumentReference extends EntityReference { public SpaceReference getLastSpaceReference() { return (SpaceReference) extractReference(EntityType.SPACE); } DocumentReference(EntityReference reference);  DocumentReference(String wikiName, String spaceName, String pageName);  DocumentReference(String wikiName, List<String> spaceNames, String pageName);  DocumentReference(String pageName, SpaceReference parent); @Override void setParent(EntityReference parent); @Override void setType(EntityType type); WikiReference getWikiReference(); void setWikiReference(WikiReference newWikiReference); SpaceReference getLastSpaceReference(); List<SpaceReference> getSpaceReferences(); }
DocumentReference extends EntityReference { public SpaceReference getLastSpaceReference() { return (SpaceReference) extractReference(EntityType.SPACE); } DocumentReference(EntityReference reference);  DocumentReference(String wikiName, String spaceName, String pageName);  DocumentReference(String wikiName, List<String> spaceNames, String pageName);  DocumentReference(String pageName, SpaceReference parent); @Override void setParent(EntityReference parent); @Override void setType(EntityType type); WikiReference getWikiReference(); void setWikiReference(WikiReference newWikiReference); SpaceReference getLastSpaceReference(); List<SpaceReference> getSpaceReferences();  }