class OrganisationUnit extends
    BaseDimensionalItemObject implements
    MetadataObject,
    CoordinateObject {

    @JsonProperty
    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
    public String getPath()
    {
        List<String> pathList = new ArrayList<>();
        Set<String> visitedSet = new HashSet<>();
        OrganisationUnit currentParent = parent;

        pathList.add( uid );

        while ( currentParent != null )
        {
            if ( !visitedSet.contains( currentParent.getUid() ) )
            {
                pathList.add( currentParent.getUid() );
                visitedSet.add( currentParent.getUid() );
                currentParent = currentParent.getParent();
            }
            else
            {
                currentParent = null; // Protect against cyclic org unit graphs
            }
        }

        Collections.reverse( pathList );

        path = PATH_SEP + StringUtils.join( pathList, PATH_SEP );

        return path;
    }

    public  OrganisationUnit();
    public  OrganisationUnit( String name );
    public  OrganisationUnit( String name, String shortName, String code, Date openingDate, Date closedDate,
        String comment );
    public  OrganisationUnit( String name, OrganisationUnit parent, String shortName, String code, Date openingDate,
        Date closedDate, String comment );

}