catalogue-util-library/src/main/java/org/gcube/datacatalogue/ckanutillibrary/shared/jackan/model/CkanTag.java

93 lines
2.4 KiB
Java

/*
* Copyright 2015 Trento Rise (trentorise.eu)
*
* 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.gcube.datacatalogue.ckanutillibrary.shared.jackan.model;
import java.sql.Timestamp;
import javax.annotation.Nullable;
/**
* Extends {@link CkanTagBase} with fields found in search operations.
*/
public class CkanTag extends CkanTagBase {
private String displayName;
private Timestamp revisionTimestamp;
private CkanState state;
public CkanTag() {
super();
}
/**
* You can use this constructor when adding a free tag to a dataset.
*
* @param name the name for the new tag, a string between 2 and 100
* characters long containing only alphanumeric characters and -, _ and .,
* e.g. 'Jazz'
*/
public CkanTag(String name) {
super(name);
}
/**
* You can use this constructor when creating a tag associated to a
* controlled vocabulary
*
* @param name the name for the new tag, a string between 2 and 100
* characters long containing only alphanumeric characters and -, _ and .,
* e.g. 'Jazz'
*/
public CkanTag(String name, String vocabularyId) {
super(name, vocabularyId);
}
/**
*
* @return a human readable name, i.e. "Habitat Quality"
*/
public String getDisplayName() {
return displayName;
}
/**
*
* @param displayName a human readable name, i.e. "Habitat Quality"
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
@Nullable
public Timestamp getRevisionTimestamp() {
return revisionTimestamp;
}
public void setRevisionTimestamp(@Nullable Timestamp revisionTimestamp) {
this.revisionTimestamp = revisionTimestamp;
}
public CkanState getState() {
return state;
}
public void setState(CkanState state) {
this.state = state;
}
}