Package org.apache.rat.api

Examples of org.apache.rat.api.MetaData$Datum


    protected void handleHeaderCategoryClaim(String headerCategory) {
        // Does nothing
    }

    private void writeDocumentClaim(Document subject)  {
        final MetaData metaData = subject.getMetaData();
        writeHeaderCategory(metaData);
        writeLicenseFamilyName(metaData);
        writeDocumentCategory(metaData);
        writeApprovedLicenseClaim(metaData);
    }
View Full Code Here


      headerLinesToRead = numberOfRetainedHeaderLines;
      try {
        while(readLine(headers));
        if (!match) {
          final String notes = headers.toString();
                    final MetaData metaData = subject.getMetaData();
                    metaData.set(new MetaData.Datum(MetaData.RAT_URL_HEADER_SAMPLE, notes));
                    metaData.set(new MetaData.Datum(MetaData.RAT_URL_HEADER_CATEGORY, MetaData.RAT_LICENSE_FAMILY_CATEGORY_VALUE_UNKNOWN));
                    metaData.set(MetaData.RAT_LICENSE_FAMILY_NAME_DATUM_UNKNOWN);
        }
      } catch (IOException e) {
                throw new RatHeaderAnalysisException("Cannot read header for " + subject, e);
            }
      try {
View Full Code Here

    this.licenseFamilyName = licenseFamilyName;
    this.notes = notes;
  }
   
    public final void reportOnLicense(Document subject) throws RatHeaderAnalysisException {
        final MetaData metaData = subject.getMetaData();
        metaData.set(new MetaData.Datum(MetaData.RAT_URL_HEADER_SAMPLE, notes));
        metaData.set(new MetaData.Datum(MetaData.RAT_URL_HEADER_CATEGORY,licenseFamilyCategory.getValue()));
        metaData.set(licenseFamilyCategory);
        metaData.set(licenseFamilyName);
    }
View Full Code Here

    protected void handleHeaderCategoryClaim(String headerCategory) {
        // Does nothing
    }

    private void writeDocumentClaim(Document subject)  {
        final MetaData metaData = subject.getMetaData();
        writeHeaderCategory(metaData);
        writeLicenseFamilyName(metaData);
        writeDocumentCategory(metaData);
        writeApprovedLicenseClaim(metaData);
    }
View Full Code Here

                    + " subject: " + subject, e);
        }
    }

    private void writeDocumentClaims(final Document subject) throws IOException, RatException {
        final MetaData metaData = subject.getMetaData();
        writeHeaderSample(metaData);
        writeLicenseFamilyCategory(metaData);
        writeHeaderCategory(metaData);
        writeLicenseFamilyName(metaData);
        writeApprovedLicense(metaData);
View Full Code Here

        appender = pCopyrightMsg == null ? new ApacheV2LicenceAppender() : new ApacheV2LicenceAppender(pCopyrightMsg);
        appender.setForce(pForced);
    }

    public void report(org.apache.rat.api.Document document) throws RatException {
        final MetaData metaData = document.getMetaData();
        final Datum licenseHeader = metaData.get(MetaData.RAT_URL_HEADER_CATEGORY);
        if (licenseHeader == null
                ||  MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_UNKNOWN.getValue().equals(licenseHeader.getValue())) {
            final File file = new File(document.getName());
            if (file.isFile()) {
                try {
                    appender.append(file);
                } catch (IOException e) {
                    throw new RatException(e.getMessage(), e);
                }
            }
        }
        metaData.getData();
    }
View Full Code Here

  private final String name;
  private final MetaData metaData;

  public AbstractMonolithicDocument(String pName) {
    name = pName;
        this.metaData = new MetaData();
  }
View Full Code Here

        appender.setForce(pForced);
    }

    @Override
    public void report(org.apache.rat.api.Document document) throws RatException {
        final MetaData metaData = document.getMetaData();
        final Datum licenseHeader = metaData.get(MetaData.RAT_URL_HEADER_CATEGORY);
        if (licenseHeader == null
                ||  MetaData.RAT_LICENSE_FAMILY_CATEGORY_DATUM_UNKNOWN.getValue().equals(licenseHeader.getValue())) {
            final File file = new File(document.getName());
            if (file.isFile()) {
                try {
                    appender.append(file);
                } catch (IOException e) {
                    throw new RatException(e.getMessage(), e);
                }
            }
        }
        metaData.getData();
    }
View Full Code Here

                    + " subject: " + subject, e);
        }
    }

    private void writeDocumentClaims(final Document subject) throws IOException, RatException {
        final MetaData metaData = subject.getMetaData();
        writeHeaderSample(metaData);
        writeHeaderCategory(metaData);
        writeLicenseFamilyName(metaData);
        writeApprovedLicense(metaData);
        writeDocumentCategory(metaData);
View Full Code Here

TOP

Related Classes of org.apache.rat.api.MetaData$Datum

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.