# Path: findingaids/fa/views.py
# RDFA_NAMESPACES = {
#     'schema': 'http://schema.org/',
#     'dcmitype': 'http://purl.org/dc/dcmitype/',
#     'arch': 'http://purl.org/archival/vocab/arch#',
#     'bibo': 'http://purl.org/ontology/bibo/',
# }
#     C01 = '{%s}c01' % EAD_NAMESPACE
#     C02 = '{%s}c02' % EAD_NAMESPACE
#     C03 = '{%s}c03' % EAD_NAMESPACE
# def site_index(request):
# def browse_titles(request):
# def titles_by_letter(request, letter):
# def xml_titles(request):
# def eadxml(request, id, preview=False):
# def findingaid(request, id, preview=False):
# def full_findingaid(request, id, mode, preview=False):
# def series_or_index(request, id, series_id, series2_id=None,
#                     series3_id=None, preview=False):
# def _view_series(request, eadid, *series_ids, **kwargs):
# def _get_series_or_index(eadid, *series_ids, **kwargs):
# def _get_feedback_options(request, id):
# def search(request):
# def document_search(request, id):
# def _series_url(eadid, series_id, *ids, **extra_opts):
# def _series_anchor(*ids, **extra_opts):
# def _subseries_links(series, url_ids=None, url_callback=_series_url, preview=False,
#                      url_params=''):


from django.conf.urls import url, include
from django.views.generic.base import RedirectView
from findingaids.fa import views as fa_views
#   See the License for the specific language governing permissions and
#   limitations under the License.



TITLE_LETTERS = '[a-zA-Z]'

title_urlpatterns = [
    url('^$', fa_views.browse_titles, name='browse-titles'),
    url(r'^(?P<letter>%s)/$' % TITLE_LETTERS, fa_views.titles_by_letter,
        name='titles-by-letter'),
    url(r'^xml/$', fa_views.xml_titles, name='all-xml')
]

# patterns for ead document id and series id
# defined here for use in urls and in custom management commands that check id patterns
EADID_URL_REGEX = "(?P<id>[-_A-Za-z0-9.]+)"
series_id = "[a-zA-Z0-9-._]+"

# urls under a single document url (e.g., /documents/abbey244/ )
findingaid_parts = [
    url(r'^$', fa_views.findingaid, name='findingaid'),
    url(r'^EAD/$', fa_views.eadxml, name='eadxml'),
    # alternate paths to access ead
    url(r'^ead|ead.xml|xml|XML$', RedirectView.as_view(pattern_name='fa:eadxml', permanent=True)),

    # full finding aid as simple html (html version of pdf, for testing)
    url(r'^full/$', fa_views.full_findingaid,
        {'mode': 'html'}, name='full-findingaid'),
    # view access to XSL-FO used to generate pdf (for testing)

# Path: findingaids/fa/views.py
# RDFA_NAMESPACES = {
#     'schema': 'http://schema.org/',
#     'dcmitype': 'http://purl.org/dc/dcmitype/',
#     'arch': 'http://purl.org/archival/vocab/arch#',
#     'bibo': 'http://purl.org/ontology/bibo/',
# }
#     C01 = '{%s}c01' % EAD_NAMESPACE
#     C02 = '{%s}c02' % EAD_NAMESPACE
#     C03 = '{%s}c03' % EAD_NAMESPACE
# def site_index(request):
# def browse_titles(request):
# def titles_by_letter(request, letter):
# def xml_titles(request):
# def eadxml(request, id, preview=False):
# def findingaid(request, id, preview=False):
# def full_findingaid(request, id, mode, preview=False):
# def series_or_index(request, id, series_id, series2_id=None,
#                     series3_id=None, preview=False):
# def _view_series(request, eadid, *series_ids, **kwargs):
# def _get_series_or_index(eadid, *series_ids, **kwargs):
# def _get_feedback_options(request, id):
# def search(request):
# def document_search(request, id):
# def _series_url(eadid, series_id, *ids, **extra_opts):
# def _series_anchor(*ids, **extra_opts):
# def _subseries_links(series, url_ids=None, url_callback=_series_url, preview=False,
#                      url_params=''):


# Path: findingaids/fa/urls.py
from django.conf.urls import url, include
from django.views.generic.base import RedirectView
from findingaids.fa import views as fa_views

#   See the License for the specific language governing permissions and
#   limitations under the License.



TITLE_LETTERS = '[a-zA-Z]'

title_urlpatterns = [
    url('^$', fa_views.browse_titles, name='browse-titles'),
    url(r'^(?P<letter>%s)/$' % TITLE_LETTERS, fa_views.titles_by_letter,
        name='titles-by-letter'),
    url(r'^xml/$', fa_views.xml_titles, name='all-xml')
]

# patterns for ead document id and series id
# defined here for use in urls and in custom management commands that check id patterns
EADID_URL_REGEX = "(?P<id>[-_A-Za-z0-9.]+)"
series_id = "[a-zA-Z0-9-._]+"

# urls under a single document url (e.g., /documents/abbey244/ )
findingaid_parts = [
    url(r'^$', fa_views.findingaid, name='findingaid'),
    url(r'^EAD/$', fa_views.eadxml, name='eadxml'),
    # alternate paths to access ead
    url(r'^ead|ead.xml|xml|XML$', RedirectView.as_view(pattern_name='fa:eadxml', permanent=True)),

    # full finding aid as simple html (html version of pdf, for testing)
    url(r'^full/$', fa_views.full_findingaid,
        {'mode': 'html'}, name='full-findingaid'),
    # view access to XSL-FO used to generate pdf (for testing)

    url(r'^xsl-fo/$', fa_views.full_findingaid,