Package org.jfree.repository

Examples of org.jfree.repository.Repository


  }

  public String rewrite(final ContentEntity sourceDocument, final ContentEntity dataEntity)
      throws URLRewriteException
  {
    final Repository dataRepository = dataEntity.getRepository();
    if (dataRepository instanceof UrlRepository == false)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataRepository is no URL-Repository.");
    }

    final UrlRepository dataUrlRepo = (UrlRepository) dataRepository;
    final String dataPath = buildPath(dataEntity);
    final URL dataItemUrl;
    try
    {
      dataItemUrl = new URL(dataUrlRepo.getURL(), dataPath);
    }
    catch (MalformedURLException e)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataEntity has no valid URL.");
    }

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
View Full Code Here


  }

  public String rewrite(ContentEntity sourceDocument, ContentEntity dataEntity)
      throws URLRewriteException
  {
    final Repository dataRepository = dataEntity.getRepository();
    if (dataRepository instanceof UrlRepository == false)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataRepository is no URL-Repository.");
    }

    final UrlRepository dataUrlRepo = (UrlRepository) dataRepository;
    final String dataPath = buildPath(dataEntity);
    final URL dataItemUrl;
    try
    {
      dataItemUrl = new URL(dataUrlRepo.getURL(), dataPath);
    }
    catch (MalformedURLException e)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataEntity has no valid URL.");
    }

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
View Full Code Here

TOP

Related Classes of org.jfree.repository.Repository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.