Class DocumentAttributes
- java.lang.Object
-
- com.iknowbase.api.contentservices.v2.model.DocumentAttributes
-
- All Implemented Interfaces:
Serializable
public class DocumentAttributes extends Object implements Serializable
Java class for documentAttributes complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="documentAttributes"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="documentAttribute" type="{http://www.iknowbase.com/ws/iknowbase-2}documentAttribute" maxOccurs="unbounded" minOccurs="0"/> </sequence> </restriction> </complexContent> </complexType>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<DocumentAttribute>
documentAttribute
-
Constructor Summary
Constructors Constructor Description DocumentAttributes()
Default no-arg constructorDocumentAttributes(DocumentAttribute... documentAttribute)
Creates a DocumentAttributes-object based on one or more DocumentAttribute-objectsDocumentAttributes(List<DocumentAttribute> documentAttribute)
Fully-initialising value constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentAttributes
from(Map<String,Object> documentAttributeMap)
Creates a DocumentAttributes-object based on a map of attributes, where the key is the external key of an attribute and the value is the attribute value.Optional<DocumentAttribute>
get(Expression expression)
Gets a document attribute, if it existsOptional<DocumentAttribute>
get(ObjectReference objectReference)
Gets a document attribute, if it existsOptional<DocumentAttribute>
get(String externalKey)
Gets a document attribute, if it existsDocumentAttribute
getAt(String property)
Gets an element by external key; most useful from groovy for using e.g.List<DocumentAttribute>
getDocumentAttribute()
Gets the value of the documentAttribute property.boolean
remove(String externalKey)
Removes attributes by externalKeyMap<String,DocumentAttribute>
toMap()
Returns a map of the document attributes, where the key is the external key of the attribute, and the value is aDocumentAttribute
.String
toString()
DocumentAttributes
withDocumentAttribute(DocumentAttribute... values)
DocumentAttributes
withDocumentAttribute(Collection<DocumentAttribute> values)
-
-
-
Field Detail
-
documentAttribute
protected List<DocumentAttribute> documentAttribute
-
-
Constructor Detail
-
DocumentAttributes
public DocumentAttributes()
Default no-arg constructor
-
DocumentAttributes
public DocumentAttributes(List<DocumentAttribute> documentAttribute)
Fully-initialising value constructor
-
DocumentAttributes
public DocumentAttributes(DocumentAttribute... documentAttribute)
Creates a DocumentAttributes-object based on one or more DocumentAttribute-objects
-
-
Method Detail
-
getDocumentAttribute
public List<DocumentAttribute> getDocumentAttribute()
Gets the value of the documentAttribute property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
set
method for the documentAttribute property.For example, to add a new item, do as follows:
getDocumentAttribute().add(newItem);
Objects of the following type(s) are allowed in the list
DocumentAttribute
-
withDocumentAttribute
public DocumentAttributes withDocumentAttribute(DocumentAttribute... values)
-
withDocumentAttribute
public DocumentAttributes withDocumentAttribute(Collection<DocumentAttribute> values)
-
from
public static DocumentAttributes from(Map<String,Object> documentAttributeMap)
Creates a DocumentAttributes-object based on a map of attributes, where the key is the external key of an attribute and the value is the attribute value.
-
toMap
public Map<String,DocumentAttribute> toMap()
Returns a map of the document attributes, where the key is the external key of the attribute, and the value is aDocumentAttribute
. The map is not "live", and will not change as the underlyingDocumentAttributes
changes.
-
getAt
public DocumentAttribute getAt(String property)
Gets an element by external key; most useful from groovy for using e.g. {code attributes['IKB$TITLE']}
-
get
public Optional<DocumentAttribute> get(String externalKey)
Gets a document attribute, if it exists
-
get
public Optional<DocumentAttribute> get(ObjectReference objectReference)
Gets a document attribute, if it exists
-
get
public Optional<DocumentAttribute> get(Expression expression)
Gets a document attribute, if it exists
-
remove
public boolean remove(String externalKey)
Removes attributes by externalKey- Parameters:
externalKey
- external key to remove- Returns:
true
if any elements were removed
-
-