Parses absolute JCR name from string (JCR format ns:name[index])

@param name
@return
@throws RepositoryException
509568
public JCRName parseJCRName(String name) throws RepositoryException
   {
      JCRPath path = parsePathEntry(JCRPath.createJCRPath(), name);
      JCRPath.PathElement entry = path.getName();
      return new JCRName(entry);
   }
455297
public static ReadFrom valueOf(String name) {

        if (LettuceStrings.isEmpty(name)) {
            throw new IllegalArgumentException("Name must not be empty");
        }

        if (name.equalsIgnoreCase("master")) {
            return MASTER;
        }

        if (name.equalsIgnoreCase("masterPreferred")) {
            return MASTER_PREFERRED;
        }

        if (name.equalsIgnoreCase("slave") || name.equalsIgnoreCase("replica")) {
            return REPLICA;
        }

        if (name.equalsIgnoreCase("slavePreferred") || name.equalsIgnoreCase("replicaPreferred")) {
            return REPLICA_PREFERRED;
        }

        if (name.equalsIgnoreCase("nearest")) {
            return NEAREST;
        }

        if (name.equalsIgnoreCase("any")) {
            return ANY;
        }

        throw new IllegalArgumentException("ReadFrom " + name + " not supported");
    }
184615
public JsonArray getJsonArray(String name) throws JsonException {
        JsonElement el = get(name);
        if (!el.isJsonArray()) {
            throw Util.typeMismatch(name, el, "JsonArray");
        }
        return el.asJsonArray();
    }
785209
String getClassName(String name) {
        char[] s = new char[name.length()+1];
        char c;
        int j = 0;

        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
            s[j++] = '_';
        }
        for (int i=0; i < name.length(); i++, j++) {
            c = name.charAt(i);
            if ( Character.isJavaIdentifierPart(c) ) {
                s[j] = c;
            } else {
                s[j] = '_';
            }
        }
        return (new String(s)).trim();
     }
509930
private void convertOldIdNameClass() throws RepositoryException {
		String searchRoot = "/jcr:root" + ISO9075.encodePath(StorageConstants.NEXT_SERVER_ROOT);
		String searchPropertyName = "className";
		String searchPropertyValue = "com.asf.nextserver.domain.ParameterValue";
		String statement = searchRoot + "//*[@" + searchPropertyName + "='" + searchPropertyValue + "']";
        QueryResult queryResult = getTemplate().query(statement);

        NodeIterator nodes = queryResult.getNodes();
        LOG.info("Found " + nodes.getSize() +  " parameter value nodes");
        while (nodes.hasNext()) {
        	Node node = nodes.nextNode();
        	Property property = null;
        	try {
        		property = node.getProperty("value");
        	} catch (PathNotFoundException ex) {
        		continue;
        	}
        	try {
	        	Object value = deserialize(property.getBinary().getStream());
	        	if (value instanceof Object[]) {
	        		Object[] values = (Object[]) value;
	        		Object[] convertedValues = new Object[values.length];
		        	boolean converted = false;
	        		for (int i = 0; i < values.length; i++) {
	        			Object tmp = values[i];
	        			if (tmp instanceof com.asf.nextreports.engine.queryexec.IdName) {
	        				com.asf.nextreports.engine.queryexec.IdName oldIdName = (com.asf.nextreports.engine.queryexec.IdName) tmp;
	        				IdName idName = new IdName();
	        				idName.setId(oldIdName.getId());
	        				idName.setName(oldIdName.getName());
	        				convertedValues[i] = idName;
	        				converted = true;
	        			} else {
	        				convertedValues[i] = tmp;
	        			}
	        		}
	        		
	        		if (converted) {
	        			ValueFactory valueFactory = node.getSession().getValueFactory();
	                    Binary binary = valueFactory.createBinary(new ByteArrayInputStream(serialize(convertedValues)));
	        			property.setValue(binary);
	        		}
	        	} else if (value instanceof com.asf.nextreports.engine.queryexec.IdName) {
    				com.asf.nextreports.engine.queryexec.IdName oldIdName = (com.asf.nextreports.engine.queryexec.IdName) value;
    				IdName idName = new IdName();
    				idName.setId(oldIdName.getId());
    				idName.setName(oldIdName.getName());

        			ValueFactory valueFactory = node.getSession().getValueFactory();
                    Binary binary = valueFactory.createBinary(new ByteArrayInputStream(serialize(idName)));
        			property.setValue(binary);
	        	}
        	} catch (Exception e) {
        		e.printStackTrace();
        	}
        }
		
        getTemplate().save();
	}
