Commit 87e9d713 authored by Ard Schrijvers's avatar Ard Schrijvers

HIPPLUG-1383 [Backport 3.0] Remove the unused (since broken)...

HIPPLUG-1383 [Backport 3.0] Remove the unused (since broken) SitemapFeedBasedOnHstSitemap and SiteMapBasedOnHstSiteMapResource sitemap generators

As a result, quite some other code was unused, which in turn triggered other code to be possible to be removed.

Note I also do a content delete for

/hst:hst/hst:configurations/hst:default/hst:components/forge-sitemap-based-on-hst-configuration-feed

since this component refers to SitemapFeedBasedOnHstSitemap.

I've tested that after a restart (with existing repository), that 'forge-sitemap-based-on-hst-configuration-feed'
component is gone, basic sitemap and NewsSitemapFeed still work as expected

(cherry picked from commit 601e15c1)
parent aec4d8d9
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onehippo.forge.sitemap.components;
import org.hippoecm.hst.configuration.hosting.Mount;
import org.hippoecm.hst.content.beans.manager.ObjectConverter;
import org.hippoecm.hst.core.request.HstRequestContext;
import org.hippoecm.hst.jaxrs.services.AbstractResource;
import org.onehippo.forge.sitemap.components.model.Urlset;
import org.onehippo.forge.sitemap.components.splitter.SitemapSplitter;
import org.onehippo.forge.sitemap.components.splitter.TarGzipSitemapSplitter;
import org.onehippo.forge.sitemap.generator.DefaultUrlInformationProvider;
import org.onehippo.forge.sitemap.generator.SitemapGenerator;
import org.springframework.beans.factory.annotation.Required;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.ByteArrayOutputStream;
import java.util.Collections;
import java.util.List;
/**
* This is a JAX-RS resource to be used in the Hippo REST-interface. It outputs a site map in different formats,
* including a tar.gz archive.
*/
@Path("sitemap")
public class SiteMapBasedOnHstSiteMapResource extends AbstractResource {
private List<String> exclusionsByRefId = Collections.emptyList();
private List<String> exclusionsByComponentConfigurationId = Collections.emptyList();
private List<String> exclusionsBySiteMapPath = Collections.emptyList();
private UrlInformationProvider urlInformationProvider = DefaultUrlInformationProvider.INSTANCE;
private int amountOfWorkers = -1;
private String mountAlias;
@GET
@Path("sitemap-archive.tar.gz")
@Produces({"application/zip", "application/x-gzip", "application/octet-stream", MediaType.APPLICATION_XML})
public Response createSiteMapTarGzArchive(@Context HttpServletRequest request,
@Context HttpServletResponse response) {
Urlset siteMap = obtainSiteMap(request);
final ByteArrayOutputStream siteMapArchiveStream = new ByteArrayOutputStream();
SitemapSplitter splitter = new TarGzipSitemapSplitter(siteMap, siteMapArchiveStream);
boolean splittingExecuted = splitter.split();
if (!splittingExecuted) {
throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
}
response.setHeader("Content-Disposition", "attachment; filename=sitemap-archive.tar.gz");
response.setContentType("application/x-gzip");
final Response.ResponseBuilder okResponse = Response.ok(siteMapArchiveStream.toByteArray(), MediaType.APPLICATION_OCTET_STREAM_TYPE);
return okResponse.build();
}
private Urlset obtainSiteMap(final HttpServletRequest request) {
HstRequestContext requestContext = getRequestContext(request);
ObjectConverter objectConverter = getObjectConverter(requestContext);
Mount mount = requestContext.getMount(mountAlias);
SitemapGenerator generator =
new SitemapGenerator(requestContext, objectConverter, urlInformationProvider, mount);
generator.addSitemapRefIdExclusions(exclusionsByRefId);
generator.addComponentConfigurationIdExclusions(exclusionsByComponentConfigurationId);
generator.addSitemapPathExclusions(exclusionsBySiteMapPath);
if (amountOfWorkers > 0) {
generator.setAmountOfWorkers(amountOfWorkers);
}
return generator.createUrlSetBasedOnHstSiteMap();
}
public void setExclusionsByRefId(final List<String> exclusionsByRefId) {
this.exclusionsByRefId = exclusionsByRefId != null ? exclusionsByRefId : Collections.<String>emptyList();
}
public void setExclusionsByComponentConfigurationId(final List<String> exclusionsByComponentConfigurationId) {
this.exclusionsByComponentConfigurationId = exclusionsByComponentConfigurationId != null ?
exclusionsByComponentConfigurationId : Collections.<String>emptyList();
}
public void setExclusionsBySiteMapPath(List<String> exclusionsBySiteMapPath) {
this.exclusionsBySiteMapPath = exclusionsBySiteMapPath != null ?
exclusionsBySiteMapPath : Collections.<String>emptyList();
}
public void setUrlInformationProvider(UrlInformationProvider urlInformationProvider) {
this.urlInformationProvider = urlInformationProvider;
}
public void setAmountOfWorkers(int amountOfWorkers) {
this.amountOfWorkers = amountOfWorkers;
}
@Required
public void setMountAlias(String mountAlias) {
this.mountAlias = mountAlias;
}
}
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
* Copyright 2010-2016 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -16,7 +16,6 @@
package org.onehippo.forge.sitemap.components;
import org.hippoecm.hst.component.support.bean.BaseHstComponent;
import org.hippoecm.hst.container.RequestContextProvider;
import org.hippoecm.hst.core.component.HstRequest;
import org.hippoecm.hst.core.component.HstResponse;
import org.hippoecm.hst.core.sitemenu.HstSiteMenus;
......@@ -26,16 +25,16 @@ import org.onehippo.forge.sitemap.generator.SitemapGenerator;
public class SitemapFeed extends BaseHstComponent {
public static final int DEFAULT_DEPTH = 2;
public void doBeforeRender(HstRequest request, HstResponse response) {
String depthStr =getComponentParameter("depth");
int maxdepth = DEFAULT_DEPTH;
if (depthStr != null){
maxdepth = Integer.valueOf(depthStr);
String depthStr = getComponentParameter("depth");
int maxDepth = DEFAULT_DEPTH;
if (depthStr != null) {
maxDepth = Integer.valueOf(depthStr);
}
HstSiteMenus siteMenus = request.getRequestContext().getHstSiteMenus();
request.setAttribute("sitemap", new SitemapGenerator(request.getRequestContext(), RequestContextProvider.get().getContentBeansTool().getObjectConverter())
.createSitemap(siteMenus, maxdepth));
request.setAttribute("sitemap", new SitemapGenerator(request.getRequestContext())
.createSitemap(siteMenus, maxDepth));
}
}
/*
* Copyright 2012-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onehippo.forge.sitemap.components;
import static org.apache.commons.lang.StringUtils.isNotBlank;
import static org.onehippo.forge.sitemap.components.util.SiteMapGeneratorUtils.createUrlInformationProvider;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import org.hippoecm.hst.component.support.bean.BaseHstComponent;
import org.hippoecm.hst.container.RequestContextProvider;
import org.hippoecm.hst.core.component.HstComponentFatalException;
import org.hippoecm.hst.core.component.HstRequest;
import org.hippoecm.hst.core.component.HstResponse;
import org.hippoecm.hst.core.parameters.Parameter;
import org.hippoecm.hst.core.parameters.ParametersInfo;
import org.hippoecm.hst.core.request.HstRequestContext;
import org.onehippo.forge.sitemap.components.model.Urlset;
import org.onehippo.forge.sitemap.components.splitter.FileSystemSitemapSplitter;
import org.onehippo.forge.sitemap.components.splitter.RepositorySitemapSplitter;
import org.onehippo.forge.sitemap.components.splitter.SitemapSplitter;
import org.onehippo.forge.sitemap.components.util.OutputMode;
import org.onehippo.forge.sitemap.generator.SitemapGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ParametersInfo(type = SitemapFeedBasedOnHstSitemap.SiteMapFeedBasedOnHstSiteMapParameters.class)
public class SitemapFeedBasedOnHstSitemap extends BaseHstComponent {
private static final Logger log = LoggerFactory.getLogger(SitemapFeedBasedOnHstSitemap.class);
private static final String REGEX_FOR_SPLITTING_COMMA_SEPERATED_PARAMETERS = "[\\s]*,[\\s]*";
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) {
super.doBeforeRender(request, response);
SiteMapFeedBasedOnHstSiteMapParameters parameters = getComponentParametersInfo(request);
SitemapGenerator sitemapGenerator = createSitemapGenerator(request.getRequestContext(), parameters);
Urlset urlset = sitemapGenerator.createUrlSetBasedOnHstSiteMap();
boolean splittingExecuted;
OutputMode outputMode = getOutputMode(parameters);
splittingExecuted = outputMode.shouldSplit()
&& splitSiteMapAndWriteToDestination(request, parameters, urlset);
logQueryStatistics(sitemapGenerator);
if (!splittingExecuted) {
if (urlset.getUrls().size() > Urlset.MAX_SUPPORTED_URLS_PER_FILE) {
throw new HstComponentFatalException("Sitemap was not split, but contains more than "
+ Urlset.MAX_SUPPORTED_URLS_PER_FILE + " entries, configure the splitter.");
}
String siteMapXml = SitemapGenerator.toString(urlset);
request.setAttribute("sitemap", siteMapXml);
} else {
if (!outputMode.outputsToResponse()) {
request.setAttribute("sitemap", "Site map succesfully split, please retrieve the index..");
}
}
}
private static void logQueryStatistics(final SitemapGenerator sitemapGenerator) {
log.info("-----------");
log.info("Queries fired: " + sitemapGenerator.getQueriesFired());
log.info("Cache Hits : " + sitemapGenerator.getQueryCacheHits());
log.info("-----------");
}
@SuppressWarnings({"deprecation"})
private static OutputMode getOutputMode(final SiteMapFeedBasedOnHstSiteMapParameters parameters) {
if (isNotBlank(parameters.getOutputMode())) {
if (!OutputMode.existsForString(parameters.getOutputMode())) {
log.error("Output mode '{}' does not exist.", parameters.getOutputMode());
throw new HstComponentFatalException("Specified output mode does not exist");
}
return OutputMode.valueOf(parameters.getOutputMode().trim());
} else {
// Here for backwards compatibility
log.info("Reverting to deprecated way of detecting the output mode, please use the property 'output-mode'."
+ "It allows easier configuration than 'write-to-repository' and 'splitter-enabled'. For now the"
+ "old way of configuration is supported.");
if (parameters.isSitemapSplitterEnabled()) {
return parameters.isWriteToRepositoryEnabled() ?
OutputMode.SPLIT_TO_REPOSITORY : OutputMode.SPLIT_TO_FILE_SYSTEM;
} else {
return OutputMode.STREAM_SITE_MAP;
}
}
}
private SitemapGenerator createSitemapGenerator(final HstRequestContext requestContext,
final SiteMapFeedBasedOnHstSiteMapParameters parameters) {
String[] refIdsToIgnore = parameters.getSitemapExclusionsForRefIds().trim()
.split(REGEX_FOR_SPLITTING_COMMA_SEPERATED_PARAMETERS);
String[] componentConfigurationIdsToIgnore = parameters.getSitemapExclusionsForComponentConfigurationIds()
.trim().split(REGEX_FOR_SPLITTING_COMMA_SEPERATED_PARAMETERS);
String[] sitemapPathExclusions = parameters.getSiteMapExclusionsForSiteMapPath()
.trim().split(REGEX_FOR_SPLITTING_COMMA_SEPERATED_PARAMETERS);
int amountOfWorkers = parameters.getAmountOfWorkersForSiteMap();
UrlInformationProvider informationProvider = createUrlInformationProvider(parameters.getInformationProvider());
SitemapGenerator sitemapGenerator =
new SitemapGenerator(requestContext, RequestContextProvider.get().getContentBeansTool().getObjectConverter(), informationProvider);
sitemapGenerator.addSitemapRefIdExclusions(refIdsToIgnore);
sitemapGenerator.addComponentConfigurationIdExclusions(componentConfigurationIdsToIgnore);
sitemapGenerator.addSitemapPathExclusions(sitemapPathExclusions);
sitemapGenerator.setAmountOfWorkers(amountOfWorkers);
return sitemapGenerator;
}
private boolean splitSiteMapAndWriteToDestination(final HstRequest request,
final SiteMapFeedBasedOnHstSiteMapParameters parameters,
final Urlset urlset) {
OutputMode outputMode = getOutputMode(parameters);
SitemapSplitter splitter;
switch (outputMode) {
case SPLIT_TO_FILE_SYSTEM:
splitter = new FileSystemSitemapSplitter(urlset, parameters.getSitemapDestinationFolderNameProperty());
return splitter.split();
case SPLIT_TO_REPOSITORY:
Session writeSession = null;
try {
/**
* A persistable session is needed in order to be able to write to the repository.
* In the hst-config.properties a user is needed with writable permissions.
*/
writeSession = getPersistableSession(request);
splitter = new RepositorySitemapSplitter(urlset, writeSession,
parameters.getSitemapDestinationFolderNameProperty());
return splitter.split();
} catch (RepositoryException e) {
throw new HstComponentFatalException("Cannot get a writable session", e);
} finally {
if (writeSession != null) {
writeSession.logout();
}
}
case SPLIT_TO_TAR_GZ_STREAM:
log.error("Splitting to a tar.gz stream is not supported, please use the JAX-RS resource.");
return false;
default:
log.error("No mode that supports splitting specified, cannot split site map. Mode = {}", outputMode);
return false;
}
}
/**
* Parameters to be configured via the Hippo Console. With these parameters it can be indicated to the sitemap
* generator what must be excluded from the sitemap, activate the sitemap splitter, indicate where to write the
* splitted sitemap files or indicate if the splitted sitemap files must be written to the repository or not.
*/
public interface SiteMapFeedBasedOnHstSiteMapParameters {
/**
* Ref Id-s which must be excluded from the generated sitemap.
*
* @return The list of ref id-s which must be excluded.
*/
@Parameter(name = "sitemapRefIdExclusions", defaultValue = "")
String getSitemapExclusionsForRefIds();
/**
* The component configuration Ids which must be excluded from the generated sitemap.
*
* @return the list of component configuration Ids which must be excluded.
*/
@Parameter(name = "sitemapComponentConfigurationIdExclusions", defaultValue = "")
String getSitemapExclusionsForComponentConfigurationIds();
/**
* The sitemap paths which must be excluded from the generated sitemap.
*
* @return the list of sitemap paths which must be excluded.
*/
@Parameter(name = "sitemapPathExclusions", defaultValue = "")
String getSiteMapExclusionsForSiteMapPath();
/**
* The {@link UrlInformationProvider}.
*
* @return the information provider
*/
@Parameter(name = "informationProvider", defaultValue = "")
String getInformationProvider();
/**
* The folder name where the splitted sitemap files will be stored.
*
* @return The name of the folder.
*/
@Parameter(name = "splitter-destination-foldername")
String getSitemapDestinationFolderNameProperty();
/**
* Indicate if the splitter must be enabled or not.
*
* @return True if enabled and false if not enabled.
*/
@Deprecated
@Parameter(name = "splitter-enabled", defaultValue = "false")
boolean isSitemapSplitterEnabled();
/**
* The output mode to use
*
* @return String representation of the enum {@link OutputMode}
*/
@Parameter(name = "output-mode", defaultValue = "")
String getOutputMode();
@Deprecated
@Parameter(name = "write-to-repository", defaultValue = "false")
boolean isWriteToRepositoryEnabled();
@Parameter(name = "amountOfWorkers", defaultValue = "4")
int getAmountOfWorkersForSiteMap();
}
}
......@@ -28,12 +28,12 @@ public class SitemapView extends BaseHstComponent {
public void doBeforeRender(HstRequest request, HstResponse response) {
String depthStr = getComponentParameter("depth");
int maxdepth = DEFAULT_DEPTH;
int maxDepth = DEFAULT_DEPTH;
if (depthStr != null){
maxdepth = Integer.valueOf(depthStr);
maxDepth = Integer.valueOf(depthStr);
}
HstSiteMenus siteMenus = request.getRequestContext().getHstSiteMenus();
request.setAttribute("sitemap", SitemapGenerator.getSitemapView(siteMenus, maxdepth));
request.setAttribute("sitemap", SitemapGenerator.getSitemapView(siteMenus, maxDepth));
}
}
/*
* Copyright 2012-2013 Hippo B.V. (http://www.onehippo.com)
* Copyright 2012-2016 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -66,22 +66,4 @@ public interface UrlInformationProvider {
*/
String getLoc(HippoBean hippoBean, HstRequestContext requestContext, Mount mount);
/**
* Indicates whether this document should be included in the site map
*
* @param hippoBean the document
* @return <code>true</code> if the document should be included, <code>false</code> otherwise
*/
boolean includeDocumentInSiteMap(HippoBean hippoBean);
/**
* Indicates whether the child site map items for this document should be included in the site map.
* This happens when a default/any matcher site map item has child site map items. This method indicates whether
* those child site map items should also be processed.
*
* @param hippoBean the document
* @return <code>true</code> if the child site map items of this document should be included, <code>false</code>
* otherwise
*/
boolean includeChildrenInSiteMap(HippoBean hippoBean);
}
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 01:46:58 PM CEST
//
package org.onehippo.forge.sitemap.components.model;
import java.math.BigDecimal;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the org.hippoecm.hst.components.sitemap.model package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private static final String SITEMAP_SCHEMA_URI = "http://www.sitemaps.org/schemas/sitemap/0.9";
private static final QName _Lastmod_QNAME = new QName(SITEMAP_SCHEMA_URI, "lastmod");
private static final QName _Loc_QNAME = new QName(SITEMAP_SCHEMA_URI, "loc");
private static final QName _Changefreq_QNAME = new QName(SITEMAP_SCHEMA_URI, "changefreq");
private static final QName _Priority_QNAME = new QName(SITEMAP_SCHEMA_URI, "priority");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.hippoecm.hst.components.sitemap.model
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Urlset }
*
*/
public Urlset createUrlset() {
return new Urlset();
}
/**
* Create an instance of {@link Url }
*
*/
public Url createUrl() {
return new Url();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = SITEMAP_SCHEMA_URI, name = "lastmod")
public JAXBElement<String> createLastmod(String value) {
return new JAXBElement<String>(_Lastmod_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = SITEMAP_SCHEMA_URI, name = "loc")
public JAXBElement<String> createLoc(String value) {
return new JAXBElement<String>(_Loc_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = SITEMAP_SCHEMA_URI, name = "changefreq")
public JAXBElement<String> createChangefreq(String value) {
return new JAXBElement<String>(_Changefreq_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BigDecimal }{@code >}}
*
*/
@XmlElementDecl(namespace = SITEMAP_SCHEMA_URI, name = "priority")
public JAXBElement<BigDecimal> createPriority(BigDecimal value) {
return new JAXBElement<BigDecimal>(_Priority_QNAME, BigDecimal.class, null, value);
}
}
......@@ -60,8 +60,6 @@ import static java.util.Collections.synchronizedList;
@XmlRootElement(name = "urlset")
public class Urlset {
public static final int MAX_SUPPORTED_URLS_PER_FILE = 50000;
private List<Url> urls;
public Urlset() {
......@@ -100,15 +98,4 @@ public class Urlset {
return this.urls;
}
/**
* Adds the specified url to the Urlset if this Url isn't already in the Urlset
*
* @param url the Url to add
*/
public void addUrlThatDoesntExistInTheListYet(Url url) {
if (!urls.contains(url)) {
urls.add(url);
}
}
}
/*
* Copyright 2012-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onehippo.forge.sitemap.components.model.sitemapindex;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the sitemapindex package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package:
* sitemapindex
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link TSitemap }
* @return Return a new TSitemap. An item of the SitemapIndex.
*/
public TSitemap createTSitemap() {
return new TSitemap();
}
/**
* Create an instance of {@link SitemapIndex }
* @return Return a new SitemapIndex.
*/
public SitemapIndex createSitemapindex() {
return new SitemapIndex();
}
}
/*
* Copyright 2012-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.