Complex sentence: Since 1869 the castle has been owned by the town, it served as a school, as a rectory and seat of the municipal administration.
Split into simpler sentences: Since 1869 the castle has been owned by the town. It served as a school, as a rectory and as the seat of the municipal administration.