29048
public void setName(String name)
    {
        super.setName(name);
        for (int i = this.getComponentCount() - 1; i >= 0; i--)
        {
            JComponent component = (JComponent)this.getComponent(i);
            component.setName(name);
        }
    }
22692
public JcProperty property(String name) {
		JcProperty ret = new JcProperty(name, this, OPERATOR.PropertyContainer.PROPERTY_ACCESS);
		QueryRecorder.recordInvocationConditional(this, "property", ret, QueryRecorder.literal(name));
		return ret;
	}
1031290
public DescriptorRepository readDescriptorRepository(String fileName)
    {
        try
        {
            RepositoryPersistor persistor = new RepositoryPersistor();
            return persistor.readDescriptorRepository(fileName);
        }
        catch (Exception e)
        {
            throw new MetadataException("Can not read repository " + fileName, e);
        }
    }
922051
public ConnectionRepository readConnectionRepository(String fileName)
    {
        try
        {
            RepositoryPersistor persistor = new RepositoryPersistor();
            return persistor.readConnectionRepository(fileName);
        }
        catch (Exception e)
        {
            throw new MetadataException("Can not read repository " + fileName, e);
        }
    }
773488
public static InternalQName getName(ValueData valueData) throws RepositoryException
   {
      if (valueData instanceof TransientValueData)
      {
         return getName(((TransientValueData)valueData).delegate);
      }
      
      try
      {
         return ((AbstractValueData)valueData).getName();
      }
      catch (IllegalNameException e)
      {
         throw new RepositoryException(e.getMessage(), e);
      }
   }
687142
public JcString stringAtttribute(String name) {
		if (this.delegate != null)
			return this.delegate.stringAtttribute(name);
		JcString ret = checkField_getJcVal(name, JcString.class);
		QueryRecorder.recordInvocationReplace(this, ret, "stringAtttribute");
		return ret;
	}
866389
public Collection<HierarchicalProperty> getProperties(String name) throws RepositoryException
   {
      ArrayList<HierarchicalProperty> props = new ArrayList<HierarchicalProperty>();
      for (HierarchicalProperty p : properties)
      {
         if (p.getStringName().equals(name))
            props.add(p);
      }
      return props;
      // HierarchicalProperty prop = getProperty(name);
      // if(prop != null)
      // props.add( prop );
      // return props;
   }
1252979
public static void checkResourceName(String name) {
        if (name == null || (!name.isEmpty() && !name.matches("^[a-zA-Z0-9_;\\-\\.\\[\\]\\(\\)]+$"))) {
            throw new IllegalArgumentException("name(" + name + ") contains illegal character, must be (a-z,A-Z,0-9,_,.,(,),-,[,])");
        }
    }
471528
final int resolveNameIndex(CharSequence name)
    {
        int size = 0;
        int index = 0;
        constantReadLock.lock();
        try
        {
            size = getConstantPoolSize();
            index = getNameIndex(name);
        }
        finally
        {
            constantReadLock.unlock();
        }
        if (index != -1)
        {
            return index;
        }
        else
        {
            return addConstantInfo(new Utf8(name), size);
        }
    }
982146
public static void checkResourceName(String name) {

        try {
            CmsResource.checkResourceName(name);
        } catch (CmsIllegalArgumentException e) {
            throw new CmisNameConstraintViolationException(e.getLocalizedMessage(), e);
        }
    }
701831
public static int valueFromName(String name) {
        if (name.equals(TYPENAME_SIMPLE_REFERENCE)) {
            return SIMPLE_REFERENCE;
        }
        return javax.jcr.PropertyType.valueFromName(name);
    }
331484
protected String extractFirstName(String name) {
    if (StringUtils.isBlank(name)) {
      return null;
    }
    
    int lastIndexOf = name.lastIndexOf(' ');
    
    if (lastIndexOf == -1)
      return null;
    else
      return name.substring(0, lastIndexOf);
  }