public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { List<String> list = resource.getPropertyValues("jcr:mixinTypes"); if ((list != null) && list.contains("mix:referenceable")) { return resource.getProperty("jcr:uuid"); } else { throw new UnsupportedRepositoryOperationException("To acquire the uuid, the nodetype must have mix:referenceable mixin "); } }
public PropertyIterator getProperties(String s) throws RepositoryException { boolean isMatch = false; Properties propyList = resource.getProperties(); Iterator nameIt = getCollectionProperties(propyList).iterator(); Set propValList = new HashSet(); String regex = s + "*"; String input = ""; while (nameIt.hasNext()) { input = nameIt.next().toString(); isMatch = Pattern.matches(regex, input); propValList.add(resource.getProperty(input)); } RegistryPropertyIterator propertyIterator = new RegistryPropertyIterator(propValList, this); return propertyIterator; }
nodeTypeTemplate.setName(nodeType.getProperty("name")); nodeTypeTemplate.setMixin(Boolean.valueOf(nodeType.getProperty("isMixin"))); nodeTypeTemplate.setOrderableChildNodes(Boolean.valueOf(nodeType.getProperty("hasOrderableChildNodes"))); nodeTypeTemplate.setAbstract(Boolean.valueOf(nodeType.getProperty("isAbstract"))); nodeTypeTemplate.setQueryable(Boolean.valueOf(nodeType.getProperty("isQueryable"))); nodeTypeTemplate.setPrimaryItemName(nodeType.getProperty("primaryItemName"));
public PropertyIterator getProperties(String[] strings) throws RepositoryException { boolean isMatch = false; Properties propyList = resource.getProperties(); Set<String> propNames = getCollectionProperties(propyList); Iterator nameIt = propNames.iterator(); Set propValList = new HashSet(); String[] regex = new String[strings.length]; String input = ""; String reg = ""; while (nameIt.hasNext()) { input = nameIt.next().toString(); for (int i = 0; i < regex.length; i++) { reg = regex[i] + "*"; isMatch = Pattern.matches(reg, input); if (isMatch) break; } propValList.add(resource.getProperty(input)); } RegistryPropertyIterator propertyIterator = new RegistryPropertyIterator(propValList, this); return propertyIterator; }